Page MenuHomePhabricator

updateSearchIndex use old mysql-Tables
Closed, ResolvedPublic

Description

Author: ms

Description:
after a transwiki-import i could not search for the imported Article.
so i tried the following at my debian-testing:

  1. cd /usr/share/mediawiki1.5/maintenance/
  2. php updateSearchIndex.php

Updating searchindex between 20060626091530 and 20060627091530

  • Waiting for lock ---

Warning: Missing argument 1 for lockSearchindex(), called in
/usr/share/mediawiki1.5/maintenance/updateSearchIndex.inc on line 33 and defined
in /usr/share/mediawiki1.5/maintenance/updateSearchIndex.inc on line 79
A database error has occurred
Query: LOCK TABLES searchindex LOW_PRIORITY WRITE, cur READ, interwiki READ
Function:
Error: 1146 Table 'wikidb.cur' doesn't exist (localhost)

Backtrace:
GlobalFunctions.php line 450 calls wfBacktrace()
Database.php line 397 calls wfDebugDieBacktrace()
Database.php line 347 calls Database::reportQueryError()
updateSearchIndex.inc line 82 calls Database::query()
updateSearchIndex.inc line 33 calls lockSearchindex()
updateSearchIndex.php line 51 calls updateSearchIndex()

running "php updateSearchIndex.php may use old tables:

  1. php rebuildall.php
    • Rebuilding fulltext search index (if you abort this will break searching; run

this script again to fix):
Dropping index...
Rebuilding index fields for 1303 pages...
0
500
1000
Rebuild the index...

  • Rebuilding recentchanges table:

Loading from page and revision tables...
A database error has occurred
Query: INSERT rev_timestamp 5000 INTO recentchanges
(rc_timestamp,rc_cur_time,rc_user,rc_user_text,rc_namespace,rc_title,rc_comment,rc_minor,rc_bot,rc_new,rc_cur_id,rc_this_oldid,rc_last_oldid,rc_type)
SELECT
rev_timestamp,rev_timestamp,rev_user,rev_user_text,page_namespace,page_title,rev_comment,rev_minor_edit,0,page_is_new,page_id,rev_id,0,
IF(page_is_new != 0, 1, 0) FROM page,revision WHERE (rev_timestamp >

  1. AND (rev_page=page_id)

Function: rebuildRecentChangesTablePass1
Error: 1064 You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '5000
INTO recentchanges (rc_timestamp,rc_cur_time,rc_user,rc_user_text,rc_name' at
line 1 (localhost)

Backtrace:
GlobalFunctions.php line 450 calls wfBacktrace()
Database.php line 397 calls wfDebugDieBacktrace()
Database.php line 347 calls Database::reportQueryError()
Database.php line 1268 calls Database::query()
rebuildrecentchanges.inc line 43 calls Database::insertSelect()
rebuildall.php line 26 calls rebuildRecentChangesTablePass1()

mysqlcheck wikidb

wikidb.archive OK
wikidb.categorylinks OK
wikidb.hitcounter
note : The storage engine for the table doesn't support check
wikidb.image OK
wikidb.imagelinks OK
wikidb.interwiki OK
wikidb.ipblocks OK
wikidb.logging OK
wikidb.math OK
wikidb.objectcache OK
wikidb.oldimage OK
wikidb.page OK
wikidb.pagelinks OK
wikidb.querycache OK
wikidb.recentchanges OK
wikidb.revision OK
wikidb.searchindex OK
wikidb.site_stats OK
wikidb.text OK
wikidb.trackbacks OK
wikidb.transcache OK
wikidb.user OK
wikidb.user_groups OK
wikidb.user_newtalk OK
wikidb.validate OK
wikidb.watchlist OK

php refreshLinks.php

Refreshing link table.
Starting from page_id 1 of 1303.
100
200
300
400
500
600
700
800
900
1000
1100
1200
1300
Deleting pagelinks from non-existent articles... fixed 0 row(s)
Deleting imagelinks from non-existent articles... fixed 0 row(s)
Deleting categorylinks from non-existent articles... fixed 0 row(s)
services:/usr/share/mediawiki1.5/maintenance# php rebuildall.php

  • Rebuilding fulltext search index (if you abort this will break searching; run

this script again to fix):
Dropping index...
Rebuilding index fields for 1303 pages...
0
500
1000
Rebuild the index...

  • Rebuilding recentchanges table:

Loading from page and revision tables...
A database error has occurred
Query: INSERT rev_timestamp 5000 INTO recentchanges
(rc_timestamp,rc_cur_time,rc_user,rc_user_text,rc_namespace,rc_title,rc_comment,rc_minor,rc_bot,rc_new,rc_cur_id,rc_this_oldid,rc_last_oldid,rc_type)
SELECT
rev_timestamp,rev_timestamp,rev_user,rev_user_text,page_namespace,page_title,rev_comment,rev_minor_edit,0,page_is_new,page_id,rev_id,0,
IF(page_is_new != 0, 1, 0) FROM page,revision WHERE (rev_timestamp >

  1. AND (rev_page=page_id)

Function: rebuildRecentChangesTablePass1
Error: 1064 You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '5000
INTO recentchanges (rc_timestamp,rc_cur_time,rc_user,rc_user_text,rc_name' at
line 1 (localhost)

Backtrace:
GlobalFunctions.php line 450 calls wfBacktrace()
Database.php line 397 calls wfDebugDieBacktrace()
Database.php line 347 calls Database::reportQueryError()
Database.php line 1268 calls Database::query()
rebuildrecentchanges.inc line 43 calls
Database::insertSelect()
rebuildall.php line 26 calls rebuildRecentChangesTablePass1()

I lost my "Recent Changes".

Then I wanted to search for less than 4 Letter-Words:
Adding
[mysqld]
ft_min_word_len=3
[myisamchk]
ft_min_word_len=3
to my /etc/mysql/my.cnf

mysql> repair table searchindex quick;

I can now search for the new imported article, but the "recent changes" are
still missing and the php-scripts are still not running.


Version: 1.5.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz6463

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:20 PM
bzimport set Reference to bz6463.
bzimport added a subscriber: Unknown Object (MLST).

ms wrote:

The Bug 5195 is talking about the problem at rebuildall.php.
But is their no solution for the 1.5-version, which is the
highest version that is working with my old mysql-server?

robchur wrote:

This script was fixed before the 1.6.0 release, although not backported. Since
this problem now lies in a release branch which is obsolete, it doesn't seem to
be too much of an issue. If you need to use the script, obtain the updated
version from Subversion:

http://svn.wikimedia.org/viewvc/mediawiki/branches/REL1_6/phase3/maintenance/