summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2004-09-10 18:56:47 +0200
committerunknown <ingo@mysql.com>2004-09-10 18:56:47 +0200
commit7c80446c4e0bd6d4572bdbc3a5498c379c49d0a5 (patch)
treea909c5ccb0ef4d5a098f4bc2bde5325839c3482c /include
parente2252a49f7393076107ee5e228be79660e7faecb (diff)
downloadmariadb-git-7c80446c4e0bd6d4572bdbc3a5498c379c49d0a5.tar.gz
BUG#4788 - show create table provides incorrect statement.
Added code to adjust the field_length of user variables in dependence on the field type. Aded new constants for numeric field widths. include/mysql_com.h: BUG#4788 - show create table provides incorrect statement. Introduced definitions for default field width of numeric types. So common values can be used at different places in the code. mysql-test/r/variables.result: BUG#4788 - show create table provides incorrect statement. New test results. mysql-test/t/variables.test: BUG#4788 - show create table provides incorrect statement. Added a test for the bug. sql/item_func.cc: BUG#4788 - show create table provides incorrect statement. Added code to adjust the field_length of user variables in dependence on the field type. sql/sql_parse.cc: BUG#4788 - show create table provides incorrect statement. Changed numeric literals to the new constants.
Diffstat (limited to 'include')
-rw-r--r--include/mysql_com.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 3b65d6f3fbc..449cd0ba396 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -136,6 +136,11 @@ enum enum_server_command
struct st_vio; /* Only C */
typedef struct st_vio Vio;
+#define MAX_TINYINT_WIDTH 3 /* Max width for a TINY w.o. sign */
+#define MAX_SMALLINT_WIDTH 5 /* Max width for a SHORT w.o. sign */
+#define MAX_MEDIUMINT_WIDTH 8 /* Max width for a INT24 w.o. sign */
+#define MAX_INT_WIDTH 10 /* Max width for a LONG w.o. sign */
+#define MAX_BIGINT_WIDTH 20 /* Max width for a LONGLONG */
#define MAX_CHAR_WIDTH 255 /* Max length for a CHAR colum */
#define MAX_BLOB_WIDTH 8192 /* Default width for blob */