Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
block.module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2010 at 10:40 UTC
Updated:
24 Apr 2011 at 22:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
peterx commentedI changed 7003 to start with:
It passed the first error then hit the following message because, with unicode support, all those fields are over 1150 bytes total.
Failed: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
Comment #2
peterx commentedMySQL can combine multiple indexes to find data so I tried again with the following test split of the index. The block updates worked.
Comment #3
andypostIt seems very strange because system_update_6043()
So index should be here!
Comment #4
peterx commentedI checked a few sites and the D6 sites have the new format but the D5->D6 converted sites have the old format. I checked schema_version for block and they all show zero. Ah, the update is under system, not block. Ok, system is up to 6053. 6043 ran because other tables changed. I suspect having the field change and index add in the same step resulted in the index add occurring before the field changed and the update failed because of the 1000 byte limit. If the block change had been made into two steps, it would have worked.
Comment #5
peterx commentedI made an ugly change to get around the problem:
Now I get:
Update #7003 * Failed: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'bluemarine-block-1' for key 'tmd'
There are 133 duplicate rows. The only thing I can think of at this stage is to manually clean up my D5->D6 site and go back to testing the D7 conversion with the clean database.
Comment #6
andypostIt seems that we stopped until #722912: db_index_exists() must conform schemaAPI indexExists() fixed
Also I have random fail with block_cache table #603498: Book {blocks.cache} upgrade path
Comment #7
ctmattice1 commented@peterx "The only thing I can think of at this stage is to manually clean up my D5->D6 site and go back to testing the
D7 conversion with the clean database. "
If it helps the easiest way I've found to do this is with phpmyadmin. I create a copy of my D5->D6 database I use and create a testing database (copy) from it. When I blow the testing database, I delete it and use phpmyadmin's operations copy function to copy it over to create a new testing database. Saved me a bunch of time. I also just use a D7 tarball and patches on a dev platform so I don't have other issues from contrib modules.
Frustrating at times, other times it's nice to hit the delete key and blow away something you don't have to worry about and start over fresh
my2cents
Comment #8
peterx commented@ctmattice1 I do use a test site. I run the backup module to produce a daily SQL file and back the SQL file up to other computers including my desktop. I then import the SQL into a test site along side tux paint and pictures of insects. Quicker than waiting for an upload to a server plus my neighbour's 4 year old helps me edit the code. When you have to indent with spaces instead of tabs, it is useful to have an assistant who is happy to bash on the spacebar with a lego brick.
My source site is now changed the way 6043 was supposed to change it. My SQL backups no longer create this issue. There is one filter problem to fix then the site should convert.
Comment #9
andypostSeems more reasonable to drop this index before renaming table after mostly for pgsql/sqlite databases (no need to rename index)
Comment #10
andypostTable should be {blocks} no {block}
Also I think this is not issue anymore but this optimization could go in if anyone review it
EDIT: there's a more useful issue #735900: Deleting module's blocks when module is uninstalled
Comment #11
catchLooks fine.
Comment #12
catch#10: 722920_block-index_d7.patch queued for re-testing.
Comment #13
dawehnerComment #14
dries commentedThis patch does not to go in 8.x. It should in 7.x instead because we removed these update functions from 8.x. I've committed it to the 7.x branch so marking this 'fixed'. Also correcting the version field for future reference.
Comment #15
bfroehle commentedUntagging since it's been committed to 7.x