From a01946373d5752c921c4daddfec5c6cdfdbfa627 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Wed, 28 Jan 2009 20:59:08 +0300 Subject: Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol Various parts of code used different 'precision' arguments for sprintf("%g") when converting floating point numbers to a string. This led to differences in results in some cases depending on whether the text-based or prepared statements protocol is used for a query. Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are consistent regardless of the protocol. This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the patch for WL#2934). client/sql_string.cc: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does. libmysql/libmysql.c: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does. mysql-test/r/archive_gis.result: Fixed test results to take additional precision into account. mysql-test/r/func_group.result: Fixed test results to take additional precision into account. mysql-test/r/func_math.result: Fixed test results to take additional precision into account. mysql-test/r/func_str.result: Fixed test results to take additional precision into account. mysql-test/r/gis.result: Fixed test results to take additional precision into account. mysql-test/r/innodb_gis.result: Fixed test results to take additional precision into account. mysql-test/r/select.result: Fixed test results to take additional precision into account. mysql-test/r/sp.result: Fixed test results to take additional precision into account. mysql-test/r/type_float.result: Fixed test results to take additional precision into account. mysql-test/t/type_float.test: Fixed test results to take additional precision into account. sql/sql_string.cc: Use 15 (DBL_DIG) as a precision argument for sprintf(), as Field_double::val_str() does. --- mysql-test/r/archive_gis.result | 6 +++--- mysql-test/r/func_group.result | 8 ++++---- mysql-test/r/func_math.result | 10 +++++----- mysql-test/r/func_str.result | 4 ++-- mysql-test/r/gis.result | 10 +++++----- mysql-test/r/innodb_gis.result | 6 +++--- mysql-test/r/select.result | 14 +++++++------- mysql-test/r/sp.result | 8 ++++---- mysql-test/r/type_float.result | 17 +++++++++++------ 9 files changed, 44 insertions(+), 39 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 3137d43ec3a..5a8ccea7cc5 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -291,7 +291,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) +109 POINT(25.4166666666667 25.4166666666667) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon ORDER by fid; fid Area(g) @@ -325,8 +325,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) +117 POINT(55.5885277530424 17.426536064114) +118 POINT(55.5885277530424 17.426536064114) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; fid Area(g) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index a7f4c58f4af..85ddfaac4e0 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -61,7 +61,7 @@ grp sum NULL NULL 1 7 2 20.25 -3 45.483163247594 +3 45.4831632475944 create table t2 (grp int, a bigint unsigned, c char(10)); insert into t2 select grp,max(a)+max(grp),max(c) from t1 group by grp; replace into t2 select grp, a, c from t1 limit 2,1; @@ -1195,7 +1195,7 @@ std(s1/s2) 0.21325764 select std(o1/o2) from bug22555; std(o1/o2) -0.21325763586649 +0.213257635866493 select std(e1/e2) from bug22555; std(e1/e2) 0.21325764 @@ -1221,7 +1221,7 @@ round(std(s1/s2), 17) 0.21325763586649341 select std(o1/o2) from bug22555; std(o1/o2) -0.21325763586649 +0.213257635866493 select round(std(e1/e2), 17) from bug22555; round(std(e1/e2), 17) 0.21325763586649341 @@ -1246,7 +1246,7 @@ round(std(s1/s2), 17) 0.21325763586649341 select std(o1/o2) from bug22555; std(o1/o2) -0.21325763586649 +0.213257635866493 select round(std(e1/e2), 17) from bug22555; round(std(e1/e2), 17) 0.21325763586649341 diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 150b6003dbe..0d7adbbba5e 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -60,7 +60,7 @@ Warnings: Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp((ln(sqrt(10)) * 2)) AS `exp(ln(sqrt(10))*2)`,ln(-(1)) AS `ln(-1)`,ln(0) AS `ln(0)`,ln(NULL) AS `ln(NULL)` select log2(8),log2(15),log2(-2),log2(0),log2(NULL); log2(8) log2(15) log2(-2) log2(0) log2(NULL) -3 3.9068905956085 NULL NULL NULL +3 3.90689059560852 NULL NULL NULL explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -68,7 +68,7 @@ Warnings: Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-(2)) AS `log2(-2)`,log2(0) AS `log2(0)`,log2(NULL) AS `log2(NULL)` select log10(100),log10(18),log10(-4),log10(0),log10(NULL); log10(100) log10(18) log10(-4) log10(0) log10(NULL) -2 1.2552725051033 NULL NULL NULL +2 1.25527250510331 NULL NULL NULL explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used @@ -85,7 +85,7 @@ Note 1003 select pow(10,log10(10)) AS `pow(10,log10(10))`,pow(2,4) AS `power(2,4 set @@rand_seed1=10000000,@@rand_seed2=1000000; select rand(999999),rand(); rand(999999) rand() -0.014231365187309 0.028870999839968 +0.0142313651873091 0.028870999839968 explain extended select rand(999999),rand(); 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 @@ -101,7 +101,7 @@ Warnings: Note 1003 select pi() AS `pi()`,format(sin((pi() / 2)),6) AS `format(sin(pi()/2),6)`,format(cos((pi() / 2)),6) AS `format(cos(pi()/2),6)`,format(abs(tan(pi())),6) AS `format(abs(tan(pi())),6)`,format((1 / tan(1)),6) AS `format(cot(1),6)`,format(asin(1),6) AS `format(asin(1),6)`,format(acos(0),6) AS `format(acos(0),6)`,format(atan(1),6) AS `format(atan(1),6)` select degrees(pi()),radians(360); degrees(pi()) radians(360) -180 6.2831853071796 +180 6.28318530717959 SELECT ACOS(1.0); ACOS(1.0) 0 @@ -321,7 +321,7 @@ mod(5, cast(-2 as unsigned)) mod(5, 18446744073709551614) mod(5, -2) 5 5 1 select pow(cast(-2 as unsigned), 5), pow(18446744073709551614, 5), pow(-2, 5); pow(cast(-2 as unsigned), 5) pow(18446744073709551614, 5) pow(-2, 5) -2.1359870359209e+96 2.1359870359209e+96 -32 +2.13598703592091e+96 2.13598703592091e+96 -32 CREATE TABLE t1 (a timestamp, b varchar(20), c bit(1)); INSERT INTO t1 VALUES('1998-09-23', 'str1', 1), ('2003-03-25', 'str2', 0); SELECT a DIV 900 y FROM t1 GROUP BY y; diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index c121c8937d7..b8d915d0c4f 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1131,10 +1131,10 @@ cast(rtrim(ltrim(' 20.06 ')) as decimal(19,2)) 20.06 select conv("18383815659218730760",10,10) + 0; conv("18383815659218730760",10,10) + 0 -1.8383815659219e+19 +1.83838156592187e+19 select "18383815659218730760" + 0; "18383815659218730760" + 0 -1.8383815659219e+19 +1.83838156592187e+19 CREATE TABLE t1 (code varchar(10)); INSERT INTO t1 VALUES ('a12'), ('A12'), ('a13'); SELECT ASCII(code), code FROM t1 WHERE code='A12'; diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index ac6356f8203..e3b2ea751d9 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -284,7 +284,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) +109 POINT(25.4166666666667 25.4166666666667) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon; fid Area(g) @@ -318,8 +318,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon; fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) +117 POINT(55.5885277530424 17.426536064114) +118 POINT(55.5885277530424 17.426536064114) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon; fid Area(g) @@ -651,11 +651,11 @@ insert into t1 values ('85984',GeomFromText('MULTIPOLYGON(((-115.006363 select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85998; object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo)) -85998 MULTIPOLYGON 0 POINT(115.31877315203 -36.237472821022) +85998 MULTIPOLYGON 0 POINT(115.318773152032 -36.2374728210215) select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from t1 where object_id=85984; object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo)) -85984 MULTIPOLYGON 0 POINT(-114.87787186923 36.33101763469) +85984 MULTIPOLYGON 0 POINT(-114.877871869233 36.3310176346905) drop table t1; create table t1 (fl geometry not null); insert into t1 values (1); diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index bfe8c984b7b..0f2607e9787 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -291,7 +291,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) +109 POINT(25.4166666666667 25.4166666666667) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon ORDER by fid; fid Area(g) @@ -325,8 +325,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) +117 POINT(55.5885277530424 17.426536064114) +118 POINT(55.5885277530424 17.426536064114) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; fid Area(g) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 67ce231a157..9558b0533ad 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2790,26 +2790,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away select max(key1) from t1 where key1 <= 0.6158; max(key1) -0.61580002307892 +0.615800023078918 select max(key2) from t2 where key2 <= 1.6158; max(key2) -1.6158000230789 +1.61580002307892 select min(key1) from t1 where key1 >= 0.3762; min(key1) -0.37619999051094 +0.376199990510941 select min(key2) from t2 where key2 >= 1.3762; min(key2) -1.3761999607086 +1.37619996070862 select max(key1), min(key2) from t1, t2 where key1 <= 0.6158 and key2 >= 1.3762; max(key1) min(key2) -0.61580002307892 1.3761999607086 +0.615800023078918 1.37619996070862 select max(key1) from t1 where key1 <= 0.6158 and rand() + 0.5 >= 0.5; max(key1) -0.61580002307892 +0.615800023078918 select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5; min(key1) -0.37619999051094 +0.376199990510941 DROP TABLE t1,t2; create table t1(a bigint unsigned, b bigint); insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff), diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index ec00435548c..bfa2f51e4fc 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -581,7 +581,7 @@ return 2.7182818284590452354| set @e = e()| select e(), @e| e() @e -2.718281828459 2.718281828459 +2.71828182845905 2.71828182845905 drop function if exists inc| create function inc(i int) returns int return i+1| @@ -618,7 +618,7 @@ create function fun(d double, i int, u int unsigned) returns double return mul(inc(i), fac(u)) / e()| select fun(2.3, 3, 5)| fun(2.3, 3, 5) -176.58213176229 +176.582131762292 insert into t2 values (append("xxx", "yyy"), mul(4,3), e())| insert into t2 values (append("a", "b"), mul(2,mul(3,4)), fun(1.7, 4, 6))| select * from t2 where s = append("a", "b")| @@ -5972,9 +5972,9 @@ CREATE TABLE t3 (f1 INT, f2 FLOAT)| INSERT INTO t3 VALUES (1, 3.4), (1, 2), (1, 0.9), (2, 8), (2, 7)| SELECT SUM(f2), bug25373(f1) FROM t3 GROUP BY bug25373(f1) WITH ROLLUP| SUM(f2) bug25373(f1) -6.3000000715256 1 +6.30000007152557 1 15 2 -21.300000071526 NULL +21.3000000715256 NULL DROP FUNCTION bug25373| DROP TABLE t3| DROP DATABASE IF EXISTS mysqltest1| diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 8caabbff047..757cd6f5d71 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -385,12 +385,12 @@ Warning 1264 Out of range value adjusted for column 'f1' at row 1 Warning 1264 Out of range value adjusted for column 'f1' at row 2 select f1 + 0e0 from t1; f1 + 0e0 -1.0000000150475e+29 --1.0000000150475e+29 -1.0000000150475e+30 --1.0000000150475e+30 -1.0000000150475e+30 --1.0000000150475e+30 +1.00000001504747e+29 +-1.00000001504747e+29 +1.00000001504747e+30 +-1.00000001504747e+30 +1.00000001504747e+30 +-1.00000001504747e+30 drop table t1; create table t1(d double, u bigint unsigned); insert into t1(d) values (9.22337203685479e18), @@ -401,4 +401,9 @@ u 9223372036854790144 18400000000000000000 drop table t1; +CREATE TABLE t1 (f1 DOUBLE); +INSERT INTO t1 VALUES(-1.79769313486231e+308); +SELECT f1 FROM t1; +f1 +-1.79769313486231e+308 End of 5.0 tests -- cgit v1.2.1 From 0ad6e488a2e5f0964a303ba4908ac18a4683b403 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Mon, 2 Feb 2009 18:19:07 +0100 Subject: Bug#33550: mysqldump 4.0 compatibility broken mysqldump included character_set_client magic that is unknown before 4.1 even when asked for an appropriate compatibility mode. In compatibility (3.23, 4.0) mode, we do not output charset statements (not even in a "comment conditional"), nor do we do magic on the server, even if the server is sufficient new (4.1+). Table-names will be output converted to the charset requested by mysqldump; if such a conversion is not possible (Ivrit -> Latin), mysqldump will fail. client/mysqldump.c: in 3.23/4.0 compat mode, don't do charset magic, period. not in output, but not on the server, either! mysql-test/r/mysqldump-max.result: character_set_client magic lives in version-conditional now (except in compat 3.23/4.0 mode, in which case we don't output any at all!). mysql-test/r/mysqldump.result: character_set_client magic lives in version-conditional now (except in compat 3.23/4.0 mode, in which case we don't output any at all!). mysql-test/r/openssl_1.result: character_set_client magic lives in version-conditional now (except in compat 3.23/4.0 mode, in which case we don't output any at all!). mysql-test/t/mysqldump.test: character_set_client magic lives in version-conditional now (except in compat 3.23/4.0 mode, in which case we don't output any at all!). --- mysql-test/r/mysqldump-max.result | 72 +++---- mysql-test/r/mysqldump.result | 422 ++++++++++++++++++++++---------------- mysql-test/r/openssl_1.result | 18 +- 3 files changed, 287 insertions(+), 225 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqldump-max.result b/mysql-test/r/mysqldump-max.result index 261c7a7f197..b3a966b9b39 100644 --- a/mysql-test/r/mysqldump-max.result +++ b/mysql-test/r/mysqldump-max.result @@ -93,73 +93,73 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; INSERT DELAYED IGNORE INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; INSERT DELAYED IGNORE INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t2` ENABLE KEYS */; DROP TABLE IF EXISTS `t3`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t3` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t3` DISABLE KEYS */; INSERT DELAYED IGNORE INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t3` ENABLE KEYS */; DROP TABLE IF EXISTS `t4`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t4` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t4` DISABLE KEYS */; INSERT DELAYED IGNORE INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t4` ENABLE KEYS */; DROP TABLE IF EXISTS `t5`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t5` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t5` DISABLE KEYS */; INSERT DELAYED IGNORE INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t5` ENABLE KEYS */; DROP TABLE IF EXISTS `t6`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t6` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t6` DISABLE KEYS */; INSERT IGNORE INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); @@ -190,73 +190,73 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; INSERT DELAYED INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t1` ENABLE KEYS */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; INSERT DELAYED INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t2` ENABLE KEYS */; DROP TABLE IF EXISTS `t3`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t3` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t3` DISABLE KEYS */; INSERT DELAYED INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t3` ENABLE KEYS */; DROP TABLE IF EXISTS `t4`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t4` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=MEMORY DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t4` DISABLE KEYS */; INSERT DELAYED INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t4` ENABLE KEYS */; DROP TABLE IF EXISTS `t5`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t5` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t5` DISABLE KEYS */; INSERT DELAYED INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); /*!40000 ALTER TABLE `t5` ENABLE KEYS */; DROP TABLE IF EXISTS `t6`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t6` ( `id` int(8) default NULL, `name` varchar(32) default NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t6` DISABLE KEYS */; INSERT INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value'); diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 08a18d8de75..8b7e8f4430f 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -33,12 +33,12 @@ DROP TABLE t1; CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` decimal(64,20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000'); DROP TABLE t1; # @@ -48,12 +48,12 @@ CREATE TABLE t1 (a double); INSERT INTO t1 VALUES ('-9e999999'); Warnings: Warning 1264 Out of range value adjusted for column 'a' at row 1 -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` double default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (RES); DROP TABLE t1; # @@ -69,21 +69,21 @@ INSERT INTO t1 VALUES ('1.2345', 2.3456); INSERT INTO t1 VALUES ("1.2345", 2.3456); ERROR 42S22: Unknown column '1.2345' in 'field list' SET SQL_MODE=@OLD_SQL_MODE; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` decimal(10,5) default NULL, `b` float default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` decimal(10,5) default NULL, `b` float default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; @@ -97,13 +97,13 @@ INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456) /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` decimal(10,5) default NULL, `b` float default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -126,13 +126,13 @@ UNLOCK TABLES; /*!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' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` decimal(10,5) default NULL, `b` float default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES ('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456),('1.23450',2.3456); /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -208,12 +208,12 @@ INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` varchar(255) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=koi8r; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -244,12 +244,9 @@ INSERT INTO t1 VALUES (1), (2); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL40' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; CREATE TABLE `t1` ( `a` int(11) default NULL ) TYPE=MyISAM; -SET character_set_client = @saved_cs_client; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -270,12 +267,9 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; CREATE TABLE `t1` ( `a` int(11) default NULL ) TYPE=MyISAM; -SET character_set_client = @saved_cs_client; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -294,12 +288,12 @@ DROP TABLE t1; # Bug #2592 'mysqldump doesn't quote "tricky" names correctly' # create table ```a` (i int); -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE ```a` ( `i` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; drop table ```a`; # # Bug #2591 "mysqldump quotes names inconsistently" @@ -317,12 +311,12 @@ create table t1(a int); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -345,12 +339,12 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS "t1"; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE "t1" ( "a" int(11) default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES "t1" WRITE; /*!40000 ALTER TABLE "t1" DISABLE KEYS */; @@ -376,12 +370,12 @@ set global sql_mode='ANSI_QUOTES'; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -404,12 +398,12 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS "t1"; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE "t1" ( "a" int(11) default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES "t1" WRITE; /*!40000 ALTER TABLE "t1" DISABLE KEYS */; @@ -439,12 +433,12 @@ insert into t1 values (1),(2),(3); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -533,12 +527,12 @@ INSERT INTO t1 VALUES (_latin1 ' /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` char(10) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -569,12 +563,9 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; CREATE TABLE `t1` ( `a` char(10) default NULL ) TYPE=MyISAM; -SET character_set_client = @saved_cs_client; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -595,12 +586,9 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; CREATE TABLE `t1` ( `a` char(10) default NULL ) TYPE=MyISAM; -SET character_set_client = @saved_cs_client; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -621,12 +609,9 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; CREATE TABLE `t1` ( `a` char(10) default NULL ) TYPE=MyISAM; -SET character_set_client = @saved_cs_client; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -660,12 +645,12 @@ INSERT INTO t2 VALUES (4),(5),(6); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; @@ -701,12 +686,12 @@ INSERT INTO `t1` VALUES (0x602010000280100005E71A); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `b` blob ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -742,12 +727,12 @@ INSERT INTO t1 VALUES (4),(5),(6); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -776,12 +761,12 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; INSERT DELAYED IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6); @@ -1145,8 +1130,8 @@ insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `F_c4ca4238a0b923820dcc509a6f75849b` int(11) default NULL, `F_c81e728d9d4c2f636f067f89cc14862c` int(11) default NULL, @@ -1479,7 +1464,7 @@ CREATE TABLE `t1` ( `F_6faa8040da20ef399b63a72d0e4ab575` int(11) default NULL, `F_fe73f687e5bc5280214e0486b273a5f9` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -1520,12 +1505,12 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -1564,19 +1549,19 @@ INSERT INTO t2 VALUES (1), (2); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -1599,19 +1584,19 @@ SET character_set_client = @saved_cs_client; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -1811,26 +1796,26 @@ create table t3(a int); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t3`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t3` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -1860,12 +1845,12 @@ mysqldump: Got error: 1064: You have an error in your SQL syntax; check the manu /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -1896,15 +1881,15 @@ insert into t1 values (0815, 4711, 2006); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS "t1"; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE "t1" ( "a b" int(11) NOT NULL default '0', "c""d" int(11) NOT NULL default '0', "e`f" int(11) NOT NULL default '0', PRIMARY KEY ("a b","c""d","e`f") ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES "t1" WRITE; /*!40000 ALTER TABLE "t1" DISABLE KEYS */; @@ -1930,15 +1915,15 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a b` int(11) NOT NULL default '0', `c"d` int(11) NOT NULL default '0', `e``f` int(11) NOT NULL default '0', PRIMARY KEY (`a b`,`c"d`,`e``f`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -1984,13 +1969,13 @@ create view v2 as select * from t2 where a like 'a%' with check option; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` varchar(30) default NULL, KEY `a` (`a`(5)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; @@ -2068,12 +2053,12 @@ create view v1 as select * from t1; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2128,13 +2113,13 @@ create view v2 as select * from t2 where a like 'a%' with check option; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` varchar(30) default NULL, KEY `a` (`a`(5)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; @@ -2183,12 +2168,12 @@ INSERT INTO t1 VALUES ('\''); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` char(10) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2229,14 +2214,14 @@ select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL, `b` int(11) default NULL, `c` varchar(30) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2352,13 +2337,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL, `b` bigint(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2392,12 +2377,12 @@ end */;; DELIMITER ; /*!50003 SET SESSION SQL_MODE=@SAVE_SQL_MODE*/; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; @@ -2442,13 +2427,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL, `b` bigint(20) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2456,12 +2441,12 @@ INSERT INTO `t1` VALUES (1,NULL),(2,NULL),(4,NULL),(11,NULL); /*!40000 ALTER TABLE `t1` ENABLE KEYS */; UNLOCK TABLES; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; @@ -2585,12 +2570,12 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `id` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2678,13 +2663,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `d` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, UNIQUE KEY `d` (`d`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2715,13 +2700,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `d` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, UNIQUE KEY `d` (`d`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2768,12 +2753,12 @@ a2 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS "t1 test"; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE "t1 test" ( "a1" int(11) default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES "t1 test" WRITE; /*!40000 ALTER TABLE "t1 test" DISABLE KEYS */; @@ -2791,12 +2776,12 @@ INSERT INTO `t2 test` SET a2 = NEW.a1; END */;; DELIMITER ; /*!50003 SET SESSION SQL_MODE=@SAVE_SQL_MODE*/; DROP TABLE IF EXISTS "t2 test"; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE "t2 test" ( "a2" int(11) default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES "t2 test" WRITE; /*!40000 ALTER TABLE "t2 test" DISABLE KEYS */; @@ -2845,14 +2830,14 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL, `b` varchar(32) default NULL, `c` varchar(32) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2940,12 +2925,12 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l USE `test`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -2991,13 +2976,13 @@ insert into t1 values ('',''); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` binary(1) default NULL, `b` blob ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -3026,13 +3011,13 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` binary(1) default NULL, `b` blob ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -3187,12 +3172,12 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_test_db` /*!40100 DEFAULT CH USE `mysqldump_test_db`; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `id` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -3237,14 +3222,14 @@ create view nasishnasifu as select mysqldump_tables.basetable.id from mysqldump_ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_tables` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `mysqldump_tables`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `basetable` ( `id` bigint(20) unsigned NOT NULL auto_increment, `tag` varchar(64) default NULL, UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_views` /*!40100 DEFAULT CHARACTER SET latin1 */; @@ -3312,13 +3297,13 @@ mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SU mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227) grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=#; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL, `b` varchar(34) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; drop table t1; drop user mysqltest_1@localhost; # @@ -3407,31 +3392,31 @@ CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t2`,`t3`); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `t2`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; /*!40000 ALTER TABLE `t2` ENABLE KEYS */; UNLOCK TABLES; DROP TABLE IF EXISTS `t3`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t3` ( `a` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t3` WRITE; /*!40000 ALTER TABLE `t3` DISABLE KEYS */; @@ -3507,13 +3492,13 @@ drop database mysqldump_test_db; # CREATE TABLE t1 (c1 INT, c2 LONGBLOB); INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `c1` int(11) default NULL, `c2` longblob ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171); DROP TABLE t1; # @@ -3571,6 +3556,83 @@ DROP TABLE t1,t2; -- Dump completed on DATE SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; +SET NAMES utf8; +CREATE TABLE `straße` ( f1 INT ); +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!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' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `straße`; +CREATE TABLE `straße` ( + `f1` int(11) default NULL +) TYPE=MyISAM; + +LOCK TABLES `straße` WRITE; +/*!40000 ALTER TABLE `straße` DISABLE KEYS */; +/*!40000 ALTER TABLE `straße` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!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' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `strae`; +CREATE TABLE `strae` ( + `f1` int(11) default NULL +) TYPE=MyISAM; + +LOCK TABLES `strae` WRITE; +/*!40000 ALTER TABLE `strae` DISABLE KEYS */; +/*!40000 ALTER TABLE `strae` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE `straße`; +CREATE TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` ( f1 INT ); +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!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' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `כדשגכחךלדגכחשךדגחכךלדגכ`; +CREATE TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` ( + `f1` int(11) default NULL +) TYPE=MyISAM; + +LOCK TABLES `כדשגכחךלדגכחשךדגחכךלדגכ` WRITE; +/*!40000 ALTER TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` DISABLE KEYS */; +/*!40000 ALTER TABLE `כדשגכחךלדגכחשךדגחכךלדגכ` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!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' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE `כדשגכחךלדגכחשךדגחכךלדגכ`; # # End of 5.0 tests # diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 9c6c29eea47..32c8dfeac1c 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -77,12 +77,12 @@ INSERT INTO t1 VALUES (1), (2); /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -111,12 +111,12 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; @@ -145,12 +145,12 @@ UNLOCK TABLES; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `t1`; -SET @saved_cs_client = @@character_set_client; -SET character_set_client = utf8; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a` int(11) default NULL ); -SET character_set_client = @saved_cs_client; +/*!40101 SET character_set_client = @saved_cs_client */; LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; -- cgit v1.2.1 From d1fb6bbcc890955e634d644a002a707c3d8e7f67 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Tue, 3 Feb 2009 02:43:32 +0100 Subject: Bug#40657: assertion with out of range variables and traditional sql_mode In STRICT mode, out-of-bounds values caused an error message to be queued (rather than just a warning), without any further error-like processing happening. (The error is queued during update, at which time it's too late. For it to be processed properly, it would need to be queued during check-stage.) The assertion rightfully complains that we're trying to send an OK while having an error queued. Changeset breaks a lot of tests out into check-stage. This also allows us to send more correct warnings/error messages. mysql-test/r/auto_increment_increment_basic.result: update test results reflecting more correct warnings mysql-test/r/auto_increment_increment_func.result: update test results reflecting more correct warnings mysql-test/r/auto_increment_offset_basic.result: update test results reflecting more correct warnings mysql-test/r/auto_increment_offset_func.result: update test results reflecting more correct warnings mysql-test/r/concurrent_insert_basic.result: update test results reflecting more correct warnings mysql-test/r/connect_timeout_basic.result: update test results reflecting more correct warnings mysql-test/r/default_week_format_basic.result: update test results reflecting more correct warnings mysql-test/r/delayed_insert_timeout_basic.result: update test results reflecting more correct warnings mysql-test/r/div_precision_increment_basic.result: update test results reflecting more correct warnings mysql-test/r/expire_logs_days_basic.result: update test results reflecting more correct warnings mysql-test/r/group_concat_max_len_basic.result: update test results reflecting more correct warnings mysql-test/r/interactive_timeout_basic.result: update test results reflecting more correct warnings mysql-test/r/max_allowed_packet_basic.result: update test results reflecting more correct warnings mysql-test/r/max_binlog_size_basic.result: update test results reflecting more correct warnings mysql-test/r/max_connections_basic.result: update test results reflecting more correct warnings mysql-test/r/max_delayed_threads_basic.result: update test results reflecting more correct warnings mysql-test/r/max_error_count_basic.result: update test results reflecting more correct warnings mysql-test/r/max_insert_delayed_threads_basic.result: update test results reflecting more correct warnings mysql-test/r/max_length_for_sort_data_basic.result: update test results reflecting more correct warnings mysql-test/r/max_prepared_stmt_count_basic.result: update test results reflecting more correct warnings mysql-test/r/max_relay_log_size_basic.result: update test results reflecting more correct warnings mysql-test/r/max_sort_length_basic.result: update test results reflecting more correct warnings mysql-test/r/max_sp_recursion_depth_basic.result: update test results reflecting more correct warnings mysql-test/r/myisam_data_pointer_size_basic.result: update test results reflecting more correct warnings mysql-test/r/net_buffer_length_basic.result: update test results reflecting more correct warnings mysql-test/r/net_read_timeout_basic.result: update test results reflecting more correct warnings mysql-test/r/net_write_timeout_basic.result: update test results reflecting more correct warnings mysql-test/r/optimizer_prune_level_basic.result: update test results reflecting more correct warnings mysql-test/r/optimizer_search_depth_basic.result: update test results reflecting more correct warnings mysql-test/r/preload_buffer_size_basic.result: update test results reflecting more correct warnings mysql-test/r/ps.result: update test results reflecting more correct warnings mysql-test/r/read_buffer_size_basic.result: update test results reflecting more correct warnings mysql-test/r/read_rnd_buffer_size_basic.result: update test results reflecting more correct warnings mysql-test/r/slave_net_timeout_basic.result: update test results reflecting more correct warnings mysql-test/r/slow_launch_time_basic.result: update test results reflecting more correct warnings mysql-test/r/table_definition_cache_basic.result: update test results reflecting more correct warnings mysql-test/r/table_lock_wait_timeout_basic.result: update test results reflecting more correct warnings mysql-test/r/table_open_cache_basic.result: update test results reflecting more correct warnings mysql-test/r/variables.result: add test case that throws error (rather than warning) in the middle of trying to set a system-variable. mysql-test/t/variables.test: add test case that throws error (rather than warning) in the middle of trying to set a system-variable. sql/set_var.cc: Add comments. Prevent double-warnings. Through warnings for negative values given to unsigned system-variables. Process errors and warnings at check() stage rather than update() stage, since we may only issue warnings at the latter. --- mysql-test/r/auto_increment_increment_basic.result | 4 +-- mysql-test/r/auto_increment_increment_func.result | 2 +- mysql-test/r/auto_increment_offset_basic.result | 4 +-- mysql-test/r/auto_increment_offset_func.result | 2 +- mysql-test/r/concurrent_insert_basic.result | 2 ++ mysql-test/r/connect_timeout_basic.result | 2 +- mysql-test/r/default_week_format_basic.result | 4 +++ mysql-test/r/delayed_insert_timeout_basic.result | 2 +- mysql-test/r/div_precision_increment_basic.result | 4 +++ mysql-test/r/expire_logs_days_basic.result | 4 +++ mysql-test/r/group_concat_max_len_basic.result | 4 +-- mysql-test/r/interactive_timeout_basic.result | 4 +-- mysql-test/r/max_allowed_packet_basic.result | 2 +- mysql-test/r/max_binlog_size_basic.result | 4 +-- mysql-test/r/max_connections_basic.result | 4 +-- mysql-test/r/max_delayed_threads_basic.result | 4 +++ mysql-test/r/max_error_count_basic.result | 8 +++++ .../r/max_insert_delayed_threads_basic.result | 4 +++ mysql-test/r/max_length_for_sort_data_basic.result | 4 +-- mysql-test/r/max_prepared_stmt_count_basic.result | 4 +++ mysql-test/r/max_relay_log_size_basic.result | 4 +++ mysql-test/r/max_sort_length_basic.result | 4 +-- mysql-test/r/max_sp_recursion_depth_basic.result | 8 +++++ mysql-test/r/myisam_data_pointer_size_basic.result | 2 +- mysql-test/r/net_buffer_length_basic.result | 2 +- mysql-test/r/net_read_timeout_basic.result | 4 +-- mysql-test/r/net_write_timeout_basic.result | 4 +-- mysql-test/r/optimizer_prune_level_basic.result | 4 +++ mysql-test/r/optimizer_search_depth_basic.result | 4 +++ mysql-test/r/preload_buffer_size_basic.result | 4 +-- mysql-test/r/ps.result | 2 ++ mysql-test/r/read_buffer_size_basic.result | 4 +-- mysql-test/r/read_rnd_buffer_size_basic.result | 4 +-- mysql-test/r/slave_net_timeout_basic.result | 4 +-- mysql-test/r/slow_launch_time_basic.result | 4 +++ mysql-test/r/table_definition_cache_basic.result | 2 +- mysql-test/r/table_lock_wait_timeout_basic.result | 4 +-- mysql-test/r/table_open_cache_basic.result | 4 +-- mysql-test/r/variables.result | 35 +++++++++++++++++++++- 39 files changed, 134 insertions(+), 41 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/auto_increment_increment_basic.result b/mysql-test/r/auto_increment_increment_basic.result index c453d2322cf..75f76a60b33 100644 --- a/mysql-test/r/auto_increment_increment_basic.result +++ b/mysql-test/r/auto_increment_increment_basic.result @@ -61,7 +61,7 @@ SELECT @@global.auto_increment_increment; 1 SET @@global.auto_increment_increment = -1024; Warnings: -Warning 1292 Truncated incorrect auto-increment-increment value: '0' +Warning 1292 Truncated incorrect auto_increment_increment value: '-1024' SELECT @@global.auto_increment_increment; @@global.auto_increment_increment 1 @@ -89,7 +89,7 @@ SELECT @@session.auto_increment_increment; 1 SET @@session.auto_increment_increment = -2; Warnings: -Warning 1292 Truncated incorrect auto-increment-increment value: '0' +Warning 1292 Truncated incorrect auto_increment_increment value: '-2' SELECT @@session.auto_increment_increment; @@session.auto_increment_increment 1 diff --git a/mysql-test/r/auto_increment_increment_func.result b/mysql-test/r/auto_increment_increment_func.result index f0f1ada6d95..eeaa3949886 100644 --- a/mysql-test/r/auto_increment_increment_func.result +++ b/mysql-test/r/auto_increment_increment_func.result @@ -169,7 +169,7 @@ id name ## Verifying behavior of variable with negative value ## SET @@auto_increment_increment = -10; Warnings: -Warning 1292 Truncated incorrect auto-increment-increment value: '0' +Warning 1292 Truncated incorrect auto_increment_increment value: '-10' INSERT into t1(name) values('Record_17'); INSERT into t1(name) values('Record_18'); SELECT * from t1; diff --git a/mysql-test/r/auto_increment_offset_basic.result b/mysql-test/r/auto_increment_offset_basic.result index b5ccca8ce56..f91037cb7cf 100644 --- a/mysql-test/r/auto_increment_offset_basic.result +++ b/mysql-test/r/auto_increment_offset_basic.result @@ -61,7 +61,7 @@ SELECT @@global.auto_increment_offset; 1 SET @@global.auto_increment_offset = -1024; Warnings: -Warning 1292 Truncated incorrect auto-increment-offset value: '0' +Warning 1292 Truncated incorrect auto_increment_offset value: '-1024' SELECT @@global.auto_increment_offset; @@global.auto_increment_offset 1 @@ -94,7 +94,7 @@ SELECT @@session.auto_increment_offset; 1 SET @@session.auto_increment_offset = -2; Warnings: -Warning 1292 Truncated incorrect auto-increment-offset value: '0' +Warning 1292 Truncated incorrect auto_increment_offset value: '-2' SELECT @@session.auto_increment_offset; @@session.auto_increment_offset 1 diff --git a/mysql-test/r/auto_increment_offset_func.result b/mysql-test/r/auto_increment_offset_func.result index 5c953544e73..e166cb149f6 100644 --- a/mysql-test/r/auto_increment_offset_func.result +++ b/mysql-test/r/auto_increment_offset_func.result @@ -178,7 +178,7 @@ id name ## Assigning -ve value to variable ## SET @@auto_increment_offset = -10; Warnings: -Warning 1292 Truncated incorrect auto-increment-offset value: '0' +Warning 1292 Truncated incorrect auto_increment_offset value: '-10' SELECT @@auto_increment_offset = -10; @@auto_increment_offset = -10 0 diff --git a/mysql-test/r/concurrent_insert_basic.result b/mysql-test/r/concurrent_insert_basic.result index e6614ea6abb..2c7fc4296dd 100644 --- a/mysql-test/r/concurrent_insert_basic.result +++ b/mysql-test/r/concurrent_insert_basic.result @@ -28,6 +28,8 @@ SELECT @@global.concurrent_insert; 2 '#--------------------FN_DYNVARS_018_04-------------------------#' SET @@global.concurrent_insert = -1; +Warnings: +Warning 1292 Truncated incorrect concurrent_insert value: '-1' Select @@global.concurrent_insert; @@global.concurrent_insert 0 diff --git a/mysql-test/r/connect_timeout_basic.result b/mysql-test/r/connect_timeout_basic.result index 7cdd747fc15..cc84405cf86 100644 --- a/mysql-test/r/connect_timeout_basic.result +++ b/mysql-test/r/connect_timeout_basic.result @@ -35,7 +35,7 @@ SELECT @@global.connect_timeout; 2 SET @@global.connect_timeout = -1024; Warnings: -Warning 1292 Truncated incorrect connect_timeout value: '0' +Warning 1292 Truncated incorrect connect_timeout value: '-1024' SELECT @@global.connect_timeout; @@global.connect_timeout 2 diff --git a/mysql-test/r/default_week_format_basic.result b/mysql-test/r/default_week_format_basic.result index d513ef1c41e..aa5e0b264d3 100644 --- a/mysql-test/r/default_week_format_basic.result +++ b/mysql-test/r/default_week_format_basic.result @@ -64,6 +64,8 @@ SELECT @@global.default_week_format; @@global.default_week_format 7 SET @@global.default_week_format = -1024; +Warnings: +Warning 1292 Truncated incorrect default_week_format value: '-1024' SELECT @@global.default_week_format; @@global.default_week_format 0 @@ -100,6 +102,8 @@ SELECT @@session.default_week_format; @@session.default_week_format 7 SET @@session.default_week_format = -2; +Warnings: +Warning 1292 Truncated incorrect default_week_format value: '-2' SELECT @@session.default_week_format; @@session.default_week_format 0 diff --git a/mysql-test/r/delayed_insert_timeout_basic.result b/mysql-test/r/delayed_insert_timeout_basic.result index 4049907eb80..e8eab4da3cc 100644 --- a/mysql-test/r/delayed_insert_timeout_basic.result +++ b/mysql-test/r/delayed_insert_timeout_basic.result @@ -35,7 +35,7 @@ SELECT @@global.delayed_insert_timeout; 1 SET @@global.delayed_insert_timeout = -1024; Warnings: -Warning 1292 Truncated incorrect delayed_insert_timeout value: '0' +Warning 1292 Truncated incorrect delayed_insert_timeout value: '-1024' SELECT @@global.delayed_insert_timeout; @@global.delayed_insert_timeout 1 diff --git a/mysql-test/r/div_precision_increment_basic.result b/mysql-test/r/div_precision_increment_basic.result index d0311afa681..f78855fcaae 100644 --- a/mysql-test/r/div_precision_increment_basic.result +++ b/mysql-test/r/div_precision_increment_basic.result @@ -78,6 +78,8 @@ SELECT @@global.div_precision_increment; @@global.div_precision_increment 30 SET @@global.div_precision_increment = -1024; +Warnings: +Warning 1292 Truncated incorrect div_precision_increment value: '-1024' SELECT @@global.div_precision_increment; @@global.div_precision_increment 0 @@ -100,6 +102,8 @@ SELECT @@session.div_precision_increment; @@session.div_precision_increment 30 SET @@session.div_precision_increment = -2; +Warnings: +Warning 1292 Truncated incorrect div_precision_increment value: '-2' SELECT @@session.div_precision_increment; @@session.div_precision_increment 0 diff --git a/mysql-test/r/expire_logs_days_basic.result b/mysql-test/r/expire_logs_days_basic.result index 66aa5fa42a5..1abab8e68b0 100644 --- a/mysql-test/r/expire_logs_days_basic.result +++ b/mysql-test/r/expire_logs_days_basic.result @@ -32,6 +32,8 @@ SELECT @@global.expire_logs_days; 21 '#--------------------FN_DYNVARS_029_04-------------------------#' SET @@global.expire_logs_days = -1; +Warnings: +Warning 1292 Truncated incorrect expire_logs_days value: '-1' SELECT @@global.expire_logs_days; @@global.expire_logs_days 0 @@ -53,6 +55,8 @@ SELECT @@global.expire_logs_days; @@global.expire_logs_days 99 SET @@global.expire_logs_days = -1024; +Warnings: +Warning 1292 Truncated incorrect expire_logs_days value: '-1024' SELECT @@global.expire_logs_days; @@global.expire_logs_days 0 diff --git a/mysql-test/r/group_concat_max_len_basic.result b/mysql-test/r/group_concat_max_len_basic.result index 5704f00c014..4821ca91308 100644 --- a/mysql-test/r/group_concat_max_len_basic.result +++ b/mysql-test/r/group_concat_max_len_basic.result @@ -65,7 +65,7 @@ SELECT @@global.group_concat_max_len; 4 SET @@global.group_concat_max_len = -1024; Warnings: -Warning 1292 Truncated incorrect group_concat_max_len value: '0' +Warning 1292 Truncated incorrect group_concat_max_len value: '-1024' SELECT @@global.group_concat_max_len; @@global.group_concat_max_len 4 @@ -91,7 +91,7 @@ SELECT @@session.group_concat_max_len; 4 SET @@session.group_concat_max_len = -2; Warnings: -Warning 1292 Truncated incorrect group_concat_max_len value: '0' +Warning 1292 Truncated incorrect group_concat_max_len value: '-2' SELECT @@session.group_concat_max_len; @@session.group_concat_max_len 4 diff --git a/mysql-test/r/interactive_timeout_basic.result b/mysql-test/r/interactive_timeout_basic.result index 0777596db07..519fef8a6e5 100644 --- a/mysql-test/r/interactive_timeout_basic.result +++ b/mysql-test/r/interactive_timeout_basic.result @@ -61,7 +61,7 @@ SELECT @@global.interactive_timeout; 1 SET @@global.interactive_timeout = -1024; Warnings: -Warning 1292 Truncated incorrect interactive_timeout value: '0' +Warning 1292 Truncated incorrect interactive_timeout value: '-1024' SELECT @@global.interactive_timeout; @@global.interactive_timeout 1 @@ -89,7 +89,7 @@ SELECT @@session.interactive_timeout; 1 SET @@session.interactive_timeout = -2; Warnings: -Warning 1292 Truncated incorrect interactive_timeout value: '0' +Warning 1292 Truncated incorrect interactive_timeout value: '-2' SELECT @@session.interactive_timeout; @@session.interactive_timeout 1 diff --git a/mysql-test/r/max_allowed_packet_basic.result b/mysql-test/r/max_allowed_packet_basic.result index 0745d5a36e1..ca5b87f19cb 100644 --- a/mysql-test/r/max_allowed_packet_basic.result +++ b/mysql-test/r/max_allowed_packet_basic.result @@ -76,7 +76,7 @@ SELECT @@global.max_allowed_packet; 1024 SET @@global.max_allowed_packet = -1024; Warnings: -Warning 1292 Truncated incorrect max_allowed_packet value: '0' +Warning 1292 Truncated incorrect max_allowed_packet value: '-1024' SELECT @@global.max_allowed_packet; @@global.max_allowed_packet 1024 diff --git a/mysql-test/r/max_binlog_size_basic.result b/mysql-test/r/max_binlog_size_basic.result index 291b687f76c..658289628b0 100644 --- a/mysql-test/r/max_binlog_size_basic.result +++ b/mysql-test/r/max_binlog_size_basic.result @@ -39,7 +39,7 @@ SELECT @@global.max_binlog_size; '#--------------------FN_DYNVARS_072_04-------------------------#' SET @@global.max_binlog_size = -1; Warnings: -Warning 1292 Truncated incorrect max_binlog_size value: '0' +Warning 1292 Truncated incorrect max_binlog_size value: '-1' SELECT @@global.max_binlog_size; @@global.max_binlog_size 4096 @@ -56,7 +56,7 @@ SELECT @@global.max_binlog_size; 1073741824 SET @@global.max_binlog_size = -1024; Warnings: -Warning 1292 Truncated incorrect max_binlog_size value: '0' +Warning 1292 Truncated incorrect max_binlog_size value: '-1024' SELECT @@global.max_binlog_size; @@global.max_binlog_size 4096 diff --git a/mysql-test/r/max_connections_basic.result b/mysql-test/r/max_connections_basic.result index ccedff01c54..d917cd97b25 100644 --- a/mysql-test/r/max_connections_basic.result +++ b/mysql-test/r/max_connections_basic.result @@ -39,7 +39,7 @@ SELECT @@global.max_connections; '#--------------------FN_DYNVARS_074_04-------------------------#' SET @@global.max_connections = -1; Warnings: -Warning 1292 Truncated incorrect max_connections value: '0' +Warning 1292 Truncated incorrect max_connections value: '-1' SELECT @@global.max_connections; @@global.max_connections 1 @@ -56,7 +56,7 @@ SELECT @@global.max_connections; 100000 SET @@global.max_connections = -1024; Warnings: -Warning 1292 Truncated incorrect max_connections value: '0' +Warning 1292 Truncated incorrect max_connections value: '-1024' SELECT @@global.max_connections; @@global.max_connections 1 diff --git a/mysql-test/r/max_delayed_threads_basic.result b/mysql-test/r/max_delayed_threads_basic.result index e0b2a3ee1cd..946c24e3082 100644 --- a/mysql-test/r/max_delayed_threads_basic.result +++ b/mysql-test/r/max_delayed_threads_basic.result @@ -76,10 +76,14 @@ SELECT @@session.max_delayed_threads; 16383 '#------------------FN_DYNVARS_075_05-----------------------#' SET @@global.max_delayed_threads = -1024; +Warnings: +Warning 1292 Truncated incorrect max_delayed_threads value: '-1024' SELECT @@global.max_delayed_threads; @@global.max_delayed_threads 0 SET @@global.max_delayed_threads = -1; +Warnings: +Warning 1292 Truncated incorrect max_delayed_threads value: '-1' SELECT @@global.max_delayed_threads; @@global.max_delayed_threads 0 diff --git a/mysql-test/r/max_error_count_basic.result b/mysql-test/r/max_error_count_basic.result index 2046a5e9dfa..7be8e0f37a3 100644 --- a/mysql-test/r/max_error_count_basic.result +++ b/mysql-test/r/max_error_count_basic.result @@ -63,10 +63,14 @@ SELECT @@session.max_error_count; 65534 '#------------------FN_DYNVARS_076_05-----------------------#' SET @@global.max_error_count = -1; +Warnings: +Warning 1292 Truncated incorrect max_error_count value: '-1' SELECT @@global.max_error_count; @@global.max_error_count 0 SET @@global.max_error_count = -1024; +Warnings: +Warning 1292 Truncated incorrect max_error_count value: '-1024' SELECT @@global.max_error_count; @@global.max_error_count 0 @@ -93,6 +97,8 @@ SELECT @@global.max_error_count; @@global.max_error_count 65535 SET @@session.max_error_count = -1; +Warnings: +Warning 1292 Truncated incorrect max_error_count value: '-1' SELECT @@session.max_error_count; @@session.max_error_count 0 @@ -102,6 +108,8 @@ SELECT @@session.max_error_count; @@session.max_error_count 65535 SET @@session.max_error_count = -2; +Warnings: +Warning 1292 Truncated incorrect max_error_count value: '-2' SELECT @@session.max_error_count; @@session.max_error_count 0 diff --git a/mysql-test/r/max_insert_delayed_threads_basic.result b/mysql-test/r/max_insert_delayed_threads_basic.result index 31c1fcec396..2f2f7f0c0fc 100644 --- a/mysql-test/r/max_insert_delayed_threads_basic.result +++ b/mysql-test/r/max_insert_delayed_threads_basic.result @@ -77,10 +77,14 @@ SELECT @@session.max_insert_delayed_threads; 16383 '#------------------FN_DYNVARS_078_05-----------------------#' SET @@global.max_insert_delayed_threads = -1024; +Warnings: +Warning 1292 Truncated incorrect max_insert_delayed_threads value: '-1024' SELECT @@global.max_insert_delayed_threads; @@global.max_insert_delayed_threads 0 SET @@global.max_insert_delayed_threads = -1; +Warnings: +Warning 1292 Truncated incorrect max_insert_delayed_threads value: '-1' SELECT @@global.max_insert_delayed_threads; @@global.max_insert_delayed_threads 0 diff --git a/mysql-test/r/max_length_for_sort_data_basic.result b/mysql-test/r/max_length_for_sort_data_basic.result index 3edd3e86262..8936946c774 100644 --- a/mysql-test/r/max_length_for_sort_data_basic.result +++ b/mysql-test/r/max_length_for_sort_data_basic.result @@ -71,7 +71,7 @@ SELECT @@session.max_length_for_sort_data; '#------------------FN_DYNVARS_080_05-----------------------#' SET @@global.max_length_for_sort_data = -1024; Warnings: -Warning 1292 Truncated incorrect max_length_for_sort_data value: '0' +Warning 1292 Truncated incorrect max_length_for_sort_data value: '-1024' SELECT @@global.max_length_for_sort_data; @@global.max_length_for_sort_data 4 @@ -111,7 +111,7 @@ SELECT @@session.max_length_for_sort_data; 8388608 SET @@session.max_length_for_sort_data = -1; Warnings: -Warning 1292 Truncated incorrect max_length_for_sort_data value: '0' +Warning 1292 Truncated incorrect max_length_for_sort_data value: '-1' SELECT @@session.max_length_for_sort_data; @@session.max_length_for_sort_data 4 diff --git a/mysql-test/r/max_prepared_stmt_count_basic.result b/mysql-test/r/max_prepared_stmt_count_basic.result index ebc7da8c7f8..9c28c287980 100644 --- a/mysql-test/r/max_prepared_stmt_count_basic.result +++ b/mysql-test/r/max_prepared_stmt_count_basic.result @@ -36,6 +36,8 @@ SELECT @@global.max_prepared_stmt_count; 65535 '#--------------------FN_DYNVARS_081_04-------------------------#' SET @@global.max_prepared_stmt_count = -1; +Warnings: +Warning 1292 Truncated incorrect max_prepared_stmt_count value: '-1' SELECT @@global.max_prepared_stmt_count; @@global.max_prepared_stmt_count 0 @@ -51,6 +53,8 @@ SELECT @@global.max_prepared_stmt_count; @@global.max_prepared_stmt_count 1048576 SET @@global.max_prepared_stmt_count = -1024; +Warnings: +Warning 1292 Truncated incorrect max_prepared_stmt_count value: '-1024' SELECT @@global.max_prepared_stmt_count; @@global.max_prepared_stmt_count 0 diff --git a/mysql-test/r/max_relay_log_size_basic.result b/mysql-test/r/max_relay_log_size_basic.result index c0042f497ad..168459cf7b6 100644 --- a/mysql-test/r/max_relay_log_size_basic.result +++ b/mysql-test/r/max_relay_log_size_basic.result @@ -38,6 +38,8 @@ SELECT @@global.max_relay_log_size; 'Bug# 34877: Invalid Values are coming in variable on assigning valid values'; '#--------------------FN_DYNVARS_082_04-------------------------#' SET @@global.max_relay_log_size = -1; +Warnings: +Warning 1292 Truncated incorrect max_relay_log_size value: '-1' SELECT @@global.max_relay_log_size; @@global.max_relay_log_size 0 @@ -53,6 +55,8 @@ SELECT @@global.max_relay_log_size; @@global.max_relay_log_size 1073741824 SET @@global.max_relay_log_size = -1024; +Warnings: +Warning 1292 Truncated incorrect max_relay_log_size value: '-1024' SELECT @@global.max_relay_log_size; @@global.max_relay_log_size 0 diff --git a/mysql-test/r/max_sort_length_basic.result b/mysql-test/r/max_sort_length_basic.result index 73dd31ea4e7..f0a9ca83376 100644 --- a/mysql-test/r/max_sort_length_basic.result +++ b/mysql-test/r/max_sort_length_basic.result @@ -71,7 +71,7 @@ SELECT @@session.max_sort_length; '#------------------FN_DYNVARS_084_05-----------------------#' SET @@global.max_sort_length = -1024; Warnings: -Warning 1292 Truncated incorrect max_sort_length value: '0' +Warning 1292 Truncated incorrect max_sort_length value: '-1024' SELECT @@global.max_sort_length; @@global.max_sort_length 4 @@ -111,7 +111,7 @@ SELECT @@session.max_sort_length; 8388608 SET @@session.max_sort_length = -1; Warnings: -Warning 1292 Truncated incorrect max_sort_length value: '0' +Warning 1292 Truncated incorrect max_sort_length value: '-1' SELECT @@session.max_sort_length; @@session.max_sort_length 4 diff --git a/mysql-test/r/max_sp_recursion_depth_basic.result b/mysql-test/r/max_sp_recursion_depth_basic.result index 8c79f3c5fc7..e5f267253f4 100644 --- a/mysql-test/r/max_sp_recursion_depth_basic.result +++ b/mysql-test/r/max_sp_recursion_depth_basic.result @@ -74,6 +74,8 @@ SELECT @@session.max_sp_recursion_depth; 150 '#------------------FN_DYNVARS_085_05-----------------------#' SET @@global.max_sp_recursion_depth = -1024; +Warnings: +Warning 1292 Truncated incorrect max_sp_recursion_depth value: '-1024' SELECT @@global.max_sp_recursion_depth; @@global.max_sp_recursion_depth 0 @@ -84,6 +86,8 @@ SELECT @@global.max_sp_recursion_depth; @@global.max_sp_recursion_depth 255 SET @@global.max_sp_recursion_depth = -1; +Warnings: +Warning 1292 Truncated incorrect max_sp_recursion_depth value: '-1' SELECT @@global.max_sp_recursion_depth; @@global.max_sp_recursion_depth 0 @@ -110,6 +114,8 @@ SELECT @@session.max_sp_recursion_depth; @@session.max_sp_recursion_depth 255 SET @@session.max_sp_recursion_depth = -1; +Warnings: +Warning 1292 Truncated incorrect max_sp_recursion_depth value: '-1' SELECT @@session.max_sp_recursion_depth; @@session.max_sp_recursion_depth 0 @@ -120,6 +126,8 @@ SELECT @@session.max_sp_recursion_depth; @@session.max_sp_recursion_depth 255 SET @@session.max_sp_recursion_depth = -001; +Warnings: +Warning 1292 Truncated incorrect max_sp_recursion_depth value: '-1' SELECT @@session.max_sp_recursion_depth; @@session.max_sp_recursion_depth 0 diff --git a/mysql-test/r/myisam_data_pointer_size_basic.result b/mysql-test/r/myisam_data_pointer_size_basic.result index d2b0bebe029..86f7788fcdf 100644 --- a/mysql-test/r/myisam_data_pointer_size_basic.result +++ b/mysql-test/r/myisam_data_pointer_size_basic.result @@ -48,7 +48,7 @@ ERROR HY000: Variable 'myisam_data_pointer_size' is a GLOBAL variable and should '#------------------FN_DYNVARS_093_05-----------------------#' SET @@global.myisam_data_pointer_size = -1; Warnings: -Warning 1292 Truncated incorrect myisam_data_pointer_size value: '0' +Warning 1292 Truncated incorrect myisam_data_pointer_size value: '-1' SELECT @@global.myisam_data_pointer_size; @@global.myisam_data_pointer_size 2 diff --git a/mysql-test/r/net_buffer_length_basic.result b/mysql-test/r/net_buffer_length_basic.result index be7e9082332..07f933b5a4b 100644 --- a/mysql-test/r/net_buffer_length_basic.result +++ b/mysql-test/r/net_buffer_length_basic.result @@ -50,7 +50,7 @@ SELECT @@global.net_buffer_length; 1024 SET @@global.net_buffer_length = -1024; Warnings: -Warning 1292 Truncated incorrect net_buffer_length value: '0' +Warning 1292 Truncated incorrect net_buffer_length value: '-1024' SELECT @@global.net_buffer_length; @@global.net_buffer_length 1024 diff --git a/mysql-test/r/net_read_timeout_basic.result b/mysql-test/r/net_read_timeout_basic.result index 90a6ef72718..aeee25c6526 100644 --- a/mysql-test/r/net_read_timeout_basic.result +++ b/mysql-test/r/net_read_timeout_basic.result @@ -61,7 +61,7 @@ SELECT @@global.net_read_timeout; 1 SET @@global.net_read_timeout = -1024; Warnings: -Warning 1292 Truncated incorrect net_read_timeout value: '0' +Warning 1292 Truncated incorrect net_read_timeout value: '-1024' SELECT @@global.net_read_timeout; @@global.net_read_timeout 1 @@ -89,7 +89,7 @@ SELECT @@session.net_read_timeout; 1 SET @@session.net_read_timeout = -2; Warnings: -Warning 1292 Truncated incorrect net_read_timeout value: '0' +Warning 1292 Truncated incorrect net_read_timeout value: '-2' SELECT @@session.net_read_timeout; @@session.net_read_timeout 1 diff --git a/mysql-test/r/net_write_timeout_basic.result b/mysql-test/r/net_write_timeout_basic.result index 35a2cf069e3..8857b8c0e37 100644 --- a/mysql-test/r/net_write_timeout_basic.result +++ b/mysql-test/r/net_write_timeout_basic.result @@ -61,7 +61,7 @@ SELECT @@global.net_write_timeout; 1 SET @@global.net_write_timeout = -1024; Warnings: -Warning 1292 Truncated incorrect net_write_timeout value: '0' +Warning 1292 Truncated incorrect net_write_timeout value: '-1024' SELECT @@global.net_write_timeout; @@global.net_write_timeout 1 @@ -89,7 +89,7 @@ SELECT @@session.net_write_timeout; 1 SET @@session.net_write_timeout = -2; Warnings: -Warning 1292 Truncated incorrect net_write_timeout value: '0' +Warning 1292 Truncated incorrect net_write_timeout value: '-2' SELECT @@session.net_write_timeout; @@session.net_write_timeout 1 diff --git a/mysql-test/r/optimizer_prune_level_basic.result b/mysql-test/r/optimizer_prune_level_basic.result index 46fe70c40d0..c126569ebcd 100644 --- a/mysql-test/r/optimizer_prune_level_basic.result +++ b/mysql-test/r/optimizer_prune_level_basic.result @@ -81,6 +81,8 @@ ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level' SET @@global.optimizer_prune_level = FELSE; ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level' SET @@global.optimizer_prune_level = -1024; +Warnings: +Warning 1292 Truncated incorrect optimizer_prune_level value: '-1024' SELECT @@global.optimizer_prune_level; @@global.optimizer_prune_level 0 @@ -107,6 +109,8 @@ ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level' SET @@session.optimizer_prune_level = 'OFN'; ERROR 42000: Incorrect argument type to variable 'optimizer_prune_level' SET @@session.optimizer_prune_level = -2; +Warnings: +Warning 1292 Truncated incorrect optimizer_prune_level value: '-2' SELECT @@session.optimizer_prune_level; @@session.optimizer_prune_level 0 diff --git a/mysql-test/r/optimizer_search_depth_basic.result b/mysql-test/r/optimizer_search_depth_basic.result index 9c26339839e..9c49ae7e73f 100644 --- a/mysql-test/r/optimizer_search_depth_basic.result +++ b/mysql-test/r/optimizer_search_depth_basic.result @@ -72,6 +72,8 @@ SELECT @@global.optimizer_search_depth; @@global.optimizer_search_depth 63 SET @@global.optimizer_search_depth = -1; +Warnings: +Warning 1292 Truncated incorrect optimizer_search_depth value: '-1' SELECT @@global.optimizer_search_depth; @@global.optimizer_search_depth 0 @@ -98,6 +100,8 @@ SELECT @@session.optimizer_search_depth; @@session.optimizer_search_depth 63 SET @@session.optimizer_search_depth = -2; +Warnings: +Warning 1292 Truncated incorrect optimizer_search_depth value: '-2' SELECT @@session.optimizer_search_depth; @@session.optimizer_search_depth 0 diff --git a/mysql-test/r/preload_buffer_size_basic.result b/mysql-test/r/preload_buffer_size_basic.result index 775b670d3bc..fd8bdd222d2 100644 --- a/mysql-test/r/preload_buffer_size_basic.result +++ b/mysql-test/r/preload_buffer_size_basic.result @@ -77,7 +77,7 @@ SELECT @@global.preload_buffer_size; 1024 SET @@global.preload_buffer_size = -1; Warnings: -Warning 1292 Truncated incorrect preload_buffer_size value: '0' +Warning 1292 Truncated incorrect preload_buffer_size value: '-1' SELECT @@global.preload_buffer_size; @@global.preload_buffer_size 1024 @@ -111,7 +111,7 @@ SELECT @@session.preload_buffer_size; 1024 SET @@session.preload_buffer_size = -2; Warnings: -Warning 1292 Truncated incorrect preload_buffer_size value: '0' +Warning 1292 Truncated incorrect preload_buffer_size value: '-2' SELECT @@session.preload_buffer_size; @@session.preload_buffer_size 1024 diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 05b2d18889b..df996f0f515 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -803,6 +803,8 @@ select @@max_prepared_stmt_count; @@max_prepared_stmt_count 16382 set global max_prepared_stmt_count=-1; +Warnings: +Warning 1292 Truncated incorrect max_prepared_stmt_count value: '-1' select @@max_prepared_stmt_count; @@max_prepared_stmt_count 0 diff --git a/mysql-test/r/read_buffer_size_basic.result b/mysql-test/r/read_buffer_size_basic.result index 799f7b56235..fe4fa4138c1 100644 --- a/mysql-test/r/read_buffer_size_basic.result +++ b/mysql-test/r/read_buffer_size_basic.result @@ -81,7 +81,7 @@ SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ; 1 SET @@global.read_buffer_size = -1024; Warnings: -Warning 1292 Truncated incorrect read_buffer_size value: '0' +Warning 1292 Truncated incorrect read_buffer_size value: '-1024' SELECT @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 ; @@global.read_buffer_size= 8200 OR @@global.read_buffer_size= 8228 1 @@ -107,7 +107,7 @@ SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ; 1 SET @@session.read_buffer_size = -2; Warnings: -Warning 1292 Truncated incorrect read_buffer_size value: '0' +Warning 1292 Truncated incorrect read_buffer_size value: '-2' SELECT @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 ; @@session.read_buffer_size= 8200 OR @@session.read_buffer_size= 8228 1 diff --git a/mysql-test/r/read_rnd_buffer_size_basic.result b/mysql-test/r/read_rnd_buffer_size_basic.result index c51b0591054..f0c73409430 100644 --- a/mysql-test/r/read_rnd_buffer_size_basic.result +++ b/mysql-test/r/read_rnd_buffer_size_basic.result @@ -83,7 +83,7 @@ SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 822 1 SET @@global.read_rnd_buffer_size = -1024; Warnings: -Warning 1292 Truncated incorrect read_rnd_buffer_size value: '0' +Warning 1292 Truncated incorrect read_rnd_buffer_size value: '-1024' SELECT @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228; @@global.read_rnd_buffer_size= 8200 OR @@global.read_rnd_buffer_size= 8228 1 @@ -109,7 +109,7 @@ SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8 1 SET @@session.read_rnd_buffer_size = -2; Warnings: -Warning 1292 Truncated incorrect read_rnd_buffer_size value: '0' +Warning 1292 Truncated incorrect read_rnd_buffer_size value: '-2' SELECT @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228; @@session.read_rnd_buffer_size= 8200 OR @@session.read_rnd_buffer_size= 8228 1 diff --git a/mysql-test/r/slave_net_timeout_basic.result b/mysql-test/r/slave_net_timeout_basic.result index d672d0152d7..fb8812745cc 100644 --- a/mysql-test/r/slave_net_timeout_basic.result +++ b/mysql-test/r/slave_net_timeout_basic.result @@ -58,13 +58,13 @@ ERROR HY000: Variable 'slave_net_timeout' is a GLOBAL variable and should be set '#------------------FN_DYNVARS_146_05-----------------------#' SET @@global.slave_net_timeout = -1; Warnings: -Warning 1292 Truncated incorrect slave_net_timeout value: '0' +Warning 1292 Truncated incorrect slave_net_timeout value: '-1' SELECT @@global.slave_net_timeout; @@global.slave_net_timeout 1 SET @@global.slave_net_timeout = -2147483648; Warnings: -Warning 1292 Truncated incorrect slave_net_timeout value: '0' +Warning 1292 Truncated incorrect slave_net_timeout value: '-2147483648' SELECT @@global.slave_net_timeout; @@global.slave_net_timeout 1 diff --git a/mysql-test/r/slow_launch_time_basic.result b/mysql-test/r/slow_launch_time_basic.result index c42942fba1a..da13af4f4e8 100644 --- a/mysql-test/r/slow_launch_time_basic.result +++ b/mysql-test/r/slow_launch_time_basic.result @@ -36,6 +36,8 @@ SELECT @@global.slow_launch_time; 65536 '#--------------------FN_DYNVARS_150_04-------------------------#' SET @@global.slow_launch_time = -1; +Warnings: +Warning 1292 Truncated incorrect slow_launch_time value: '-1' SELECT @@global.slow_launch_time; @@global.slow_launch_time 0 @@ -57,6 +59,8 @@ SELECT @@global.slow_launch_time; @@global.slow_launch_time 31536000 SET @@global.slow_launch_time = -1024; +Warnings: +Warning 1292 Truncated incorrect slow_launch_time value: '-1024' SELECT @@global.slow_launch_time; @@global.slow_launch_time 0 diff --git a/mysql-test/r/table_definition_cache_basic.result b/mysql-test/r/table_definition_cache_basic.result index 5f0e1960358..612d4138003 100644 --- a/mysql-test/r/table_definition_cache_basic.result +++ b/mysql-test/r/table_definition_cache_basic.result @@ -45,7 +45,7 @@ SELECT @@global.table_definition_cache; 256 SET @@global.table_definition_cache = -1024; Warnings: -Warning 1292 Truncated incorrect table_definition_cache value: '0' +Warning 1292 Truncated incorrect table_definition_cache value: '-1024' SELECT @@global.table_definition_cache; @@global.table_definition_cache 256 diff --git a/mysql-test/r/table_lock_wait_timeout_basic.result b/mysql-test/r/table_lock_wait_timeout_basic.result index 13771980188..a500581c228 100644 --- a/mysql-test/r/table_lock_wait_timeout_basic.result +++ b/mysql-test/r/table_lock_wait_timeout_basic.result @@ -37,13 +37,13 @@ SELECT @@global.table_lock_wait_timeout ; '#--------------------FN_DYNVARS_001_04-------------------------#' SET @@global.table_lock_wait_timeout = -1; Warnings: -Warning 1292 Truncated incorrect table_lock_wait_timeout value: '0' +Warning 1292 Truncated incorrect table_lock_wait_timeout value: '-1' SET @@global.table_lock_wait_timeout= 100000000000; Warnings: Warning 1292 Truncated incorrect table_lock_wait_timeout value: '100000000000' SET @@global.table_lock_wait_timeout= -1024; Warnings: -Warning 1292 Truncated incorrect table_lock_wait_timeout value: '0' +Warning 1292 Truncated incorrect table_lock_wait_timeout value: '-1024' SET @@global.table_lock_wait_timeout= 0; Warnings: Warning 1292 Truncated incorrect table_lock_wait_timeout value: '0' diff --git a/mysql-test/r/table_open_cache_basic.result b/mysql-test/r/table_open_cache_basic.result index ca02d32386f..080bcb6537e 100644 --- a/mysql-test/r/table_open_cache_basic.result +++ b/mysql-test/r/table_open_cache_basic.result @@ -39,7 +39,7 @@ SELECT @@global.table_open_cache ; '#--------------------FN_DYNVARS_001_04-------------------------#' SET @@global.table_open_cache = -1; Warnings: -Warning 1292 Truncated incorrect table_open_cache value: '0' +Warning 1292 Truncated incorrect table_open_cache value: '-1' SELECT @@global.table_open_cache ; @@global.table_open_cache 1 @@ -51,7 +51,7 @@ SELECT @@global.table_open_cache ; 524288 SET @@global.table_open_cache = -1024; Warnings: -Warning 1292 Truncated incorrect table_open_cache value: '0' +Warning 1292 Truncated incorrect table_open_cache value: '-1024' SELECT @@global.table_open_cache ; @@global.table_open_cache 1 diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index ac78d8e1871..9fe565f938c 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -703,7 +703,7 @@ VARIABLE_NAME VARIABLE_VALUE MYISAM_DATA_POINTER_SIZE 7 SET GLOBAL table_open_cache=-1; Warnings: -Warning 1292 Truncated incorrect table_open_cache value: '0' +Warning 1292 Truncated incorrect table_open_cache value: '-1' SHOW VARIABLES LIKE 'table_open_cache'; Variable_name Value table_open_cache 1 @@ -1337,3 +1337,36 @@ SET @@session.thread_stack= 7; ERROR HY000: Variable 'thread_stack' is a read only variable SET @@global.thread_stack= 7; ERROR HY000: Variable 'thread_stack' is a read only variable +SELECT @@global.expire_logs_days INTO @old_eld; +SET GLOBAL expire_logs_days = -1; +Warnings: +Warning 1292 Truncated incorrect expire_logs_days value: '-1' +needs to've been adjusted (0) +SELECT @@global.expire_logs_days; +@@global.expire_logs_days +0 +SET GLOBAL expire_logs_days = 11; +SET @old_mode=@@sql_mode; +SET SESSION sql_mode = 'TRADITIONAL'; +SET GLOBAL expire_logs_days = 100; +ERROR 42000: Variable 'expire_logs_days' can't be set to the value of '100' +needs to be unchanged (11) +SELECT @@global.expire_logs_days; +@@global.expire_logs_days +11 +SET SESSION sql_mode = @old_mode; +SET GLOBAL expire_logs_days = 100; +Warnings: +Warning 1292 Truncated incorrect expire_logs_days value: '100' +needs to've been adjusted (99) +SELECT @@global.expire_logs_days; +@@global.expire_logs_days +99 +SET GLOBAL expire_logs_days = 11; +SET GLOBAL expire_logs_days = 99; +needs to pass with no warnings (99) +SELECT @@global.expire_logs_days; +@@global.expire_logs_days +99 +SET GLOBAL expire_logs_days = @old_eld; +End of 5.1 tests -- cgit v1.2.1 From 071cfc03b7fb706b9262b58a794c6a8871592c3e Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 5 Feb 2009 17:03:47 +0400 Subject: BUG#39185 - Cardinality for merge tables calculated incorrectly. Every subsequent query to a merge table with indexes was lowering down cardinality. The problem was that key statistics was not cleared when merge children were detached. Causing next attach children perform incremental key statistics calculation. Fixed by clearing key statistics when attaching first child. mysql-test/r/merge.result: A test case for BUG#39185. mysql-test/t/merge.test: A test case for BUG#39185. storage/myisammrg/myrg_open.c: Clear key statistics when we're attaching first child, even if it's buffer was allocated before. This is needed because detach_children() doesn't clear statistics, causing incremental statistics calculation. --- mysql-test/r/merge.result | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 9ab982a6688..b3d73f1225f 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -2041,4 +2041,23 @@ EXPLAIN SELECT COUNT(*) FROM t4; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away DROP TABLE t1, t2, t3, t4; +CREATE TABLE t1(a INT, KEY(a)); +INSERT INTO t1 VALUES(0),(1),(2),(3),(4); +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +CREATE TABLE m1(a INT, KEY(a)) ENGINE=MERGE UNION=(t1); +SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1'; +CARDINALITY +5 +SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1'; +CARDINALITY +5 +SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1'; +CARDINALITY +5 +SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='m1'; +CARDINALITY +5 +DROP TABLE t1, m1; End of 5.1 tests -- cgit v1.2.1 From 41e6a1f89c943083e46fba9f548333629eefbbd9 Mon Sep 17 00:00:00 2001 From: Matthias Leich Date: Thu, 5 Feb 2009 21:47:23 +0100 Subject: 2. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default - If missing: add "disconnect " - If physical disconnect of non "default" sessions is not finished at test end: add routine which waits till this happened + additional improvements - remove superfluous files created by the test - replace error numbers by error names - remove trailing spaces, replace tabs by spaces - unify writing of bugs within comments - correct comments - minor changes of formatting Fixed tests: backup check compress grant information_schema multi_update overflow packet query_cache_not_embedded sp-threads subselect synchronization timezone_grant --- mysql-test/r/backup.result | 2 +- mysql-test/r/check.result | 3 +- mysql-test/r/grant.result | 32 ++-- mysql-test/r/information_schema.result | 22 +-- mysql-test/r/multi_update.result | 10 +- mysql-test/r/packet.result | 4 + mysql-test/r/query_cache_notembedded.result | 16 ++ mysql-test/r/subselect.result | 218 ++++++++++++++-------------- mysql-test/r/synchronization.result | 44 +++--- 9 files changed, 186 insertions(+), 165 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result index 14313ba490f..f5a649d27a5 100644 --- a/mysql-test/r/backup.result +++ b/mysql-test/r/backup.result @@ -1,5 +1,5 @@ set SQL_LOG_BIN=0; -drop table if exists t1, t2, t3; +drop table if exists t1, t2, t3, t4; create table t4(n int); backup table t4 to '../bogus'; Table Op Msg_type Msg_text diff --git a/mysql-test/r/check.result b/mysql-test/r/check.result index 03219d0977e..0bff34dba20 100644 --- a/mysql-test/r/check.result +++ b/mysql-test/r/check.result @@ -1,4 +1,5 @@ -drop table if exists t1; +drop table if exists t1,t2; +drop view if exists v1; create table t1(n int not null, key(n), key(n), key(n), key(n)); check table t1 extended; insert into t1 values (200000); diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index ee328d461ac..97945a702d8 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -162,7 +162,7 @@ Warnings: Warning 1364 Field 'ssl_cipher' doesn't have a default value Warning 1364 Field 'x509_issuer' doesn't have a default value Warning 1364 Field 'x509_subject' doesn't have a default value -insert into mysql.db (host, db, user, select_priv) values +insert into mysql.db (host, db, user, select_priv) values ('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y'); alter table mysql.db order by db asc; flush privileges; @@ -262,7 +262,7 @@ drop user mysqltest_1@localhost; SET NAMES koi8r; CREATE DATABASE ; USE ; -CREATE TABLE ( int); +CREATE TABLE ( INT); GRANT SELECT ON .* TO @localhost; SHOW GRANTS FOR @localhost; Grants for @localhost @@ -381,21 +381,21 @@ grant update (a) on mysqltest_1.t1 to mysqltest_3@localhost; grant select (b) on mysqltest_1.t2 to mysqltest_3@localhost; grant select (c) on mysqltest_2.t1 to mysqltest_3@localhost; grant update (d) on mysqltest_2.t2 to mysqltest_3@localhost; -SELECT * FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES -WHERE GRANTEE = '''mysqltest_3''@''localhost''' -ORDER BY TABLE_NAME,COLUMN_NAME,PRIVILEGE_TYPE; +SELECT * FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES +WHERE GRANTEE = '''mysqltest_3''@''localhost''' + ORDER BY TABLE_NAME,COLUMN_NAME,PRIVILEGE_TYPE; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_3'@'localhost' NULL mysqltest_1 t1 a UPDATE NO 'mysqltest_3'@'localhost' NULL mysqltest_2 t1 c SELECT NO 'mysqltest_3'@'localhost' NULL mysqltest_1 t2 b SELECT NO 'mysqltest_3'@'localhost' NULL mysqltest_2 t2 d UPDATE NO SELECT * FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES -WHERE GRANTEE = '''mysqltest_3''@''localhost''' -ORDER BY TABLE_NAME,PRIVILEGE_TYPE; +WHERE GRANTEE = '''mysqltest_3''@''localhost''' + ORDER BY TABLE_NAME,PRIVILEGE_TYPE; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE SELECT * from INFORMATION_SCHEMA.SCHEMA_PRIVILEGES -WHERE GRANTEE = '''mysqltest_3''@''localhost''' -ORDER BY TABLE_SCHEMA,PRIVILEGE_TYPE; +WHERE GRANTEE = '''mysqltest_3''@''localhost''' + ORDER BY TABLE_SCHEMA,PRIVILEGE_TYPE; GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE SELECT * from INFORMATION_SCHEMA.USER_PRIVILEGES WHERE GRANTEE = '''mysqltest_3''@''localhost''' @@ -880,11 +880,11 @@ flush privileges; drop table t2; drop table t1; CREATE DATABASE mysqltest3; -use mysqltest3; +USE mysqltest3; CREATE TABLE t_nn (c1 INT); CREATE VIEW v_nn AS SELECT * FROM t_nn; CREATE DATABASE mysqltest2; -use mysqltest2; +USE mysqltest2; CREATE TABLE t_nn (c1 INT); CREATE VIEW v_nn AS SELECT * FROM t_nn; CREATE VIEW v_yn AS SELECT * FROM t_nn; @@ -954,7 +954,7 @@ DROP TABLE mysqltest3.t_nn; DROP DATABASE mysqltest3; REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'mysqltest_1'@'localhost'; DROP USER 'mysqltest_1'@'localhost'; -use test; +USE test; create user mysqltest1_thisisreallytoolong; ERROR HY000: String 'mysqltest1_thisisreallytoolong' is too long for user name (should be no longer than 16) GRANT CREATE ON mysqltest.* TO 1234567890abcdefGHIKL@localhost; @@ -1106,16 +1106,16 @@ DROP DATABASE mysqltest1; DROP DATABASE mysqltest2; DROP USER mysqltest_1@localhost; DROP USER mysqltest_2@localhost; -use test; +USE test; CREATE TABLE t1 (f1 int, f2 int); INSERT INTO t1 VALUES(1,1), (2,2); CREATE DATABASE db27878; GRANT UPDATE(f1) ON t1 TO 'mysqltest_1'@'localhost'; GRANT SELECT ON `test`.* TO 'mysqltest_1'@'localhost'; GRANT ALL ON db27878.* TO 'mysqltest_1'@'localhost'; -use db27878; +USE db27878; CREATE SQL SECURITY INVOKER VIEW db27878.v1 AS SELECT * FROM test.t1; -use db27878; +USE db27878; UPDATE v1 SET f2 = 4; ERROR HY000: View 'db27878.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them SELECT * FROM test.t1; @@ -1127,7 +1127,7 @@ REVOKE SELECT ON `test`.* FROM 'mysqltest_1'@'localhost'; REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost'; DROP USER mysqltest_1@localhost; DROP DATABASE db27878; -use test; +USE test; DROP TABLE t1; drop table if exists test; Warnings: diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index d7ff87bd1eb..38c8d748870 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -75,7 +75,7 @@ t2 t3 t5 v1 -select c,table_name from v1 +select c,table_name from v1 inner join information_schema.TABLES v2 on (v1.c=v2.table_name) where v1.c like "t%"; c table_name @@ -94,7 +94,7 @@ t4 t4 t2 t2 t3 t3 t5 t5 -select c,table_name from v1 +select c,table_name from v1 left join information_schema.TABLES v2 on (v1.c=v2.table_name) where v1.c like "t%"; c table_name @@ -173,7 +173,7 @@ a int(11) YES NULL create view mysqltest.v1 (c) as select a from mysqltest.t1; grant select (a) on mysqltest.t1 to mysqltest_2@localhost; grant select on mysqltest.v1 to mysqltest_3; -select table_name, column_name, privileges from information_schema.columns +select table_name, column_name, privileges from information_schema.columns where table_schema = 'mysqltest' and table_name = 't1'; table_name column_name privileges t1 a select @@ -249,7 +249,7 @@ begin select * from t1; select * from t2; end| -select parameter_style, sql_data_access, dtd_identifier +select parameter_style, sql_data_access, dtd_identifier from information_schema.routines; parameter_style sql_data_access dtd_identifier SQL CONTAINS SQL NULL @@ -280,7 +280,7 @@ sub1 sub1 select count(*) from information_schema.ROUTINES; count(*) 2 -create view v1 as select routine_schema, routine_name from information_schema.routines +create view v1 as select routine_schema, routine_name from information_schema.routines order by routine_schema, routine_name; select * from v1; routine_schema routine_name @@ -532,7 +532,7 @@ drop view v1; create table t1(a NUMERIC(5,3), b NUMERIC(5,1), c float(5,2), d NUMERIC(6,4), e float, f DECIMAL(6,3), g int(11), h DOUBLE(10,3), i DOUBLE); -select COLUMN_NAME,COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH, +select COLUMN_NAME,COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE from information_schema.columns where table_name= 't1'; COLUMN_NAME COLUMN_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE @@ -589,7 +589,7 @@ TABLE_NAME= "vo"; CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME drop view vo; select TABLE_NAME,TABLE_TYPE,ENGINE -from information_schema.tables +from information_schema.tables where table_schema='information_schema' limit 2; TABLE_NAME TABLE_TYPE ENGINE CHARACTER_SETS SYSTEM VIEW MEMORY @@ -700,7 +700,7 @@ where table_schema="information_schema" and table_name="COLUMNS" and column_type varchar(64) varchar(64) -select TABLE_ROWS from information_schema.tables where +select TABLE_ROWS from information_schema.tables where table_schema="information_schema" and table_name="COLUMNS"; TABLE_ROWS NULL @@ -733,7 +733,7 @@ count(*) drop view a2, a1; drop table t_crashme; select table_schema,table_name, column_name from -information_schema.columns +information_schema.columns where data_type = 'longtext'; table_schema table_name column_name information_schema COLUMNS COLUMN_DEFAULT @@ -755,7 +755,7 @@ TABLES UPDATE_TIME datetime TABLES CHECK_TIME datetime TRIGGERS CREATED datetime SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES A -WHERE NOT EXISTS +WHERE NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS B WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA AND A.TABLE_NAME = B.TABLE_NAME); @@ -784,7 +784,7 @@ x_float NULL NULL x_double_precision NULL NULL drop table t1; grant select on test.* to mysqltest_4@localhost; -SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS +SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS where COLUMN_NAME='TABLE_NAME'; TABLE_NAME COLUMN_NAME PRIVILEGES COLUMNS TABLE_NAME select diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index b85fb559e8c..f6dbac31c2a 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -375,7 +375,7 @@ update t2, t1 set t2.field=t1.field where t1.id1=t2.id2 and 0=1; delete t1, t2 from t2 inner join t1 on t1.id1=t2.id2 where 0=1; -delete t1, t2 from t2,t1 +delete t1, t2 from t2,t1 where t1.id1=t2.id2 and 0=1; drop table t1,t2; CREATE TABLE t1 ( a int ); @@ -443,12 +443,12 @@ delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2 ERROR HY000: You can't specify target table 't1' for update in FROM clause drop table t1,t2; create table t1 ( -aclid bigint not null primary key, -status tinyint(1) not null +aclid bigint not null primary key, +status tinyint(1) not null ) engine = innodb; create table t2 ( -refid bigint not null primary key, -aclid bigint, index idx_acl(aclid) +refid bigint not null primary key, +aclid bigint, index idx_acl(aclid) ) engine = innodb; insert into t2 values(1,null); delete t2, t1 from t2 left join t1 on (t2.aclid=t1.aclid) where t2.refid='1'; diff --git a/mysql-test/r/packet.result b/mysql-test/r/packet.result index df0d9ff9adc..5cc63c4690d 100644 --- a/mysql-test/r/packet.result +++ b/mysql-test/r/packet.result @@ -1,3 +1,5 @@ +set @max_allowed_packet=@@global.max_allowed_packet; +set @net_buffer_length=@@global.net_buffer_length; set global max_allowed_packet=100; Warnings: Warning 1292 Truncated incorrect max_allowed_packet value: '100' @@ -33,3 +35,5 @@ len select length(repeat('a',2000)); length(repeat('a',2000)) 2000 +set global max_allowed_packet=@max_allowed_packet; +set global net_buffer_length=@net_buffer_length; diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result index 8e5df012cfb..bf582bfaec6 100644 --- a/mysql-test/r/query_cache_notembedded.result +++ b/mysql-test/r/query_cache_notembedded.result @@ -345,3 +345,19 @@ id drop table t1; drop function f1; set GLOBAL query_cache_size=0; +DROP TABLE IF EXISTS t1; +FLUSH STATUS; +SET GLOBAL query_cache_size=1048576; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +LOCK TABLES t1 WRITE; +SELECT * FROM t1; +UNLOCK TABLES; +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +DROP TABLE t1; +SET GLOBAL query_cache_size= default; diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 8830ea11f97..671e5d8f532 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -192,11 +192,11 @@ select (select a from t3 where a1) as tt; (select t3.a from t3 where a<8 order by 1 desc limit 1) a 7 2 -explain extended select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from +explain extended select (select t3.a from t3 where a<8 order by 1 desc limit 1), a from (select * from t2 where a>1) as tt; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY system NULL NULL NULL NULL 1 @@ -2303,20 +2303,20 @@ drop table t1,t2; CREATE TABLE t1 ( a int, b int ); CREATE TABLE t2 ( c int, d int ); INSERT INTO t1 VALUES (1,2), (2,3), (3,4); -SELECT a AS abc, b FROM t1 outr WHERE b = +SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a); abc b 1 2 2 3 3 4 -INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b = +INSERT INTO t2 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a); select * from t2; c d 1 2 2 3 3 4 -CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b = +CREATE TABLE t3 SELECT a AS abc, b FROM t1 outr WHERE b = (SELECT MIN(b) FROM t1 WHERE a=outr.a); select * from t3; abc b @@ -2517,8 +2517,8 @@ INSERT INTO t1 VALUES ('ASM','American Samoa','Oceania','Polynesia',199.00,0,680 INSERT INTO t1 VALUES ('ATF','French Southern territories','Antarctica','Antarctica',7780.00,0,0,NULL,0.00,NULL,'Terres australes françaises','Nonmetropolitan Territory of France','Jacques Chirac',NULL,'TF'); INSERT INTO t1 VALUES ('UMI','United States Minor Outlying Islands','Oceania','Micronesia/Caribbean',16.00,0,0,NULL,0.00,NULL,'United States Minor Outlying Islands','Dependent Territory of the US','George W. Bush',NULL,'UM'); /*!40000 ALTER TABLE t1 ENABLE KEYS */; -SELECT DISTINCT Continent AS c FROM t1 outr WHERE -Code <> SOME ( SELECT Code FROM t1 WHERE Continent = outr.Continent AND +SELECT DISTINCT Continent AS c FROM t1 outr WHERE +Code <> SOME ( SELECT Code FROM t1 WHERE Continent = outr.Continent AND Population < 200); c Oceania @@ -2628,32 +2628,32 @@ select count(distinct t2.userid) pass, groupstuff.*, count(t2.courseid) crse, -t1.categoryid, +t1.categoryid, t2.courseid, date_format(date, '%b%y') as colhead -from t2 -join t1 on t2.courseid=t1.courseid +from t2 +join t1 on t2.courseid=t1.courseid join ( -select -t5.userid, -parentid, -parentgroup, -childid, -groupname, -grouptypeid -from t5 -join +select +t5.userid, +parentid, +parentgroup, +childid, +groupname, +grouptypeid +from t5 +join ( -select t4.id as parentid, -t4.name as parentgroup, -t4.id as childid, -t4.name as groupname, -t4.grouptypeid -from t4 -) as gin on t5.groupid=gin.childid -) as groupstuff on t2.userid = groupstuff.userid -group by +select t4.id as parentid, +t4.name as parentgroup, +t4.id as childid, +t4.name as groupname, +t4.grouptypeid +from t4 +) as gin on t5.groupid=gin.childid +) as groupstuff on t2.userid = groupstuff.userid +group by groupstuff.groupname, colhead , t2.courseid; pass userid parentid parentgroup childid groupname grouptypeid crse categoryid courseid colhead 1 5141 12 group2 12 group2 5 1 5 12 Aug04 @@ -2929,9 +2929,9 @@ INSERT INTO t1 VALUES("0037", "1", "2005-12-06 12:18:56"); INSERT INTO t1 VALUES("0037", "2", "2006-01-06 12:25:53"); INSERT INTO t1 VALUES("0048", "1", "2006-01-06 12:37:50"); INSERT INTO t1 VALUES("0059", "1", "2006-01-06 12:37:50"); -select * from t1 r1 -where (r1.retailerID,(r1.changed)) in -(SELECT r2.retailerId,(max(changed)) from t1 r2 +select * from t1 r1 +where (r1.retailerID,(r1.changed)) in +(SELECT r2.retailerId,(max(changed)) from t1 r2 group by r2.retailerId); retailerID statusID changed 0026 2 2006-01-06 12:25:53 @@ -2943,41 +2943,41 @@ create table t1(a int, primary key (a)); insert into t1 values (10); create table t2 (a int primary key, b varchar(32), c int, unique key b(c, b)); insert into t2(a, c, b) values (1,10,'359'), (2,10,'35988'), (3,10,'35989'); -explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r -ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' -ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10; +explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 1 PRIMARY r const PRIMARY PRIMARY 4 const 1 2 DEPENDENT SUBQUERY t2 range b b 40 NULL 2 Using where -SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r -ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' -ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10; +SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10; a a b 10 3 35989 -explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r -ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' -ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10; +explain SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 system PRIMARY NULL NULL NULL 1 1 PRIMARY r const PRIMARY PRIMARY 4 const 1 2 DEPENDENT SUBQUERY t2 range b b 40 NULL 2 Using where -SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r -ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' -ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10; +SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r +ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899' + ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10; a a b 10 1 359 drop table t1,t2; -CREATE TABLE t1 ( -field1 int NOT NULL, -field2 int NOT NULL, -field3 int NOT NULL, -PRIMARY KEY (field1,field2,field3) +CREATE TABLE t1 ( +field1 int NOT NULL, +field2 int NOT NULL, +field3 int NOT NULL, +PRIMARY KEY (field1,field2,field3) ); -CREATE TABLE t2 ( -fieldA int NOT NULL, -fieldB int NOT NULL, -PRIMARY KEY (fieldA,fieldB) +CREATE TABLE t2 ( +fieldA int NOT NULL, +fieldB int NOT NULL, +PRIMARY KEY (fieldA,fieldB) ); INSERT INTO t1 VALUES (1,1,1), (1,1,2), (1,2,1), (1,2,2), (1,2,3), (1,3,1); @@ -2991,14 +2991,14 @@ field1 field2 COUNT(*) SELECT field1, field2 FROM t1 GROUP BY field1, field2 -HAVING COUNT(*) >= ALL (SELECT fieldB +HAVING COUNT(*) >= ALL (SELECT fieldB FROM t2 WHERE fieldA = field1); field1 field2 1 2 SELECT field1, field2 FROM t1 GROUP BY field1, field2 -HAVING COUNT(*) < ANY (SELECT fieldB +HAVING COUNT(*) < ANY (SELECT fieldB FROM t2 WHERE fieldA = field1); field1 field2 1 1 @@ -3021,8 +3021,8 @@ a a IN (SELECT a FROM t1) DROP TABLE t1,t2; CREATE TABLE t1 (a DATETIME); INSERT INTO t1 VALUES ('1998-09-23'), ('2003-03-25'); -CREATE TABLE t2 AS SELECT -(SELECT a FROM t1 WHERE a < '2000-01-01') AS sub_a +CREATE TABLE t2 AS SELECT +(SELECT a FROM t1 WHERE a < '2000-01-01') AS sub_a FROM t1 WHERE a > '2000-01-01'; SHOW CREATE TABLE t2; Table Create Table @@ -3188,7 +3188,7 @@ INSERT INTO t2 VALUES ( 6 ); CREATE TABLE t3 ( c3 integer ); INSERT INTO t3 VALUES ( 7 ); INSERT INTO t3 VALUES ( 8 ); -SELECT c1,c2 FROM t1 LEFT JOIN t2 ON c1 = c2 +SELECT c1,c2 FROM t1 LEFT JOIN t2 ON c1 = c2 WHERE EXISTS (SELECT c3 FROM t3 WHERE c2 IS NULL ); c1 c2 2 NULL @@ -3231,20 +3231,20 @@ E1 DROP TABLE t1,t2; CREATE TABLE t1(select_id BIGINT, values_id BIGINT); INSERT INTO t1 VALUES (1, 1); -CREATE TABLE t2 (select_id BIGINT, values_id BIGINT, +CREATE TABLE t2 (select_id BIGINT, values_id BIGINT, PRIMARY KEY(select_id,values_id)); INSERT INTO t2 VALUES (0, 1), (0, 2), (0, 3), (1, 5); -SELECT values_id FROM t1 +SELECT values_id FROM t1 WHERE values_id IN (SELECT values_id FROM t2 WHERE select_id IN (1, 0)); values_id 1 -SELECT values_id FROM t1 +SELECT values_id FROM t1 WHERE values_id IN (SELECT values_id FROM t2 WHERE select_id BETWEEN 0 AND 1); values_id 1 -SELECT values_id FROM t1 +SELECT values_id FROM t1 WHERE values_id IN (SELECT values_id FROM t2 WHERE select_id = 0 OR select_id = 1); values_id @@ -3259,7 +3259,7 @@ drop table t1; CREATE TABLE t1 (a int, b int); CREATE TABLE t2 (c int, d int); CREATE TABLE t3 (e int); -INSERT INTO t1 VALUES +INSERT INTO t1 VALUES (1,10), (2,10), (1,20), (2,20), (3,20), (2,30), (4,40); INSERT INTO t2 VALUES (2,10), (2,20), (4,10), (5,10), (3,20), (2,40); @@ -3322,7 +3322,7 @@ a 2 SELECT a FROM t1 GROUP BY a HAVING a IN (SELECT c FROM t2 -WHERE MIN(b) < d AND +WHERE MIN(b) < d AND EXISTS(SELECT e FROM t3 WHERE MAX(b)=e AND e <= d)); a 2 @@ -3373,7 +3373,7 @@ a 4 SELECT t1.a FROM t1 GROUP BY t1.a HAVING t1.a > ALL(SELECT t2.c FROM t2 -WHERE EXISTS(SELECT t3.e FROM t3 +WHERE EXISTS(SELECT t3.e FROM t3 WHERE SUM(t1.a+t2.c) < t3.e/4)); ERROR HY000: Invalid use of group function SELECT t1.a from t1 GROUP BY t1.a HAVING AVG(SUM(t1.b)) > 20; @@ -3486,7 +3486,7 @@ mid bigint(20) unsigned NOT NULL, date date NOT NULL, PRIMARY KEY (id) ); -INSERT INTO t2 VALUES +INSERT INTO t2 VALUES (1, 1, '2006-03-30'), (2, 2, '2006-04-06'), (3, 3, '2006-04-13'), (4, 2, '2006-04-20'), (5, 1, '2006-05-01'); SELECT *, @@ -3524,7 +3524,7 @@ i2 int(11) NOT NULL default '0', t datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (i1,i2,t) ); -INSERT INTO t1 VALUES +INSERT INTO t1 VALUES (24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'), (24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'), (24,1,'2005-05-27 12:40:25'),(24,1,'2005-05-27 12:40:30'), @@ -3540,7 +3540,7 @@ PRIMARY KEY (i1) INSERT INTO t2 VALUES (24,1,'2006-06-20 12:29:40'); EXPLAIN SELECT * FROM t1,t2 -WHERE t1.t = (SELECT t1.t FROM t1 +WHERE t1.t = (SELECT t1.t FROM t1 WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1 ORDER BY t1.t DESC LIMIT 1); id select_type table type possible_keys key key_len ref rows Extra @@ -3548,7 +3548,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 index NULL PRIMARY 16 NULL 11 Using where; Using index 2 DEPENDENT SUBQUERY t1 range PRIMARY PRIMARY 16 NULL 5 Using where; Using index SELECT * FROM t1,t2 -WHERE t1.t = (SELECT t1.t FROM t1 +WHERE t1.t = (SELECT t1.t FROM t1 WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1 ORDER BY t1.t DESC LIMIT 1); i1 i2 t i1 i2 t @@ -3557,22 +3557,22 @@ DROP TABLE t1, t2; CREATE TABLE t1 (i INT); (SELECT i FROM t1) UNION (SELECT i FROM t1); i -SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS +SELECT sql_no_cache * FROM t1 WHERE NOT EXISTS ( -(SELECT i FROM t1) UNION +(SELECT i FROM t1) UNION (SELECT i FROM t1) ); -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 'UNION +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 'UNION (SELECT i FROM t1) )' at line 3 -SELECT * FROM t1 +SELECT * FROM t1 WHERE NOT EXISTS (((SELECT i FROM t1) UNION (SELECT i FROM t1))); 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 'UNION (SELECT i FROM t1)))' at line 2 explain select ((select t11.i from t1 t11) union (select t12.i from t1 t12)) from t1; 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 'union (select t12.i from t1 t12)) from t1' at line 1 -explain select * from t1 where not exists +explain select * from t1 where not exists ((select t11.i from t1 t11) union (select t12.i from t1 t12)); 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 'union (select t12.i from t1 t12))' at line 2 DROP TABLE t1; @@ -3591,9 +3591,9 @@ insert into t1 (a) select FLOOR(rand() * 100) from t1; insert into t1 (a) select FLOOR(rand() * 100) from t1; insert into t1 (a) select FLOOR(rand() * 100) from t1; insert into t1 (a) select FLOOR(rand() * 100) from t1; -SELECT a, -(SELECT REPEAT(' ',250) FROM t1 i1 -WHERE i1.b=t1.a ORDER BY RAND() LIMIT 1) AS a +SELECT a, +(SELECT REPEAT(' ',250) FROM t1 i1 +WHERE i1.b=t1.a ORDER BY RAND() LIMIT 1) AS a FROM t1 ORDER BY a LIMIT 5; a a 0 NULL @@ -3622,7 +3622,7 @@ COUNT(DISTINCT t1.b) (SELECT COUNT(DISTINCT t1.b)) 2 2 1 1 1 1 -SELECT COUNT(DISTINCT t1.b), +SELECT COUNT(DISTINCT t1.b), (SELECT COUNT(DISTINCT t1.b) union select 1 from DUAL where 12 < 3) FROM t1 GROUP BY t1.a; COUNT(DISTINCT t1.b) (SELECT COUNT(DISTINCT t1.b) union select 1 from DUAL where 12 < 3) @@ -3633,7 +3633,7 @@ SELECT ( SELECT ( SELECT COUNT(DISTINCT t1.b) ) -) +) FROM t1 GROUP BY t1.a; ( SELECT ( @@ -3648,8 +3648,8 @@ SELECT ( SELECT ( SELECT COUNT(DISTINCT t1.b) ) -) -FROM t1 GROUP BY t1.a LIMIT 1) +) +FROM t1 GROUP BY t1.a LIMIT 1) FROM t1 t2 GROUP BY t2.a; ( @@ -3657,7 +3657,7 @@ SELECT ( SELECT ( SELECT COUNT(DISTINCT t1.b) ) -) +) FROM t1 GROUP BY t1.a LIMIT 1) 2 2 @@ -3669,13 +3669,13 @@ PRIMARY KEY (x), FOREIGN KEY (y) REFERENCES t1 (b)); SET SESSION sort_buffer_size = 32 * 1024; Warnings: Warning 1292 Truncated incorrect sort_buffer_size value: '32768' -SELECT SQL_NO_CACHE COUNT(*) +SELECT SQL_NO_CACHE COUNT(*) FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c FROM t1) t; COUNT(*) 3000 SET SESSION sort_buffer_size = 8 * 1024 * 1024; -SELECT SQL_NO_CACHE COUNT(*) +SELECT SQL_NO_CACHE COUNT(*) FROM (SELECT a, b, (SELECT x FROM t2 WHERE y=b ORDER BY z DESC LIMIT 1) c FROM t1) t; COUNT(*) @@ -3736,7 +3736,7 @@ sq 2 4 DEALLOCATE PREPARE stmt1; -SELECT f2, AVG(f21), +SELECT f2, AVG(f21), (SELECT t.f3 FROM t2 AS t WHERE t2.f2=t.f2 AND t.f3=MAX(t2.f3)) AS test FROM t2 GROUP BY f2; f2 AVG(f21) test @@ -3744,12 +3744,12 @@ f2 AVG(f21) test 2 2.0000 2004-02-29 11:11:11 DROP TABLE t1,t2; CREATE TABLE t1 (a int, b INT, c CHAR(10) NOT NULL); -INSERT INTO t1 VALUES -(1,1,'a'), (1,2,'b'), (1,3,'c'), (1,4,'d'), (1,5,'e'), -(2,1,'f'), (2,2,'g'), (2,3,'h'), (3,4,'i'), (3,3,'j'), +INSERT INTO t1 VALUES +(1,1,'a'), (1,2,'b'), (1,3,'c'), (1,4,'d'), (1,5,'e'), +(2,1,'f'), (2,2,'g'), (2,3,'h'), (3,4,'i'), (3,3,'j'), (3,2,'k'), (3,1,'l'), (1,9,'m'); -SELECT a, MAX(b), -(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b)) AS test +SELECT a, MAX(b), +(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b)) AS test FROM t1 GROUP BY a; a MAX(b) test 1 9 m @@ -3900,7 +3900,7 @@ COUNT(*) a (SELECT MIN(m) FROM t2 WHERE m = count(*)) 2 2 2 3 3 3 1 4 1 -SELECT COUNT(*), a +SELECT COUNT(*), a FROM t1 GROUP BY a HAVING (SELECT MIN(m) FROM t2 WHERE m = count(*)) > 1; COUNT(*) a @@ -3931,7 +3931,7 @@ INSERT INTO t1 VALUES (1,1,0,'a'), (1,2,0,'b'), (1,3,0,'c'), (1,4,0,'d'), (1,5,0,'e'), (2,1,0,'f'), (2,2,0,'g'), (2,3,0,'h'), (3,4,0,'i'), (3,3,0,'j'), (3,2,0,'k'), (3,1,0,'l'), (1,9,0,'m'), (1,0,10,'n'), (2,0,5,'o'), (3,0,7,'p'); SELECT a, MAX(b), -(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b + 0)) as test +(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b + 0)) as test FROM t1 GROUP BY a; a MAX(b) test 1 9 m @@ -3953,7 +3953,7 @@ a AVG(b) test 3 2.5000 NULL SELECT tt.a, (SELECT (SELECT c FROM t1 as t WHERE t1.a=t.a AND t.d=MAX(t1.b + tt.a) -LIMIT 1) FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1) as test +LIMIT 1) FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1) as test FROM t1 as tt; a test 1 n @@ -3975,7 +3975,7 @@ a test SELECT tt.a, (SELECT (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.d=MAX(t1.b + tt.a) LIMIT 1) -FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1) as test +FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1) as test FROM t1 as tt GROUP BY tt.a; a test 1 n @@ -3984,7 +3984,7 @@ a test SELECT tt.a, MAX( (SELECT (SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.d=MAX(t1.b + tt.a) LIMIT 1) -FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1)) as test +FROM t1 WHERE t1.a=tt.a GROUP BY a LIMIT 1)) as test FROM t1 as tt GROUP BY tt.a; a test 1 n @@ -4027,11 +4027,11 @@ COUNT(1) 1 SELECT SUM( (SELECT AVG( (SELECT t1.a FROM t2) ) FROM DUAL) ) FROM t1; ERROR HY000: Invalid use of group function -SELECT +SELECT SUM( (SELECT AVG( (SELECT COUNT(*) FROM t1 t HAVING t1.a < 12) ) FROM t2) ) FROM t1; ERROR HY000: Invalid use of group function -SELECT t1.a as XXA, +SELECT t1.a as XXA, SUM( (SELECT AVG( (SELECT COUNT(*) FROM t1 t HAVING XXA < 12) ) FROM t2) ) FROM t1; ERROR HY000: Invalid use of group function @@ -4048,25 +4048,25 @@ INSERT INTO t1 VALUES (3,'FL'), (2,'GA'), (4,'FL'), (1,'GA'), (5,'NY'), (7,'FL'), (6,'NY'); CREATE TABLE t2 (id int NOT NULL, INDEX idx(id)); INSERT INTO t2 VALUES (7), (5), (1), (3); -SELECT id, st FROM t1 +SELECT id, st FROM t1 WHERE st IN ('GA','FL') AND EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id); id st 3 FL 1 GA 7 FL -SELECT id, st FROM t1 +SELECT id, st FROM t1 WHERE st IN ('GA','FL') AND EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id) GROUP BY id; id st 1 GA 3 FL 7 FL -SELECT id, st FROM t1 +SELECT id, st FROM t1 WHERE st IN ('GA','FL') AND NOT EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id); id st 2 GA 4 FL -SELECT id, st FROM t1 +SELECT id, st FROM t1 WHERE st IN ('GA','FL') AND NOT EXISTS(SELECT 1 FROM t2 WHERE t2.id=t1.id) GROUP BY id; id st @@ -4272,7 +4272,7 @@ a b DROP TABLE t1,t2; CREATE TABLE t1(a INT, b INT); INSERT INTO t1 VALUES (1,1), (1,2), (2,3), (2,4); -EXPLAIN +EXPLAIN SELECT a AS out_a, MIN(b) FROM t1 WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a) GROUP BY a; @@ -4281,7 +4281,7 @@ SELECT a AS out_a, MIN(b) FROM t1 WHERE b > (SELECT MIN(b) FROM t1 WHERE a = out_a) GROUP BY a; ERROR 42S22: Unknown column 'out_a' in 'where clause' -EXPLAIN +EXPLAIN SELECT a AS out_a, MIN(b) FROM t1 t1_outer WHERE b > (SELECT MIN(b) FROM t1 WHERE a = t1_outer.a) GROUP BY a; @@ -4312,16 +4312,16 @@ Warnings: Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1 Note 1003 select 2 AS `2` from `test`.`t1` where exists(select 1 AS `1` from `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`a`)) EXPLAIN EXTENDED -SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION +SELECT 2 FROM t1 WHERE EXISTS ((SELECT 1 FROM t2 WHERE t1.a=t2.a) UNION (SELECT 1 FROM t2 WHERE t1.a = t2.a)); -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 'UNION +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 'UNION (SELECT 1 FROM t2 WHERE t1.a = t2.a))' at line 2 DROP TABLE t1,t2; create table t1(f11 int, f12 int); create table t2(f21 int unsigned not null, f22 int, f23 varchar(10)); insert into t1 values(1,1),(2,2), (3, 3); set session sort_buffer_size= 33*1024; -select count(*) from t1 where f12 = +select count(*) from t1 where f12 = (select f22 from t2 where f22 = f12 order by f21 desc, f22, f23 limit 1); count(*) 3 @@ -4362,12 +4362,12 @@ IF( FROM t2 VPC, t4 a2, t2 a3 WHERE VPC.f4 = a2.f10 AND a3.f2 = a4 -LIMIT 1) IS NULL, -0, +LIMIT 1) IS NULL, +0, t3.f5 ) ) AS a6 -FROM +FROM t2, t3, t1 JOIN t2 a1 ON t1.f9 = a1.f4 GROUP BY a4; a4 f3 a6 @@ -4376,7 +4376,7 @@ a4 f3 a6 DROP TABLE t1, t2, t3, t4; create table t1 (a float(5,4) zerofill); create table t2 (a float(5,4),b float(2,0)); -select t1.a from t1 where +select t1.a from t1 where t1.a= (select b from t2 limit 1) and not t1.a= (select a from t2 limit 1) ; a diff --git a/mysql-test/r/synchronization.result b/mysql-test/r/synchronization.result index 29557b6cfd4..44edfb1e535 100644 --- a/mysql-test/r/synchronization.result +++ b/mysql-test/r/synchronization.result @@ -1,6 +1,6 @@ -drop table if exists t1; -CREATE TABLE t1 (x1 int); -ALTER TABLE t1 CHANGE x1 x2 int; +DROP TABLE IF EXISTS t1,t2; +CREATE TABLE t1 (x1 INT); +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -8,7 +8,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -16,7 +16,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -24,7 +24,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -32,7 +32,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -40,7 +40,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -48,7 +48,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -56,7 +56,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -64,7 +64,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -72,7 +72,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -80,7 +80,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -88,7 +88,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -104,7 +104,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -112,7 +112,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -120,7 +120,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -128,7 +128,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -136,7 +136,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -144,7 +144,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x1 x2 int; +ALTER TABLE t1 CHANGE x1 x2 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table @@ -152,7 +152,7 @@ t2 CREATE TABLE `t2` ( `xx` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t2; -ALTER TABLE t1 CHANGE x2 x1 int; +ALTER TABLE t1 CHANGE x2 x1 INT; CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table -- cgit v1.2.1 From 0fab1a857c12239e8c75e409f2a0c3ba4d021535 Mon Sep 17 00:00:00 2001 From: Matthias Leich Date: Mon, 9 Feb 2009 21:52:40 +0100 Subject: This belongs to the fix for Bug#42003 tests missing the disconnect of connections <> default second slice Content: 1. wait_until_count_sessions.inc - One PB run of a test using this routine failed because 5 seconds timeout were exceeded. Although I have some doubts if the assigned timeout was really too small, I increase the value to 10. We waste the additional 5 seconds only if the tests fails anyway. - Print the content of the PROCESSLIST if the poll routine fails 2. minor improvements of formatting 3. query_cache_notembedded: Activate the wait_until_count_sessions.inc routine which was unfortunately forgotten in the changeset before. --- mysql-test/r/information_schema.result | 2 +- mysql-test/r/subselect.result | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 38c8d748870..6ced6bb373a 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1027,7 +1027,7 @@ BEGIN SELECT 'foo' FROM DUAL; END | ERROR 42000: Unknown database 'information_schema' -select ROUTINE_NAME from routines; +select ROUTINE_NAME from routines; ROUTINE_NAME grant all on information_schema.* to 'user1'@'localhost'; ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 671e5d8f532..0c7f9ae959c 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4407,7 +4407,7 @@ pk a 3 30 2 20 DROP TABLE t1,t2; -CREATE TABLE t1 (s1 char(1)); +CREATE TABLE t1 (s1 CHAR(1)); INSERT INTO t1 VALUES ('a'); SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1); s1 -- cgit v1.2.1 From 0669b79363b940c4673d972d1fa8142c2d3e0823 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 10 Feb 2009 11:58:19 +0200 Subject: Bug #33813: Schema names are case-sensitive in DROP FUNCTION The parser was not using the correct fully-qualified-name production for DROP FUNCTION. Fixed by copying the production from DROP PROCEDURE. Tested in the windows specific suite to make sure it's tested on a case-insensitive file system. mysql-test/r/windows.result: Bug #33813: test case mysql-test/t/windows.test: Bug #33813: test case sql/sql_yacc.yy: Bug #33813: use the correct production for the name in DROP PROCEDURE --- mysql-test/r/windows.result | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result index 5a54db8bb84..43ba878b9a5 100644 --- a/mysql-test/r/windows.result +++ b/mysql-test/r/windows.result @@ -19,4 +19,22 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables 2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used DROP TABLE t1; +CREATE DATABASE `TESTDB`; +USE `TESTDB`; +CREATE FUNCTION test_fn() RETURNS INTEGER +BEGIN +DECLARE rId bigint; +RETURN rId; +END +// +CREATE FUNCTION test_fn2() RETURNS INTEGER +BEGIN +DECLARE rId bigint; +RETURN rId; +END +// +DROP FUNCTION `TESTDB`.`test_fn`; +DROP FUNCTION `testdb`.`test_fn2`; +USE test; +DROP DATABASE `TESTDB`; End of 5.0 tests. -- cgit v1.2.1 From fd8bf58ca972ef3f521aec03c0bd09fa3ec78335 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Tue, 10 Feb 2009 15:38:56 +0300 Subject: Fix for bug #41868: crash or memory overrun with concat + upper, date_format functions String::realloc() did not check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer (i.e.alloced == FALSE). This could lead to memory overruns in some cases. client/sql_string.cc: Fixed String::realloc() to check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer. mysql-test/r/func_str.result: Added a test case for bug #41868. mysql-test/t/func_str.test: Added a test case for bug #41868. sql/sql_class.cc: After each call to Item::send() in select_send::send_data() reset buffer to its original state to reduce unnecessary malloc() calls. See comments for bug #41868 for detailed analysis. sql/sql_string.cc: Fixed String::realloc() to check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer. --- mysql-test/r/func_str.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index c121c8937d7..d7fd8c5c887 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2181,4 +2181,10 @@ def format(a, 2) 253 20 4 Y 0 2 8 format(a, 2) 1.33 drop table t1; +CREATE TABLE t1 (c DATE, aa VARCHAR(30)); +INSERT INTO t1 VALUES ('2008-12-31','aaaaaa'); +SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i FROM t1; +h i +31.12.2008 AAAAAA, aaaaaa +DROP TABLE t1; End of 5.0 tests -- cgit v1.2.1 From 48d4d34689c3fb8b0ba25f775b34ca5472568a33 Mon Sep 17 00:00:00 2001 From: Horst Hunger Date: Wed, 11 Feb 2009 10:27:52 +0100 Subject: Reviewed fix for bug#40882: Replaced "sleep 1" by wait_condition, added save/restore start values and closed open sessions. When trying to use "wait_for_query_to_succeed" a type has been fixed, also in "rename.test": Added session count and check and replaced error numbers. --- mysql-test/r/read_only.result | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index cf81566f4e5..558e0356c5a 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -1,12 +1,18 @@ +set @start_read_only= @@global.read_only; DROP TABLE IF EXISTS t1,t2,t3; grant CREATE, SELECT, DROP on *.* to test@localhost; +connect (con1,localhost,test,,test); +connection default; set global read_only=0; +connection con1; create table t1 (a int); insert into t1 values(1); create table t2 select * from t1; +connection default; set global read_only=1; create table t3 (a int); drop table t3; +connection con1; select @@global.read_only; @@global.read_only 1 @@ -39,13 +45,18 @@ delete t1 from t1,t3 where t1.a=t3.a; drop table t1; insert into t1 values(1); ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +connection default; set global read_only=0; lock table t1 write; +connection con1; lock table t2 write; +connection default; set global read_only=1; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction unlock tables ; +send set global read_only=1; set global read_only=1; +connection con1; select @@global.read_only; @@global.read_only 0 @@ -53,13 +64,20 @@ unlock tables ; select @@global.read_only; @@global.read_only 1 +connection default; +reap; +connection default; set global read_only=0; lock table t1 read; +connection con1; lock table t2 read; +connection default; set global read_only=1; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction unlock tables ; +send set global read_only=1; set global read_only=1; +connection con1; select @@global.read_only; @@global.read_only 0 @@ -67,24 +85,35 @@ unlock tables ; select @@global.read_only; @@global.read_only 1 +connection default; +reap; +connection default; set global read_only=0; BEGIN; +connection con1; BEGIN; +connection default; set global read_only=1; ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction ROLLBACK; set global read_only=1; +connection con1; select @@global.read_only; @@global.read_only 1 ROLLBACK; +connection default; set global read_only=0; flush tables with read lock; set global read_only=1; unlock tables; +connect (root2,localhost,root,,test); +connection default; set global read_only=0; flush tables with read lock; +connection root2; set global read_only=1; +connection default; select @@global.read_only; @@global.read_only 1 @@ -94,6 +123,7 @@ ERROR 42S02: Unknown table 'ttt' drop temporary table if exists ttt; Warnings: Note 1051 Unknown table 'ttt' +connection default; set global read_only=0; drop table t1,t2; drop user test@localhost; @@ -112,16 +142,20 @@ grant all on mysqltest_db2.* to `mysqltest_u1`@`%`; create database mysqltest_db1; grant all on mysqltest_db1.* to `mysqltest_u1`@`%`; flush privileges; +connect (con_bug27440,127.0.0.1,mysqltest_u1,,test,MASTER_MYPORT,); +connection con_bug27440; create database mysqltest_db2; ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement show databases like '%mysqltest_db2%'; Database (%mysqltest_db2%) drop database mysqltest_db1; ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement +disconnect con_bug27440; +connection default; delete from mysql.user where User like 'mysqltest_%'; delete from mysql.db where User like 'mysqltest_%'; delete from mysql.tables_priv where User like 'mysqltest_%'; delete from mysql.columns_priv where User like 'mysqltest_%'; flush privileges; drop database mysqltest_db1; -set global read_only=0; +set global read_only= @start_read_only; -- cgit v1.2.1 From 5803e106282eddbfed171f5d76f5357418d32af7 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Thu, 12 Feb 2009 13:49:44 +0400 Subject: BUG#36737 - having + full text operator crashes mysql MATCH() function accepts column list as an argument. It was possible to override this requirement with aliased non-column select expression. Which results in server crash. With this fix aliased non-column select expressions are not accepted by MATCH() function, returning an error. mysql-test/r/fulltext.result: A test case for BUG#36737. mysql-test/t/fulltext.test: A test case for BUG#36737. sql/item_func.cc: Only accept fields as arguments to MATCH(). --- mysql-test/r/fulltext.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 6821691c9d0..6ea17644f9d 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -506,3 +506,7 @@ SELECT MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) FROM t1; MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE) 2 DROP TABLE t1; +CREATE TABLE t1(a TEXT); +SELECT GROUP_CONCAT(a) AS st FROM t1 HAVING MATCH(st) AGAINST('test' IN BOOLEAN MODE); +ERROR HY000: Incorrect arguments to AGAINST +DROP TABLE t1; -- cgit v1.2.1 From e80537b7912b4790817e3afb6fc3f84f3a82d224 Mon Sep 17 00:00:00 2001 From: V Narayanan Date: Thu, 12 Feb 2009 16:42:07 +0530 Subject: Bug#40675 MySQL 5.1 crash with index merge algorithm and Merge tables A Query in the MyISAM merge table was crashing if the index merge algorithm was being used Index Merge optimization requires the reading of multiple indexes at the same time. Reading multiple indexes at once with current SE API means that we need to have handler instance for each to-be-read index. This is done by creating clones of the handlers instances. The clone internally does a open of the handler. The open for a MERGE engine is handled in the following phases 1) open parent table 2) generate list of underlying table 3) attach underlying tables But the current implementation does only the first phase (i.e.) open parent table. The current patch fixes this at the MERGE engine level, by handling the clone operation within the MERGE engine rather than in the storage engine API. It opens and attaches the MyISAM tables on the MyISAM storage engine interface directly within the MERGE engine. The new MyISAM table instances, as well as the MERGE clone itself, are not visible in the table cache. This is not a problem because all locking is handled by the original MERGE table from which this is cloned of. mysql-test/r/merge.result: updated the result file to reflect the new tests added to test the fix mysql-test/t/merge.test: Added new tests to verify that the index merge algorithm does not crash in the merge engine. storage/myisammrg/ha_myisammrg.cc: Implement the clone method, that handles 1) Cloning the handler 2) Opening underlying MYISAM child tables 3) Copies the state of the original handler and the children into the cloned instances 4) Sets the appropriate flags storage/myisammrg/ha_myisammrg.h: Added a flag that is set to indicate that the current instance is cloned. Also added the prototype or the clone method. storage/myisammrg/myrg_open.c: Since we do now again use myrg_open() in the server removed the comments marking this as deadcode. --- mysql-test/r/merge.result | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 9ab982a6688..ba2eae9408b 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -2025,7 +2025,6 @@ TABLE_SCHEMA = 'test' and TABLE_NAME='tm1'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT NULL test tm1 BASE TABLE NULL NULL NULL # # # # # # # # # # NULL # # Unable to open underlying table which is differently defined or of non-MyISAM ty DROP TABLE tm1; -End of 5.1 tests CREATE TABLE t1(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM; CREATE TABLE t2(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM; CREATE TABLE t3(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM; @@ -2041,4 +2040,48 @@ EXPLAIN SELECT COUNT(*) FROM t4; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away DROP TABLE t1, t2, t3, t4; +# +# Bug #40675 MySQL 5.1 crash with index merge algorithm and Merge tables +# +# create MYISAM table t1 and insert values into it +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(1); +# create MYISAM table t2 and insert values into it +CREATE TABLE t2(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b)); +INSERT INTO t2(a,b) VALUES +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), +(1,2); +# Create the merge table t3 +CREATE TABLE t3(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b)) +ENGINE=MERGE UNION=(t2) INSERT_METHOD=FIRST; +# Lock tables t1 and t3 for write +LOCK TABLES t1 WRITE, t3 WRITE; +# Insert values into the merge table t3 +INSERT INTO t3(a,b) VALUES(1,2); +# select from the join of t2 and t3 (The merge table) +SELECT t3.a FROM t1,t3 WHERE t3.b=2 AND t3.a=1; +a +1 +1 +# Unlock the tables +UNLOCK TABLES; +# drop the created tables +DROP TABLE t1, t2, t3; End of 5.1 tests -- cgit v1.2.1 From 694323952aafe3030cf2d9bdc5cae77c3d817fbc Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Fri, 13 Feb 2009 19:07:03 +0100 Subject: Bug#42146 - DATETIME fractional seconds parse error Bug#38435 - LONG Microseconds cause MySQL to fail a CAST to DATETIME or DATE Parsing of optional microsecond part in datetime did not fail gracefully when field width was larger than the allowed six places. Now handles up to the correct six places, and disregards any extra digits without messing up what we've already got. mysql-test/r/type_datetime.result: show graceful handling of overly long microsecond parts (correct truncation). mysql-test/t/type_datetime.test: show graceful handling of overly long microsecond parts (correct truncation). sql-common/my_time.c: Special case for time-parsing: for microsecond part, leading zeroes are actually meaningful! Also, don't break the entire date on more than the allowed six digits in microsecond part, just truncate the extra digits. --- mysql-test/r/type_datetime.result | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 6a692ed58e4..b6281443751 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -619,3 +619,22 @@ ERROR 42000: Invalid default value for 'da' create table t1 (t time default '916:00:00 a'); ERROR 42000: Invalid default value for 't' set @@sql_mode= @org_mode; +SELECT CAST(CAST('2006-08-10 10:11:12.0123450' AS DATETIME) AS DECIMAL(30,7)); +CAST(CAST('2006-08-10 10:11:12.0123450' AS DATETIME) AS DECIMAL(30,7)) +20060810101112.0123450 +Warnings: +Warning 1292 Truncated incorrect datetime value: '2006-08-10 10:11:12.0123450' +SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.0123450' AS DATETIME) AS DECIMAL(30,7)); +CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.0123450' AS DATETIME) AS DECIMAL(30,7)) +20060810101112.0123450 +Warnings: +Warning 1292 Truncated incorrect datetime value: '00000002006-000008-0000010 000010:0000011:00000012.0123450' +SELECT CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS DATETIME) AS DECIMAL(30,7)); +CAST(CAST('00000002006-000008-0000010 000010:0000011:00000012.012345' AS DATETIME) AS DECIMAL(30,7)) +20060810101112.0123450 +SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7)); +CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7)) +20080729104251.1234560 +Warnings: +Warning 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567' +End of 5.1 tests -- cgit v1.2.1 From f29aa74aa125990461b8db6e51740026125c8c45 Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Fri, 13 Feb 2009 17:26:20 -0200 Subject: Remove test case for bug 40264. Dirty close tricky does not work on Windows. mysql-test/r/query_cache_notembedded.result: Remove test case result. mysql-test/t/query_cache_notembedded.test: Remove test case. --- mysql-test/r/query_cache_notembedded.result | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result index bf582bfaec6..8e5df012cfb 100644 --- a/mysql-test/r/query_cache_notembedded.result +++ b/mysql-test/r/query_cache_notembedded.result @@ -345,19 +345,3 @@ id drop table t1; drop function f1; set GLOBAL query_cache_size=0; -DROP TABLE IF EXISTS t1; -FLUSH STATUS; -SET GLOBAL query_cache_size=1048576; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3),(4),(5); -SHOW STATUS LIKE 'Qcache_queries_in_cache'; -Variable_name Value -Qcache_queries_in_cache 0 -LOCK TABLES t1 WRITE; -SELECT * FROM t1; -UNLOCK TABLES; -SHOW STATUS LIKE 'Qcache_queries_in_cache'; -Variable_name Value -Qcache_queries_in_cache 0 -DROP TABLE t1; -SET GLOBAL query_cache_size= default; -- cgit v1.2.1 From aedef27a85bb21826f35f3ce9e1ff6e1cb471a19 Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Fri, 13 Feb 2009 16:12:59 -0500 Subject: BUG#32667: lowercase_table3.test reports to error log Cleaned up SQL code in the test. Needed to move the FLUSH TABLES statement prior to the DROP TABLE t1 to prevent a warning of Table open on delete and a test fail. --- mysql-test/r/lowercase_table3.result | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/lowercase_table3.result b/mysql-test/r/lowercase_table3.result index 880a203a15f..1ef7d04bb1d 100644 --- a/mysql-test/r/lowercase_table3.result +++ b/mysql-test/r/lowercase_table3.result @@ -1,11 +1,11 @@ -call mtr.add_suppression("Cannot find or open table test/BUG29839 from"); +call mtr.add_suppression("Cannot find or open table test/BUG29839 from .*"); DROP TABLE IF EXISTS t1,T1; -CREATE TABLE t1 (a int); -SELECT * from T1; +CREATE TABLE t1 (a INT); +SELECT * FROM T1; a -drop table t1; -flush tables; -CREATE TABLE bug29839 (a int) ENGINE=INNODB; -SELECT * from BUG29839; +FLUSH TABLES; +DROP TABLE t1; +CREATE TABLE bug29839 (a INT) ENGINE=INNODB; +SELECT * FROM BUG29839; ERROR 42S02: Table 'test.BUG29839' doesn't exist -drop table bug29839; +DROP TABLE bug29839; -- cgit v1.2.1 From b41215add2ee2bffb8ba00716afa20a478f03f37 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Sat, 14 Feb 2009 18:36:57 +0300 Subject: Fixed bdb_gis and ndb_gis test failures in PB introduced by the patch for bug #21205. mysql-test/r/bdb_gis.result: Take additional precision into account. mysql-test/r/ndb_gis.result: Take additional precision into account. mysql-test/t/type_float.test: Added missing DROP TABLE. --- mysql-test/r/bdb_gis.result | 6 +++--- mysql-test/r/ndb_gis.result | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index 6651421b51c..3187d7bef99 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -291,7 +291,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) +109 POINT(25.4166666666667 25.4166666666667) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon ORDER by fid; fid Area(g) @@ -325,8 +325,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) +117 POINT(55.5885277530424 17.426536064114) +118 POINT(55.5885277530424 17.426536064114) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; fid Area(g) diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index ec064ace651..0625128195b 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -291,7 +291,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) +109 POINT(25.4166666666667 25.4166666666667) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon ORDER by fid; fid Area(g) @@ -325,8 +325,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) +117 POINT(55.5885277530424 17.426536064114) +118 POINT(55.5885277530424 17.426536064114) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; fid Area(g) @@ -835,7 +835,7 @@ Note 1003 select astext(startpoint(`test`.`gis_line`.`g`)) AS `AsText(StartPoint SELECT fid, AsText(Centroid(g)) FROM gis_polygon ORDER by fid; fid AsText(Centroid(g)) 108 POINT(15 15) -109 POINT(25.416666666667 25.416666666667) +109 POINT(25.4166666666667 25.4166666666667) 110 POINT(20 10) SELECT fid, Area(g) FROM gis_polygon ORDER by fid; fid Area(g) @@ -869,8 +869,8 @@ fid IsClosed(g) 116 0 SELECT fid, AsText(Centroid(g)) FROM gis_multi_polygon ORDER by fid; fid AsText(Centroid(g)) -117 POINT(55.588527753042 17.426536064114) -118 POINT(55.588527753042 17.426536064114) +117 POINT(55.5885277530424 17.426536064114) +118 POINT(55.5885277530424 17.426536064114) 119 POINT(2 2) SELECT fid, Area(g) FROM gis_multi_polygon ORDER by fid; fid Area(g) -- cgit v1.2.1 From 6d1dc3270b11b71b83acf6cc1ead73224c68d3b1 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Sat, 14 Feb 2009 19:04:16 +0300 Subject: Fixed parser test failure introduced by the patch for bug #21205. mysql-test/r/parser.result: Take additional precision into account. --- mysql-test/r/parser.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result index 270c1ec5670..002fbd02c2a 100644 --- a/mysql-test/r/parser.result +++ b/mysql-test/r/parser.result @@ -522,7 +522,7 @@ select conv(255 AS p1, 10 AS p2, 16 AS p3); ERROR 42000: Incorrect parameters in the call to native function 'conv' select atan(10); atan(10) -1.4711276743037 +1.47112767430373 select atan(10 AS p1); ERROR 42000: Incorrect parameters in the call to native function 'atan' select atan(10 p1); @@ -533,7 +533,7 @@ select atan(10 "p1"); ERROR 42000: Incorrect parameters in the call to native function 'atan' select atan(10, 20); atan(10, 20) -0.46364760900081 +0.463647609000806 select atan(10 AS p1, 20); ERROR 42000: Incorrect parameters in the call to native function 'atan' select atan(10 p1, 20); -- cgit v1.2.1 From 4e356b1fe3b4cd228fbca64c1b89e5914a0ed6aa Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Sat, 14 Feb 2009 20:12:14 +0300 Subject: Added missing DROP TABLE to type_float.result. mysql-test/r/type_float.result: Added missing DROP TABLE. --- mysql-test/r/type_float.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 757cd6f5d71..d3a136d53d2 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -406,4 +406,5 @@ INSERT INTO t1 VALUES(-1.79769313486231e+308); SELECT f1 FROM t1; f1 -1.79769313486231e+308 +DROP TABLE t1; End of 5.0 tests -- cgit v1.2.1 From d3a10ec6efdf8a257935a8f6161ca83d5538ce6b Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Mon, 16 Feb 2009 08:38:15 -0300 Subject: Bug#41077: Warning contains wrong future version Substitute all references of MySQL version "5.2" to "6.0" in deprecation warning messages.Deprecated constructs are being removed in the 6.0 tree. --- mysql-test/r/backup.result | 26 +++++++++++++------------- mysql-test/r/show_check.result | 2 +- mysql-test/r/sp-error.result | 2 +- mysql-test/r/sp.result | 4 ++-- mysql-test/r/sp_trans.result | 2 +- mysql-test/r/type_blob.result | 4 ++-- mysql-test/r/type_timestamp.result | 14 +++++++------- mysql-test/r/warnings.result | 2 +- 8 files changed, 28 insertions(+), 28 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/backup.result b/mysql-test/r/backup.result index b657c620805..bab2c83448c 100644 --- a/mysql-test/r/backup.result +++ b/mysql-test/r/backup.result @@ -4,23 +4,23 @@ create table t4(n int); backup table t4 to '../../bogus'; Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) -test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/bogus/t4.frm' (Errcode: X) test.t4 backup status Operation failed backup table t4 to '../../tmp'; Table Op Msg_type Msg_text -test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t4 backup status OK backup table t4 to '../../tmp'; Table Op Msg_type Msg_text test.t4 backup error Failed copying .frm file (errno: X) -test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t4 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t4 backup Error Can't create/write to file 'MYSQLTEST_VARDIR/tmp/t4.frm' (Errcode: X) test.t4 backup status Operation failed drop table t4; restore table t4 from '../../tmp'; Table Op Msg_type Msg_text -test.t4 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t4 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t4 restore status OK select count(*) from t4; count(*) @@ -29,18 +29,18 @@ create table t1(n int); insert into t1 values (23),(45),(67); backup table t1 to '../../tmp'; Table Op Msg_type Msg_text -test.t1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 backup status OK drop table t1; restore table t1 from '../../bogus'; Table Op Msg_type Msg_text t1 restore error Failed copying .frm file Warnings: -Warning 1287 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +Warning 1287 The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead Error 29 File 'MYSQLTEST_VARDIR/bogus/t1.frm' not found (Errcode: X) restore table t1 from '../../tmp'; Table Op Msg_type Msg_text -test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 restore status OK select n from t1; n @@ -53,13 +53,13 @@ insert into t2 values (123),(145),(167); insert into t3 values (223),(245),(267); backup table t2,t3 to '../../tmp'; Table Op Msg_type Msg_text -test.t2 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t2 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t2 backup status OK test.t3 backup status OK drop table t1,t2,t3; restore table t1,t2,t3 from '../../tmp'; Table Op Msg_type Msg_text -test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 restore status OK test.t2 restore status OK test.t3 restore status OK @@ -81,14 +81,14 @@ k drop table t1,t2,t3,t4; restore table t1 from '../../tmp'; Table Op Msg_type Msg_text -test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 restore status OK rename table t1 to t5; lock tables t5 write; backup table t5 to '../../tmp'; unlock tables; Table Op Msg_type Msg_text -test.t5 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t5 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t5 backup status OK drop table t5; DROP TABLE IF EXISTS `t+1`; @@ -96,12 +96,12 @@ CREATE TABLE `t+1` (c1 INT); INSERT INTO `t+1` VALUES (1), (2), (3); BACKUP TABLE `t+1` TO '../../tmp'; Table Op Msg_type Msg_text -test.t+1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t+1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t+1 backup status OK DROP TABLE `t+1`; RESTORE TABLE `t+1` FROM '../../tmp'; Table Op Msg_type Msg_text -test.t+1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t+1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t+1 restore status OK SELECT * FROM `t+1`; c1 diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 2051939e4b6..c8ea9d79a13 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1295,7 +1295,7 @@ drop database mysqltest; show full plugin; show warnings; Level Code Message -Warning 1287 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW PLUGINS' instead +Warning 1287 The syntax 'SHOW PLUGIN' is deprecated and will be removed in MySQL 6.0. Please use 'SHOW PLUGINS' instead show plugin; show plugins; create database `mysqlttest\1`; diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index 3def6536897..35d61ce757d 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -1643,7 +1643,7 @@ create table t1 (a int) type=MyISAM; drop table t1; end| Warnings: -Warning 1287 The syntax 'TYPE=storage_engine' is deprecated and will be removed in MySQL 5.2. Please use 'ENGINE=storage_engine' instead +Warning 1287 The syntax 'TYPE=storage_engine' is deprecated and will be removed in MySQL 6.0. Please use 'ENGINE=storage_engine' instead call p1(); call p1(); drop procedure p1; diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index cf4eac563ad..0a416a20c95 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -4350,10 +4350,10 @@ call bug13012()| Table Op Msg_type Msg_text test.t1 repair status OK Table Op Msg_type Msg_text -test.t1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t1 backup Warning The syntax 'BACKUP TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 backup status OK Table Op Msg_type Msg_text -test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 5.2. Please use MySQL Administrator (mysqldump, mysql) instead +test.t1 restore Warning The syntax 'RESTORE TABLE' is deprecated and will be removed in MySQL 6.0. Please use MySQL Administrator (mysqldump, mysql) instead test.t1 restore status OK drop procedure bug13012| create view v1 as select * from t1| diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index abd454ac907..3cc251bc0a6 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -535,7 +535,7 @@ use db_bug7787| CREATE PROCEDURE p1() SHOW INNODB STATUS; | Warnings: -Warning 1287 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead +Warning 1287 The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 6.0. Please use 'SHOW ENGINE INNODB STATUS' instead GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost| DROP DATABASE db_bug7787| drop user user_bug7787@localhost| diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index a80adab1f87..d11ab236c34 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -891,11 +891,11 @@ CREATE TABLE b15776 (a year(-2)); 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 '-2))' at line 1 CREATE TABLE b15776 (a timestamp(4294967294)); Warnings: -Warning 1287 The syntax 'TIMESTAMP(4294967294)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(4294967294)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead DROP TABLE b15776; CREATE TABLE b15776 (a timestamp(4294967295)); Warnings: -Warning 1287 The syntax 'TIMESTAMP(4294967295)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(4294967295)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead DROP TABLE b15776; CREATE TABLE b15776 (a timestamp(4294967296)); ERROR 42000: Display width out of range for column 'a' (max = 4294967295) diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 91938771ee3..24cb725de9f 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -101,13 +101,13 @@ create table t1 (t2 timestamp(2), t4 timestamp(4), t6 timestamp(6), t8 timestamp(8), t10 timestamp(10), t12 timestamp(12), t14 timestamp(14)); Warnings: -Warning 1287 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead -Warning 1287 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 5.2. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(2)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(4)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(6)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(8)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(10)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(12)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead +Warning 1287 The syntax 'TIMESTAMP(14)' is deprecated and will be removed in MySQL 6.0. Please use 'TIMESTAMP' instead insert t1 values (0,0,0,0,0,0,0), ("1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", "1997-12-31 23:47:59", diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 19d95acd5c1..2e393aea9e4 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -168,7 +168,7 @@ max_error_count 10 drop table t1; set table_type=MYISAM; Warnings: -Warning 1287 The syntax '@@table_type' is deprecated and will be removed in MySQL 5.2. Please use '@@storage_engine' instead +Warning 1287 The syntax '@@table_type' is deprecated and will be removed in MySQL 6.0. Please use '@@storage_engine' instead create table t1 (a int); insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10); update t1 set a='abc'; -- cgit v1.2.1 From 544fa7593b92a3949b9676e9abd9ad5e7a1a5c30 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Tue, 17 Feb 2009 18:22:48 +0400 Subject: Bug#25830 SHOW TABLE STATUS behaves differently depending on table name(for 5.0 only) replace wild_case_compare with my_wildcmp which is multibyte safe function mysql-test/r/lowercase_utf8.result: test result mysql-test/t/lowercase_utf8-master.opt: test case mysql-test/t/lowercase_utf8.test: test case sql/sql_show.cc: replace wild_case_compare with my_wildcmp which is multibyte safe function --- mysql-test/r/lowercase_utf8.result | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 mysql-test/r/lowercase_utf8.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/lowercase_utf8.result b/mysql-test/r/lowercase_utf8.result new file mode 100644 index 00000000000..945e0912e80 --- /dev/null +++ b/mysql-test/r/lowercase_utf8.result @@ -0,0 +1,9 @@ +set names utf8; +create table `А` (id int); +show tables from test like 'А'; +Tables_in_test (А) +а +show tables from test like 'а'; +Tables_in_test (а) +а +drop table `А`; -- cgit v1.2.1 From 85cc17d3cd2a7ae926ed58adbb0446b9a2b09ed2 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 18 Feb 2009 21:10:19 +0100 Subject: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed error message to show that it is partitioning that does not support foreign keys yet. Changed spelling from British english to American english. mysql-test/r/partition.result: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed spelling from British english to American english. mysql-test/r/partition_mgm_err.result: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed spelling from British english to American english. mysql-test/t/partition.test: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Added test for verifying error message sql/share/errmsg.txt: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Changed spelling from British english to American english. sql/sql_table.cc: Bug#36001: Partitions: spelling and using some error messages Backport from 6.0 Using a better error message. --- mysql-test/r/partition.result | 4 ++++ mysql-test/r/partition_mgm_err.result | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index cec4e60d139..c5733e33569 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1,5 +1,9 @@ SET @old_general_log= @@global.general_log; drop table if exists t1, t2; +CREATE TABLE t1 (a INT, FOREIGN KEY (a) REFERENCES t0 (a)) +ENGINE=MyISAM +PARTITION BY HASH (a); +ERROR HY000: Foreign key clause is not yet supported in conjunction with partitioning CREATE TABLE t1 ( pk INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (pk) diff --git a/mysql-test/r/partition_mgm_err.result b/mysql-test/r/partition_mgm_err.result index db89c6ef6e7..f8403988f47 100644 --- a/mysql-test/r/partition_mgm_err.result +++ b/mysql-test/r/partition_mgm_err.result @@ -25,13 +25,13 @@ ALTER TABLE t1 DROP PARTITION x10, x1, x2, x3; ERROR HY000: Error in list of partitions to DROP ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10 INTO (PARTITION x11 VALUES LESS THAN (22)); -ERROR HY000: More partitions to reorganise than there are partitions +ERROR HY000: More partitions to reorganize than there are partitions ALTER TABLE t1 REORGANIZE PARTITION x0,x1,x2 INTO (PARTITION x3 VALUES LESS THAN (6)); ERROR HY000: Duplicate partition name x3 ALTER TABLE t1 REORGANIZE PARTITION x0, x2 INTO (PARTITION x11 VALUES LESS THAN (2)); -ERROR HY000: When reorganising a set of partitions they must be in consecutive order +ERROR HY000: When reorganizing a set of partitions they must be in consecutive order ALTER TABLE t1 REORGANIZE PARTITION x0, x1, x1 INTO (PARTITION x11 VALUES LESS THAN (4)); ERROR HY000: Error in list of partitions to REORGANIZE -- cgit v1.2.1 From 830c42a06a6d28e38d0aa3e53e90618e28d957ef Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 18 Feb 2009 21:29:30 +0100 Subject: Backport of bug#38719 from 6.0 to 5.1 handler::get_dup_key used the called handler for the info call, but used table->file handler for errkey. Fixed by using table->file->info instead. mysql-test/r/partition_error.result: Bug#38719: Partitioning returns a different error code for a duplicate key error Added test for verification mysql-test/t/partition_error.test: Bug#38719: Partitioning returns a different error code for a duplicate key error Added test for verification --- mysql-test/r/partition_error.result | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index 547ce1ca316..511806d64bd 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -1,4 +1,13 @@ drop table if exists t1; +CREATE TABLE t1 (a INTEGER NOT NULL, PRIMARY KEY (a)); +INSERT INTO t1 VALUES (1),(1); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +DROP TABLE t1; +CREATE TABLE t1 (a INTEGER NOT NULL, PRIMARY KEY (a)) +PARTITION BY KEY (a) PARTITIONS 2; +INSERT INTO t1 VALUES (1),(1); +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +DROP TABLE t1; CREATE TABLE t1 (a INT) PARTITION BY HASH (a) ( PARTITION p0 ENGINE=MyISAM, -- cgit v1.2.1 From c2e23208ef7ae6b315ca4988e903bff2bc0284d4 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Thu, 19 Feb 2009 17:20:44 +0400 Subject: Bug#37601 Cast Is Not Done On Row Comparison In case of ROW item each compared pair does not check if argumet collations can be aggregated and thus appropiriate item conversion does not happen. The fix is to add the check and convertion for ROW pairs. mysql-test/r/row.result: test result mysql-test/t/row.test: test case sql/item.cc: added agg_item_set_converter() function which was a part of agg_item_charsets() func. The only difference is that agg_item_set_converter() checks and converts items using already known collation. sql/item.h: added agg_item_set_converter() function sql/item_cmpfunc.cc: In case of ROW item each compared pair does not check if argumet collations can be aggregated and thus appropiriate item conversion does not happen. The fix is to add the check and convertion for ROW pairs. --- mysql-test/r/row.result | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result index 98c79d4bc00..9afb528b6dd 100644 --- a/mysql-test/r/row.result +++ b/mysql-test/r/row.result @@ -443,3 +443,17 @@ SELECT ROW(a, 1) IN (SELECT SUM(b), 3) FROM t1 GROUP BY a; ROW(a, 1) IN (SELECT SUM(b), 3) 0 DROP TABLE t1; +create table t1 (a varchar(200), +b int unsigned not null primary key auto_increment) +default character set 'utf8'; +create table t2 (c varchar(200), +d int unsigned not null primary key auto_increment) +default character set 'latin1'; +insert into t1 (a) values('abc'); +insert into t2 (c) values('abc'); +select * from t1,t2 where (a,b) = (c,d); +a b c d +abc 1 abc 1 +select host,user from mysql.user where (host,user) = ('localhost','test'); +host user +drop table t1,t2; -- cgit v1.2.1 From 29476d879f85a81c9376b556ad9c233f2a5e073b Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 19 Feb 2009 17:30:03 +0200 Subject: Bug #42419: Server crash with "Pure virtual method called" on two concurrent connections The problem is that tables can enter open table cache for a thread without being properly cleaned up. This can happen if make_join_statistics() fails to read a const table because of e.g. a deadlock. It does set a member of TABLE structure to a value it allocates, but doesn't clean-up this setting on error nor does it set the rest of the members in JOIN to allow for automatic cleanup. As a result when such an error occurs and the next statement depends re-uses the table from the open tables cache it will get it with this TABLE::reginfo.join_tab pointing to a memory area that's freed. Fixed by making sure make_join_statistics() cleans up TABLE::reginfo.join_tab on error. mysql-test/r/innodb_mysql.result: Bug #42419: test case mysql-test/t/innodb_mysql-master.opt: Bug #42419: increase the timeout so it covers te conservative sleep 3 in the test mysql-test/t/innodb_mysql.test: Bug #42419: test case sql/sql_select.cc: Bug #42419: clean up the members of TABLE on failure in make_join_statisitcs() --- mysql-test/r/innodb_mysql.result | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 682cc2e82e2..78a56cddb08 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1267,4 +1267,20 @@ CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1; +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +SET AUTOCOMMIT = 0; +CREATE TEMPORARY TABLE t1_tmp (b INT); +INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 3; +INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 2; +SET AUTOCOMMIT = 0; +CREATE TEMPORARY TABLE t2_tmp ( a INT, new_a INT); +INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53); +UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1; +UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2; +INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3; +DROP TABLE t1; End of 5.0 tests -- cgit v1.2.1 From 79300d6f7fb5cd22b9d3c2d14b6eb443e2ae28ed Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Thu, 19 Feb 2009 15:37:40 -0500 Subject: Bug#38831: 11 test cases fail on Windows due to missing commands Replaced Unix calls with mysql-test-run's built-in functions / SQL manipulation where possible. Replaced error codes with error names as well. Disabled two tests on Windows due to more complex Unix command usage See Bug#41307, Bug#41308 --- mysql-test/r/mysqlbinlog.result | 9 ++++++++- mysql-test/r/mysqltest.result | 2 -- mysql-test/r/trigger-compat.result | 4 +--- 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 4fd87861ded..fe536950b4c 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -353,7 +353,14 @@ flush logs; INSERT INTO t1 VALUES ('0123456789'); flush logs; DROP TABLE t1; -# Query thread_id=REMOVED exec_time=REMOVED error_code=REMOVED +We expect this value to be 1 +The bug being tested was that 'Query' lines were not preceded by '#' +If the line is in the table, it had to have been preceded by a '#' + +SELECT COUNT(*) AS `BUG#28293_expect_1` FROM patch WHERE a LIKE '%Query%'; +BUG#28293_expect_1 +1 +DROP TABLE patch; flush logs; create table t1(a int); insert into t1 values(connection_id()); diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index a7df1a523cf..e445bf3cc9b 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -210,7 +210,6 @@ source database "MySQL: The world's most popular ;open source database" echo message echo message -mysqltest: At line 1: command "false" failed mysqltest: At line 1: Missing argument in exec MySQL "MySQL" @@ -378,7 +377,6 @@ mysqltest: At line 1: The argument to dec must be a variable (start with $) mysqltest: At line 1: End of line junk detected: "1000" mysqltest: At line 1: Missing arguments to system, nothing to do! mysqltest: At line 1: Missing arguments to system, nothing to do! -mysqltest: At line 1: system command 'false' failed system command 'NonExistsinfComamdn 2> /dev/null' failed test test2 diff --git a/mysql-test/r/trigger-compat.result b/mysql-test/r/trigger-compat.result index 6839cacab43..81c7a14c173 100644 --- a/mysql-test/r/trigger-compat.result +++ b/mysql-test/r/trigger-compat.result @@ -13,9 +13,7 @@ GRANT CREATE ON mysqltest_db1.* TO mysqltest_dfn@localhost; ---> connection: wl2818_definer_con CREATE TABLE t1(num_value INT); CREATE TABLE t2(user_str TEXT); -CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1 -FOR EACH ROW -INSERT INTO t2 VALUES(CURRENT_USER()); +CREATE TRIGGER wl2818_trg1 BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 VALUES(CURRENT_USER()); ---> patching t1.TRG... -- cgit v1.2.1 From 664bb23a30572e89da319c9d2f201a7de3828c1b Mon Sep 17 00:00:00 2001 From: Davi Arnaut Date: Thu, 19 Feb 2009 18:09:35 -0300 Subject: Bug#41098: Query Cache returns wrong result with concurrent insert The problem is that select queries executed concurrently with a concurrent insert on a MyISAM table could be cached if the select started after the query cache invalidation but before the unlock of tables performed by the concurrent insert. This race could happen because the concurrent insert was failing to prevent cache of select queries happening at the same time. The solution is to add a 'uncacheable' status flag to signal that a concurrent insert is being performed on the table and that queries executing at the same time shouldn't cache the results. mysql-test/r/query_cache_debug.result: Add test case result for Bug#41098 mysql-test/t/disabled.def: Re-enable test case. mysql-test/t/query_cache_debug.test: Add test case for Bug#41098 sql/sql_cache.cc: Debug sync point for regression testing purposes. sql/sql_insert.cc: Remove meaningless query cache invalidate. There is already a preceding invalidate for queries that started before the concurrent insert. storage/myisam/ha_myisam.cc: Check for a active concurrent insert. storage/myisam/mi_locking.c: Signal the start of a concurrent insert. Flag is zeroed once the state is updated back. storage/myisam/myisamdef.h: Add flag to signal a active concurrent insert. --- mysql-test/r/query_cache_debug.result | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/query_cache_debug.result b/mysql-test/r/query_cache_debug.result index c90165368e3..b03a71d3fec 100644 --- a/mysql-test/r/query_cache_debug.result +++ b/mysql-test/r/query_cache_debug.result @@ -22,3 +22,52 @@ Qcache_queries_in_cache 0 set global query_cache_size= 0; use test; drop table t1; +SET @old_concurrent_insert= @@GLOBAL.concurrent_insert; +SET @old_query_cache_size= @@GLOBAL.query_cache_size; +DROP TABLE IF EXISTS t1, t2; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SET GLOBAL concurrent_insert= 1; +SET GLOBAL query_cache_size= 1024*512; +SET GLOBAL query_cache_type= ON; +# Switch to connection con1 +SET SESSION debug='+d,wait_after_query_cache_invalidate'; +# Send concurrent insert, will wait in the query cache table invalidate +INSERT INTO t1 VALUES (4); +# Switch to connection default +# Wait for concurrent insert to reach the debug point +# Switch to connection con2 +# Send SELECT that shouldn't be cached +SELECT * FROM t1; +a +1 +2 +3 +# Switch to connection default +# Notify the concurrent insert to proceed +SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST +WHERE STATE = 'wait_after_query_cache_invalidate' INTO @thread_id; +KILL QUERY @thread_id; +# Switch to connection con1 +# Gather insert result +SHOW STATUS LIKE "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 0 +# Test that it's cacheable +SELECT * FROM t1; +a +1 +2 +3 +4 +SHOW STATUS LIKE "Qcache_queries_in_cache"; +Variable_name Value +Qcache_queries_in_cache 1 +# Disconnect +# Restore defaults +RESET QUERY CACHE; +DROP TABLE t1,t2; +SET GLOBAL concurrent_insert= DEFAULT; +SET GLOBAL query_cache_size= DEFAULT; +SET GLOBAL query_cache_type= DEFAULT; -- cgit v1.2.1 From a67725ac75ded8d6f4f9eb8dac4c23fc03e82738 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 20 Feb 2009 11:12:06 +0200 Subject: Bug #42419: test suite fix Moved the test case for the bug into a separate file (and restored the original innodb_mysql test setup). Used the new wait_show_condition test macro to avoid the usage of sleep mysql-test/include/wait_show_condition.inc: Bug #42419: new test macro to wait for a row in SHOW to have a certain value. mysql-test/r/innodb_bug42419.result: Bug #42419: test case mysql-test/r/innodb_mysql.result: Bug #42419: revert to the original innodb_mysql test mysql-test/t/innodb_bug42419.test: Bug #42419: test case mysql-test/t/innodb_mysql-master.opt: Bug #42419: revert to the original innodb_mysql test mysql-test/t/innodb_mysql.test: Bug #42419: revert to the original innodb_mysql test --- mysql-test/r/innodb_bug42419.result | 17 +++++++++++++++++ mysql-test/r/innodb_mysql.result | 16 ---------------- 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 mysql-test/r/innodb_bug42419.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/innodb_bug42419.result b/mysql-test/r/innodb_bug42419.result new file mode 100644 index 00000000000..f304bb634cb --- /dev/null +++ b/mysql-test/r/innodb_bug42419.result @@ -0,0 +1,17 @@ +CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b INT) ENGINE = InnoDB; +INSERT INTO t1 VALUES (1,1),(2,2),(3,3); +COMMIT; +SET AUTOCOMMIT = 0; +CREATE TEMPORARY TABLE t1_tmp ( b INT ); +INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 3; +INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 2; +SET AUTOCOMMIT = 0; +CREATE TEMPORARY TABLE t2_tmp ( a int, new_a int ); +INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53); +UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1; +UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2; +INSERT INTO t1_tmp (b) SELECT b FROM t1 WHERE a = 1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +Reap the server message for connection user2 UPDATE t1 ... +UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3; +DROP TABLE t1; diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index 78a56cddb08..682cc2e82e2 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1267,20 +1267,4 @@ CREATE INDEX i1 on t1 (a(3)); SELECT * FROM t1 WHERE a = 'abcde'; a DROP TABLE t1; -CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT) -ENGINE=InnoDB; -INSERT INTO t1 VALUES (1,1),(2,2),(3,3); -SET AUTOCOMMIT = 0; -CREATE TEMPORARY TABLE t1_tmp (b INT); -INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 3; -INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 2; -SET AUTOCOMMIT = 0; -CREATE TEMPORARY TABLE t2_tmp ( a INT, new_a INT); -INSERT INTO t2_tmp VALUES (1,51),(2,52),(3,53); -UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 1; -UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 2; -INSERT INTO t1_tmp SELECT b FROM t1 WHERE a = 1; -ERROR 40001: Deadlock found when trying to get lock; try restarting transaction -UPDATE t1 SET a = (SELECT new_a FROM t2_tmp WHERE t2_tmp.a = t1.a) WHERE a = 3; -DROP TABLE t1; End of 5.0 tests -- cgit v1.2.1 From 4712e6b9b8e61e468ee94ec65105e61881f77421 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Fri, 20 Feb 2009 13:55:43 +0200 Subject: Bug #37313 BINLOG Contains Incorrect server id Signed integer format specifier forced to print the binlog header with server_id negative if the unsigned value sets the sign-bit ON. Fixed with correcting the specifier to correspond to typeof(server_id) == ulong. mysql-test/r/mysqlbinlog.result: results changed. mysql-test/t/mysqlbinlog.test: displaying the expected unsignedly formatted server_id value, bug#37313. sql/log_event.cc: Format specifier is corrected to correspond to typeof(server_id). --- mysql-test/r/mysqlbinlog.result | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 4fd87861ded..b5ac22437cd 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -362,4 +362,14 @@ drop table t1; 1 drop table t1; shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql +set @@global.server_id= 4294967295; +reset master; +select +(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog")) +is not null; +(@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog")) +is not null +1 +*** Unsigned server_id 4294967295 is found: 1 *** +set @@global.server_id= 1; End of 5.0 tests -- cgit v1.2.1 From 0e62c9aa6301de71164496ec7c81c871d78ce8cd Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Mon, 23 Feb 2009 14:28:26 +0200 Subject: Fix for bug #15936: "round" differs on Windows to Unix Both of our own implementations of rint(3) were inconsistent with the most common behavior of rint() on those platforms that have it: round to nearest, break ties by rounding to nearest even. Fixed by leaving just one implementation of rint() in our source tree, and changing its behavior to match the most common native implementations on other platforms. configure.in: Added checks for fenv.h and fesetround(). include/config-win.h: Removed the incorrect implementation of rint() for Windows. include/my_global.h: Added an rint() implementation for platforms that do not have it. mysql-test/r/func_math.result: Added a test case for bug #15936. mysql-test/t/func_math.test: Added a test case for bug #15936. sql/mysqld.cc: Explicitly set the FPU rounding mode with fesetround(). --- mysql-test/r/func_math.result | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 0d7adbbba5e..87cfb5b86a5 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -360,4 +360,34 @@ SELECT a DIV 2 FROM t1 UNION SELECT a DIV 2 FROM t1; a DIV 2 0 DROP TABLE t1; +CREATE TABLE t1 (a DOUBLE); +INSERT INTO t1 VALUES (-1.1), (1.1), +(-1.5), (1.5), +(-1.9), (1.9), +(-2.1), (2.1), +(-2.5), (2.5), +(-2.9), (2.9), +# Check numbers with absolute values > 2^53 - 1 +# (see comments for MAX_EXACT_INTEGER) +(-1e16 - 0.5), (1e16 + 0.5), +(-1e16 - 1.5), (1e16 + 1.5); +SELECT a, ROUND(a) FROM t1; +a ROUND(a) +-1.1 -1 +1.1 1 +-1.5 -2 +1.5 2 +-1.9 -2 +1.9 2 +-2.1 -2 +2.1 2 +-2.5 -2 +2.5 2 +-2.9 -3 +2.9 3 +-1e+16 -10000000000000000 +1e+16 10000000000000000 +-1e+16 -10000000000000002 +1e+16 10000000000000002 +DROP TABLE t1; End of 5.0 tests -- cgit v1.2.1 From 85ea3740ffa44454d7d3cb03f90857bfa43d2aad Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 24 Feb 2009 15:06:28 +0200 Subject: Bug #31060: MySQL CLI parser bug 2 There was a problem when a DELIMITER COMMAND is not the first command on the line. I this case an extra line feed was added to the glob buffer and this was causing subsequent attempts to enter this delimiter to fail. Fixed by not adding a new line to the glob buffer if the command being added is a DELIMITER client/mysql.cc: Bug #31060: Don't add a new line if DELIMTER is added to the glob buffer mysql-test/r/mysql.result: Bug #31060: test case mysql-test/t/mysql.test: Bug #31060: test case --- mysql-test/r/mysql.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 9bad3b9f791..10537f6da16 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -188,4 +188,8 @@ delimiter 2 @z:='1' @z=database() 1 NULL +1 +1 +1 +1 End of 5.0 tests -- cgit v1.2.1 From 4b05db5cfdfa9d56c7185a8c03ddfaaf4333c963 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Tue, 24 Feb 2009 15:06:28 +0200 Subject: Bug #31060: MySQL CLI parser bug 2 There was a problem when a DELIMITER COMMAND is not the first command on the line. I this case an extra line feed was added to the glob buffer and this was causing subsequent attempts to enter this delimiter to fail. Fixed by not adding a new line to the glob buffer if the command being added is a DELIMITER client/mysql.cc: Bug #31060: Don't add a new line if DELIMTER is added to the glob buffer mysql-test/r/mysql.result: Bug #31060: test case mysql-test/t/mysql.test: Bug #31060: test case --- mysql-test/r/mysql.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index 9bad3b9f791..10537f6da16 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -188,4 +188,8 @@ delimiter 2 @z:='1' @z=database() 1 NULL +1 +1 +1 +1 End of 5.0 tests -- cgit v1.2.1 From d091deaf89a09881a34ef67335d042354da75c11 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Tue, 24 Feb 2009 16:17:34 +0200 Subject: fixing compilation warning and adding flush logs to test of bug#37313 --- mysql-test/r/mysqlbinlog.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index b5ac22437cd..dbbf49e7920 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -364,6 +364,7 @@ drop table t1; shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql set @@global.server_id= 4294967295; reset master; +flush logs; select (@a:=load_file("MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug37313.binlog")) is not null; -- cgit v1.2.1 From 620438fdaef079216609bfcb0a8cb7b58c950e1e Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Wed, 25 Feb 2009 12:19:29 +0200 Subject: backport the fix for bug #37191 to 5.1-bugteam --- mysql-test/r/view_grant.result | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 1821e50e294..3e280e47bee 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -956,6 +956,27 @@ Warnings: Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them DROP VIEW v1; DROP TABLE t1; +CREATE USER mysqluser1@localhost; +CREATE DATABASE mysqltest1; +USE mysqltest1; +CREATE TABLE t1 ( a INT ); +CREATE TABLE t2 ( b INT ); +INSERT INTO t1 VALUES (1), (2); +INSERT INTO t2 VALUES (1), (2); +GRANT CREATE VIEW ON mysqltest1.* TO mysqluser1@localhost; +GRANT SELECT ON t1 TO mysqluser1@localhost; +GRANT INSERT ON t2 TO mysqluser1@localhost; +This would lead to failed assertion. +CREATE VIEW v1 AS SELECT a, b FROM t1, t2; +SELECT * FROM v1; +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +SELECT b FROM v1; +ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 'v1' +DROP TABLE t1, t2; +DROP VIEW v1; +DROP DATABASE mysqltest1; +DROP USER mysqluser1@localhost; +USE test; End of 5.1 tests. CREATE USER mysqluser1@localhost; CREATE DATABASE mysqltest1; -- cgit v1.2.1 From 2bc4ad4f1f0faa191d9b5844677030fbea402db0 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Wed, 25 Feb 2009 14:20:20 +0400 Subject: Bug#30305 Create routine in wrong context in SHOW PRIVILEGES Changed context of Create routine to Databases. mysql-test/r/grant.result: result fix mysql-test/r/sp.result: result fix sql/sql_show.cc: Changed context of Create routine to Databases. --- mysql-test/r/grant.result | 2 +- mysql-test/r/sp.result | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 97945a702d8..7a5b0520f7c 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -457,7 +457,7 @@ Privilege Context Comment Alter Tables To alter the table Alter routine Functions,Procedures To alter or drop stored functions/procedures Create Databases,Tables,Indexes To create new databases and tables -Create routine Functions,Procedures To use CREATE FUNCTION/PROCEDURE +Create routine Databases To use CREATE FUNCTION/PROCEDURE Create temporary tables Databases To use CREATE TEMPORARY TABLE Create view Tables To create new views Create user Server Admin To create new users diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index bfa2f51e4fc..84a4166a45d 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -2475,7 +2475,7 @@ Privilege Context Comment Alter Tables To alter the table Alter routine Functions,Procedures To alter or drop stored functions/procedures Create Databases,Tables,Indexes To create new databases and tables -Create routine Functions,Procedures To use CREATE FUNCTION/PROCEDURE +Create routine Databases To use CREATE FUNCTION/PROCEDURE Create temporary tables Databases To use CREATE TEMPORARY TABLE Create view Tables To create new views Create user Server Admin To create new users @@ -2527,7 +2527,7 @@ Privilege Context Comment Alter Tables To alter the table Alter routine Functions,Procedures To alter or drop stored functions/procedures Create Databases,Tables,Indexes To create new databases and tables -Create routine Functions,Procedures To use CREATE FUNCTION/PROCEDURE +Create routine Databases To use CREATE FUNCTION/PROCEDURE Create temporary tables Databases To use CREATE TEMPORARY TABLE Create view Tables To create new views Create user Server Admin To create new users -- cgit v1.2.1 From 5a6fa28226530cadb3ec571d1d76f848dd32d647 Mon Sep 17 00:00:00 2001 From: "Bernt M. Johnsen" Date: Wed, 25 Feb 2009 11:37:30 +0100 Subject: Prepare for push of BUG#43111 --- mysql-test/r/ps.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 09deaf2f322..d3fbbf0d538 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -235,7 +235,7 @@ execute stmt1; prepare stmt1 from "insert into t1 select i from t1"; execute stmt1; execute stmt1; -prepare stmt1 from "select * from t1 into outfile 'f1.txt'"; +prepare stmt1 from "select * from t1 into outfile '/tmp/f1.txt'"; execute stmt1; deallocate prepare stmt1; drop table t1; -- cgit v1.2.1 From 5d2fc5335411bdd05a08a9b062d3441d4308dcaa Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Wed, 25 Feb 2009 15:44:50 +0400 Subject: Bug#40345 MySQLDump prefixes view name with database name when view references other db print compact view name if the view belongs to the current database mysql-test/r/information_schema_db.result: result fix mysql-test/r/mysqldump.result: result fix mysql-test/r/view_grant.result: result fix sql/sql_show.cc: print compact view name if the view belongs to the current database --- mysql-test/r/information_schema_db.result | 2 +- mysql-test/r/mysqldump.result | 2 +- mysql-test/r/view_grant.result | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result index b9c3358f47e..67c9921e1ca 100644 --- a/mysql-test/r/information_schema_db.result +++ b/mysql-test/r/information_schema_db.result @@ -188,7 +188,7 @@ Field Type Null Key Default Extra f1 char(4) YES NULL show create view v2; View Create View -v2 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `test`.`v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1` +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1` show create view testdb_1.v1; ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'v1' select table_name from information_schema.columns a diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index c612f6c5073..49430a5c62d 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3246,7 +3246,7 @@ USE `mysqldump_views`; /*!50001 DROP TABLE `nasishnasifu`*/; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ -/*!50001 VIEW `mysqldump_views`.`nasishnasifu` AS select `mysqldump_tables`.`basetable`.`id` AS `id` from `mysqldump_tables`.`basetable` */; +/*!50001 VIEW `nasishnasifu` AS select `mysqldump_tables`.`basetable`.`id` AS `id` from `mysqldump_tables`.`basetable` */; drop view nasishnasifu; drop database mysqldump_views; drop table mysqldump_tables.basetable; diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 53ad8642ba4..2f8462045ca 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -26,7 +26,7 @@ create view v2 as select * from mysqltest.t2; ERROR 42000: ANY command denied to user 'mysqltest_1'@'localhost' for table 't2' show create view v1; View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`mysqltest_1`@`localhost` SQL SECURITY DEFINER VIEW `test`.`v1` AS select `mysqltest`.`t1`.`a` AS `a`,`mysqltest`.`t1`.`b` AS `b` from `mysqltest`.`t1` +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`mysqltest_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `mysqltest`.`t1`.`a` AS `a`,`mysqltest`.`t1`.`b` AS `b` from `mysqltest`.`t1` grant create view,drop,select on test.* to mysqltest_1@localhost; use test; alter view v1 as select * from mysqltest.t1; @@ -307,7 +307,7 @@ grant create view,select on test.* to mysqltest_1@localhost; create view v1 as select * from mysqltest.t1; show create view v1; View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`mysqltest_1`@`localhost` SQL SECURITY DEFINER VIEW `test`.`v1` AS select `mysqltest`.`t1`.`a` AS `a`,`mysqltest`.`t1`.`b` AS `b` from `mysqltest`.`t1` +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`mysqltest_1`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `mysqltest`.`t1`.`a` AS `a`,`mysqltest`.`t1`.`b` AS `b` from `mysqltest`.`t1` revoke select on mysqltest.t1 from mysqltest_1@localhost; select * from v1; ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them -- cgit v1.2.1 From 6877425f2f41717a329d757a5f98c57b4e0c1eb5 Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Thu, 26 Feb 2009 10:57:33 +0200 Subject: Bug#41893: main.variables mysql-test fails if new variable like '%alloc%' is added. Started fix in 5.0 as the same issue is here. Revising queries used given what appears to be the scope of this test to only select the manipulated variables. Added tests for values that are / are not multiples of 1024 to test rounding / constraints. This behavior is not currently documented (docs bug has been opened) --- mysql-test/r/variables.result | 46 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 376a8ffa38e..04ccf3d688c 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -236,32 +236,66 @@ set @@rand_seed1=10000000,@@rand_seed2=1000000; select ROUND(RAND(),5); ROUND(RAND(),5) 0.02887 -show variables like '%alloc%'; + +==+ Testing %alloc% system variables +== +==+ NOTE: These values *must* be a multiple of 1024 +== +==+ Other values will be rounded down to nearest multiple +== + +==+ Show initial values +== +SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', +'query_alloc_block_size', 'query_prealloc_size', +'transaction_alloc_block_size', 'transaction_prealloc_size'); Variable_name Value query_alloc_block_size 8192 query_prealloc_size 8192 range_alloc_block_size 4096 transaction_alloc_block_size 8192 transaction_prealloc_size 4096 -set @@range_alloc_block_size=1024*16; +==+ Manipulate variable values += +Testing values that are multiples of 1024 +set @@range_alloc_block_size=1024*15+1024; +set @@query_alloc_block_size=1024*15+1024*2; +set @@query_prealloc_size=1024*18-1024; +set @@transaction_alloc_block_size=1024*21-1024*1; +set @@transaction_prealloc_size=1024*21-2048; +==+ Check manipulated values ==+ +SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', +'query_alloc_block_size', 'query_prealloc_size', +'transaction_alloc_block_size', 'transaction_prealloc_size'); +Variable_name Value +query_alloc_block_size 17408 +query_prealloc_size 17408 +range_alloc_block_size 16384 +transaction_alloc_block_size 20480 +transaction_prealloc_size 19456 +==+ Manipulate variable values +== +Testing values that are not 1024 multiples +set @@range_alloc_block_size=1024*16+1023; set @@query_alloc_block_size=1024*17+2; -set @@query_prealloc_size=1024*18; +set @@query_prealloc_size=1024*18-1023; set @@transaction_alloc_block_size=1024*20-1; set @@transaction_prealloc_size=1024*21-1; select @@query_alloc_block_size; @@query_alloc_block_size 17408 -show variables like '%alloc%'; +==+ Check manipulated values ==+ +SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', +'query_alloc_block_size', 'query_prealloc_size', +'transaction_alloc_block_size', 'transaction_prealloc_size'); Variable_name Value query_alloc_block_size 17408 -query_prealloc_size 18432 +query_prealloc_size 17408 range_alloc_block_size 16384 transaction_alloc_block_size 19456 transaction_prealloc_size 20480 +==+ Set values back to the default values +== set @@range_alloc_block_size=default; set @@query_alloc_block_size=default, @@query_prealloc_size=default; set transaction_alloc_block_size=default, @@transaction_prealloc_size=default; -show variables like '%alloc%'; +==+ Check the values not that they are reset +== +SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', +'query_alloc_block_size', 'query_prealloc_size', +'transaction_alloc_block_size', 'transaction_prealloc_size'); Variable_name Value query_alloc_block_size 8192 query_prealloc_size 8192 -- cgit v1.2.1 From a9d707037ab527564bb84885e0af69a2bb793219 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Thu, 26 Feb 2009 19:00:44 +0200 Subject: Bug #41354: Access control is bypassed when all columns of a view are selected by * wildcard Backported a part of the fix for 36086 to 5.0 mysql-test/r/view_grant.result: Bug #41354: test case mysql-test/t/view_grant.test: Bug #41354: test case sql/sql_acl.cc: Bug #41354: return table error when no access and * sql/sql_base.cc: Bug #41354: backported the check in bug 36086 to 5.0 --- mysql-test/r/view_grant.result | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 2f8462045ca..1df8ed335a7 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -919,4 +919,30 @@ c4 DROP DATABASE mysqltest1; DROP DATABASE mysqltest2; DROP USER mysqltest_u1@localhost; +CREATE DATABASE db1; +USE db1; +CREATE TABLE t1(f1 INT, f2 INT); +CREATE VIEW v1 AS SELECT f1, f2 FROM t1; +GRANT SELECT (f1) ON t1 TO foo; +GRANT SELECT (f1) ON v1 TO foo; +USE db1; +SELECT f1 FROM t1; +f1 +SELECT f2 FROM t1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 't1' +SELECT * FROM t1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 't1' +SELECT f1 FROM v1; +f1 +SELECT f2 FROM v1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for column 'f2' in table 'v1' +SELECT * FROM v1; +ERROR 42000: SELECT command denied to user 'foo'@'localhost' for table 'v1' +USE test; +REVOKE SELECT (f1) ON db1.t1 FROM foo; +REVOKE SELECT (f1) ON db1.v1 FROM foo; +DROP USER foo; +DROP VIEW db1.v1; +DROP TABLE db1.t1; +DROP DATABASE db1; End of 5.0 tests. -- cgit v1.2.1 From 2cca1991bd25fe9a085ccb4d66ed39d1e054d495 Mon Sep 17 00:00:00 2001 From: "Bernt M. Johnsen" Date: Thu, 26 Feb 2009 18:17:06 +0100 Subject: Prepared for push (BUG#42567) --- mysql-test/r/group_by.result | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 48f97aeb428..742d4b90807 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1691,3 +1691,15 @@ FROM t1; ERROR 21000: Subquery returns more than 1 row DROP TABLE t1; SET @@sql_mode = @old_sql_mode; +SET @old_sql_mode = @@sql_mode; +SET @@sql_mode='ONLY_FULL_GROUP_BY'; +CREATE TABLE t1(i INT); +INSERT INTO t1 VALUES (1), (10); +SELECT COUNT(i) FROM t1; +COUNT(i) +2 +SELECT COUNT(i) FROM t1 WHERE i > 1; +COUNT(i) +1 +DROP TABLE t1; +SET @@sql_mode = @old_sql_mode; -- cgit v1.2.1 From ee772168032cde8f6dc7abf8155f573ccd96afeb Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 27 Feb 2009 09:41:39 +0200 Subject: addendum to the fix for bug #41354: fixed the error returned by SELECT * --- mysql-test/r/grant2.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index 95748c89103..698e602e2e6 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -433,7 +433,7 @@ USE db1; SELECT c FROM t2; ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2' SELECT * FROM t2; -ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2' +ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for table 't2' SELECT * FROM t1 JOIN t2 USING (b); ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2' USE test; -- cgit v1.2.1 From 1f847d1604b9430356133aa379fe242cfc687cc5 Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Fri, 27 Feb 2009 10:24:57 +0200 Subject: Bug#41893: main.variables mysql-test fails in new variable like '%alloc%' is added. Added ORDER BY clause to I_S query to ensure consistent order. There were differences between 5.1 and 6.0 output. Correcting it 5.1. --- mysql-test/r/variables.result | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index c99d3f314c5..0b56e3c1d52 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -318,13 +318,13 @@ transaction_prealloc_size 4096 SELECT * FROM information_schema.session_variables WHERE variable_name IN ('range_alloc_block_size', 'query_alloc_block_size', 'query_prealloc_size', -'transaction_alloc_block_size', 'transaction_prealloc_size'); +'transaction_alloc_block_size', 'transaction_prealloc_size') ORDER BY 1; VARIABLE_NAME VARIABLE_VALUE +QUERY_ALLOC_BLOCK_SIZE 8192 +QUERY_PREALLOC_SIZE 8192 RANGE_ALLOC_BLOCK_SIZE 4096 TRANSACTION_ALLOC_BLOCK_SIZE 8192 TRANSACTION_PREALLOC_SIZE 4096 -QUERY_PREALLOC_SIZE 8192 -QUERY_ALLOC_BLOCK_SIZE 8192 Testing values that are multiples of 1024 set @@range_alloc_block_size=1024*15+1024; set @@query_alloc_block_size=1024*15+1024*2; -- cgit v1.2.1 From e5a0c0281e0c501e66b82b625ebcd92a9c485ce0 Mon Sep 17 00:00:00 2001 From: Patrick Crews Date: Fri, 27 Feb 2009 15:00:49 +0200 Subject: Bug#41893: Removal of trailing space noise causing Pushbuild failure. --- mysql-test/r/variables.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 04ccf3d688c..fbec38c9a9f 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -292,7 +292,7 @@ transaction_prealloc_size 20480 set @@range_alloc_block_size=default; set @@query_alloc_block_size=default, @@query_prealloc_size=default; set transaction_alloc_block_size=default, @@transaction_prealloc_size=default; -==+ Check the values not that they are reset +== +==+ Check the values now that they are reset +== SHOW VARIABLES WHERE variable_name IN ('range_alloc_block_size', 'query_alloc_block_size', 'query_prealloc_size', 'transaction_alloc_block_size', 'transaction_prealloc_size'); -- cgit v1.2.1 From 15760fe9d8434dc9c960c123945b13890456bb5f Mon Sep 17 00:00:00 2001 From: Georgi Kodinov Date: Fri, 27 Feb 2009 15:25:06 +0200 Subject: Bug #41610: key_infix_len can be overwritten causing some group by queries to return no rows The algorithm of determining the best key for loose index scan is doing a loop over the available indexes and selects the one that has the best cost. It retrieves the parameters of the current index into a set of variables. If the cost of using the current index is lower than the best cost so far it copies these variables into another set of variables that contain the information for the best index so far. After having checked all the indexes it uses these variables (outside of the index loop) to create the table read plan object instance. The was a single omission : the key_infix/key_infix_len variables were used outside of the loop without being preserved in the loop for the best index so far. This causes these variables to get overwritten by the next index(es) checked. Fixed by adding variables to hold the data for the current index, passing the new variables to the function that assigns values to them and copying the new variables into the existing ones when selecting a new current best index. To avoid further such problems moved the declarations of the variables used to keep information about the current index inside the loop's compound statement. mysql-test/r/group_min_max.result: Bug #41610: test case mysql-test/t/group_min_max.test: Bug #41610: test case sql/opt_range.cc: Bug #41610: copy the infix data for the current best index --- mysql-test/r/group_min_max.result | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result index f2f488650d5..58be2af1bb8 100644 --- a/mysql-test/r/group_min_max.result +++ b/mysql-test/r/group_min_max.result @@ -2429,3 +2429,18 @@ id select_type table type possible_keys key key_len ref rows Extra Warnings: Note 1003 select sql_buffer_result `test`.`t1`.`a` AS `a`,(max(`test`.`t1`.`b`) + 1) AS `max(b)+1` from `test`.`t1` where (`test`.`t1`.`a` = 0) group by `test`.`t1`.`a` drop table t1; +CREATE TABLE t1 (a int, b int, c int, d int, +KEY foo (c,d,a,b), KEY bar (c,a,b,d)); +INSERT INTO t1 VALUES (1, 1, 1, 1), (1, 1, 1, 2), (1, 1, 1, 3), (1, 1, 1, 4); +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT * FROM t1; +INSERT INTO t1 SELECT a,b,c+1,d FROM t1; +EXPLAIN SELECT DISTINCT c FROM t1 WHERE d=4; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range NULL foo 10 NULL 9 Using where; Using index for group-by +SELECT DISTINCT c FROM t1 WHERE d=4; +c +1 +2 +DROP TABLE t1; +End of 5.0 tests -- cgit v1.2.1 From 97b68934bca29ab88f63d3887071248c0c602a82 Mon Sep 17 00:00:00 2001 From: Staale Smedseng Date: Fri, 27 Feb 2009 16:11:15 +0200 Subject: Recommit for merging and pushing --- mysql-test/r/preload.result | 4 ++-- mysql-test/r/ps.result | 12 ++++++------ mysql-test/r/repair.result | 2 +- mysql-test/r/rpl_failed_optimize.result | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/preload.result b/mysql-test/r/preload.result index 24a6e594a14..7ed0c62f33a 100644 --- a/mysql-test/r/preload.result +++ b/mysql-test/r/preload.result @@ -144,7 +144,7 @@ Key_reads 0 load index into cache t3, t2 key (primary,b) ; Table Op Msg_type Msg_text test.t3 preload_keys Error Table 'test.t3' doesn't exist -test.t3 preload_keys error Corrupt +test.t3 preload_keys status Operation failed test.t2 preload_keys status OK show status like "key_read%"; Variable_name Value @@ -159,7 +159,7 @@ Key_reads 0 load index into cache t3 key (b), t2 key (c) ; Table Op Msg_type Msg_text test.t3 preload_keys Error Table 'test.t3' doesn't exist -test.t3 preload_keys error Corrupt +test.t3 preload_keys status Operation failed test.t2 preload_keys Error Key 'c' doesn't exist in table 't2' test.t2 preload_keys status Operation failed show status like "key_read%"; diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 09deaf2f322..116014a38d2 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1386,13 +1386,13 @@ execute stmt; Table Op Msg_type Msg_text test.t1 repair status OK test.t4 repair Error Table 'test.t4' doesn't exist -test.t4 repair error Corrupt +test.t4 repair status Operation failed test.t3 repair status OK execute stmt; Table Op Msg_type Msg_text test.t1 repair status OK test.t4 repair Error Table 'test.t4' doesn't exist -test.t4 repair error Corrupt +test.t4 repair status Operation failed test.t3 repair status OK prepare stmt from "optimize table t1, t3, t4"; execute stmt; @@ -1400,23 +1400,23 @@ Table Op Msg_type Msg_text test.t1 optimize status OK test.t3 optimize status OK test.t4 optimize Error Table 'test.t4' doesn't exist -test.t4 optimize error Corrupt +test.t4 optimize status Operation failed execute stmt; Table Op Msg_type Msg_text test.t1 optimize status Table is already up to date test.t3 optimize status Table is already up to date test.t4 optimize Error Table 'test.t4' doesn't exist -test.t4 optimize error Corrupt +test.t4 optimize status Operation failed prepare stmt from "analyze table t4, t1"; execute stmt; Table Op Msg_type Msg_text test.t4 analyze Error Table 'test.t4' doesn't exist -test.t4 analyze error Corrupt +test.t4 analyze status Operation failed test.t1 analyze status Table is already up to date execute stmt; Table Op Msg_type Msg_text test.t4 analyze Error Table 'test.t4' doesn't exist -test.t4 analyze error Corrupt +test.t4 analyze status Operation failed test.t1 analyze status Table is already up to date deallocate prepare stmt; drop table t1, t2, t3; diff --git a/mysql-test/r/repair.result b/mysql-test/r/repair.result index c59a5300e64..e7866ae7656 100644 --- a/mysql-test/r/repair.result +++ b/mysql-test/r/repair.result @@ -27,7 +27,7 @@ drop table t1; repair table t1 use_frm; Table Op Msg_type Msg_text test.t1 repair Error Table 'test.t1' doesn't exist -test.t1 repair error Corrupt +test.t1 repair status Operation failed create table t1 engine=myisam SELECT 1,"table 1"; flush tables; repair table t1; diff --git a/mysql-test/r/rpl_failed_optimize.result b/mysql-test/r/rpl_failed_optimize.result index 33a8cdc4a2f..ff7f6ad6177 100644 --- a/mysql-test/r/rpl_failed_optimize.result +++ b/mysql-test/r/rpl_failed_optimize.result @@ -16,5 +16,5 @@ Error 1205 Lock wait timeout exceeded; try restarting transaction OPTIMIZE TABLE non_existing; Table Op Msg_type Msg_text test.non_existing optimize Error Table 'test.non_existing' doesn't exist -test.non_existing optimize error Corrupt +test.non_existing optimize status Operation failed drop table t1; -- cgit v1.2.1 From ef165e36d9a9397dad36a23250456f578d88e1d9 Mon Sep 17 00:00:00 2001 From: "Bernt M. Johnsen" Date: Mon, 2 Mar 2009 11:03:13 +0100 Subject: Prepared BUG#42711 for push --- mysql-test/r/show_check.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index ad3138e80ea..15f28fb9610 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1094,7 +1094,7 @@ CREATE DATABASE mysqltest1; use mysqltest1; CREATE TABLE t1(1 INT); ----> Dumping mysqltest1 to show_check.mysqltest1.sql +---> Dumping mysqltest1 to outfile1 DROP DATABASE mysqltest1; -- cgit v1.2.1 From 140cc614c944154282fce87064f5e3552406a14c Mon Sep 17 00:00:00 2001 From: Matthias Leich Date: Tue, 3 Mar 2009 21:34:18 +0100 Subject: Last slice of fix for Bug#42003 tests missing the disconnect of connections <> default + Fix for Bug#43114 wait_until_count_sessions too restrictive, random PB failures + Removal of a lot of other weaknesses found + modifications according to review --- mysql-test/r/consistent_snapshot.result | 32 ++++++---- mysql-test/r/dirty_close.result | 10 +-- mysql-test/r/flush_block_commit.result | 74 ++++++++++++++-------- mysql-test/r/flush_block_commit_notembedded.result | 30 +++++---- mysql-test/r/flush_read_lock_kill.result | 17 +++-- mysql-test/r/lock_multi.result | 8 +-- mysql-test/r/mysqlbinlog.result | 16 ++--- mysql-test/r/read_only.result | 2 +- mysql-test/r/show_check.result | 6 +- mysql-test/r/skip_name_resolve.result | 6 +- mysql-test/r/sp-security.result | 16 ++--- mysql-test/r/view.result | 66 +++++++++---------- mysql-test/r/view_grant.result | 4 +- 13 files changed, 162 insertions(+), 125 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/consistent_snapshot.result b/mysql-test/r/consistent_snapshot.result index 90606abbe4e..694c996a58e 100644 --- a/mysql-test/r/consistent_snapshot.result +++ b/mysql-test/r/consistent_snapshot.result @@ -1,15 +1,23 @@ -drop table if exists t1; -create table t1 (a int) engine=innodb; -start transaction with consistent snapshot; -insert into t1 values(1); -select * from t1; +DROP TABLE IF EXISTS t1; +# Establish connection con1 (user=root) +# Establish connection con2 (user=root) +# Switch to connection con1 +CREATE TABLE t1 (a INT) ENGINE=innodb; +START TRANSACTION WITH CONSISTENT SNAPSHOT; +# Switch to connection con2 +INSERT INTO t1 VALUES(1); +# Switch to connection con1 +SELECT * FROM t1; a -commit; -delete from t1; -start transaction; -insert into t1 values(1); -select * from t1; +COMMIT; +DELETE FROM t1; +START TRANSACTION; +# Switch to connection con2 +INSERT INTO t1 VALUES(1); +# Switch to connection con1 +SELECT * FROM t1; a 1 -commit; -drop table t1; +COMMIT; +# Switch to connection default + close connections con1 and con2 +DROP TABLE t1; diff --git a/mysql-test/r/dirty_close.result b/mysql-test/r/dirty_close.result index c4fc19a35f8..b49b72f1b95 100644 --- a/mysql-test/r/dirty_close.result +++ b/mysql-test/r/dirty_close.result @@ -1,9 +1,9 @@ -drop table if exists t1; -create table t1 (n int); -insert into t1 values (1),(2),(3); -select * from t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (n INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT * FROM t1; n 1 2 3 -drop table t1; +DROP TABLE t1; diff --git a/mysql-test/r/flush_block_commit.result b/mysql-test/r/flush_block_commit.result index d5b10868358..d2197beaaab 100644 --- a/mysql-test/r/flush_block_commit.result +++ b/mysql-test/r/flush_block_commit.result @@ -1,39 +1,57 @@ -drop table if exists t1; -create table t1 (a int) engine=innodb; -begin; -insert into t1 values(1); -flush tables with read lock; -select * from t1; +# Establish connection con1 (user=root) +# Establish connection con2 (user=root) +# Establish connection con3 (user=root) +# Switch to connection con1 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT) ENGINE=innodb; +BEGIN; +INSERT INTO t1 VALUES(1); +# Switch to connection con2 +FLUSH TABLES WITH READ LOCK; +SELECT * FROM t1; a -commit; -select * from t1; +# Switch to connection con1 +COMMIT; +# Switch to connection con2 +SELECT * FROM t1; a -unlock tables; -begin; -select * from t1 for update; +UNLOCK TABLES; +# Switch to connection con1 +# Switch to connection con1 +BEGIN; +SELECT * FROM t1 FOR UPDATE; a 1 -begin; -select * from t1 for update; -flush tables with read lock; -commit; +# Switch to connection con2 +BEGIN; +SELECT * FROM t1 FOR UPDATE; +# Switch to connection con3 +FLUSH TABLES WITH READ LOCK; +# Switch to connection con1 +COMMIT; +# Switch to connection con2 a 1 -unlock tables; -commit; -begin; -insert into t1 values(10); -flush tables with read lock; -commit; -unlock tables; -flush tables with read lock; -unlock tables; -begin; -select * from t1; +# Switch to connection con3 +UNLOCK TABLES; +# Switch to connection con2 +COMMIT; +# Switch to connection con1 +BEGIN; +INSERT INTO t1 VALUES(10); +FLUSH TABLES WITH READ LOCK; +COMMIT; +UNLOCK TABLES; +# Switch to connection con2 +FLUSH TABLES WITH READ LOCK; +UNLOCK TABLES; +BEGIN; +SELECT * FROM t1; a 1 10 -show create database test; +SHOW CREATE DATABASE test; Database Create Database test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */ -drop table t1; +DROP TABLE t1; +# Switch to connection default and close connections con1, con2, con3 diff --git a/mysql-test/r/flush_block_commit_notembedded.result b/mysql-test/r/flush_block_commit_notembedded.result index 599efeb3e2d..76c55e948dd 100644 --- a/mysql-test/r/flush_block_commit_notembedded.result +++ b/mysql-test/r/flush_block_commit_notembedded.result @@ -1,15 +1,23 @@ -create table t1 (a int) engine=innodb; -reset master; -set autocommit=0; -insert t1 values (1); -flush tables with read lock; -show master status; +# Establish connection con1 (user=root) +# Establish connection con2 (user=root) +# Switch to connection con1 +CREATE TABLE t1 (a INT) ENGINE=innodb; +RESET MASTER; +SET AUTOCOMMIT=0; +INSERT t1 VALUES (1); +# Switch to connection con2 +FLUSH TABLES WITH READ LOCK; +SHOW MASTER STATUS; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 98 -commit; -show master status; +# Switch to connection con1 +COMMIT; +# Switch to connection con2 +SHOW MASTER STATUS; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 98 -unlock tables; -drop table t1; -set autocommit=1; +UNLOCK TABLES; +# Switch to connection con1 +DROP TABLE t1; +SET AUTOCOMMIT=1; +# Switch to connection default and close connections con1 and con2 diff --git a/mysql-test/r/flush_read_lock_kill.result b/mysql-test/r/flush_read_lock_kill.result index 6703b6bd533..b16a8b114b3 100644 --- a/mysql-test/r/flush_read_lock_kill.result +++ b/mysql-test/r/flush_read_lock_kill.result @@ -1,9 +1,12 @@ -drop table if exists t1; -create table t1 (kill_id int); -insert into t1 values(connection_id()); -flush tables with read lock; -select ((@id := kill_id) - kill_id) from t1; +SET @old_concurrent_insert= @@global.concurrent_insert; +SET @@global.concurrent_insert= 0; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (kill_id INT); +INSERT INTO t1 VALUES(connection_id()); +FLUSH TABLES WITH READ LOCK; +SELECT ((@id := kill_id) - kill_id) FROM t1; ((@id := kill_id) - kill_id) 0 -kill connection @id; -drop table t1; +KILL CONNECTION @id; +DROP TABLE t1; +SET @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index 0430d560a7a..d1b50a0080c 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -51,10 +51,10 @@ ERROR HY000: Can't execute the query because you have a conflicting read lock UNLOCK TABLES; DROP DATABASE mysqltest_1; ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist -use mysql; +USE mysql; LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE; FLUSH TABLES; -use mysql; +USE mysql; SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1; OPTIMIZE TABLES columns_priv, db, host, user; Table Op Msg_type Msg_text @@ -65,7 +65,7 @@ mysql.user optimize status OK UNLOCK TABLES; Select_priv N -use test; +USE test; use test; CREATE TABLE t1 (c1 int); LOCK TABLE t1 WRITE; @@ -93,7 +93,7 @@ create table t1 (a int); connection: locker lock tables t1 read; connection: writer -create table t2 like t1;; +create table t2 like t1; connection: default kill query ERROR 70100: Query execution was interrupted diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 4fd87861ded..83e1459b71a 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -349,17 +349,17 @@ DELIMITER ; ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; CREATE TABLE t1 (c1 CHAR(10)); -flush logs; +FLUSH LOGS; INSERT INTO t1 VALUES ('0123456789'); -flush logs; +FLUSH LOGS; DROP TABLE t1; # Query thread_id=REMOVED exec_time=REMOVED error_code=REMOVED -flush logs; -create table t1(a int); -insert into t1 values(connection_id()); -flush logs; -drop table t1; +FLUSH LOGS; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES(connection_id()); +FLUSH LOGS; +DROP TABLE t1; 1 -drop table t1; +DROP TABLE t1; shell> mysqlbinlog std_data/corrupt-relay-bin.000624 > var/tmp/bug31793.sql End of 5.0 tests diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result index 1bf99a8ea07..4b405ddd71a 100644 --- a/mysql-test/r/read_only.result +++ b/mysql-test/r/read_only.result @@ -47,7 +47,7 @@ Note 1051 Unknown table 'ttt' drop table t1,t2; drop user test@localhost; # -# Bug #27440 read_only allows create and drop database +# Bug#27440 read_only allows create and drop database # drop database if exists mysqltest_db1; drop database if exists mysqltest_db2; diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index ad3138e80ea..70e7a95fc5b 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -507,9 +507,9 @@ ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'mysql drop table mysqltest.t1; drop database mysqltest; set names binary; -delete from mysql.user +delete from mysql.user where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; -delete from mysql.db +delete from mysql.db where user='mysqltest_1' || user='mysqltest_2' || user='mysqltest_3'; flush privileges; CREATE TABLE t1 (i int, KEY (i)) ENGINE=MEMORY; @@ -916,7 +916,7 @@ def TRIGGERS DEFINER Definer 252 589815 14 N 17 0 33 Trigger Event Table Statement Timing Created sql_mode Definer t1_bi INSERT t1 SET @a = 1 BEFORE NULL root@localhost ---------------------------------------------------------------- -SELECT +SELECT TRIGGER_CATALOG, TRIGGER_SCHEMA, TRIGGER_NAME, diff --git a/mysql-test/r/skip_name_resolve.result b/mysql-test/r/skip_name_resolve.result index 8ef52e75238..47741fed250 100644 --- a/mysql-test/r/skip_name_resolve.result +++ b/mysql-test/r/skip_name_resolve.result @@ -5,10 +5,10 @@ GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255' GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255' REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255'; DROP USER mysqltest_1@'127.0.0.1/255.255.255.255'; -select user(); -user() +SELECT USER(); +USER() # -show processlist; +SHOW PROCESSLIST; Id User Host db Command Time State Info root test