Bug #33766 | Updating the "PARTITION BY" field don't work from first time | ||
---|---|---|---|
Submitted: | 9 Jan 2008 13:23 | Modified: | 14 Mar 2008 5:45 |
Reporter: | Nicolae Namolovan | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Partitions | Severity: | S2 (Serious) |
Version: | 5.1.22 | OS: | FreeBSD (6.1) |
Assigned to: | CPU Architecture: | Any |
[9 Jan 2008 13:23]
Nicolae Namolovan
[9 Jan 2008 13:30]
Nicolae Namolovan
Mm.. Not everytime from second time.. mysql> update posts set forumid=25 where topicid=63444; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=63444; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=63444; Query OK, 4 rows affected (0.02 sec) Rows matched: 4 Changed: 4 Warnings: 0
[9 Jan 2008 13:34]
MySQL Verification Team
Thank you for the bug report. The create table statement you've provided has the below issue: ERROR 1072 (42000): Key column 'userid' doesn't exist in table could you please provide a complete test case, create table statement, insert data enough to test the reported behavior?. Thanks in advance.
[9 Jan 2008 13:40]
Nicolae Namolovan
^
[9 Jan 2008 13:47]
Nicolae Namolovan
Miguel, Unfortunately I can't.. It's on production. Remove userid key from create.. Just INSERT data to every partition, and then try to update "PARTITION BY" column..
[9 Jan 2008 13:51]
Nicolae Namolovan
Hah, see that.. mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.01 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.02 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.01 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 0 rows affected (0.00 sec) Rows matched: 0 Changed: 0 Warnings: 0 mysql> update posts set forumid=25 where topicid=59903; Query OK, 69 rows affected (0.16 sec) Rows matched: 69 Changed: 69 Warnings: 0 Maybe for reproduction you need some load to the database.. As I said, this is on protion.
[11 Jan 2008 0:45]
Nicolae Namolovan
I found a workaround. If you specify in the WHERE current partition location (like for pruning), everything works like normal. Example a post forumid is 20 I want to update it to 25 update posts set forumid=25 where topicid=59903 AND forumid=20; And it works fine..
[7 Feb 2008 10:26]
Mattias Jonsson
I might be that it just reports 0 updates, if possible could you please check if the query did the update or not when it reports 0 updates?
[7 Feb 2008 11:35]
Nicolae Namolovan
Nope, when it writes 0 updates, nothing is updated.. I found this bug when one a forum feature stops to working. If I write partition location(in where), it works every time fine..
[14 Feb 2008 5:45]
Valeriy Kravchuk
Please, try to repeat with a newer version, 5.1.23-rc, and inform about the results.
[15 Mar 2008 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[19 Mar 2008 17:09]
Susanne Ebrecht
Nicolae, we still need to know if you have this issue by using newest MySQL version (5.1.23).