Loading extra/perror.c +15 −1 Original line number Diff line number Diff line Loading @@ -243,6 +243,20 @@ int main(int argc,char *argv[]) } else msg= ndb_string; if (msg) { if (verbose) printf("NDB error code %3d: %s\n",code,msg); else puts(msg); } else { fprintf(stderr,"Illegal ndb error code: %d\n",code); error= 1; } found= 1; msg= 0; } else #endif Loading mysql-test/r/fulltext.result +11 −0 Original line number Diff line number Diff line Loading @@ -449,3 +449,14 @@ t1 CREATE TABLE `t1` ( FULLTEXT KEY `a` (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (a TEXT, FULLTEXT KEY(a)); INSERT INTO t1 VALUES('test'),('test1'),('test'); PREPARE stmt from "SELECT a, MATCH(a) AGAINST('test1 test') FROM t1 WHERE MATCH(a) AGAINST('test1 test')"; EXECUTE stmt; a MATCH(a) AGAINST('test1 test') test1 0.68526661396027 EXECUTE stmt; a MATCH(a) AGAINST('test1 test') test1 0.68526661396027 DEALLOCATE PREPARE stmt; DROP TABLE t1; mysql-test/r/func_math.result +15 −0 Original line number Diff line number Diff line Loading @@ -203,3 +203,18 @@ NULL Warnings: Error 1365 Division by 0 set sql_mode=''; select round(111,-10); round(111,-10) 0 select round(-5000111000111000155,-1); round(-5000111000111000155,-1) -5000111000111000160 select round(15000111000111000155,-1); round(15000111000111000155,-1) 15000111000111000160 select truncate(-5000111000111000155,-1); truncate(-5000111000111000155,-1) -5000111000111000150 select truncate(15000111000111000155,-1); truncate(15000111000111000155,-1) 15000111000111000150 mysql-test/r/group_min_max.result +27 −0 Original line number Diff line number Diff line Loading @@ -2043,3 +2043,30 @@ c1 c2 30 8 30 9 drop table t1; CREATE TABLE t1 (a varchar(5), b int(11), PRIMARY KEY (a,b)); INSERT INTO t1 VALUES ('AA',1), ('AA',2), ('AA',3), ('BB',1), ('AA',4); OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK SELECT a FROM t1 WHERE a='AA' GROUP BY a; a AA SELECT a FROM t1 WHERE a='BB' GROUP BY a; a BB EXPLAIN SELECT a FROM t1 WHERE a='AA' GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref PRIMARY PRIMARY 7 const 3 Using where; Using index EXPLAIN SELECT a FROM t1 WHERE a='BB' GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref PRIMARY PRIMARY 7 const 1 Using where; Using index SELECT DISTINCT a FROM t1 WHERE a='BB'; a BB SELECT DISTINCT a FROM t1 WHERE a LIKE 'B%'; a BB SELECT a FROM t1 WHERE a LIKE 'B%' GROUP BY a; a BB DROP TABLE t1; mysql-test/r/having.result +17 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,23 @@ SUM(a) 6 4 DROP TABLE t1; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1), (2), (1), (3), (2), (1); SELECT a FROM t1 GROUP BY a HAVING a > 1; a 2 3 SELECT a FROM t1 GROUP BY a HAVING 1 != 1 AND a > 1; a SELECT 0 AS x, a FROM t1 GROUP BY x,a HAVING x=1 AND a > 1; x a EXPLAIN SELECT a FROM t1 GROUP BY a HAVING 1 != 1 AND a > 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING EXPLAIN SELECT 0 AS x, a FROM t1 GROUP BY x,a HAVING x=1 AND a > 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING DROP table t1; create table t1 (col1 int, col2 varchar(5), col_t1 int); create table t2 (col1 int, col2 varchar(5), col_t2 int); create table t3 (col1 int, col2 varchar(5), col_t3 int); Loading Loading
extra/perror.c +15 −1 Original line number Diff line number Diff line Loading @@ -243,6 +243,20 @@ int main(int argc,char *argv[]) } else msg= ndb_string; if (msg) { if (verbose) printf("NDB error code %3d: %s\n",code,msg); else puts(msg); } else { fprintf(stderr,"Illegal ndb error code: %d\n",code); error= 1; } found= 1; msg= 0; } else #endif Loading
mysql-test/r/fulltext.result +11 −0 Original line number Diff line number Diff line Loading @@ -449,3 +449,14 @@ t1 CREATE TABLE `t1` ( FULLTEXT KEY `a` (`a`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1; CREATE TABLE t1 (a TEXT, FULLTEXT KEY(a)); INSERT INTO t1 VALUES('test'),('test1'),('test'); PREPARE stmt from "SELECT a, MATCH(a) AGAINST('test1 test') FROM t1 WHERE MATCH(a) AGAINST('test1 test')"; EXECUTE stmt; a MATCH(a) AGAINST('test1 test') test1 0.68526661396027 EXECUTE stmt; a MATCH(a) AGAINST('test1 test') test1 0.68526661396027 DEALLOCATE PREPARE stmt; DROP TABLE t1;
mysql-test/r/func_math.result +15 −0 Original line number Diff line number Diff line Loading @@ -203,3 +203,18 @@ NULL Warnings: Error 1365 Division by 0 set sql_mode=''; select round(111,-10); round(111,-10) 0 select round(-5000111000111000155,-1); round(-5000111000111000155,-1) -5000111000111000160 select round(15000111000111000155,-1); round(15000111000111000155,-1) 15000111000111000160 select truncate(-5000111000111000155,-1); truncate(-5000111000111000155,-1) -5000111000111000150 select truncate(15000111000111000155,-1); truncate(15000111000111000155,-1) 15000111000111000150
mysql-test/r/group_min_max.result +27 −0 Original line number Diff line number Diff line Loading @@ -2043,3 +2043,30 @@ c1 c2 30 8 30 9 drop table t1; CREATE TABLE t1 (a varchar(5), b int(11), PRIMARY KEY (a,b)); INSERT INTO t1 VALUES ('AA',1), ('AA',2), ('AA',3), ('BB',1), ('AA',4); OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK SELECT a FROM t1 WHERE a='AA' GROUP BY a; a AA SELECT a FROM t1 WHERE a='BB' GROUP BY a; a BB EXPLAIN SELECT a FROM t1 WHERE a='AA' GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref PRIMARY PRIMARY 7 const 3 Using where; Using index EXPLAIN SELECT a FROM t1 WHERE a='BB' GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ref PRIMARY PRIMARY 7 const 1 Using where; Using index SELECT DISTINCT a FROM t1 WHERE a='BB'; a BB SELECT DISTINCT a FROM t1 WHERE a LIKE 'B%'; a BB SELECT a FROM t1 WHERE a LIKE 'B%' GROUP BY a; a BB DROP TABLE t1;
mysql-test/r/having.result +17 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,23 @@ SUM(a) 6 4 DROP TABLE t1; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1), (2), (1), (3), (2), (1); SELECT a FROM t1 GROUP BY a HAVING a > 1; a 2 3 SELECT a FROM t1 GROUP BY a HAVING 1 != 1 AND a > 1; a SELECT 0 AS x, a FROM t1 GROUP BY x,a HAVING x=1 AND a > 1; x a EXPLAIN SELECT a FROM t1 GROUP BY a HAVING 1 != 1 AND a > 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING EXPLAIN SELECT 0 AS x, a FROM t1 GROUP BY x,a HAVING x=1 AND a > 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible HAVING DROP table t1; create table t1 (col1 int, col2 varchar(5), col_t1 int); create table t2 (col1 int, col2 varchar(5), col_t2 int); create table t3 (col1 int, col2 varchar(5), col_t3 int); Loading