Not a bug vBulletin 3.8 "Key 'threadid' doesn't exist in table 'post'"

Jake B.

Well-known member
Affected version
Latest
Code:
In AbstractStatement.php line 228:

  MySQL statement prepare error [1176]: Key 'threadid' doesn't exist in table 'post'

xf:import [--processes PROCESSES] [--finalize]

Exception query:
                        SELECT post.*,
                                IF(user.username IS NULL, post.username, user.username) AS username,
                                thread.title AS threadtitle,
                                editlog.dateline AS editdate,
                                editlog.userid AS edituserid
                        FROM post AS
                                post USE INDEX (threadid)
                        LEFT JOIN thread AS
                                thread ON (post.threadid = thread.threadid)
                        LEFT JOIN user AS
                                user ON (user.userid = post.userid)
                        LEFT JOIN editlog AS
                                editlog ON (editlog.postid = post.postid)
                        WHERE post.threadid = ?
                        AND post.dateline > ?
                        ORDER BY post.dateline, post.postid
                        LIMIT ?

I've checked and threadid definitely does exist in both the post and thread tables:

Code:
mysql> describe thread;
+--------------------+----------------------+------+-----+---------+----------------+
| Field              | Type                 | Null | Key | Default | Extra          |
+--------------------+----------------------+------+-----+---------+----------------+
| threadid           | int(10) unsigned     | NO   | PRI | NULL    | auto_increment |
[...]

Code:
mysql> describe post;
+--------------------+----------------------+------+-----+---------+----------------+
| Field              | Type                 | Null | Key | Default | Extra          |
+--------------------+----------------------+------+-----+---------+----------------+
| postid             | int(10) unsigned     | NO   | PRI | NULL    | auto_increment |
| threadid           | int(10) unsigned     | NO   | MUL | 0       |                |
[..]

Currently trying to sort out exactly why this is happening
 
Hm, yeah it does look like that is the case.. I'll check with them to see if the index was removed intentionally for some reason. Good catch, thanks
 
For the avoidance of doubt all versions of VB I've got databases for from 3 up to 5 do have that index so it would seem that it being missing is unexpected.
 
Back
Top Bottom