https://bugzilla.wikimedia.org/show_bug.cgi?id=35024

       Web browser: ---
             Bug #: 35024
           Summary: syntax error in SQL string to executed because of
                    quoted tablename
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Semantic MediaWiki
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---


MediaWiki        1.18.1
PHP                5.3.10
PostgreSQL        8.4.10
Semantic MediaWiki  1.7.0.2

In

  extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php

line 1061, the sought table name

  $smw_tmp_unusedprops = $db->tableName( 'smw_tmp_unusedprops' );

returns a string that is quoted.

That variable is then used in the construction of an SQL statement and prefixed
with 'create_'. The SQL statement fails to execute with appropriate errors.

Could be fixed either like this:

  $smw_tmp_unusedprops = trim ( $smw_tmp_unusedprops, "\"'" );

or by having the $db->tableName method doing this for every call, even
optionally with a second parameter.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to