Topic on Project:Support desk

85.104.149.41 (talkcontribs)

Hi,

I am deleted objectcache table by mistake. How i create it on the mysql terminal?

CREATE TABLE objectcache;

is it enough?

2003:72:6D1C:7500:CD92:7D96:FEB1:DD20 (talkcontribs)

No, that is not enough.

Basically, the file maintenance/tables.sql contains the CREATE statement, which you have to run.

How exactly the table has to look may be different in other versions of MediaWiki and in other database management systems (e.g. in MSSQL or PostGres).

2003:72:6D1C:7500:CD92:7D96:FEB1:DD20 (talkcontribs)

And note that /*_*/ has to be replaced by the table prefix, if set. And /*i*/ is what indeces are prepended with.

85.104.149.41 (talkcontribs)

If i run maintenance script problem is solve?

I am created table on the terminal like that, it works but i don't know, maybe in the background there may be a problem.

"CREATE TABLE objectcache (keyname char(255) binary, value mediumblob, exptime datetime);"

79.228.222.125 (talkcontribs)

No, running update.php will not help.

The query, which you have run, misses the PRIMARY KEY on the keyname column.

Also, you should still add an index:

 CREATE INDEX exptime ON objectcache (exptime);
Bekircem (talkcontribs)

CREATE INDEX exptime ON objectcache (exptime);

I I applied that command. Is that all? Do I need to do something else?

Thank you for your help. 

Ciencia Al Poder (talkcontribs)

That's all you need