r114764 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114763‎ | r114764 | r114765 >
Date:14:01, 6 April 2012
Author:greg
Status:deferred
Tags:
Comment:
We don't want the quoted table name when we are doing a direct lookup via a column value. We probably do not want to use tableName() with 'raw' either, because *any* modification of said name will break the query. Other than a complete table rename, which seems very, very unlikely and unwanted. This appears to be mentioned in bug 34855.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -1063,7 +1063,7 @@
10641064 $sql = "CREATE OR REPLACE FUNCTION create_smw_tmp_unusedprops() RETURNS void AS "
10651065 . "$$ "
10661066 . "BEGIN "
1067 - . " IF EXISTS(SELECT NULL FROM pg_tables WHERE tablename=" . $smw_tmp_unusedprops . " AND schemaname = ANY (current_schemas(true))) "
 1067+ . " IF EXISTS(SELECT NULL FROM pg_tables WHERE tablename='smw_tmp_unusedprops' AND schemaname = ANY (current_schemas(true))) "
10681068 . " THEN DELETE FROM " . $smw_tmp_unusedprops . "; "
10691069 . " ELSE "
10701070 . " CREATE TEMPORARY TABLE " . $smw_tmp_unusedprops . " ( title text ); "

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113147increment to 1.8 alpha and attempt to fix bug 34855jeroendedauw16:21, 6 March 2012