Backported #2823599 UUID Primary Key wrongly updated

This commit is contained in:
Herman van Rink
2009-11-10 16:17:09 +00:00
parent ffa7b18158
commit 6ada09dc2a
2 changed files with 7 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
- bug #2887357 [core] Slow loading times with large databases (partial fix) - bug #2887357 [core] Slow loading times with large databases (partial fix)
- bug #2893931 [lang] Typo and empty message - bug #2893931 [lang] Typo and empty message
+ [lang] Russian update, thanks to Victor Volkov + [lang] Russian update, thanks to Victor Volkov
- bug #2823599 [edit] UUID Primary Key wrongly updated
3.2.3.0 (2009-10-30) 3.2.3.0 (2009-10-30)
- patch #2856664 [export] Date, time, and datetime column types now export correctly to - patch #2856664 [export] Date, time, and datetime column types now export correctly to

View File

@@ -525,8 +525,12 @@ foreach ($rows as $row_id => $vrow) {
$default_function = $cfg['DefaultFunctions']['first_timestamp']; $default_function = $cfg['DefaultFunctions']['first_timestamp'];
} }
if ($field['Key'] == 'PRI' // For primary keys of type char(36) or varchar(36) UUID if the default function
&& ($field['Type'] == 'char(36)' || $field['Type'] == 'varchar(36)')) { // Only applies to insert mode, as it would silently trash data on updates.
if ($insert_mode
&& $field['Key'] == 'PRI'
&& ($field['Type'] == 'char(36)' || $field['Type'] == 'varchar(36)')
) {
$default_function = $cfg['DefaultFunctions']['pk_char36']; $default_function = $cfg['DefaultFunctions']['pk_char36'];
} }