1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE

After review version.
Added a condition for MERGE tables. These do not have unique
indexes. But every key could be a unique key on the underlying
MyISAM table. So get the maximum key length for MERGE tables
instead of the maximum unique key length. This is used for
buffer allocation in write_record().
This commit is contained in:
ingo@mysql.com
2005-05-18 19:40:39 +02:00
parent cc13545413
commit 26f2e57ecb
6 changed files with 31 additions and 3 deletions

View File

@@ -682,7 +682,7 @@ int write_record(TABLE *table,COPY_INFO *info)
err:
if (key)
my_afree(key);
my_safe_afree(key,table->max_unique_length,MAX_KEY_LENGTH);
info->last_errno= error;
table->file->print_error(error,MYF(0));
DBUG_RETURN(1);