1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Simplified 'wrong xxx name' error messages by introducing 'general' ER_WRONG_NAME error

Cleaned up (and disabled part of) date/time/datetime format patch. One can't anymore change default read/write date/time/formats.
This is becasue the non standard datetime formats can't be compared as strings and MySQL does still a lot of datetime comparisons as strings
Changed flag argument to str_to_TIME() and get_date() from bool to uint
Removed THD from str_to_xxxx functions and Item class.
Fixed core dump when doing --print-defaults
Move some common string functions to strfunc.cc
Dates as strings are now of type my_charset_bin instead of default_charset()
Introduce IDENT_QUOTED to not have to create an extra copy of simple identifiers (all chars < 128)
Removed xxx_FORMAT_TYPE enums and replaced them with the old TIMESTAMP_xxx enums
Renamed some TIMESTAMP_xxx enums to more appropriate names
Use defines instead of integers for date/time/datetime string lengths
Added to build system and use the new my_strtoll10() function.
This commit is contained in:
monty@narttu.mysql.fi
2003-11-03 14:01:59 +02:00
parent d9eca0e127
commit a444a3449f
81 changed files with 2644 additions and 1643 deletions

View File

@ -437,7 +437,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
if (check_column_name(sql_field->field_name))
{
my_error(ER_WRONG_COLUMN_NAME, MYF(0), sql_field->field_name);
my_error(ER_WRONG_NAME, MYF(0), ER(ER_COLUMN), sql_field->field_name);
DBUG_RETURN(-1);
}
@ -863,7 +863,7 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
}
if (!key_info->name || check_column_name(key_info->name))
{
my_error(ER_WRONG_INDEX_NAME, MYF(0), key_info->name);
my_error(ER_WRONG_NAME, MYF(0), ER(ER_INDEX), key_info->name);
DBUG_RETURN(-1);
}
if (!(key_info->flags & HA_NULL_PART_KEY))
@ -1646,7 +1646,7 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table,
check_table_name(src_table,table_ident->table.length)) ||
table_ident->db.str && check_db_name((src_db= table_ident->db.str)))
{
my_error(ER_WRONG_TABLE_NAME, MYF(0), src_table);
my_error(ER_WRONG_NAME, MYF(0), ER(ER_TABLE), src_table);
DBUG_RETURN(-1);
}