mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
dict0dict.h, dict0dict.c, row0row.c, pars0opt.c:
Fix bug #5180: having a column prefix index in the primary key, and the same column fully in a secondary key could cause an assertion failure in row_build_row_ref() innobase/pars/pars0opt.c: Fix bug #5180: having a column prefix index in the primary key, and the same column fully in a secondary key could cause an assertion failure in row_build_row_ref() innobase/row/row0row.c: Fix bug #5180: having a column prefix index in the primary key, and the same column fully in a secondary key could cause an assertion failure in row_build_row_ref() innobase/dict/dict0dict.c: Fix bug #5180: having a column prefix index in the primary key, and the same column fully in a secondary key could cause an assertion failure in row_build_row_ref() innobase/include/dict0dict.h: Fix bug #5180: having a column prefix index in the primary key, and the same column fully in a secondary key could cause an assertion failure in row_build_row_ref()
This commit is contained in:
parent
8bf8c85968
commit
a2d94d92f5
4 changed files with 58 additions and 5 deletions
|
|
@ -1094,6 +1094,19 @@ opt_clust_access(
|
|||
for (i = 0; i < n_fields; i++) {
|
||||
pos = dict_index_get_nth_field_pos(index, clust_index, i);
|
||||
|
||||
ut_a(pos != ULINT_UNDEFINED);
|
||||
|
||||
/* We optimize here only queries to InnoDB's internal system
|
||||
tables, and they should not contain column prefix indexes. */
|
||||
|
||||
if (dict_index_get_nth_field(index, pos)->prefix_len != 0
|
||||
|| dict_index_get_nth_field(clust_index, i)
|
||||
->prefix_len != 0) {
|
||||
fprintf(stderr,
|
||||
"InnoDB: Error in pars0opt.c: table %s has prefix_len != 0\n",
|
||||
index->table_name);
|
||||
}
|
||||
|
||||
*(plan->clust_map + i) = pos;
|
||||
|
||||
ut_ad((pos != ULINT_UNDEFINED)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue