Last modified: 2014-07-07 14:06:29 UTC
Hello We have mediawiki 1.18.2 and LiquidThreads 2.0. When you run update.php get the error: Creating thread table ... PHP Warning: pg_query (): Query failed: ERROR: syntax error at or near "(" LINE 2: thread_id int (8) unsigned NOT NULL PRIMARY KEY auto_increme ... ^ In / var / www / test / includes / db / DatabasePostgres.php on line 253 A database query syntax error has occurred. The last attempted database query was: "CREATE TABLE" thread "( thread_id int (8) unsigned NOT NULL PRIMARY KEY auto_increment, thread_root int (8) unsigned UNIQUE NOT NULL, thread_ancestor int (8) unsigned NOT NULL, thread_parent int (8) unsigned NULL, thread_summary_page int (8) unsigned NULL, thread_subject varchar (255) NULL, thread_author_id int unsigned NULL, thread_author_name varchar (255) NULL, thread_modified char (14) binary NOT NULL default'', thread_created char (14) binary NOT NULL default'', thread_editedness int (1) NOT NULL default 0, thread_article_namespace int NOT NULL, thread_article_title varchar (255) binary NOT NULL, thread_article_id int (8) unsigned NOT NULL, thread_type int (4) unsigned NOT NULL default 0, thread_sortkey varchar (255) NOT NULL default'', thread_replies int (8) DEFAULT -1, thread_signature TINYBLOB NULL, UNIQUE (thread_root) ) / * $ WgDBTableOptions * / " from within function "DatabaseBase :: sourceFile (/ var / www / test / extensions / LiquidThreads / lqt.sql)". Database returned error "1: ERROR: syntax error at or near" (" LINE 2: thread_id int (8) unsigned NOT NULL PRIMARY KEY auto_increme ... ^ " Change the name lqt.pg.sql to lqt.sql, run update.php: Creating thread table ... ok ... Thread_history table already exists. Creating thread_pending_relationship table ... PHP Warning: pg_query (): Query failed: ERROR: syntax error at or near "unsigned" LINE 2: tpr_thread int unsigned NOT NULL, ^ In / var / www / test / includes / db / DatabasePostgres.php on line 253 A database query syntax error has occurred. The last attempted database query was: "CREATE TABLE" thread_pending_relationship "( tpr_thread int unsigned NOT NULL, tpr_relationship varbinary (64) NOT NULL, tpr_title varbinary (255) NOT NULL, tpr_type varbinary (32) NOT NULL, PRIMARY KEY (tpr_thread, tpr_relationship) ) / * $ WgDBTableOptions * / " from within function "DatabaseBase :: sourceFile (/ var / www / test / extensions / LiquidThreads / schema-changes / thread_pending_relationship.sql)". Database returned error "1: ERROR: syntax error at or near" unsigned " LINE 2: tpr_thread int unsigned NOT NULL, ^ "
Changing summary, adding pg help -- Thanks, saper!
First installment to fix it is in Gerrit change #6875 This is still far from working. After installation, when I try to post first thread on the empty user talk page, I get SQL error: SELECT * FROM "thread" WHERE thread_id = '' 22P02: ERROR: invalid input syntax for integer: "" LINE 1: ...ds::where Saper */ * FROM "thread" WHERE thread_id = '' ^ . Backtrace: #0 /usr/home/saper/public_html/pg/w/includes/db/DatabasePostgres.php(394): DatabaseBase->reportQueryError('ERROR: invalid...', '22P02', 'SELECT * FROM...', 'Threads::where', false) #1 /usr/home/saper/public_html/pg/w/includes/db/Database.php(920): DatabasePostgres->reportQueryError('ERROR: invalid...', '22P02', 'SELECT * FROM...', 'Threads::where', false) #2 /usr/home/saper/public_html/pg/w/includes/db/Database.php(1393): DatabaseBase->query('SELECT * FROM...', 'Threads::where') #3 /usr/home/saper/gerrit/extensions/LiquidThreads/classes/Threads.php(98): DatabaseBase->select('thread', '*', Array, 'Threads::where', Array) #4 /usr/home/saper/gerrit/extensions/LiquidThreads/classes/Threads.php(167): Threads::where(Array, Array, true) #5 /usr/home/saper/gerrit/extensions/LiquidThreads/classes/View.php(1660): Threads::withId('') #6 /usr/home/saper/gerrit/extensions/LiquidThreads/classes/View.php(1819): LqtView->getMustShowThreads(Array) #7 /usr/home/saper/gerrit/extensions/LiquidThreads/pages/TalkpageView.php(358): LqtView->showThread(Object(Thread)) #8 /usr/home/saper/gerrit/extensions/LiquidThreads/classes/Dispatch.php(63): TalkpageView->show() #9 /usr/home/saper/gerrit/extensions/LiquidThreads/classes/Dispatch.php(216): LqtDispatch::talkpageMain(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest)) #10 [internal function]: LqtDispatch::tryPage(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest), Object(MediaWiki)) #11 /usr/home/saper/public_html/pg/w/includes/Hooks.php(216): call_user_func_array('LqtDispatch::tr...', Array) #12 /usr/home/saper/public_html/pg/w/includes/GlobalFunctions.php(3932): Hooks::run('MediaWikiPerfor...', Array) #13 /usr/home/saper/public_html/pg/w/includes/Wiki.php(473): wfRunHooks('MediaWikiPerfor...', Array) #14 /usr/home/saper/public_html/pg/w/includes/Wiki.php(277): MediaWiki->performAction(Object(Article)) #15 /usr/home/saper/public_html/pg/w/includes/Wiki.php(592): MediaWiki->performRequest() #16 /usr/home/saper/public_html/pg/w/includes/Wiki.php(502): MediaWiki->main() #17 /usr/home/saper/public_html/pg/w/index.php(58): MediaWiki->run() #18 {main}
Using this version: https://gerrit.wikimedia.org/r/#/c/6875/ Now when you install another error occurs: Adding thread_signature field to table thread...PHP Warning: pg_query(): Query failed: ERROR: type "tinyblob" does not exist LINE 1: ... ) */ TABLE "thread" ADD COLUMN thread_signature TINYBLOB N... ^ in /var/www/test/includes/db/DatabasePostgres.php on line 253 A database query syntax error has occurred. The last attempted database query was: "ALTER TABLE "thread" ADD COLUMN thread_signature TINYBLOB NULL " from within function "DatabaseBase::sourceFile( /var/www/test/extensions/LiquidThreads/schema-changes/thread_signature.sql )". Database returned error "1: ERROR: type "tinyblob" does not exist LINE 1: ... ) */ TABLE "thread" ADD COLUMN thread_signature TINYBLOB N... ^"
Not a blocker.
(In reply to Anton Yackushev from comment #3) > Database returned error "1: ERROR: type "tinyblob" does not exist > LINE 1: ... ) */ TABLE "thread" ADD COLUMN thread_signature TINYBLOB N... Wondering if that obsoletes bug 28042?