MYSQL UPGRADE produces error: jtablesession::store failed DB function failed with error number 1146

Joomla 1.5
MSQL Upgrade from ~ 4 to 5
error:

jtablesession::store failed
DB function failed with error number 1146

Site down with the above error indicating I should use the INSERT Function in MySQL or PHPMyADMIN.

no go… next step use the REPAIR function in any place you can type a sql statement. This could be phpmyadmin or mysql in terminal or MySQL Administrator (awesome app).

So

REPAIR TABLE `jos_session`;

produces this:

Table Op Msg_type Msg_text
pplcomca_home.jos_session repair Error Table ‘pplcomca_home.jos_session’ doesn’t exist
pplcomca_home.jos_session repair status Operation failed

This is because the index file is missing or has a corrupted header.

NEXT.. use the definition file to repair using the USE_FRM option;

 REPAIR TABLE jos_session USE_FRM;

OK … so this produced results much like above … in this case we can just DROP the table, as jos_session only stores temp data anyway, and replace with new table structure. You can do this by pasting this into the SQL tab of phpMyadmin:

DROP TABLE IF EXISTS `jos_session`;
CREATE TABLE IF NOT EXISTS `jos_session` (
`username` varchar(150) default '',
`time` varchar(14) default '',
`session_id` varchar(200) NOT NULL default '0',
`guest` tinyint(4) default '1',
`userid` int(11) default '0',
`usertype` varchar(50) default '',
`gid` tinyint(3) unsigned NOT NULL default '0',
`client_id` tinyint(3) unsigned NOT NULL default '0',
`data` longtext,
PRIMARY KEY (`session_id`(64)),
KEY `whosonline` (`guest`,`usertype`),
KEY `userid` (`userid`),
KEY `time` (`time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

jos_sesion issue resolved! However, when I go to log into my site I get:

Error loading Components: Incorrect key file for table 'jos_components'; try to repair it SQL=SELECT * FROM jos_components WHERE parent = 0
Error loading Components: Incorrect key file for table 'jos_components'; try to repair it SQL=SELECT * FROM jos_components WHERE parent = 0

Time to try and repair those, following the steps I used above (hopefully they work).

USE_FRM produces:

Table Op Msg_type Msg_text
jos_components repair error Failed repairing incompatible .frm file

Use mysqlcheck to see state of whole db…

Note: where I have hostuser – this is your account name for a shared host scenario and db is the database name.

-f is force and -p asks you for your mysql/db password.

$ mysqlcheck -f hostuser_db -p
Enter password:
hostuser_db.jos_banner                           OK
hostuser_db.jos_bannerclient                     OK
hostuser_db.jos_bannertrack                      OK
hostuser_db.jos_categories                       OK
hostuser_db.jos_components
Error    : Incorrect key file for table 'jos_components'; try to repair it
error    : Corrupt
hostuser_db.jos_contact_details                  OK
hostuser_db.jos_content                          OK
hostuser_db.jos_content_frontpage                OK
hostuser_db.jos_content_rating                   OK
hostuser_db.jos_core_acl_aro
Error    : Incorrect key file for table 'jos_core_acl_aro'; try to repair it
error    : Corrupt
hostuser_db.jos_core_acl_aro_groups              OK
hostuser_db.jos_core_acl_aro_map                 OK
hostuser_db.jos_core_acl_aro_sections            OK
hostuser_db.jos_core_acl_groups_aro_map          OK
hostuser_db.jos_core_log_items                   OK
hostuser_db.jos_core_log_searches                OK
hostuser_db.jos_groups                           OK
hostuser_db.jos_jforms_40d8b                     OK
hostuser_db.jos_jforms_5153f                     OK
hostuser_db.jos_jforms_a9b9f                     OK
hostuser_db.jos_jforms_acb68                     OK
hostuser_db.jos_jforms_cbab1                     OK
hostuser_db.jos_jforms_e146a                     OK
hostuser_db.jos_jforms_f798d                     OK
hostuser_db.jos_jforms_fields                    OK
hostuser_db.jos_jforms_forms                     OK
hostuser_db.jos_jforms_parameters                OK
hostuser_db.jos_jforms_tparameters               OK
hostuser_db.jos_jumi                             OK
hostuser_db.jos_menu                             OK
hostuser_db.jos_menu_types                       OK
hostuser_db.jos_messages                         OK
hostuser_db.jos_messages_cfg                     OK
hostuser_db.jos_migration_backlinks              OK
hostuser_db.jos_modules                          OK
hostuser_db.jos_modules_menu                     OK
hostuser_db.jos_newsfeeds                        OK
hostuser_db.jos_plugins                          OK
hostuser_db.jos_poll_data                        OK
hostuser_db.jos_poll_date                        OK
hostuser_db.jos_poll_menu                        OK
hostuser_db.jos_polls                            OK
hostuser_db.jos_sections                         OK
hostuser_db.jos_session                          OK
hostuser_db.jos_stats_agents                     OK
hostuser_db.jos_templates_menu                   OK
hostuser_db.jos_users                            OK
hostuser_db.jos_weblinks                         OK

Oh dears… Not sure what to do now, but will keep on tinkering… This is the only site I have no backup of.. o.O

Found an ANCIENT BACKUP, but there had been no component changes or User changes so I replaced the offending tables with those… [kind of solved?]


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *