I checked my database and found some problems. Can someone please tell me what are "indexes PRIMARY" and where to find limit_id, sessions_sid_idx and uid_2? I am trying to figure out where to find them before I can even try to fix the problems...

Problems with indexes of table `node_limitnumber_rules`
The indexes PRIMARY and limit_id seem to be equal and one of them could possibly be removed.
Problems with indexes of table `sessions`
The indexes PRIMARY and sessions_sid_idx seem to be equal and one of them could possibly be removed.
Problems with indexes of table `users`
The indexes PRIMARY and uid_2 seem to be equal and one of them could possibly be removed.
The indexes PRIMARY and uid seem to be equal and one of them could possibly be removed.

Many thanks!!

BB

Comments

matt_harrold’s picture

node_limitnumber_rules is (presumably) a table used by one of your modules. You shouldn't mess with it. Leave it alone.

What modules are you using?

One of them has a poorly designed table and you should probably raise a bug report with the module developer on the module project page.

They will be able to fix it, and you'll be able to download the updated module minus the bug.

Unless of course, you are a competent PHP programmer with no fear and the skills to repair the module yourself.

Indexes are used to speed up frequently used fields in a database, a Primary index is a unique identifier for a particular row in table. Google "SQL tutorials" for more information about databases.

blueblade’s picture

I spent about 6 hours last night disabling and enabling modules last night but had no luck finding that one module that is causing problem. Which those information, is it possible to do a search in phpmyadmin which exact module is causing that problem? Thanks for your help.

BB

jaypan’s picture

Disabling modules doesn't remove the tables from the database. You have to disable it then uninstall it.

As an educated guess, I'd say it's probably a module called Node Limit or something like that. But if you don't have a module with that name, go through your modules directory, and open the .install file in each module that has one. Do a search (ctrl + F for most programs. cmd + F if you are on a Mac) for 'node_limitnumber_rules'. When you find it, that will be the module that is creating that table.

Contact me to contract me for D7 -> D10/11 migrations.

blueblade’s picture

What about the other two tho, can you tell what are the related modules?

he indexes PRIMARY and sessions_sid_idx seem to be equal and one of them could possibly be removed.
Problems with indexes of table `users`
The indexes PRIMARY and uid_2 seem to be equal and one of them could possibly be removed.
The indexes PRIMARY and uid seem to be equal and one of them could possibly be removed.
jaypan’s picture

'Sessions' and 'users' are drupal core tables. Either someone implemented an unecessary index on those tables in a module, or they did it manually probably through phpmyadmin or something like that.

You can search for db_create_index in the install files and see if you can find references to 'users' and 'sessions' in an index creation.

Really, you can just go and manually remove the redundant indexes (leave the primary keys). If you want to find out where they came from and then be a nice guy and tell the module developer, nothing wrong with that. But if you are just trying to fix your site, go in and manually remove the indexes.

Contact me to contract me for D7 -> D10/11 migrations.

blueblade’s picture

I have just removed "node_limitnumber_rules" table and did another "check table" but the problem did not go away entirely. Here's what I see this time:

Problems with indexes of table `sessions`
The indexes PRIMARY and sessions_sid_idx seem to be equal and one of them could possibly be removed.
Problems with indexes of table `users`
The indexes PRIMARY and uid_2 seem to be equal and one of them could possibly be removed.
The indexes PRIMARY and uid seem to be equal and one of them could possibly be removed.

Both "sessions" and "users" are from Drupal core. Does this tell that node_limitnumber_rules was not the original or the only problem? Thanks.

BB

matt_harrold’s picture

I hope you realize (by now) that digging into the database is not only uneccesary ... unless you know what you're doing ... you'll likely stuff up your site even more than it already is.

Why are you concerned with the results of "check table"? Unless you're actively developing your own module or something .... this just isn't a problem.

It seems you've shifted from worrying about your site functionality to eliminating irrelevant warnings in PHPMyAdmin .. why?

Does your site work yet?

blueblade’s picture

Thanks for your advice. I had restored the database with a backup and everything is working as they were.

I have not been able to move the blocks on my site for a few weeks now and was looking for the reason, and found this problem while I was doing that. I still do not know what is preventing me from moving the blocks around and am not sure if those tables actually have anything to do with my original problem at all.

I have tried disabling many modules and at some points I found that I was able to move the blocks again but I am not sure which exact one or multiple modules is causing the problem, because when I disable the same modules after disabling them, I found myself won't be able to move the blocks again - the problem is back...It looks like the block weight is remembered somewhere and when the module(s) that own the table that carries those weight information, all the changes will be gone and every block goes back to their old location.

If you read this thread you will know what had happened and how I ended up here: http://drupal.org/node/678690

Thanks for your help and I will appreciate very much if you can suggest a way to find out how I can move the blocks again.

Have a good weekend.

jaypan’s picture

node_limitnumber_rules wasn't the only problem - as I mentioned in my other post, there are two other tables - sessions and users.

You can manually remove the indexed named 'sessions_sid_idx' from the table 'sessions', and the indexes 'uid_2' and 'uid' from 'users'.

Contact me to contract me for D7 -> D10/11 migrations.

blueblade’s picture

i will take a try that soon...right now I really need the blocks to move again