summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2006-02-02 23:27:06 +0300
committerunknown <konstantin@mysql.com>2006-02-02 23:27:06 +0300
commitd297a221fe57486f0fd82e0cf3e7b0e923adee93 (patch)
tree8b23d2acce88a26d289057d5119ca3944903d88f /mysql-test/r
parent5610e9ab8296f661b144bc64702bb612d2038050 (diff)
parent333b1f8594922647278808a4c114c16695551343 (diff)
downloadmariadb-git-d297a221fe57486f0fd82e0cf3e7b0e923adee93.tar.gz
Merge mysql.com:/home/kostja/mysql/tmp_merge
into mysql.com:/home/kostja/mysql/mysql-5.1-merge BitKeeper/etc/ignore: auto-union configure.in: Auto merged libmysql/libmysql.c: Auto merged mysql-test/ndb/ndbcluster.sh: Auto merged mysql-test/r/rpl_sp.result: Auto merged mysql-test/r/sp-error.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/r/type_float.result: Auto merged mysql-test/t/rpl_sp.test: Auto merged mysql-test/t/sp-error.test: Auto merged mysql-test/t/sp.test: Auto merged sql/field.cc: Auto merged sql/item_func.cc: Auto merged sql/mysqld.cc: Auto merged sql/protocol.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged storage/myisam/ft_update.c: Auto merged storage/ndb/include/logger/LogHandler.hpp: Auto merged storage/ndb/include/logger/Logger.hpp: Auto merged storage/ndb/include/mgmapi/mgmapi.h: Auto merged storage/ndb/include/mgmcommon/ConfigRetriever.hpp: Auto merged storage/ndb/src/common/logger/FileLogHandler.cpp: Auto merged storage/ndb/src/common/logger/LogHandler.cpp: Auto merged storage/ndb/src/common/logger/Logger.cpp: Auto merged storage/ndb/src/common/logger/SysLogHandler.cpp: Auto merged storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp: Auto merged storage/ndb/src/common/util/SocketServer.cpp: 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/mgmapi/mgmapi.cpp: Auto merged storage/ndb/src/mgmclient/CommandInterpreter.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.hpp: Auto merged storage/ndb/src/mgmsrv/Services.cpp: Auto merged storage/ndb/src/mgmsrv/Services.hpp: Auto merged storage/ndb/src/mgmsrv/main.cpp: Auto merged storage/ndb/tools/ndb_size.pl: Auto merged zlib/Makefile.am: Auto merged mysql-test/r/information_schema.result: SCCS merged mysql-test/t/information_schema.test: Manual merge. sql/ha_archive.cc: Manual merge. sql/share/errmsg.txt: SCCS merged tests/mysql_client_test.c: Manual merge.
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/fulltext2.result5
-rw-r--r--mysql-test/r/information_schema.result13
-rw-r--r--mysql-test/r/rpl_sp.result13
-rw-r--r--mysql-test/r/sp-error.result19
-rw-r--r--mysql-test/r/sp-security.result21
-rw-r--r--mysql-test/r/sp.result58
-rw-r--r--mysql-test/r/sp_trans.result2
-rw-r--r--mysql-test/r/subselect.result6
-rw-r--r--mysql-test/r/type_float.result22
-rw-r--r--mysql-test/r/type_varchar.result7
10 files changed, 128 insertions, 38 deletions
diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result
index 72c6b2d22ed..f6a4b20bc22 100644
--- a/mysql-test/r/fulltext2.result
+++ b/mysql-test/r/fulltext2.result
@@ -234,5 +234,10 @@ insert into t1 values('test test '),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test'),
('test'),('test'),('test'),('test'),('test'),('test'),('test'),('test');
delete from t1 limit 1;
+truncate table t1;
+insert into t1 values('ab c d');
+update t1 set a='ab c d';
+select * from t1 where match a against('ab c' in boolean mode);
+a
drop table t1;
set names latin1;
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index e367e063201..51d75e7ec41 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1126,6 +1126,19 @@ DROP TABLE t1;
DROP VIEW v1;
DROP FUNCTION func1;
DROP FUNCTION func2;
+create database mysqltest;
+create table mysqltest.t1(a int);
+select table_schema from information_schema.tables where table_schema='mysqltest';
+table_schema
+drop database mysqltest;
+select column_type, group_concat(table_schema, '.', table_name), count(*) as num
+from information_schema.columns where
+table_schema='information_schema' and
+(column_type = 'varchar(7)' or column_type = 'varchar(20)')
+group by column_type order by num;
+column_type group_concat(table_schema, '.', table_name) num
+varchar(20) information_schema.COLUMNS 1
+varchar(7) information_schema.ROUTINES,information_schema.VIEWS 2
select * from information_schema.engines WHERE ENGINE="MyISAM";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
MyISAM ENABLED Default engine as of MySQL 3.23 with great performance NO NO NO
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result
index 1acb57f67d5..8aa0f445438 100644
--- a/mysql-test/r/rpl_sp.result
+++ b/mysql-test/r/rpl_sp.result
@@ -401,5 +401,18 @@ drop function f1;
select * from t1;
a
1
+DROP PROCEDURE IF EXISTS p1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(col VARCHAR(10));
+CREATE PROCEDURE p1(arg VARCHAR(10))
+INSERT INTO t1 VALUES(arg);
+CALL p1('test');
+SELECT * FROM t1;
+col
+test
+SELECT * FROM t1;
+col
+test
+DROP PROCEDURE p1;
drop table t1;
reset master;
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index a74a18375d5..d26f0029001 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -1115,3 +1115,22 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
drop function bug11555_1;
drop table t1;
drop view v1;
+drop procedure if exists ` bug15658`;
+create procedure ``() select 1;
+ERROR 42000: Incorrect routine name ''
+create procedure ` `() select 1;
+ERROR 42000: Incorrect routine name ' '
+create procedure `bug15658 `() select 1;
+ERROR 42000: Incorrect routine name 'bug15658 '
+create procedure ``.bug15658() select 1;
+ERROR 42000: Incorrect database name ''
+create procedure `x `.bug15658() select 1;
+ERROR 42000: Incorrect database name 'x '
+create procedure ` bug15658`() select 1;
+call ` bug15658`();
+1
+1
+show procedure status;
+Db Name Type Definer Modified Created Security_type Comment
+test bug15658 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
+drop procedure ` bug15658`;
diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result
index 614e670f25d..fbc6d64f9c9 100644
--- a/mysql-test/r/sp-security.result
+++ b/mysql-test/r/sp-security.result
@@ -263,3 +263,24 @@ CREATE VIEW v1 AS SELECT test.bug12812()|
ERROR 42000: execute command denied to user 'user_bug12812'@'localhost' for routine 'test.bug12812'
DROP USER user_bug12812@localhost|
drop function bug12812|
+create database db_bug14834;
+create user user1_bug14834@localhost identified by '';
+grant all on `db\_bug14834`.* to user1_bug14834@localhost;
+create user user2_bug14834@localhost identified by '';
+grant all on `db\_bug14834`.* to user2_bug14834@localhost;
+create user user3_bug14834@localhost identified by '';
+grant all on `db__ug14834`.* to user3_bug14834@localhost;
+create procedure p_bug14834() select user(), current_user();
+call p_bug14834();
+user() current_user()
+user1_bug14834@localhost user1_bug14834@localhost
+call p_bug14834();
+user() current_user()
+user2_bug14834@localhost user1_bug14834@localhost
+call p_bug14834();
+user() current_user()
+user3_bug14834@localhost user1_bug14834@localhost
+drop user user1_bug14834@localhost;
+drop user user2_bug14834@localhost;
+drop user user3_bug14834@localhost;
+drop database db_bug14834;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index a025c0503cd..ea4420c8e70 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -1178,8 +1178,8 @@ drop view v2|
delete from t1 |
delete from t2 |
drop table t4|
-drop table if exists fac|
-create table fac (n int unsigned not null primary key, f bigint unsigned)|
+drop table if exists t3|
+create table t3 (n int unsigned not null primary key, f bigint unsigned)|
drop procedure if exists ifac|
create procedure ifac(n int unsigned)
begin
@@ -1189,13 +1189,13 @@ set n = 20; # bigint overflow otherwise
end if;
while i <= n do
begin
-insert into test.fac values (i, fac(i));
+insert into test.t3 values (i, fac(i));
set i = i + 1;
end;
end while;
end|
call ifac(20)|
-select * from fac|
+select * from t3|
n f
1 1
2 2
@@ -1217,7 +1217,7 @@ n f
18 6402373705728000
19 121645100408832000
20 2432902008176640000
-drop table fac|
+drop table t3|
show function status like '%f%'|
Db Name Type Definer Modified Created Security_type Comment
test fac FUNCTION root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
@@ -1225,12 +1225,12 @@ drop procedure ifac|
drop function fac|
show function status like '%f%'|
Db Name Type Definer Modified Created Security_type Comment
-drop table if exists primes|
-create table primes (
+drop table if exists t3|
+create table t3 (
i int unsigned not null primary key,
p bigint unsigned not null
)|
-insert into primes values
+insert into t3 values
( 0, 3), ( 1, 5), ( 2, 7), ( 3, 11), ( 4, 13),
( 5, 17), ( 6, 19), ( 7, 23), ( 8, 29), ( 9, 31),
(10, 37), (11, 41), (12, 43), (13, 47), (14, 53),
@@ -1253,7 +1253,7 @@ set b = b+200, s = 0;
else
begin
declare p bigint unsigned;
-select t.p into p from test.primes t where t.i = s;
+select t.p into p from test.t3 t where t.i = s;
if b+p > r then
set pp = 1;
leave again;
@@ -1278,7 +1278,7 @@ begin
declare pp bool default 0;
call opp(p, pp);
if pp then
-insert into test.primes values (i, p);
+insert into test.t3 values (i, p);
set i = i+1;
end if;
set p = p+2;
@@ -1299,7 +1299,7 @@ set b = b+200, s = 0;
else
begin
declare p bigint unsigned;
-select t.p into p from test.primes t where t.i = s;
+select t.p into p from test.t3 t where t.i = s;
if b+p > r then
set pp = 1;
leave again;
@@ -1318,47 +1318,47 @@ Db Name Type Definer Modified Created Security_type Comment
test ip PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
test opp PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER
call ip(200)|
-select * from primes where i=45 or i=100 or i=199|
+select * from t3 where i=45 or i=100 or i=199|
i p
45 211
100 557
199 1229
-drop table primes|
+drop table t3|
drop procedure opp|
drop procedure ip|
show procedure status like '%p%'|
Db Name Type Definer Modified Created Security_type Comment
-drop table if exists fib|
-create table fib ( f bigint unsigned not null )|
+drop table if exists t3|
+create table t3 ( f bigint unsigned not null )|
drop procedure if exists fib|
create procedure fib(n int unsigned)
begin
if n > 1 then
begin
declare x, y bigint unsigned;
-declare c cursor for select f from fib order by f desc limit 2;
+declare c cursor for select f from t3 order by f desc limit 2;
open c;
fetch c into y;
fetch c into x;
close c;
-insert into fib values (x+y);
+insert into t3 values (x+y);
call fib(n-1);
end;
end if;
end|
set @@max_sp_recursion_depth= 20|
-insert into fib values (0), (1)|
+insert into t3 values (0), (1)|
call fib(3)|
-select * from fib order by f asc|
+select * from t3 order by f asc|
f
0
1
1
2
-delete from fib|
-insert into fib values (0), (1)|
-call fib(20)|
-select * from fib order by f asc|
+delete from t3|
+insert into t3 values (0), (1)|
+call fib(10)|
+select * from t3 order by f asc|
f
0
1
@@ -1371,17 +1371,7 @@ f
21
34
55
-89
-144
-233
-377
-610
-987
-1597
-2584
-4181
-6765
-drop table fib|
+drop table t3|
drop procedure fib|
set @@max_sp_recursion_depth= 0|
drop procedure if exists bar|
diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result
index 8f2bd9985fc..e9289cf01c7 100644
--- a/mysql-test/r/sp_trans.result
+++ b/mysql-test/r/sp_trans.result
@@ -1,4 +1,4 @@
-drop table if exists t1, t2;
+drop table if exists t1, t2, t3;
drop procedure if exists bug8850|
create table t1 (a int) engine=innodb|
create procedure bug8850()
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 6094d23b0d0..85976c211c5 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -215,9 +215,9 @@ select * from t1 where t1.a=(select t2.a from t2 where t2.b=(select max(a) from
a
select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
b (select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)
-8 7.5000
-8 4.5000
-9 7.5000
+8 7.5
+8 4.5
+9 7.5
explain extended select b,(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2) from t4;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t4 ALL NULL NULL NULL NULL 3
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 352dd55653b..1e5373ba766 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -240,6 +240,28 @@ t3 CREATE TABLE `t3` (
`d` double(22,9) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
+create table t1 select 105213674794682365.00 + 0.0 x;
+show warnings;
+Level Code Message
+desc t1;
+Field Type Null Key Default Extra
+x decimal(21,2) unsigned NO 0.00
+drop table t1;
+create table t1 select 0.0 x;
+desc t1;
+Field Type Null Key Default Extra
+x decimal(2,1) unsigned NO 0.0
+create table t2 select 105213674794682365.00 y;
+desc t2;
+Field Type Null Key Default Extra
+y decimal(20,2) unsigned NO 0.00
+create table t3 select x+y a from t1,t2;
+show warnings;
+Level Code Message
+desc t3;
+Field Type Null Key Default Extra
+a decimal(21,2) unsigned NO 0.00
+drop table t1,t2,t3;
create table t1 (s1 float(0,2));
ERROR 42000: For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 's1').
create table t1 (s1 float(1,2));
diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result
index e3b12cc36e3..e74850bba33 100644
--- a/mysql-test/r/type_varchar.result
+++ b/mysql-test/r/type_varchar.result
@@ -415,3 +415,10 @@ t1 CREATE TABLE `t1` (
KEY `index1` (`f1`(10))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(f1 VARCHAR(100) DEFAULT 'test');
+INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(f1 CHAR(100) DEFAULT 'test');
+INSERT INTO t1 VALUES(SUBSTR(f1, 1, 3));
+DROP TABLE IF EXISTS t1;