summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2016-06-18 14:28:34 +0300
committerMonty <monty@mariadb.org>2016-06-22 22:04:55 +0300
commit34eb10e4064a7f38fc7d41016a6bcc5443ebe0c3 (patch)
tree45f76f02034419697e5bff5f539b20eaac8f8c8d
parente4062d4d203a6be596d3f61dfe4db1b4f91e24aa (diff)
downloadmariadb-git-34eb10e4064a7f38fc7d41016a6bcc5443ebe0c3.tar.gz
MDEV-10138 Support for decimals up to 38 digits
Decimals with float, double and decimal now works the following way: - DECIMAL_NOT_SPECIFIED is used when declaring DECIMALS without a firm number of decimals. It's only used in asserts and my_decimal_int_part. - FLOATING_POINT_DECIMALS (31) is used to mark that a FLOAT or DOUBLE was defined without decimals. This is regarded as a floating point value. - Max decimals allowed for FLOAT and DOUBLE is FLOATING_POINT_DECIMALS-1 - Clients assumes that float and double with decimals >= NOT_FIXED_DEC are floating point values (no decimals) - In the .frm decimals=FLOATING_POINT_DECIMALS are used to define floating point for float and double (31, like before) To ensure compatibility with old clients we do: - When storing float and double, we change NOT_FIXED_DEC to FLOATING_POINT_DECIMALS. - When creating fields from .frm we change for float and double FLOATING_POINT_DEC to NOT_FIXED_DEC - When sending definition for a float/decimal field without decimals to the client as part of a result set we convert NOT_FIXED_DEC to FLOATING_POINT_DECIMALS. - variance() and std() has changed to limit the decimals to FLOATING_POINT_DECIMALS -1 to not get the double converted floating point. (This was to preserve compatiblity) - FLOAT and DOUBLE still have 30 as max number of decimals. Bugs fixed: variance() printed more decimals than we support for double values. New behaviour: - Strings now have 38 decimals instead of 30 when converted to decimal - CREATE ... SELECT with a decimal with > 30 decimals will create a column with a smaller range than before as we are trying to preserve the number of decimals. Other changes - We are now using the obsolete bit FIELDFLAG_LEFT_FULLSCREEN to specify decimals > 31 - NOT_FIXED_DEC is now declared in one place - For clients, NOT_FIXED_DEC is always 31 (to ensure compatibility). On the server NOT_FIXED_DEC is DECIMAL_NOT_SPECIFIED (39) - AUTO_SEC_PART_DIGITS is taken from DECIMAL_NOT_SPECIFIED - DOUBLE conversion functions are now using DECIMAL_NOT_SPECIFIED instead of NOT_FIXED_DEC
-rw-r--r--include/m_string.h8
-rw-r--r--include/my_decimal_limits.h10
-rw-r--r--include/my_time.h3
-rw-r--r--include/mysql_com.h17
-rw-r--r--libmysql/libmysql.c2
-rw-r--r--libmysqld/lib_sql.cc4
-rw-r--r--mysql-test/r/bug12427262.result4
-rw-r--r--mysql-test/r/cast.result4
-rw-r--r--mysql-test/r/ctype_binary.result4
-rw-r--r--mysql-test/r/ctype_cp1251.result4
-rw-r--r--mysql-test/r/ctype_latin1.result4
-rw-r--r--mysql-test/r/ctype_ucs.result4
-rw-r--r--mysql-test/r/ctype_utf32.result2
-rw-r--r--mysql-test/r/ctype_utf8.result4
-rw-r--r--mysql-test/r/dyncol.result4
-rw-r--r--mysql-test/r/func_digest.result6
-rw-r--r--mysql-test/r/func_hybrid_type.result144
-rw-r--r--mysql-test/r/func_math.result16
-rw-r--r--mysql-test/r/func_str.result10
-rw-r--r--mysql-test/r/grant_4332.result4
-rw-r--r--mysql-test/r/last_value.result10
-rw-r--r--mysql-test/r/metadata.result2
-rw-r--r--mysql-test/r/ps.result2
-rw-r--r--mysql-test/r/ps_1general.result32
-rw-r--r--mysql-test/r/ps_2myisam.result330
-rw-r--r--mysql-test/r/ps_3innodb.result330
-rw-r--r--mysql-test/r/ps_4heap.result330
-rw-r--r--mysql-test/r/ps_5merge.result660
-rw-r--r--mysql-test/r/show_check.result116
-rw-r--r--mysql-test/r/type_decimal.result16
-rw-r--r--mysql-test/r/type_float.result49
-rw-r--r--mysql-test/r/type_newdecimal.result145
-rw-r--r--mysql-test/r/variables.result4
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result6
-rw-r--r--mysql-test/suite/funcs_1/t/storedproc.test4
-rw-r--r--mysql-test/suite/maria/ps_maria.result330
-rw-r--r--mysql-test/suite/sys_vars/r/div_precision_increment_basic.result36
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result2
-rw-r--r--mysql-test/suite/sys_vars/t/div_precision_increment_basic.test8
-rw-r--r--mysql-test/t/dyncol.test2
-rw-r--r--mysql-test/t/type_float.test24
-rw-r--r--mysql-test/t/type_newdecimal.test41
-rw-r--r--sql/field.cc66
-rw-r--r--sql/field.h37
-rw-r--r--sql/item.h2
-rw-r--r--sql/item_func.cc5
-rw-r--r--sql/item_sum.cc8
-rw-r--r--sql/protocol.cc4
-rw-r--r--sql/sql_analyse.cc6
-rw-r--r--sql/sql_string.cc2
-rw-r--r--sql/sql_table.cc17
-rw-r--r--sql/table.cc4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_decimal.result16
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result118
-rw-r--r--storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test24
-rw-r--r--strings/dtoa.c2
-rw-r--r--strings/my_vsnprintf.c7
58 files changed, 1631 insertions, 1426 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 969725e4631..0f3cd362b4d 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -23,6 +23,7 @@
#define _m_string_h
#include "my_global.h" /* HAVE_* */
+#include "my_decimal_limits.h"
#ifndef __USE_GNU
#define __USE_GNU /* We want to use stpcpy */
@@ -138,14 +139,13 @@ size_t my_fcvt(double x, int precision, char *to, my_bool *error);
size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
my_bool *error);
-#define NOT_FIXED_DEC 31
-
/*
The longest string my_fcvt can return is 311 + "precision" bytes.
- Here we assume that we never cal my_fcvt() with precision >= NOT_FIXED_DEC
+ Here we assume that we never cal my_fcvt() with
+ precision >= DECIMAL_NOT_SPECIFIED
(+ 1 byte for the terminating '\0').
*/
-#define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC)
+#define FLOATING_POINT_BUFFER (311 + DECIMAL_NOT_SPECIFIED)
/*
We want to use the 'e' format in some cases even if we have enough space
diff --git a/include/my_decimal_limits.h b/include/my_decimal_limits.h
index 50d70357c42..a287e82f989 100644
--- a/include/my_decimal_limits.h
+++ b/include/my_decimal_limits.h
@@ -31,10 +31,16 @@
digits * number of decimal digits in one our big digit - number of decimal
digits in one our big digit decreased by 1 (because we always put decimal
point on the border of our big digits))
+
+ With normal precession we can handle 65 digits. MariaDB can store in
+ the .frm up to 63 digits. By default we use DECIMAL_NOT_SPECIFIED digits
+ when converting strings to decimal, so we don't want to set this too high.
+ To not use up all digits for the scale we limit the number of decimals to
+ 38.
*/
#define DECIMAL_MAX_PRECISION (DECIMAL_MAX_POSSIBLE_PRECISION - 8*2)
-#define DECIMAL_MAX_SCALE 30
-#define DECIMAL_NOT_SPECIFIED 31
+#define DECIMAL_MAX_SCALE 38
+#define DECIMAL_NOT_SPECIFIED 39
/**
maximum length of string representation (number of maximum decimal
diff --git a/include/my_time.h b/include/my_time.h
index 557dcdd5670..a5fe7858797 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -23,6 +23,7 @@
#define _my_time_h_
#include "my_global.h"
#include "mysql_time.h"
+#include "my_decimal_limits.h"
C_MODE_START
@@ -184,7 +185,7 @@ void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
sent using binary protocol fit in this buffer.
*/
#define MAX_DATE_STRING_REP_LENGTH 30
-#define AUTO_SEC_PART_DIGITS 31 /* same as NOT_FIXED_DEC */
+#define AUTO_SEC_PART_DIGITS DECIMAL_NOT_SPECIFIED
int my_time_to_str(const MYSQL_TIME *l_time, char *to, uint digits);
int my_date_to_str(const MYSQL_TIME *l_time, char *to);
diff --git a/include/mysql_com.h b/include/mysql_com.h
index c13999a1028..4e28eb27806 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -21,6 +21,8 @@
#ifndef _mysql_com_h
#define _mysql_com_h
+#include "my_decimal_limits.h"
+
#define HOSTNAME_LENGTH 60
#define SYSTEM_CHARSET_MBMAXLEN 3
#define NAME_CHAR_LEN 64 /* Field/table name length */
@@ -648,5 +650,18 @@ uchar *safe_net_store_length(uchar *pkg, size_t pkg_len, ulonglong length);
#define MYSQL_STMT_HEADER 4
#define MYSQL_LONG_DATA_HEADER 6
-#define NOT_FIXED_DEC 31
+/*
+ If a float or double field have more than this number of decimals,
+ it's regarded as floating point field without any specific number of
+ decimals
+*/
+
+#define FLOATING_POINT_DECIMALS 31
+
+/* Keep client compatible with earlier versions */
+#ifdef MYSQL_SERVER
+#define NOT_FIXED_DEC DECIMAL_NOT_SPECIFIED
+#else
+#define NOT_FIXED_DEC FLOATING_POINT_DECIMALS
+#endif
#endif
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index e91b3f75614..0622b7a1a78 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -3479,7 +3479,7 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
*/
char buff[FLOATING_POINT_BUFFER];
size_t len;
- if (field->decimals >= NOT_FIXED_DEC)
+ if (field->decimals >= FLOATING_POINT_DECIMALS)
len= my_gcvt(value, type,
(int) MY_MIN(sizeof(buff)-1, param->buffer_length),
buff, NULL);
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 8ce11ebff0e..4a84e63f222 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -1067,6 +1067,10 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
client_field->type= server_field.type;
client_field->flags= (uint16) server_field.flags;
client_field->decimals= server_field.decimals;
+ if (server_field.type == MYSQL_TYPE_FLOAT ||
+ server_field.type == MYSQL_TYPE_DOUBLE)
+ set_if_smaller(client_field->decimals, FLOATING_POINT_DECIMALS);
+
client_field->db_length= strlen(client_field->db);
client_field->table_length= strlen(client_field->table);
client_field->name_length= strlen(client_field->name);
diff --git a/mysql-test/r/bug12427262.result b/mysql-test/r/bug12427262.result
index c541ba0f664..8ec14efc45e 100644
--- a/mysql-test/r/bug12427262.result
+++ b/mysql-test/r/bug12427262.result
@@ -33,7 +33,7 @@ like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/fi
into @count_read_after;
select @count_read_after-@count_read_before;
@count_read_after-@count_read_before
-0.000000000000000000000000000000
+0.00000000000000000000000000000000000000
show full tables;
Tables_in_show_table_lw_db Table_type
t1 BASE TABLE
@@ -51,6 +51,6 @@ like "%show_table_lw_db%" AND FILE_NAME like "%.frm%" AND EVENT_NAME='wait/io/fi
into @count_read_after;
select @count_read_after-@count_read_before;
@count_read_after-@count_read_before
-10.000000000000000000000000000000
+10.00000000000000000000000000000000000000
drop table t1;
drop database show_table_lw_db;
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index da23f8af40c..eb50d10ce4f 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -390,9 +390,9 @@ ERROR 42000: Too big precision 66 specified for '1'. Maximum is 65.
select cast(1 as decimal(66,6));
ERROR 42000: Too big precision 66 specified for '1'. Maximum is 65.
select cast(1 as decimal(64,63));
-ERROR 42000: Too big scale 63 specified for '1'. Maximum is 30.
+ERROR 42000: Too big scale 63 specified for '1'. Maximum is 38.
select cast(1 as double(64,63));
-ERROR 42000: Too big scale 63 specified for '1'. Maximum is 30.
+ERROR 42000: Too big scale 63 specified for '1'. Maximum is 38.
set names binary;
select cast(_latin1'test' as char character set latin2);
cast(_latin1'test' as char character set latin2)
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index ac79a158943..ebf423e9d87 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -914,7 +914,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varbinary(83) DEFAULT NULL,
- `c2` decimal(65,30) DEFAULT NULL
+ `c2` decimal(65,38) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(@@ft_max_word_len));
@@ -2621,7 +2621,7 @@ GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END)
1234567
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(a,'') 253 9 7 Y 128 31 63
+def COALESCE(a,'') 253 9 7 Y 128 39 63
COALESCE(a,'')
1234567
# All columns must be VARCHAR(9) with the same length:
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index dc6d4750590..ab62f17cf2f 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -1323,7 +1323,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(83) CHARACTER SET cp1251 DEFAULT NULL,
- `c2` decimal(65,30) DEFAULT NULL
+ `c2` decimal(65,38) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(@@ft_max_word_len));
@@ -3030,7 +3030,7 @@ GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END)
1234567
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(a,'') 253 9 7 Y 0 31 51
+def COALESCE(a,'') 253 9 7 Y 0 39 51
COALESCE(a,'')
1234567
# All columns must be VARCHAR(9) with the same length:
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index f2e519e4aef..64e7a3222d9 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -1620,7 +1620,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(83) DEFAULT NULL,
- `c2` decimal(65,30) DEFAULT NULL
+ `c2` decimal(65,38) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(@@ft_max_word_len));
@@ -3327,7 +3327,7 @@ GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END)
1234567
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(a,'') 253 9 7 Y 0 31 8
+def COALESCE(a,'') 253 9 7 Y 0 39 8
COALESCE(a,'')
1234567
# All columns must be VARCHAR(9) with the same length:
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 56174311bf3..ee97ffe78b2 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -2523,7 +2523,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(83) CHARACTER SET ucs2 DEFAULT NULL,
- `c2` decimal(65,30) DEFAULT NULL
+ `c2` decimal(65,38) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(@@ft_max_word_len));
@@ -4230,7 +4230,7 @@ GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END)
1234567
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(a,'') 253 9 7 Y 0 31 8
+def COALESCE(a,'') 253 9 7 Y 0 39 8
COALESCE(a,'')
1234567
# All columns must be VARCHAR(9) with the same length:
diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result
index a0a8072265c..1b6785c73b5 100644
--- a/mysql-test/r/ctype_utf32.result
+++ b/mysql-test/r/ctype_utf32.result
@@ -1575,7 +1575,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `format(123,2,'no_NO')` varchar(37) CHARACTER SET utf32 NOT NULL
+ `format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1;
format(123,2,'no_NO')
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 48a6eb02526..d9b7e4dcf42 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -3365,7 +3365,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` varchar(83) CHARACTER SET utf8 DEFAULT NULL,
- `c2` decimal(65,30) DEFAULT NULL
+ `c2` decimal(65,38) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(@@ft_max_word_len));
@@ -5072,7 +5072,7 @@ GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END)
1234567
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def COALESCE(a,'') 253 27 7 Y 0 31 33
+def COALESCE(a,'') 253 27 7 Y 0 39 33
COALESCE(a,'')
1234567
# All columns must be VARCHAR(9) with the same length:
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index b0d28a81043..1b298cec5cf 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -1458,8 +1458,8 @@ Note 1105 Cast to signed converted positive out-of-range integer to it's negativ
# MDEV-7505 - Too large scale in DECIMAL dynamic column getter crashes
# mysqld
#
-SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,34));
-ERROR 42000: Too big scale 34 specified for ''y''. Maximum is 30.
+SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,50));
+ERROR 42000: Too big scale 50 specified for ''y''. Maximum is 38.
#
# test of symbolic names
#
diff --git a/mysql-test/r/func_digest.result b/mysql-test/r/func_digest.result
index 095b69363ce..35746157d6e 100644
--- a/mysql-test/r/func_digest.result
+++ b/mysql-test/r/func_digest.result
@@ -1411,18 +1411,18 @@ LENGTH(SHA2( 'computed', 512 )) / 2 * 8 = 512
SET NAMES binary;
SELECT sha2('1',224);
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def sha2('1',224) 253 56 56 Y 128 31 63
+def sha2('1',224) 253 56 56 Y 128 39 63
sha2('1',224)
e25388fde8290dc286a6164fa2d97e551b53498dcbf7bc378eb1f178
SET NAMES utf8;
SELECT sha2('1',224);
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def sha2('1',224) 253 168 56 Y 0 31 33
+def sha2('1',224) 253 168 56 Y 0 39 33
sha2('1',224)
e25388fde8290dc286a6164fa2d97e551b53498dcbf7bc378eb1f178
SET NAMES latin1;
SELECT sha2('1',224);
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def sha2('1',224) 253 56 56 Y 0 31 8
+def sha2('1',224) 253 56 56 Y 0 39 8
sha2('1',224)
e25388fde8290dc286a6164fa2d97e551b53498dcbf7bc378eb1f178
diff --git a/mysql-test/r/func_hybrid_type.result b/mysql-test/r/func_hybrid_type.result
index eeaa79e7dce..a5e2dd95f4c 100644
--- a/mysql-test/r/func_hybrid_type.result
+++ b/mysql-test/r/func_hybrid_type.result
@@ -1592,21 +1592,21 @@ GREATEST(b, b) AS greatest_b_b
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 t1 a ___________a 253 10 1 Y 0 0 8
-def case_______a 253 10 1 Y 0 31 8
-def case_____a_a 253 10 1 Y 0 31 8
-def coalesce___a 253 10 1 Y 0 31 8
-def coalesce_a_a 253 10 1 Y 0 31 8
-def if_______a_a 253 10 1 Y 0 31 8
-def ifnull___a_a 253 10 1 Y 0 31 8
-def least____a_a 253 10 1 Y 0 31 8
-def greatest_a_a 253 10 1 Y 0 31 8
+def case_______a 253 10 1 Y 0 39 8
+def case_____a_a 253 10 1 Y 0 39 8
+def coalesce___a 253 10 1 Y 0 39 8
+def coalesce_a_a 253 10 1 Y 0 39 8
+def if_______a_a 253 10 1 Y 0 39 8
+def ifnull___a_a 253 10 1 Y 0 39 8
+def least____a_a 253 10 1 Y 0 39 8
+def greatest_a_a 253 10 1 Y 0 39 8
def test t1 t1 b ___________b 254 1 1 Y 256 0 8
-def case_______b 254 1 1 Y 0 31 8
-def case_____b_b 254 1 1 Y 0 31 8
-def coalesce___b 254 1 1 Y 0 31 8
-def coalesce_b_b 254 1 1 Y 0 31 8
-def if_______b_b 254 1 1 Y 0 31 8
-def ifnull___b_b 254 1 1 Y 0 31 8
+def case_______b 254 1 1 Y 0 39 8
+def case_____b_b 254 1 1 Y 0 39 8
+def coalesce___b 254 1 1 Y 0 39 8
+def coalesce_b_b 254 1 1 Y 0 39 8
+def if_______b_b 254 1 1 Y 0 39 8
+def ifnull___b_b 254 1 1 Y 0 39 8
def least____b_b 254 1 1 Y 0 0 8
def greatest_b_b 254 1 1 Y 0 0 8
___________a a
@@ -1642,18 +1642,18 @@ GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def case_____a_b 253 10 1 Y 0 31 8
-def case_____b_a 253 10 1 Y 0 31 8
-def coalesce_a_b 253 10 1 Y 0 31 8
-def coalesce_b_a 253 10 1 Y 0 31 8
-def if_______a_b 253 10 1 Y 0 31 8
-def if_______b_a 253 10 1 Y 0 31 8
-def ifnull___a_b 253 10 1 Y 0 31 8
-def ifnull___b_a 253 10 1 Y 0 31 8
-def least____a_b 253 10 1 Y 0 31 8
-def least____b_a 253 10 1 Y 0 31 8
-def greatest_a_b 253 10 1 Y 0 31 8
-def greatest_b_a 253 10 1 Y 0 31 8
+def case_____a_b 253 10 1 Y 0 39 8
+def case_____b_a 253 10 1 Y 0 39 8
+def coalesce_a_b 253 10 1 Y 0 39 8
+def coalesce_b_a 253 10 1 Y 0 39 8
+def if_______a_b 253 10 1 Y 0 39 8
+def if_______b_a 253 10 1 Y 0 39 8
+def ifnull___a_b 253 10 1 Y 0 39 8
+def ifnull___b_a 253 10 1 Y 0 39 8
+def least____a_b 253 10 1 Y 0 39 8
+def least____b_a 253 10 1 Y 0 39 8
+def greatest_a_b 253 10 1 Y 0 39 8
+def greatest_b_a 253 10 1 Y 0 39 8
case_____a_b a
case_____b_a b
coalesce_a_b a
@@ -2843,14 +2843,14 @@ def ifnull___a_a 3 11 11 Y 32896 0 63
def least____a_a 3 11 11 Y 32896 0 63
def greatest_a_a 3 11 11 Y 32896 0 63
def test t1 t1 b ___________b 253 10 4 Y 0 0 8
-def case_______b 253 10 4 Y 0 31 8
-def case_____b_b 253 10 4 Y 0 31 8
-def coalesce___b 253 10 4 Y 0 31 8
-def coalesce_b_b 253 10 4 Y 0 31 8
-def if_______b_b 253 10 4 Y 0 31 8
-def ifnull___b_b 253 10 4 Y 0 31 8
-def least____b_b 253 10 4 Y 0 31 8
-def greatest_b_b 253 10 4 Y 0 31 8
+def case_______b 253 10 4 Y 0 39 8
+def case_____b_b 253 10 4 Y 0 39 8
+def coalesce___b 253 10 4 Y 0 39 8
+def coalesce_b_b 253 10 4 Y 0 39 8
+def if_______b_b 253 10 4 Y 0 39 8
+def ifnull___b_b 253 10 4 Y 0 39 8
+def least____b_b 253 10 4 Y 0 39 8
+def greatest_b_b 253 10 4 Y 0 39 8
___________a -2147483648
case_______a -2147483648
case_____a_a -2147483648
@@ -2884,14 +2884,14 @@ GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def case_____a_b 253 11 11 Y 0 31 8
-def case_____b_a 253 11 4 Y 0 31 8
-def coalesce_a_b 253 11 11 Y 0 31 8
-def coalesce_b_a 253 11 4 Y 0 31 8
-def if_______a_b 253 11 4 Y 0 31 8
-def if_______b_a 253 11 11 Y 0 31 8
-def ifnull___a_b 253 11 11 Y 0 31 8
-def ifnull___b_a 253 11 4 Y 0 31 8
+def case_____a_b 253 11 11 Y 0 39 8
+def case_____b_a 253 11 4 Y 0 39 8
+def coalesce_a_b 253 11 11 Y 0 39 8
+def coalesce_b_a 253 11 4 Y 0 39 8
+def if_______a_b 253 11 4 Y 0 39 8
+def if_______b_a 253 11 11 Y 0 39 8
+def ifnull___a_b 253 11 11 Y 0 39 8
+def ifnull___b_a 253 11 4 Y 0 39 8
def least____a_b 5 23 11 Y 32896 31 63
def least____b_a 5 23 11 Y 32896 31 63
def greatest_a_b 5 23 3 Y 32896 31 63
@@ -3084,10 +3084,10 @@ MAX(COALESCE(c3)) AS c3,
MAX(COALESCE(c4)) AS c4
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 255 0 Y 128 31 63
-def c2 250 16777215 0 Y 128 31 63
-def c3 252 65535 0 Y 128 31 63
-def c4 251 4294967295 0 Y 128 31 63
+def c1 253 255 0 Y 128 39 63
+def c2 250 16777215 0 Y 128 39 63
+def c3 252 65535 0 Y 128 39 63
+def c4 251 4294967295 0 Y 128 39 63
c1 c2 c3 c4
NULL NULL NULL NULL
DROP TABLE t2;
@@ -3109,8 +3109,8 @@ MAX(COALESCE(c1)) AS c1,
MAX(COALESCE(c2)) AS c2
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
c1 c2
NULL NULL
DROP TABLE t2;
@@ -3132,8 +3132,8 @@ MAX(COALESCE(c1)) AS c1,
MAX(COALESCE(c2)) AS c2
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
c1 c2
NULL NULL
DROP TABLE t2;
@@ -3158,9 +3158,9 @@ MAX(COALESCE(c2)) AS c2,
MAX(COALESCE(c3)) AS c3
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
-def c3 252 20000 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
+def c3 252 20000 0 Y 0 39 8
c1 c2 c3
NULL NULL NULL
DROP TABLE t2;
@@ -3185,9 +3185,9 @@ MAX(COALESCE(c2)) AS c2,
MAX(COALESCE(c3)) AS c3
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
-def c3 252 60000 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
+def c3 252 60000 0 Y 0 39 8
c1 c2 c3
NULL NULL NULL
DROP TABLE t2;
@@ -3206,7 +3206,7 @@ SELECT
MAX(COALESCE(c1)) AS c1
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
c1
NULL
DROP TABLE t2;
@@ -3225,7 +3225,7 @@ SELECT
MAX(COALESCE(c1)) AS c1
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
c1
NULL
DROP TABLE t2;
@@ -3256,10 +3256,10 @@ SELECT
@c4:=c4 AS c4
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 255 0 Y 128 31 63
-def c2 252 65535 0 Y 128 31 63
-def c3 250 16777215 0 Y 128 31 63
-def c4 251 4294967295 0 Y 128 31 63
+def c1 253 255 0 Y 128 39 63
+def c2 252 65535 0 Y 128 39 63
+def c3 250 16777215 0 Y 128 39 63
+def c4 251 4294967295 0 Y 128 39 63
c1 c2 c3 c4
DROP TABLE t2;
DROP TABLE t1;
@@ -3280,8 +3280,8 @@ SELECT
@c2:=c2 AS c2
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
c1 c2
DROP TABLE t2;
DROP TABLE t1;
@@ -3302,8 +3302,8 @@ SELECT
@c2:=c2 AS c2
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
c1 c2
DROP TABLE t2;
DROP TABLE t1;
@@ -3327,9 +3327,9 @@ SELECT
@c:=c3 AS c3
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
-def c3 252 20000 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
+def c3 252 20000 0 Y 0 39 8
c1 c2 c3
DROP TABLE t2;
DROP TABLE t1;
@@ -3353,9 +3353,9 @@ SELECT
@c:=c3 AS c3
FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def c1 253 1 0 Y 0 31 8
-def c2 253 255 0 Y 0 31 8
-def c3 252 60000 0 Y 0 31 8
+def c1 253 1 0 Y 0 39 8
+def c2 253 255 0 Y 0 39 8
+def c3 252 60000 0 Y 0 39 8
c1 c2 c3
DROP TABLE t2;
DROP TABLE t1;
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index d768672efe4..6842613e8c7 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -356,28 +356,28 @@ round(1.12e1, 4294967296) truncate(1.12e1, 4294967296)
11.2 11.2
select round(1.5, 2147483640), truncate(1.5, 2147483640);
round(1.5, 2147483640) truncate(1.5, 2147483640)
-1.500000000000000000000000000000 1.500000000000000000000000000000
+1.50000000000000000000000000000000000000 1.50000000000000000000000000000000000000
select round(1.5, -2147483649), round(1.5, 2147483648);
round(1.5, -2147483649) round(1.5, 2147483648)
-0 1.500000000000000000000000000000
+0 1.50000000000000000000000000000000000000
select truncate(1.5, -2147483649), truncate(1.5, 2147483648);
truncate(1.5, -2147483649) truncate(1.5, 2147483648)
-0 1.500000000000000000000000000000
+0 1.50000000000000000000000000000000000000
select round(1.5, -4294967296), round(1.5, 4294967296);
round(1.5, -4294967296) round(1.5, 4294967296)
-0 1.500000000000000000000000000000
+0 1.50000000000000000000000000000000000000
select truncate(1.5, -4294967296), truncate(1.5, 4294967296);
truncate(1.5, -4294967296) truncate(1.5, 4294967296)
-0 1.500000000000000000000000000000
+0 1.50000000000000000000000000000000000000
select round(1.5, -9223372036854775808), round(1.5, 9223372036854775808);
round(1.5, -9223372036854775808) round(1.5, 9223372036854775808)
-0 1.500000000000000000000000000000
+0 1.50000000000000000000000000000000000000
select truncate(1.5, -9223372036854775808), truncate(1.5, 9223372036854775808);
truncate(1.5, -9223372036854775808) truncate(1.5, 9223372036854775808)
-0 1.500000000000000000000000000000
+0 1.50000000000000000000000000000000000000
select round(1.5, 18446744073709551615), truncate(1.5, 18446744073709551615);
round(1.5, 18446744073709551615) truncate(1.5, 18446744073709551615)
-1.500000000000000000000000000000 1.500000000000000000000000000000
+1.50000000000000000000000000000000000000 1.50000000000000000000000000000000000000
select round(18446744073709551614, -1), truncate(18446744073709551614, -1);
round(18446744073709551614, -1) truncate(18446744073709551614, -1)
18446744073709551610 18446744073709551610
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index d8ad6d7edb6..d3429b4360f 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -731,7 +731,7 @@ t1 CREATE TABLE `t1` (
`conv(130,16,10)` varchar(64) DEFAULT NULL,
`hex(130)` varchar(6) NOT NULL,
`char(130)` varbinary(4) NOT NULL,
- `format(130,10)` varchar(37) NOT NULL,
+ `format(130,10)` varchar(45) NOT NULL,
`left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL,
`right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL,
`lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL,
@@ -1237,13 +1237,13 @@ create table t1 (i int);
insert into t1 values (1000000000),(1);
select lpad(i, 7, ' ') as t from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def t 253 7 7 Y 0 31 8
+def t 253 7 7 Y 0 39 8
t
1000000
1
select rpad(i, 7, ' ') as t from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def t 253 7 7 Y 0 31 8
+def t 253 7 7 Y 0 39 8
t
1000000
1
@@ -2527,7 +2527,7 @@ create table t1(a float);
insert into t1 values (1.33);
select format(a, 2) from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def format(a, 2) 253 49 4 Y 0 31 8
+def format(a, 2) 253 57 4 Y 0 39 8
format(a, 2)
1.33
drop table t1;
@@ -2855,7 +2855,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `format(123,2,'no_NO')` varchar(37) NOT NULL
+ `format(123,2,'no_NO')` varchar(45) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1;
format(123,2,'no_NO')
diff --git a/mysql-test/r/grant_4332.result b/mysql-test/r/grant_4332.result
index 93c0a24d164..b62ca1a20cc 100644
--- a/mysql-test/r/grant_4332.result
+++ b/mysql-test/r/grant_4332.result
@@ -10,7 +10,7 @@ alter table mysql.event modify definer char(77) collate utf8_bin not null defaul
flush privileges;
select user();
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def user() 253 77 14 N 1 31 8
+def user() 253 77 14 N 1 39 8
user()
root@localhost
create user a17aaaaaaaaaaaaa0@localhost;
@@ -29,7 +29,7 @@ alter table mysql.event modify definer char(141) collate utf8_bin not null defau
flush privileges;
select user();
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def user() 253 141 14 N 1 31 8
+def user() 253 141 14 N 1 39 8
user()
root@localhost
set GLOBAL sql_mode=default;
diff --git a/mysql-test/r/last_value.result b/mysql-test/r/last_value.result
index 6222eacd4f0..b11ee6eaadb 100644
--- a/mysql-test/r/last_value.result
+++ b/mysql-test/r/last_value.result
@@ -36,17 +36,17 @@ LAST_VALUE(@last_a:=1,@last_b:=1.0)
1.0
select @last_b;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @last_b 246 83 3 Y 32896 30 63
+def @last_b 246 83 3 Y 32896 38 63
@last_b
1.0
SELECT LAST_VALUE(@last_a:=1,@last_b:="hello");
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def LAST_VALUE(@last_a:=1,@last_b:="hello") 253 5 5 N 1 31 8
+def LAST_VALUE(@last_a:=1,@last_b:="hello") 253 5 5 N 1 39 8
LAST_VALUE(@last_a:=1,@last_b:="hello")
hello
select @last_b;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @last_b 250 16777215 5 Y 0 31 8
+def @last_b 250 16777215 5 Y 0 39 8
@last_b
hello
SELECT date(LAST_VALUE(@last_a:=1,@last_b:="2001-02-03"));
@@ -56,7 +56,7 @@ date(LAST_VALUE(@last_a:=1,@last_b:="2001-02-03"))
2001-02-03
select @last_b;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @last_b 250 16777215 10 Y 0 31 8
+def @last_b 250 16777215 10 Y 0 39 8
@last_b
2001-02-03
SELECT LAST_VALUE(@last_a:=1,@last_b:="2001-02-03",NULL);
@@ -66,7 +66,7 @@ LAST_VALUE(@last_a:=1,@last_b:="2001-02-03",NULL)
NULL
select @last_b;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @last_b 250 16777215 10 Y 0 31 8
+def @last_b 250 16777215 10 Y 0 39 8
@last_b
2001-02-03
SELECT LAST_VALUE();
diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result
index ffdab244f31..3db3bcd450f 100644
--- a/mysql-test/r/metadata.result
+++ b/mysql-test/r/metadata.result
@@ -4,7 +4,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def 1 8 1 1 N 32897 0 63
def 1.0 246 4 3 N 32897 1 63
def -1 8 2 2 N 32897 0 63
-def hello 253 5 5 N 1 31 8
+def hello 253 5 5 N 1 39 8
def NULL 6 0 0 Y 32896 0 63
1 1.0 -1 hello NULL
1 1.0 -1 hello NULL
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index d72ecd65547..fb8c9ca1ff2 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -3523,7 +3523,7 @@ CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
SHOW CREATE TABLE tmp1;
Table Create Table
tmp1 CREATE TEMPORARY TABLE `tmp1` (
- `c1` decimal(65,30) DEFAULT NULL
+ `c1` decimal(65,38) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT @a, @a = 123.456789;
@a @a = 123.456789
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index 326d37ee560..0fa12287080 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -444,15 +444,15 @@ prepare stmt1 from ' explain select a from t1 order by b ';
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 3 Y 0 31 8
-def possible_keys 253 4_OR_8_K 0 Y 0 31 8
-def key 253 64 0 Y 0 31 8
-def key_len 253 4_OR_8_K 0 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 3 Y 0 39 8
+def possible_keys 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 14 N 1 31 8
+def Extra 253 255 14 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
SET @arg00=1 ;
@@ -460,15 +460,15 @@ prepare stmt1 from ' explain select a from t1 where a > ? order by b ';
execute stmt1 using @arg00;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 5 Y 0 31 8
-def possible_keys 253 4_OR_8_K 7 Y 0 31 8
-def key 253 64 7 Y 0 31 8
-def key_len 253 4_OR_8_K 1 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 5 Y 0 39 8
+def possible_keys 253 4_OR_8_K 7 Y 0 39 8
+def key 253 64 7 Y 0 39 8
+def key_len 253 4_OR_8_K 1 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 37 N 1 31 8
+def Extra 253 255 37 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using filesort
drop table if exists t2;
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 6d7544deb4e..d638e02faf6 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -1154,15 +1154,15 @@ prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 3 Y 0 31 8
-def possible_keys 253 4_OR_8_K 0 Y 0 31 8
-def key 253 64 0 Y 0 31 8
-def key_len 253 4_OR_8_K 0 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 3 Y 0 39 8
+def possible_keys 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
drop table if exists t2 ;
@@ -1779,7 +1779,7 @@ t5 CREATE TABLE `t5` (
`const01` int(1) NOT NULL,
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) NOT NULL,
- `param02` decimal(65,30) DEFAULT NULL,
+ `param02` decimal(65,38) DEFAULT NULL,
`const03` double NOT NULL,
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
@@ -1800,7 +1800,7 @@ t5 CREATE TABLE `t5` (
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
- `param13` decimal(65,30) DEFAULT NULL,
+ `param13` decimal(65,38) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1809,7 +1809,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t5 t5 const01 const01 3 1 1 N 36865 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 36865 1 63
-def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
+def test t5 t5 param02 param02 246 67 40 Y 32768 38 63
def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
@@ -1830,13 +1830,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 38 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.000000000000000000000000000000
+param02 8.00000000000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1928,28 +1928,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@@ -1975,28 +1975,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select
@@ -2025,28 +2025,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2065,28 +2065,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2113,28 +2113,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2157,28 +2157,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2203,28 +2203,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2241,28 +2241,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index a22135d30c0..0d53f18e9c7 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -1154,15 +1154,15 @@ prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 3 Y 0 31 8
-def possible_keys 253 4_OR_8_K 0 Y 0 31 8
-def key 253 64 0 Y 0 31 8
-def key_len 253 4_OR_8_K 0 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 3 Y 0 39 8
+def possible_keys 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
@@ -1762,7 +1762,7 @@ t5 CREATE TABLE `t5` (
`const01` int(1) NOT NULL,
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) NOT NULL,
- `param02` decimal(65,30) DEFAULT NULL,
+ `param02` decimal(65,38) DEFAULT NULL,
`const03` double NOT NULL,
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
@@ -1783,7 +1783,7 @@ t5 CREATE TABLE `t5` (
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
- `param13` decimal(65,30) DEFAULT NULL,
+ `param13` decimal(65,38) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1792,7 +1792,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t5 t5 const01 const01 3 1 1 N 36865 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 36865 1 63
-def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
+def test t5 t5 param02 param02 246 67 40 Y 32768 38 63
def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
@@ -1813,13 +1813,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 38 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.000000000000000000000000000000
+param02 8.00000000000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1911,28 +1911,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@@ -1958,28 +1958,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select
@@ -2008,28 +2008,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2048,28 +2048,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2096,28 +2096,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2140,28 +2140,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2186,28 +2186,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2224,28 +2224,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index bbdb3ea7b23..e677ad5bf93 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -1155,15 +1155,15 @@ prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 3 Y 0 31 8
-def possible_keys 253 4_OR_8_K 0 Y 0 31 8
-def key 253 64 0 Y 0 31 8
-def key_len 253 4_OR_8_K 0 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 3 Y 0 39 8
+def possible_keys 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
@@ -1763,7 +1763,7 @@ t5 CREATE TABLE `t5` (
`const01` int(1) NOT NULL,
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) NOT NULL,
- `param02` decimal(65,30) DEFAULT NULL,
+ `param02` decimal(65,38) DEFAULT NULL,
`const03` double NOT NULL,
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
@@ -1784,7 +1784,7 @@ t5 CREATE TABLE `t5` (
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
- `param13` decimal(65,30) DEFAULT NULL,
+ `param13` decimal(65,38) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1793,7 +1793,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t5 t5 const01 const01 3 1 1 N 36865 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 36865 1 63
-def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
+def test t5 t5 param02 param02 246 67 40 Y 32768 38 63
def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
@@ -1814,13 +1814,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 38 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.000000000000000000000000000000
+param02 8.00000000000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1912,28 +1912,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 0 31 8
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 0 31 8
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 0 31 8
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 0 31 8
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 0 39 8
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 0 39 8
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 0 39 8
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 0 39 8
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@@ -1959,28 +1959,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 0 31 8
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 0 31 8
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 0 31 8
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 0 31 8
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 0 39 8
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 0 39 8
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 0 39 8
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 0 39 8
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select
@@ -2009,28 +2009,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 0 31 8
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 0 31 8
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 0 31 8
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 0 31 8
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 0 39 8
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 0 39 8
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 0 39 8
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 0 39 8
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2049,28 +2049,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 0 31 8
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 0 31 8
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 0 31 8
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 0 31 8
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 0 39 8
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 0 39 8
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 0 39 8
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 0 39 8
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2097,28 +2097,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 0 31 8
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 0 31 8
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 0 31 8
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 0 31 8
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 0 39 8
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 0 39 8
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 0 39 8
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 0 39 8
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2141,28 +2141,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 0 31 8
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 0 31 8
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 0 31 8
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 0 31 8
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 0 39 8
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 0 39 8
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 0 39 8
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 0 39 8
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2187,28 +2187,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 0 31 8
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 0 31 8
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 0 31 8
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 0 31 8
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 0 39 8
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 0 39 8
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 0 39 8
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 0 39 8
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2225,28 +2225,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 0 31 8
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 0 31 8
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 0 31 8
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 0 31 8
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 0 39 8
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 0 39 8
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 0 39 8
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 0 39 8
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 0262c52d948..c899cc66aae 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -1198,15 +1198,15 @@ prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 3 Y 0 31 8
-def possible_keys 253 4_OR_8_K 0 Y 0 31 8
-def key 253 64 0 Y 0 31 8
-def key_len 253 4_OR_8_K 0 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 3 Y 0 39 8
+def possible_keys 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
@@ -1700,7 +1700,7 @@ t5 CREATE TABLE `t5` (
`const01` int(1) NOT NULL,
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) NOT NULL,
- `param02` decimal(65,30) DEFAULT NULL,
+ `param02` decimal(65,38) DEFAULT NULL,
`const03` double NOT NULL,
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
@@ -1721,7 +1721,7 @@ t5 CREATE TABLE `t5` (
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
- `param13` decimal(65,30) DEFAULT NULL,
+ `param13` decimal(65,38) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1730,7 +1730,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t5 t5 const01 const01 3 1 1 N 36865 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 36865 1 63
-def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
+def test t5 t5 param02 param02 246 67 40 Y 32768 38 63
def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
@@ -1751,13 +1751,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 38 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.000000000000000000000000000000
+param02 8.00000000000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1849,28 +1849,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@@ -1896,28 +1896,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select
@@ -1946,28 +1946,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -1986,28 +1986,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2034,28 +2034,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2078,28 +2078,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2124,28 +2124,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2162,28 +2162,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
@@ -4552,15 +4552,15 @@ prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 3 Y 0 31 8
-def possible_keys 253 4_OR_8_K 0 Y 0 31 8
-def key 253 64 0 Y 0 31 8
-def key_len 253 4_OR_8_K 0 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 3 Y 0 39 8
+def possible_keys 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
@@ -5054,7 +5054,7 @@ t5 CREATE TABLE `t5` (
`const01` int(1) NOT NULL,
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) NOT NULL,
- `param02` decimal(65,30) DEFAULT NULL,
+ `param02` decimal(65,38) DEFAULT NULL,
`const03` double NOT NULL,
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
@@ -5075,7 +5075,7 @@ t5 CREATE TABLE `t5` (
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
- `param13` decimal(65,30) DEFAULT NULL,
+ `param13` decimal(65,38) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -5084,7 +5084,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t5 t5 const01 const01 3 1 1 N 36865 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 36865 1 63
-def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
+def test t5 t5 param02 param02 246 67 40 Y 32768 38 63
def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
@@ -5105,13 +5105,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 38 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.000000000000000000000000000000
+param02 8.00000000000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -5203,28 +5203,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@@ -5250,28 +5250,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select
@@ -5300,28 +5300,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -5340,28 +5340,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -5388,28 +5388,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -5432,28 +5432,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -5478,28 +5478,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -5516,28 +5516,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index c3e7588a56d..ce1d8b9d187 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -12,51 +12,51 @@ insert into t1 values (1,2,2),(2,2,3),(3,2,4),(4,2,4);
-- after Bug#29394 is implemented.
check table t1 fast;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 5 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 27 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 5 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 27 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 check status Table is already up to date
check table t1 fast;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 5 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 27 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 5 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 27 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 check status Table is already up to date
check table t1 changed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 5 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 2 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 5 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 2 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 check status OK
insert into t1 values (5,5,5);
check table t1 changed;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 5 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 2 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 5 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 2 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 check status OK
check table t1 medium;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 5 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 2 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 5 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 2 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 check status OK
check table t1 extended;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 5 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 2 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 5 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 2 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
@@ -85,10 +85,10 @@ ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
-- after Bug#29394 is implemented.
optimize table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 8 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 2 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 8 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 2 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 optimize status OK
optimize table t1;
@@ -157,10 +157,10 @@ insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0
-- after Bug#29394 is implemented.
analyze table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 7 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 2 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 7 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 2 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
@@ -174,10 +174,10 @@ t1 0 PRIMARY 4 f4 A 18 NULL NULL BTREE
-- after Bug#29394 is implemented.
repair table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 128 7 Y 0 31 8
-def Op 253 10 6 Y 0 31 8
-def Msg_type 253 10 6 Y 0 31 8
-def Msg_text 250 393216 2 Y 0 31 8
+def Table 253 128 7 Y 0 39 8
+def Op 253 10 6 Y 0 39 8
+def Msg_type 253 10 6 Y 0 39 8
+def Msg_text 250 393216 2 Y 0 39 8
Table Op Msg_type Msg_text
test.t1 repair status OK
show index from t1;
@@ -886,8 +886,8 @@ latin1_bin latin1 47 Yes 1
----------------------------------------------------------------
SHOW CREATE DATABASE mysqltest1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Database 253 192 10 N 1 31 33
-def Create Database 253 3072 69 N 1 31 33
+def Database 253 192 10 N 1 39 33
+def Create Database 253 3072 69 N 1 39 33
Database Create Database
mysqltest1 CREATE DATABASE `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */
----------------------------------------------------------------
@@ -899,8 +899,8 @@ mysqltest1
----------------------------------------------------------------
SHOW CREATE TABLE t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 192 2 N 1 31 33
-def Create Table 253 3072 102 N 1 31 33
+def Table 253 192 2 N 1 39 33
+def Create Table 253 3072 102 N 1 39 33
Table Create Table
t1 CREATE TABLE `t1` (
`c` int(11) NOT NULL,
@@ -1061,10 +1061,10 @@ def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW N
----------------------------------------------------------------
SHOW CREATE VIEW v1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def View 253 192 2 N 1 31 33
-def Create View 253 3072 103 N 1 31 33
-def character_set_client 253 96 6 N 1 31 33
-def collation_connection 253 96 6 N 1 31 33
+def View 253 192 2 N 1 39 33
+def Create View 253 3072 103 N 1 39 33
+def character_set_client 253 96 6 N 1 39 33
+def collation_connection 253 96 6 N 1 39 33
View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` binary binary
----------------------------------------------------------------
@@ -1088,12 +1088,12 @@ def test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary UNDEFIN
----------------------------------------------------------------
SHOW CREATE PROCEDURE p1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Procedure 253 192 2 N 1 31 33
-def sql_mode 253 126 42 N 1 31 33
-def Create Procedure 253 3072 59 Y 0 31 33
-def character_set_client 253 96 6 N 1 31 33
-def collation_connection 253 96 6 N 1 31 33
-def Database Collation 253 96 17 N 1 31 33
+def Procedure 253 192 2 N 1 39 33
+def sql_mode 253 126 42 N 1 39 33
+def Create Procedure 253 3072 59 Y 0 39 33
+def character_set_client 253 96 6 N 1 39 33
+def collation_connection 253 96 6 N 1 39 33
+def Database Collation 253 96 17 N 1 39 33
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 1 binary binary latin1_swedish_ci
@@ -1143,12 +1143,12 @@ p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DE
----------------------------------------------------------------
SHOW CREATE FUNCTION f1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Function 253 192 2 N 1 31 33
-def sql_mode 253 126 42 N 1 31 33
-def Create Function 253 3072 74 Y 0 31 33
-def character_set_client 253 96 6 N 1 31 33
-def collation_connection 253 96 6 N 1 31 33
-def Database Collation 253 96 17 N 1 31 33
+def Function 253 192 2 N 1 39 33
+def sql_mode 253 126 42 N 1 39 33
+def Create Function 253 3072 74 Y 0 39 33
+def character_set_client 253 96 6 N 1 39 33
+def collation_connection 253 96 6 N 1 39 33
+def Database Collation 253 96 17 N 1 39 33
Function sql_mode Create Function character_set_client collation_connection Database Collation
f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN 1 binary binary latin1_swedish_ci
@@ -1268,8 +1268,8 @@ PRIMARY KEY (Codigo)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
show create table t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def Table 253 64 2 N 1 31 7
-def Create Table 253 1024 445 N 1 31 7
+def Table 253 64 2 N 1 39 7
+def Create Table 253 1024 445 N 1 39 7
Table Create Table
t1 CREATE TABLE `t1` (
`Codigo` int(10) unsigned NOT NULL AUTO_INCREMENT,
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index 85ea43752a5..4ecceaf53dc 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -813,10 +813,10 @@ c1
drop table t1;
SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
%
-0.012345687012345687012345687012
+0.01234568701234568701234568701234568701
SELECT MOD(1, .123456789123456789123456789123456789123456789123456789123456789123456789123456789) AS 'MOD()';
MOD()
-0.012345687012345687012345687012
+0.01234568701234568701234568701234568701
create table t1 (f1 decimal(6,6),f2 decimal(6,6) zerofill);
insert into t1 values (-0.123456,0.123456);
select group_concat(f1),group_concat(f2) from t1;
@@ -847,8 +847,8 @@ c
123456
SELECT ROUND( a, 100 ) AS c FROM t1 ORDER BY c;
c
-123456.000000000000000000000000000000
-123456.000000000000000000000000000000
+123456.00000000000000000000000000000000000000
+123456.00000000000000000000000000000000000000
CREATE TABLE t2( a NUMERIC, b INT );
INSERT INTO t2 VALUES (123456, 100);
SELECT TRUNCATE( a, b ) AS c FROM t2 ORDER BY c;
@@ -869,8 +869,8 @@ c
123456
SELECT ROUND( a, 100 ) AS c FROM t3 ORDER BY c;
c
-123456.000000000000000000000000000000
-123456.000000000000000000000000000000
+123456.00000000000000000000000000000000000000
+123456.00000000000000000000000000000000000000
CREATE TABLE t4( a DECIMAL, b INT );
INSERT INTO t4 VALUES (123456, 40), (123456, 40);
SELECT TRUNCATE( a, b ) AS c FROM t4 ORDER BY c;
@@ -883,8 +883,8 @@ c
123456
SELECT ROUND( a, 100 ) AS c FROM t4 ORDER BY c;
c
-123456.000000000000000000000000000000
-123456.000000000000000000000000000000
+123456.00000000000000000000000000000000000000
+123456.00000000000000000000000000000000000000
delete from t1;
INSERT INTO t1 VALUES (1234567890, 20), (999.99, 5);
Warnings:
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index e6f02d50f4c..4f4c36561dd 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -723,5 +723,54 @@ d2_2
0.99
DROP TABLE t1,t2;
#
+# Test of using wrong scale
+#
+create or replace table t1 (a double(40,30));
+create or replace table t1 (a double(40,31));
+ERROR 42000: Too big scale 31 specified for 'a'. Maximum is 30.
+create or replace table t1 as select 1.01e1;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `1.01e1` double NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select truncate(10.000000000001e1, 30) as t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` double(47,30) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select truncate(10.000000000001e1, 31) as t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` double NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select truncate(10.000000000001e1, 39) as t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` double NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select truncate(10.000000000001e1, 51) as t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` double NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select truncate(10.000000000001e1, 20)/2 as t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` double(41,24) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select truncate(10.000000000001e1, 28)/2 as t;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `t` double DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table if exists t1;
+#
# End of 10.2 tests
#
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index 1942d07c9ab..5221973702d 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -700,10 +700,10 @@ select .7777777777777777777777777777777777777 *
1000000000000000000;
.7777777777777777777777777777777777777 *
1000000000000000000
-777777777777777777.777777777777777777700000000000
+777777777777777777.7777777777777777777000000000000000000
select .7777777777777777777777777777777777777 - 0.1;
.7777777777777777777777777777777777777 - 0.1
-0.677777777777777777777777777778
+0.6777777777777777777777777777777777777
select .343434343434343434 + .343434343434343434;
.343434343434343434 + .343434343434343434
0.686868686868686868
@@ -758,12 +758,12 @@ round(99999999999999999.999,3)
select round(-99999999999999999.999,3);
round(-99999999999999999.999,3)
-99999999999999999.999
-select truncate(99999999999999999999999999999999999999,31);
-truncate(99999999999999999999999999999999999999,31)
-99999999999999999999999999999999999999.000000000000000000000000000000
-select truncate(99.999999999999999999999999999999999999,31);
-truncate(99.999999999999999999999999999999999999,31)
-99.999999999999999999999999999999
+select truncate(99999999999999999999999999999999999999,49);
+truncate(99999999999999999999999999999999999999,49)
+99999999999999999999999999999999999999.000000000000000000000000000000000000
+select truncate(99.999999999999999999999999999999999999,49);
+truncate(99.999999999999999999999999999999999999,49)
+99.99999999999999999999999999999999999900
select truncate(99999999999999999999999999999999999999,-31);
truncate(99999999999999999999999999999999999999,-31)
99999990000000000000000000000000000000
@@ -889,7 +889,7 @@ create table t1 (col1 int, col2 decimal(30,25), col3 numeric(30,25));
insert into t1 values (1,0.0123456789012345678912345,0.0123456789012345678912345);
select col2/9999999999 from t1 where col1=1;
col2/9999999999
-0.000000000001234567890246913578
+0.00000000000123456789024691357814814136
select 9999999999/col2 from t1 where col1=1;
9999999999/col2
810000007209.000065537105051
@@ -924,10 +924,12 @@ select cast(ln(14000) as decimal(2,3)) c1;
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '').
create table t1 (sl decimal(70,30));
ERROR 42000: Too big precision 70 specified for 'sl'. Maximum is 65.
-create table t1 (sl decimal(32,31));
-ERROR 42000: Too big scale 31 specified for 'sl'. Maximum is 30.
-create table t1 (sl decimal(0,38));
-ERROR 42000: Too big scale 38 specified for 'sl'. Maximum is 30.
+create table t1 (sl decimal(32,39));
+ERROR 42000: Too big scale 39 specified for 'sl'. Maximum is 38.
+create table t1 (sl decimal(67,38));
+ERROR 42000: Too big precision 67 specified for 'sl'. Maximum is 65.
+create table t1 (sl decimal(0,50));
+ERROR 42000: Too big scale 50 specified for 'sl'. Maximum is 38.
create table t1 (sl decimal(0,30));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'sl').
create table t1 (sl decimal(5, 5));
@@ -937,11 +939,11 @@ t1 CREATE TABLE `t1` (
`sl` decimal(5,5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
-create table t1 (sl decimal(65, 30));
+create table t1 (sl decimal(65, 38));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `sl` decimal(65,30) DEFAULT NULL
+ `sl` decimal(65,38) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (
@@ -1481,11 +1483,11 @@ CAST(1 AS decimal(65,10))
1.0000000000
SELECT CAST(1 AS decimal(66,10));
ERROR 42000: Too big precision 66 specified for '1'. Maximum is 65.
-SELECT CAST(1 AS decimal(65,30));
-CAST(1 AS decimal(65,30))
-1.000000000000000000000000000000
-SELECT CAST(1 AS decimal(65,31));
-ERROR 42000: Too big scale 31 specified for '1'. Maximum is 30.
+SELECT CAST(1 AS decimal(65,38));
+CAST(1 AS decimal(65,38))
+1.00000000000000000000000000000000000000
+SELECT CAST(1 AS decimal(65,39));
+ERROR 42000: Too big scale 39 specified for '1'. Maximum is 38.
CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa;
@@ -1493,8 +1495,8 @@ aa SUM(b)
2.000000000000000000000000000000 10
3.000000000000000000000000000000 10
4.000000000000000000000000000000 30
-SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa;
-ERROR 42000: Too big scale 31 specified for '1'. Maximum is 30.
+SELECT a+CAST(1 AS decimal(65,49)) AS aa, SUM(b) FROM t1 GROUP BY aa;
+ERROR 42000: Too big scale 49 specified for '1'. Maximum is 38.
DROP TABLE t1;
CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
@@ -1504,31 +1506,31 @@ SELECT 1 FROM t1 GROUP BY @b := @a, @b;
1
1
DROP TABLE t1;
-CREATE TABLE t1 SELECT 0.123456789012345678901234567890123456 AS f1;
+CREATE TABLE t1 SELECT 0.1234567890123456789012345678901234567890123456789 AS f1;
Warnings:
Note 1265 Data truncated for column 'f1' at row 1
DESC t1;
Field Type Null Key Default Extra
-f1 decimal(31,30) NO NULL
+f1 decimal(39,38) NO NULL
SELECT f1 FROM t1;
f1
-0.123456789012345678901234567890
+0.12345678901234567890123456789012345679
DROP TABLE t1;
CREATE TABLE t1 SELECT 123451234512345123451234512345123451234512345.678906789067890678906789067890678906789067890 AS f1;
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
DESC t1;
Field Type Null Key Default Extra
-f1 decimal(65,30) NO NULL
+f1 decimal(65,36) NO NULL
SELECT f1 FROM t1;
f1
-99999999999999999999999999999999999.999999999999999999999999999999
+99999999999999999999999999999.999999999999999999999999999999999999
DROP TABLE t1;
select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000);
(1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000)
-0.812988073953673124592306939480
+0.81298807395367312459230693948000000000
create table t1 as select 5.05 / 0.014;
Warnings:
Note 1265 Data truncated for column '5.05 / 0.014' at row 1
@@ -1623,30 +1625,30 @@ Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(30,30) NO NULL
+my_col decimal(38,38) NO NULL
SELECT my_col FROM t1;
my_col
-0.123456789123456789123456789123
+0.12345678912345678912345678912345678912
DROP TABLE t1;
CREATE TABLE t1 SELECT 1 + .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col;
Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) NO NULL
+my_col decimal(65,38) NO NULL
SELECT my_col FROM t1;
my_col
-1.123456789123456789123456789123
+1.12345678912345678912345678912345678912
DROP TABLE t1;
CREATE TABLE t1 SELECT 1 * .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col;
Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) NO NULL
+my_col decimal(65,38) NO NULL
SELECT my_col FROM t1;
my_col
-0.123456789123456789123456789123
+0.12345678912345678912345678912345678912
DROP TABLE t1;
CREATE TABLE t1 SELECT 1 / .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col;
Warnings:
@@ -1663,10 +1665,10 @@ Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) YES NULL
+my_col decimal(65,38) YES NULL
SELECT my_col FROM t1;
my_col
-0.012345687012345687012345687012
+0.01234568701234568701234568701234568701
DROP TABLE t1;
#
# Bug#45261: Crash, stored procedure + decimal
@@ -1727,30 +1729,30 @@ Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(65,30) NO NULL
+c1 decimal(65,36) NO NULL
SELECT * FROM t1;
c1
-99999999999999999999999999999999999.999999999999999999999999999999
+99999999999999999999999999999.999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.10000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 80 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(31,30) NO NULL
+c1 decimal(39,38) NO NULL
SELECT * FROM t1;
c1
-1.100000000000000000000000000000
+1.10000000000000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(31,30) NO NULL
+c1 decimal(39,38) NO NULL
SELECT * FROM t1;
c1
-1.100000000000000000000000000000
+1.10000000000000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
@@ -1759,10 +1761,10 @@ Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(30,30) NO NULL
+c1 decimal(38,38) NO NULL
SELECT * FROM t1;
c1
-0.100000000000000000000000000000
+0.10000000000000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 45 */ 123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345 /* 45 */
@@ -1771,10 +1773,10 @@ Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(65,30) NO NULL
+c1 decimal(65,36) NO NULL
SELECT * FROM t1;
c1
-99999999999999999999999999999999999.999999999999999999999999999999
+99999999999999999999999999999.999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 65 */ 12345678901234567890123456789012345678901234567890123456789012345.1 /* 1 */
@@ -1807,20 +1809,18 @@ Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(30,30) NO NULL
+c1 decimal(38,38) NO NULL
SELECT * FROM t1;
c1
-0.123456789012345678901234567890
+0.12345678901234567890123456789012345679
DROP TABLE t1;
CREATE TABLE t1 AS SELECT 123.1234567890123456789012345678901 /* 31 */ AS c1;
-Warnings:
-Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(33,30) NO NULL
+c1 decimal(34,31) NO NULL
SELECT * FROM t1;
c1
-123.123456789012345678901234567890
+123.1234567890123456789012345678901
DROP TABLE t1;
CREATE TABLE t1 SELECT 1.1 + CAST(1 AS DECIMAL(65,30)) AS c1;
DESC t1;
@@ -1836,22 +1836,20 @@ DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1;
-Warnings:
-Note 1265 Data truncated for column 'c1' at row 4
DESC t2;
Field Type Null Key Default Extra
-c1 decimal(33,30) YES NULL
+c1 decimal(33,31) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
-CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
+CREATE TABLE t2 SELECT IFNULL(a + 0.00000000000000000000000000000000000000000000000001, NULL) AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c1' at row 2
Note 1265 Data truncated for column 'c1' at row 3
DESC t2;
Field Type Null Key Default Extra
-c1 decimal(33,30) YES NULL
+c1 decimal(52,38) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
@@ -1860,7 +1858,7 @@ Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t2;
Field Type Null Key Default Extra
-c1 decimal(65,30) YES NULL
+c1 decimal(65,38) YES NULL
DROP TABLE t1,t2;
#
# Test that variables get maximum precision.
@@ -1869,10 +1867,10 @@ SET @decimal= 1.1;
CREATE TABLE t1 SELECT @decimal AS c1;
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(65,30) YES NULL
+c1 decimal(65,38) YES NULL
SELECT * FROM t1;
c1
-1.100000000000000000000000000000
+1.10000000000000000000000000000000000000
DROP TABLE t1;
#
# Bug #45261 : Crash, stored procedure + decimal
@@ -1990,7 +1988,7 @@ d1 * d2
DROP TABLE t1;
select 0.000000000000000000000000000000000000000000000000001 mod 1;
0.000000000000000000000000000000000000000000000000001 mod 1
-0.000000000000000000000000000000
+0.00000000000000000000000000000000000000
select 0.0000000001 mod 1;
0.0000000001 mod 1
0.0000000001
@@ -2153,3 +2151,28 @@ DROP TABLE t1;
#
# End of 10.1 tests
#
+#
+# Test CREATE .. SELECT
+
+create or replace table t1 as select 1.000000000000000000000000000000000 as a;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(34,33) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 as a;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(39,38) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+create or replace table t1 as select 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 as a;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` decimal(39,38) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index a38cf57189c..1fb509d3936 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -731,7 +731,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) DEFAULT NULL,
- `c2` decimal(65,30) DEFAULT NULL,
+ `c2` decimal(65,38) DEFAULT NULL,
`c3` longtext,
`c4` double DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1445,7 +1445,7 @@ Warnings:
Warning 1292 Truncated incorrect auto_increment_offset value: '0'
select @@default_storage_engine;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @@default_storage_engine 253 6 6 Y 0 31 8
+def @@default_storage_engine 253 6 6 Y 0 39 8
@@default_storage_engine
MyISAM
SET @old_server_id = @@GLOBAL.server_id;
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index b995fa730c0..47abc84ec57 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -1543,13 +1543,13 @@ SHOW FUNCTION STATUS LIKE 'fn1';
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
db_storedproc fn1 FUNCTION root@localhost <modified> <created> INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci
DROP FUNCTION IF EXISTS fn1;
-CREATE FUNCTION fn1( f1 DECIMAL(63, 31) ) RETURNS DECIMAL(63, 31)
+CREATE FUNCTION fn1( f1 DECIMAL(63, 61) ) RETURNS DECIMAL(63, 61)
LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
BEGIN
SET f1 = 1000000 + f1;
RETURN f1;
END//
-ERROR 42000: Too big scale 31 specified for 'f1'. Maximum is 30.
+ERROR 42000: Too big scale 61 specified for 'f1'. Maximum is 38.
SELECT fn1( 1.3326e+8 );
ERROR 42000: FUNCTION db_storedproc.fn1 does not exist
CREATE FUNCTION fn1( f1 DECIMAL(63, 30) ) RETURNS DECIMAL(63, 30)
@@ -5839,7 +5839,7 @@ fetch cur1 into e;
SELECT x, y, z, a, b, c, d, e;
close cur1;
END//
-ERROR 42000: Too big scale 255 specified for 'b'. Maximum is 30.
+ERROR 42000: Too big scale 255 specified for 'b'. Maximum is 38.
CALL sp6();
ERROR 42000: PROCEDURE db_storedproc.sp6 does not exist
DROP PROCEDURE IF EXISTS sp6;
diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test
index ca9dfcbbe2d..98385d42b22 100644
--- a/mysql-test/suite/funcs_1/t/storedproc.test
+++ b/mysql-test/suite/funcs_1/t/storedproc.test
@@ -417,9 +417,9 @@ DROP FUNCTION IF EXISTS fn1;
--enable_warnings
delimiter //;
-# 1425: Too big scale 63 specified for column ''. Maximum is 30.
+# 1425: Too big scale 63 specified for column ''. Maximum is 39.
--error ER_TOO_BIG_SCALE
-CREATE FUNCTION fn1( f1 DECIMAL(63, 31) ) RETURNS DECIMAL(63, 31)
+CREATE FUNCTION fn1( f1 DECIMAL(63, 61) ) RETURNS DECIMAL(63, 61)
LANGUAGE SQL NOT DETERMINISTIC SQL SECURITY INVOKER COMMENT 'this is simple'
BEGIN
SET f1 = 1000000 + f1;
diff --git a/mysql-test/suite/maria/ps_maria.result b/mysql-test/suite/maria/ps_maria.result
index c5defa8ae54..acd3ad72dfc 100644
--- a/mysql-test/suite/maria/ps_maria.result
+++ b/mysql-test/suite/maria/ps_maria.result
@@ -1154,15 +1154,15 @@ prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 Y 32928 0 63
-def select_type 253 19 6 N 1 31 8
-def table 253 64 2 Y 0 31 8
-def type 253 10 3 Y 0 31 8
-def possible_keys 253 4_OR_8_K 0 Y 0 31 8
-def key 253 64 0 Y 0 31 8
-def key_len 253 4_OR_8_K 0 Y 0 31 8
-def ref 253 2048 0 Y 0 31 8
+def select_type 253 19 6 N 1 39 8
+def table 253 64 2 Y 0 39 8
+def type 253 10 3 Y 0 39 8
+def possible_keys 253 4_OR_8_K 0 Y 0 39 8
+def key 253 64 0 Y 0 39 8
+def key_len 253 4_OR_8_K 0 Y 0 39 8
+def ref 253 2048 0 Y 0 39 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 253 255 0 N 1 39 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
drop table if exists t2 ;
@@ -1779,7 +1779,7 @@ t5 CREATE TABLE `t5` (
`const01` int(1) NOT NULL,
`param01` bigint(20) DEFAULT NULL,
`const02` decimal(2,1) NOT NULL,
- `param02` decimal(65,30) DEFAULT NULL,
+ `param02` decimal(65,38) DEFAULT NULL,
`const03` double NOT NULL,
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
@@ -1800,7 +1800,7 @@ t5 CREATE TABLE `t5` (
`param11` bigint(20) DEFAULT NULL,
`const12` binary(0) DEFAULT NULL,
`param12` bigint(20) DEFAULT NULL,
- `param13` decimal(65,30) DEFAULT NULL,
+ `param13` decimal(65,38) DEFAULT NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
@@ -1809,7 +1809,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is
def test t5 t5 const01 const01 3 1 1 N 36865 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 246 4 3 N 36865 1 63
-def test t5 t5 param02 param02 246 67 32 Y 32768 30 63
+def test t5 t5 param02 param02 246 67 40 Y 32768 38 63
def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
@@ -1830,13 +1830,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
-def test t5 t5 param13 param13 246 67 0 Y 32768 30 63
+def test t5 t5 param13 param13 246 67 0 Y 32768 38 63
def test t5 t5 param14 param14 252 4294967295 0 Y 16 0 8
def test t5 t5 param15 param15 252 4294967295 0 Y 144 0 63
const01 8
param01 8
const02 8.0
-param02 8.000000000000000000000000000000
+param02 8.00000000000000000000000000000000000000
const03 8
param03 8
const04 abc
@@ -1928,28 +1928,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@@ -1975,28 +1975,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select
@@ -2025,28 +2025,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2065,28 +2065,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select ? := c1 from t9 where c1= 1" ;
@@ -2113,28 +2113,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2157,28 +2157,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
@@ -2203,28 +2203,28 @@ def @arg07 5 23 1 Y 32896 31 63
def @arg08 5 23 1 Y 32896 31 63
def @arg09 5 23 1 Y 32896 31 63
def @arg10 5 23 1 Y 32896 31 63
-def @arg11 246 83 6 Y 32896 30 63
-def @arg12 246 83 6 Y 32896 30 63
-def @arg13 250 16777215 10 Y 0 31 8
-def @arg14 250 16777215 19 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 8 Y 0 31 8
+def @arg11 246 83 6 Y 32896 38 63
+def @arg12 246 83 6 Y 32896 38 63
+def @arg13 250 16777215 10 Y 0 39 8
+def @arg14 250 16777215 19 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 8 Y 0 39 8
def @arg17 8 20 4 Y 32928 0 63
def @arg18 8 20 1 Y 32896 0 63
def @arg19 8 20 1 Y 32896 0 63
-def @arg20 250 16777215 1 Y 0 31 8
-def @arg21 250 16777215 10 Y 0 31 8
-def @arg22 250 16777215 30 Y 0 31 8
-def @arg23 250 16777215 8 Y 128 31 63
-def @arg24 250 16777215 8 Y 0 31 8
-def @arg25 250 16777215 4 Y 128 31 63
-def @arg26 250 16777215 4 Y 0 31 8
-def @arg27 250 16777215 10 Y 128 31 63
-def @arg28 250 16777215 10 Y 0 31 8
-def @arg29 250 16777215 8 Y 128 31 63
-def @arg30 250 16777215 8 Y 0 31 8
-def @arg31 250 16777215 3 Y 0 31 8
-def @arg32 250 16777215 6 Y 0 31 8
+def @arg20 250 16777215 1 Y 0 39 8
+def @arg21 250 16777215 10 Y 0 39 8
+def @arg22 250 16777215 30 Y 0 39 8
+def @arg23 250 16777215 8 Y 128 39 63
+def @arg24 250 16777215 8 Y 0 39 8
+def @arg25 250 16777215 4 Y 128 39 63
+def @arg26 250 16777215 4 Y 0 39 8
+def @arg27 250 16777215 10 Y 128 39 63
+def @arg28 250 16777215 10 Y 0 39 8
+def @arg29 250 16777215 8 Y 128 39 63
+def @arg30 250 16777215 8 Y 0 39 8
+def @arg31 250 16777215 3 Y 0 39 8
+def @arg32 250 16777215 6 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
@@ -2241,28 +2241,28 @@ def @arg07 5 23 0 Y 32896 31 63
def @arg08 5 23 0 Y 32896 31 63
def @arg09 5 23 0 Y 32896 31 63
def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
+def @arg11 246 83 0 Y 32896 38 63
+def @arg12 246 83 0 Y 32896 38 63
+def @arg13 250 16777215 0 Y 0 39 8
+def @arg14 250 16777215 0 Y 0 39 8
+def @arg15 250 16777215 19 Y 0 39 8
+def @arg16 250 16777215 0 Y 0 39 8
def @arg17 8 20 0 Y 32928 0 63
def @arg18 8 20 0 Y 32896 0 63
def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
+def @arg20 250 16777215 0 Y 0 39 8
+def @arg21 250 16777215 0 Y 0 39 8
+def @arg22 250 16777215 0 Y 0 39 8
+def @arg23 250 16777215 0 Y 128 39 63
+def @arg24 250 16777215 0 Y 0 39 8
+def @arg25 250 16777215 0 Y 128 39 63
+def @arg26 250 16777215 0 Y 0 39 8
+def @arg27 250 16777215 0 Y 128 39 63
+def @arg28 250 16777215 0 Y 0 39 8
+def @arg29 250 16777215 0 Y 128 39 63
+def @arg30 250 16777215 0 Y 0 39 8
+def @arg31 250 16777215 0 Y 0 39 8
+def @arg32 250 16777215 0 Y 0 39 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
diff --git a/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result b/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result
index 21c00c65eab..570824f8df6 100644
--- a/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result
+++ b/mysql-test/suite/sys_vars/r/div_precision_increment_basic.result
@@ -65,18 +65,18 @@ SELECT @@session.div_precision_increment;
@@session.div_precision_increment
30
'#------------------FN_DYNVARS_027_05-----------------------#'
-SET @@global.div_precision_increment = 31;
+SET @@global.div_precision_increment = 39;
Warnings:
-Warning 1292 Truncated incorrect div_precision_increment value: '31'
+Warning 1292 Truncated incorrect div_precision_increment value: '39'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
-30
-SET @@global.div_precision_increment = 40;
+38
+SET @@global.div_precision_increment = 50;
Warnings:
-Warning 1292 Truncated incorrect div_precision_increment value: '40'
+Warning 1292 Truncated incorrect div_precision_increment value: '50'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
-30
+38
SET @@global.div_precision_increment = -1024;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '-1024'
@@ -88,19 +88,17 @@ Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '65536'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
-30
-SET @@session.div_precision_increment = 40;
+38
+SET @@session.div_precision_increment = 50;
Warnings:
-Warning 1292 Truncated incorrect div_precision_increment value: '40'
+Warning 1292 Truncated incorrect div_precision_increment value: '50'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
-30
-SET @@session.div_precision_increment = 31;
-Warnings:
-Warning 1292 Truncated incorrect div_precision_increment value: '31'
+38
+SET @@session.div_precision_increment = 37;
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
-30
+37
SET @@session.div_precision_increment = -2;
Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '-2'
@@ -112,27 +110,27 @@ Warnings:
Warning 1292 Truncated incorrect div_precision_increment value: '65550'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
-30
+38
SET @@global.div_precision_increment = 65530.30;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
-30
+38
SET @@global.div_precision_increment = OFF;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@global.div_precision_increment;
@@global.div_precision_increment
-30
+38
SET @@session.div_precision_increment = ON;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
-30
+38
SET @@session.div_precision_increment = 65530.30;
ERROR 42000: Incorrect argument type to variable 'div_precision_increment'
SELECT @@session.div_precision_increment;
@@session.div_precision_increment
-30
+38
'#------------------FN_DYNVARS_027_06-----------------------#'
SELECT @@global.div_precision_increment = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 6dca5206946..addd4c45be6 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -690,7 +690,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 30
+NUMERIC_MAX_VALUE 38
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 16205792031..e075c64c2c1 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -704,7 +704,7 @@ VARIABLE_SCOPE SESSION
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT Precision of the result of '/' operator will be increased on that value
NUMERIC_MIN_VALUE 0
-NUMERIC_MAX_VALUE 30
+NUMERIC_MAX_VALUE 38
NUMERIC_BLOCK_SIZE 1
ENUM_VALUE_LIST NULL
READ_ONLY NO
diff --git a/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test b/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test
index 65edf6dd76f..97f0e0eab81 100644
--- a/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test
+++ b/mysql-test/suite/sys_vars/t/div_precision_increment_basic.test
@@ -98,17 +98,17 @@ SELECT @@session.div_precision_increment;
# Change the value of div_precision_increment to an invalid value #
###################################################################
-SET @@global.div_precision_increment = 31;
+SET @@global.div_precision_increment = 39;
SELECT @@global.div_precision_increment;
-SET @@global.div_precision_increment = 40;
+SET @@global.div_precision_increment = 50;
SELECT @@global.div_precision_increment;
SET @@global.div_precision_increment = -1024;
SELECT @@global.div_precision_increment;
SET @@global.div_precision_increment = 65536;
SELECT @@global.div_precision_increment;
-SET @@session.div_precision_increment = 40;
+SET @@session.div_precision_increment = 50;
SELECT @@session.div_precision_increment;
-SET @@session.div_precision_increment = 31;
+SET @@session.div_precision_increment = 37;
SELECT @@session.div_precision_increment;
SET @@session.div_precision_increment = -2;
SELECT @@session.div_precision_increment;
diff --git a/mysql-test/t/dyncol.test b/mysql-test/t/dyncol.test
index 03e2345ba1c..9203caa4243 100644
--- a/mysql-test/t/dyncol.test
+++ b/mysql-test/t/dyncol.test
@@ -661,7 +661,7 @@ select column_get(column_create(1, "18446744073709552001" as char), 1 as int);
--echo # mysqld
--echo #
--error ER_TOO_BIG_SCALE
-SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,34));
+SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,50));
--echo #
--echo # test of symbolic names
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index ec0256beeef..f54eacf0595 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -510,5 +510,29 @@ SELECT * FROM t1;
DROP TABLE t1,t2;
--echo #
+--echo # Test of using wrong scale
+--echo #
+
+create or replace table t1 (a double(40,30));
+--error ER_TOO_BIG_SCALE 1425
+create or replace table t1 (a double(40,31));
+create or replace table t1 as select 1.01e1;
+show create table t1;
+create or replace table t1 as select truncate(10.000000000001e1, 30) as t;
+show create table t1;
+create or replace table t1 as select truncate(10.000000000001e1, 31) as t;
+show create table t1;
+create or replace table t1 as select truncate(10.000000000001e1, 39) as t;
+show create table t1;
+create or replace table t1 as select truncate(10.000000000001e1, 51) as t;
+show create table t1;
+create or replace table t1 as select truncate(10.000000000001e1, 20)/2 as t;
+show create table t1;
+create or replace table t1 as select truncate(10.000000000001e1, 28)/2 as t;
+show create table t1;
+
+drop table if exists t1;
+
+--echo #
--echo # End of 10.2 tests
--echo #
diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test
index 86066309acc..80687fc4461 100644
--- a/mysql-test/t/type_newdecimal.test
+++ b/mysql-test/t/type_newdecimal.test
@@ -606,14 +606,14 @@ select round(99999999999999999.999,3);
select round(-99999999999999999.999,3);
#-- should return -100000000000000000.000
#
-select truncate(99999999999999999999999999999999999999,31);
+select truncate(99999999999999999999999999999999999999,49);
#-- should return 99999999999999999999999999999999999999.000
#
-select truncate(99.999999999999999999999999999999999999,31);
+select truncate(99.999999999999999999999999999999999999,49);
#-- should return 99.9999999999999999999999999999999
#
select truncate(99999999999999999999999999999999999999,-31);
-# should return 90000000000000000000000000000000
+# should return 99999990000000000000000000000000000000
#
#-- 6. Set functions (AVG, SUM, COUNT) should work.
#
@@ -959,16 +959,18 @@ select cast(ln(14000) as decimal(2,3)) c1;
--error 1426
create table t1 (sl decimal(70,30));
--error 1425
-create table t1 (sl decimal(32,31));
+create table t1 (sl decimal(32,39));
+--error 1426
+create table t1 (sl decimal(67,38));
--error 1425
-create table t1 (sl decimal(0,38));
+create table t1 (sl decimal(0,50));
--error 1427
create table t1 (sl decimal(0,30));
create table t1 (sl decimal(5, 5));
show create table t1;
drop table t1;
# Test limits
-create table t1 (sl decimal(65, 30));
+create table t1 (sl decimal(65, 38));
show create table t1;
drop table t1;
@@ -1180,15 +1182,15 @@ SELECT CAST(1 AS decimal(65,10));
--error ER_TOO_BIG_PRECISION
SELECT CAST(1 AS decimal(66,10));
-SELECT CAST(1 AS decimal(65,30));
+SELECT CAST(1 AS decimal(65,38));
--error ER_TOO_BIG_SCALE
-SELECT CAST(1 AS decimal(65,31));
+SELECT CAST(1 AS decimal(65,39));
CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa;
--error ER_TOO_BIG_SCALE
-SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa;
+SELECT a+CAST(1 AS decimal(65,49)) AS aa, SUM(b) FROM t1 GROUP BY aa;
DROP TABLE t1;
@@ -1213,7 +1215,7 @@ DROP TABLE t1;
# maxmimum precision of 30 places after the decimal point. Show that
# temp field creation beyond that works and throws a truncation warning.
# DECIMAL(37,36) should be adjusted to DECIMAL(31,30).
-CREATE TABLE t1 SELECT 0.123456789012345678901234567890123456 AS f1;
+CREATE TABLE t1 SELECT 0.1234567890123456789012345678901234567890123456789 AS f1;
DESC t1;
SELECT f1 FROM t1;
DROP TABLE t1;
@@ -1421,7 +1423,7 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
-CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
+CREATE TABLE t2 SELECT IFNULL(a + 0.00000000000000000000000000000000000000000000000001, NULL) AS c1 FROM t1;
DESC t2;
DROP TABLE t1,t2;
@@ -1687,3 +1689,20 @@ DROP TABLE t1;
--echo #
--echo # End of 10.1 tests
--echo #
+
+--echo #
+--echo # Test CREATE .. SELECT
+--echo
+
+create or replace table t1 as select 1.000000000000000000000000000000000 as a;
+show create table t1;
+create or replace table t1 as select 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 as a;
+show create table t1;
+create or replace table t1 as select 1.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 as a;
+show create table t1;
+
+drop table t1;
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/sql/field.cc b/sql/field.cc
index a5d2d759edc..0e2bc724db0 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -4435,13 +4435,13 @@ String *Field_float::val_str(String *val_buffer,
char *to=(char*) val_buffer->ptr();
size_t len;
- if (dec >= NOT_FIXED_DEC)
+ if (dec >= FLOATING_POINT_DECIMALS)
len= my_gcvt(nr, MY_GCVT_ARG_FLOAT, to_length - 1, to, NULL);
else
{
/*
We are safe here because the buffer length is 70, and
- fabs(float) < 10^39, dec < NOT_FIXED_DEC. So the resulting string
+ fabs(float) < 10^39, dec < FLOATING_POINT_DECIMALS. So the resulting string
will be not longer than 69 chars + terminating '\0'.
*/
len= my_fcvt(nr, dec, to, NULL);
@@ -4525,7 +4525,7 @@ int Field_float::do_save_field_metadata(uchar *metadata_ptr)
void Field_float::sql_type(String &res) const
{
- if (dec == NOT_FIXED_DEC)
+ if (dec >= FLOATING_POINT_DECIMALS)
{
res.set_ascii(STRING_WITH_LEN("float"));
}
@@ -4606,7 +4606,7 @@ int truncate_double(double *nr, uint field_length, uint dec,
return 1;
}
- if (dec < NOT_FIXED_DEC)
+ if (dec < FLOATING_POINT_DECIMALS)
{
uint order= field_length - dec;
uint step= array_elements(log_10) - 1;
@@ -4788,7 +4788,7 @@ String *Field_double::val_str(String *val_buffer,
char *to=(char*) val_buffer->ptr();
size_t len;
- if (dec >= NOT_FIXED_DEC)
+ if (dec >= FLOATING_POINT_DECIMALS)
len= my_gcvt(nr, MY_GCVT_ARG_DOUBLE, to_length - 1, to, NULL);
else
len= my_fcvt(nr, dec, to, NULL);
@@ -4847,7 +4847,7 @@ int Field_double::do_save_field_metadata(uchar *metadata_ptr)
void Field_double::sql_type(String &res) const
{
CHARSET_INFO *cs=res.charset();
- if (dec == NOT_FIXED_DEC)
+ if (dec >= FLOATING_POINT_DECIMALS)
{
res.set_ascii(STRING_WITH_LEN("double"));
}
@@ -9772,13 +9772,6 @@ bool Column_definition::check(THD *thd)
if (length > MAX_FIELD_BLOBLENGTH)
{
my_error(ER_TOO_BIG_DISPLAYWIDTH, MYF(0), field_name, MAX_FIELD_BLOBLENGTH);
- DBUG_RETURN(1);
- }
-
- if (decimals >= NOT_FIXED_DEC)
- {
- my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
- field_name, static_cast<ulong>(NOT_FIXED_DEC - 1));
DBUG_RETURN(TRUE);
}
@@ -9797,7 +9790,7 @@ bool Column_definition::check(THD *thd)
def->decimals < length))
{
my_error(ER_INVALID_DEFAULT, MYF(0), field_name);
- DBUG_RETURN(1);
+ DBUG_RETURN(TRUE);
}
else if (def->type() == Item::NULL_ITEM)
{
@@ -9811,7 +9804,7 @@ bool Column_definition::check(THD *thd)
else if (flags & AUTO_INCREMENT_FLAG)
{
my_error(ER_INVALID_DEFAULT, MYF(0), field_name);
- DBUG_RETURN(1);
+ DBUG_RETURN(TRUE);
}
}
@@ -9839,7 +9832,7 @@ bool Column_definition::check(THD *thd)
on_update->decimals < length))
{
my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name);
- DBUG_RETURN(1);
+ DBUG_RETURN(TRUE);
}
sign_len= flags & UNSIGNED_FLAG ? 0 : 1;
@@ -9873,6 +9866,12 @@ bool Column_definition::check(THD *thd)
case MYSQL_TYPE_NULL:
break;
case MYSQL_TYPE_NEWDECIMAL:
+ if (decimals >= NOT_FIXED_DEC)
+ {
+ my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
+ field_name, static_cast<ulong>(NOT_FIXED_DEC - 1));
+ DBUG_RETURN(TRUE);
+ }
my_decimal_trim(&length, &decimals);
if (length > DECIMAL_MAX_PRECISION)
{
@@ -9952,6 +9951,12 @@ bool Column_definition::check(THD *thd)
my_error(ER_M_BIGGER_THAN_D, MYF(0), field_name);
DBUG_RETURN(TRUE);
}
+ if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
+ {
+ my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
+ field_name, static_cast<ulong>(FLOATING_POINT_DECIMALS-1));
+ DBUG_RETURN(TRUE);
+ }
break;
case MYSQL_TYPE_DOUBLE:
allowed_type_modifier= AUTO_INCREMENT_FLAG;
@@ -9966,6 +9971,12 @@ bool Column_definition::check(THD *thd)
my_error(ER_M_BIGGER_THAN_D, MYF(0), field_name);
DBUG_RETURN(TRUE);
}
+ if (decimals != NOT_FIXED_DEC && decimals >= FLOATING_POINT_DECIMALS)
+ {
+ my_error(ER_TOO_BIG_SCALE, MYF(0), static_cast<ulonglong>(decimals),
+ field_name, static_cast<ulong>(FLOATING_POINT_DECIMALS-1));
+ DBUG_RETURN(TRUE);
+ }
break;
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_TIMESTAMP2:
@@ -10280,19 +10291,29 @@ Field *make_field(TABLE_SHARE *share,
f_is_zerofill(pack_flag) != 0,
f_is_dec(pack_flag) == 0);
case MYSQL_TYPE_FLOAT:
+ {
+ int decimals= f_decimals(pack_flag);
+ if (decimals == FLOATING_POINT_DECIMALS)
+ decimals= NOT_FIXED_DEC;
return new (mem_root)
Field_float(ptr,field_length,null_pos,null_bit,
unireg_check, field_name,
- f_decimals(pack_flag),
+ decimals,
f_is_zerofill(pack_flag) != 0,
f_is_dec(pack_flag)== 0);
+ }
case MYSQL_TYPE_DOUBLE:
+ {
+ int decimals= f_decimals(pack_flag);
+ if (decimals == FLOATING_POINT_DECIMALS)
+ decimals= NOT_FIXED_DEC;
return new (mem_root)
Field_double(ptr,field_length,null_pos,null_bit,
unireg_check, field_name,
- f_decimals(pack_flag),
+ decimals,
f_is_zerofill(pack_flag) != 0,
f_is_dec(pack_flag)== 0);
+ }
case MYSQL_TYPE_TINY:
return new (mem_root)
Field_tiny(ptr,field_length,null_pos,null_bit,
@@ -10459,6 +10480,15 @@ Column_definition::Column_definition(THD *thd, Field *old_field,
buff, "YEAR(4)");
}
break;
+ case MYSQL_TYPE_FLOAT:
+ case MYSQL_TYPE_DOUBLE:
+ /*
+ Floating points are stored with FLOATING_POINT_DECIMALS but internally
+ in MariaDB used with NOT_FIXED_DEC, which is >= FLOATING_POINT_DECIMALS.
+ */
+ if (decimals >= FLOATING_POINT_DECIMALS)
+ decimals= NOT_FIXED_DEC;
+ break;
default:
break;
}
diff --git a/sql/field.h b/sql/field.h
index 736c51c2ac3..27b87dd0472 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -51,7 +51,6 @@ enum enum_check_fields
CHECK_FIELD_ERROR_FOR_NULL
};
-
/*
Common declarations for Field and Item
*/
@@ -1699,7 +1698,7 @@ public:
uint8 dec_arg, bool zero_arg, bool unsigned_arg)
:Field_num(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg,
field_name_arg, dec_arg, zero_arg, unsigned_arg),
- not_fixed(dec_arg >= NOT_FIXED_DEC)
+ not_fixed(dec_arg >= FLOATING_POINT_DECIMALS)
{}
Item_result result_type () const { return REAL_RESULT; }
Copy_func *get_copy_func(const Field *from) const
@@ -2062,12 +2061,18 @@ public:
:Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg,
dec_arg, zero_arg, unsigned_arg)
- {}
+ {
+ if (dec_arg >= FLOATING_POINT_DECIMALS)
+ dec_arg= NOT_FIXED_DEC;
+ }
Field_float(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg,
uint8 dec_arg)
:Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "": 0, (uint) 0,
NONE, field_name_arg, dec_arg, 0, 0)
- {}
+ {
+ if (dec_arg >= FLOATING_POINT_DECIMALS)
+ dec_arg= NOT_FIXED_DEC;
+ }
enum_field_types type() const { return MYSQL_TYPE_FLOAT;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_FLOAT; }
int store(const char *to,uint length,CHARSET_INFO *charset);
@@ -2097,17 +2102,27 @@ public:
:Field_real(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_check_arg, field_name_arg,
dec_arg, zero_arg, unsigned_arg)
- {}
+ {
+ if (dec_arg >= FLOATING_POINT_DECIMALS)
+ dec_arg= NOT_FIXED_DEC;
+ }
Field_double(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg,
uint8 dec_arg)
:Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0,
NONE, field_name_arg, dec_arg, 0, 0)
- {}
+ {
+ if (dec_arg >= FLOATING_POINT_DECIMALS)
+ dec_arg= NOT_FIXED_DEC;
+ }
Field_double(uint32 len_arg, bool maybe_null_arg, const char *field_name_arg,
uint8 dec_arg, bool not_fixed_arg)
:Field_real((uchar*) 0, len_arg, maybe_null_arg ? (uchar*) "" : 0, (uint) 0,
NONE, field_name_arg, dec_arg, 0, 0)
- {not_fixed= not_fixed_arg; }
+ {
+ not_fixed= not_fixed_arg;
+ if (dec_arg >= FLOATING_POINT_DECIMALS)
+ dec_arg= NOT_FIXED_DEC;
+ }
enum_field_types type() const { return MYSQL_TYPE_DOUBLE;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_DOUBLE; }
int store(const char *to,uint length,CHARSET_INFO *charset);
@@ -2898,7 +2913,7 @@ new_Field_timestamp(MEM_ROOT *root,uchar *ptr, uchar *null_ptr, uchar null_bit,
return new (root)
Field_timestamp(ptr, MAX_DATETIME_WIDTH, null_ptr,
null_bit, unireg_check, field_name, share);
- if (dec == NOT_FIXED_DEC)
+ if (dec >= FLOATING_POINT_DECIMALS)
dec= MAX_DATETIME_PRECISION;
return new (root)
Field_timestamp_hires(ptr, null_ptr, null_bit, unireg_check,
@@ -2914,7 +2929,7 @@ new_Field_time(MEM_ROOT *root, uchar *ptr, uchar *null_ptr, uchar null_bit,
return new (root)
Field_time(ptr, MIN_TIME_WIDTH, null_ptr, null_bit, unireg_check,
field_name);
- if (dec == NOT_FIXED_DEC)
+ if (dec >= FLOATING_POINT_DECIMALS)
dec= MAX_DATETIME_PRECISION;
return new (root)
Field_time_hires(ptr, null_ptr, null_bit, unireg_check, field_name, dec);
@@ -2929,7 +2944,7 @@ new_Field_datetime(MEM_ROOT *root, uchar *ptr, uchar *null_ptr, uchar null_bit,
return new (root)
Field_datetime(ptr, MAX_DATETIME_WIDTH, null_ptr, null_bit,
unireg_check, field_name);
- if (dec == NOT_FIXED_DEC)
+ if (dec >= FLOATING_POINT_DECIMALS)
dec= MAX_DATETIME_PRECISION;
return new (root)
Field_datetime_hires(ptr, null_ptr, null_bit,
@@ -3886,7 +3901,7 @@ int convert_null_to_field_value_or_error(Field *field);
#define FIELDFLAG_HEX_ESCAPE ((uint) 0x10000)
#define FIELDFLAG_PACK_SHIFT 3
#define FIELDFLAG_DEC_SHIFT 8
-#define FIELDFLAG_MAX_DEC 31
+#define FIELDFLAG_MAX_DEC 63
#define FIELDFLAG_NUM_SCREEN_TYPE 0x7F01
#define FIELDFLAG_ALFA_SCREEN_TYPE 0x7800
diff --git a/sql/item.h b/sql/item.h
index 674ff6e99dc..20e5572e35e 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1107,7 +1107,7 @@ public:
virtual Item *clone_item(THD *thd) { return 0; }
virtual cond_result eq_cmp_result() const { return COND_OK; }
inline uint float_length(uint decimals_par) const
- { return decimals != NOT_FIXED_DEC ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
+ { return decimals < FLOATING_POINT_DECIMALS ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;}
/* Returns total number of decimal digits */
virtual uint decimal_precision() const;
/* Returns the number of integer part digits only */
diff --git a/sql/item_func.cc b/sql/item_func.cc
index c6a3459848e..4f2f400584b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -646,14 +646,15 @@ void Item_func::count_real_length(Item **items, uint nitems)
unsigned_flag= false;
for (uint i=0 ; i < nitems ; i++)
{
- if (decimals != NOT_FIXED_DEC)
+ if (decimals < FLOATING_POINT_DECIMALS)
{
set_if_bigger(decimals, items[i]->decimals);
+ /* Will be ignored if items[i]->decimals >= FLOATING_POINT_DECIMALS */
set_if_bigger(length, (items[i]->max_length - items[i]->decimals));
}
set_if_bigger(max_length, items[i]->max_length);
}
- if (decimals != NOT_FIXED_DEC)
+ if (decimals < FLOATING_POINT_DECIMALS)
{
max_length= length;
length+= decimals;
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index f774ee5a561..f7e02bc55f9 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -1624,7 +1624,8 @@ void Item_sum_avg::fix_length_and_dec()
}
else
{
- decimals= MY_MIN(args[0]->decimals + prec_increment, NOT_FIXED_DEC);
+ decimals= MY_MIN(args[0]->decimals + prec_increment,
+ FLOATING_POINT_DECIMALS);
max_length= MY_MIN(args[0]->max_length + prec_increment, float_length(decimals));
}
}
@@ -1839,13 +1840,14 @@ void Item_sum_variance::fix_length_and_dec()
switch (args[0]->result_type()) {
case REAL_RESULT:
case STRING_RESULT:
- decimals= MY_MIN(args[0]->decimals + 4, NOT_FIXED_DEC);
+ decimals= MY_MIN(args[0]->decimals + 4, FLOATING_POINT_DECIMALS);
break;
case INT_RESULT:
case DECIMAL_RESULT:
{
int precision= args[0]->decimal_precision()*2 + prec_increment;
- decimals= MY_MIN(args[0]->decimals + prec_increment, DECIMAL_MAX_SCALE);
+ decimals= MY_MIN(args[0]->decimals + prec_increment,
+ FLOATING_POINT_DECIMALS-1);
max_length= my_decimal_precision_to_length_no_truncation(precision,
decimals,
unsigned_flag);
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 6469581b482..608ec553da0 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -759,6 +759,10 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
Send_field field;
item->make_field(thd, &field);
+ /* limit number of decimals for float and double */
+ if (field.type == MYSQL_TYPE_FLOAT || field.type == MYSQL_TYPE_DOUBLE)
+ set_if_smaller(field.decimals, FLOATING_POINT_DECIMALS);
+
/* Keep things compatible for old clients */
if (field.type == MYSQL_TYPE_VARCHAR)
field.type= MYSQL_TYPE_VAR_STRING;
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index b2bc9fc2e87..91a80c552cb 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -409,7 +409,7 @@ void field_real::add()
if (num == 0.0)
empty++;
- if ((decs = decimals()) == NOT_FIXED_DEC)
+ if ((decs = decimals()) >= FLOATING_POINT_DECIMALS)
{
length= sprintf(buff, "%g", num);
if (rint(num) != num)
@@ -892,7 +892,7 @@ void field_real::get_opt_type(String *answer,
if (!max_notzero_dec_len)
{
- int len= (int) max_length - ((item->decimals == NOT_FIXED_DEC) ?
+ int len= (int) max_length - ((item->decimals >= FLOATING_POINT_DECIMALS) ?
0 : (item->decimals + 1));
if (min_arg >= -128 && max_arg <= (min_arg >= 0 ? 255 : 127))
@@ -912,7 +912,7 @@ void field_real::get_opt_type(String *answer,
if (min_arg >= 0)
answer->append(STRING_WITH_LEN(" UNSIGNED"));
}
- else if (item->decimals == NOT_FIXED_DEC)
+ else if (item->decimals >= FLOATING_POINT_DECIMALS)
{
if (min_arg >= -FLT_MAX && max_arg <= FLT_MAX)
answer->append(STRING_WITH_LEN("FLOAT"));
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index 40339d599af..767154e019d 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -136,7 +136,7 @@ bool String::set_real(double num,uint decimals, CHARSET_INFO *cs)
size_t len;
str_charset=cs;
- if (decimals >= NOT_FIXED_DEC)
+ if (decimals >= FLOATING_POINT_DECIMALS)
{
len= my_gcvt(num, MY_GCVT_ARG_DOUBLE, sizeof(buff) - 1, buff, NULL);
return copy(buff, len, &my_charset_latin1, cs, &dummy_errors);
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 60bfe7cd1aa..6cd73978eed 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2876,7 +2876,8 @@ int prepare_create_field(Column_definition *sql_field,
uint *blob_columns,
longlong table_flags)
{
- unsigned int dup_val_count;
+ uint dup_val_count;
+ uint decimals= sql_field->decimals;
DBUG_ENTER("prepare_create_field");
/*
@@ -2994,8 +2995,18 @@ int prepare_create_field(Column_definition *sql_field,
FIELDFLAG_DECIMAL) |
(sql_field->flags & ZEROFILL_FLAG ?
FIELDFLAG_ZEROFILL : 0) |
- (sql_field->decimals << FIELDFLAG_DEC_SHIFT));
+ (decimals << FIELDFLAG_DEC_SHIFT));
break;
+ case MYSQL_TYPE_FLOAT:
+ case MYSQL_TYPE_DOUBLE:
+ /*
+ User specified FLOAT() or DOUBLE() without precision. Change to
+ FLOATING_POINT_DECIMALS to keep things compatible with earlier MariaDB
+ versions.
+ */
+ if (decimals >= FLOATING_POINT_DECIMALS)
+ decimals= FLOATING_POINT_DECIMALS;
+ /* fall-trough */
case MYSQL_TYPE_TIMESTAMP:
case MYSQL_TYPE_TIMESTAMP2:
/* fall-through */
@@ -3006,7 +3017,7 @@ int prepare_create_field(Column_definition *sql_field,
(sql_field->flags & ZEROFILL_FLAG ?
FIELDFLAG_ZEROFILL : 0) |
f_settype((uint) sql_field->sql_type) |
- (sql_field->decimals << FIELDFLAG_DEC_SHIFT));
+ (decimals << FIELDFLAG_DEC_SHIFT));
break;
}
if (!(sql_field->flags & NOT_NULL_FLAG) ||
diff --git a/sql/table.cc b/sql/table.cc
index 13b6fbf9cce..208d5da37c7 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1633,6 +1633,10 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
bzero((char*) &comment, sizeof(comment));
}
+ /* Remove >32 decimals from old files */
+ if (share->mysql_version < 100200)
+ pack_flag&= ~(FIELDFLAG_LEFT_FULLSCREEN);
+
if (interval_nr && charset->mbminlen > 1)
{
/* Unescape UCS2 intervals from HEX notation */
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_decimal.result b/storage/tokudb/mysql-test/tokudb/r/type_decimal.result
index e307fc21891..b483c7a39de 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_decimal.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_decimal.result
@@ -814,10 +814,10 @@ c1
drop table t1;
SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
%
-0.012345687012345687012345687012
+0.01234568701234568701234568701234568701
SELECT MOD(1, .123456789123456789123456789123456789123456789123456789123456789123456789123456789) AS 'MOD()';
MOD()
-0.012345687012345687012345687012
+0.01234568701234568701234568701234568701
create table t1 (f1 decimal(6,6),f2 decimal(6,6) zerofill);
insert into t1 values (-0.123456,0.123456);
select group_concat(f1),group_concat(f2) from t1;
@@ -848,8 +848,8 @@ c
123456
SELECT ROUND( a, 100 ) AS c FROM t1 ORDER BY c;
c
-123456.000000000000000000000000000000
-123456.000000000000000000000000000000
+123456.00000000000000000000000000000000000000
+123456.00000000000000000000000000000000000000
CREATE TABLE t2( a NUMERIC, b INT );
INSERT INTO t2 VALUES (123456, 100);
SELECT TRUNCATE( a, b ) AS c FROM t2 ORDER BY c;
@@ -870,8 +870,8 @@ c
123456
SELECT ROUND( a, 100 ) AS c FROM t3 ORDER BY c;
c
-123456.000000000000000000000000000000
-123456.000000000000000000000000000000
+123456.00000000000000000000000000000000000000
+123456.00000000000000000000000000000000000000
CREATE TABLE t4( a DECIMAL, b INT );
INSERT INTO t4 VALUES (123456, 40), (123456, 40);
SELECT TRUNCATE( a, b ) AS c FROM t4 ORDER BY c;
@@ -884,8 +884,8 @@ c
123456
SELECT ROUND( a, 100 ) AS c FROM t4 ORDER BY c;
c
-123456.000000000000000000000000000000
-123456.000000000000000000000000000000
+123456.00000000000000000000000000000000000000
+123456.00000000000000000000000000000000000000
delete from t1;
INSERT INTO t1 VALUES (1234567890, 20), (999.99, 5);
Warnings:
diff --git a/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result b/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
index 7d5b555488e..5727b339eb8 100644
--- a/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
+++ b/storage/tokudb/mysql-test/tokudb/r/type_newdecimal.result
@@ -701,10 +701,10 @@ select .7777777777777777777777777777777777777 *
1000000000000000000;
.7777777777777777777777777777777777777 *
1000000000000000000
-777777777777777777.777777777777777777700000000000
+777777777777777777.7777777777777777777000000000000000000
select .7777777777777777777777777777777777777 - 0.1;
.7777777777777777777777777777777777777 - 0.1
-0.677777777777777777777777777778
+0.6777777777777777777777777777777777777
select .343434343434343434 + .343434343434343434;
.343434343434343434 + .343434343434343434
0.686868686868686868
@@ -759,12 +759,12 @@ round(99999999999999999.999,3)
select round(-99999999999999999.999,3);
round(-99999999999999999.999,3)
-99999999999999999.999
-select truncate(99999999999999999999999999999999999999,31);
-truncate(99999999999999999999999999999999999999,31)
-99999999999999999999999999999999999999.000000000000000000000000000000
-select truncate(99.999999999999999999999999999999999999,31);
-truncate(99.999999999999999999999999999999999999,31)
-99.999999999999999999999999999999
+select truncate(99999999999999999999999999999999999999,49);
+truncate(99999999999999999999999999999999999999,49)
+99999999999999999999999999999999999999.000000000000000000000000000000000000
+select truncate(99.999999999999999999999999999999999999,49);
+truncate(99.999999999999999999999999999999999999,49)
+99.99999999999999999999999999999999999900
select truncate(99999999999999999999999999999999999999,-31);
truncate(99999999999999999999999999999999999999,-31)
99999990000000000000000000000000000000
@@ -890,7 +890,7 @@ create table t1 (col1 int, col2 decimal(30,25), col3 numeric(30,25));
insert into t1 values (1,0.0123456789012345678912345,0.0123456789012345678912345);
select col2/9999999999 from t1 where col1=1;
col2/9999999999
-0.000000000001234567890246913578
+0.00000000000123456789024691357814814136
select 9999999999/col2 from t1 where col1=1;
9999999999/col2
810000007209.000065537105051
@@ -925,10 +925,12 @@ select cast(ln(14000) as decimal(2,3)) c1;
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '').
create table t1 (sl decimal(70,30));
ERROR 42000: Too big precision 70 specified for 'sl'. Maximum is 65.
-create table t1 (sl decimal(32,31));
-ERROR 42000: Too big scale 31 specified for 'sl'. Maximum is 30.
-create table t1 (sl decimal(0,38));
-ERROR 42000: Too big scale 38 specified for 'sl'. Maximum is 30.
+create table t1 (sl decimal(32,39));
+ERROR 42000: Too big scale 39 specified for 'sl'. Maximum is 38.
+create table t1 (sl decimal(67,38));
+ERROR 42000: Too big precision 67 specified for 'sl'. Maximum is 65.
+create table t1 (sl decimal(0,50));
+ERROR 42000: Too big scale 50 specified for 'sl'. Maximum is 38.
create table t1 (sl decimal(0,30));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'sl').
create table t1 (sl decimal(5, 5));
@@ -938,11 +940,11 @@ t1 CREATE TABLE `t1` (
`sl` decimal(5,5) DEFAULT NULL
) ENGINE=ENGINE DEFAULT CHARSET=latin1
drop table t1;
-create table t1 (sl decimal(65, 30));
+create table t1 (sl decimal(65, 38));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `sl` decimal(65,30) DEFAULT NULL
+ `sl` decimal(65,38) DEFAULT NULL
) ENGINE=ENGINE DEFAULT CHARSET=latin1
drop table t1;
create table t1 (
@@ -1482,11 +1484,11 @@ CAST(1 AS decimal(65,10))
1.0000000000
SELECT CAST(1 AS decimal(66,10));
ERROR 42000: Too big precision 66 specified for '1'. Maximum is 65.
-SELECT CAST(1 AS decimal(65,30));
-CAST(1 AS decimal(65,30))
-1.000000000000000000000000000000
-SELECT CAST(1 AS decimal(65,31));
-ERROR 42000: Too big scale 31 specified for '1'. Maximum is 30.
+SELECT CAST(1 AS decimal(65,38));
+CAST(1 AS decimal(65,38))
+1.00000000000000000000000000000000000000
+SELECT CAST(1 AS decimal(65,39));
+ERROR 42000: Too big scale 39 specified for '1'. Maximum is 38.
CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa;
@@ -1494,8 +1496,8 @@ aa SUM(b)
2.000000000000000000000000000000 10
3.000000000000000000000000000000 10
4.000000000000000000000000000000 30
-SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa;
-ERROR 42000: Too big scale 31 specified for '1'. Maximum is 30.
+SELECT a+CAST(1 AS decimal(65,49)) AS aa, SUM(b) FROM t1 GROUP BY aa;
+ERROR 42000: Too big scale 49 specified for '1'. Maximum is 38.
DROP TABLE t1;
CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
@@ -1505,31 +1507,31 @@ SELECT 1 FROM t1 GROUP BY @b := @a, @b;
1
1
DROP TABLE t1;
-CREATE TABLE t1 SELECT 0.123456789012345678901234567890123456 AS f1;
+CREATE TABLE t1 SELECT 0.1234567890123456789012345678901234567890123456789 AS f1;
Warnings:
Note 1265 Data truncated for column 'f1' at row 1
DESC t1;
Field Type Null Key Default Extra
-f1 decimal(31,30) NO NULL
+f1 decimal(39,38) NO NULL
SELECT f1 FROM t1;
f1
-0.123456789012345678901234567890
+0.12345678901234567890123456789012345679
DROP TABLE t1;
CREATE TABLE t1 SELECT 123451234512345123451234512345123451234512345.678906789067890678906789067890678906789067890 AS f1;
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
DESC t1;
Field Type Null Key Default Extra
-f1 decimal(65,30) NO NULL
+f1 decimal(65,36) NO NULL
SELECT f1 FROM t1;
f1
-99999999999999999999999999999999999.999999999999999999999999999999
+99999999999999999999999999999.999999999999999999999999999999999999
DROP TABLE t1;
select (1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000);
(1.20396873 * 0.89550000 * 0.68000000 * 1.08721696 * 0.99500000 *
1.01500000 * 1.01500000 * 0.99500000)
-0.812988073953673124592306939480
+0.81298807395367312459230693948000000000
create table t1 as select 5.05 / 0.014;
Warnings:
Note 1265 Data truncated for column '5.05 / 0.014' at row 1
@@ -1624,30 +1626,30 @@ Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(30,30) NO NULL
+my_col decimal(38,38) NO NULL
SELECT my_col FROM t1;
my_col
-0.123456789123456789123456789123
+0.12345678912345678912345678912345678912
DROP TABLE t1;
CREATE TABLE t1 SELECT 1 + .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col;
Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) NO NULL
+my_col decimal(65,38) NO NULL
SELECT my_col FROM t1;
my_col
-1.123456789123456789123456789123
+1.12345678912345678912345678912345678912
DROP TABLE t1;
CREATE TABLE t1 SELECT 1 * .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col;
Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) NO NULL
+my_col decimal(65,38) NO NULL
SELECT my_col FROM t1;
my_col
-0.123456789123456789123456789123
+0.12345678912345678912345678912345678912
DROP TABLE t1;
CREATE TABLE t1 SELECT 1 / .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS my_col;
Warnings:
@@ -1664,10 +1666,10 @@ Warnings:
Note 1265 Data truncated for column 'my_col' at row 1
DESCRIBE t1;
Field Type Null Key Default Extra
-my_col decimal(65,30) YES NULL
+my_col decimal(65,38) YES NULL
SELECT my_col FROM t1;
my_col
-0.012345687012345687012345687012
+0.01234568701234568701234568701234568701
DROP TABLE t1;
#
# Bug#45261: Crash, stored procedure + decimal
@@ -1728,30 +1730,30 @@ Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(65,30) NO NULL
+c1 decimal(65,36) NO NULL
SELECT * FROM t1;
c1
-99999999999999999999999999999999999.999999999999999999999999999999
+99999999999999999999999999999.999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.10000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 80 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(31,30) NO NULL
+c1 decimal(39,38) NO NULL
SELECT * FROM t1;
c1
-1.100000000000000000000000000000
+1.10000000000000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(31,30) NO NULL
+c1 decimal(39,38) NO NULL
SELECT * FROM t1;
c1
-1.100000000000000000000000000000
+1.10000000000000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
@@ -1760,10 +1762,10 @@ Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(30,30) NO NULL
+c1 decimal(38,38) NO NULL
SELECT * FROM t1;
c1
-0.100000000000000000000000000000
+0.10000000000000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 45 */ 123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345 /* 45 */
@@ -1772,10 +1774,10 @@ Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(65,30) NO NULL
+c1 decimal(65,36) NO NULL
SELECT * FROM t1;
c1
-99999999999999999999999999999999999.999999999999999999999999999999
+99999999999999999999999999999.999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 65 */ 12345678901234567890123456789012345678901234567890123456789012345.1 /* 1 */
@@ -1808,20 +1810,18 @@ Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(30,30) NO NULL
+c1 decimal(38,38) NO NULL
SELECT * FROM t1;
c1
-0.123456789012345678901234567890
+0.12345678901234567890123456789012345679
DROP TABLE t1;
CREATE TABLE t1 AS SELECT 123.1234567890123456789012345678901 /* 31 */ AS c1;
-Warnings:
-Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(33,30) NO NULL
+c1 decimal(34,31) NO NULL
SELECT * FROM t1;
c1
-123.123456789012345678901234567890
+123.1234567890123456789012345678901
DROP TABLE t1;
CREATE TABLE t1 SELECT 1.1 + CAST(1 AS DECIMAL(65,30)) AS c1;
DESC t1;
@@ -1837,22 +1837,20 @@ DROP TABLE t1;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1;
-Warnings:
-Note 1265 Data truncated for column 'c1' at row 4
DESC t2;
Field Type Null Key Default Extra
-c1 decimal(33,30) YES NULL
+c1 decimal(33,31) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
-CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
+CREATE TABLE t2 SELECT IFNULL(a + 0.00000000000000000000000000000000000000000000000001, NULL) AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c1' at row 2
Note 1265 Data truncated for column 'c1' at row 3
DESC t2;
Field Type Null Key Default Extra
-c1 decimal(33,30) YES NULL
+c1 decimal(52,38) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
@@ -1861,7 +1859,7 @@ Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t2;
Field Type Null Key Default Extra
-c1 decimal(65,30) YES NULL
+c1 decimal(65,38) YES NULL
DROP TABLE t1,t2;
#
# Test that variables get maximum precision.
@@ -1870,10 +1868,10 @@ SET @decimal= 1.1;
CREATE TABLE t1 SELECT @decimal AS c1;
DESC t1;
Field Type Null Key Default Extra
-c1 decimal(65,30) YES NULL
+c1 decimal(65,38) YES NULL
SELECT * FROM t1;
c1
-1.100000000000000000000000000000
+1.10000000000000000000000000000000000000
DROP TABLE t1;
#
# Bug #45261 : Crash, stored procedure + decimal
diff --git a/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test b/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test
index 6047993e1ad..17916288e85 100644
--- a/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test
+++ b/storage/tokudb/mysql-test/tokudb/t/type_newdecimal.test
@@ -611,14 +611,14 @@ select round(99999999999999999.999,3);
select round(-99999999999999999.999,3);
#-- should return -100000000000000000.000
#
-select truncate(99999999999999999999999999999999999999,31);
+select truncate(99999999999999999999999999999999999999,49);
#-- should return 99999999999999999999999999999999999999.000
#
-select truncate(99.999999999999999999999999999999999999,31);
+select truncate(99.999999999999999999999999999999999999,49);
#-- should return 99.9999999999999999999999999999999
#
select truncate(99999999999999999999999999999999999999,-31);
-# should return 90000000000000000000000000000000
+# should return 99999990000000000000000000000000000000
#
#-- 6. Set functions (AVG, SUM, COUNT) should work.
#
@@ -965,9 +965,11 @@ select cast(ln(14000) as decimal(2,3)) c1;
--error 1426
create table t1 (sl decimal(70,30));
--error 1425
-create table t1 (sl decimal(32,31));
+create table t1 (sl decimal(32,39));
+--error 1426
+create table t1 (sl decimal(67,38));
--error 1425
-create table t1 (sl decimal(0,38));
+create table t1 (sl decimal(0,50));
--error 1427
create table t1 (sl decimal(0,30));
create table t1 (sl decimal(5, 5));
@@ -975,7 +977,7 @@ replace_regex /ENGINE=[a-zA-Z]*/ENGINE=ENGINE/;
show create table t1;
drop table t1;
# Test limits
-create table t1 (sl decimal(65, 30));
+create table t1 (sl decimal(65, 38));
replace_regex /ENGINE=[a-zA-Z]*/ENGINE=ENGINE/;
show create table t1;
drop table t1;
@@ -1190,15 +1192,15 @@ SELECT CAST(1 AS decimal(65,10));
--error ER_TOO_BIG_PRECISION
SELECT CAST(1 AS decimal(66,10));
-SELECT CAST(1 AS decimal(65,30));
+SELECT CAST(1 AS decimal(65,38));
--error ER_TOO_BIG_SCALE
-SELECT CAST(1 AS decimal(65,31));
+SELECT CAST(1 AS decimal(65,39));
CREATE TABLE t1 (a int DEFAULT NULL, b int DEFAULT NULL);
INSERT INTO t1 VALUES (3,30), (1,10), (2,10);
SELECT a+CAST(1 AS decimal(65,30)) AS aa, SUM(b) FROM t1 GROUP BY aa;
--error ER_TOO_BIG_SCALE
-SELECT a+CAST(1 AS decimal(65,31)) AS aa, SUM(b) FROM t1 GROUP BY aa;
+SELECT a+CAST(1 AS decimal(65,49)) AS aa, SUM(b) FROM t1 GROUP BY aa;
DROP TABLE t1;
@@ -1223,7 +1225,7 @@ DROP TABLE t1;
# maxmimum precision of 30 places after the decimal point. Show that
# temp field creation beyond that works and throws a truncation warning.
# DECIMAL(37,36) should be adjusted to DECIMAL(31,30).
-CREATE TABLE t1 SELECT 0.123456789012345678901234567890123456 AS f1;
+CREATE TABLE t1 SELECT 0.1234567890123456789012345678901234567890123456789 AS f1;
DESC t1;
SELECT f1 FROM t1;
DROP TABLE t1;
@@ -1432,7 +1434,7 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
-CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
+CREATE TABLE t2 SELECT IFNULL(a + 0.00000000000000000000000000000000000000000000000001, NULL) AS c1 FROM t1;
DESC t2;
DROP TABLE t1,t2;
diff --git a/strings/dtoa.c b/strings/dtoa.c
index c3ab347f94c..fdf7bceddfd 100644
--- a/strings/dtoa.c
+++ b/strings/dtoa.c
@@ -90,7 +90,7 @@ size_t my_fcvt(double x, int precision, char *to, my_bool *error)
int decpt, sign, len, i;
char *res, *src, *end, *dst= to;
char buf[DTOA_BUFF_SIZE];
- DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL);
+ DBUG_ASSERT(precision >= 0 && precision < DECIMAL_NOT_SPECIFIED && to != NULL);
res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf));
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index 75514a90925..3cc7a4e7ea8 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -16,11 +16,10 @@
#include "strings_def.h"
#include <m_ctype.h>
-#include <stdarg.h>
#include <my_sys.h>
#include <my_base.h>
#include <my_handler_errors.h>
-
+#include <mysql_com.h> /* For FLOATING_POINT_DECIMALS */
#define MAX_ARGS 32 /* max positional args count*/
#define MAX_PRINT_INFO 32 /* max print position count */
@@ -240,8 +239,8 @@ static char *process_dbl_arg(char *to, char *end, size_t width,
{
if (width == MAX_WIDTH)
width= FLT_DIG; /* width not set, use default */
- else if (width >= NOT_FIXED_DEC)
- width= NOT_FIXED_DEC - 1; /* max.precision for my_fcvt() */
+ else if (width >= FLOATING_POINT_DECIMALS)
+ width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
width= MY_MIN(width, (size_t)(end-to) - 1);
if (arg_type == 'f')