https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114764

Revision: 114764
Author:   greg
Date:     2012-04-06 14:01:56 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
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: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php       
2012-04-06 06:27:51 UTC (rev 114763)
+++ trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php       
2012-04-06 14:01:56 UTC (rev 114764)
@@ -1063,7 +1063,7 @@
                        $sql = "CREATE OR REPLACE FUNCTION 
create_smw_tmp_unusedprops() RETURNS void AS "
                                   . "$$ "
                                   . "BEGIN "
-                                  . " IF EXISTS(SELECT NULL FROM pg_tables 
WHERE tablename=" . $smw_tmp_unusedprops . " AND schemaname = ANY 
(current_schemas(true))) "
+                                  . " IF EXISTS(SELECT NULL FROM pg_tables 
WHERE tablename='smw_tmp_unusedprops' AND schemaname = ANY 
(current_schemas(true))) "
                                   . " THEN DELETE FROM " . 
$smw_tmp_unusedprops . "; "
                                   . " ELSE "
                                   . "  CREATE TEMPORARY TABLE " . 
$smw_tmp_unusedprops . " ( title text ); "


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to