1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

ha_innodb.cc:

Raise maximum column prefix len to 767 bytes, so that MySQL can create a column prefix index of 255 UTF-8 characters (each takes 3 bytes at the maximum); add comments about why innobase_get_at_most_n_mbchars() works ok
dict0mem.h:
  Raise maximum column prefix len to 767 bytes, so that MySQL can create a column prefix index of 255 UTF-8 characters (each takes 3 bytes at the maximum)
row0mysql.c:
  If MySQL tries to create a column prefix index longer that 255 UTF-8 characters, give an error, and drop the table from the InnoDB internal data dictionary. MySQL did not drop the table there in its own error handling.


innobase/row/row0mysql.c:
  If MySQL tries to create a column prefix index longer that 255 UTF-8 characters, give an error, and drop the table from the InnoDB internal data dictionary. MySQL did not drop the table there in its own error handling.
innobase/include/dict0mem.h:
  Raise maximum column prefix len to 767 bytes, so that MySQL can create a column prefix index of 255 UTF-8 characters (each takes 3 bytes at the maximum)
sql/ha_innodb.cc:
  Raise maximum column prefix len to 767 bytes, so that MySQL can create a column prefix index of 255 UTF-8 characters (each takes 3 bytes at the maximum); add comments about why innobase_get_at_most_n_mbchars() works ok
This commit is contained in:
unknown
2004-10-05 17:08:22 +03:00
parent fdbc804c32
commit 0b8c68ce5c
3 changed files with 41 additions and 34 deletions

View File

@ -1630,6 +1630,8 @@ row_create_index_for_mysql(
trx->op_info = "creating index";
trx_start_if_not_started(trx);
/* Check that the same column does not appear twice in the index.
Starting from 4.0.14, InnoDB should be able to cope with that, but
safer not to allow them. */
@ -1656,9 +1658,16 @@ row_create_index_for_mysql(
goto error_handling;
}
}
}
/* Check also that prefix_len < DICT_MAX_COL_PREFIX_LEN */
trx_start_if_not_started(trx);
if (dict_index_get_nth_field(index, i)->prefix_len
>= DICT_MAX_COL_PREFIX_LEN) {
err = DB_TOO_BIG_RECORD;
goto error_handling;
}
}
if (row_mysql_is_recovered_tmp_table(index->table_name)) {