See Thread at: http://www.techienuggets.com/Detail?tx=78262 Posted on behalf of a User
I have no problems in copying MEDIUMBLOB type data from one table to another. Under either
5.0 or 5.1 community editions.
In Response To:
hi,
I found this: http://bugs.mysql.com/bug.php?id=34300 in the bug system.
As it descibed, there is chance which I get corrupted data when read BLOB.
Now I wonder why I also get corrupted data when write BLOB into table...
I tried this:
step 1: read BLOB data from TABLE1
step 2: log the BLOB data
step 3: write the data into TABLE2
result:
select hex(data) from TABLE1 is the same as what I've logged in step2
select hex(data) from TABLE2 is different with select
hex(data) from TABLE2
Any suggestions?
2009/3/19 Cui Shijun <noway@stripped>:
> hi,
> Â I'm using mysql-5.1.22, innodb. For some reason, I need to add some
> columns to a table without locking it, so I do this:
>
> Â Â insert into TABLE2(col1, col2, ... ,colN) select col1,
> col2, ...
> colN from TABLE1 where ...(primary key traversal condition).
>
> Â which TABLE1 is under use, and TABLE2 has new structure.
> Â Before I really do the copy task, I created some triggers to
> synchronize the insert & update.
>
> Â When I finally complete the task, I find ALL blob column appear to
> result in inconsistent status with the orignal table.
> Â There are users which do query and update on TABLE1.
> Â So what's going wrong?
>
> Â Thank you
> Â Â Â Cui Shijun
>
--