Skip to content

Commit a444a34

Browse files
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.
1 parent d9eca0e commit a444a34

81 files changed

Lines changed: 2628 additions & 1627 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILD/compile-pentium-valgrind-max

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --
1414

1515
if test -z "$just_print"
1616
then
17+
set +v
1718
echo "\
1819
******************************************************************************
1920
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with

VC++Files/libmysqld/libmysqld.dsp

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VC++Files/sql/mysqld.dsp

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VC++Files/sql/mysqldmax.dsp

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VC++Files/strings/strings.dsp

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

include/m_ctype.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ enum my_lex_states
8686
{
8787
MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
8888
MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
89-
MY_LEX_FOUND_IDENT, MY_LEX_REAL, MY_LEX_HEX_NUMBER,
89+
MY_LEX_REAL, MY_LEX_HEX_NUMBER,
9090
MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
9191
MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
9292
MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,

include/m_string.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ extern char *int2str(long val,char *dst,int radix);
232232
extern char *int10_to_str(long val,char *dst,int radix);
233233
extern char *str2int(const char *src,int radix,long lower,long upper,
234234
long *val);
235+
longlong my_strtoll10(const char *nptr, char **endptr, int *error);
235236
#if SIZEOF_LONG == SIZEOF_LONG_LONG
236237
#define longlong2str(A,B,C) int2str((A),(B),(C))
237238
#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))

include/mysqld_error.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,5 +295,10 @@
295295
#define ER_BAD_SLAVE_UNTIL_COND 1276
296296
#define ER_MISSING_SKIP_SLAVE 1277
297297
#define ER_UNTIL_COND_IGNORED 1278
298-
#define ER_WRONG_INDEX_NAME 1279
299-
#define ER_ERROR_MESSAGES 280
298+
#define ER_WRONG_NAME 1279
299+
#define ER_TABLE 1280
300+
#define ER_DATABASE 1281
301+
#define ER_COLUMN 1282
302+
#define ER_INDEX 1283
303+
#define ER_CATALOG 1284
304+
#define ER_ERROR_MESSAGES 285

include/sql_state.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ ER_WARN_TOO_MANY_RECORDS, "01000", "",
159159
ER_WARN_NULL_TO_NOTNULL, "01000", "",
160160
ER_WARN_DATA_OUT_OF_RANGE, "01000", "",
161161
ER_WARN_DATA_TRUNCATED, "01000", "",
162-
ER_WRONG_INDEX_NAME, "42000", "",
162+
ER_WRONG_NAME, "42000", "",

libmysqld/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c
3838

3939
noinst_HEADERS = embedded_priv.h
4040

41-
sqlsources = derror.cc field.cc field_conv.cc filesort.cc \
41+
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
4242
ha_innodb.cc ha_berkeley.cc ha_heap.cc ha_isam.cc ha_isammrg.cc \
4343
ha_myisam.cc ha_myisammrg.cc handler.cc sql_handler.cc \
4444
hostname.cc init.cc password.c \

0 commit comments

Comments
 (0)