diff options
Diffstat (limited to 'mysql-test/r')
35 files changed, 1014 insertions, 514 deletions
diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 178c5716911..ad7bd374629 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -266,7 +266,7 @@ fid AsText(EndPoint(g)) 107 POINT(40 10) SELECT fid, GLength(g) FROM gis_line ORDER by fid; fid GLength(g) -105 24.142135623731 +105 24.14213562373095 106 40 107 30 SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; @@ -292,7 +292,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.4166666666667 25.4166666666667) +109 POINT(25.416666666666668 25.416666666666668) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon ORDER by fid; fid Area(g) @@ -326,8 +326,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; fid AsText(Centroid(g)) -117 POINT(55.5885277530424 17.426536064114) -118 POINT(55.5885277530424 17.426536064114) +117 POINT(55.58852775304245 17.426536064113982) +118 POINT(55.58852775304245 17.426536064113982) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; fid Area(g) diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index c53de220b60..3e1ea824db5 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -342,11 +342,11 @@ INSERT INTO t1 SET f1 = -1.0e+30 ; INSERT INTO t1 SET f1 = +1.0e+30 ; SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1; double_val cast_val --1e+30 -9223372036854775808 -1e+30 9223372036854775807 +-1e30 -9223372036854775808 +1e30 9223372036854775807 Warnings: -Warning 1292 Truncated incorrect INTEGER value: '-1e+30' -Warning 1292 Truncated incorrect INTEGER value: '1e+30' +Warning 1292 Truncated incorrect INTEGER value: '-1e30' +Warning 1292 Truncated incorrect INTEGER value: '1e30' DROP TABLE t1; select isnull(date(NULL)), isnull(cast(NULL as DATE)); isnull(date(NULL)) isnull(cast(NULL as DATE)) @@ -363,7 +363,7 @@ cast('1.2' as decimal(3,2)) 1.20 select 1e18 * cast('1.2' as decimal(3,2)); 1e18 * cast('1.2' as decimal(3,2)) -1.2e+18 +1.2e18 select cast(cast('1.2' as decimal(3,2)) as signed); cast(cast('1.2' as decimal(3,2)) as signed) 1 diff --git a/mysql-test/r/exampledb.result b/mysql-test/r/exampledb.result deleted file mode 100644 index 6eea24e2e1f..00000000000 --- a/mysql-test/r/exampledb.result +++ /dev/null @@ -1,8 +0,0 @@ -drop database if exists events_test; -drop database if exists events_test2; -drop table if exists t1; -CREATE TABLE t1 ( -Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, -Varor_period smallint(4) unsigned DEFAULT '0' NOT NULL -) ENGINE=example; -drop table t1; diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index b36f561578b..6838dcf944c 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -61,7 +61,7 @@ grp sum NULL NULL 1 7 2 20.25 -3 45.4831632475944 +3 45.48316324759439 create table t2 (grp int, a bigint unsigned, c char(10)); insert into t2 select grp,max(a)+max(grp),max(c) from t1 group by grp; replace into t2 select grp, a, c from t1 limit 2,1; @@ -891,7 +891,7 @@ select 1e8 * sum(distinct df) from t1; 330000000 select 1e8 * min(df) from t1; 1e8 * min(df) -110000000 +110000000.00000001 create table t3 (ifl int); insert into t3 values(1), (2); select cast(min(ifl) as decimal(5,2)) from t3; @@ -1186,7 +1186,7 @@ std(s1/s2) 0.21325764 select std(o1/o2) from bug22555; std(o1/o2) -0.213257635866493 +0.2132576358664934 select std(e1/e2) from bug22555; std(e1/e2) 0.21325764 @@ -1209,13 +1209,13 @@ i count(*) std(e1/e2) 3 4 0.000000000000000000000000000000 select round(std(s1/s2), 17) from bug22555; round(std(s1/s2), 17) -0.21325763586649341 +0.21325763586649340 select std(o1/o2) from bug22555; std(o1/o2) -0.213257635866493 +0.2132576358664934 select round(std(e1/e2), 17) from bug22555; round(std(e1/e2), 17) -0.21325763586649341 +0.21325763586649340 set div_precision_increment=20; select i, count(*), std(s1/s2) from bug22555 group by i order by i; i count(*) std(s1/s2) @@ -1234,13 +1234,13 @@ i count(*) std(e1/e2) 3 4 0.000000000000000000000000000000 select round(std(s1/s2), 17) from bug22555; round(std(s1/s2), 17) -0.21325763586649341 +0.21325763586649340 select std(o1/o2) from bug22555; std(o1/o2) -0.213257635866493 +0.2132576358664934 select round(std(e1/e2), 17) from bug22555; round(std(e1/e2), 17) -0.21325763586649341 +0.21325763586649340 set @@div_precision_increment=@saved_div_precision_increment; drop table bug22555; create table bug22555 (s smallint, o double, e decimal); diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 063f4d37f4a..537b1db9781 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -44,7 +44,7 @@ Warnings: Note 1003 select abs(-(10)) AS `abs(-10)`,sign(-(5)) AS `sign(-5)`,sign(5) AS `sign(5)`,sign(0) AS `sign(0)` select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2); log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2) -10 10 NULL NULL NULL 2 NULL NULL +10 10.000000000000002 NULL NULL NULL 2 NULL NULL explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -52,7 +52,7 @@ Warnings: Note 1003 select log(exp(10)) AS `log(exp(10))`,exp((log(sqrt(10)) * 2)) AS `exp(log(sqrt(10))*2)`,log(-(1)) AS `log(-1)`,log(NULL) AS `log(NULL)`,log(1,1) AS `log(1,1)`,log(3,9) AS `log(3,9)`,log(-(1),2) AS `log(-1,2)`,log(NULL,2) AS `log(NULL,2)` select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL); ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL) -10 10 NULL NULL NULL +10 10.000000000000002 NULL NULL NULL explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -60,7 +60,7 @@ Warnings: Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)` select log2(8),log2(15),log2(-2),log2(0),log2(NULL); log2(8) log2(15) log2(-2) log2(0) log2(NULL) -3 3.90689059560852 NULL NULL NULL +3 3.9068905956085187 NULL NULL NULL explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -68,7 +68,7 @@ Warnings: Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)` select log10(100),log10(18),log10(-4),log10(0),log10(NULL); log10(100) log10(18) log10(-4) log10(0) log10(NULL) -2 1.25527250510331 NULL NULL NULL +2 1.255272505103306 NULL NULL NULL explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -85,7 +85,7 @@ Note 1003 select pow(10,log10(10)) AS `pow(10,log10(10))`,pow(2,4) AS `power(2,4 set @@rand_seed1=10000000,@@rand_seed2=1000000; select rand(999999),rand(); rand(999999) rand() -0.0142313651873091 0.028870999839968 +0.014231365187309091 0.028870999839968048 explain extended select rand(999999),rand(); id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used @@ -101,7 +101,7 @@ Warnings: Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)` select degrees(pi()),radians(360); degrees(pi()) radians(360) -180 6.28318530717959 +180 6.283185307179586 select format(atan(-2, 2), 6); format(atan(-2, 2), 6) -0.785398 @@ -119,7 +119,7 @@ ACOS(1.0) 0 SELECT ASIN(1.0); ASIN(1.0) -1.5707963267949 +1.5707963267948966 SELECT ACOS(0.2*5.0); ACOS(0.2*5.0) 0 @@ -128,10 +128,10 @@ ACOS(0.5*2.0) 0 SELECT ASIN(0.8+0.2); ASIN(0.8+0.2) -1.5707963267949 +1.5707963267948966 SELECT ASIN(1.2-0.2); ASIN(1.2-0.2) -1.5707963267949 +1.5707963267948966 select format(4.55, 1), format(4.551, 1); format(4.55, 1) format(4.551, 1) 4.6 4.6 @@ -368,7 +368,7 @@ mod(5, cast(-2 as unsigned)) mod(5, 18446744073709551614) mod(5, -2) 5 5 1 select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5); pow(cast(-2 as unsigned), 5) pow(18446744073709551614, 5) pow(-2, 5) -2.13598703592091e+96 2.13598703592091e+96 -32 +2.13598703592091e96 2.13598703592091e96 -32 CREATE TABLE t1 (a timestamp, b varchar(20), c bit(1)); INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0); SELECT a DIV 900 y FROM t1 GROUP BY y; @@ -437,10 +437,10 @@ a ROUND(a) 2.5 2 -2.9 -3 2.9 3 --1e+16 -10000000000000000 -1e+16 10000000000000000 --1e+16 -10000000000000002 -1e+16 10000000000000002 +-1e16 -10000000000000000 +1e16 10000000000000000 +-1.0000000000000002e16 -10000000000000002 +1.0000000000000002e16 10000000000000002 DROP TABLE t1; CREATE TABLE t1(f1 LONGTEXT) engine=myisam; INSERT INTO t1 VALUES ('a'); @@ -475,16 +475,16 @@ NULL CREATE OR REPLACE VIEW v1 AS SELECT NULL AS a; SELECT RAND(a) FROM v1; RAND(a) -0.155220427694936 +0.15522042769493574 DROP VIEW v1; SELECT RAND(a) FROM (SELECT NULL AS a) b; RAND(a) -0.155220427694936 +0.15522042769493574 CREATE TABLE t1 (i INT); INSERT INTO t1 VALUES (NULL); SELECT RAND(i) FROM t1; RAND(i) -0.155220427694936 +0.15522042769493574 DROP TABLE t1; # select 123456789012345678901234567890.123456789012345678901234567890 div 1 as x; diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 64988f9de50..3d43cbbfd76 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1354,10 +1354,10 @@ cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)) 20.06 select conv("18383815659218730760",10,10) + 0; conv("18383815659218730760",10,10) + 0 -1.83838156592187e+19 +1.838381565921873e19 select "18383815659218730760" + 0; "18383815659218730760" + 0 -1.83838156592187e+19 +1.838381565921873e19 CREATE TABLE t1 (code varchar(10)); INSERT INTO t1 VALUES ('a12'), ('A12'), ('a13'); SELECT ASCII(code), code FROM t1 WHERE code='A12'; diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 3e28227d542..60e24819fa5 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -258,7 +258,7 @@ fid AsText(EndPoint(g)) 107 POINT(40 10) SELECT fid, GLength(g) FROM gis_line; fid GLength(g) -105 24.142135623731 +105 24.14213562373095 106 40 107 30 SELECT fid, NumPoints(g) FROM gis_line; @@ -284,7 +284,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.4166666666667 25.4166666666667) +109 POINT(25.416666666666668 25.416666666666668) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon; fid Area(g) @@ -318,8 +318,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon; fid AsText(Centroid(g)) -117 POINT(55.5885277530424 17.426536064114) -118 POINT(55.5885277530424 17.426536064114) +117 POINT(55.58852775304245 17.426536064113982) +118 POINT(55.58852775304245 17.426536064113982) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon; fid Area(g) @@ -651,11 +651,11 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85998; object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo)) -85998 MULTIPOLYGON 0 POINT(115.318773152032 -36.2374728210215) +85998 MULTIPOLYGON 0 POINT(115.31877315203187 -36.23747282102153) select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85984; object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo)) -85984 MULTIPOLYGON 0 POINT(-114.877871869233 36.3310176346905) +85984 MULTIPOLYGON 0 POINT(-114.87787186923313 36.33101763469059) drop table t1; create table t1 (fl geometry not null); insert into t1 values (1); diff --git a/mysql-test/r/handler_innodb.result b/mysql-test/r/handler_innodb.result index 6ed7b572403..4def5c82df8 100644 --- a/mysql-test/r/handler_innodb.result +++ b/mysql-test/r/handler_innodb.result @@ -1456,3 +1456,11 @@ handler t1 close; drop table t1; # -> connection con1 # -> connection default +# +# A test for Bug#50555 "handler commands crash server in +# my_hash_first()". +# +handler no_such_table read no_such_index first; +ERROR 42S02: Unknown table 'no_such_table' in HANDLER +handler no_such_table close; +ERROR 42S02: Unknown table 'no_such_table' in HANDLER diff --git a/mysql-test/r/handler_myisam.result b/mysql-test/r/handler_myisam.result index 0dd039eeb23..80f728a4dcd 100644 --- a/mysql-test/r/handler_myisam.result +++ b/mysql-test/r/handler_myisam.result @@ -1454,6 +1454,14 @@ drop table t1; # -> connection con1 # -> connection default # +# A test for Bug#50555 "handler commands crash server in +# my_hash_first()". +# +handler no_such_table read no_such_index first; +ERROR 42S02: Unknown table 'no_such_table' in HANDLER +handler no_such_table close; +ERROR 42S02: Unknown table 'no_such_table' in HANDLER +# # BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash # CREATE TABLE t1 AS SELECT 1 AS f1; diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index c6c775afc9f..0ce1ebe56ad 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -266,7 +266,7 @@ fid AsText(EndPoint(g)) 107 POINT(40 10) SELECT fid, GLength(g) FROM gis_line ORDER by fid; fid GLength(g) -105 24.142135623731 +105 24.14213562373095 106 40 107 30 SELECT fid, NumPoints(g) FROM gis_line ORDER by fid; @@ -292,7 +292,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.4166666666667 25.4166666666667) +109 POINT(25.416666666666668 25.416666666666668) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon ORDER by fid; fid Area(g) @@ -326,8 +326,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; fid AsText(Centroid(g)) -117 POINT(55.5885277530424 17.426536064114) -118 POINT(55.5885277530424 17.426536064114) +117 POINT(55.58852775304245 17.426536064113982) +118 POINT(55.58852775304245 17.426536064113982) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; fid Area(g) diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 36d2b9ef348..b322c5da73a 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -175,12 +175,12 @@ Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 4 original_value 1e+1111111111a -f_double 1.79769313486232e+308 -f_float 3.40282e+38 +f_double 1.7976931348623157e308 +f_float 3.40282e38 f_double_7_2 99999.99 f_float_4_3 9.999 -f_double_u 1.79769313486232e+308 -f_float_u 3.40282e+38 +f_double_u 1.7976931348623157e308 +f_float_u 3.40282e38 f_double_15_1_u 99999999999999.9 f_float_3_1_u 99.9 set @value= "-1e+1111111111a"; @@ -204,8 +204,8 @@ Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 5 original_value -1e+1111111111a -f_double -1.79769313486232e+308 -f_float -3.40282e+38 +f_double -1.7976931348623157e308 +f_float -3.40282e38 f_double_7_2 -99999.99 f_float_4_3 -9.999 f_double_u 0 @@ -227,13 +227,13 @@ Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1 Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 6 -original_value 1e+111 -f_double 1e+111 -f_float 3.40282e+38 +original_value 1e111 +f_double 1e111 +f_float 3.40282e38 f_double_7_2 99999.99 f_float_4_3 9.999 -f_double_u 1e+111 -f_float_u 3.40282e+38 +f_double_u 1e111 +f_float_u 3.40282e38 f_double_15_1_u 99999999999999.9 f_float_3_1_u 99.9 set @value= -1e+111; @@ -248,9 +248,9 @@ Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1 Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 7 -original_value -1e+111 -f_double -1e+111 -f_float -3.40282e+38 +original_value -1e111 +f_double -1e111 +f_float -3.40282e38 f_double_7_2 -99999.99 f_float_4_3 -9.999 f_double_u 0 @@ -524,42 +524,36 @@ INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175); INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0); INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0); INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0); -Warnings: -Warning 1265 Data truncated for column 'c' at row 1 INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3); Warnings: Warning 1265 Data truncated for column 'c' at row 1 INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2); -Warnings: -Warning 1265 Data truncated for column 'c' at row 1 INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0); INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0); -Warnings: -Warning 1265 Data truncated for column 'c' at row 1 SELECT * FROM t1; a b c 9.999999 10 10 -1.225e-05 1.2e-05 1e-0 -0.0001225 0.00012 NULL +0.00001225 1.22e-5 1e-5 +0.0001225 1.22e-4 NULL 0.1225 0.1225 NULL 0.1225877 0.12259 NULL 12.25 12.25 NULL 12.25 12.25 12.2 122500 122500 NULL -12250000000 1.2e+10 NULL -1.225e+15 1.2e+15 NULL +12250000000 1.22e10 NULL +1.225e15 1.22e15 NULL 5000000 5000000 NULL -1.25e+78 1.2e+78 NULL +1.25e78 1.25e78 NULL 1.25e-94 1.2e-94 NULL -1.25e+203 1e+203 NULL +1.25e203 1.2e203 NULL 1.25e-175 1e-175 NULL 1.225 NULL 1.23 1.37 NULL 1.37 --1.37 NULL -1.3 -0.00187 NULL 0.00 --0.0187 NULL -0.0 +-1.37 NULL -1.4 +0.00187 NULL 2e-3 +-0.0187 NULL 0 5000 NULL 5000 --5000 NULL -500 +-5000 NULL -5e3 DROP TABLE t1; CREATE TABLE t1 ( a char(20) NOT NULL, @@ -586,32 +580,30 @@ INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0); INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0); INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3); INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2); -Warnings: -Warning 1265 Data truncated for column 'c' at row 1 INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0); INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0); SELECT * FROM t1; a b c 9.999999 10 9.999 -1.225e-05 1.2e-05 1e-05 -0.0001225 0.00012 NULL +0.00001225 1.22e-5 1e-5 +0.0001225 1.22e-4 NULL 0.1225 0.1225 NULL 0.1225877 0.12259 NULL 12.25 12.25 NULL 12.25 12.25 12.25 122500 122500 NULL -12250000000 1.2e+10 NULL -1.225e+15 1.2e+15 NULL +12250000000 1.22e10 NULL +1.225e15 1.22e15 NULL 5000000 5000000 NULL -1.25e+78 1.2e+78 NULL +1.25e78 1.25e78 NULL 1.25e-94 1.2e-94 NULL -1.25e+203 1e+203 NULL +1.25e203 1.2e203 NULL 1.25e-175 1e-175 NULL 1.225 NULL 1.225 1.37 NULL 1.37 -1.37 NULL -1.37 0.00187 NULL 0.002 --0.0187 NULL -0.01 +-0.0187 NULL -0.02 5000 NULL 5000 -5000 NULL -5000 DROP TABLE t1; diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 1e488b320d7..5e25132880f 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -251,15 +251,15 @@ CREATE TABLE t1 (c1 INT, c2 TIMESTAMP, c3 REAL, c4 DOUBLE); INSERT INTO t1 (c1, c2, c3, c4) VALUES (10, '1970-02-01 01:02:03', 1.1E-100, 1.1E+100); SELECT * FROM t1; c1 c2 c3 c4 -10 1970-02-01 01:02:03 1.1e-100 1.1e+100 +10 1970-02-01 01:02:03 1.1e-100 1.1e100 SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1' FIELDS ENCLOSED BY '-' FROM t1; --10- -1970\-02\-01 01:02:03- -1.1e\-100- -1.1e+100- +-10- -1970\-02\-01 01:02:03- -1.1e\-100- -1.1e100- EOF TRUNCATE t1; LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1' INTO TABLE t1 FIELDS ENCLOSED BY '-'; SELECT * FROM t1; c1 c2 c3 c4 -10 1970-02-01 01:02:03 1.1e-100 1.1e+100 +10 1970-02-01 01:02:03 1.1e-100 1.1e100 DROP TABLE t1; # -- diff --git a/mysql-test/r/mysqlbinlog_row_innodb.result b/mysql-test/r/mysqlbinlog_row_innodb.result index cf59d23bcf1..3eb4774ae4e 100644 --- a/mysql-test/r/mysqlbinlog_row_innodb.result +++ b/mysql-test/r/mysqlbinlog_row_innodb.result @@ -495,10 +495,10 @@ c15 0000000000 c16 -9223372036854775808 c17 0 c18 00000000000000000000 -c19 -3.40282e+38 +c19 -3.40282e38 c20 1.17549e-38 c21 000000000000 -c22 -1.7976931348623e+308 +c22 -1.7976931348623e308 c23 2.2250738585072e-308 c24 0000000000000000000000 c25 -9999999999 @@ -574,12 +574,12 @@ c15 4294967295 c16 9223372036854775807 c17 18446744073709551615 c18 18446744073709551615 -c19 3.40282e+38 -c20 3.40282e+38 -c21 03.40282e+38 -c22 1.7976931348623e+308 -c23 1.7976931348623e+308 -c24 001.7976931348623e+308 +c19 3.40282e38 +c20 3.40282e38 +c21 003.40282e38 +c22 1.7976931348623e308 +c23 1.7976931348623e308 +c24 0001.7976931348623e308 c25 9999999999 c26 9999999999 c27 9999999999 @@ -1557,12 +1557,12 @@ c15 4294967295 c16 9223372036854775807 c17 18446744073709551615 c18 18446744073709551615 -c19 3.40282e+38 -c20 3.40282e+38 -c21 03.40282e+38 -c22 1.7976931348623e+308 -c23 1.7976931348623e+308 -c24 001.7976931348623e+308 +c19 3.40282e38 +c20 3.40282e38 +c21 003.40282e38 +c22 1.7976931348623e308 +c23 1.7976931348623e308 +c24 0001.7976931348623e308 c25 9999999999 c26 9999999999 c27 9999999999 @@ -1636,10 +1636,10 @@ c15 0000000000 c16 -9223372036854775808 c17 0 c18 00000000000000000000 -c19 -3.40282e+38 +c19 -3.40282e38 c20 1.17549e-38 c21 000000000000 -c22 -1.7976931348623e+308 +c22 -1.7976931348623e308 c23 2.2250738585072e-308 c24 0000000000000000000000 c25 -9999999999 diff --git a/mysql-test/r/mysqlbinlog_row_myisam.result b/mysql-test/r/mysqlbinlog_row_myisam.result index 973786d698e..b673d36c452 100644 --- a/mysql-test/r/mysqlbinlog_row_myisam.result +++ b/mysql-test/r/mysqlbinlog_row_myisam.result @@ -495,10 +495,10 @@ c15 0000000000 c16 -9223372036854775808 c17 0 c18 00000000000000000000 -c19 -3.40282e+38 +c19 -3.40282e38 c20 1.17549e-38 c21 000000000000 -c22 -1.7976931348623e+308 +c22 -1.7976931348623e308 c23 2.2250738585072e-308 c24 0000000000000000000000 c25 -9999999999 @@ -574,12 +574,12 @@ c15 4294967295 c16 9223372036854775807 c17 18446744073709551615 c18 18446744073709551615 -c19 3.40282e+38 -c20 3.40282e+38 -c21 03.40282e+38 -c22 1.7976931348623e+308 -c23 1.7976931348623e+308 -c24 001.7976931348623e+308 +c19 3.40282e38 +c20 3.40282e38 +c21 003.40282e38 +c22 1.7976931348623e308 +c23 1.7976931348623e308 +c24 0001.7976931348623e308 c25 9999999999 c26 9999999999 c27 9999999999 @@ -1557,12 +1557,12 @@ c15 4294967295 c16 9223372036854775807 c17 18446744073709551615 c18 18446744073709551615 -c19 3.40282e+38 -c20 3.40282e+38 -c21 03.40282e+38 -c22 1.7976931348623e+308 -c23 1.7976931348623e+308 -c24 001.7976931348623e+308 +c19 3.40282e38 +c20 3.40282e38 +c21 003.40282e38 +c22 1.7976931348623e308 +c23 1.7976931348623e308 +c24 0001.7976931348623e308 c25 9999999999 c26 9999999999 c27 9999999999 @@ -1636,10 +1636,10 @@ c15 0000000000 c16 -9223372036854775808 c17 0 c18 00000000000000000000 -c19 -3.40282e+38 +c19 -3.40282e38 c20 1.17549e-38 c21 000000000000 -c22 -1.7976931348623e+308 +c22 -1.7976931348623e308 c23 2.2250738585072e-308 c24 0000000000000000000000 c25 -9999999999 diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 13d36fab2f1..4724a111837 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -55,7 +55,7 @@ CREATE TABLE `t1` ( `a` double DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -INSERT INTO `t1` VALUES (RES); +INSERT INTO `t1` VALUES (-1.7976931348623157e308); DROP TABLE t1; # # Bug#3361 mysqldump quotes DECIMAL values inconsistently diff --git a/mysql-test/r/not_partition.result b/mysql-test/r/not_partition.result index f516f8634ce..4ec37ab9fc7 100644 --- a/mysql-test/r/not_partition.result +++ b/mysql-test/r/not_partition.result @@ -52,9 +52,9 @@ joined DATE NOT NULL ) PARTITION BY KEY(joined) PARTITIONS 6; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working +Got one of the listed errors ALTER TABLE t1 PARTITION BY KEY(joined) PARTITIONS 2; -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working +Got one of the listed errors drop table t1; ERROR 42S02: Unknown table 't1' CREATE TABLE t1 ( @@ -71,7 +71,7 @@ PARTITION p2 VALUES LESS THAN (1980), PARTITION p3 VALUES LESS THAN (1990), PARTITION p4 VALUES LESS THAN MAXVALUE ); -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working +Got one of the listed errors drop table t1; ERROR 42S02: Unknown table 't1' CREATE TABLE t1 (id INT, purchased DATE) @@ -82,7 +82,7 @@ PARTITION p0 VALUES LESS THAN (1990), PARTITION p1 VALUES LESS THAN (2000), PARTITION p2 VALUES LESS THAN MAXVALUE ); -ERROR HY000: The 'partitioning' feature is disabled; you need MySQL built with '--with-partition' to have it working +Got one of the listed errors drop table t1; ERROR 42S02: Unknown table 't1' create table t1 (a varchar(10) charset latin1 collate latin1_bin); diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result index 7e703de0876..467bb7c5cb8 100644 --- a/mysql-test/r/parser.result +++ b/mysql-test/r/parser.result @@ -522,7 +522,7 @@ select conv(255 AS p1, 10 AS p2, 16 AS p3); ERROR 42000: Incorrect parameters in the call to native function 'conv' select atan(10); atan(10) -1.47112767430373 +1.4711276743037347 select atan(10 AS p1); ERROR 42000: Incorrect parameters in the call to native function 'atan' select atan(10 p1); @@ -533,7 +533,7 @@ select atan(10 "p1"); ERROR 42000: Incorrect parameters in the call to native function 'atan' select atan(10, 20); atan(10, 20) -0.463647609000806 +0.4636476090008061 select atan(10 AS p1, 20); ERROR 42000: Incorrect parameters in the call to native function 'atan' select atan(10 p1, 20); diff --git a/mysql-test/r/partition_column.result b/mysql-test/r/partition_column.result index 784df3045f0..ddc48b635cf 100644 --- a/mysql-test/r/partition_column.result +++ b/mysql-test/r/partition_column.result @@ -9,6 +9,30 @@ partition by range columns (a,b,c) ( partition p0 values less than (1, maxvalue, 10), partition p1 values less than (1, maxvalue, maxvalue)); ERROR HY000: VALUES LESS THAN value must be strictly increasing for each partition +create table t1 (a varchar(5) character set ucs2 collate ucs2_bin) +partition by range columns (a) +(partition p0 values less than (0x0041)); +insert into t1 values (0x00410000); +select hex(a) from t1 where a like 'A_'; +hex(a) +00410000 +explain partitions select hex(a) from t1 where a like 'A_'; +id select_type table partitions type possible_keys key key_len ref rows Extra +1 SIMPLE t1 p0 system NULL NULL NULL NULL 1 +alter table t1 remove partitioning; +select hex(a) from t1 where a like 'A_'; +hex(a) +00410000 +create index a on t1 (a); +select hex(a) from t1 where a like 'A_'; +hex(a) +00410000 +insert into t1 values ('A_'); +select hex(a) from t1; +hex(a) +00410000 +0041005F +drop table t1; create table t1 (a varchar(1) character set latin1 collate latin1_general_ci) partition by range columns(a) ( partition p0 values less than ('a'), @@ -69,7 +93,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN ('''') ENGINE = MyISAM, PARTITION p1 VALUES IN ('\\') ENGINE = MyISAM, PARTITION p2 VALUES IN ('\0') ENGINE = MyISAM) */ @@ -128,7 +152,7 @@ t1 CREATE TABLE `t1` ( `c` varchar(25) DEFAULT NULL, `d` datetime DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE COLUMNS(a,b,c,d) +/*!50500 PARTITION BY RANGE COLUMNS(a,b,c,d) SUBPARTITION BY HASH (to_seconds(d)) SUBPARTITIONS 4 (PARTITION p0 VALUES LESS THAN (1,'0',MAXVALUE,'1900-01-01') ENGINE = MyISAM, @@ -211,7 +235,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a,b) +/*!50500 PARTITION BY LIST COLUMNS(a,b) (PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM, PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM, PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */ @@ -245,7 +269,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a,b) +/*!50500 PARTITION BY LIST COLUMNS(a,b) (PARTITION p0 VALUES IN ((1,NULL),(2,NULL),(NULL,NULL)) ENGINE = MyISAM, PARTITION p1 VALUES IN ((1,1),(2,2)) ENGINE = MyISAM, PARTITION p2 VALUES IN ((3,NULL),(NULL,1)) ENGINE = MyISAM) */ @@ -299,7 +323,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM, PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */ insert into t1 values (1); @@ -314,7 +338,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN (2,1) ENGINE = MyISAM, PARTITION p1 VALUES IN (4,NULL,3) ENGINE = MyISAM) */ drop table t1; @@ -349,7 +373,7 @@ t1 CREATE TABLE `t1` ( `c` varchar(5) DEFAULT NULL, `d` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE COLUMNS(a,b,c) +/*!50500 PARTITION BY RANGE COLUMNS(a,b,c) SUBPARTITION BY KEY (c,d) SUBPARTITIONS 3 (PARTITION p0 VALUES LESS THAN (1,'abc','abc') ENGINE = MyISAM, @@ -382,7 +406,7 @@ t1 CREATE TABLE `t1` ( `b` varchar(2) DEFAULT NULL, `c` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY RANGE COLUMNS(a,b,c) +/*!50500 PARTITION BY RANGE COLUMNS(a,b,c) (PARTITION p0 VALUES LESS THAN (1,'A',1) ENGINE = MyISAM, PARTITION p1 VALUES LESS THAN (1,'B',1) ENGINE = MyISAM) */ insert into t1 values (1, 'A', 1); diff --git a/mysql-test/r/partition_key_cache.result b/mysql-test/r/partition_key_cache.result new file mode 100644 index 00000000000..7fbab34fa41 --- /dev/null +++ b/mysql-test/r/partition_key_cache.result @@ -0,0 +1,417 @@ +DROP TABLE IF EXISTS t1, t2, v, x; +# Actual test of key caches +# Verifing that reads/writes use the key cache correctly +SELECT @org_key_cache_buffer_size:= @@global.default.key_buffer_size; +@org_key_cache_buffer_size:= @@global.default.key_buffer_size +1048576 +# Minimize default key cache (almost disabled). +SET @@global.default.key_buffer_size = 1; +Warnings: +Warning 1292 Truncated incorrect key_buffer_size value: '1' +CREATE TABLE t1 ( +a INT, +b INT, +c INT NOT NULL, +PRIMARY KEY (a), +KEY `inx_b` (b)) +PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION p0 VALUES LESS THAN (1167602410) +(SUBPARTITION sp0, +SUBPARTITION sp1), +PARTITION p1 VALUES LESS THAN MAXVALUE +(SUBPARTITION sp2, +SUBPARTITION sp3)); +CREATE TABLE t2 ( +a INT, +b INT, +c INT NOT NULL, +PRIMARY KEY (a), +KEY `inx_b` (b)); +FLUSH TABLES; +FLUSH STATUS; +SET @a:=1167602400; +CREATE VIEW v AS SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4; +CREATE VIEW x AS SELECT 1 FROM v,v a,v b; +FLUSH STATUS; +INSERT t1 SELECT @a, @a * (1 - ((@a % 2) * 2)) , 1167612400 - (@a:=@a+1) FROM x, x y; +reads vs requests +reads == requests +writes vs requests +writes == requests +# row distribution: +SELECT PARTITION_NAME, SUBPARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_SCHEMA='test' and TABLE_NAME='t1'; +PARTITION_NAME SUBPARTITION_NAME TABLE_ROWS +p0 sp0 5 +p0 sp1 5 +p1 sp2 2043 +p1 sp3 2043 +DROP VIEW x; +DROP VIEW v; +FLUSH TABLES; +FLUSH STATUS; +SELECT COUNT(b) FROM t1 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +No! +INSERT t2 SELECT a,b,c FROM t1; +reads vs requests +reads == requests +writes vs requests +writes == requests +FLUSH STATUS; +SELECT COUNT(b) FROM t2 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +No! +FLUSH TABLES; +# Setting the default key cache to 1M +SET GLOBAL key_buffer_size = 1024*1024; +FLUSH STATUS; +# All these have to read the indexes +LOAD INDEX INTO CACHE t1 PARTITION (p1); +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +Zero key reads? +No! +SELECT COUNT(b) FROM t1 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +No! +SELECT COUNT(b) FROM t2 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +No! +# All these should be able to use the key cache +SELECT COUNT(b) FROM t1 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +Yes! +SELECT COUNT(b) FROM t2 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +Yes! +FLUSH TABLES; +LOAD INDEX INTO CACHE t1 PARTITION (p1,p0); +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +Zero key reads? +No! +# should not be zero +SELECT COUNT(b) FROM t1 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +Yes! +LOAD INDEX INTO CACHE t2; +Table Op Msg_type Msg_text +test.t2 preload_keys status OK +Zero key reads? +No! +# should not be zero +SELECT COUNT(b) FROM t2 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +Yes! +FLUSH TABLES; +LOAD INDEX INTO CACHE t1 PARTITION (p1,p0) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +Zero key reads? +No! +# should not be zero +SELECT COUNT(b) FROM t1 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +No! +LOAD INDEX INTO CACHE t2 IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t2 preload_keys status OK +Zero key reads? +No! +# should not be zero +SELECT COUNT(b) FROM t2 WHERE b >= 0; +COUNT(b) +2048 +Zero key reads? +No! +TRUNCATE TABLE t2; +INSERT t2 SELECT a,b,c FROM t1; +reads vs requests +reads != requests +writes vs requests +writes != requests +DROP TABLE t1,t2; +SET GLOBAL hot_cache.key_buffer_size = 1024*1024; +SET GLOBAL warm_cache.key_buffer_size = 1024*1024; +SET @@global.cold_cache.key_buffer_size = 1024*1024; +SELECT @@global.default.key_buffer_size a, @@global.default.key_cache_block_size b, @@global.default.key_cache_age_threshold c, @@global.default.key_cache_division_limit d; +a b c d +1048576 1024 300 100 +SELECT @@global.hot_cache.key_buffer_size a, @@global.hot_cache.key_cache_block_size b, @@global.hot_cache.key_cache_age_threshold c, @@global.hot_cache.key_cache_division_limit d; +a b c d +1048576 1024 300 100 +SELECT @@global.warm_cache.key_buffer_size a, @@global.warm_cache.key_cache_block_size b, @@global.warm_cache.key_cache_age_threshold c, @@global.warm_cache.key_cache_division_limit d; +a b c d +1048576 1024 300 100 +SELECT @@global.cold_cache.key_buffer_size a, @@global.cold_cache.key_cache_block_size b, @@global.cold_cache.key_cache_age_threshold c, @@global.cold_cache.key_cache_division_limit d; +a b c d +1048576 1024 300 100 +CREATE TABLE t1 ( +a INT, +b VARCHAR(257), +c INT NOT NULL, +PRIMARY KEY (a), +KEY `inx_b` (b), +KEY `inx_c`(c)) +PARTITION BY RANGE (a) +SUBPARTITION BY HASH (a) +(PARTITION p0 VALUES LESS THAN (10) +(SUBPARTITION sp0, +SUBPARTITION sp1), +PARTITION p1 VALUES LESS THAN MAXVALUE +(SUBPARTITION sp2, +SUBPARTITION sp3)); +CREATE TABLE t2 ( +a INT, +b VARCHAR(257), +c INT NOT NULL, +PRIMARY KEY (a), +KEY `inx_b` (b), +KEY `inx_c`(c)); +SET @a:=1167602400; +CREATE VIEW v AS SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4; +CREATE VIEW x AS SELECT 1 FROM v,v a,v b; +INSERT t1 SELECT @a, CONCAT('X_', @a, ' MySQL'), 1167612400 - (@a:=@a+1) FROM x, x a; +DROP VIEW x; +DROP VIEW v; +INSERT t2 SELECT a, b, c FROM t1; +SELECT COUNT(*) FROM t1; +COUNT(*) +4096 +SELECT COUNT(*) FROM t2; +COUNT(*) +4096 +FLUSH TABLES; +# Restrict partitioned commands to partitioned tables only +CACHE INDEX t2 PARTITION (p0) KEY (`inx_b`) IN hot_cache; +ERROR HY000: Partition management on a not partitioned table is not possible +CACHE INDEX t2 PARTITION (p0,`p1`) INDEX (`PRIMARY`) IN hot_cache; +ERROR HY000: Partition management on a not partitioned table is not possible +CACHE INDEX t2 PARTITION (`p1`) INDEX (`PRIMARY`,`inx_b`) IN hot_cache; +ERROR HY000: Partition management on a not partitioned table is not possible +CACHE INDEX t2 PARTITION (ALL) KEY (`inx_b`,`PRIMARY`) IN hot_cache; +ERROR HY000: Partition management on a not partitioned table is not possible +# Basic key cache testing +# The manual correctly says: "The syntax of CACHE INDEX enables you to +# specify that only particular indexes from a table should be assigned +# to the cache. The current implementation assigns all the table's +# indexes to the cache, so there is no reason to specify anything +# other than the table name." +# So the most of the test only tests the syntax +CACHE INDEX t2 INDEX (`inx_b`) IN hot_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +CACHE INDEX t2 KEY (`PRIMARY`) IN warm_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +CACHE INDEX t2 KEY (`PRIMARY`,`inx_b`) IN cold_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +CACHE INDEX t2 INDEX (inx_b,`PRIMARY`) IN default; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +CACHE INDEX t1 PARTITION (p0) KEY (`inx_b`) IN cold_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 PARTITIONS (p0) KEY (`inx_b`) IN cold_cache; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PARTITIONS (p0) KEY (`inx_b`) IN cold_cache' at line 1 +# only one table at a time if specifying partitions +CACHE INDEX t1,t2 PARTITION (p0) KEY (`inx_b`) IN cold_cache; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PARTITION (p0) KEY (`inx_b`) IN cold_cache' at line 1 +CACHE INDEX t1 PARTITION (`p0`,p1) INDEX (`PRIMARY`) IN warm_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 PARTITION (`p1`) INDEX (`PRIMARY`,inx_b) IN hot_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 PARTITION (ALL) KEY (`inx_b`,`PRIMARY`) IN default; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 PARTITION (ALL) IN hot_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 INDEX (`inx_b`) IN default; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 KEY (`PRIMARY`) IN hot_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 KEY (`PRIMARY`,`inx_b`) IN warm_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 INDEX (`inx_b`,`PRIMARY`) IN cold_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +CACHE INDEX t1 IN hot_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +# Test of non existent key cache: +CACHE INDEX t1 IN non_existent_key_cache; +ERROR HY000: Unknown key cache 'non_existent_key_cache' +# Basic testing of LOAD INDEX +LOAD INDEX INTO CACHE t2; +Table Op Msg_type Msg_text +test.t2 preload_keys status OK +# PRIMARY and secondary keys have different block sizes +LOAD INDEX INTO CACHE t2 ignore leaves; +Table Op Msg_type Msg_text +test.t2 preload_keys error Indexes use different block sizes +test.t2 preload_keys status Operation failed +# Must have INDEX or KEY before the index list +LOAD INDEX INTO CACHE t2 (`PRIMARY`); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`PRIMARY`)' at line 1 +# Test of IGNORE LEAVES +LOAD INDEX INTO CACHE t2 INDEX (`PRIMARY`); +Table Op Msg_type Msg_text +test.t2 preload_keys status OK +LOAD INDEX INTO CACHE t2 KEY (`PRIMARY`,`inx_b`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t2 preload_keys error Indexes use different block sizes +test.t2 preload_keys status Operation failed +CACHE INDEX t2 IN warm_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +CACHE INDEX t1 IN cold_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache status OK +LOAD INDEX INTO CACHE t2 KEY (`PRIMARY`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t2 preload_keys error Indexes use different block sizes +test.t2 preload_keys status Operation failed +CACHE INDEX t2 INDEX (`inx_b`, `inx_c`) IN hot_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +LOAD INDEX INTO CACHE t2 KEY (`inx_b`, `inx_c`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t2 preload_keys error Indexes use different block sizes +test.t2 preload_keys status Operation failed +CACHE INDEX t2 IN warm_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +CACHE INDEX t2 INDEX (`PRIMARY`, `inx_c`) IN hot_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +LOAD INDEX INTO CACHE t2 KEY (`PRIMARY`,`inx_c`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t2 preload_keys error Indexes use different block sizes +test.t2 preload_keys status Operation failed +CACHE INDEX t2 INDEX (`inx_b`,`PRIMARY`) IN default; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +LOAD INDEX INTO CACHE t2 KEY (`PRIMARY`,`inx_b`); +Table Op Msg_type Msg_text +test.t2 preload_keys status OK +CACHE INDEX t2 IN default; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache status OK +LOAD INDEX INTO CACHE t2 IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t2 preload_keys error Indexes use different block sizes +test.t2 preload_keys status Operation failed +LOAD INDEX INTO CACHE t2 PARTITION (p1) INDEX (`PRIMARY`); +ERROR HY000: Partition management on a not partitioned table is not possible +LOAD INDEX INTO CACHE t1, t2; +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +test.t2 preload_keys status OK +# only one table at a time if specifying partitions +LOAD INDEX INTO CACHE t1 PARTITION (p0), t2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' t2' at line 1 +LOAD INDEX INTO CACHE t1 IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys error Indexes use different block sizes +test.t1 preload_keys error Subpartition sp2 returned error +test.t1 preload_keys status Operation failed +LOAD INDEX INTO CACHE t1 INDEX (`PRIMARY`); +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +LOAD INDEX INTO CACHE t1 INDEX (`PRIMARY`,`inx_b`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys error Indexes use different block sizes +test.t1 preload_keys error Subpartition sp2 returned error +test.t1 preload_keys status Operation failed +LOAD INDEX INTO CACHE t1 INDEX (`inx_b`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys error Indexes use different block sizes +test.t1 preload_keys error Subpartition sp2 returned error +test.t1 preload_keys status Operation failed +LOAD INDEX INTO CACHE t1 INDEX (`PRIMARY`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys error Indexes use different block sizes +test.t1 preload_keys error Subpartition sp2 returned error +test.t1 preload_keys status Operation failed +LOAD INDEX INTO CACHE t1 INDEX (`PRIMARY`,`inx_b`); +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +LOAD INDEX INTO CACHE t1 PARTITION (p1) INDEX (`PRIMARY`); +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +LOAD INDEX INTO CACHE t1 PARTITION (`p1`,p0) KEY (`PRIMARY`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys error Indexes use different block sizes +test.t1 preload_keys error Subpartition sp2 returned error +test.t1 preload_keys status Operation failed +LOAD INDEX INTO CACHE t1 PARTITION (ALL); +Table Op Msg_type Msg_text +test.t1 preload_keys status OK +LOAD INDEX INTO CACHE t1 PARTITIONS ALL; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PARTITIONS ALL' at line 1 +LOAD INDEX INTO CACHE t1 PARTITION (p1,`p0`) IGNORE LEAVES; +Table Op Msg_type Msg_text +test.t1 preload_keys error Indexes use different block sizes +test.t1 preload_keys error Subpartition sp2 returned error +test.t1 preload_keys status Operation failed +DROP INDEX `inx_b` on t1; +DROP INDEX `inx_b` on t2; +CACHE INDEX t2 PARTITION (p0) KEY (`inx_b`) IN hot_cache; +ERROR HY000: Partition management on a not partitioned table is not possible +CACHE INDEX t2 INDEX (`inx_b`) IN hot_cache; +Table Op Msg_type Msg_text +test.t2 assign_to_keycache Error Key 'inx_b' doesn't exist in table 't2' +test.t2 assign_to_keycache status Operation failed +CACHE INDEX t1 PARTITION (p0) KEY (`inx_b`) IN hot_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache error Subpartition sp0 returned error +test.t1 assign_to_keycache Error Key 'inx_b' doesn't exist in table 't1' +test.t1 assign_to_keycache status Operation failed +CACHE INDEX t1 INDEX (`inx_b`) IN hot_cache; +Table Op Msg_type Msg_text +test.t1 assign_to_keycache error Subpartition sp0 returned error +test.t1 assign_to_keycache Error Key 'inx_b' doesn't exist in table 't1' +test.t1 assign_to_keycache status Operation failed +DROP TABLE t1,t2; +SET GLOBAL hot_cache.key_buffer_size = 0; +SET GLOBAL warm_cache.key_buffer_size = 0; +SET @@global.cold_cache.key_buffer_size = 0; +SELECT @@global.default.key_buffer_size a, @@global.default.key_cache_block_size b, @@global.default.key_cache_age_threshold c, @@global.default.key_cache_division_limit d; +a b c d +1048576 1024 300 100 +SELECT @@global.hot_cache.key_buffer_size a, @@global.hot_cache.key_cache_block_size b, @@global.hot_cache.key_cache_age_threshold c, @@global.hot_cache.key_cache_division_limit d; +a b c d +0 1024 300 100 +SELECT @@global.warm_cache.key_buffer_size a, @@global.warm_cache.key_cache_block_size b, @@global.warm_cache.key_cache_age_threshold c, @@global.warm_cache.key_cache_division_limit d; +a b c d +0 1024 300 100 +SELECT @@global.cold_cache.key_buffer_size a, @@global.cold_cache.key_cache_block_size b, @@global.cold_cache.key_cache_age_threshold c, @@global.cold_cache.key_cache_division_limit d; +a b c d +0 1024 300 100 +SET @@global.default.key_buffer_size = @org_key_cache_buffer_size; diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index 87cb4fba306..0bd7605a5c8 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -1,6 +1,19 @@ drop table if exists t1, t2; create table t1 (a int) partition by range (a) +subpartition by hash(to_seconds(a)) +(partition p0 values less than (1)); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (a) +SUBPARTITION BY HASH (to_seconds(a)) +(PARTITION p0 VALUES LESS THAN (1) ENGINE = MyISAM) */ +drop table t1; +create table t1 (a int) +partition by range (a) ( partition p0 values less than (NULL), partition p1 values less than (MAXVALUE)); ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN @@ -30,6 +43,14 @@ id select_type table partitions type possible_keys key key_len ref rows Extra explain partitions select * from t1 where a < '2007-03-07 23:59:59'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` datetime NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (TO_SECONDS(a)) +(PARTITION p0 VALUES LESS THAN (63340531200) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN (63342604800) ENGINE = MyISAM) */ drop table t1; create table t1 (a date) partition by range(to_seconds(a)) @@ -53,6 +74,14 @@ select * from t1 where a <= '2005-01-01'; a 2003-12-30 2004-12-31 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (to_seconds(a)) +(PARTITION p0 VALUES LESS THAN (63240134400) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN (63271756800) ENGINE = MyISAM) */ drop table t1; create table t1 (a datetime) partition by range(to_seconds(a)) @@ -75,6 +104,14 @@ id select_type table partitions type possible_keys key key_len ref rows Extra select * from t1 where a <= '2005-01-01'; a 2004-01-01 11:59:29 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +/*!50500 PARTITION BY RANGE (to_seconds(a)) +(PARTITION p0 VALUES LESS THAN (63240177600) ENGINE = MyISAM, + PARTITION p1 VALUES LESS THAN (63271800000) ENGINE = MyISAM) */ drop table t1; create table t1 (a int, b char(20)) partition by range columns(a,b) diff --git a/mysql-test/r/partition_utf8.result b/mysql-test/r/partition_utf8.result index 0fae7bb16b6..339871f1f4a 100644 --- a/mysql-test/r/partition_utf8.result +++ b/mysql-test/r/partition_utf8.result @@ -7,7 +7,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2) CHARACTER SET cp1250 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN (_cp1250 0x81) ENGINE = MyISAM) */ drop table t1; create table t1 (a varchar(2) character set cp1250) @@ -18,7 +18,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2) CHARACTER SET cp1250 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN ('€') ENGINE = MyISAM) */ drop table t1; create table t1 (a varchar(1500), b varchar(1570)) @@ -45,7 +45,7 @@ Table Create Table t1 CREATE TABLE `t1` ( `a` varchar(2) CHARACTER SET ucs2 DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/*!50100 PARTITION BY LIST COLUMNS(a) +/*!50500 PARTITION BY LIST COLUMNS(a) (PARTITION p0 VALUES IN ('†') ENGINE = MyISAM, PARTITION p1 VALUES IN ('') ENGINE = MyISAM) */ insert into t1 values (''); diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index c51863b73f7..4f9444c1542 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -2585,10 +2585,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; @@ -2608,10 +2608,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; @@ -2631,10 +2631,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; @@ -2654,10 +2654,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; @@ -2679,10 +2679,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; @@ -2704,10 +2704,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; @@ -2729,10 +2729,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; @@ -2754,10 +2754,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; test_sequence @@ -2822,10 +2822,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 -54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 -55 5 55 55 55 55 55 55 55 55 55 55 -56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 -57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00 +54 5 54 54 54 54 54 54 54 54 54 54 +55 6 55 55 55 55 55 55 55 55 55 55 +56 6 56 56 56 56 56 56 56 56 56 56 +57 6 57 57 57 57 57 57 57 57 57 57 60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL @@ -3039,7 +3039,7 @@ c1 c13 c14 c15 c16 c17 42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 60 NULL NULL 1991-01-01 01:01:01 NULL NULL diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 2670451f24e..772a7462342 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -2568,10 +2568,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; @@ -2591,10 +2591,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; @@ -2614,10 +2614,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; @@ -2637,10 +2637,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; @@ -2662,10 +2662,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; @@ -2687,10 +2687,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; @@ -2712,10 +2712,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; @@ -2737,10 +2737,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; test_sequence @@ -2805,10 +2805,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 -54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 -55 5 55 55 55 55 55 55 55 55 55 55 -56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 -57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00 +54 5 54 54 54 54 54 54 54 54 54 54 +55 6 55 55 55 55 55 55 55 55 55 55 +56 6 56 56 56 56 56 56 56 56 56 56 +57 6 57 57 57 57 57 57 57 57 57 57 60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL @@ -3022,7 +3022,7 @@ c1 c13 c14 c15 c16 c17 42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 60 NULL NULL 1991-01-01 01:01:01 NULL NULL diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index 4372c470b2d..84bf7a6fa00 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -2569,10 +2569,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; @@ -2592,10 +2592,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; @@ -2615,10 +2615,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; @@ -2638,10 +2638,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; @@ -2663,10 +2663,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; @@ -2688,10 +2688,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; @@ -2713,10 +2713,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; @@ -2738,10 +2738,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; test_sequence @@ -2807,7 +2807,7 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 54 5 54 54 54 54 54 54 54 54 54 54 -55 5 55 55 55 55 55 55 55 55 55 55 +55 6 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56 56 56 56 56 56 56 56 57 6 57 57 57 57 57 57 57 57 57 57 60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL @@ -3023,7 +3023,7 @@ c1 c13 c14 c15 c16 c17 42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 60 NULL NULL 1991-01-01 01:01:01 NULL NULL diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index 35a43f7c032..61d2822fd5b 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -2505,10 +2505,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; @@ -2528,10 +2528,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; @@ -2551,10 +2551,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; @@ -2574,10 +2574,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; @@ -2599,10 +2599,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; @@ -2624,10 +2624,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; @@ -2649,10 +2649,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; @@ -2674,10 +2674,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; test_sequence @@ -2742,10 +2742,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 -54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 -55 5 55 55 55 55 55 55 55 55 55 55 -56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 -57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00 +54 5 54 54 54 54 54 54 54 54 54 54 +55 6 55 55 55 55 55 55 55 55 55 55 +56 6 56 56 56 56 56 56 56 56 56 56 +57 6 57 57 57 57 57 57 57 57 57 57 60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL @@ -2959,7 +2959,7 @@ c1 c13 c14 c15 c16 c17 42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 60 NULL NULL 1991-01-01 01:01:01 NULL NULL @@ -5527,10 +5527,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; @@ -5550,10 +5550,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 9.22337e+18 -c8 9.22337203685478e+18 -c9 9.22337203685478e+18 -c10 9.22337203685478e+18 +c7 9.22337e18 +c8 9.223372036854776e18 +c9 9.223372036854776e18 +c10 9.223372036854776e18 c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; @@ -5573,10 +5573,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= '-9223372036854775808' ; @@ -5596,10 +5596,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -9.22337e+18 -c8 -9.22337203685478e+18 -c9 -9.22337203685478e+18 -c10 -9.22337203685478e+18 +c7 -9.22337e18 +c8 -9.223372036854776e18 +c9 -9.223372036854776e18 +c10 -9.223372036854776e18 c12 -9999.9999 execute my_delete ; set @arg00= 1.11111111111111111111e+50 ; @@ -5621,10 +5621,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; @@ -5646,10 +5646,10 @@ c3 8388607 c4 2147483647 c5 2147483647 c6 9223372036854775807 -c7 3.40282e+38 -c8 1.11111111111111e+50 -c9 1.11111111111111e+50 -c10 1.11111111111111e+50 +c7 3.40282e38 +c8 1.111111111111111e50 +c9 1.111111111111111e50 +c10 1.111111111111111e50 c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; @@ -5671,10 +5671,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; set @arg00= '-1.11111111111111111111e+50' ; @@ -5696,10 +5696,10 @@ c3 -8388608 c4 -2147483648 c5 -2147483648 c6 -9223372036854775808 -c7 -3.40282e+38 -c8 -1.11111111111111e+50 -c9 -1.11111111111111e+50 -c10 -1.11111111111111e+50 +c7 -3.40282e38 +c8 -1.111111111111111e50 +c9 -1.111111111111111e50 +c10 -1.111111111111111e50 c12 -9999.9999 execute my_delete ; test_sequence @@ -5764,10 +5764,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 -54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00 -55 5 55 55 55 55 55 55 55 55 55 55 -56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00 -57 6 57 57 57.00 57.00 57.00 57.00 57.00 57.00 57.00 57.00 +54 5 54 54 54 54 54 54 54 54 54 54 +55 6 55 55 55 55 55 55 55 55 55 55 +56 6 56 56 56 56 56 56 56 56 56 56 +57 6 57 57 57 57 57 57 57 57 57 57 60 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 61 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 62 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL @@ -5981,7 +5981,7 @@ c1 c13 c14 c15 c16 c17 42 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 43 0000-00-00 0000-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 50 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 -51 2010-00-00 2010-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 +51 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 52 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 53 2001-00-00 2001-00-00 00:00:00 0000-00-00 00:00:00 838:59:59 0000 60 NULL NULL 1991-01-01 01:01:01 NULL NULL diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index b67fa9322ee..9cde630e4ed 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -176,21 +176,6 @@ a 1 2 3 -select * from t1 union select sql_cache * from t1; -a -1 -2 -3 -select * from t1 where a IN (select sql_cache a from t1); -a -1 -2 -3 -select * from t1 where a IN (select a from t1 union select sql_cache a from t1); -a -1 -2 -3 show status like "Qcache_hits"; Variable_name Value Qcache_hits 4 @@ -207,41 +192,6 @@ a 1 2 3 -select * from t1 union select sql_no_cache * from t1; -a -1 -2 -3 -select * from t1 where a IN (select sql_no_cache a from t1); -a -1 -2 -3 -select * from t1 where a IN (select a from t1 union select sql_no_cache a from t1); -a -1 -2 -3 -select sql_cache sql_no_cache * from t1; -a -1 -2 -3 -select sql_cache * from t1 union select sql_no_cache * from t1; -a -1 -2 -3 -select sql_cache * from t1 where a IN (select sql_no_cache a from t1); -a -1 -2 -3 -select sql_cache * from t1 where a IN (select a from t1 union select sql_no_cache a from t1); -a -1 -2 -3 show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 0 @@ -1490,12 +1440,6 @@ insert into t1 values ('c'); a drop table t1; set GLOBAL query_cache_size= default; -set GLOBAL query_cache_size=1000000; -create table t1 (a char); -insert into t1 values ('c'); -a -drop table t1; -set GLOBAL query_cache_size= default; SET GLOBAL query_cache_size=64*1024*1024; CREATE TABLE t1 (id INT); CREATE PROCEDURE proc29856(IN theUPC TEXT) @@ -1723,4 +1667,55 @@ SELECT 1 FROM t1 GROUP BY 1 DROP TABLE t1; SET GLOBAL query_cache_size= default; +CREATE TABLE t1( a INT ); +SET @v = ( SELECT SQL_CACHE 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 )' at line 1 +SET @v = ( SELECT SQL_NO_CACHE 1 ); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 )' at line 1 +SELECT a FROM t1 WHERE a IN ( SELECT SQL_CACHE a FROM t1 ); +ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list' +SELECT a FROM t1 WHERE a IN ( SELECT SQL_NO_CACHE a FROM t1 ); +ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list' +SELECT ( SELECT SQL_CACHE a FROM t1 ); +ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list' +SELECT ( SELECT SQL_NO_CACHE a FROM t1 ); +ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list' +SELECT SQL_CACHE * FROM t1; +a +SELECT SQL_NO_CACHE * FROM t1; +a +SELECT * FROM t1 UNION SELECT SQL_CACHE * FROM t1; +ERROR 42000: Incorrect usage/placement of 'SQL_CACHE' +SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; +ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE' +SELECT * FROM t1 WHERE a IN (SELECT SQL_CACHE a FROM t1); +ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list' +SELECT * FROM t1 WHERE a IN (SELECT a FROM t1 UNION SELECT SQL_CACHE a FROM t1); +ERROR 42S22: Unknown column 'SQL_CACHE' in 'field list' +SELECT * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; +ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE' +SELECT * FROM t1 WHERE a IN (SELECT SQL_NO_CACHE a FROM t1); +ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list' +SELECT * FROM t1 WHERE a IN +(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1); +ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list' +SELECT SQL_CACHE SQL_NO_CACHE * FROM t1; +ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE +SELECT SQL_NO_CACHE SQL_CACHE * FROM t1; +ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE +SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1; +ERROR 42000: Incorrect usage/placement of 'SQL_CACHE' +SELECT SQL_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; +ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE' +SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_CACHE * FROM t1; +ERROR 42000: Incorrect usage/placement of 'SQL_CACHE' +SELECT SQL_NO_CACHE * FROM t1 UNION SELECT SQL_NO_CACHE * FROM t1; +ERROR 42000: Incorrect usage/placement of 'SQL_NO_CACHE' +SELECT SQL_CACHE * FROM t1 WHERE a IN +(SELECT SQL_NO_CACHE a FROM t1); +ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list' +SELECT SQL_CACHE * FROM t1 WHERE a IN +(SELECT a FROM t1 UNION SELECT SQL_NO_CACHE a FROM t1); +ERROR 42S22: Unknown column 'SQL_NO_CACHE' in 'field list' +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index ff2dd49e725..41dd44fc4d0 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2784,26 +2784,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away select max(key1) from t1 where key1 <= 0.6158; max(key1) -0.615800023078918 +0.6158000230789185 select max(key2) from t2 where key2 <= 1.6158; max(key2) -1.61580002307892 +1.6158000230789185 select min(key1) from t1 where key1 >= 0.3762; min(key1) -0.376199990510941 +0.37619999051094055 select min(key2) from t2 where key2 >= 1.3762; min(key2) -1.37619996070862 +1.3761999607086182 select max(key1), min(key2) from t1, t2 where key1 <= 0.6158 and key2 >= 1.3762; max(key1) min(key2) -0.615800023078918 1.37619996070862 +0.6158000230789185 1.3761999607086182 select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5; max(key1) -0.615800023078918 +0.6158000230789185 select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) -0.376199990510941 +0.37619999051094055 DROP TABLE t1,t2; CREATE TABLE t1 (i BIGINT UNSIGNED NOT NULL); INSERT INTO t1 VALUES (10); diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 4e40c48305d..c6276f319a1 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -737,20 +737,11 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()` binary binary DROP VIEW v1; CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE NOW(); -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()` binary binary -DROP VIEW v1; +ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE CREATE VIEW v1 AS SELECT SQL_NO_CACHE SQL_CACHE NOW(); -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()` binary binary -DROP VIEW v1; +ERROR HY000: Incorrect usage of SQL_NO_CACHE and SQL_CACHE CREATE VIEW v1 AS SELECT SQL_CACHE SQL_NO_CACHE SQL_CACHE NOW(); -SHOW CREATE VIEW v1; -View Create View character_set_client collation_connection -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select sql_no_cache now() AS `NOW()` binary binary -DROP VIEW v1; +ERROR HY000: Incorrect usage of SQL_CACHE and SQL_NO_CACHE CREATE PROCEDURE p1() BEGIN SET @s= 'CREATE VIEW v1 AS SELECT SQL_CACHE 1'; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 662e466d43e..fb5eada9083 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -579,7 +579,7 @@ return 2.7182818284590452354| set @e = e()| select e(), @e| e() @e -2.71828182845905 2.71828182845905 +2.718281828459045 2.718281828459045 drop function if exists inc| create function inc(i int) returns int return i+1| @@ -616,23 +616,23 @@ create function fun(d double, i int, u int unsigned) returns double return mul(inc(i), fac(u)) / e()| select fun(2.3, 3, 5)| fun(2.3, 3, 5) -176.582131762292 +176.58213176229233 insert into t2 values (append("xxx", "yyy"), mul(4,3), e())| insert into t2 values (append("a", "b"), mul(2,mul(3,4)), fun(1.7, 4, 6))| select * from t2 where s = append("a", "b")| s i d -ab 24 1324.36598821719 +ab 24 1324.3659882171924 select * from t2 where i = mul(4,3) or i = mul(mul(3,4),2) order by i| s i d -xxxyyy 12 2.71828182845905 -ab 24 1324.36598821719 +xxxyyy 12 2.718281828459045 +ab 24 1324.3659882171924 select * from t2 where d = e()| s i d -xxxyyy 12 2.71828182845905 +xxxyyy 12 2.718281828459045 select * from t2 order by i| s i d -xxxyyy 12 2.71828182845905 -ab 24 1324.36598821719 +xxxyyy 12 2.718281828459045 +ab 24 1324.3659882171924 delete from t2| drop function e| drop function inc| @@ -5970,9 +5970,9 @@ CREATE TABLE t3 (f1 INT, f2 FLOAT)| INSERT INTO t3 VALUES (1, 3.4), (1, 2), (1, 0.9), (2, 8), (2, 7)| SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP| SUM(f2) bug25373(f1) -6.30000007152557 1 +6.300000071525574 1 15 2 -21.3000000715256 NULL +21.300000071525574 NULL DROP FUNCTION bug25373| DROP TABLE t3| DROP DATABASE IF EXISTS mysqltest1| diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 897c9072203..bdb7576f95e 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -873,14 +873,14 @@ Warning 1264 Out of range value for column 'col2' at row 1 SELECT * FROM t1; col1 col2 -1.1e-37 0 -3.4e+38 3.4e+38 +3.4e38 3.4e38 -1.1e-37 0 -3.4e+38 3.4e+38 +3.4e38 3.4e38 0 NULL 2 NULL NULL NULL -3.40282e+38 0 -3.40282e+38 0 +3.40282e38 0 +3.40282e38 0 DROP TABLE t1; CREATE TABLE t1 (col1 DOUBLE PRECISION, col2 DOUBLE PRECISION UNSIGNED); INSERT INTO t1 VALUES (-2.2E-307,0),(2E-307,0),(+1.7E+308,+1.7E+308); @@ -922,14 +922,14 @@ SELECT * FROM t1; col1 col2 -2.2e-307 0 1e-303 0 -NULL 1.7e+308 +NULL 1.7e308 -2.2e-307 0 -2e-307 0 -NULL 1.7e+308 +NULL 1.7e308 0 NULL 2 NULL NULL NULL -1.79769313486232e+308 0 +1.7976931348623157e308 0 DROP TABLE t1; CREATE TABLE t1 (col1 CHAR(5), col2 VARCHAR(6)); INSERT INTO t1 VALUES ('hello', 'hello'),('he', 'he'),('hello ', 'hello '); diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index 67898b7f335..d131fa2b4d5 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -796,6 +796,18 @@ SELECT ROUND(qty,3), dps, ROUND(qty,dps) FROM t1; ROUND(qty,3) dps ROUND(qty,dps) 1.133 3 1.133000 DROP TABLE t1; +create table t1 (c1 decimal(10,6)); +insert into t1 (c1) values (9.99e-4); +insert into t1 (c1) values (9.98e-4); +insert into t1 (c1) values (0.000999); +insert into t1 (c1) values (cast(9.99e-4 as decimal(10,6))); +select * from t1; +c1 +0.000999 +0.000998 +0.000999 +0.000999 +drop table t1; SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%'; % 0.012345687012345687012345687012345687012345687012345687012345687012345687000000000 diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index a3a13bb0435..546e281ee67 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -2,9 +2,9 @@ drop table if exists t1,t2; SELECT 10,10.0,10.,.1e+2,100.0e-1; 10 10.0 10. .1e+2 100.0e-1 10 10.0 10 10 10 -SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000; -6e-05 -6e-05 --6e-05 -6e-05+1.000000 -6e-05 -6e-05 6e-05 0.99994 +SELECT 6e-16, -6e-16, --6e-16, -6e-16+1.000000; +6e-16 -6e-16 --6e-16 -6e-16+1.000000 +6e-16 -6e-16 6e-16 0.9999999999999994 SELECT 1e1,1.e1,1.0e1,1e+1,1.e+1,1.0e+1,1e-1,1.e-1,1.0e-1; 1e1 1.e1 1.0e1 1e+1 1.e+1 1.0e+1 1e-1 1.e-1 1.0e-1 10 10 10 10 10 10 0.1 0.1 0.1 @@ -31,16 +31,16 @@ select * from t1; f1 f2 10 10 100000 100000 -1.23457e+09 1234567890 -1e+10 10000000000 -1e+15 1e+15 -1e+20 1e+20 -3.40282e+38 1e+50 -3.40282e+38 1e+150 +1234570000 1234567890 +10000000000 10000000000 +1e15 1e15 +1e20 1e20 +3.40282e38 1e50 +3.40282e38 1e150 -10 -10 -1e-05 1e-05 -1e-10 1e-10 -1e-15 1e-15 +0.00001 0.00001 +0.0000000001 0.0000000001 +0.000000000000001 0.000000000000001 1e-20 1e-20 0 1e-50 0 1e-150 @@ -87,7 +87,7 @@ col create table t2 select c1 + c1 * (c2 / 100) as col1, round(c1, 5) as col2, round(c1, 35) as col3, sqrt(c1*1e-15) col4 from t1; select * from t2; col1 col2 col3 col4 -140.36 121.00000 121 3.47850542618522e-07 +140.36 121.00000 121 0.00000034785054261852176 show create table t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -201,9 +201,9 @@ insert into t1 values (2e5),(2e6),(2e-4),(2e-5); select * from t1; c 200000 -2e+06 +2e6 0.0002 -2e-05 +2e-5 drop table t1; CREATE TABLE t1 ( reckey int unsigned NOT NULL, @@ -267,7 +267,7 @@ select 1e-308, 1.00000001e-300, 100000000e-300; 1e-308 1.00000001e-300 1e-292 select 10e307; 10e307 -1e+308 +1e308 create table t1(a int, b double(8, 2)); insert into t1 values (1, 28.50), (1, 121.85), (1, 157.23), (1, 1351.00), (1, -1965.35), (1, 81.75), @@ -369,12 +369,12 @@ Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 2 select f1 + 0e0 from t1; f1 + 0e0 -1e+199 --1e+199 -1e+200 --1e+200 -1e+200 --1e+200 +1e199 +-1e199 +1e200 +-1e200 +1e200 +-1e200 drop table t1; create table t1 (f1 float(30, 0)); insert into t1 values (1e29), (-1e29); @@ -385,12 +385,36 @@ Warning 1264 Out of range value for column 'f1' at row 1 Warning 1264 Out of range value for column 'f1' at row 2 select f1 + 0e0 from t1; f1 + 0e0 -1.00000001504747e+29 --1.00000001504747e+29 -1.00000001504747e+30 --1.00000001504747e+30 -1.00000001504747e+30 --1.00000001504747e+30 +1.0000000150474662e29 +-1.0000000150474662e29 +1.0000000150474662e30 +-1.0000000150474662e30 +1.0000000150474662e30 +-1.0000000150474662e30 +drop table t1; +create table t1 (c char(6)); +insert into t1 values (2e6),(2e-5); +select * from t1; +c +2e6 +2e-5 +drop table t1; +CREATE TABLE d1 (d DOUBLE); +INSERT INTO d1 VALUES (1.7976931348623157E+308); +SELECT * FROM d1; +d +1.7976931348623157e308 +INSERT INTO d1 VALUES (1.79769313486232e+308); +ERROR 22007: Illegal double '1.79769313486232e+308' value found during parsing +SELECT * FROM d1; +d +1.7976931348623157e308 +DROP TABLE d1; +create table t1 (a char(20)); +insert into t1 values (1.225e-05); +select a+0 from t1; +a+0 +0.00001225 drop table t1; create table t1(d double, u bigint unsigned); insert into t1(d) values (9.22337203685479e18), @@ -405,6 +429,6 @@ CREATE TABLE t1 (f1 DOUBLE); INSERT INTO t1 VALUES(-1.79769313486231e+308); SELECT f1 FROM t1; f1 --1.79769313486231e+308 +-1.79769313486231e308 DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result index 172b343e003..00526597a32 100644 --- a/mysql-test/r/type_newdecimal.result +++ b/mysql-test/r/type_newdecimal.result @@ -917,7 +917,7 @@ cast('1.00000001335143196001808973960578441619873046875E-10' as decimal(30,15)) 0.000000000100000 select ln(14000) c1, convert(ln(14000),decimal(5,3)) c2, cast(ln(14000) as decimal(5,3)) c3; c1 c2 c3 -9.5468126085974 9.547 9.547 +9.546812608597396 9.547 9.547 select convert(ln(14000),decimal(2,3)) c1; ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column ''). select cast(ln(14000) as decimal(2,3)) c1; @@ -1141,17 +1141,17 @@ my_float my_double my_varchar 1.17549e-18 1.175494345e-18 1.175494345e-18 1.17549e-17 1.175494345e-17 1.175494345e-17 1.17549e-16 1.175494345e-16 1.175494345e-16 -1.17549e-15 1.175494345e-15 1.175494345e-15 -1.17549e-14 1.175494345e-14 1.175494345e-14 -1.17549e-13 1.175494345e-13 1.175494345e-13 -1.17549e-12 1.175494345e-12 1.175494345e-12 -1.17549e-11 1.175494345e-11 1.175494345e-11 -1.17549e-10 1.175494345e-10 1.175494345e-10 -1.17549e-09 1.175494345e-09 1.175494345e-9 -1.17549e-08 1.175494345e-08 1.175494345e-8 -1.17549e-07 1.175494345e-07 1.175494345e-7 -1.17549e-06 1.175494345e-06 1.175494345e-6 -1.17549e-05 1.175494345e-05 1.175494345e-5 +0.00000000000000117549 0.000000000000001175494345 1.175494345e-15 +0.0000000000000117549 0.00000000000001175494345 1.175494345e-14 +0.000000000000117549 0.0000000000001175494345 1.175494345e-13 +0.00000000000117549 0.000000000001175494345 1.175494345e-12 +0.0000000000117549 0.00000000001175494345 1.175494345e-11 +0.000000000117549 0.0000000001175494345 1.175494345e-10 +0.00000000117549 0.000000001175494345 1.175494345e-9 +0.0000000117549 0.00000001175494345 1.175494345e-8 +0.000000117549 0.0000001175494345 1.175494345e-7 +0.00000117549 0.000001175494345 1.175494345e-6 +0.0000117549 0.00001175494345 1.175494345e-5 0.000117549 0.0001175494345 1.175494345e-4 0.00117549 0.001175494345 1.175494345e-3 0.0117549 0.01175494345 1.175494345e-2 @@ -1175,21 +1175,21 @@ CAST(my_float AS DECIMAL(65,30)) my_float 0.000000000000000001175494374380 1.17549e-18 0.000000000000000011754943743802 1.17549e-17 0.000000000000000117549432474939 1.17549e-16 -0.000000000000001175494324749389 1.17549e-15 -0.000000000000011754943671010360 1.17549e-14 -0.000000000000117549429933840000 1.17549e-13 -0.000000000001175494380653563000 1.17549e-12 -0.000000000011754943372854760000 1.17549e-11 -0.000000000117549428524377200000 1.17549e-10 -0.000000001175494368510499000000 1.17549e-09 -0.000000011754943685104990000000 1.17549e-08 -0.000000117549433298336200000000 1.17549e-07 -0.000001175494389826781000000000 1.17549e-06 -0.000011754943443520460000000000 1.17549e-05 +0.000000000000001175494324749389 0.00000000000000117549 +0.000000000000011754943671010362 0.0000000000000117549 +0.000000000000117549429933840040 0.000000000000117549 +0.000000000001175494380653563400 0.00000000000117549 +0.000000000011754943372854765000 0.0000000000117549 +0.000000000117549428524377220000 0.000000000117549 +0.000000001175494368510499000000 0.00000000117549 +0.000000011754943685104990000000 0.0000000117549 +0.000000117549433298336230000000 0.000000117549 +0.000001175494389826781100000000 0.00000117549 +0.000011754943443520460000000000 0.0000117549 0.000117549432616215200000000000 0.000117549 -0.001175494398921728000000000000 0.00117549 -0.011754943057894710000000000000 0.0117549 -0.117549434304237400000000000000 0.117549 +0.001175494398921728100000000000 0.00117549 +0.011754943057894707000000000000 0.0117549 +0.117549434304237370000000000000 0.117549 SELECT CAST(my_double AS DECIMAL(65,30)), my_double FROM t1; CAST(my_double AS DECIMAL(65,30)) my_double 0.000000000000000000000000000000 1.175494345e-32 @@ -1209,17 +1209,17 @@ CAST(my_double AS DECIMAL(65,30)) my_double 0.000000000000000001175494345000 1.175494345e-18 0.000000000000000011754943450000 1.175494345e-17 0.000000000000000117549434500000 1.175494345e-16 -0.000000000000001175494345000000 1.175494345e-15 -0.000000000000011754943450000000 1.175494345e-14 -0.000000000000117549434500000000 1.175494345e-13 -0.000000000001175494345000000000 1.175494345e-12 -0.000000000011754943450000000000 1.175494345e-11 -0.000000000117549434500000000000 1.175494345e-10 -0.000000001175494345000000000000 1.175494345e-09 -0.000000011754943450000000000000 1.175494345e-08 -0.000000117549434500000000000000 1.175494345e-07 -0.000001175494345000000000000000 1.175494345e-06 -0.000011754943450000000000000000 1.175494345e-05 +0.000000000000001175494345000000 0.000000000000001175494345 +0.000000000000011754943450000000 0.00000000000001175494345 +0.000000000000117549434500000000 0.0000000000001175494345 +0.000000000001175494345000000000 0.000000000001175494345 +0.000000000011754943450000000000 0.00000000001175494345 +0.000000000117549434500000000000 0.0000000001175494345 +0.000000001175494345000000000000 0.000000001175494345 +0.000000011754943450000000000000 0.00000001175494345 +0.000000117549434500000000000000 0.0000001175494345 +0.000001175494345000000000000000 0.000001175494345 +0.000011754943450000000000000000 0.00001175494345 0.000117549434500000000000000000 0.0001175494345 0.001175494345000000000000000000 0.001175494345 0.011754943450000000000000000000 0.01175494345 @@ -1278,21 +1278,21 @@ my_decimal my_float 0.000000000000000001175494374380 1.17549e-18 0.000000000000000011754943743802 1.17549e-17 0.000000000000000117549432474939 1.17549e-16 -0.000000000000001175494324749389 1.17549e-15 -0.000000000000011754943671010360 1.17549e-14 -0.000000000000117549429933840000 1.17549e-13 -0.000000000001175494380653563000 1.17549e-12 -0.000000000011754943372854760000 1.17549e-11 -0.000000000117549428524377200000 1.17549e-10 -0.000000001175494368510499000000 1.17549e-09 -0.000000011754943685104990000000 1.17549e-08 -0.000000117549433298336200000000 1.17549e-07 -0.000001175494389826781000000000 1.17549e-06 -0.000011754943443520460000000000 1.17549e-05 +0.000000000000001175494324749389 0.00000000000000117549 +0.000000000000011754943671010362 0.0000000000000117549 +0.000000000000117549429933840040 0.000000000000117549 +0.000000000001175494380653563400 0.00000000000117549 +0.000000000011754943372854765000 0.0000000000117549 +0.000000000117549428524377220000 0.000000000117549 +0.000000001175494368510499000000 0.00000000117549 +0.000000011754943685104990000000 0.0000000117549 +0.000000117549433298336230000000 0.000000117549 +0.000001175494389826781100000000 0.00000117549 +0.000011754943443520460000000000 0.0000117549 0.000117549432616215200000000000 0.000117549 -0.001175494398921728000000000000 0.00117549 -0.011754943057894710000000000000 0.0117549 -0.117549434304237400000000000000 0.117549 +0.001175494398921728100000000000 0.00117549 +0.011754943057894707000000000000 0.0117549 +0.117549434304237370000000000000 0.117549 UPDATE t1 SET my_decimal = my_double; SELECT my_decimal, my_double FROM t1; my_decimal my_double @@ -1313,17 +1313,17 @@ my_decimal my_double 0.000000000000000001175494345000 1.175494345e-18 0.000000000000000011754943450000 1.175494345e-17 0.000000000000000117549434500000 1.175494345e-16 -0.000000000000001175494345000000 1.175494345e-15 -0.000000000000011754943450000000 1.175494345e-14 -0.000000000000117549434500000000 1.175494345e-13 -0.000000000001175494345000000000 1.175494345e-12 -0.000000000011754943450000000000 1.175494345e-11 -0.000000000117549434500000000000 1.175494345e-10 -0.000000001175494345000000000000 1.175494345e-09 -0.000000011754943450000000000000 1.175494345e-08 -0.000000117549434500000000000000 1.175494345e-07 -0.000001175494345000000000000000 1.175494345e-06 -0.000011754943450000000000000000 1.175494345e-05 +0.000000000000001175494345000000 0.000000000000001175494345 +0.000000000000011754943450000000 0.00000000000001175494345 +0.000000000000117549434500000000 0.0000000000001175494345 +0.000000000001175494345000000000 0.000000000001175494345 +0.000000000011754943450000000000 0.00000000001175494345 +0.000000000117549434500000000000 0.0000000001175494345 +0.000000001175494345000000000000 0.000000001175494345 +0.000000011754943450000000000000 0.00000001175494345 +0.000000117549434500000000000000 0.0000001175494345 +0.000001175494345000000000000000 0.000001175494345 +0.000011754943450000000000000000 0.00001175494345 0.000117549434500000000000000000 0.0001175494345 0.001175494345000000000000000000 0.001175494345 0.011754943450000000000000000000 0.01175494345 diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index f98872d93b3..95e374cc384 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -57,7 +57,7 @@ select @`select`,@not_used; set @test_int=10,@test_double=1e-10,@test_string="abcdeghi",@test_string2="abcdefghij",@select=NULL; select @test_int,@test_double,@test_string,@test_string2,@select; @test_int @test_double @test_string @test_string2 @select -10 1e-10 abcdeghi abcdefghij NULL +10 0.0000000001 abcdeghi abcdefghij NULL set @test_int="hello",@test_double="hello",@test_string="hello",@test_string2="hello"; select @test_int,@test_double,@test_string,@test_string2; @test_int @test_double @test_string @test_string2 diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index c66b05c7db7..4c0acc2eb6a 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2588,7 +2588,7 @@ CREATE VIEW v1 AS SELECT SQRT(a) my_sqrt FROM t1; SELECT my_sqrt FROM v1 ORDER BY my_sqrt; my_sqrt 1 -1.4142135623731 +1.4142135623730951 DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (id int PRIMARY KEY); |