1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug #28842 Different 'duplicate key' error code between 5.0 and 5.1

The patch for WL 1563 added a new duplicate key error message so that the
  key name could be provided instead of the key number. But the error code
  for the new message was used even though that did not need to change.

  This could cause unnecessary problems for applications that used the old
  ER_DUP_ENTRY error code to detect duplicate key errors.
This commit is contained in:
jimw@rama.(none)
2007-06-06 10:57:07 -07:00
parent 13adcedc90
commit 3c93323d28
58 changed files with 237 additions and 238 deletions

View File

@@ -2053,8 +2053,7 @@ void handler::print_keydup_error(uint key_nr, const char *msg)
{
/* Key is unknown */
str.copy("", 0, system_charset_info);
my_printf_error(ER_DUP_ENTRY_WITH_KEY_NAME, msg,
MYF(0), str.c_ptr(), "*UNKNOWN*");
my_printf_error(ER_DUP_ENTRY, msg, MYF(0), str.c_ptr(), "*UNKNOWN*");
}
else
{
@@ -2066,7 +2065,7 @@ void handler::print_keydup_error(uint key_nr, const char *msg)
str.length(max_length-4);
str.append(STRING_WITH_LEN("..."));
}
my_printf_error(ER_DUP_ENTRY_WITH_KEY_NAME, msg,
my_printf_error(ER_DUP_ENTRY, msg,
MYF(0), str.c_ptr(), table->key_info[key_nr].name);
}
}