Bugs item #2823599, was opened at 2009-07-18 16:59
Message generated for change (Comment added) made by upsilon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377408&aid=2823599&group_id=23067
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Data insertion/extraction/manipulation
Group: Latest subversion
Status: Open
Resolution: Fixed
Priority: 1
Private: No
Submitted By: Greg Roach (fisharebest)
Assigned to: Nobody/Anonymous (nobody)
Summary: (ok 3.3) UUID Primary Key wrongly updated
Initial Comment:
PMA version 3.2.0.1, MySQL server version: 5.0.51b-community-nt-log
CREATE TABLE foo (foo_uuid CHAR(36) PRIMARY KEY, foo_data INT);
Insert a row. Leave the foo_uuid column empty, but enter 123 in the foo_data column. PMA executes the following command:
INSERT INTO `test`.`foo` ( `foo_uuid` , `foo_data` ) VALUES ( UUID( ) , '123' );
Note that it has automatically assigned the foo_uuid column. Now, edit the row, changing 123 to 456. PMA executes the following SQL:
UPDATE `test`.`foo` SET `foo_uuid` = UUID( ) , `foo_data` = '456' WHERE `foo`.`foo_uuid` = '87a46e15-c545-102c-bd9f-d5b50e269472' LIMIT 1 ;
Note that it is *changing* the existing value of foo_uuid.
This is wrong. UUID values should be fixed, once they are created. Changing them breaks foreign-key relationships, etc.
----------------------------------------------------------------------
Comment By: MagicalTux (upsilon)
Date: 2009-11-10 02:03
Message:
While this bug has been fixed on July 2009, it's not fixed in PMA 3.2.3
released end of october. Would be great if the fix could be ported (and
also if it was possible to know which svn revision is the fix, so I can
apply it too).
----------------------------------------------------------------------
Comment By: Greg Roach (fisharebest)
Date: 2009-07-18 23:12
Message:
Tested and works OK. Thanks for the quick fix.
----------------------------------------------------------------------
Comment By: Herman van Rink (helmo)
Date: 2009-07-18 21:42
Message:
Fixed in subversion, thanks for reporting.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377408&aid=2823599&group_id=23067
|