Last modified: 2008-04-17 19:23:19 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 T15519, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 13519 - Document needed DB privileges
Document needed DB privileges
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-26 16:10 UTC by Steve Sanbeg
Modified: 2008-04-17 19:23 UTC (History)
2 users (show)

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


Attachments
workaround to get this at least semi-functional (1.46 KB, patch)
2008-03-26 17:06 UTC, Steve Sanbeg
Details
Update INSTALL (605 bytes, patch)
2008-04-16 16:05 UTC, Chad H.
Details

Description Steve Sanbeg 2008-03-26 16:10:38 UTC
I just installed the latest release tarballs of Mediawiki and semantic mediawiki, but so far I'm unable to get any results from it.

When I use #ask to query a category, I get the following:
---
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    (SQL query hidden)

from within function "". MySQL returned error "1142: ALTER command denied to user 'wikiuser'@'localhost' for table 'cats1' (localhost)".
---

I ran the installation special page, but there is no cats1 table in this database.
Comment 1 Steve Sanbeg 2008-03-26 16:13:28 UTC
Similar results when querying on a property:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    (SQL query hidden)

from within function "". MySQL returned error "1142: ALTER command denied to user 'wikiuser'@'localhost' for table 'prop1' (localhost)".
Comment 2 Steve Sanbeg 2008-03-26 17:06:31 UTC
Created attachment 4767 [details]
workaround to get this at least semi-functional

Sorry to keep spamming this, I was really hoping this would be a bit easier to get working.

Anyway, I seem to have found a workaround for this problem, so the extension may be usable.  The first change seems innocuous.  Hopefully the second set of lines I commented out weren't important, and there aren't many more problems like this.

Thanks.
Comment 3 Thomas Bleher 2008-03-26 17:11:02 UTC
AFAIK, SMW creates temporary tables to process certain queries, therefor it needs the following additional rights:
* CREATE TEMPORARY TABLE
* DROP TEMPORARY TABLE
* ALTER TABLE

Unfortunately, this does not seem to be documented in INSTALL.
Retitling bug accordingly.
Comment 4 Steve Sanbeg 2008-03-27 17:06:11 UTC
Thanks for the clarification; yes, that would've been helpful if it were documented.

Currently, mine does seem to be working without these rights, so it may be possible to simplify it somewhat. i.e. it only alters a table immediately after creation, so that can be changed.

although the installation may still be complicated enough that we'd want something like mediawiki's config.php script to initialize things.
Comment 5 Chad H. 2008-04-16 16:05:43 UTC
Created attachment 4825 [details]
Update INSTALL

Adding patch to update INSTALL. I've looked over the SQL Store for SMW, and it definitely needs these permissions to fully function.

I'm not sure your patch really *fixes* things so much as it hides the errors.
Comment 6 Steve Sanbeg 2008-04-16 16:19:50 UTC
Strangely, my MySQL doesn't seem to understand syntax like "grant drop temporary table".

The only place I see an alter table is immediately after creation, so I just combined those statements (r33392) and did a "grant drop table".  I haven't seen any problems with just commenting out the drop table, but I'm sure they must be there.  Although I'd guess changing "create table" to "create table unless exists" and "drop table" to "delete from table" should work.  Or if there is a common syntax to grant privs on temporary tables, maybe that could be added to the setup script.

Comment 7 Steve Sanbeg 2008-04-16 16:20:51 UTC
(In reply to comment #6)
> Strangely, my MySQL doesn't seem to understand syntax like "grant drop
> temporary table".
> 
> The only place I see an alter table is immediately after creation, so I just
> combined those statements (r33392) and did a "grant drop table".  I haven't
> seen any problems with just commenting out the drop table, but I'm sure they
> must be there.  Although I'd guess changing "create table" to "create table
> unless exists" and "drop table" to "delete from table" should work.  Or if
> there is a common syntax to grant privs on temporary tables, maybe that could
> be added to the setup script.
> 

sorry, that was r33393.
Comment 8 Markus Krötzsch 2008-04-17 19:23:19 UTC
I have now updated INSTALL as suggested, and added a further remark how to disable the features that need those additional user rights. ALTER TABLE may still be required for updates (if the DB layout changed). 

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


Navigation
Links