diff options
author | unknown <ingo@mysql.com> | 2005-05-18 19:40:39 +0200 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2005-05-18 19:40:39 +0200 |
commit | 6f0ea859b2ef9c545970b732d10205d568609295 (patch) | |
tree | eed6d6e4fb1b732cbfe4e1d82ab99868c7ac0e3e /sql/handler.h | |
parent | d16f9433c1bf5a6c213cc258700e5bda015f1ce3 (diff) | |
download | mariadb-git-6f0ea859b2ef9c545970b732d10205d568609295.tar.gz |
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().
mysql-test/r/merge.result:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
The test result.
mysql-test/t/merge.test:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
The test case does not in all cases show the problem
without the bugfix. The improper memory allocation
might get through undetected in many cases.
sql/ha_myisammrg.h:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
Set a table_flag for the MERGE engine telling that any index
might be unique without being specified as such.
sql/handler.h:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
Added a new table_flag telling that any index
might be unique without being specified as such.
sql/sql_insert.cc:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
Changed the freeing of the memory to be symmetric to its
allocation (my_safe_alloc -> my_safe_afree).
This is not directly related to the bug.
sql/table.cc:
Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
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().
Diffstat (limited to 'sql/handler.h')
-rw-r--r-- | sql/handler.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/handler.h b/sql/handler.h index de932cd51a4..75e83082d10 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -73,6 +73,7 @@ #define HA_HAS_CHECKSUM (1 << 24) /* Table data are stored in separate files (for lower_case_table_names) */ #define HA_FILE_BASED (1 << 26) +#define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30) /* bits in index_flags(index_number) for what you can do with index */ |