mirror of
https://github.com/MariaDB/server.git
synced 2025-07-24 19:42:23 +03:00
added checking for empty index name (fixed bug #1419)
This commit is contained in:
@ -295,4 +295,5 @@
|
||||
#define ER_BAD_SLAVE_UNTIL_COND 1276
|
||||
#define ER_MISSING_SKIP_SLAVE 1277
|
||||
#define ER_UNTIL_COND_IGNORED 1278
|
||||
#define ER_ERROR_MESSAGES 279
|
||||
#define ER_WRONG_INDEX_NAME 1279
|
||||
#define ER_ERROR_MESSAGES 280
|
||||
|
@ -69,6 +69,8 @@ drop table if exists ``;
|
||||
ERROR 42000: Incorrect table name ''
|
||||
create table t1 (`` int);
|
||||
ERROR 42000: Incorrect column name ''
|
||||
create table t1 (i int, index `` (i));
|
||||
ERROR HY000: Incorrect index name ''
|
||||
drop table if exists t1;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't1'
|
||||
|
@ -72,6 +72,8 @@ create table `` (a int);
|
||||
drop table if exists ``;
|
||||
--error 1166
|
||||
create table t1 (`` int);
|
||||
--error 1279
|
||||
create table t1 (i int, index `` (i));
|
||||
drop table if exists t1;
|
||||
|
||||
#
|
||||
|
@ -291,3 +291,4 @@ character-set=latin2
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -285,3 +285,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -293,3 +293,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -282,3 +282,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -287,3 +287,4 @@ character-set=latin7
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -282,3 +282,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -294,3 +294,4 @@ character-set=latin1
|
||||
"Falscher Parameter oder falsche Kombination von Parametern f<>r START SLAVE UNTIL",
|
||||
"Es wird empfohlen, mit --skip-slave-start zu starten, wenn mit START SLAVE UNTIL eine Schritt-f<>r-Schritt-Replikation ausgef<65>hrt wird. Ansonsten gibt es Probleme, wenn der Slave-Server unerwartet neu startet",
|
||||
"SQL-Thread soll nicht gestartet werden. Daher werden UNTIL-Optionen ignoriert"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -282,3 +282,4 @@ character-set=greek
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -284,3 +284,4 @@ character-set=latin2
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -282,3 +282,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -284,3 +284,4 @@ character-set=ujis
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -282,3 +282,4 @@ character-set=euckr
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -284,3 +284,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -284,3 +284,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -286,3 +286,4 @@ character-set=latin2
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -283,3 +283,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -286,3 +286,4 @@ character-set=latin2
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -284,3 +284,4 @@ character-set=koi8r
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -277,3 +277,4 @@ character-set=cp1250
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -290,3 +290,4 @@ character-set=latin2
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -284,3 +284,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -282,3 +282,4 @@ character-set=latin1
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -287,3 +287,4 @@ character-set=koi8u
|
||||
"Wrong parameter or combination of parameters for START SLAVE UNTIL"
|
||||
"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart"
|
||||
"SQL thread is not to be started so UNTIL options are ignored"
|
||||
"Incorrect index name '%-.100s'",
|
||||
|
@ -861,6 +861,11 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
key_info->name=(char*) key_name;
|
||||
}
|
||||
}
|
||||
if (!key_info->name || check_column_name(key_info->name))
|
||||
{
|
||||
my_error(ER_WRONG_INDEX_NAME, MYF(0), key_info->name);
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
if (!(key_info->flags & HA_NULL_PART_KEY))
|
||||
unique_key=1;
|
||||
key_info->key_length=(uint16) key_length;
|
||||
|
Reference in New Issue
Block a user