Last modified: 2012-12-16 09:51:05 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 T41063, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39063 - 1: near "<COLUMN NAME>": syntax error
1: near "<COLUMN NAME>": syntax error
Status: RESOLVED INVALID
Product: MediaWiki extensions
Classification: Unclassified
AskSQL (Other open bugs)
unspecified
All All
: Low major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-06 00:36 UTC by Brandon Sky
Modified: 2012-12-16 09:51 UTC (History)
1 user (show)

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


Attachments

Description Brandon Sky 2012-08-06 00:36:01 UTC
REL1_17 branch
SQLite 3.16.5
Mediawiki 1.17.3
-------------------------------------------------------------------------
Here's my SQL query, to add the CheckUser extension:

CREATE TABLE 'cu_changes' (
  cuc_id INTEGER PRIMARY KEY,
  cuc_namespace int NOT NULL default '0',
  cuc_title varchar(255) NOT NULL default '',
  cuc_user INTEGER NOT NULL DEFAULT 0,
  cuc_user_text VARCHAR(255) NOT NULL DEFAULT '',
  cuc_actiontext varchar(255) NOT NULL default '',
  cuc_comment varchar(255) NOT NULL default '',
  cuc_minor bool NOT NULL default '0',
  cuc_page_id int(10)  NOT NULL default '0',
  cuc_this_oldid int(10)  NOT NULL default '0',
  cuc_last_oldid int(10)  NOT NULL default '0',
  cuc_type tinyint(3)  NOT NULL default '0',
  cuc_timestamp CHAR(14) NOT NULL default '',
  cuc_ip VARCHAR(255) NULL default '',
  cuc_ip_hex VARCHAR(255) default NULL,
  cuc_xff VARCHAR(255) NULL default '',
  cuc_xff_hex VARCHAR(255) default NULL,
  cuc_agent VARCHAR(255) default NULL,
  PRIMARY KEY cuc_id (cuc_id),
  INDEX cuc_ip_hex_time (cuc_ip_hex,cuc_timestamp),
  INDEX cuc_user_ip_time (cuc_user,cuc_ip,cuc_timestamp),
  INDEX cuc_xff_hex_time (cuc_xff_hex,cuc_timestamp),
  INDEX (cuc_timestamp)
)

CREATE TABLE 'cu_log' (
  cul_id int primary key,
  cul_timestamp binary(14) not null,
  cul_user int  not null,
  cul_user_text varchar(255) binary not null,
  cul_reason varchar(255) binary not null,
  cul_type varbinary(30) not null,
  cul_target_id int  not null default 0,
  cul_target_text blob not null default '',
  cul_range_start varbinary(255) not null default '',
  cul_range_end varbinary(255) not null default '',
  PRIMARY KEY (cul_id),
  INDEX (cul_timestamp),
  INDEX cul_user (cul_user, cul_timestamp),
  INDEX cul_type_target (cul_type,cul_target_id, cul_timestamp),
  INDEX cul_target_hex (cul_target_hex, cul_timestamp),
  INDEX cul_range_start (cul_range_start, cul_timestamp)
);

Running this query gives me this error:

1: near "cuc_id": syntax error

Backtrace:

#0 /Users/sky/Sites/brandonsky11o/g/wiki/includes/db/Database.php(751): DatabaseBase->reportQueryError('near "cuc_id": ...', 1, 'CREATE TABLE 'c...', 'SpecialAsksql::...', false)
#1 /Users/sky/Sites/brandonsky11o/g/wiki/extensions/Asksql/Asksql_body.php(111): DatabaseBase->query('CREATE TABLE 'c...', 'SpecialAsksql::...')
#2 /Users/sky/Sites/brandonsky11o/g/wiki/extensions/Asksql/Asksql_body.php(37): SqlQueryForm->doSubmit()
#3 /Users/sky/Sites/brandonsky11o/g/wiki/includes/SpecialPage.php(578): SpecialAsksql->execute(NULL)
#4 /Users/sky/Sites/brandonsky11o/g/wiki/includes/Wiki.php(262): SpecialPage::executePath(Object(Title))
#5 /Users/sky/Sites/brandonsky11o/g/wiki/includes/Wiki.php(63): MediaWiki->handleSpecialCases(Object(Title), Object(OutputPage), Object(WebRequest))
#6 /Users/sky/Sites/brandonsky11o/g/wiki/index.php(114): MediaWiki->performRequestForTitle(Object(Title), NULL, Object(OutputPage), Object(User), Object(WebRequest))
#7 {main}

-------------------------------------------------------------------------
This also, in SQLite, doesn't work with install.php (bug 37590).
Comment 1 Andre Klapper 2012-12-16 09:37:14 UTC
1.17 is pretty old, does this still happen in a supported version?

It also looks undeveloped / unmaintained according to http://www.mediawiki.org/wiki/Extension:AskSQL
Comment 2 Max Semenik 2012-12-16 09:51:05 UTC
I'm having parse errors trying to understand why are you filing a complaint about SQLite not supporting MySQL syntax as an unrelated extension's bug. First, there's no bug. Second, AskSQL is not supported and has been deleted from our version control with extreme prejudice.

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


Navigation
Links