diff options
author | unknown <monty@mashka.mysql.fi> | 2002-12-11 13:32:31 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-12-11 13:32:31 +0200 |
commit | 3c9b877b19bd4eaa4734ea5d699add9ca70a4e53 (patch) | |
tree | 13f329218555066905528ead26fa433e37531ab1 /innobase/dict | |
parent | 3bbf4e9701699de6b129743321ad9fb3d6a61175 (diff) | |
parent | 49162e0e54c085ecefb6893a5bd662e4f7b2f56a (diff) | |
download | mariadb-git-3c9b877b19bd4eaa4734ea5d699add9ca70a4e53.tar.gz |
Merge with 3.23
innobase/dict/dict0dict.c:
Auto merged
libmysql/libmysql.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
innobase/include/db0err.h:
Skiped merge (Heikki wants to do this)
innobase/row/row0mysql.c:
Skiped merge (Heikki wants to do this)
sql/sql_show.cc:
Use local code
Diffstat (limited to 'innobase/dict')
-rw-r--r-- | innobase/dict/dict0dict.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 18f27602cf0..563ca2521a4 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -1113,6 +1113,7 @@ dict_index_add_to_cache( ulint n_ord; ibool success; ulint i; + ulint j; ut_ad(index); ut_ad(mutex_own(&(dict_sys->mutex))); @@ -1143,6 +1144,26 @@ dict_index_add_to_cache( return(FALSE); } + /* Check that the same column does not appear twice in the index. + InnoDB assumes this in its algorithms, e.g., update of an index + entry */ + + for (i = 0; i < dict_index_get_n_fields(index); i++) { + + for (j = 0; j < i; j++) { + if (dict_index_get_nth_field(index, j)->col + == dict_index_get_nth_field(index, i)->col) { + + fprintf(stderr, +"InnoDB: Error: column %s appears twice in index %s of table %s\n" +"InnoDB: This is not allowed in InnoDB.\n" +"InnoDB: UPDATE can cause such an index to become corrupt in InnoDB.\n", + dict_index_get_nth_field(index, i)->col->name, + index->name, table->name); + } + } + } + /* Build the cache internal representation of the index, containing also the added system fields */ |