Last modified: 2013-06-10 03:16:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37024, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35024 - syntax error in SQL string to executed because of quoted tablename
syntax error in SQL string to executed because of quoted tablename
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-07 06:30 UTC by Bob de Vries
Modified: 2013-06-10 03:16 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bob de Vries 2012-03-07 06:30:59 UTC
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.
Comment 1 Jeroen De Dauw 2012-03-07 17:08:24 UTC
I think I already fixed this in r113147 for bug 34855.

Is there still an issue after that? This fix is in the 1.7.1 release btw.
Comment 2 MWJames 2013-06-10 03:16:59 UTC
(In reply to comment #1)
> I think I already fixed this in r113147 for bug 34855.
> 
> Is there still an issue after that? This fix is in the 1.7.1 release btw.

As per note and since SQLStore2 is no longer in maintenance closing this issue now.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links