summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2006-02-09 13:35:59 +0300
committerunknown <konstantin@mysql.com>2006-02-09 13:35:59 +0300
commitd7becbc2c8af24dd236ecdbb511a6a88745b9117 (patch)
tree5cb0dfc9bfbaf2c7fe5b62e6e2c4eb3240c19f9a /mysql-test/r
parent1b09a63e0785c549c9b801c74255d21f6c4934df (diff)
parent5ffc2dc202e49607b91851f3e44f60f49f175294 (diff)
downloadmariadb-git-d7becbc2c8af24dd236ecdbb511a6a88745b9117.tar.gz
Merge mysql.com:/home/kostja/mysql/mysql-5.0-root
into mysql.com:/home/kostja/mysql/mysql-5.1-merge BitKeeper/deleted/.del-ndb_load.result: Delete: mysql-test/r/ndb_load.result BitKeeper/deleted/.del-ndb_load.test: Delete: mysql-test/t/ndb_load.test extra/perror.c: Auto merged mysql-test/r/fulltext.result: Auto merged mysql-test/r/ndb_blob.result: Auto merged mysql-test/r/sp-code.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/t/fulltext.test: Auto merged mysql-test/t/sp-destruct.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/view.test: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged sql/item_func.cc: Auto merged sql/opt_range.cc: Auto merged sql/sp.cc: Auto merged sql/sp.h: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_yacc.yy: Auto merged storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp: Auto merged storage/ndb/src/kernel/main.cpp: Auto merged storage/ndb/src/kernel/vm/Configuration.cpp: Auto merged storage/ndb/src/kernel/vm/Configuration.hpp: Auto merged storage/ndb/src/ndbapi/NdbBlob.cpp: Auto merged storage/ndb/test/ndbapi/testBlobs.cpp: Auto merged storage/ndb/tools/delete_all.cpp: Auto merged mysql-test/t/disabled.def: Manual merge.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/fulltext.result11
-rw-r--r--mysql-test/r/func_math.result15
-rw-r--r--mysql-test/r/group_min_max.result27
-rw-r--r--mysql-test/r/having.result17
-rw-r--r--mysql-test/r/ndb_blob.result7
-rw-r--r--mysql-test/r/ndb_index_unique.result9
-rw-r--r--mysql-test/r/sp-code.result2
-rw-r--r--mysql-test/r/sp-destruct.result8
-rw-r--r--mysql-test/r/sp.result7
-rw-r--r--mysql-test/r/view.result34
10 files changed, 133 insertions, 4 deletions
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index 4ee95cffb00..b5084fff165 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -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;
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index fba274b9bb1..1507f959ae6 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -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
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index 91579a7ea42..b1703c51f4e 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -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;
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index 379c2f83c78..e54f6d7f2a4 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -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);
diff --git a/mysql-test/r/ndb_blob.result b/mysql-test/r/ndb_blob.result
index f28cb865962..9c76d46f4f0 100644
--- a/mysql-test/r/ndb_blob.result
+++ b/mysql-test/r/ndb_blob.result
@@ -428,6 +428,13 @@ delete from t1;
select * from t1;
a b
commit;
+replace t1 set a=2, b='y';
+select * from t1;
+a b
+2 y
+delete from t1;
+select * from t1;
+a b
drop table t1;
set autocommit=0;
create table t1 (
diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result
index 1401ae26ddb..7864a5d1354 100644
--- a/mysql-test/r/ndb_index_unique.result
+++ b/mysql-test/r/ndb_index_unique.result
@@ -626,3 +626,12 @@ select * from t1 where code = '12' and month = 4 and year = 2004 ;
id month year code
1 4 2004 12
drop table t1;
+create table t1 (a int primary key, b varchar(1000) not null, unique key (b))
+engine=ndb charset=utf8;
+insert into t1 values (1, repeat(_utf8 0xe288ab6474, 200));
+insert into t1 values (2, repeat(_utf8 0xe288ab6474, 200));
+ERROR 23000: Duplicate entry '2' for key 1
+select a, sha1(b) from t1;
+a sha1(b)
+1 08f5d02c8b8bc244f275bdfc22c42c5cab0d9d7d
+drop table t1;
diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result
index bb0adae6bab..4156b351281 100644
--- a/mysql-test/r/sp-code.result
+++ b/mysql-test/r/sp-code.result
@@ -172,7 +172,7 @@ Pos Instruction
17 set v_col@8 NULL
18 stmt 0 "select row,col into v_row,v_col from ..."
19 stmt 0 "select dig into v_dig from sudoku_wor..."
-20 set_case_expr 0 v_dig@4
+20 set_case_expr (34) 0 v_dig@4
21 jump_if_not 25(34) (case_expr@0 = 0)
22 set v_dig@4 1
23 stmt 4 "update sudoku_work set dig = 1 where ..."
diff --git a/mysql-test/r/sp-destruct.result b/mysql-test/r/sp-destruct.result
index 1b720be9403..4df8086c84e 100644
--- a/mysql-test/r/sp-destruct.result
+++ b/mysql-test/r/sp-destruct.result
@@ -72,6 +72,12 @@ drop trigger t1_ai;
create trigger t1_ai after insert on t1 for each row call bug14233_3();
insert into t1 values (0);
ERROR HY000: Failed to load routine test.bug14233_3. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
-delete from mysql.proc where name like 'bug14233%';
drop trigger t1_ai;
drop table t1;
+drop function bug14233_1;
+drop function bug14233_2;
+drop procedure bug14233_3;
+show procedure status;
+Db Name Type Definer Modified Created Security_type Comment
+show function status;
+Db Name Type Definer Modified Created Security_type Comment
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 761d4b83a39..fd0913d3961 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -4011,8 +4011,6 @@ NULL 1
call bug14643_2()|
Handler
boo
-2
-2
Handler
boo
drop procedure bug14643_1|
@@ -4360,6 +4358,11 @@ Handler
error
End
done
+call bug14498_4()|
+Handler
+error
+End
+done
call bug14498_5()|
Handler
error
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index af49099836f..5396db82965 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2495,3 +2495,37 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
DROP VIEW v1;
DROP TABLE t1;
+CREATE TABLE t1 (x varchar(10));
+INSERT INTO t1 VALUES (null), ('foo'), ('bar'), (null);
+CREATE VIEW v1 AS SELECT * FROM t1;
+SELECT IF(x IS NULL, 'blank', 'not blank') FROM v1 GROUP BY x;
+IF(x IS NULL, 'blank', 'not blank')
+blank
+not blank
+not blank
+SELECT IF(x IS NULL, 'blank', 'not blank') AS x FROM t1 GROUP BY x;
+x
+blank
+not blank
+not blank
+Warnings:
+Warning 1052 Column 'x' in group statement is ambiguous
+SELECT IF(x IS NULL, 'blank', 'not blank') AS x FROM v1;
+x
+blank
+not blank
+not blank
+blank
+SELECT IF(x IS NULL, 'blank', 'not blank') AS y FROM v1 GROUP BY y;
+y
+blank
+not blank
+SELECT IF(x IS NULL, 'blank', 'not blank') AS x FROM v1 GROUP BY x;
+x
+blank
+not blank
+not blank
+Warnings:
+Warning 1052 Column 'x' in group statement is ambiguous
+DROP VIEW v1;
+DROP TABLE t1;