Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
j4rdin
Worker
Worker



Joined: May 26, 2006
Posts: 153

PostPosted: Sun May 16, 2010 1:15 pm Reply with quote

I have updated my two sites to RN2.4.01 and on one of them have the following table errors reported by the compare_tables.php utility.

Field keys do not match:
nuke_bbsessions session_id : Base MUL Your table
nuke_bbsessions session_ip : Base MUL Your table

and

nuke_counter type : Base PRI Your table
nuke_counter var : Base PRI Your table

As it doesn't tell me what is in my tables its a bit difficult to work out what I need to change if anything.

The other few errors reported had more information and I could fix them in phpMyadmin.
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Sun May 16, 2010 7:03 pm Reply with quote

Obviously replace nuke with your prefix if it is different.

ALTER TABLE `nuke_bbsessions` ADD KEY `session_ip` (`session_ip`);
ALTER TABLE `nuke_bbsessions` ADD KEY `session_id` (`session_id`);
ALTER TABLE `nuke_counter` ADD PRIMARY KEY (`type`(20),`var`(20));

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Mon May 17, 2010 10:03 am Reply with quote

Quote:
it doesn't tell me what is in my tables


That's because nothing was in your tables. The message indicates that the field was missing -- at least until you apply Palbin's fix.
 
View user's profile Send private message Visit poster's website
j4rdin







PostPosted: Tue May 18, 2010 2:58 pm Reply with quote

I have just checked my tables and they have the correct fields, the only thing I can see that might have triped up the compare tables utility is the following:

All the fields that have been picked up as faults have a setting of "latin_swedish_ci" under the Collation heading, should this be empty.

Also nuke_counter table has 'type' and 'var' as varchar(80)
 
Palbin







PostPosted: Wed May 19, 2010 5:32 am Reply with quote

Just enter the three statements into phpmyadmin and your problems will be solved. It is not that the fields are missing is that they are not assinged as keys/indices.
 
j4rdin







PostPosted: Thu May 20, 2010 12:11 am Reply with quote

I have run the SQL up dates suggested above and still have the following errors reported. the nuke_counter update reported that the tables already existed.

You are comparing this data base against the structure of the database represented in fieldlist_240_01.txt
field keys do not match nuke_bbsessions session_id : Base MUL Your table
field keys do not match nuke_counter type : Base PRI Your table
field keys do not match nuke_counter var : Base PRI Your table

This is the actual bbsessions table from phpMyadmin:-

session_id char(32) latin1_swedish_ci No
session_user_id mediumint(Cool No 0
session_start int(11) No 0
session_time int(11) No 0
session_ip char(Cool latin1_swedish_ci No 0
session_page int(11) No 0
session_logged_in tinyint(1) No 0
session_admin tinyint(2) No 0


- Details...
Indexes: Documentation
Action Keyname Type Unique Packed Field Cardinality Collation Null Comment
Edit Drop PRIMARY BTREE Yes No session_id 16 A
Edit Drop session_user_id BTREE No No session_user_id 0 A
Edit Drop session_id_ip_user_id BTREE No No session_id 16 A
session_ip 16 A
session_user_id 16 A
Edit Drop session_ip BTREE No No session_ip 4 A
Edit Drop session_id BTREE No No session_id 16 A
The indexes PRIMARY and session_id seem to be equal and one of them could possibly be removed.

nuke_counter tables look like this in phpMyadmin and report no index defined:-

Field Type Collation Attributes Null Default Extra Action
type varchar(80) latin1_swedish_ci No
var varchar(80) latin1_swedish_ci No
count int(10) UNSIGNED No 0
 
j4rdin







PostPosted: Fri May 21, 2010 3:32 pm Reply with quote

I have run the SQL above and then run the compare_tables.php and still get the following errors:

The database you are using for comparison is: ******_nuke
You are comparing this data base against the structure of the database represented in fieldlist_240_01.txt
field keys do not match nuke_counter type : Base PRI Your table
field keys do not match nuke_counter var : Base PRI Your table

If I check in phpMyadmin I have the following Indexes shown for nuke_counter table:

Indexes: Documentation
Action Keyname Type Unique Packed Field Cardinality Collation Null Comment
Edit Drop type BTREE No No type (20) 3 A
var (20) 21 A
 
Palbin







PostPosted: Fri May 21, 2010 3:57 pm Reply with quote

You could try dropping the key and running the last line of the sql I posted.
 
j4rdin







PostPosted: Sat May 22, 2010 2:31 pm Reply with quote

Palbin wrote:
You could try dropping the key and running the last line of the sql I posted.


Have done that and I just get:

#1062 - Duplicate entry 'total-hits' for key 1

Looks like the exact entry I have on my other site and that doesn't generate the error.

If I look at the Modify Indexs I do have the following:

("PRIMARY" must be the name of and only of a primary key!)

As far as I can tell everything is working ok so unless anyone knows what else I can try, I'll probably leave it.
 
j4rdin







PostPosted: Thu May 27, 2010 3:05 pm Reply with quote

Palbin wrote:
You could try dropping the key and running the last line of the sql I posted.


Have just approached it from another direction. I have exported out the sql table information from the website that is ok and the same for the problem database table.
Then replaced the problem table with the correct table information and imported the sql back into the problem database after backing up the old nuke_counter table by renaming it. I have just run the compare_table.php and it reports no errors now.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©