diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-02-13 18:28:36 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-02-13 18:28:36 -0500 |
commit | d23bd26bec787ebbdbd41be0204e9cb83baf4dbd (patch) | |
tree | dda05b0ebb3858e913b0ca3b864705e989bb7661 /storage/xtradb/handler | |
parent | b83de1151aab6dcc9f300159e31198364000de70 (diff) | |
parent | a9a08b1e2f5b7a9e3ab7c7f75c768389b1d8238f (diff) | |
download | mariadb-git-d23bd26bec787ebbdbd41be0204e9cb83baf4dbd.tar.gz |
Merge tag 'mariadb-5.5.48' into 5.5-galera
Diffstat (limited to 'storage/xtradb/handler')
-rw-r--r-- | storage/xtradb/handler/ha_innodb.cc | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/storage/xtradb/handler/ha_innodb.cc b/storage/xtradb/handler/ha_innodb.cc index 0834f4d08b1..0f5952ce5f2 100644 --- a/storage/xtradb/handler/ha_innodb.cc +++ b/storage/xtradb/handler/ha_innodb.cc @@ -4271,7 +4271,7 @@ Normalizes a table name string. A normalized name consists of the database name catenated to '/' and table name. An example: test/mytable. On Windows normalization puts both the database name and the table name always to lower case if "set_lower_case" is set to TRUE. */ -static +extern "C" UNIV_INTERN void normalize_table_name_low( /*=====================*/ @@ -8805,7 +8805,8 @@ create_table_def( /* MySQL does the name length check. But we do additional check on the name length here */ - if (strlen(table_name) > MAX_FULL_NAME_LEN) { + const size_t table_name_len = strlen(table_name); + if (table_name_len > MAX_FULL_NAME_LEN) { push_warning_printf( (THD*) trx->mysql_thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_TABLE_NAME, @@ -8814,6 +8815,15 @@ create_table_def( DBUG_RETURN(ER_TABLE_NAME); } + if (table_name[table_name_len - 1] == '/') { + push_warning_printf( + (THD*) trx->mysql_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_TABLE_NAME, + "InnoDB: Table name is empty"); + + DBUG_RETURN(ER_WRONG_TABLE_NAME); + } + n_cols = form->s->fields; /* We pass 0 as the space id, and determine at a lower level the space |