diff options
Diffstat (limited to 'mysql-test/r')
87 files changed, 2918 insertions, 974 deletions
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 4c70e72bdfb..4268b121b1d 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -7,7 +7,7 @@ select 9223372036854775807,-009223372036854775808; 9223372036854775807 -9223372036854775808 select +9999999999999999999,-9999999999999999999; 9999999999999999999 -9999999999999999999 -9999999999999999999 -10000000000000000000 +9999999999999999999 -9999999999999999999 select cast(9223372036854775808 as unsigned)+1; cast(9223372036854775808 as unsigned)+1 9223372036854775809 @@ -16,7 +16,7 @@ select 9223372036854775808+1; 9223372036854775809 select -(0-3),round(-(0-3)), round(9999999999999999999); -(0-3) round(-(0-3)) round(9999999999999999999) -3 3 10000000000000000000 +3 3 9999999999999999999 create table t1 (a bigint unsigned not null, primary key(a)); insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612); select * from t1; diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result index 1f2d60fb79a..1ca913e1259 100644 --- a/mysql-test/r/case.result +++ b/mysql-test/r/case.result @@ -91,7 +91,10 @@ CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5, CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6, CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7, CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8, -CASE WHEN 1 THEN 1.0 END AS c9 +CASE WHEN 1 THEN 1.0 END AS c9, +CASE WHEN 1 THEN 0.1e1 else 0.1 END AS c10, +CASE WHEN 1 THEN 0.1e1 else 1 END AS c11, +CASE WHEN 1 THEN 0.1e1 else '1' END AS c12 ; SHOW CREATE TABLE t1; Table Create Table @@ -100,11 +103,14 @@ t1 CREATE TABLE `t1` ( `c2` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '', `c3` varbinary(1) NOT NULL default '', `c4` varbinary(1) NOT NULL default '', - `c5` varbinary(3) NOT NULL default '', - `c6` varbinary(3) NOT NULL default '', - `c7` double(3,1) NOT NULL default '0.0', - `c8` double(3,1) NOT NULL default '0.0', - `c9` double(3,1) default NULL + `c5` varbinary(4) NOT NULL default '', + `c6` varbinary(4) NOT NULL default '', + `c7` decimal(5,1) NOT NULL default '0.0', + `c8` decimal(5,1) NOT NULL default '0.0', + `c9` decimal(5,1) default NULL, + `c10` double NOT NULL default '0', + `c11` double NOT NULL default '0', + `c12` varbinary(5) NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; SELECT CASE @@ -146,11 +152,11 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `COALESCE(1)` int(1) NOT NULL default '0', - `COALESCE(1.0)` double(3,1) NOT NULL default '0.0', + `COALESCE(1.0)` decimal(5,1) NOT NULL default '0.0', `COALESCE('a')` varchar(1) NOT NULL default '', - `COALESCE(1,1.0)` double(3,1) NOT NULL default '0.0', + `COALESCE(1,1.0)` decimal(5,1) NOT NULL default '0.0', `COALESCE(1,'1')` varbinary(1) NOT NULL default '', - `COALESCE(1.1,'1')` varbinary(3) NOT NULL default '', + `COALESCE(1.1,'1')` varbinary(4) NOT NULL default '', `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) character set latin1 collate latin1_bin NOT NULL default '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; diff --git a/mysql-test/r/client_xml.result b/mysql-test/r/client_xml.result new file mode 100644 index 00000000000..a4164148159 --- /dev/null +++ b/mysql-test/r/client_xml.result @@ -0,0 +1,74 @@ +create table t1 ( +`a&b` int, +`a<b` int, +`a>b` text +); +insert into t1 values (1, 2, 'a&b a<b a>b'); +<?xml version="1.0"?> + +<resultset statement="select * from t1 +"> + <row> + <field name="a&b">1</field> + <field name="a<b">2</field> + <field name="a>b">a&b a<b a>b</field> + </row> +</resultset> +<?xml version="1.0"?> +<mysqldump> +<database name="test"> + <table_structure name="t1"> + <field Field="a&b" Type="int(11)" Null="YES" Key="" Extra="" /> + <field Field="a<b" Type="int(11)" Null="YES" Key="" Extra="" /> + <field Field="a>b" Type="text" Null="YES" Key="" Extra="" /> + </table_structure> + <table_data name="t1"> + <row> + <field name="a&b">1</field> + <field name="a<b">2</field> + <field name="a>b">a&b a<b a>b</field> + </row> + </table_data> +</database> +</mysqldump> +<?xml version="1.0"?> + +<resultset statement="select count(*) from t1 +"> + <row> + <field name="count(*)">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 < 2 from dual +"> + <row> + <field name="1 < 2">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 > 2 from dual +"> + <row> + <field name="1 > 2">0</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 & 3 from dual +"> + <row> + <field name="1 & 3">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select null from dual +"> + <row> + <field name="NULL">NULL</field> + </row> +</resultset> +drop table t1; diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result index bf8a5106044..6f667aabac0 100644 --- a/mysql-test/r/compare.result +++ b/mysql-test/r/compare.result @@ -36,3 +36,9 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ') 6109 -1 -1 61 0 0 DROP TABLE t1; +SELECT CHAR(31) = '', '' = CHAR(31); +CHAR(31) = '' '' = CHAR(31) +0 0 +SELECT CHAR(30) = '', '' = CHAR(30); +CHAR(30) = '' '' = CHAR(30) +0 0 diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 05d1ba026ba..1c378f88e5c 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -103,9 +103,9 @@ Field Type Null Key Default Extra a datetime NO 0000-00-00 00:00:00 b time NO 00:00:00 c date NO 0000-00-00 -d bigint(17) NO 0 -e double(18,1) NO 0.0 -f bigint(17) NO 0 +d int(2) NO 0 +e decimal(6,1) NO 0.0 +f bigint(18) NO 0 drop table t2; create table t2 select CAST("2001-12-29" AS DATE) as d, CAST("20:45:11" AS TIME) as t, CAST("2001-12-29 20:45:11" AS DATETIME) as dt; describe t2; @@ -418,7 +418,7 @@ d date YES NULL e varchar(1) NO f datetime YES NULL g time YES NULL -h longblob NO +h varbinary(23) NO dd time YES NULL select * from t2; a b c d e f g h dd @@ -437,7 +437,7 @@ t2 CREATE TABLE `t2` ( `ifnull(e,e)` bigint(20) default NULL, `ifnull(f,f)` float(3,2) default NULL, `ifnull(g,g)` double(4,3) default NULL, - `ifnull(h,h)` decimal(5,4) default NULL, + `ifnull(h,h)` decimal(6,4) default NULL, `ifnull(i,i)` year(4) default NULL, `ifnull(j,j)` date default NULL, `ifnull(k,k)` datetime NOT NULL default '0000-00-00 00:00:00', diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index a6ca59fc62b..fe2d76c8ab3 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -526,13 +526,14 @@ insert into t2 values (@v); show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 User var 1 135 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci -master-bin.000001 135 Query 1 218 use `test`; insert into t2 values (@v) +master-bin.000001 135 Query 1 225 use `test`; insert into t2 values (@v) /*!40019 SET @@session.max_insert_delayed_threads=0*/; SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`; use test; SET TIMESTAMP=10000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t2 values (@v); drop table t2; set names latin1; diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index da2bb9081de..071cb673501 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -330,6 +330,15 @@ SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MA min max avg 10.00 10.00 10 DROP TABLE t1; +create table t1 (a integer, b integer); +insert into t1 values (1,4), (2,2),(2,2), (4,1),(4,1),(4,1),(4,1); +select distinct sum(b) from t1 group by a; +sum(b) +4 +select distinct sum(b) from (select a,b from t1) y group by a; +sum(b) +4 +drop table t1; CREATE TABLE t1 (a char(10), b char(10)); INSERT INTO t1 VALUES ('root','localhost'), ('root','%'); SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c; diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 1e1d6f96eb7..177994b488d 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -462,5 +462,5 @@ rout int(11) default '0' INSERT INTO t1 VALUES ('1',1,0); SELECT DISTINCT html,SUM(rout)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin; html prod -1 0.00 +1 0.00000 drop table t1; diff --git a/mysql-test/r/drop_temp_table.result b/mysql-test/r/drop_temp_table.result index 34c08f08788..163fc845e88 100644 --- a/mysql-test/r/drop_temp_table.result +++ b/mysql-test/r/drop_temp_table.result @@ -1,7 +1,9 @@ reset master; create database `drop-temp+table-test`; use `drop-temp+table-test`; +create temporary table shortn1 (a int); create temporary table `table:name` (a int); +create temporary table shortn2 (a int); select get_lock("a",10); get_lock("a",10) 1 @@ -10,9 +12,13 @@ get_lock("a",10) 1 show binlog events; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 206 create database `drop-temp+table-test` -master-bin.000001 206 Query 1 322 use `drop-temp+table-test`; create temporary table `table:name` (a int) -master-bin.000001 322 Query 1 473 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name` -master-bin.000001 473 Query 1 566 use `drop-temp+table-test`; DO RELEASE_LOCK("a") +master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 +master-bin.000001 # Query 1 # create database `drop-temp+table-test` +master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int) +master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int) +master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int) +master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2` +master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name` +master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn1` +master-bin.000001 # Query 1 # use `drop-temp+table-test`; DO RELEASE_LOCK("a") drop database `drop-temp+table-test`; diff --git a/mysql-test/r/func_equal.result b/mysql-test/r/func_equal.result index 352b76f2744..fe5e5b1b371 100644 --- a/mysql-test/r/func_equal.result +++ b/mysql-test/r/func_equal.result @@ -1,7 +1,7 @@ drop table if exists t1,t2; -select 0<=>0,0.0<=>0.0,"A"<=>"A",NULL<=>NULL; -0<=>0 0.0<=>0.0 "A"<=>"A" NULL<=>NULL -1 1 1 1 +select 0<=>0,0.0<=>0.0,0E0=0E0,"A"<=>"A",NULL<=>NULL; +0<=>0 0.0<=>0.0 0E0=0E0 "A"<=>"A" NULL<=>NULL +1 1 1 1 1 select 1<=>0,0<=>NULL,NULL<=>0; 1<=>0 0<=>NULL NULL<=>0 0 0 0 @@ -11,6 +11,12 @@ select 1.0<=>0.0,0.0<=>NULL,NULL<=>0.0; select "A"<=>"B","A"<=>NULL,NULL<=>"A"; "A"<=>"B" "A"<=>NULL NULL<=>"A" 0 0 0 +select 0<=>0.0, 0.0<=>0E0, 0E0<=>"0", 10.0<=>1E1, 10<=>10.0, 10<=>1E1; +0<=>0.0 0.0<=>0E0 0E0<=>"0" 10.0<=>1E1 10<=>10.0 10<=>1E1 +1 1 1 1 1 1 +select 1.0<=>0E1,10<=>NULL,NULL<=>0.0, NULL<=>0E0; +1.0<=>0E1 10<=>NULL NULL<=>0.0 NULL<=>0E0 +0 0 0 0 create table t1 (id int, value int); create table t2 (id int, value int); insert into t1 values (1,null); diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index df95193043e..fdadd378ceb 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -737,3 +737,15 @@ one 2 two 2 three 1 drop table t1; +create table t1(f1 datetime); +insert into t1 values (now()); +create table t2 select f2 from (select max(now()) f2 from t1) a; +show columns from t2; +Field Type Null Key Default Extra +f2 datetime NO 0000-00-00 00:00:00 +drop table t2; +create table t2 select f2 from (select now() f2 from t1) a; +show columns from t2; +Field Type Null Key Default Extra +f2 datetime NO 0000-00-00 00:00:00 +drop table t2, t1; diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 5a9f0f68228..2d464c891bf 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -28,3 +28,24 @@ length(format('nan', 2)) > 0 select concat("$",format(2500,2)); concat("$",format(2500,2)) $2,500.00 +create table t1 ( a timestamp ); +insert into t1 values ( '2004-01-06 12:34' ); +select a from t1 where left(a+0,6) in ( left(20040106,6) ); +a +2004-01-06 12:34:00 +select a from t1 where left(a+0,6) = ( left(20040106,6) ); +a +2004-01-06 12:34:00 +select a from t1 where right(a+0,6) in ( right(20040106123400,6) ); +a +2004-01-06 12:34:00 +select a from t1 where right(a+0,6) = ( right(20040106123400,6) ); +a +2004-01-06 12:34:00 +select a from t1 where mid(a+0,6,3) in ( mid(20040106123400,6,3) ); +a +2004-01-06 12:34:00 +select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) ); +a +2004-01-06 12:34:00 +drop table t1; diff --git a/mysql-test/r/func_op.result b/mysql-test/r/func_op.result index 6cd975b0911..5f89fe7b727 100644 --- a/mysql-test/r/func_op.result +++ b/mysql-test/r/func_op.result @@ -1,6 +1,6 @@ select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2; 1+1 1-1 1+1*2 8/5 8%5 mod(8,5) mod(8,5)|0 -(1+1)*-2 -2 0 3 1.60 3 3 3 4 +2 0 3 1.60000 3 3 3 4 explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 1f78e5098f8..71a1a7539b0 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -328,6 +328,19 @@ trim(trailing 'foo' from 'foo') select trim(leading 'foo' from 'foo'); trim(leading 'foo' from 'foo') +select quote(ltrim(concat(' ', 'a'))); +quote(ltrim(concat(' ', 'a'))) +'a' +select quote(trim(concat(' ', 'a'))); +quote(trim(concat(' ', 'a'))) +'a' +CREATE TABLE t1 SELECT 1 UNION SELECT 2 UNION SELECT 3; +SELECT QUOTE('A') FROM t1; +QUOTE('A') +'A' +'A' +'A' +DROP TABLE t1; select 1=_latin1'1'; 1=_latin1'1' 1 @@ -694,12 +707,6 @@ select count(*) as total, left(c,10) as reg from t1 group by reg order by reg de total reg 10 2004-12-10 drop table t1; -select quote(ltrim(concat(' ', 'a'))); -quote(ltrim(concat(' ', 'a'))) -'a' -select quote(trim(concat(' ', 'a'))); -quote(trim(concat(' ', 'a'))) -'a' select trim(null from 'kate') as "must_be_null"; must_be_null NULL @@ -712,3 +719,26 @@ NULL select trim(trailing NULL from 'xyz') as "must_be_null"; must_be_null NULL +CREATE TABLE t1 ( +id int(11) NOT NULL auto_increment, +a bigint(20) unsigned default NULL, +PRIMARY KEY (id) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES +('0','16307858876001849059'); +SELECT CONV('e251273eb74a8ee3', 16, 10); +CONV('e251273eb74a8ee3', 16, 10) +16307858876001849059 +EXPLAIN +SELECT id +FROM t1 +WHERE a = 16307858876001849059; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +EXPLAIN +SELECT id +FROM t1 +WHERE a = CONV('e251273eb74a8ee3', 16, 10); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 system NULL NULL NULL NULL 1 +DROP TABLE t1; diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result index 2815500b33e..32883921e70 100644 --- a/mysql-test/r/func_test.result +++ b/mysql-test/r/func_test.result @@ -183,3 +183,13 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3; select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3; 5 mod 3 5 mod -3 -5 mod 3 -5 mod -3 2 2 -2 -2 +create table t1 (a int, b int); +insert into t1 values (1,2), (2,3), (3,4), (4,5); +select * from t1 where a not between 1 and 2; +a b +3 4 +4 5 +select * from t1 where a not between 1 and 2 and b not between 3 and 4; +a b +4 5 +drop table t1; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 18e4cb7a434..24740442821 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -440,12 +440,12 @@ create table t2 (user_id integer not null, date date); insert into t2 values (1, '2002-06-09'),(2, '2002-06-09'),(1, '2002-06-09'),(3, '2002-06-09'),(4, '2002-06-09'),(4, '2002-06-09'); select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender; gender dist_count percentage -F 3 60.00 -M 1 20.00 +F 3 60.00000 +M 1 20.00000 select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender order by percentage; gender dist_count percentage -M 1 20.00 -F 3 60.00 +M 1 20.00000 +F 3 60.00000 drop table t1,t2; CREATE TABLE t1 (ID1 int, ID2 int, ID int NOT NULL AUTO_INCREMENT,PRIMARY KEY(ID )); @@ -629,15 +629,6 @@ explain SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort DROP TABLE t1; -create table t1 ( col1 int, col2 int ); -insert into t1 values (1,1),(1,2),(1,3),(2,1),(2,2); -select group_concat( distinct col1 ) as alias from t1 -group by col2 having alias like '%'; -alias -1,2 -1,2 -1 -drop table t1; create table t1 (a int); insert into t1 values(null); select min(a) is null from t1; @@ -650,3 +641,39 @@ select 1 and min(a) is null from t1; 1 and min(a) is null 1 drop table t1; +create table t1 ( col1 int, col2 int ); +insert into t1 values (1,1),(1,2),(1,3),(2,1),(2,2); +select group_concat( distinct col1 ) as alias from t1 +group by col2 having alias like '%'; +alias +1,2 +1,2 +1 +drop table t1; +create table t1 (a integer, b integer, c integer); +insert into t1 (a,b) values (1,2),(1,3),(2,5); +select a, 0.1*0+1 r2, sum(1) r1 from t1 where a = 1 group by a having r1>1 and r2=1; +a r2 r1 +1 1.0 2 +select a, rand()*0+1 r2, sum(1) r1 from t1 where a = 1 group by a having r1>1 and r2=1; +a r2 r1 +1 1 2 +select a,sum(b) from t1 where a=1 group by c; +a sum(b) +1 5 +select a*sum(b) from t1 where a=1 group by c; +a*sum(b) +5 +select sum(a)*sum(b) from t1 where a=1 group by c; +sum(a)*sum(b) +10 +select a,sum(b) from t1 where a=1 group by c having a=1; +a sum(b) +1 5 +select a as d,sum(b) from t1 where a=1 group by c having d=1; +d sum(b) +1 5 +select sum(a)*sum(b) as d from t1 where a=1 group by c having d > 0; +d +10 +drop table t1; diff --git a/mysql-test/r/have_cp932.require b/mysql-test/r/have_cp932.require new file mode 100644 index 00000000000..988d720ed2c --- /dev/null +++ b/mysql-test/r/have_cp932.require @@ -0,0 +1,2 @@ +Collation Charset Id Default Compiled Sortlen +cp932_japanese_ci cp932 95 Yes Yes 1 diff --git a/mysql-test/r/have_eucjpms.require b/mysql-test/r/have_eucjpms.require new file mode 100644 index 00000000000..f35621b2c1a --- /dev/null +++ b/mysql-test/r/have_eucjpms.require @@ -0,0 +1,2 @@ +Collation Charset Id Default Compiled Sortlen +eucjpms_japanese_ci eucjpms 97 Yes Yes 1 diff --git a/mysql-test/r/index_merge.result b/mysql-test/r/index_merge.result index 0f217b7b8ab..693cc63ba9e 100644 --- a/mysql-test/r/index_merge.result +++ b/mysql-test/r/index_merge.result @@ -371,11 +371,11 @@ alter table t0 add filler1 char(200), add filler2 char(200), add filler3 char(20 update t0 set key2=1, key3=1, key4=1, key5=1,key6=1,key7=1 where key7 < 500; explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A, t0 as B -where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1) -and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1); +where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7or16 = 1 or A.key8=1) +and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7or16 = 1 or B.key8=1); id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7,i8 i2,i3,i4,i5,i6,i8 4,4,4,4,4,4 NULL 16 Using union(intersect(i2,i3,i4,i5,i6),i8); Using where -1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7,i8 i2,i3,i4,i5,i6,i8 4,4,4,4,4,4 NULL 16 Using union(intersect(i2,i3,i4,i5,i6),i8); Using where +1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL 7or16 Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where +1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL 7or16 Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5) from t0 as A, t0 as B where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1) diff --git a/mysql-test/r/index_merge_innodb.result b/mysql-test/r/index_merge_innodb.result index 4c6be698749..52e2a4046cf 100644 --- a/mysql-test/r/index_merge_innodb.result +++ b/mysql-test/r/index_merge_innodb.result @@ -69,9 +69,11 @@ id select_type table type possible_keys key key_len ref rows Extra select pk from t1 where key2 = 1 and key1 = 1; pk 26 +27 select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1; pk 26 +27 drop table t1; create table t1 ( pk int primary key auto_increment, diff --git a/mysql-test/r/index_merge_ror_cpk.result b/mysql-test/r/index_merge_ror_cpk.result index c344cef5db9..6cfeb20b2de 100644 --- a/mysql-test/r/index_merge_ror_cpk.result +++ b/mysql-test/r/index_merge_ror_cpk.result @@ -56,7 +56,7 @@ pk1 pk2 95 59 explain select * from t1 where badkey=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref key1 key1 4 const 101 Using where +1 SIMPLE t1 ref key1 key1 4 const 100 Using where explain select * from t1 where pk1 < 7500 and key1 = 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL 38 Using intersect(key1,PRIMARY); Using where @@ -74,13 +74,13 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok pktail2ok,key1 8,4 NULL 199 Using sort_union(pktail2ok,key1); Using where explain select * from t1 where pktail3bad=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref key1,pktail3bad pktail3bad 4 const ROWS Using where +1 SIMPLE t1 ref key1,pktail3bad key1 4 const 100 Using where explain select * from t1 where pktail4bad=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref key1,pktail4bad pktail4bad 4 const 99 Using where +1 SIMPLE t1 ref key1,pktail4bad key1 4 const 100 Using where explain select * from t1 where pktail5bad=1 and key1=10; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ref key1,pktail5bad pktail5bad 4 const 99 Using where +1 SIMPLE t1 ref key1,pktail5bad key1 4 const 100 Using where explain select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index eed3132c195..9bf21e9f061 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1,6 +1,6 @@ -show variables variable_name where variable_name like "skip_show_database"; -variable_name -skip_show_database +show variables where variable_name like "skip_show_database"; +Variable_name Value +skip_show_database OFF grant all privileges on test.* to mysqltest_1@localhost; select * from information_schema.SCHEMATA where schema_name > 'm'; CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH @@ -11,11 +11,6 @@ schema_name information_schema mysql test -show databases *; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH -NULL information_schema utf8 NULL -NULL mysql latin1 NULL -NULL test latin1 NULL show databases like 't%'; Database (t%) test @@ -24,11 +19,8 @@ Database information_schema mysql test -show databases * where schema_name like 't%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH -NULL test latin1 NULL -show databases * where schema_name = 't%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH +show databases where `database` = 't%'; +Database create database testtets; create table testtets.t1(a int, b VARCHAR(30), KEY string_data (b)); create table test.t2(a int); @@ -116,20 +108,13 @@ t4 select * from information_schema.STATISTICS where TABLE_SCHEMA = "testtets"; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT NULL testtets t1 1 testtets string_data 1 b A NULL NULL NULL YES BTREE -show keys * from t3 where TABLE_SCHEMA Like "test%"; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL test t3 1 test a_data 1 a A NULL NULL NULL YES BTREE -show keys from t3 where INDEX_NAME = "a_data"; +show keys from t3 where Key_name = "a_data"; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t3 1 a_data 1 a A NULL NULL NULL YES BTREE show tables like 't%'; Tables_in_test (t%) t2 t3 -show tables * from test where table_name like 't%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE -NULL test t2 -NULL test t3 show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment t2 MyISAM 9 Fixed 0 0 0 21474836479 1024 0 NULL # # NULL latin1_swedish_ci NULL @@ -148,10 +133,9 @@ select * from information_schema.COLUMNS where table_name="t1" and column_name= "a"; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT NULL testtets t1 a 1 NULL YES int 11 11 11 0 NULL NULL int(11) select,insert,update,references -show columns * from testtets.t1 where table_name = "t1"; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL testtets t1 a 1 NULL YES int 11 11 11 0 NULL NULL int(11) select,insert,update,references -NULL testtets t1 b 2 NULL YES varchar 30 30 NULL NULL latin1 latin1_swedish_ci varchar(30) MUL select,insert,update,references +show columns from testtets.t1 where field like "%a%"; +Field Type Null Key Default Extra +a int(11) YES NULL drop view v1; drop tables testtets.t4, testtets.t1, t2, t3; drop database testtets; @@ -162,18 +146,9 @@ latin1 latin1_swedish_ci ISO 8859-1 West European 1 SHOW CHARACTER SET LIKE 'latin1%'; Charset Description Default collation Maxlen latin1 ISO 8859-1 West European latin1_swedish_ci 1 -SHOW CHARACTER SET * LIKE 'latin1%'; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -latin1 latin1_swedish_ci ISO 8859-1 West European 1 -SHOW CHARACTER SET WHERE CHARACTER_SET_NAME like 'latin1%'; +SHOW CHARACTER SET WHERE charset like 'latin1%'; Charset Description Default collation Maxlen latin1 ISO 8859-1 West European latin1_swedish_ci 1 -SHOW CHARACTER SET CHARACTER_SET_NAME WHERE CHARACTER_SET_NAME like 'latin1%'; -CHARACTER_SET_NAME -latin1 -SHOW CHARACTER SET * WHERE CHARACTER_SET_NAME like 'latin1%'; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -latin1 latin1_swedish_ci ISO 8859-1 West European 1 select * from information_schema.COLLATIONS where COLLATION_NAME like 'latin1%'; COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN @@ -195,17 +170,7 @@ latin1_bin latin1 47 Yes 1 latin1_general_ci latin1 48 0 latin1_general_cs latin1 49 0 latin1_spanish_ci latin1 94 0 -SHOW COLLATION * LIKE 'latin1%'; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -latin1_german1_ci latin1 5 0 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin1_danish_ci latin1 15 0 -latin1_german2_ci latin1 31 Yes 2 -latin1_bin latin1 47 Yes 1 -latin1_general_ci latin1 48 0 -latin1_general_cs latin1 49 0 -latin1_spanish_ci latin1 94 0 -SHOW COLLATION WHERE COLLATION_NAME like 'latin1%'; +SHOW COLLATION WHERE collation like 'latin1%'; Collation Charset Id Default Compiled Sortlen latin1_german1_ci latin1 5 0 latin1_swedish_ci latin1 8 Yes Yes 1 @@ -215,26 +180,6 @@ latin1_bin latin1 47 Yes 1 latin1_general_ci latin1 48 0 latin1_general_cs latin1 49 0 latin1_spanish_ci latin1 94 0 -SHOW COLLATION COLLATION_NAME WHERE COLLATION_NAME like 'latin1%'; -COLLATION_NAME -latin1_german1_ci -latin1_swedish_ci -latin1_danish_ci -latin1_german2_ci -latin1_bin -latin1_general_ci -latin1_general_cs -latin1_spanish_ci -SHOW COLLATION * WHERE COLLATION_NAME like 'latin1%'; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -latin1_german1_ci latin1 5 0 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin1_danish_ci latin1 15 0 -latin1_german2_ci latin1 31 Yes 2 -latin1_bin latin1 47 Yes 1 -latin1_general_ci latin1 48 0 -latin1_general_cs latin1 49 0 -latin1_spanish_ci latin1 94 0 select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY where COLLATION_NAME like 'latin1%'; COLLATION_NAME CHARACTER_SET_NAME @@ -435,26 +380,6 @@ delete from mysql.db where user='joe'; delete from mysql.tables_priv where user='joe'; delete from mysql.columns_priv where user='joe'; flush privileges; -create procedure px5 () -begin -declare v int; -declare c cursor for select version from -information_schema.tables where table_schema <> 'information_schema'; -open c; -fetch c into v; -select v; -close c; -end;// -call px5()// -v -9 -call px5()// -v -9 -select sql_mode from information_schema.ROUTINES; -sql_mode - -drop procedure px5; create table t1 (a int not null auto_increment,b int, primary key (a)); insert into t1 values (1,1),(NULL,3),(NULL,4); select AUTO_INCREMENT from information_schema.tables where table_name = 't1'; @@ -671,14 +596,11 @@ BASE TABLE show open tables where `table` like "user"; Database Table In_use Name_locked mysql user 0 0 -show status variable_name where variable_name like "%database%"; -variable_name -Com_show_databases -show variables variable_name where variable_name like "%database%"; -variable_name -character_set_database -collation_database -skip_show_database +show status where variable_name like "%database%"; +Variable_name Value +Com_show_databases 0 +show variables where variable_name like "skip_show_databas"; +Variable_name Value show global status like "Threads_running"; Variable_name Value Threads_running 1 diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 8d1c4e3fc90..5928688ca81 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -249,6 +249,30 @@ n 4 5 6 +set autocommit=0; +begin; +savepoint `my_savepoint`; +insert into t1 values (7); +savepoint `savept2`; +insert into t1 values (3); +select n from t1; +n +3 +4 +5 +6 +7 +rollback to savepoint `savept2`; +release savepoint `my_savepoint`; +select n from t1; +n +4 +5 +6 +7 +rollback to savepoint `my_savepoint`; +ERROR HY000: Got error 153 during ROLLBACK +set autocommit=1; rollback; drop table t1; create table t1 (n int not null primary key) engine=innodb; @@ -1609,14 +1633,14 @@ t2 CREATE TABLE `t2` ( drop table t2, t1; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 24 +Binlog_cache_use 25 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 0 create table t1 (a int) engine=innodb; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 25 +Binlog_cache_use 26 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -1625,7 +1649,7 @@ delete from t1; commit; show status like "binlog_cache_use"; Variable_name Value -Binlog_cache_use 26 +Binlog_cache_use 27 show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 @@ -1693,10 +1717,10 @@ Variable_name Value Innodb_rows_deleted 2070 show status like "Innodb_rows_inserted"; Variable_name Value -Innodb_rows_inserted 31706 +Innodb_rows_inserted 31708 show status like "Innodb_rows_read"; Variable_name Value -Innodb_rows_read 80153 +Innodb_rows_read 80162 show status like "Innodb_rows_updated"; Variable_name Value Innodb_rows_updated 29530 diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 8882b95f2d8..611c6f2712e 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -75,7 +75,7 @@ ERROR 23000: Duplicate entry '2' for key 1 show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 183 use `test`; insert into t1 select * from t2 +master-bin.000001 95 Query 1 190 use `test`; insert into t1 select * from t2 select * from t1; a 1 diff --git a/mysql-test/r/insert_select.result.es b/mysql-test/r/insert_select.result.es index 9e11402733d..9cac6d31b8f 100644 --- a/mysql-test/r/insert_select.result.es +++ b/mysql-test/r/insert_select.result.es @@ -633,3 +633,15 @@ No Field Count 0 1 100 0 2 100 drop table t1, t2; +CREATE TABLE t1 ( +ID int(11) NOT NULL auto_increment, +NO int(11) NOT NULL default '0', +SEQ int(11) NOT NULL default '0', +PRIMARY KEY (ID), +KEY t1$NO (SEQ,NO) +) ENGINE=MyISAM; +INSERT INTO t1 (SEQ, NO) SELECT "1" AS SEQ, IF(MAX(NO) IS NULL, 0, MAX(NO)) + 1 AS NO FROM t1 WHERE (SEQ = 1); +select SQL_BUFFER_RESULT * from t1 WHERE (SEQ = 1); +ID NO SEQ +1 1 1 +drop table t1; diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result index c82105e6a49..6a3d2bffab0 100644 --- a/mysql-test/r/limit.result +++ b/mysql-test/r/limit.result @@ -67,3 +67,12 @@ SELECT * FROM t1; id id2 3 0 DROP TABLE t1; +create table t1 (a integer); +insert into t1 values (1); +select 1 as a from t1 union all select 1 from dual limit 1; +a +1 +(select 1 as a from t1) union all (select 1 from dual) limit 1; +a +1 +drop table t1; diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 429bc5ed352..db2842061b4 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -41,8 +41,8 @@ lock tables t1 write; check table t2; Table Op Msg_type Msg_text test.t2 check error Table 't2' was not locked with LOCK TABLES -insert into t1 select nr from t1; -ERROR HY000: Table 't1' was not locked with LOCK TABLES +insert into t1 select index1,nr from t1; +ERROR 42000: INSERT command denied to user 'root'@'localhost' for column 'index1' in table 't1' unlock tables; lock tables t1 write, t1 as t1_alias read; insert into t1 select index1,nr from t1 as t1_alias; diff --git a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result index 48c09f369b3..6a2cf466cfa 100644 --- a/mysql-test/r/metadata.result +++ b/mysql-test/r/metadata.result @@ -2,7 +2,7 @@ drop table if exists t1,t2; select 1, 1.0, -1, "hello", NULL; Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr def 1 8 1 1 N 32897 0 63 -def 1.0 5 3 3 N 32897 1 63 +def 1.0 246 4 3 N 161 1 63 def -1 8 2 2 N 32897 0 63 def hello 253 5 5 N 1 31 8 def NULL 6 0 0 Y 32896 0 63 @@ -18,7 +18,7 @@ def test t1 t1 d d 3 11 0 Y 32768 0 63 def test t1 t1 e e 8 20 0 Y 32768 0 63 def test t1 t1 f f 4 3 0 Y 32768 2 63 def test t1 t1 g g 5 4 0 Y 32768 3 63 -def test t1 t1 h h 0 7 0 Y 32768 4 63 +def test t1 t1 h h 246 5 0 Y 0 4 63 def test t1 t1 i i 13 4 0 Y 32864 0 63 def test t1 t1 j j 10 10 0 Y 128 0 63 def test t1 t1 k k 7 19 0 N 1249 0 63 diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index abcb451df65..96a2ac551a9 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -9,9 +9,9 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(1) -master-bin.000001 238 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 326 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(1) +master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -24,9 +24,9 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(2) -master-bin.000001 238 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 326 Query 1 # use `test`; ROLLBACK +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(2) +master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; @@ -42,12 +42,12 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(3) -master-bin.000001 238 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 317 Query 1 # use `test`; insert into t1 values(4) -master-bin.000001 398 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 486 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 577 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(3) +master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4) +master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 619 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -68,13 +68,13 @@ a show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(5) -master-bin.000001 238 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 317 Query 1 # use `test`; insert into t1 values(6) -master-bin.000001 398 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 486 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 577 Query 1 # use `test`; insert into t1 values(7) -master-bin.000001 658 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(5) +master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint +master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6) +master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint +master-bin.000001 619 Query 1 # use `test`; insert into t1 values(7) +master-bin.000001 707 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -90,9 +90,9 @@ get_lock("a",10) show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(8) -master-bin.000001 238 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 326 Query 1 # use `test`; ROLLBACK +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(8) +master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 347 Query 1 # use `test`; ROLLBACK delete from t1; delete from t2; reset master; @@ -101,7 +101,7 @@ insert into t2 select * from t1; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; insert into t1 values(9) -master-bin.000001 176 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 183 Query 1 # use `test`; insert into t2 select * from t1 delete from t1; delete from t2; reset master; @@ -111,16 +111,16 @@ insert into t2 select * from t1; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 177 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1 insert into t1 values(11); commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 177 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 265 Query 1 # use `test`; BEGIN -master-bin.000001 327 Query 1 # use `test`; insert into t1 values(11) -master-bin.000001 409 Query 1 # use `test`; COMMIT +master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 279 Query 1 # use `test`; BEGIN +master-bin.000001 348 Query 1 # use `test`; insert into t1 values(11) +master-bin.000001 437 Query 1 # use `test`; COMMIT alter table t2 engine=INNODB; delete from t1; delete from t2; @@ -132,9 +132,9 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(12) -master-bin.000001 239 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 327 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(12) +master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 348 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -157,8 +157,8 @@ commit; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(14) -master-bin.000001 239 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(14) +master-bin.000001 253 Query 1 # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -177,9 +177,9 @@ a show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 Query 1 # use `test`; BEGIN -master-bin.000001 157 Query 1 # use `test`; insert into t1 values(16) -master-bin.000001 239 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 321 Query 1 # use `test`; COMMIT +master-bin.000001 164 Query 1 # use `test`; insert into t1 values(16) +master-bin.000001 253 Query 1 # use `test`; insert into t1 values(18) +master-bin.000001 342 Query 1 # use `test`; COMMIT delete from t1; delete from t2; alter table t2 type=MyISAM; diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index c18588d90a7..33fddabf232 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -19,6 +19,7 @@ use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; drop table if exists t1,t2; SET TIMESTAMP=1000000000; create table t1 (word varchar(20)); @@ -41,6 +42,7 @@ use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); --- --database -- @@ -53,6 +55,7 @@ use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); --- Remote -- @@ -61,6 +64,7 @@ use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; drop table if exists t1,t2; SET TIMESTAMP=1000000000; create table t1 (word varchar(20)); @@ -83,6 +87,7 @@ use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); --- --database -- @@ -95,5 +100,6 @@ use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values ("Alas"); drop table t1, t2; diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result index 9fe4edf7b82..805c25be086 100644 --- a/mysql-test/r/mysqlbinlog2.result +++ b/mysql-test/r/mysqlbinlog2.result @@ -20,6 +20,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -44,6 +45,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -60,10 +62,12 @@ insert into t1 values(null, "e"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; @@ -75,6 +79,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -85,7 +90,6 @@ insert into t1 values(null, "b"); SET INSERT_ID=3; SET TIMESTAMP=1579609944; insert into t1 values(null, "c"); -SET INSERT_ID=4; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -94,6 +98,7 @@ use test; SET TIMESTAMP=1579609944; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -108,6 +113,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -122,6 +128,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -143,6 +150,7 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- offset -- @@ -152,6 +160,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -170,14 +179,17 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; @@ -187,6 +199,7 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-position -- @@ -195,6 +208,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -220,6 +234,7 @@ use test; SET TIMESTAMP=1579609944; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -232,6 +247,7 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-datetime -- @@ -240,6 +256,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -254,6 +271,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -278,6 +296,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -294,10 +313,12 @@ insert into t1 values(null, "e"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; @@ -309,6 +330,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -319,7 +341,6 @@ insert into t1 values(null, "b"); SET INSERT_ID=3; SET TIMESTAMP=1579609944; insert into t1 values(null, "c"); -SET INSERT_ID=4; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; @@ -328,6 +349,7 @@ use test; SET TIMESTAMP=1579609944; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -342,6 +364,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -356,6 +379,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -377,6 +401,7 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- offset -- @@ -386,6 +411,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "a"); SET INSERT_ID=2; SET TIMESTAMP=1579609942; @@ -404,14 +430,17 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET INSERT_ID=4; use test; SET TIMESTAMP=1579609946; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "d"); SET INSERT_ID=5; SET TIMESTAMP=1579609946; @@ -421,6 +450,7 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-position -- @@ -429,6 +459,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -454,6 +485,7 @@ use test; SET TIMESTAMP=1579609944; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "c"); SET INSERT_ID=4; SET TIMESTAMP=1579609946; @@ -466,6 +498,7 @@ use test; SET TIMESTAMP=1579609943; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); --- stop-datetime -- @@ -474,6 +507,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; @@ -488,6 +522,7 @@ use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; create table t1 (a int auto_increment not null primary key, b char(3)); SET INSERT_ID=1; SET TIMESTAMP=1579609942; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index cea0733766e..9f08fae4964 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -19,13 +19,13 @@ INSERT INTO t1 VALUES (1), (2); </database> </mysqldump> DROP TABLE t1; -CREATE TABLE t1 (a decimal(240, 20)); +CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); CREATE TABLE `t1` ( - `a` decimal(240,20) default NULL + `a` decimal(64,20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('0987654321098765432109876543210987654321.00000000000000000000'); +INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000'); DROP TABLE t1; CREATE TABLE t1 (a double); INSERT INTO t1 VALUES ('-9e999999'); @@ -63,7 +63,7 @@ INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456) /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` decimal(10,5) default NULL, @@ -86,7 +86,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; CREATE TABLE `t1` ( `a` decimal(10,5) default NULL, `b` float default NULL @@ -152,7 +152,7 @@ INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` varchar(255) default NULL @@ -178,7 +178,7 @@ CREATE TABLE t1 (a int) ENGINE=MYISAM; INSERT INTO t1 VALUES (1), (2); /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,MYSQL40" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL40' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -197,7 +197,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,MYSQL323" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -228,7 +228,7 @@ create table t1(a int); /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -249,7 +249,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,ANSI" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; DROP TABLE IF EXISTS "t1"; CREATE TABLE "t1" ( "a" int(11) default NULL @@ -273,7 +273,7 @@ set global sql_mode='ANSI_QUOTES'; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -294,7 +294,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,ANSI" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; DROP TABLE IF EXISTS "t1"; CREATE TABLE "t1" ( "a" int(11) default NULL @@ -319,7 +319,7 @@ insert into t1 values (1),(2),(3); /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -344,7 +344,7 @@ create view v1 as select * from t1; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` int(11) default NULL @@ -375,7 +375,7 @@ drop table t1; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET latin1 */; @@ -396,7 +396,7 @@ create database mysqldump_test_db character set latin2 collate latin2_bin; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_test_db` /*!40100 DEFAULT CHARACTER SET latin2 COLLATE latin2_bin */; @@ -419,7 +419,7 @@ INSERT INTO t1 VALUES (_latin1 'ÄÖÜß'); /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` char(10) default NULL @@ -441,7 +441,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,MYSQL323" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` char(10) default NULL @@ -460,7 +460,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,MYSQL323" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` char(10) default NULL @@ -479,7 +479,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,MYSQL323" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` char(10) default NULL @@ -498,7 +498,7 @@ UNLOCK TABLES; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO,MYSQL323" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( `a` char(10) default NULL @@ -527,7 +527,7 @@ INSERT INTO t2 VALUES (4),(5),(6); /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE="NO_AUTO_VALUE_ON_ZERO" */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; DROP TABLE IF EXISTS `t2`; CREATE TABLE `t2` ( `a` int(11) default NULL diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result index 6ec5338acbe..e1aa045d16e 100644 --- a/mysql-test/r/ndb_basic.result +++ b/mysql-test/r/ndb_basic.result @@ -573,3 +573,37 @@ select * from t1 where a12345678901234567890123456789a1234567890=2; a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890 5 2 drop table t1; +create table t1 +(a bigint, b bigint, c bigint, d bigint, +primary key (a,b,c,d)) +engine=ndb +max_rows=800000000; +Warnings: +Warning 1105 Ndb might have problems storing the max amount of rows specified +insert into t1 values +(1,2,3,4),(2,3,4,5),(3,4,5,6), +(3,2,3,4),(1,3,4,5),(2,4,5,6), +(1,2,3,5),(2,3,4,8),(3,4,5,9), +(3,2,3,5),(1,3,4,8),(2,4,5,9), +(1,2,3,6),(2,3,4,6),(3,4,5,7), +(3,2,3,6),(1,3,4,6),(2,4,5,7), +(1,2,3,7),(2,3,4,7),(3,4,5,8), +(3,2,3,7),(1,3,4,7),(2,4,5,8), +(1,3,3,4),(2,4,4,5),(3,5,5,6), +(3,3,3,4),(1,4,4,5),(2,5,5,6), +(1,3,3,5),(2,4,4,8),(3,5,5,9), +(3,3,3,5),(1,4,4,8),(2,5,5,9), +(1,3,3,6),(2,4,4,6),(3,5,5,7), +(3,3,3,6),(1,4,4,6),(2,5,5,7), +(1,3,3,7),(2,4,4,7),(3,5,5,8), +(3,3,3,7),(1,4,4,7),(2,5,5,8); +select count(*) from t1; +count(*) +48 +drop table t1; +create table t1 +(a bigint, b bigint, c bigint, d bigint, +primary key (a)) +engine=ndb +max_rows=1; +drop table t1; diff --git a/mysql-test/r/ndb_cache.result b/mysql-test/r/ndb_cache.result index 714e1831267..478663b1aa1 100644 --- a/mysql-test/r/ndb_cache.result +++ b/mysql-test/r/ndb_cache.result @@ -1,43 +1,191 @@ +drop table if exists t1; +set GLOBAL query_cache_type=on; set GLOBAL query_cache_size=1355776; reset query cache; flush status; -drop table if exists t1,t2; -CREATE TABLE t1 (a int) ENGINE=ndbcluster; -CREATE TABLE t2 (a int); +CREATE TABLE t1 ( pk int not null primary key, +a int, b int not null, c varchar(20)) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); select * from t1; -a +pk a b c +1 2 3 First row show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 0 +Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 0 +Qcache_inserts 1 show status like "Qcache_hits"; Variable_name Value Qcache_hits 0 -select * from t2; -a +select * from t1; +pk a b c +1 2 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +update t1 set a=3 where pk=1; +select * from t1; +pk a b c +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +4 5 6 Fourth row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +4 5 6 Fourth row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +delete from t1 where c='Fourth row'; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +use test; +select * from t1 order by pk; +pk a b c +1 3 3 First row +2 7 8 Second row +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 4 +update t1 set a=4 where b=3; +use test; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 1 +Qcache_inserts 7 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 0 -select * from t1; -a -select * from t2; -a +Qcache_hits 7 +begin; +update t1 set a=5 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 1 show status like "Qcache_inserts"; Variable_name Value -Qcache_inserts 1 +Qcache_inserts 8 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 1 -drop table t1, t2; +Qcache_hits 7 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 8 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 8 +drop table t1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 SET GLOBAL query_cache_size=0; diff --git a/mysql-test/r/ndb_cache2.result b/mysql-test/r/ndb_cache2.result new file mode 100644 index 00000000000..de4b3e31874 --- /dev/null +++ b/mysql-test/r/ndb_cache2.result @@ -0,0 +1,193 @@ +drop table if exists t1; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=5; +reset query cache; +flush status; +CREATE TABLE t1 ( pk int not null primary key, +a int, b int not null, c varchar(20)) ENGINE=ndbcluster; +insert into t1 value (1, 2, 3, 'First row'); +select * from t1; +pk a b c +1 2 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +pk a b c +1 2 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +update t1 set a=3 where pk=1; +select * from t1; +pk a b c +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +insert into t1 value (2, 7, 8, 'Second row'); +insert into t1 value (4, 5, 6, 'Fourth row'); +select * from t1 order by pk desc; +pk a b c +4 5 6 Fourth row +2 7 8 Second row +1 3 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 1 +select * from t1 order by pk desc; +pk a b c +4 5 6 Fourth row +2 7 8 Second row +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +delete from t1 where c='Fourth row'; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 3 +use test; +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 3 3 First row +select * from t1 where b=3; +pk a b c +1 3 3 First row +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 4 +update t1 set a=4 where b=3; +use test; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 5 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +begin; +update t1 set a=5 where pk=1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 7 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 4 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 8 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +commit; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 8 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 7 +select * from t1 order by pk desc; +pk a b c +2 7 8 Second row +1 5 3 First row +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 9 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 8 +drop table t1; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +SET GLOBAL query_cache_size=0; +SET GLOBAL ndb_cache_check_time=0; diff --git a/mysql-test/r/ndb_cache_multi.result b/mysql-test/r/ndb_cache_multi.result new file mode 100644 index 00000000000..c7135ed9e8a --- /dev/null +++ b/mysql-test/r/ndb_cache_multi.result @@ -0,0 +1,72 @@ +drop table if exists t1, t2; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +reset query cache; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +update t1 set a=3 where a=2; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +drop table t1, t2; diff --git a/mysql-test/r/ndb_cache_multi2.result b/mysql-test/r/ndb_cache_multi2.result new file mode 100644 index 00000000000..6e435c071b5 --- /dev/null +++ b/mysql-test/r/ndb_cache_multi2.result @@ -0,0 +1,74 @@ +drop table if exists t1, t2; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; +set GLOBAL query_cache_type=on; +set GLOBAL query_cache_size=1355776; +set GLOBAL ndb_cache_check_time=1; +reset query cache; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 0 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +2 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 1 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +update t1 set a=3 where a=2; +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 2 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +select * from t1; +a +3 +show status like "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 2 +show status like "Qcache_inserts"; +Variable_name Value +Qcache_inserts 3 +show status like "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +drop table t1, t2; diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result index 598b9dcccf7..517d09ddf29 100644 --- a/mysql-test/r/ndb_index_unique.result +++ b/mysql-test/r/ndb_index_unique.result @@ -1,4 +1,4 @@ -drop table if exists t1, t2, t3, t4, t5, t6, t7; +drop table if exists t1, t2, t3, t4, t5, t6, t7, t8; CREATE TABLE t1 ( a int unsigned NOT NULL PRIMARY KEY, b int unsigned not null, diff --git a/mysql-test/r/ndb_multi.result b/mysql-test/r/ndb_multi.result new file mode 100644 index 00000000000..4a2389cd1ff --- /dev/null +++ b/mysql-test/r/ndb_multi.result @@ -0,0 +1,49 @@ +drop table if exists t1, t2, t3, t4; +flush status; +create table t1 (a int) engine=ndbcluster; +create table t2 (a int) engine=ndbcluster; +insert into t1 value (2); +insert into t2 value (3); +select * from t1; +a +2 +select * from t2; +a +3 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 0 +flush status; +select * from t1; +a +2 +update t1 set a=3 where a=2; +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 1 +create table t3 (a int not null primary key, b varchar(22), +c int, last_col text) engine=ndb; +insert into t3 values(1, 'Hi!', 89, 'Longtext column'); +create table t4 (pk int primary key, b int) engine=ndb; +select * from t1; +a +3 +select * from t3; +a b c last_col +1 Hi! 89 Longtext column +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 1 +show tables like 't4'; +Tables_in_test (t4) +t4 +show status like 'handler_discover%'; +Variable_name Value +Handler_discover 2 +show tables; +Tables_in_test +t1 +t2 +t3 +t4 +drop table t1, t2, t3, t4; diff --git a/mysql-test/r/olap.result b/mysql-test/r/olap.result index f398c69a424..a04fa75082f 100644 --- a/mysql-test/r/olap.result +++ b/mysql-test/r/olap.result @@ -164,48 +164,48 @@ product country_id year sum(profit) NULL NULL NULL 7785 select concat(product,':',country_id) as 'prod', concat(":",year,":") as 'year',1+1, sum(profit)/count(*) from t1 group by 1,2 with rollup; prod year 1+1 sum(profit)/count(*) -Calculator:1 :1999: 2 50.00 -Calculator:1 :2000: 2 75.00 -Calculator:1 NULL 2 62.50 -Calculator:2 :2000: 2 75.00 -Calculator:2 NULL 2 75.00 -Computer:1 :1999: 2 1350.00 -Computer:1 :2000: 2 1500.00 -Computer:1 NULL 2 1400.00 -Computer:2 :2000: 2 1350.00 -Computer:2 NULL 2 1350.00 -Phone:3 :2003: 2 10.00 -Phone:3 NULL 2 10.00 -TV:1 :1999: 2 125.00 -TV:1 :2000: 2 150.00 -TV:1 NULL 2 133.33 -TV:2 :2000: 2 100.00 -TV:2 NULL 2 100.00 -NULL NULL 2 519.00 +Calculator:1 :1999: 2 50.00000 +Calculator:1 :2000: 2 75.00000 +Calculator:1 NULL 2 62.50000 +Calculator:2 :2000: 2 75.00000 +Calculator:2 NULL 2 75.00000 +Computer:1 :1999: 2 1350.00000 +Computer:1 :2000: 2 1500.00000 +Computer:1 NULL 2 1400.00000 +Computer:2 :2000: 2 1350.00000 +Computer:2 NULL 2 1350.00000 +Phone:3 :2003: 2 10.00000 +Phone:3 NULL 2 10.00000 +TV:1 :1999: 2 125.00000 +TV:1 :2000: 2 150.00000 +TV:1 NULL 2 133.33333 +TV:2 :2000: 2 100.00000 +TV:2 NULL 2 100.00000 +NULL NULL 2 519.00000 select product, sum(profit)/count(*) from t1 group by product with rollup; product sum(profit)/count(*) -Calculator 68.75 -Computer 1380.00 -Phone 10.00 -TV 120.00 -NULL 519.00 +Calculator 68.75000 +Computer 1380.00000 +Phone 10.00000 +TV 120.00000 +NULL 519.00000 select left(product,4) as prod, sum(profit)/count(*) from t1 group by prod with rollup; prod sum(profit)/count(*) -Calc 68.75 -Comp 1380.00 -Phon 10.00 -TV 120.00 -NULL 519.00 +Calc 68.75000 +Comp 1380.00000 +Phon 10.00000 +TV 120.00000 +NULL 519.00000 select concat(product,':',country_id), 1+1, sum(profit)/count(*) from t1 group by concat(product,':',country_id) with rollup; concat(product,':',country_id) 1+1 sum(profit)/count(*) -Calculator:1 2 62.50 -Calculator:2 2 75.00 -Computer:1 2 1400.00 -Computer:2 2 1350.00 -Phone:3 2 10.00 -TV:1 2 133.33 -TV:2 2 100.00 -NULL 2 519.00 +Calculator:1 2 62.50000 +Calculator:2 2 75.00000 +Computer:1 2 1400.00000 +Computer:2 2 1350.00000 +Phone:3 2 10.00000 +TV:1 2 133.33333 +TV:2 2 100.00000 +NULL 2 519.00000 select product, country , year, sum(profit) from t1,t2 where t1.country_id=t2.country_id group by product, country, year with rollup; product country year sum(profit) Calculator India 2000 150 diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result index c65d11330ea..153121f0662 100644 --- a/mysql-test/r/ps_1general.result +++ b/mysql-test/r/ps_1general.result @@ -264,6 +264,18 @@ prepare stmt4 from ' show tables from test like ''t2%'' '; execute stmt4; Tables_in_test (t2%) t2 +prepare stmt4 from ' show columns from t2 where field in (select ?) '; +SET @arg00="a"; +execute stmt4 using @arg00; +Field Type Null Key Default Extra +a int(11) NO PRI +SET @arg00="b"; +execute stmt4 using @arg00; +Field Type Null Key Default Extra +b char(10) YES NULL +SET @arg00=1; +execute stmt4 using @arg00; +Field Type Null Key Default Extra prepare stmt4 from ' show columns from t2 from test like ''a%'' '; execute stmt4; Field Type Null Key Default Extra @@ -281,7 +293,7 @@ t2 MyISAM 9 Fixed 0 0 0 64424509439 1024 0 NULL # # # latin1_swedish_ci NULL prepare stmt4 from ' show table status from test like ''t9%'' '; execute stmt4; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t9 MyISAM 10 Dynamic 2 220 440 4294967295 2048 0 NULL # # # latin1_swedish_ci NULL +t9 MyISAM 10 Dynamic 2 216 432 4294967295 2048 0 NULL # # # latin1_swedish_ci NULL prepare stmt4 from ' show status like ''Threads_running'' '; execute stmt4; Variable_name Value diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result index 50a74dfad63..78436b69ec7 100644 --- a/mysql-test/r/ps_2myisam.result +++ b/mysql-test/r/ps_2myisam.result @@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 7 6 Y 0 4 63 +def test t9 t9 c12 c12 246 8 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 @@ -1772,8 +1772,8 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(3,1) NOT NULL default '0.0', + `param02` decimal(64,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, `const04` varchar(3) NOT NULL default '', @@ -1794,7 +1794,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(64,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1802,9 +1802,9 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 +def test t5 t5 const02 const02 246 3 3 N 1 1 63 +def test t5 t5 param02 param02 246 64 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8 @@ -1824,13 +1824,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 64 0 Y 0 30 63 def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1922,8 +1922,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1945,7 +1945,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1969,8 +1969,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2019,8 +2019,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2042,7 +2042,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 @@ -2059,8 +2059,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2107,8 +2107,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2130,7 +2130,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2151,8 +2151,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2197,8 +2197,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2220,7 +2220,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; @@ -2235,8 +2235,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2584,7 +2584,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2607,7 +2607,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2666,6 +2666,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 @@ -2678,7 +2679,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2703,7 +2704,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2716,6 +2717,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 @@ -2813,10 +2815,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +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 diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result index 209a22e4a9e..e5db53e1c18 100644 --- a/mysql-test/r/ps_3innodb.result +++ b/mysql-test/r/ps_3innodb.result @@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 7 6 Y 0 4 63 +def test t9 t9 c12 c12 246 8 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 @@ -1755,8 +1755,8 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(3,1) NOT NULL default '0.0', + `param02` decimal(64,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, `const04` varchar(3) NOT NULL default '', @@ -1777,7 +1777,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(64,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1785,9 +1785,9 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 +def test t5 t5 const02 const02 246 3 3 N 1 1 63 +def test t5 t5 param02 param02 246 64 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8 @@ -1807,13 +1807,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 64 0 Y 0 30 63 def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1905,8 +1905,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1928,7 +1928,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1952,8 +1952,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2002,8 +2002,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2025,7 +2025,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 @@ -2042,8 +2042,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2090,8 +2090,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2113,7 +2113,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2134,8 +2134,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2180,8 +2180,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2203,7 +2203,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; @@ -2218,8 +2218,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2567,7 +2567,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2590,7 +2590,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2649,6 +2649,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 @@ -2661,7 +2662,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2686,7 +2687,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2699,6 +2700,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 @@ -2796,10 +2798,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +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 diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result index f0be4d119bc..ad02de1110c 100644 --- a/mysql-test/r/ps_4heap.result +++ b/mysql-test/r/ps_4heap.result @@ -60,8 +60,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 7 6 Y 0 4 63 +def test t9 t9 c12 c12 246 8 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 @@ -1756,8 +1756,8 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(3,1) NOT NULL default '0.0', + `param02` decimal(64,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, `const04` varchar(3) NOT NULL default '', @@ -1778,7 +1778,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(64,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1786,9 +1786,9 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 +def test t5 t5 const02 const02 246 3 3 N 1 1 63 +def test t5 t5 param02 param02 246 64 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8 @@ -1808,13 +1808,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 64 0 Y 0 30 63 def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1906,8 +1906,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1929,7 +1929,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1953,8 +1953,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2003,8 +2003,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2026,7 +2026,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 @@ -2043,8 +2043,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2091,8 +2091,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2114,7 +2114,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2135,8 +2135,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2181,8 +2181,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2204,7 +2204,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; @@ -2219,8 +2219,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2568,7 +2568,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2591,7 +2591,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2650,6 +2650,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 @@ -2662,7 +2663,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2687,7 +2688,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2700,6 +2701,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 @@ -2797,10 +2799,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50 50 50 50 50 50 50 50 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52 52 52 52 52 52 52 52 -53 5 53 53 53 53 53 53 53 53 53 53 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +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 54 54 54 54 54 54 54 55 5 55 55 55 55 55 55 55 55 55 55 56 6 56 56 56 56 56 56 56 56 56 56 diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result index a62d00c71c0..374f6142c44 100644 --- a/mysql-test/r/ps_5merge.result +++ b/mysql-test/r/ps_5merge.result @@ -102,8 +102,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 7 6 Y 0 4 63 +def test t9 t9 c12 c12 246 8 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 @@ -1692,8 +1692,8 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(3,1) NOT NULL default '0.0', + `param02` decimal(64,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, `const04` varchar(3) NOT NULL default '', @@ -1714,7 +1714,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(64,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1722,9 +1722,9 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 +def test t5 t5 const02 const02 246 3 3 N 1 1 63 +def test t5 t5 param02 param02 246 64 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8 @@ -1744,13 +1744,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 64 0 Y 0 30 63 def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1842,8 +1842,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1865,7 +1865,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1889,8 +1889,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1939,8 +1939,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1962,7 +1962,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 @@ -1979,8 +1979,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2027,8 +2027,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2050,7 +2050,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2071,8 +2071,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2117,8 +2117,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2140,7 +2140,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; @@ -2155,8 +2155,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2504,7 +2504,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2527,7 +2527,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2586,6 +2586,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 @@ -2598,7 +2599,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2623,7 +2624,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2636,6 +2637,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 @@ -2733,10 +2735,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +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 @@ -3111,8 +3113,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 7 6 Y 0 4 63 +def test t9 t9 c12 c12 246 8 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 @@ -4701,8 +4703,8 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(3,1) NOT NULL default '0.0', + `param02` decimal(64,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, `const04` varchar(3) NOT NULL default '', @@ -4723,7 +4725,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(64,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -4731,9 +4733,9 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 +def test t5 t5 const02 const02 246 3 3 N 1 1 63 +def test t5 t5 param02 param02 246 64 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8 @@ -4753,13 +4755,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 64 0 Y 0 30 63 def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -4851,8 +4853,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -4874,7 +4876,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -4898,8 +4900,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -4948,8 +4950,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -4971,7 +4973,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 @@ -4988,8 +4990,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5036,8 +5038,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5059,7 +5061,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -5080,8 +5082,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5126,8 +5128,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5149,7 +5151,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; @@ -5164,8 +5166,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -5513,7 +5515,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -5536,7 +5538,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -5595,6 +5597,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 127 @@ -5607,7 +5610,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -5632,7 +5635,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -5645,6 +5648,7 @@ Warning 1264 Out of range value adjusted for column 'c4' at row 1 Warning 1264 Out of range value adjusted for column 'c5' at row 1 Warning 1264 Out of range value adjusted for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -128 @@ -5742,10 +5746,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +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 diff --git a/mysql-test/r/ps_6bdb.result b/mysql-test/r/ps_6bdb.result index 9a922d75cdc..bf7ef64d052 100644 --- a/mysql-test/r/ps_6bdb.result +++ b/mysql-test/r/ps_6bdb.result @@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63 def test t9 t9 c8 c8 5 22 1 Y 32768 31 63 def test t9 t9 c9 c9 5 22 1 Y 32768 31 63 def test t9 t9 c10 c10 5 22 1 Y 32768 31 63 -def test t9 t9 c11 c11 0 9 6 Y 32768 4 63 -def test t9 t9 c12 c12 0 10 6 Y 32768 4 63 +def test t9 t9 c11 c11 246 7 6 Y 0 4 63 +def test t9 t9 c12 c12 246 8 6 Y 0 4 63 def test t9 t9 c13 c13 10 10 10 Y 128 0 63 def test t9 t9 c14 c14 12 19 19 Y 128 0 63 def test t9 t9 c15 c15 7 19 19 N 1249 0 63 @@ -1755,8 +1755,8 @@ Table Create Table t5 CREATE TABLE `t5` ( `const01` bigint(1) NOT NULL default '0', `param01` bigint(20) default NULL, - `const02` double(3,1) NOT NULL default '0.0', - `param02` double default NULL, + `const02` decimal(3,1) NOT NULL default '0.0', + `param02` decimal(64,30) default NULL, `const03` double NOT NULL default '0', `param03` double default NULL, `const04` varchar(3) NOT NULL default '', @@ -1777,7 +1777,7 @@ t5 CREATE TABLE `t5` ( `param11` bigint(20) default NULL, `const12` binary(0) default NULL, `param12` bigint(20) default NULL, - `param13` double default NULL, + `param13` decimal(64,30) default NULL, `param14` longtext, `param15` longblob ) ENGINE=MyISAM DEFAULT CHARSET=latin1 @@ -1785,9 +1785,9 @@ select * from t5 ; Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr def test t5 t5 const01 const01 8 1 1 N 32769 0 63 def test t5 t5 param01 param01 8 20 1 Y 32768 0 63 -def test t5 t5 const02 const02 5 3 3 N 32769 1 63 -def test t5 t5 param02 param02 5 20 1 Y 32768 31 63 -def test t5 t5 const03 const03 5 23 1 N 32769 31 63 +def test t5 t5 const02 const02 246 3 3 N 1 1 63 +def test t5 t5 param02 param02 246 64 32 Y 0 30 63 +def test t5 t5 const03 const03 5 17 1 N 32769 31 63 def test t5 t5 param03 param03 5 20 1 Y 32768 31 63 def test t5 t5 const04 const04 253 3 3 N 1 0 8 def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8 @@ -1807,13 +1807,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63 def test t5 t5 param11 param11 8 20 4 Y 32768 0 63 def test t5 t5 const12 const12 254 0 0 Y 128 0 63 def test t5 t5 param12 param12 8 20 0 Y 32768 0 63 -def test t5 t5 param13 param13 5 20 0 Y 32768 31 63 +def test t5 t5 param13 param13 246 64 0 Y 0 30 63 def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8 def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63 const01 8 param01 8 const02 8.0 -param02 8 +param02 8.000000000000000000000000000000 const03 8 param03 8 const04 abc @@ -1905,8 +1905,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -1928,7 +1928,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4, @arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8, @arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12, @@ -1952,8 +1952,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2002,8 +2002,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2025,7 +2025,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; @arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32 @@ -2042,8 +2042,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2090,8 +2090,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2113,7 +2113,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30, c31, c32 @@ -2134,8 +2134,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2180,8 +2180,8 @@ def @arg07 253 20 1 Y 128 31 63 def @arg08 253 20 1 Y 128 31 63 def @arg09 253 20 1 Y 128 31 63 def @arg10 253 20 1 Y 128 31 63 -def @arg11 253 20 1 Y 128 31 63 -def @arg12 253 20 1 Y 128 31 63 +def @arg11 253 64 6 Y 128 30 63 +def @arg12 253 64 6 Y 128 30 63 def @arg13 253 8192 10 Y 128 31 63 def @arg14 253 8192 19 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2203,7 +2203,7 @@ def @arg30 253 8192 8 Y 0 31 8 def @arg31 253 8192 3 Y 0 31 8 def @arg32 253 8192 6 Y 0 31 8 @arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32 -1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday +1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday set @my_key= 0 ; execute stmt1 using @my_key ; execute full_info ; @@ -2218,8 +2218,8 @@ def @arg07 253 20 0 Y 128 31 63 def @arg08 253 20 0 Y 128 31 63 def @arg09 253 20 0 Y 128 31 63 def @arg10 253 20 0 Y 128 31 63 -def @arg11 253 20 0 Y 128 31 63 -def @arg12 253 20 0 Y 128 31 63 +def @arg11 253 64 0 Y 128 30 63 +def @arg12 253 64 0 Y 128 30 63 def @arg13 253 8192 0 Y 128 31 63 def @arg14 253 8192 0 Y 128 31 63 def @arg15 253 8192 19 Y 128 31 63 @@ -2567,7 +2567,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '9223372036854775807' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2590,7 +2590,7 @@ c7 9.22337e+18 c8 9.22337203685478e+18 c9 9.22337203685478e+18 c10 9.22337203685478e+18 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -9223372036854775808 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2661,7 +2661,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= '1.11111111111111111111e+50' ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2674,6 +2674,7 @@ Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 @@ -2686,7 +2687,7 @@ c7 3.40282e+38 c8 1.11111111111111e+50 c9 1.11111111111111e+50 c10 1.11111111111111e+50 -c12 99999.9999 +c12 9999.9999 execute my_delete ; set @arg00= -1.11111111111111111111e+50 ; execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @@ -2724,6 +2725,7 @@ Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 @@ -2796,10 +2798,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30 41 4 41 41 41 41 41 41 41 41 41 41 42 4 42 42 42 42 42 42 42 42 42 42 43 4 43 43 43 43 43 43 43 43 43 43 -50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00 -51 5 51 51 51 51 51 51 51 51 51 51 -52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00 -53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00 +50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 +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 diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result index 5047160bf75..4f6a62004d2 100644 --- a/mysql-test/r/ps_7ndb.result +++ b/mysql-test/r/ps_7ndb.result @@ -2674,6 +2674,7 @@ Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 1 @@ -2724,6 +2725,7 @@ Warning 1265 Data truncated for column 'c4' at row 1 Warning 1265 Data truncated for column 'c5' at row 1 Warning 1265 Data truncated for column 'c6' at row 1 Warning 1264 Out of range value adjusted for column 'c7' at row 1 +Note 1265 Data truncated for column 'c12' at row 1 Warning 1264 Out of range value adjusted for column 'c12' at row 1 execute my_select ; c1 -1 diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result index 76d6fa13766..40a31563604 100644 --- a/mysql-test/r/row.result +++ b/mysql-test/r/row.result @@ -14,6 +14,8 @@ row(10,2,3) IN (row(3,NULL,3), row(1,2,3), row(1,3,3)) select row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a')); row('a',1.5,3) IN (row(1,2,3), row('a',1.5,3), row('a','a','a')) 1 +Warnings: +Error 1366 Incorrect decimal value: '' for column '' at row -1 select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)); row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3)) 1 diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result index 40bcc4100a8..5fbf4cc3318 100644 --- a/mysql-test/r/rpl_change_master.result +++ b/mysql-test/r/rpl_change_master.result @@ -16,11 +16,11 @@ n 1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 355 # # master-bin.000001 No No 0 0 274 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 376 # # master-bin.000001 No No 0 0 288 # None 0 No # change master to master_user='root'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 274 # # master-bin.000001 No No 0 0 274 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 288 # # master-bin.000001 No No 0 0 288 # None 0 No # select release_lock("a"); release_lock("a") 1 diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result index 0224bd6dba2..6b8a2ac70de 100644 --- a/mysql-test/r/rpl_charset.result +++ b/mysql-test/r/rpl_charset.result @@ -4,6 +4,7 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +set timestamp=1000000000; drop database if exists mysqltest2; drop database if exists mysqltest3; create database mysqltest2 character set latin2; @@ -87,7 +88,6 @@ a b 2 Muffler 3 latin1_german2_ci 4 Müller -load data infile '../../std_data/words.dat' into table t1 (b); set @a= _cp850 'Müller' collate cp850_general_ci; truncate table t1; insert into t1 (b) values(collation(@a)); @@ -108,63 +108,39 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # drop database if exists mysqltest2 master-bin.000001 # Query 1 # drop database if exists mysqltest3 master-bin.000001 # Query 1 # create database mysqltest2 character set latin2 -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30 master-bin.000001 # Query 1 # create database mysqltest3 -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 master-bin.000001 # Query 1 # drop database mysqltest3 -master-bin.000001 # Query 1 # use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64 master-bin.000001 # Query 1 # create database mysqltest3 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100)) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_server) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=2 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_server) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=3 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_client) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=4 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@character_set_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=5 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=5,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=2 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=3 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(@@collation_connection) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=4 master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(LEAST("Müller","Muffler")) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 # Intvar 1 # INSERT_ID=74 -master-bin.000001 # Create_file 1 # db=mysqltest2;table=t1;file_id=1;block_len=581 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 -master-bin.000001 # Intvar 1 # INSERT_ID=5 -master-bin.000001 # Exec_load 1 # ;file_id=1 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # use `mysqltest2`; truncate table t1 -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # User var 1 # @`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci master-bin.000001 # Query 1 # use `mysqltest2`; insert into t1 (b) values(collation(@a)) -master-bin.000001 # Query 1 # use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # drop database mysqltest2 -master-bin.000001 # Query 1 # SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64 master-bin.000001 # Query 1 # drop database mysqltest3 set global character_set_server=latin2; -ERROR HY000: Binary logging and replication forbid changing the global server character set, collation +set global character_set_server=latin1; set global character_set_server=latin2; -ERROR HY000: Binary logging and replication forbid changing the global server character set, collation +set global character_set_server=latin1; set one_shot @@character_set_server=latin5; set @@max_join_size=1000; select @@character_set_server; @@ -198,12 +174,74 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 -stop slave; -delete from t1; -change master to master_log_pos=6809; -start slave until master_log_file='master-bin.000001', master_log_pos=6967; -start slave; -select hex(c1), hex(c2) from t1; -hex(c1) hex(c2) -CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 +/*!40019 SET @@session.max_insert_delayed_threads=0*/; +SET TIMESTAMP=1000000000; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; +SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; +drop database if exists mysqltest2; +SET TIMESTAMP=1000000000; +drop database if exists mysqltest3; +SET TIMESTAMP=1000000000; +create database mysqltest2 character set latin2; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30; +create database mysqltest3; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64; +drop database mysqltest3; +SET TIMESTAMP=1000000000; +create database mysqltest3; +use mysqltest2; +SET TIMESTAMP=1000000000; +create table t1 (a int auto_increment primary key, b varchar(100)); +SET INSERT_ID=1; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64; +insert into t1 (b) values(@@character_set_server); +SET INSERT_ID=2; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@collation_server); +SET INSERT_ID=3; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@character_set_client); +SET INSERT_ID=4; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@character_set_connection); +SET INSERT_ID=5; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@collation_connection); +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64; +truncate table t1; +SET INSERT_ID=1; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(@@collation_connection); +SET INSERT_ID=2; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(LEAST("Müller","Muffler")); +SET INSERT_ID=3; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64; +insert into t1 (b) values(@@collation_connection); +SET INSERT_ID=4; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(LEAST("Müller","Muffler")); +SET TIMESTAMP=1000000000; +truncate table t1; +SET INSERT_ID=1; +SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`; +SET TIMESTAMP=1000000000; +insert into t1 (b) values(collation(@a)); +SET TIMESTAMP=1000000000; +drop database mysqltest2; +SET TIMESTAMP=1000000000; +drop database mysqltest3; +use test; +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30; +CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); +SET TIMESTAMP=1000000000; +SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30; +INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); drop table t1; diff --git a/mysql-test/r/rpl_error_ignored_table.result b/mysql-test/r/rpl_error_ignored_table.result index 19c8ee2e8c7..917fe103b43 100644 --- a/mysql-test/r/rpl_error_ignored_table.result +++ b/mysql-test/r/rpl_error_ignored_table.result @@ -9,7 +9,7 @@ insert into t1 values (1),(1); ERROR 23000: Duplicate entry '1' for key 1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 273 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 273 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 287 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 287 # None 0 No # show tables like 't1'; Tables_in_test (t1) drop table t1; @@ -28,12 +28,12 @@ kill @id; drop table t2,t3; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 187 use `test`; create table t1 (a int primary key) -master-bin.000001 187 Query 1 273 use `test`; insert into t1 values (1),(1) -master-bin.000001 273 Query 1 343 use `test`; drop table t1 -master-bin.000001 343 Query 1 435 use `test`; create table t2 (a int primary key) -master-bin.000001 435 Query 1 516 use `test`; insert into t2 values(1) -master-bin.000001 516 Query 1 597 use `test`; create table t3 (id int) -master-bin.000001 597 Query 1 692 use `test`; insert into t3 values(connection_id()) -master-bin.000001 692 Query 1 805 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10) -master-bin.000001 805 Query 1 878 use `test`; drop table t2,t3 +master-bin.000001 95 Query 1 194 use `test`; create table t1 (a int primary key) +master-bin.000001 194 Query 1 287 use `test`; insert into t1 values (1),(1) +master-bin.000001 287 Query 1 364 use `test`; drop table t1 +master-bin.000001 364 Query 1 463 use `test`; create table t2 (a int primary key) +master-bin.000001 463 Query 1 551 use `test`; insert into t2 values(1) +master-bin.000001 551 Query 1 639 use `test`; create table t3 (id int) +master-bin.000001 639 Query 1 741 use `test`; insert into t3 values(connection_id()) +master-bin.000001 741 Query 1 861 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10) +master-bin.000001 861 Query 1 941 use `test`; drop table t2,t3 diff --git a/mysql-test/r/rpl_flush_log_loop.result b/mysql-test/r/rpl_flush_log_loop.result index 4b73458386d..c57f6877516 100644 --- a/mysql-test/r/rpl_flush_log_loop.result +++ b/mysql-test/r/rpl_flush_log_loop.result @@ -14,4 +14,4 @@ start slave; flush logs; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 199 # # slave-bin.000001 Yes Yes 0 0 199 # None 0 No # +# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 206 # # slave-bin.000001 Yes Yes 0 0 206 # None 0 No # diff --git a/mysql-test/r/rpl_flush_tables.result b/mysql-test/r/rpl_flush_tables.result index ef785bc9850..241aada0e40 100644 --- a/mysql-test/r/rpl_flush_tables.result +++ b/mysql-test/r/rpl_flush_tables.result @@ -15,26 +15,26 @@ flush no_write_to_binlog tables; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 175 use `test`; create table t1 (a int) -master-bin.000001 175 Query 1 258 use `test`; insert into t1 values (10) -master-bin.000001 258 Query 1 338 use `test`; create table t2 (a int) -master-bin.000001 338 Query 1 441 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 441 Query 1 521 use `test`; create table t4 (a int) -master-bin.000001 521 Query 1 609 use `test`; insert into t4 select * from t3 -master-bin.000001 609 Query 1 697 use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int) +master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10) +master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int) +master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int) +master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3 +master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1 select * from t3; a flush tables; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 175 use `test`; create table t1 (a int) -master-bin.000001 175 Query 1 258 use `test`; insert into t1 values (10) -master-bin.000001 258 Query 1 338 use `test`; create table t2 (a int) -master-bin.000001 338 Query 1 441 use `test`; create table t3 (a int) engine=merge union(t1) -master-bin.000001 441 Query 1 521 use `test`; create table t4 (a int) -master-bin.000001 521 Query 1 609 use `test`; insert into t4 select * from t3 -master-bin.000001 609 Query 1 697 use `test`; rename table t1 to t5, t2 to t1 -master-bin.000001 697 Query 1 766 use `test`; flush tables +master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int) +master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10) +master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int) +master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1) +master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int) +master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3 +master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1 +master-bin.000001 746 Query 1 822 use `test`; flush tables select * from t3; a diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index 72f7fb8bdbe..ccf77083362 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -22,7 +22,7 @@ day id category name 2003-03-22 2416 a bbbbb show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -slave-bin.000001 1068 +slave-bin.000001 1096 drop table t1; drop table t2; drop table t3; @@ -33,7 +33,7 @@ set global sql_slave_skip_counter=1; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1503 # # master-bin.000001 Yes Yes 0 0 1503 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1559 # # master-bin.000001 Yes Yes 0 0 1559 # None 0 No # set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -43,7 +43,7 @@ change master to master_user='test'; change master to master_user='root'; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1611 # # master-bin.000001 No No 0 0 1611 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1667 # # master-bin.000001 No No 0 0 1667 # None 0 No # set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -64,5 +64,5 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by ERROR 23000: Duplicate entry '2003-03-22' for key 1 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 529 +master-bin.000001 536 drop table t2; diff --git a/mysql-test/r/rpl_loaddata_rule_m.result b/mysql-test/r/rpl_loaddata_rule_m.result index b241fc9ce0b..973f7eb6abc 100644 --- a/mysql-test/r/rpl_loaddata_rule_m.result +++ b/mysql-test/r/rpl_loaddata_rule_m.result @@ -12,6 +12,6 @@ use mysqltest; load data infile '../../std_data/rpl_loaddata.dat' into table test.t1; show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 190 drop database if exists mysqltest -master-bin.000001 190 Query 1 277 create database mysqltest +master-bin.000001 95 Query 1 197 drop database if exists mysqltest +master-bin.000001 197 Query 1 291 create database mysqltest drop database mysqltest; diff --git a/mysql-test/r/rpl_log.result b/mysql-test/r/rpl_log.result index 784742fdacb..f3827ad5c32 100644 --- a/mysql-test/r/rpl_log.result +++ b/mysql-test/r/rpl_log.result @@ -20,24 +20,24 @@ drop table t1; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 210 Intvar 1 238 INSERT_ID=1 -master-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) -master-bin.000001 323 Query 1 393 use `test`; drop table t1 -master-bin.000001 393 Query 1 490 use `test`; create table t1 (word char(20) not null) -master-bin.000001 490 Create_file 1 1160 db=test;table=t1;file_id=1;block_len=581 -master-bin.000001 1160 Exec_load 1 1183 ;file_id=1 -master-bin.000001 1183 Query 1 1253 use `test`; drop table t1 +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 217 Intvar 1 245 INSERT_ID=1 +master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) +master-bin.000001 337 Query 1 414 use `test`; drop table t1 +master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null) +master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581 +master-bin.000001 1188 Exec_load 1 1211 ;file_id=1 +master-bin.000001 1211 Query 1 1288 use `test`; drop table t1 show binlog events from 95 limit 1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) show binlog events from 95 limit 2; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 210 Intvar 1 238 INSERT_ID=1 +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 217 Intvar 1 245 INSERT_ID=1 show binlog events from 95 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) +master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) flush logs; create table t5 (a int); drop table t5; @@ -50,23 +50,23 @@ drop table t1; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 210 Intvar 1 238 INSERT_ID=1 -master-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) -master-bin.000001 323 Query 1 393 use `test`; drop table t1 -master-bin.000001 393 Query 1 490 use `test`; create table t1 (word char(20) not null) -master-bin.000001 490 Create_file 1 1160 db=test;table=t1;file_id=1;block_len=581 -master-bin.000001 1160 Exec_load 1 1183 ;file_id=1 -master-bin.000001 1183 Query 1 1253 use `test`; drop table t1 -master-bin.000001 1253 Rotate 1 1297 master-bin.000002;pos=4 +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 217 Intvar 1 245 INSERT_ID=1 +master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) +master-bin.000001 337 Query 1 414 use `test`; drop table t1 +master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null) +master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581 +master-bin.000001 1188 Exec_load 1 1211 ;file_id=1 +master-bin.000001 1211 Query 1 1288 use `test`; drop table t1 +master-bin.000001 1288 Rotate 1 1332 master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000002 95 Query 1 175 use `test`; create table t5 (a int) -master-bin.000002 175 Query 1 245 use `test`; drop table t5 -master-bin.000002 245 Query 1 325 use `test`; create table t1 (n int) -master-bin.000002 325 Query 1 407 use `test`; insert into t1 values (1) -master-bin.000002 407 Query 1 477 use `test`; drop table t1 +master-bin.000002 95 Query 1 182 use `test`; create table t5 (a int) +master-bin.000002 182 Query 1 259 use `test`; drop table t5 +master-bin.000002 259 Query 1 346 use `test`; create table t1 (n int) +master-bin.000002 346 Query 1 435 use `test`; insert into t1 values (1) +master-bin.000002 435 Query 1 512 use `test`; drop table t1 show binary logs; Log_name master-bin.000001 @@ -79,25 +79,25 @@ slave-bin.000002 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4 -slave-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -slave-bin.000001 210 Intvar 1 238 INSERT_ID=1 -slave-bin.000001 238 Query 1 323 use `test`; insert into t1 values (NULL) -slave-bin.000001 323 Query 1 393 use `test`; drop table t1 -slave-bin.000001 393 Query 1 490 use `test`; create table t1 (word char(20) not null) -slave-bin.000001 490 Create_file 1 1169 db=test;table=t1;file_id=1;block_len=581 -slave-bin.000001 1169 Exec_load 1 1192 ;file_id=1 -slave-bin.000001 1192 Query 1 1262 use `test`; drop table t1 -slave-bin.000001 1262 Query 1 1342 use `test`; create table t5 (a int) -slave-bin.000001 1342 Query 1 1412 use `test`; drop table t5 -slave-bin.000001 1412 Rotate 2 1455 slave-bin.000002;pos=4 +slave-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +slave-bin.000001 217 Intvar 1 245 INSERT_ID=1 +slave-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL) +slave-bin.000001 337 Query 1 414 use `test`; drop table t1 +slave-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null) +slave-bin.000001 518 Create_file 1 1197 db=test;table=t1;file_id=1;block_len=581 +slave-bin.000001 1197 Exec_load 1 1220 ;file_id=1 +slave-bin.000001 1220 Query 1 1297 use `test`; drop table t1 +slave-bin.000001 1297 Query 1 1384 use `test`; create table t5 (a int) +slave-bin.000001 1384 Query 1 1461 use `test`; drop table t5 +slave-bin.000001 1461 Rotate 2 1504 slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4 -slave-bin.000002 95 Query 1 175 use `test`; create table t1 (n int) -slave-bin.000002 175 Query 1 257 use `test`; insert into t1 values (1) -slave-bin.000002 257 Query 1 327 use `test`; drop table t1 +slave-bin.000002 95 Query 1 182 use `test`; create table t1 (n int) +slave-bin.000002 182 Query 1 271 use `test`; insert into t1 values (1) +slave-bin.000002 271 Query 1 348 use `test`; drop table t1 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 477 # # master-bin.000002 Yes Yes 0 0 477 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 512 # # master-bin.000002 Yes Yes 0 0 512 # None 0 No # show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result index c1589687eee..c1f8b0ad889 100644 --- a/mysql-test/r/rpl_max_relay_size.result +++ b/mysql-test/r/rpl_max_relay_size.result @@ -16,7 +16,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68137 # # master-bin.000001 Yes Yes 0 0 68137 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No # stop slave; reset slave; set global max_relay_log_size=(5*4096); @@ -26,7 +26,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68137 # # master-bin.000001 Yes Yes 0 0 68137 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No # stop slave; reset slave; set global max_relay_log_size=0; @@ -36,7 +36,7 @@ select @@global.max_relay_log_size; start slave; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68137 # # master-bin.000001 Yes Yes 0 0 68137 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No # stop slave; reset slave; flush logs; @@ -49,12 +49,12 @@ flush logs; create table t1 (a int); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68217 # # master-bin.000001 Yes Yes 0 0 68217 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73838 # # master-bin.000001 Yes Yes 0 0 73838 # None 0 No # flush logs; drop table t1; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 68287 # # master-bin.000001 Yes Yes 0 0 68287 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73915 # # master-bin.000001 Yes Yes 0 0 73915 # None 0 No # flush logs; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB diff --git a/mysql-test/r/rpl_multi_update2.result b/mysql-test/r/rpl_multi_update2.result new file mode 100644 index 00000000000..99356ebf970 --- /dev/null +++ b/mysql-test/r/rpl_multi_update2.result @@ -0,0 +1,42 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +CREATE TABLE t1 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +CREATE TABLE t2 ( +a int unsigned not null auto_increment primary key, +b int unsigned +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (NULL, 0); +INSERT INTO t1 SELECT NULL, 0 FROM t1; +INSERT INTO t2 VALUES (NULL, 0), (NULL,1); +SELECT * FROM t1 ORDER BY a; +a b +1 0 +2 0 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +UPDATE t1, t2 SET t1.b = (t2.b+4) WHERE t1.a = t2.a; +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 +SELECT * FROM t1 ORDER BY a; +a b +1 4 +2 5 +SELECT * FROM t2 ORDER BY a; +a b +1 0 +2 1 diff --git a/mysql-test/r/rpl_relayrotate.result b/mysql-test/r/rpl_relayrotate.result index bd6e10409b9..38a5a634dd6 100644 --- a/mysql-test/r/rpl_relayrotate.result +++ b/mysql-test/r/rpl_relayrotate.result @@ -18,5 +18,5 @@ max(a) 8000 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 687207 # # master-bin.000001 Yes Yes 0 0 687207 # None 0 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 743228 # # master-bin.000001 Yes Yes 0 0 743228 # None 0 No # drop table t1; diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index 5cdcb6f30fb..df75433e84e 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1554 # # master-bin.000001 Yes Yes test.t1 0 0 1554 # None 0 No # +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1617 # # master-bin.000001 Yes Yes test.t1 0 0 1617 # None 0 No # diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index b1847636790..e675f8177ab 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -16,7 +16,7 @@ create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 521 # # master-bin.000001 Yes Yes 0 0 521 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 549 # # master-bin.000001 Yes Yes 0 0 549 # None 0 No # select * from t1; s Could not break slave @@ -57,7 +57,7 @@ master-bin.000003 insert into t2 values (65); show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 469 # # master-bin.000003 Yes Yes 0 0 469 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 497 # # master-bin.000003 Yes Yes 0 0 497 # None 0 No # select * from t2; m 34 @@ -79,13 +79,13 @@ master-bin.000004 master-bin.000005 show master status; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000005 1387 +master-bin.000005 2050 select * from t4; a testing temporary tables part 2 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 1387 # # master-bin.000005 Yes Yes 0 0 1387 # None 0 No # +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2050 # # master-bin.000005 Yes Yes 0 0 2050 # None 0 No # lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/r/rpl_temporary.result b/mysql-test/r/rpl_temporary.result index 3e8c11883be..7d3ebd4ad32 100644 --- a/mysql-test/r/rpl_temporary.result +++ b/mysql-test/r/rpl_temporary.result @@ -39,18 +39,18 @@ f show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 178 use `test`; drop table if exists t1,t2 -master-bin.000001 178 Query 1 257 use `test`; create table t1(f int) -master-bin.000001 257 Query 1 336 use `test`; create table t2(f int) -master-bin.000001 336 Query 1 455 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) -master-bin.000001 455 Query 1 544 use `test`; create temporary table t3(f int) -master-bin.000001 544 Query 1 642 use `test`; insert into t3 select * from t1 where f<6 -master-bin.000001 642 Query 1 731 use `test`; create temporary table t3(f int) -master-bin.000001 731 Query 1 826 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 826 Query 1 925 use `test`; insert into t3 select * from t1 where f>=4 -master-bin.000001 925 Query 1 1005 use `test`; drop temporary table t3 -master-bin.000001 1005 Query 1 1100 use `test`; insert into t2 select count(*) from t3 -master-bin.000001 1100 Query 1 1180 use `test`; drop temporary table t3 +master-bin.000001 95 Query 1 185 use `test`; drop table if exists t1,t2 +master-bin.000001 185 Query 1 271 use `test`; create table t1(f int) +master-bin.000001 271 Query 1 357 use `test`; create table t2(f int) +master-bin.000001 357 Query 1 483 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10) +master-bin.000001 483 Query 1 579 use `test`; create temporary table t3(f int) +master-bin.000001 579 Query 1 684 use `test`; insert into t3 select * from t1 where f<6 +master-bin.000001 684 Query 1 780 use `test`; create temporary table t3(f int) +master-bin.000001 780 Query 1 882 use `test`; insert into t2 select count(*) from t3 +master-bin.000001 882 Query 1 988 use `test`; insert into t3 select * from t1 where f>=4 +master-bin.000001 988 Query 1 1075 use `test`; drop temporary table t3 +master-bin.000001 1075 Query 1 1177 use `test`; insert into t2 select count(*) from t3 +master-bin.000001 1177 Query 1 1264 use `test`; drop temporary table t3 drop table t1, t2; use test; SET TIMESTAMP=1040323920; diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result index 495fccd35a3..ac219fe9d1c 100644 --- a/mysql-test/r/rpl_timezone.result +++ b/mysql-test/r/rpl_timezone.result @@ -33,12 +33,12 @@ t show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 181 use `test`; create table t1 (t timestamp) -master-bin.000001 181 Query 1 266 use `test`; create table t2 (t char(32)) -master-bin.000001 266 Query 1 351 use `test`; SET ONE_SHOT TIME_ZONE='UTC' -master-bin.000001 351 Query 1 468 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') -master-bin.000001 468 Query 1 539 use `test`; delete from t1 -master-bin.000001 539 Query 1 656 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') +master-bin.000001 95 Query 1 188 use `test`; create table t1 (t timestamp) +master-bin.000001 188 Query 1 280 use `test`; create table t2 (t char(32)) +master-bin.000001 280 Query 1 372 use `test`; SET ONE_SHOT TIME_ZONE='UTC' +master-bin.000001 372 Query 1 496 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') +master-bin.000001 496 Query 1 574 use `test`; delete from t1 +master-bin.000001 574 Query 1 698 use `test`; insert into t1 values ('20040101000000'), ('20040611093902') set time_zone='MET'; insert into t2 (select t from t1); select * from t1; diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index ba8c0c1f131..90ea94b89e6 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -15,13 +15,13 @@ drop table t2; show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4 -master-bin.000001 95 Query 1 210 use `test`; create table t1(n int not null auto_increment primary key) -master-bin.000001 210 Query 1 304 use `test`; insert into t1 values (1),(2),(3),(4) -master-bin.000001 304 Query 1 374 use `test`; drop table t1 -master-bin.000001 374 Query 1 489 use `test`; create table t2(n int not null auto_increment primary key) -master-bin.000001 489 Query 1 575 use `test`; insert into t2 values (1),(2) -master-bin.000001 575 Query 1 661 use `test`; insert into t2 values (3),(4) -master-bin.000001 661 Query 1 731 use `test`; drop table t2 +master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key) +master-bin.000001 217 Query 1 318 use `test`; insert into t1 values (1),(2),(3),(4) +master-bin.000001 318 Query 1 395 use `test`; drop table t1 +master-bin.000001 395 Query 1 517 use `test`; create table t2(n int not null auto_increment primary key) +master-bin.000001 517 Query 1 610 use `test`; insert into t2 values (1),(2) +master-bin.000001 610 Query 1 703 use `test`; insert into t2 values (3),(4) +master-bin.000001 703 Query 1 780 use `test`; drop table t2 start slave until master_log_file='master-bin.000001', master_log_pos=304; select * from t1; n @@ -31,7 +31,7 @@ n 4 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 731 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 304 # Master master-bin.000001 304 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 318 # Master master-bin.000001 304 No # start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -41,7 +41,7 @@ n 4 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 731 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 304 # Master master-no-such-bin.000001 291 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 318 # Master master-no-such-bin.000001 291 No # start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=710; select * from t2; n @@ -49,13 +49,13 @@ n 2 show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 731 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 575 # Relay slave-relay-bin.000004 710 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 610 # Relay slave-relay-bin.000004 710 No # start slave; stop slave; start slave until master_log_file='master-bin.000001', master_log_pos=710; show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 731 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 731 # Master master-bin.000001 710 No # +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 780 # Master master-bin.000001 710 No # start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result index dd9a11e370f..2e39f1f6422 100644 --- a/mysql-test/r/rpl_user_variables.result +++ b/mysql-test/r/rpl_user_variables.result @@ -76,34 +76,35 @@ abcn1n2 NULL NULL NULL -show binlog events from 179; +show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info -slave-bin.000001 179 User var 2 222 @`i1`=12345678901234 -slave-bin.000001 222 User var 2 265 @`i2`=-12345678901234 -slave-bin.000001 265 User var 2 308 @`i3`=0 -slave-bin.000001 308 User var 2 351 @`i4`=-1 -slave-bin.000001 351 Query 1 456 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4) -slave-bin.000001 456 User var 2 499 @`r1`=12.5 -slave-bin.000001 499 User var 2 542 @`r2`=-12.5 -slave-bin.000001 542 Query 1 633 use `test`; insert into t1 values (@r1), (@r2) -slave-bin.000001 633 User var 2 682 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci -slave-bin.000001 682 User var 2 717 @`s2`=_latin1 "" COLLATE latin1_swedish_ci -slave-bin.000001 717 User var 2 759 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci -slave-bin.000001 759 User var 2 801 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci -slave-bin.000001 801 User var 2 843 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci -slave-bin.000001 843 Query 1 955 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5) -slave-bin.000001 955 User var 2 981 @`n1`=NULL -slave-bin.000001 981 Query 1 1065 use `test`; insert into t1 values (@n1) -slave-bin.000001 1065 User var 2 1091 @`n2`=NULL -slave-bin.000001 1091 Query 1 1175 use `test`; insert into t1 values (@n2) -slave-bin.000001 1175 Query 1 1285 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1) -slave-bin.000001 1285 User var 2 1327 @`a`=2 -slave-bin.000001 1327 Query 1 1421 use `test`; insert into t1 values (@a+(@b:=@a+1)) -slave-bin.000001 1421 User var 2 1458 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci -slave-bin.000001 1458 Query 1 1584 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')) -slave-bin.000001 1584 User var 2 1626 @`a`=5 -slave-bin.000001 1626 Query 1 1714 use `test`; insert into t1 values (@a),(@a) -slave-bin.000001 1714 User var 2 1739 @`a`=NULL -slave-bin.000001 1739 Query 1 1834 use `test`; insert into t1 values (@a),(@a),(@a*5) +slave-bin.000001 95 Query 1 186 use `test`; create table t1(n char(30)) +slave-bin.000001 186 User var 2 229 @`i1`=12345678901234 +slave-bin.000001 229 User var 2 272 @`i2`=-12345678901234 +slave-bin.000001 272 User var 2 315 @`i3`=0 +slave-bin.000001 315 User var 2 358 @`i4`=-1 +slave-bin.000001 358 Query 1 470 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4) +slave-bin.000001 470 User var 2 509 @`r1`=12.5 +slave-bin.000001 509 User var 2 548 @`r2`=-12.5 +slave-bin.000001 548 Query 1 646 use `test`; insert into t1 values (@r1), (@r2) +slave-bin.000001 646 User var 2 695 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci +slave-bin.000001 695 User var 2 730 @`s2`=_latin1 "" COLLATE latin1_swedish_ci +slave-bin.000001 730 User var 2 772 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 772 User var 2 814 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci +slave-bin.000001 814 User var 2 856 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci +slave-bin.000001 856 Query 1 975 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5) +slave-bin.000001 975 User var 2 1001 @`n1`=NULL +slave-bin.000001 1001 Query 1 1092 use `test`; insert into t1 values (@n1) +slave-bin.000001 1092 User var 2 1118 @`n2`=NULL +slave-bin.000001 1118 Query 1 1209 use `test`; insert into t1 values (@n2) +slave-bin.000001 1209 Query 1 1326 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1) +slave-bin.000001 1326 User var 2 1368 @`a`=2 +slave-bin.000001 1368 Query 1 1469 use `test`; insert into t1 values (@a+(@b:=@a+1)) +slave-bin.000001 1469 User var 2 1506 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci +slave-bin.000001 1506 Query 1 1639 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2')) +slave-bin.000001 1639 User var 2 1681 @`a`=5 +slave-bin.000001 1681 Query 1 1776 use `test`; insert into t1 values (@a),(@a) +slave-bin.000001 1776 User var 2 1801 @`a`=NULL +slave-bin.000001 1801 Query 1 1903 use `test`; insert into t1 values (@a),(@a),(@a*5) drop table t1; stop slave; diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 7d5b2ed18cb..b72754d3374 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -1672,7 +1672,7 @@ fld1 count(*) 158402 4181 select sum(Period)/count(*) from t1; sum(Period)/count(*) -9410.00 +9410.00000 select companynr,count(price) as "count",sum(price) as "sum" ,abs(sum(price)/count(price)-avg(price)) as "diff",(0+count(price))*companynr as func from t3 group by companynr; companynr count sum diff func 37 12543 309394878010 0.0000 464091 @@ -2109,7 +2109,7 @@ select @b; aaaa select @c; @c -6.26 +6.260 create table t1 (a int not null auto_increment primary key); insert into t1 values (); insert into t1 values (); diff --git a/mysql-test/r/server_id.require b/mysql-test/r/server_id.require new file mode 100644 index 00000000000..adffcc483b1 --- /dev/null +++ b/mysql-test/r/server_id.require @@ -0,0 +1,2 @@ +Variable_name Value +server_id 1 diff --git a/mysql-test/r/server_id1.require b/mysql-test/r/server_id1.require new file mode 100644 index 00000000000..666c94ef633 --- /dev/null +++ b/mysql-test/r/server_id1.require @@ -0,0 +1,2 @@ +Variable_name Value +server_id 102 diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 57126162e3f..1c2f4662ef1 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -120,15 +120,8 @@ ERROR 42000: End-label bar without match create procedure foo() return 42| ERROR 42000: RETURN is only allowed in a FUNCTION -create function foo() returns int -begin -declare x int; -select max(c) into x from test.t; -return x; -end| -ERROR 0A000: Statements like SELECT, INSERT, UPDATE (and others) are not allowed in a FUNCTION create procedure p(x int) -insert into test.t1 values (x)| +set @x = x| create function f(x int) returns int return x+42| call p()| @@ -336,10 +329,6 @@ ERROR 42S22: Unknown column 'valname' in 'order clause' drop procedure bug1965| select 1 into a| ERROR 42000: Undeclared variable: a -create function bug1654() -returns int -return (select sum(t.data) from test.t2 t)| -ERROR 0A000: Statements like SELECT, INSERT, UPDATE (and others) are not allowed in a FUNCTION drop table if exists t3| create table t3 (column_1_0 int)| create procedure bug1653() @@ -354,7 +343,7 @@ drop table t3| create procedure bug2259() begin declare v1 int; -declare c1 cursor for select s1 from t10; +declare c1 cursor for select s1 from t1; fetch c1 into v1; end| call bug2259()| @@ -458,7 +447,9 @@ create procedure bug3294() begin declare continue handler for sqlexception drop table t5; drop table t5; +drop table t5; end| +create table t5 (x int)| call bug3294()| ERROR 42S02: Unknown table 't5' drop procedure bug3294| diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 1fd519bc729..0af6b821ce0 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -693,7 +693,7 @@ drop procedure if exists create_select| create procedure create_select(x char(16), y int) begin insert into test.t1 values (x, y); -create table test.t3 select * from test.t1; +create temporary table test.t3 select * from test.t1; insert into test.t3 values (concat(x, "2"), y+2); end| drop table if exists t3| @@ -775,11 +775,11 @@ drop procedure if exists hndlr1| create procedure hndlr1(val int) begin declare x int default 0; -declare foo condition for 1146; +declare foo condition for 1136; declare bar condition for sqlstate '42S98'; # Just for testing syntax declare zip condition for sqlstate value '42S99'; # Just for testing syntax declare continue handler for foo set x = 1; -insert into test.t666 values ("hndlr1", val); # Non-existing table +insert into test.t1 values ("hndlr1", val, 2); # Too many values if (x) then insert into test.t1 values ("hndlr1", val); # This instead then end if; @@ -795,8 +795,8 @@ create procedure hndlr2(val int) begin declare x int default 0; begin -declare exit handler for sqlstate '42S02' set x = 1; -insert into test.t666 values ("hndlr2", val); # Non-existing table +declare exit handler for sqlstate '21S01' set x = 1; +insert into test.t1 values ("hndlr2", val, 2); # Too many values end; insert into test.t1 values ("hndlr2", x); end| @@ -820,7 +820,7 @@ if val < 10 then begin declare y int; set y = val + 10; -insert into test.t666 values ("hndlr3", y); # Non-existing table +insert into test.t1 values ("hndlr3", y, 2); # Too many values if x then insert into test.t1 values ("hndlr3", y); end if; @@ -1239,18 +1239,6 @@ call bug2227(9)| 1.3 x y 42 z 1.3 9 2.6 42 zzz drop procedure bug2227| -drop procedure if exists bug2614| -create procedure bug2614() -begin -drop table if exists t3; -create table t3 (id int default '0' not null); -insert into t3 select 12; -insert into t3 select * from t3; -end| -call bug2614()| -call bug2614()| -drop table t3| -drop procedure bug2614| drop function if exists bug2674| create function bug2674() returns int return @@sort_buffer_size| @@ -1551,7 +1539,7 @@ drop procedure if exists bug2460_2| create procedure bug2460_2() begin drop table if exists t3; -create table t3 (s1 int); +create temporary table t3 (s1 int); insert into t3 select 1 union select 1; end| call bug2460_2()| @@ -1681,22 +1669,6 @@ call bug4726()| call bug4726()| drop procedure bug4726| drop table t3| -drop table if exists t3| -create table t3 (s1 int)| -insert into t3 values (3), (4)| -drop procedure if exists bug4318| -create procedure bug4318() -handler t3 read next| -handler t3 open| -call bug4318()| -s1 -3 -call bug4318()| -s1 -4 -handler t3 close| -drop procedure bug4318| -drop table t3| drop procedure if exists bug4902| create procedure bug4902() begin @@ -2302,22 +2274,110 @@ show procedure status like 'bar'| Db Name Type Definer Modified Created Security_type Comment test bar PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER 3333333333 drop procedure bar| -drop table t1; -drop table t2; -drop procedure if exists p1; -create procedure p1 () select (select s1 from t1) from t1; -create table t1 (s1 int); -call p1(); -(select s1 from t1) -insert into t1 values (1); -call p1(); -(select s1 from t1) +drop procedure if exists p1| +create procedure p1 () +select (select s1 from t3) from t3| +create table t3 (s1 int)| +call p1()| +(select s1 from t3) +insert into t3 values (1)| +call p1()| +(select s1 from t3) 1 -drop procedure p1; -drop table t1; -drop function if exists foo; -create function `foo` () returns int return 5; -select `foo` (); +drop procedure p1| +drop table t3| +drop function if exists foo| +create function `foo` () returns int +return 5| +select `foo` ()| `foo` () 5 -drop function `foo`; +drop function `foo`| +drop function if exists t1max| +Warnings: +Note 1305 FUNCTION t1max does not exist +create function t1max() returns int +begin +declare x int; +select max(data) into x from t1; +return x; +end| +insert into t1 values ("foo", 3), ("bar", 2), ("zip", 5), ("zap", 1)| +select t1max()| +t1max() +5 +drop function t1max| +drop table if exists t3| +create table t3 ( +v char(16) not null primary key, +c int unsigned not null +)| +create function getcount(s char(16)) returns int +begin +declare x int; +select count(*) into x from t3 where v = s; +if x = 0 then +insert into t3 values (s, 1); +else +update t3 set c = c+1 where v = s; +end if; +return x; +end| +select * from t1 where data = getcount("bar")| +id data +zap 1 +select * from t3| +v c +bar 4 +select getcount("zip")| +getcount("zip") +0 +select getcount("zip")| +getcount("zip") +1 +select * from t3| +v c +bar 4 +zip 2 +select getcount(id) from t1 where data = 3| +getcount(id) +0 +select getcount(id) from t1 where data = 5| +getcount(id) +1 +select * from t3| +v c +bar 4 +zip 3 +foo 1 +drop table t3| +drop function getcount| +drop function if exists bug5240| +create function bug5240 () returns int +begin +declare x int; +declare c cursor for select data from t1 limit 1; +open c; +fetch c into x; +close c; +return x; +end| +delete from t1| +insert into t1 values ("answer", 42)| +select id, bug5240() from t1| +id bug5240() +42 42 +drop function bug5240| +drop function if exists bug5278| +create function bug5278 () returns char +begin +SET PASSWORD FOR 'bob'@'%.loc.gov' = PASSWORD('newpass'); +return 'okay'; +end| +select bug5278()| +ERROR 42000: Can't find any matching row in the user table +select bug5278()| +ERROR 42000: Can't find any matching row in the user table +drop function bug5278| +drop table t1; +drop table t2; diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 5492a7a65fc..09adc48259c 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -386,4 +386,18 @@ p mask example 20 \\\\% \\\\% 20 \\\\% \\\\_ DROP TABLE t1; +SET @@SQL_MODE='NO_BACKSLASH_ESCAPES'; +SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b'; +a\\b a\\\"b a'\\b a'\\\"b +a\\b a\\\"b a'\\b a'\\\"b +SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b"; +a\\b a\\\'b a"\\b a"\\\'b +a\\b a\\\'b a"\\b a"\\\'b +SET @@SQL_MODE=''; +SELECT 'a\\b', 'a\\\"b', 'a''\\b', 'a''\\\"b'; +a\b a\"b a'\b a'\"b +a\b a\"b a'\b a'\"b +SELECT "a\\b", "a\\\'b", "a""\\b", "a""\\\'b"; +a\b a\'b a"\b a"\'b +a\b a\'b a"\b a"\'b SET @@SQL_MODE=@OLD_SQL_MODE; diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 72a763db1b1..2e48ddf6d53 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -531,7 +531,6 @@ Warning 1264 Out of range value adjusted for column 'col1' at row 1 Warning 1264 Out of range value adjusted for column 'col2' at row 1 Warning 1264 Out of range value adjusted for column 'col1' at row 2 Warning 1264 Out of range value adjusted for column 'col2' at row 2 -Warning 1264 Out of range value adjusted for column 'col2' at row 2 UPDATE IGNORE t1 SET col2=1/NULL where col1=0; SELECT * FROM t1; col1 col2 @@ -556,6 +555,7 @@ INSERT INTO t1 VALUES(-9223372036854775808,0),(0,0),(9223372036854775807,1844674 INSERT INTO t1 VALUES('-9223372036854775808','0'),('9223372036854775807','18446744073709551615'); INSERT INTO t1 VALUES(-9223372036854774000.0,0.0),(9223372036854775700.0,1844674407370954000.0); INSERT INTO t1 (col1) VALUES(-9223372036854775809); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(9223372036854775808); INSERT INTO t1 (col2) VALUES(-1); INSERT INTO t1 (col2) VALUES(18446744073709551616); @@ -595,6 +595,7 @@ Error 1365 Division by 0 Error 1365 Division by 0 INSERT IGNORE INTO t1 VALUES(-9223372036854775809,-1),(9223372036854775808,18446744073709551616); Warnings: +Warning 1264 Out of range value adjusted for column 'col1' at row 1 Warning 1264 Out of range value adjusted for column 'col2' at row 2 INSERT IGNORE INTO t1 VALUES('-9223372036854775809','-1'),('9223372036854775808','18446744073709551616'); Warnings: @@ -616,9 +617,8 @@ col1 col2 9223372036854775807 18446744073709551615 -9223372036854775808 0 9223372036854775807 18446744073709551615 --9223372036854773760 0 -9223372036854775807 1844674407370953984 --9223372036854775808 NULL +-9223372036854774000 0 +9223372036854775700 1844674407370954000 -9223372036854775808 NULL NULL 18446744073709551615 2 NULL @@ -632,12 +632,17 @@ NULL NULL DROP TABLE t1; CREATE TABLE t1 (col1 NUMERIC(4,2)); INSERT INTO t1 VALUES (10.55),(10.5555),(0),(-10.55),(-10.5555),(11),(1e+01); +Warnings: +Note 1265 Data truncated for column 'col1' at row 2 +Note 1265 Data truncated for column 'col1' at row 5 INSERT INTO t1 VALUES ('10.55'),('10.5555'),('-10.55'),('-10.5555'),('11'),('1e+01'); Warnings: Note 1265 Data truncated for column 'col1' at row 2 Note 1265 Data truncated for column 'col1' at row 4 INSERT INTO t1 VALUES (101.55); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES (101); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES (-101.55); ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES (1010.55); @@ -645,7 +650,9 @@ ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES (1010); ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES ('101.55'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES ('101'); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES ('-101.55'); ERROR 22003: Out of range value adjusted for column 'col1' at row 1 INSERT INTO t1 VALUES ('-1010.55'); @@ -661,14 +668,15 @@ ERROR 22012: Division by 0 UPDATE t1 SET col1= MOD(col1,0) WHERE col1 > 0; ERROR 22012: Division by 0 INSERT INTO t1 (col1) VALUES (''); -ERROR 01000: Data truncated for column 'col1' at row 1 +ERROR HY000: Incorrect decimal value: '' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES ('a59b'); -ERROR 01000: Data truncated for column 'col1' at row 1 +ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES ('1a'); -ERROR 01000: Data truncated for column 'col1' at row 1 +Warnings: +Note 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 (col1) VALUES ('2a'); Warnings: -Warning 1265 Data truncated for column 'col1' at row 1 +Note 1265 Data truncated for column 'col1' at row 1 INSERT IGNORE INTO t1 values (1/0); Warnings: Error 1365 Division by 0 @@ -695,22 +703,19 @@ NULL 11.00 10.00 10.55 -10.55 --10.55 +10.56 -10.55 +-10.56 11.00 10.00 -101.55 -101.00 -101.55 -101.00 +1.00 2.00 NULL -999.99 +99.99 -99.99 -999.99 +99.99 -99.99 -999.99 +99.99 -99.99 DROP TABLE t1; CREATE TABLE t1 (col1 FLOAT, col2 FLOAT UNSIGNED); diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 5fd2053a3ec..2e9f199e8bb 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -890,7 +890,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL PRIMARY 4 NULL 4 Using index 2 DEPENDENT SUBQUERY t2 index_subquery a a 5 func 2 Using index Warnings: -Note 1003 select `test`.`t1`.`a` AS `a`,<in_optimizer>(`test`.`t1`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in t2 on a chicking NULL))) AS `t1.a in (select t2.a from t2)` from `test`.`t1` +Note 1003 select `test`.`t1`.`a` AS `a`,<in_optimizer>(`test`.`t1`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`a`) in t2 on a checking NULL))) AS `t1.a in (select t2.a from t2)` from `test`.`t1` CREATE TABLE t3 (a int(11) default '0'); INSERT INTO t3 VALUES (1),(2),(3); SELECT t1.a, t1.a in (select t2.a from t2,t3 where t3.a=t2.a) FROM t1; @@ -1462,25 +1462,25 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 5 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 2 Using index Warnings: -Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 chicking NULL)))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1` +Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL)))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1` explain extended select s1, s1 = ANY (SELECT s1 FROM t2) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 5 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 2 Using index Warnings: -Note 1003 select `test`.`t1`.`s1` AS `s1`,<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 chicking NULL))) AS `s1 = ANY (SELECT s1 FROM t2)` from `test`.`t1` +Note 1003 select `test`.`t1`.`s1` AS `s1`,<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL))) AS `s1 = ANY (SELECT s1 FROM t2)` from `test`.`t1` explain extended select s1, s1 <> ALL (SELECT s1 FROM t2) from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 5 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 2 Using index Warnings: -Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 chicking NULL)))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1` +Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL)))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1` explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL s1 5 NULL 3 Using index 2 DEPENDENT SUBQUERY t2 index_subquery s1 s1 6 func 1 Using index; Using where Warnings: -Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 chicking NULL where (`test`.`t2`.`s1` < _latin1'a2'))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1` +Note 1003 select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where (`test`.`t2`.`s1` < _latin1'a2'))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1` drop table t1,t2; create table t2 (a int, b int); create table t3 (a int); @@ -2168,3 +2168,39 @@ ERROR 42S22: Unknown column 'a2' in 'scalar IN/ALL/ANY subquery' select * from t1 where a1 > any(select b1 from t2); a1 drop table t1,t2; +create table t1 (a integer, b integer); +select (select * from t1) = (select 1,2); +(select * from t1) = (select 1,2) +NULL +select (select 1,2) = (select * from t1); +(select 1,2) = (select * from t1) +NULL +select row(1,2) = ANY (select * from t1); +row(1,2) = ANY (select * from t1) +0 +select row(1,2) != ALL (select * from t1); +row(1,2) != ALL (select * from t1) +1 +drop table t1; +create table t1 (a integer, b integer); +select row(1,(2,2)) in (select * from t1 ); +ERROR 21000: Operand should contain 2 column(s) +select row(1,(2,2)) = (select * from t1 ); +ERROR 21000: Operand should contain 2 column(s) +select (select * from t1) = row(1,(2,2)); +ERROR 21000: Operand should contain 1 column(s) +drop table t1; +create table t1 (a integer); +insert into t1 values (1); +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx ; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +select 1 as xx, 1 = ALL ( select 1 from t1 where 1 = xx ); +xx 1 = ALL ( select 1 from t1 where 1 = xx ) +1 1 +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx from DUAL; +ERROR 42S22: Reference 'xx' not supported (forward reference in item list) +drop table t1; diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result index 0b813a07a1d..0666fd76661 100644 --- a/mysql-test/r/subselect_innodb.result +++ b/mysql-test/r/subselect_innodb.result @@ -140,3 +140,15 @@ id date1 coworkerid description sum_used sum_remaining comments 6 2004-01-01 1 test 22 33 comment 7 2004-01-01 1 test 22 33 comment drop table t1; +CREATE TABLE `t1` ( `a` char(3) NOT NULL default '', `b` char(3) NOT NULL default '', `c` char(3) NOT NULL default '', PRIMARY KEY (`a`,`b`,`c`)) ENGINE=InnoDB; +CREATE TABLE t2 LIKE t1; +INSERT INTO t1 VALUES (1,1,1); +INSERT INTO t2 VALUES (1,1,1); +PREPARE my_stmt FROM "SELECT t1.b, count(*) FROM t1 group by t1.b having +count(*) > ALL (SELECT COUNT(*) FROM t2 WHERE t2.a=1 GROUP By t2.b)"; +EXECUTE my_stmt; +b count(*) +EXECUTE my_stmt; +b count(*) +deallocate prepare my_stmt; +drop table t1,t2; diff --git a/mysql-test/r/sum_distinct.result b/mysql-test/r/sum_distinct.result index c7f1a660267..34242817a54 100644 --- a/mysql-test/r/sum_distinct.result +++ b/mysql-test/r/sum_distinct.result @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1, t2; CREATE TABLE t1 ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, gender CHAR(1), diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index 71d1b9ad381..e88eebffb55 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -96,3 +96,11 @@ f2 19781126 19781126 DROP TABLE t1, t2, t3; +CREATE TABLE t1 (y YEAR); +INSERT INTO t1 VALUES ('abc'); +Warnings: +Warning 1264 Out of range value adjusted for column 'y' at row 1 +SELECT * FROM t1; +y +0000 +DROP TABLE t1; diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index c9a272df1ba..2045b7e65dd 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -156,6 +156,9 @@ insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); insert into t1 values ("-.1"),("+.1"),(".1"); insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 @@ -164,7 +167,7 @@ Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 +Note 1265 Data truncated for column 'a' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: @@ -172,24 +175,24 @@ Note 1265 Data truncated for column 'a' at row 3 select * from t1; a 0.00 --0.00 -+0.00 -01.00 -+01.00 --01.00 +0.00 +0.00 +1.00 +1.00 +-1.00 -0.10 -+0.10 0.10 -000000001.00 -+00000001.00 --00000001.00 -111111111.11 -111111111.11 +0.10 +1.00 +1.00 +-1.00 +99999999.99 +99999999.99 -11111111.11 -99999999.99 -999999999.99 -999999999.99 -999999999.99 +99999999.99 +99999999.99 +99999999.99 0.00 -99999999.99 123.40 @@ -222,7 +225,7 @@ Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 +Note 1265 Data truncated for column 'a' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: @@ -231,15 +234,15 @@ select * from t1; a 0.00 0.00 -+0.00 -01.00 -+01.00 +0.00 +1.00 +1.00 0.00 0.00 -+0.10 0.10 -00000001.00 -+0000001.00 +0.10 +1.00 +1.00 0.00 99999999.99 99999999.99 @@ -280,7 +283,7 @@ Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 -Warning 1265 Data truncated for column 'a' at row 2 +Note 1265 Data truncated for column 'a' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: @@ -319,6 +322,9 @@ insert into t1 values (0.0),("-0.0"),(+0.0),(01.0),(+01.0),(-01.0); insert into t1 values (-.1),(+.1),(.1); insert into t1 values (00000000000001),(+0000000000001),(-0000000000001); insert into t1 values (+111111111.11),(111111111.11),(-11111111.11); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 @@ -327,12 +333,15 @@ Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values (1e+100),(1e-100),(-1e+100); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 +Note 1265 Data truncated for column 'a' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 3 insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0); +Warnings: +Note 1265 Data truncated for column 'a' at row 3 select * from t1; a 0.00 --0.00 +0.00 0.00 1.00 1.00 @@ -343,13 +352,13 @@ a 1.00 1.00 -1.00 -111111111.11 -111111111.11 +99999999.99 +99999999.99 -11111111.11 -99999999.99 -999999999.99 -999999999.99 -999999999.99 +99999999.99 +99999999.99 +99999999.99 0.00 -99999999.99 123.40 @@ -362,16 +371,17 @@ create table t1 (a decimal); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 6 Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a -9999999999 -1 -+1 -01 -+0000000001 -12345678901 -99999999999 +1 +1 +1 +9999999999 +9999999999 drop table t1; create table t1 (a decimal unsigned); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); @@ -381,11 +391,11 @@ Warning 1264 Out of range value adjusted for column 'a' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a -0 -0 -+1 -01 -+000000001 +9999999999 +9999999999 +1 +1 +1 1234567890 9999999999 drop table t1; @@ -397,8 +407,8 @@ Warning 1264 Out of range value adjusted for column 'a' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a -0000000000 -0000000000 +9999999999 +9999999999 0000000001 0000000001 0000000001 @@ -413,8 +423,8 @@ Warning 1264 Out of range value adjusted for column 'a' at row 2 Warning 1264 Out of range value adjusted for column 'a' at row 7 select * from t1; a -0000000000 -0000000000 +9999999999 +9999999999 0000000001 0000000001 0000000001 @@ -424,19 +434,17 @@ drop table t1; create table t1(a decimal(10,0)); insert into t1 values ("1e4294967295"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 Warning 1264 Out of range value adjusted for column 'a' at row 1 select * from t1; a -99999999999 +9999999999 delete from t1; insert into t1 values("1e4294967297"); Warnings: -Warning 1265 Data truncated for column 'a' at row 1 Warning 1264 Out of range value adjusted for column 'a' at row 1 select * from t1; a -99999999999 +9999999999 drop table t1; CREATE TABLE t1 (a_dec DECIMAL(-1,0)); 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,0))' at line 1 @@ -448,7 +456,7 @@ CREATE TABLE t1 (a_dec DECIMAL(0,11)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a_dec` decimal(12,11) default NULL + `a_dec` decimal(11,11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; create table t1(a decimal(7,3)); @@ -456,64 +464,64 @@ insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000 select * from t1; a 1.000 -+1.000 +1.000 -1.000 -00001.000 -+0001.000 --0001.000 +1.000 +1.000 +-1.000 +10.000 +10.000 +-10.000 +10.000 10.000 -+10.000 -10.000 -00010.000 -+0010.000 --0010.000 100.000 -+100.000 +100.000 +-100.000 +100.000 +100.000 -100.000 -00100.000 -+0100.000 --0100.000 1000.000 -+1000.000 +1000.000 -1000.000 -01000.000 -+1000.000 +1000.000 +1000.000 -1000.000 -10000.000 -10000.000 +9999.999 +9999.999 -9999.999 -10000.000 -10000.000 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 -99999.999 -99999.999 +9999.999 +9999.999 -9999.999 drop table t1; create table t1(a decimal(7,3) unsigned); @@ -521,22 +529,22 @@ insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000 select * from t1; a 1.000 -+1.000 +1.000 0.000 -0001.000 -+001.000 +1.000 +1.000 0.000 10.000 -+10.000 +10.000 0.000 -0010.000 -+010.000 +10.000 +10.000 0.000 100.000 -+100.000 +100.000 0.000 -0100.000 -+100.000 +100.000 +100.000 0.000 1000.000 1000.000 diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index c77b3ad7578..8140167870e 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -66,7 +66,7 @@ select a from t1 order by a; a -0.010 -0.002 --0.000 +0.000 0.000 1.000 select min(a) from t1; @@ -119,7 +119,7 @@ select a from t1 order by a; a -0.010 -0.002 --0.000 +0.000 0.000 1.000 select min(a) from t1; @@ -142,6 +142,9 @@ create table t1 (c20 char); insert into t1 values (5000.0); Warnings: Warning 1265 Data truncated for column 'c20' at row 1 +insert into t1 values (0.5e4); +Warnings: +Warning 1265 Data truncated for column 'c20' at row 1 drop table t1; create table t1 (f float(54)); ERROR 42000: Incorrect column specifier for column 'f' diff --git a/mysql-test/r/type_float.result.es b/mysql-test/r/type_float.result.es index 2751e6cb33b..f2639ef545a 100644 --- a/mysql-test/r/type_float.result.es +++ b/mysql-test/r/type_float.result.es @@ -1,4 +1,4 @@ -drop table if exists t1; +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 @@ -8,6 +8,9 @@ SELECT 6e-05, -6e-05, --6e-05, -6e-05+1.000000; 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 +SELECT 0.001e+1,0.001e-1, -0.001e+01,-0.001e-01; +0.001e+1 0.001e-1 -0.001e+01 -0.001e-01 +0.01 0.0001 -0.01 -0.0001 create table t1 (f1 float(24),f2 float(52)); show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment @@ -143,6 +146,15 @@ drop table t1; create table t1 (f float(54)); ERROR 42000: Incorrect column specifier for column 'f' drop table if exists t1; +create table t1 (d1 double, d2 double unsigned); +insert into t1 set d1 = -1.0; +update t1 set d2 = d1; +Warnings: +Warning 1264 Out of range value adjusted for column 'd2' at row 1 +select * from t1; +d1 d2 +-1 0 +drop table t1; create table t1 (f float(4,3)); insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11"); Warnings: diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result new file mode 100644 index 00000000000..cf23d4162ae --- /dev/null +++ b/mysql-test/r/type_newdecimal.result @@ -0,0 +1,843 @@ +drop table if exists t1; +select 1.1 IN (1.0, 1.2); +1.1 IN (1.0, 1.2) +0 +select 1.1 IN (1.0, 1.2, 1.1, 1.4, 0.5); +1.1 IN (1.0, 1.2, 1.1, 1.4, 0.5) +1 +select 1.1 IN (1.0, 1.2, NULL, 1.4, 0.5); +1.1 IN (1.0, 1.2, NULL, 1.4, 0.5) +NULL +select 0.5 IN (1.0, 1.2, NULL, 1.4, 0.5); +0.5 IN (1.0, 1.2, NULL, 1.4, 0.5) +1 +select 1 IN (1.11, 1.2, 1.1, 1.4, 1, 0.5); +1 IN (1.11, 1.2, 1.1, 1.4, 1, 0.5) +1 +select 1 IN (1.11, 1.2, 1.1, 1.4, NULL, 0.5); +1 IN (1.11, 1.2, 1.1, 1.4, NULL, 0.5) +NULL +select case 1.0 when 0.1 then "a" when 1.0 then "b" else "c" END; +case 1.0 when 0.1 then "a" when 1.0 then "b" else "c" END +b +select case 0.1 when 0.1 then "a" when 1.0 then "b" else "c" END; +case 0.1 when 0.1 then "a" when 1.0 then "b" else "c" END +a +select case 1 when 0.1 then "a" when 1.0 then "b" else "c" END; +case 1 when 0.1 then "a" when 1.0 then "b" else "c" END +b +select case 1.0 when 0.1 then "a" when 1 then "b" else "c" END; +case 1.0 when 0.1 then "a" when 1 then "b" else "c" END +b +select case 1.001 when 0.1 then "a" when 1 then "b" else "c" END; +case 1.001 when 0.1 then "a" when 1 then "b" else "c" END +c +create table t1 (a decimal(6,3)); +insert into t1 values (1.0), (NULL), (0.1); +select * from t1; +a +1.000 +NULL +0.100 +select 0.1 in (1.0, 1.2, 1.1, a, 1.4, 0.5) from t1; +0.1 in (1.0, 1.2, 1.1, a, 1.4, 0.5) +0 +NULL +1 +drop table t1; +create table t1 select if(1, 1.1, 1.2), if(0, 1.1, 1.2), if(0.1, 1.1, 1.2), if(0, 1, 1.1), if(0, NULL, 1.2), if(1, 0.22e1, 1.1), if(1E0, 1.1, 1.2); +select * from t1; +if(1, 1.1, 1.2) if(0, 1.1, 1.2) if(0.1, 1.1, 1.2) if(0, 1, 1.1) if(0, NULL, 1.2) if(1, 0.22e1, 1.1) if(1E0, 1.1, 1.2) +1.1 1.2 1.1 1.1 1.2 2.2 1.1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `if(1, 1.1, 1.2)` decimal(5,1) NOT NULL default '0.0', + `if(0, 1.1, 1.2)` decimal(5,1) NOT NULL default '0.0', + `if(0.1, 1.1, 1.2)` decimal(5,1) NOT NULL default '0.0', + `if(0, 1, 1.1)` decimal(5,1) NOT NULL default '0.0', + `if(0, NULL, 1.2)` decimal(5,1) default NULL, + `if(1, 0.22e1, 1.1)` double NOT NULL default '0', + `if(1E0, 1.1, 1.2)` decimal(5,1) NOT NULL default '0.0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 select nullif(1.1, 1.1), nullif(1.1, 1.2), nullif(1.1, 0.11e1), nullif(1.0, 1), nullif(1, 1.0), nullif(1, 1.1); +select * from t1; +nullif(1.1, 1.1) nullif(1.1, 1.2) nullif(1.1, 0.11e1) nullif(1.0, 1) nullif(1, 1.0) nullif(1, 1.1) +NULL 1.1 NULL NULL NULL 1 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `nullif(1.1, 1.1)` decimal(5,1) default NULL, + `nullif(1.1, 1.2)` decimal(5,1) default NULL, + `nullif(1.1, 0.11e1)` double(4,1) default NULL, + `nullif(1.0, 1)` decimal(5,1) default NULL, + `nullif(1, 1.0)` decimal(1,0) default NULL, + `nullif(1, 1.1)` decimal(1,0) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 (a decimal(4,2)); +insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select a from t1; +a +99.99 +99.99 +99.99 +99.99 +-99.99 +-99.99 +-99.99 +-99.99 +drop table t1; +create table t1 (a decimal(4,2) unsigned); +insert into t1 value (10000), (1.1e10), ("11111"), (100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 2 +Warning 1264 Out of range value adjusted for column 'a' at row 3 +Warning 1264 Out of range value adjusted for column 'a' at row 4 +select a from t1; +a +99.99 +99.99 +99.99 +99.99 +99.99 +0.00 +0.00 +0.00 +drop table t1; +create table t1 (a bigint); +insert into t1 values (18446744073709551615.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (9223372036854775808.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (-18446744073709551615.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +select * from t1; +a +9223372036854775807 +9223372036854775807 +-9223372036854775808 +drop table t1; +create table t1 (a bigint unsigned); +insert into t1 values (18446744073709551615.0); +insert into t1 values (9223372036854775808.0); +insert into t1 values (9999999999999999999999999.000); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (-1.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +select * from t1; +a +18446744073709551615 +9223372036854775808 +18446744073709551615 +0 +drop table t1; +create table t1 (a tinyint); +insert into t1 values (18446744073709551615.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +insert into t1 values (9223372036854775808.0); +Warnings: +Warning 1264 Out of range value adjusted for column 'a' at row 1 +Warning 1264 Out of range value adjusted for column 'a' at row 1 +select * from t1; +a +127 +127 +drop table t1; +create table t1 select round(15.4,-1), truncate(-5678.123451,-3), abs(-1.1), -(-1.1); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `round(15.4,-1)` decimal(5,0) NOT NULL default '0', + `truncate(-5678.123451,-3)` decimal(13,0) NOT NULL default '0', + `abs(-1.1)` decimal(6,1) NOT NULL default '0.0', + `-(-1.1)` decimal(7,1) NOT NULL default '0.0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +CREATE TABLE t1 (a varchar(64) character set ucs2, b decimal(10,3)); +INSERT INTO t1 VALUES ("1.1", 0), ("2.1", 0); +update t1 set b=a; +SELECT * FROM t1; +a b +1.1 1.100 +2.1 2.100 +DROP TABLE t1; +set session sql_mode='traditional'; +select 1e10/0e0; +1e10/0e0 +NULL +Warnings: +Error 1365 Division by 0 +create table wl1612 (col1 int, col2 decimal(38,10), col3 numeric(38,10)); +insert into wl1612 values(1,12345678901234567890.1234567890,12345678901234567890.1234567890); +select * from wl1612; +col1 col2 col3 +1 12345678901234567890.1234567890 12345678901234567890.1234567890 +insert into wl1612 values(2,01234567890123456789.0123456789,01234567890123456789.0123456789); +select * from wl1612 where col1=2; +col1 col2 col3 +2 1234567890123456789.0123456789 1234567890123456789.0123456789 +insert into wl1612 values(3,1234567890123456789012345678.0123456789,1234567890123456789012345678.0123456789); +select * from wl1612 where col1=3; +col1 col2 col3 +3 1234567890123456789012345678.0123456789 1234567890123456789012345678.0123456789 +select col1/0 from wl1612; +col1/0 +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +select col2/0 from wl1612; +col2/0 +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +select col3/0 from wl1612; +col3/0 +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +insert into wl1612 values(5,5000.0005,5000.0005); +insert into wl1612 values(6,5000.0005,5000.0005); +select sum(col2),sum(col3) from wl1612; +sum(col2) sum(col3) +1234567903703703580370380357.1491481468 1234567903703703580370380357.1491481468 +insert into wl1612 values(7,500000.000005,500000.000005); +insert into wl1612 values(8,500000.000005,500000.000005); +select sum(col2),sum(col3) from wl1612 where col1>4; +sum(col2) sum(col3) +1010000.0010100000 1010000.0010100000 +insert into wl1612 (col1, col2) values(9,1.01234567891); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +insert into wl1612 (col1, col2) values(10,1.01234567894); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +insert into wl1612 (col1, col2) values(11,1.01234567895); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +insert into wl1612 (col1, col2) values(12,1.01234567896); +Warnings: +Note 1265 Data truncated for column 'col2' at row 1 +select col1,col2 from wl1612 where col1>8; +col1 col2 +9 1.0123456789 +10 1.0123456789 +11 1.0123456790 +12 1.0123456790 +insert into wl1612 (col1, col3) values(13,1.01234567891); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +insert into wl1612 (col1, col3) values(14,1.01234567894); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +insert into wl1612 (col1, col3) values(15,1.01234567895); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +insert into wl1612 (col1, col3) values(16,1.01234567896); +Warnings: +Note 1265 Data truncated for column 'col3' at row 1 +select col1,col3 from wl1612 where col1>12; +col1 col3 +13 1.0123456789 +14 1.0123456789 +15 1.0123456790 +16 1.0123456790 +select col1 from wl1612 where col1>4 and col2=1.01234567891; +col1 +select col1 from wl1612 where col1>4 and col2=1.0123456789; +col1 +9 +10 +select col1 from wl1612 where col1>4 and col2<>1.0123456789; +col1 +5 +6 +7 +8 +11 +12 +select col1 from wl1612 where col1>4 and col2<1.0123456789; +col1 +select col1 from wl1612 where col1>4 and col2<=1.0123456789; +col1 +9 +10 +select col1 from wl1612 where col1>4 and col2>1.0123456789; +col1 +5 +6 +7 +8 +11 +12 +select col1 from wl1612 where col1>4 and col2>=1.0123456789; +col1 +5 +6 +7 +8 +9 +10 +11 +12 +select col1 from wl1612 where col1>4 and col2=1.012345679; +col1 +11 +12 +select col1 from wl1612 where col1>4 and col2<>1.012345679; +col1 +5 +6 +7 +8 +9 +10 +select col1 from wl1612 where col1>4 and col3=1.01234567891; +col1 +select col1 from wl1612 where col1>4 and col3=1.0123456789; +col1 +13 +14 +select col1 from wl1612 where col1>4 and col3<>1.0123456789; +col1 +5 +6 +7 +8 +15 +16 +select col1 from wl1612 where col1>4 and col3<1.0123456789; +col1 +select col1 from wl1612 where col1>4 and col3<=1.0123456789; +col1 +13 +14 +select col1 from wl1612 where col1>4 and col3>1.0123456789; +col1 +5 +6 +7 +8 +15 +16 +select col1 from wl1612 where col1>4 and col3>=1.0123456789; +col1 +5 +6 +7 +8 +13 +14 +15 +16 +select col1 from wl1612 where col1>4 and col3=1.012345679; +col1 +15 +16 +select col1 from wl1612 where col1>4 and col3<>1.012345679; +col1 +5 +6 +7 +8 +13 +14 +drop table wl1612; +select 1/3; +1/3 +0.33333 +select 0.8=0.7+0.1; +0.8=0.7+0.1 +1 +select 0.7+0.1; +0.7+0.1 +0.8 +create table wl1612_1 (col1 int); +insert into wl1612_1 values(10); +select * from wl1612_1 where 0.8=0.7+0.1; +col1 +10 +select 0.07+0.07 from wl1612_1; +0.07+0.07 +0.14 +select 0.07-0.07 from wl1612_1; +0.07-0.07 +0.00 +select 0.07*0.07 from wl1612_1; +0.07*0.07 +0.0049 +select 0.07/0.07 from wl1612_1; +0.07/0.07 +1.000000000 +drop table wl1612_1; +create table wl1612_2 (col1 decimal(10,2), col2 numeric(10,2)); +insert into wl1612_2 values(1,1); +insert into wl1612_2 values(+1,+1); +insert into wl1612_2 values(+01,+01); +insert into wl1612_2 values(+001,+001); +select col1,count(*) from wl1612_2 group by col1; +col1 count(*) +1.00 4 +select col2,count(*) from wl1612_2 group by col2; +col2 count(*) +1.00 4 +drop table wl1612_2; +create table wl1612_3 (col1 decimal(10,2), col2 numeric(10,2)); +insert into wl1612_3 values('1','1'); +insert into wl1612_3 values('+1','+1'); +insert into wl1612_3 values('+01','+01'); +insert into wl1612_3 values('+001','+001'); +select col1,count(*) from wl1612_3 group by col1; +col1 count(*) +1.00 4 +select col2,count(*) from wl1612_3 group by col2; +col2 count(*) +1.00 4 +drop table wl1612_3; +select mod(234,10) ; +mod(234,10) +4 +select mod(234.567,10.555); +mod(234.567,10.555) +2.357 +select mod(-234.567,10.555); +mod(-234.567,10.555) +-2.357 +select mod(234.567,-10.555); +mod(234.567,-10.555) +2.357 +select round(15.1); +round(15.1) +15 +select round(15.4); +round(15.4) +15 +select round(15.5); +round(15.5) +16 +select round(15.6); +round(15.6) +16 +select round(15.9); +round(15.9) +16 +select round(-15.1); +round(-15.1) +-15 +select round(-15.4); +round(-15.4) +-15 +select round(-15.5); +round(-15.5) +-16 +select round(-15.6); +round(-15.6) +-16 +select round(-15.9); +round(-15.9) +-16 +select round(15.1,1); +round(15.1,1) +15.1 +select round(15.4,1); +round(15.4,1) +15.4 +select round(15.5,1); +round(15.5,1) +15.5 +select round(15.6,1); +round(15.6,1) +15.6 +select round(15.9,1); +round(15.9,1) +15.9 +select round(-15.1,1); +round(-15.1,1) +-15.1 +select round(-15.4,1); +round(-15.4,1) +-15.4 +select round(-15.5,1); +round(-15.5,1) +-15.5 +select round(-15.6,1); +round(-15.6,1) +-15.6 +select round(-15.9,1); +round(-15.9,1) +-15.9 +select round(15.1,0); +round(15.1,0) +15 +select round(15.4,0); +round(15.4,0) +15 +select round(15.5,0); +round(15.5,0) +16 +select round(15.6,0); +round(15.6,0) +16 +select round(15.9,0); +round(15.9,0) +16 +select round(-15.1,0); +round(-15.1,0) +-15 +select round(-15.4,0); +round(-15.4,0) +-15 +select round(-15.5,0); +round(-15.5,0) +-16 +select round(-15.6,0); +round(-15.6,0) +-16 +select round(-15.9,0); +round(-15.9,0) +-16 +select round(15.1,-1); +round(15.1,-1) +20 +select round(15.4,-1); +round(15.4,-1) +20 +select round(15.5,-1); +round(15.5,-1) +20 +select round(15.6,-1); +round(15.6,-1) +20 +select round(15.9,-1); +round(15.9,-1) +20 +select round(-15.1,-1); +round(-15.1,-1) +-20 +select round(-15.4,-1); +round(-15.4,-1) +-20 +select round(-15.5,-1); +round(-15.5,-1) +-20 +select round(-15.6,-1); +round(-15.6,-1) +-20 +select round(-15.91,-1); +round(-15.91,-1) +-20 +select truncate(5678.123451,0); +truncate(5678.123451,0) +5678 +select truncate(5678.123451,1); +truncate(5678.123451,1) +5678.1 +select truncate(5678.123451,2); +truncate(5678.123451,2) +5678.12 +select truncate(5678.123451,3); +truncate(5678.123451,3) +5678.123 +select truncate(5678.123451,4); +truncate(5678.123451,4) +5678.1234 +select truncate(5678.123451,5); +truncate(5678.123451,5) +5678.12345 +select truncate(5678.123451,6); +truncate(5678.123451,6) +5678.123451 +select truncate(5678.123451,-1); +truncate(5678.123451,-1) +5670 +select truncate(5678.123451,-2); +truncate(5678.123451,-2) +5600 +select truncate(5678.123451,-3); +truncate(5678.123451,-3) +5000 +select truncate(5678.123451,-4); +truncate(5678.123451,-4) +0 +select truncate(-5678.123451,0); +truncate(-5678.123451,0) +-5678 +select truncate(-5678.123451,1); +truncate(-5678.123451,1) +-5678.1 +select truncate(-5678.123451,2); +truncate(-5678.123451,2) +-5678.12 +select truncate(-5678.123451,3); +truncate(-5678.123451,3) +-5678.123 +select truncate(-5678.123451,4); +truncate(-5678.123451,4) +-5678.1234 +select truncate(-5678.123451,5); +truncate(-5678.123451,5) +-5678.12345 +select truncate(-5678.123451,6); +truncate(-5678.123451,6) +-5678.123451 +select truncate(-5678.123451,-1); +truncate(-5678.123451,-1) +-5670 +select truncate(-5678.123451,-2); +truncate(-5678.123451,-2) +-5600 +select truncate(-5678.123451,-3); +truncate(-5678.123451,-3) +-5000 +select truncate(-5678.123451,-4); +truncate(-5678.123451,-4) +0 +create table wl1612_4 (col1 int, col2 decimal(30,25), col3 numeric(30,25)); +insert into wl1612_4 values(1,0.0123456789012345678912345,0.0123456789012345678912345); +select col2/9999999999 from wl1612_4 where col1=1; +col2/9999999999 +0.0000000000012345678902469135781481410000000000000000000 +select col3/9999999999 from wl1612_4 where col1=1; +col3/9999999999 +0.0000000000012345678902469135781481410000000000000000000 +select 9999999999/col2 from wl1612_4 where col1=1; +9999999999/col2 +810000007209.00007 +select 9999999999/col3 from wl1612_4 where col1=1; +9999999999/col3 +810000007209.00007 +select col2*9999999999 from wl1612_4 where col1=1; +col2*9999999999 +123456789.0000000000111104321087655 +select col3*9999999999 from wl1612_4 where col1=1; +col3*9999999999 +123456789.0000000000111104321087655 +insert into wl1612_4 values(2,55555.0123456789012345678912345,55555.0123456789012345678912345); +select col2/9999999999 from wl1612_4 where col1=2; +col2/9999999999 +0.0000055555012351234402469691331481460000000000000000000 +select col3/9999999999 from wl1612_4 where col1=2; +col3/9999999999 +0.0000055555012351234402469691331481460000000000000000000 +select 9999999999/col2 from wl1612_4 where col1=2; +9999999999/col2 +180001.76000 +select 9999999999/col3 from wl1612_4 where col1=2; +9999999999/col3 +180001.76000 +select col2*9999999999 from wl1612_4 where col1=2; +col2*9999999999 +555550123401234.0000000000111104321087655 +select col3*9999999999 from wl1612_4 where col1=2; +col3*9999999999 +555550123401234.0000000000111104321087655 +drop table wl1612_4; +set sql_mode=''; +select 23.4 + (-41.7), 23.4 - (41.7) = -18.3; +23.4 + (-41.7) 23.4 - (41.7) = -18.3 +-18.3 1 +select -18.3=-18.3; +-18.3=-18.3 +1 +select 18.3=18.3; +18.3=18.3 +1 +select -18.3=18.3; +-18.3=18.3 +0 +select 0.8 = 0.7 + 0.1; +0.8 = 0.7 + 0.1 +1 +create procedure p1 () begin +declare v1, v2, v3, v4 decimal(16,12); declare v5 int; +set v1 = 1; set v2 = 2; set v3 = 1000000000000; set v4 = 2000000000000; set v5 = 0; +while v5 < 100000 do +set v1 = v1 + 0.000000000001; set v2 = v2 - 0.000000000001; set v3 = v3 + 1; set v4 = v4 - 1; set v5 = v5 + 1; +end while; select v1, v2, v3 * 0.000000000001, v4 * 0.000000000001; end;// +# +call p1()// +# +v1 v2 v3 * 0.000000000001 v4 * 0.000000000001 +1.000000100000 1.999999900000 1.000000100000000000 1.999999900000000000 +drop procedure p1; +drop table if exists t1; +Warnings: +Note 1051 Unknown table 't1' +create table t1 (col1 decimal(38)); +insert into t1 values (12345678901234567890123456789012345678); +select * from t1; +col1 +12345678901234567890123456789012345678 +drop table t1; +create table t1 (col1 decimal(31,30)); +insert into t1 values (0.00000000001); +select * from t1; +col1 +0.000000000010000000000000000000 +drop table t1; +select 7777777777777777777777777777777777777 * 10; +7777777777777777777777777777777777777 * 10 +77777777777777777777777777777777777770 +select .7777777777777777777777777777777777777 * +1000000000000000000; +.7777777777777777777777777777777777777 * +1000000000000000000 +777777777777777777.7777777777777777777000000000000000000 +select .7777777777777777777777777777777777777 - 0.1; +.7777777777777777777777777777777777777 - 0.1 +0.6777777777777777777777777777777777777 +select .343434343434343434 + .343434343434343434; +.343434343434343434 + .343434343434343434 +0.686868686868686868 +select abs(9999999999999999999999); +abs(9999999999999999999999) +9999999999999999999999 +select abs(-9999999999999999999999); +abs(-9999999999999999999999) +9999999999999999999999 +select ceiling(99999999999999999999); +ceiling(99999999999999999999) +99999999999999999999 +select ceiling(9.9999999999999999999); +ceiling(9.9999999999999999999) +10 +select ceiling(-9.9999999999999999999); +ceiling(-9.9999999999999999999) +-10 +select floor(9999999999999999999999); +floor(9999999999999999999999) +9999999999999999999999 +select floor(9.999999999999999999999); +floor(9.999999999999999999999) +10 +select floor(-9.999999999999999999999); +floor(-9.999999999999999999999) +-10 +select floor(-999999999999999999999.999); +floor(-999999999999999999999.999) +-1000000000000000000000 +select ceiling(999999999999999999999.999); +ceiling(999999999999999999999.999) +1000000000000000000000 +select 99999999999999999999999999999999999999 mod 3; +99999999999999999999999999999999999999 mod 3 +0 +select round(99999999999999999.999); +round(99999999999999999.999) +100000000000000000 +select round(-99999999999999999.999); +round(-99999999999999999.999) +-100000000000000000 +select round(99999999999999999.999,3); +round(99999999999999999.999,3) +99999999999999999.999 +select round(-99999999999999999.999,3); +round(-99999999999999999.999,3) +-99999999999999999.999 +select truncate(99999999999999999999999999999999999999,31); +truncate(99999999999999999999999999999999999999,31) +99999999999999999999999999999999999999.000000000000000000000000000 +select truncate(99.999999999999999999999999999999999999,31); +truncate(99.999999999999999999999999999999999999,31) +99.9999999999999999999999999999999 +select truncate(99999999999999999999999999999999999999,-31); +truncate(99999999999999999999999999999999999999,-31) +99999990000000000000000000000000000000 +create table t1 as select 0.5; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `0.5` decimal(3,1) NOT NULL default '0.0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +select round(1.5),round(2.5); +round(1.5) round(2.5) +2 3 +select 0.07 * 0.07; +0.07 * 0.07 +0.0049 +set sql_mode='traditional'; +select 1E-500 = 0; +1E-500 = 0 +1 +select 1 / 1E-500; +1 / 1E-500 +NULL +Warnings: +Error 1365 Division by 0 +select 1 / 0; +1 / 0 +NULL +Warnings: +Error 1365 Division by 0 +set sql_mode='ansi,traditional'; +CREATE TABLE Sow6_2f (col1 NUMERIC(4,2)); +INSERT INTO Sow6_2f VALUES (10.55); +INSERT INTO Sow6_2f VALUES (10.5555); +Warnings: +Note 1265 Data truncated for column 'col1' at row 1 +INSERT INTO Sow6_2f VALUES (-10.55); +INSERT INTO Sow6_2f VALUES (-10.5555); +Warnings: +Note 1265 Data truncated for column 'col1' at row 1 +INSERT INTO Sow6_2f VALUES (11); +INSERT INTO Sow6_2f VALUES (101.55); +ERROR 22003: Out of range value adjusted for column 'col1' at row 1 +UPDATE Sow6_2f SET col1 = col1 * 50 WHERE col1 = 11; +ERROR 22003: Out of range value adjusted for column 'col1' at row 5 +UPDATE Sow6_2f SET col1 = col1 / 0 WHERE col1 > 0; +ERROR 22012: Division by 0 +SELECT MOD(col1,0) FROM Sow6_2f; +MOD(col1,0) +NULL +NULL +NULL +NULL +NULL +Warnings: +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +Error 1365 Division by 0 +INSERT INTO Sow6_2f VALUES ('a59b'); +ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1 +drop table Sow6_2f; diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index 1a66f0d91d2..e553d9d86f2 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -87,6 +87,8 @@ DROP INDEX test ON t1; insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one'); insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one'); insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); +Warnings: +Warning 1265 Data truncated for column 'string' at row 1 insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); Warnings: Warning 1264 Out of range value adjusted for column 'utiny' at row 1 @@ -122,7 +124,7 @@ select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,ut auto string tiny short medium long_int longlong real_float real_double utiny ushort umedium ulong ulonglong mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000) date_field time_field date_time blob_col tinyblob_col mediumblob_col longblob_col 10 1 1 1 1 1 1 1.0 1.0000 1 00001 1 1 1 0 0000-00-00 00:00:00 0000-00-00 00:00:00 1 1 1 1 11 2 2 2 2 2 2 2.0 2.0000 2 00002 2 2 2 0 NULL NULL NULL NULL NULL 2 2 -12 0.33 3 3 3 3 3 3.0 3.0000 3 00003 3 3 3 0 1997-03-03 10:10:10 1997-03-03 10:10:10 3 +12 0.33333333 3 3 3 3 3 3.0 3.0000 3 00003 3 3 3 0 1997-03-03 10:10:10 1997-03-03 10:10:10 3 13 -1 -1 -1 -1 -1 -1 -1.0 -1.0000 0 00000 0 0 18446744073709551615 0 1997-08-07 08:07:06 1997-04-03 09:08:07 -1 -1 -1 -1 14 -429496729 -128 -32768 -8388608 -2147483648 -4294967295 -4294967296.0 -4294967295.0000 0 00000 0 0 18446744069414584321 0 0000-00-00 00:00:00 0000-00-00 00:00:00 -4294967295 -4294967295 -4294967295 -4294967295 15 4294967295 127 32767 8388607 2147483647 4294967295 4294967296.0 4294967295.0000 255 65535 16777215 4294967295 4294967295 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4294967295 4294967295 4294967295 4294967295 @@ -174,7 +176,7 @@ Warning 1265 Data truncated for column 'new_field' at row 7 select * from t2; auto string mediumblob_col new_field 1 2 2 ne -2 0.33 ne +2 0.33333333 ne 3 -1 -1 ne 4 -429496729 -4294967295 ne 5 4294967295 4294967295 ne @@ -268,7 +270,7 @@ drop table t2; create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1; show full columns from t2; Field Type Collation Null Key Default Extra Privileges Comment -auto bigint(17) unsigned NULL NO PRI 0 select,insert,update,references +auto int(6) unsigned NULL NO PRI 0 select,insert,update,references t1 bigint(1) NULL NO 0 select,insert,update,references t2 varchar(1) latin1_swedish_ci NO select,insert,update,references t3 varchar(256) latin1_swedish_ci NO select,insert,update,references diff --git a/mysql-test/r/type_ranges.result.es b/mysql-test/r/type_ranges.result.es index c1f6d2453e9..5e2ea2aebbc 100644 --- a/mysql-test/r/type_ranges.result.es +++ b/mysql-test/r/type_ranges.result.es @@ -40,30 +40,30 @@ KEY (options,flags) ); show full fields from t1; Field Type Collation Null Key Default Extra Privileges Comment -auto int(5) unsigned NULL PRI NULL auto_increment -string varchar(10) latin1_swedish_ci YES hello -tiny tinyint(4) NULL MUL 0 -short smallint(6) NULL MUL 1 -medium mediumint(8) NULL MUL 0 -long_int int(11) NULL 0 -longlong bigint(13) NULL MUL 0 -real_float float(13,1) NULL MUL 0.0 +auto int(5) unsigned NULL NO PRI NULL auto_increment +string char(10) latin1_swedish_ci YES hello +tiny tinyint(4) NULL NO MUL 0 +short smallint(6) NULL NO MUL 1 +medium mediumint(8) NULL NO MUL 0 +long_int int(11) NULL NO 0 +longlong bigint(13) NULL NO MUL 0 +real_float float(13,1) NULL NO MUL 0.0 real_double double(16,4) NULL YES NULL -utiny tinyint(3) unsigned NULL MUL 0 -ushort smallint(5) unsigned zerofill NULL MUL 00000 -umedium mediumint(8) unsigned NULL MUL 0 -ulong int(11) unsigned NULL MUL 0 -ulonglong bigint(13) unsigned NULL MUL 0 +utiny tinyint(3) unsigned NULL NO MUL 0 +ushort smallint(5) unsigned zerofill NULL NO MUL 00000 +umedium mediumint(8) unsigned NULL NO MUL 0 +ulong int(11) unsigned NULL NO MUL 0 +ulonglong bigint(13) unsigned NULL NO MUL 0 time_stamp timestamp NULL YES CURRENT_TIMESTAMP date_field date NULL YES NULL time_field time NULL YES NULL date_time datetime NULL YES NULL blob_col blob NULL YES NULL tinyblob_col tinyblob NULL YES NULL -mediumblob_col mediumblob NULL -longblob_col longblob NULL -options enum('one','two','tree') latin1_swedish_ci MUL one -flags set('one','two','tree') latin1_swedish_ci +mediumblob_col mediumblob NULL NO +longblob_col longblob NULL NO +options enum('one','two','tree') latin1_swedish_ci NO MUL one +flags set('one','two','tree') latin1_swedish_ci NO show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 0 PRIMARY 1 auto A 0 NULL NULL BTREE @@ -89,33 +89,33 @@ insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,N insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); Warnings: -Warning 1264 Data truncated; out of range for column 'utiny' at row 1 -Warning 1264 Data truncated; out of range for column 'ushort' at row 1 -Warning 1264 Data truncated; out of range for column 'umedium' at row 1 -Warning 1264 Data truncated; out of range for column 'ulong' at row 1 +Warning 1264 Out of range value adjusted for column 'utiny' at row 1 +Warning 1264 Out of range value adjusted for column 'ushort' at row 1 +Warning 1264 Out of range value adjusted for column 'umedium' at row 1 +Warning 1264 Out of range value adjusted for column 'ulong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 Warning 1265 Data truncated for column 'flags' at row 1 insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); Warnings: Warning 1265 Data truncated for column 'string' at row 1 -Warning 1264 Data truncated; out of range for column 'tiny' at row 1 -Warning 1264 Data truncated; out of range for column 'short' at row 1 -Warning 1264 Data truncated; out of range for column 'medium' at row 1 -Warning 1264 Data truncated; out of range for column 'long_int' at row 1 -Warning 1264 Data truncated; out of range for column 'utiny' at row 1 -Warning 1264 Data truncated; out of range for column 'ushort' at row 1 -Warning 1264 Data truncated; out of range for column 'umedium' at row 1 -Warning 1264 Data truncated; out of range for column 'ulong' at row 1 +Warning 1264 Out of range value adjusted for column 'tiny' at row 1 +Warning 1264 Out of range value adjusted for column 'short' at row 1 +Warning 1264 Out of range value adjusted for column 'medium' at row 1 +Warning 1264 Out of range value adjusted for column 'long_int' at row 1 +Warning 1264 Out of range value adjusted for column 'utiny' at row 1 +Warning 1264 Out of range value adjusted for column 'ushort' at row 1 +Warning 1264 Out of range value adjusted for column 'umedium' at row 1 +Warning 1264 Out of range value adjusted for column 'ulong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); Warnings: -Warning 1264 Data truncated; out of range for column 'tiny' at row 1 -Warning 1264 Data truncated; out of range for column 'short' at row 1 -Warning 1264 Data truncated; out of range for column 'medium' at row 1 -Warning 1264 Data truncated; out of range for column 'long_int' at row 1 -Warning 1264 Data truncated; out of range for column 'utiny' at row 1 -Warning 1264 Data truncated; out of range for column 'ushort' at row 1 -Warning 1264 Data truncated; out of range for column 'umedium' at row 1 +Warning 1264 Out of range value adjusted for column 'tiny' at row 1 +Warning 1264 Out of range value adjusted for column 'short' at row 1 +Warning 1264 Out of range value adjusted for column 'medium' at row 1 +Warning 1264 Out of range value adjusted for column 'long_int' at row 1 +Warning 1264 Out of range value adjusted for column 'utiny' at row 1 +Warning 1264 Out of range value adjusted for column 'ushort' at row 1 +Warning 1264 Out of range value adjusted for column 'umedium' at row 1 Warning 1265 Data truncated for column 'options' at row 1 insert into t1 (tiny) values (1); select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1; @@ -208,56 +208,56 @@ Warning 1265 Data truncated for column 'options' at row 6 update t2 set string="changed" where auto=16; show full columns from t1; Field Type Collation Null Key Default Extra Privileges Comment -auto int(5) unsigned NULL MUL NULL auto_increment -string varchar(10) latin1_swedish_ci YES new defaul -tiny tinyint(4) NULL MUL 0 -short smallint(6) NULL MUL 0 -medium mediumint(8) NULL MUL 0 -long_int int(11) NULL 0 -longlong bigint(13) NULL MUL 0 -real_float float(13,1) NULL MUL 0.0 +auto int(5) unsigned NULL NO MUL NULL auto_increment +string char(10) latin1_swedish_ci YES new defaul +tiny tinyint(4) NULL NO MUL 0 +short smallint(6) NULL NO MUL 0 +medium mediumint(8) NULL NO MUL 0 +long_int int(11) NULL NO 0 +longlong bigint(13) NULL NO MUL 0 +real_float float(13,1) NULL NO MUL 0.0 real_double double(16,4) NULL YES NULL -utiny tinyint(3) unsigned NULL 0 -ushort smallint(5) unsigned zerofill NULL 00000 -umedium mediumint(8) unsigned NULL MUL 0 -ulong int(11) unsigned NULL MUL 0 -ulonglong bigint(13) unsigned NULL MUL 0 +utiny tinyint(3) unsigned NULL NO 0 +ushort smallint(5) unsigned zerofill NULL NO 00000 +umedium mediumint(8) unsigned NULL NO MUL 0 +ulong int(11) unsigned NULL NO MUL 0 +ulonglong bigint(13) unsigned NULL NO MUL 0 time_stamp timestamp NULL YES CURRENT_TIMESTAMP date_field char(10) latin1_swedish_ci YES NULL time_field time NULL YES NULL date_time datetime NULL YES NULL new_blob_col varchar(20) latin1_swedish_ci YES NULL tinyblob_col tinyblob NULL YES NULL -mediumblob_col mediumblob NULL -options enum('one','two','tree') latin1_swedish_ci MUL one -flags set('one','two','tree') latin1_swedish_ci -new_field char(10) latin1_swedish_ci new +mediumblob_col mediumblob NULL NO +options enum('one','two','tree') latin1_swedish_ci NO MUL one +flags set('one','two','tree') latin1_swedish_ci NO +new_field char(10) latin1_swedish_ci NO new show full columns from t2; Field Type Collation Null Key Default Extra Privileges Comment -auto int(5) unsigned NULL 0 -string varchar(10) latin1_swedish_ci YES new defaul -tiny tinyint(4) NULL 0 -short smallint(6) NULL 0 -medium mediumint(8) NULL 0 -long_int int(11) NULL 0 -longlong bigint(13) NULL 0 -real_float float(13,1) NULL 0.0 +auto int(5) unsigned NULL NO 0 +string char(10) latin1_swedish_ci YES new defaul +tiny tinyint(4) NULL NO 0 +short smallint(6) NULL NO 0 +medium mediumint(8) NULL NO 0 +long_int int(11) NULL NO 0 +longlong bigint(13) NULL NO 0 +real_float float(13,1) NULL NO 0.0 real_double double(16,4) NULL YES NULL -utiny tinyint(3) unsigned NULL 0 -ushort smallint(5) unsigned zerofill NULL 00000 -umedium mediumint(8) unsigned NULL 0 -ulong int(11) unsigned NULL 0 -ulonglong bigint(13) unsigned NULL 0 +utiny tinyint(3) unsigned NULL NO 0 +ushort smallint(5) unsigned zerofill NULL NO 00000 +umedium mediumint(8) unsigned NULL NO 0 +ulong int(11) unsigned NULL NO 0 +ulonglong bigint(13) unsigned NULL NO 0 time_stamp timestamp NULL YES 0000-00-00 00:00:00 date_field char(10) latin1_swedish_ci YES NULL time_field time NULL YES NULL date_time datetime NULL YES NULL new_blob_col varchar(20) latin1_swedish_ci YES NULL tinyblob_col tinyblob NULL YES NULL -mediumblob_col mediumblob NULL -options enum('one','two','tree') latin1_swedish_ci one -flags set('one','two','tree') latin1_swedish_ci -new_field char(10) latin1_swedish_ci new +mediumblob_col mediumblob NULL NO +options enum('one','two','tree') latin1_swedish_ci NO one +flags set('one','two','tree') latin1_swedish_ci NO +new_field char(10) latin1_swedish_ci NO new select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and ((t1.string<>t2.string and (t1.string is not null or t2.string is not null)) or (t1.tiny<>t2.tiny and (t1.tiny is not null or t2.tiny is not null)) or (t1.short<>t2.short and (t1.short is not null or t2.short is not null)) or (t1.medium<>t2.medium and (t1.medium is not null or t2.medium is not null)) or (t1.long_int<>t2.long_int and (t1.long_int is not null or t2.long_int is not null)) or (t1.longlong<>t2.longlong and (t1.longlong is not null or t2.longlong is not null)) or (t1.real_float<>t2.real_float and (t1.real_float is not null or t2.real_float is not null)) or (t1.real_double<>t2.real_double and (t1.real_double is not null or t2.real_double is not null)) or (t1.utiny<>t2.utiny and (t1.utiny is not null or t2.utiny is not null)) or (t1.ushort<>t2.ushort and (t1.ushort is not null or t2.ushort is not null)) or (t1.umedium<>t2.umedium and (t1.umedium is not null or t2.umedium is not null)) or (t1.ulong<>t2.ulong and (t1.ulong is not null or t2.ulong is not null)) or (t1.ulonglong<>t2.ulonglong and (t1.ulonglong is not null or t2.ulonglong is not null)) or (t1.time_stamp<>t2.time_stamp and (t1.time_stamp is not null or t2.time_stamp is not null)) or (t1.date_field<>t2.date_field and (t1.date_field is not null or t2.date_field is not null)) or (t1.time_field<>t2.time_field and (t1.time_field is not null or t2.time_field is not null)) or (t1.date_time<>t2.date_time and (t1.date_time is not null or t2.date_time is not null)) or (t1.new_blob_col<>t2.new_blob_col and (t1.new_blob_col is not null or t2.new_blob_col is not null)) or (t1.tinyblob_col<>t2.tinyblob_col and (t1.tinyblob_col is not null or t2.tinyblob_col is not null)) or (t1.mediumblob_col<>t2.mediumblob_col and (t1.mediumblob_col is not null or t2.mediumblob_col is not null)) or (t1.options<>t2.options and (t1.options is not null or t2.options is not null)) or (t1.flags<>t2.flags and (t1.flags is not null or t2.flags is not null)) or (t1.new_field<>t2.new_field and (t1.new_field is not null or t2.new_field is not null))); auto auto 16 16 @@ -265,23 +265,27 @@ select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and not (t1.string<=>t2. auto auto 16 16 drop table t2; -create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, "a" as t2, repeat("a",256) as t3, binary repeat("b",256) as t4 from t1; +create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1; show full columns from t2; Field Type Collation Null Key Default Extra Privileges Comment -auto bigint(17) unsigned NULL PRI 0 -t1 bigint(1) NULL 0 -t2 char(1) latin1_swedish_ci -t3 longtext latin1_swedish_ci -t4 longblob NULL -select * from t2; -auto t1 t2 t3 t4 -11 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -12 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -13 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -14 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -15 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -16 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb -17 1 a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb +auto bigint(17) unsigned NULL NO PRI 0 +t1 bigint(1) NULL NO 0 +t2 varchar(1) latin1_swedish_ci NO +t3 varchar(256) latin1_swedish_ci NO +t4 varbinary(256) NULL NO +t5 longtext latin1_swedish_ci NO +t6 longblob NULL NO +t7 char(0) latin1_swedish_ci NO +t8 binary(0) NULL NO +select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2; +t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 +1 a 256 256 4096 4096 drop table t1,t2; create table t1 (c int); insert into t1 values(1),(2); @@ -293,7 +297,7 @@ show full columns from t3; Field Type Collation Null Key Default Extra Privileges Comment c1 int(11) NULL YES NULL c2 int(11) NULL YES NULL -const bigint(1) NULL 0 +const bigint(1) NULL NO 0 drop table t1,t2,t3; create table t1 ( myfield INT NOT NULL, UNIQUE INDEX (myfield), unique (myfield), index(myfield)); drop table t1; diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index a63358ff2bc..5a60ef8abfb 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -565,7 +565,7 @@ a show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` double(53,1) NOT NULL default '0.0' + `a` decimal(20,1) NOT NULL default '0.0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; create table t2 (it1 tinyint, it2 tinyint not null, i int not null, ib bigint, f float, d double, y year, da date, dt datetime, sc char(10), sv varchar(10), b blob, tx text); @@ -788,11 +788,11 @@ create table t3 select * from t2 union select * from t1; select * from t3; d 1.234567800 -100000000.0 +100000000.000000000 show create table t3; Table Create Table t3 CREATE TABLE `t3` ( - `d` decimal(10,9) default NULL + `d` decimal(19,9) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1,t2,t3; create table t1 select 1 union select -1; @@ -1137,3 +1137,39 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; drop table t2; +create table t1(a1 int, f1 char(10)); +create table t2 +select f2,a1 from (select a1, CAST('2004-12-31' AS DATE) f2 from t1) a +union +select f2,a1 from (select a1, CAST('2004-12-31' AS DATE) f2 from t1) a +order by f2, a1; +show columns from t2; +Field Type Null Key Default Extra +f2 date YES NULL +a1 int(11) YES NULL +drop table t1, t2; +create table t1 (f1 int); +create table t2 (f1 int, f2 int ,f3 date); +create table t3 (f1 int, f2 char(10)); +create table t4 +( +select t2.f3 as sdate +from t1 +left outer join t2 on (t1.f1 = t2.f1) +inner join t3 on (t2.f2 = t3.f1) +order by t1.f1, t3.f1, t2.f3 +) +union +( +select cast('2004-12-31' as date) as sdate +from t1 +left outer join t2 on (t1.f1 = t2.f1) +inner join t3 on (t2.f2 = t3.f1) +group by t1.f1 +order by t1.f1, t3.f1, t2.f3 +) +order by sdate; +show columns from t4; +Field Type Null Key Default Extra +sdate date YES NULL +drop table t1, t2, t3, t4; diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result index beab6105f79..ac370db9ecc 100644 --- a/mysql-test/r/update.result +++ b/mysql-test/r/update.result @@ -212,3 +212,10 @@ insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20); update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1"; update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10; drop table t1, t2; +create table t1 (id int not null auto_increment primary key, id_str varchar(32)); +insert into t1 (id_str) values ("test"); +update t1 set id_str = concat(id_str, id) where id = last_insert_id(); +select * from t1; +id id_str +1 test1 +drop table t1; diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 69fcc5c45fe..ba5cb264013 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -113,8 +113,8 @@ select @a:=0; select @a, @a:=@a+count(*), count(*), @a from t1 group by i; @a @a:=@a+count(*) count(*) @a 0 1 1 0 -0 2 2 0 -0 3 3 0 +0 3 2 0 +0 6 3 0 select @a:=0; @a:=0 0 @@ -177,16 +177,17 @@ insert into t1 values (@var1),(@var2); show binlog events from 95; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 95 User var 1 136 @`a b`=_latin1 0x68656C6C6F COLLATE latin1_swedish_ci -master-bin.000001 136 Query 1 222 use `test`; INSERT INTO t1 VALUES(@`a b`) -master-bin.000001 222 User var 1 264 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci -master-bin.000001 264 User var 1 302 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci -master-bin.000001 302 Query 1 396 use `test`; insert into t1 values (@var1),(@var2) +master-bin.000001 136 Query 1 229 use `test`; INSERT INTO t1 VALUES(@`a b`) +master-bin.000001 229 User var 1 271 @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci +master-bin.000001 271 User var 1 309 @`var2`=_latin1 0x61 COLLATE latin1_swedish_ci +master-bin.000001 309 Query 1 410 use `test`; insert into t1 values (@var1),(@var2) /*!40019 SET @@session.max_insert_delayed_threads=0*/; SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`; use test; SET TIMESTAMP=10000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; INSERT INTO t1 VALUES(@`a b`); SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`; SET @`var2`:=_latin1 0x61 COLLATE `latin1_swedish_ci`; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 1659a9dddb5..57b73a0515e 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -500,14 +500,15 @@ t1 CREATE TABLE `t1` ( `c5` bigint(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; -set @arg00= 8, @arg01= 8.8, @arg02= 'a string'; -create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3; +set @arg00= 8, @arg01= 8.8, @arg02= 'a string', @arg03= 0.2e0; +create table t1 as select @arg00 as c1, @arg01 as c2, @arg02 as c3, @arg03 as c4; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( `c1` bigint(20) default NULL, - `c2` double default NULL, - `c3` longtext + `c2` decimal(64,30) default NULL, + `c3` longtext, + `c4` double default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; SET GLOBAL MYISAM_DATA_POINTER_SIZE= 8; diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index aa010da7e8f..5f466b7c84e 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -448,7 +448,7 @@ create view v1 as select a+1 from t1; create table t2 select * from v1; show columns from t2; Field Type Null Key Default Extra -a+1 bigint(17) YES NULL +a+1 bigint(12) YES NULL select * from t2; a+1 2 @@ -889,10 +889,6 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function drop view v1; create view v1 (a,a) as select 'a','a'; ERROR 42S21: Duplicate column name 'a' -create procedure p1 () begin declare v int; create view v1 as select v; end;// -call p1(); -ERROR HY000: View's SELECT contains a variable or parameter -drop procedure p1; create table t1 (col1 int,col2 char(22)); insert into t1 values(5,'Hello, world of views'); create view v1 as select * from t1; |