Commit c18307e8 authored by jimw@mysql.com's avatar jimw@mysql.com

Cleanup tests and results after merge from 4.1 of embedded

server testing cleanups.
parent c2cfa5e4
...@@ -1606,7 +1606,7 @@ t2 CREATE TABLE `t2` ( ...@@ -1606,7 +1606,7 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t2; drop table t2;
create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb; create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
ERROR HY000: Can't create table './test/t2.frm' (errno: 150) ERROR HY000: Can't create table './test/t2' (errno: 150)
create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb; create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
show create table t2; show create table t2;
Table Create Table Table Create Table
...@@ -2360,7 +2360,7 @@ length(v) ...@@ -2360,7 +2360,7 @@ length(v)
65530 65530
drop table t1; drop table t1;
create table t1 (v varchar(65530), key(v)); create table t1 (v varchar(65530), key(v));
ERROR HY000: Can't create table './test/t1.frm' (errno: 139) ERROR HY000: Can't create table './test/t1' (errno: 139)
create table t1 (v varchar(65536)); create table t1 (v varchar(65536));
Warnings: Warnings:
Note 1246 Converting column 'v' from VARCHAR to TEXT Note 1246 Converting column 'v' from VARCHAR to TEXT
......
...@@ -6,9 +6,9 @@ reset master; ...@@ -6,9 +6,9 @@ reset master;
insert into t1 select * from t2; insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 1 ERROR 23000: Duplicate entry '2' for key 1
show binlog events; show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
master-bin.000001 79 Query 1 79 use `test`; insert into t1 select * from t2 master-bin.000001 98 Query 1 192 use `test`; insert into t1 select * from t2
select * from t1; select * from t1;
a a
1 1
...@@ -20,6 +20,6 @@ reset master; ...@@ -20,6 +20,6 @@ reset master;
create table t2(unique(a)) select a from t1; create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 1 ERROR 23000: Duplicate entry '1' for key 1
show binlog events; show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3 master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
drop table t1; drop table t1;
...@@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1) master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1)
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 347 Xid 1 # COMMIT /* xid=7 */ master-bin.000001 347 Xid 1 # COMMIT /* xid=8 */
delete from t1; delete from t1;
delete from t2; delete from t2;
reset master; reset master;
...@@ -47,7 +47,7 @@ master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint ...@@ -47,7 +47,7 @@ master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4) master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4)
master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 616 Xid 1 # COMMIT /* xid=24 */ master-bin.000001 616 Xid 1 # COMMIT /* xid=25 */
delete from t1; delete from t1;
delete from t2; delete from t2;
reset master; reset master;
...@@ -74,7 +74,7 @@ master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6) ...@@ -74,7 +74,7 @@ master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6)
master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint
master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7) master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7)
master-bin.000001 703 Xid 1 # COMMIT /* xid=36 */ master-bin.000001 703 Xid 1 # COMMIT /* xid=37 */
delete from t1; delete from t1;
delete from t2; delete from t2;
reset master; reset master;
...@@ -101,7 +101,7 @@ insert into t2 select * from t1; ...@@ -101,7 +101,7 @@ insert into t2 select * from t1;
show binlog events from 98; show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9) master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9)
master-bin.000001 185 Xid 1 # COMMIT /* xid=59 */ master-bin.000001 185 Xid 1 # COMMIT /* xid=60 */
master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1
delete from t1; delete from t1;
delete from t2; delete from t2;
...@@ -112,18 +112,18 @@ insert into t2 select * from t1; ...@@ -112,18 +112,18 @@ insert into t2 select * from t1;
show binlog events from 98; show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 186 Xid 1 # COMMIT /* xid=65 */ master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */
master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1
insert into t1 values(11); insert into t1 values(11);
commit; commit;
show binlog events from 98; show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10)
master-bin.000001 186 Xid 1 # COMMIT /* xid=65 */ master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */
master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 307 Query 1 # use `test`; BEGIN master-bin.000001 307 Query 1 # use `test`; BEGIN
master-bin.000001 375 Query 1 # use `test`; insert into t1 values(11) master-bin.000001 375 Query 1 # use `test`; insert into t1 values(11)
master-bin.000001 463 Xid 1 # COMMIT /* xid=67 */ master-bin.000001 463 Xid 1 # COMMIT /* xid=68 */
alter table t2 engine=INNODB; alter table t2 engine=INNODB;
delete from t1; delete from t1;
delete from t2; delete from t2;
...@@ -137,7 +137,7 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -137,7 +137,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12) master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12)
master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1
master-bin.000001 348 Xid 1 # COMMIT /* xid=77 */ master-bin.000001 348 Xid 1 # COMMIT /* xid=78 */
delete from t1; delete from t1;
delete from t2; delete from t2;
reset master; reset master;
...@@ -161,7 +161,7 @@ show binlog events from 98; ...@@ -161,7 +161,7 @@ show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14) master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14)
master-bin.000001 254 Xid 1 # COMMIT /* xid=93 */ master-bin.000001 254 Xid 1 # COMMIT /* xid=94 */
delete from t1; delete from t1;
delete from t2; delete from t2;
reset master; reset master;
...@@ -182,7 +182,7 @@ Log_name Pos Event_type Server_id End_log_pos Info ...@@ -182,7 +182,7 @@ Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 98 Query 1 # use `test`; BEGIN
master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16)
master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18)
master-bin.000001 342 Xid 1 # COMMIT /* xid=104 */ master-bin.000001 342 Xid 1 # COMMIT /* xid=105 */
delete from t1; delete from t1;
delete from t2; delete from t2;
alter table t2 type=MyISAM; alter table t2 type=MyISAM;
......
...@@ -410,18 +410,6 @@ create database mysqltest ; ...@@ -410,18 +410,6 @@ create database mysqltest ;
prepare stmt3 from ' drop database mysqltest '; prepare stmt3 from ' drop database mysqltest ';
ERROR HY000: This command is not supported in the prepared statement protocol yet ERROR HY000: This command is not supported in the prepared statement protocol yet
drop database mysqltest ; drop database mysqltest ;
prepare stmt3 from ' grant all on test.t1 to drop_user@localhost
identified by ''looser'' ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
grant all on test.t1 to drop_user@localhost
identified by 'looser' ;
prepare stmt3 from ' revoke all privileges on test.t1 from
drop_user@localhost ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
revoke all privileges on test.t1 from drop_user@localhost ;
prepare stmt3 from ' drop user drop_user@localhost ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
drop user drop_user@localhost;
prepare stmt3 from ' describe t2 '; prepare stmt3 from ' describe t2 ';
execute stmt3; execute stmt3;
Field Type Null Key Default Extra Field Type Null Key Default Extra
...@@ -572,7 +560,7 @@ drop table t2; ...@@ -572,7 +560,7 @@ drop table t2;
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ; create table t5 (a int) ;
execute stmt1 ; execute stmt1 ;
ERROR HY000: Can't find file: './test/t7.frm' (errno: 2) ERROR HY000: Can't find file: './test/t7' (errno: 2)
create table t7 (a int) ; create table t7 (a int) ;
execute stmt1 ; execute stmt1 ;
execute stmt1 ; execute stmt1 ;
......
...@@ -36,19 +36,19 @@ identified by 'looser' ; ...@@ -36,19 +36,19 @@ identified by 'looser' ;
show grants for second_user@localhost ; show grants for second_user@localhost ;
Grants for second_user@localhost Grants for second_user@localhost
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost'
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
drop table mysqltest.t9 ; drop table mysqltest.t9 ;
show grants for second_user@localhost ; show grants for second_user@localhost ;
Grants for second_user@localhost Grants for second_user@localhost
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost'
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
show grants for second_user@localhost ; show grants for second_user@localhost ;
Grants for second_user@localhost Grants for second_user@localhost
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost'
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
prepare s_t1 from 'select a as my_col from t1' ; prepare s_t1 from 'select a as my_col from t1' ;
execute s_t1 ; execute s_t1 ;
my_col my_col
...@@ -79,3 +79,15 @@ commit ; ...@@ -79,3 +79,15 @@ commit ;
show grants for second_user@localhost ; show grants for second_user@localhost ;
ERROR 42000: There is no such grant defined for user 'second_user' on host 'localhost' ERROR 42000: There is no such grant defined for user 'second_user' on host 'localhost'
drop database mysqltest; drop database mysqltest;
prepare stmt3 from ' grant all on test.t1 to drop_user@localhost
identified by ''looser'' ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
grant all on test.t1 to drop_user@localhost
identified by 'looser' ;
prepare stmt3 from ' revoke all privileges on test.t1 from
drop_user@localhost ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
revoke all privileges on test.t1 from drop_user@localhost ;
prepare stmt3 from ' drop user drop_user@localhost ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
drop user drop_user@localhost;
This diff is collapsed.
This diff is collapsed.
# Can't run with embedded server
-- source include/not_embedded.inc
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes # Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
# sure that basic encoding issues are handled properly # sure that basic encoding issues are handled properly
create table t1 ( create table t1 (
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
# -master.opt. But this test is designed to still pass then (though it # -master.opt. But this test is designed to still pass then (though it
# won't test anything interesting). # won't test anything interesting).
# This also won't work with the embedded server test
-- source include/not_embedded.inc
-- source include/have_debug.inc -- source include/have_debug.inc
connect (con1,localhost,root,,); connect (con1,localhost,root,,);
......
# Can't run with embedded server
-- source include/not_embedded.inc
# Test of GRANT commands # Test of GRANT commands
SET NAMES binary; SET NAMES binary;
......
# This test uses grants, which can't get tested for embedded server
-- source include/not_embedded.inc
# Test for information_schema.schemata & # Test for information_schema.schemata &
# show databases # show databases
......
...@@ -1125,7 +1125,10 @@ show create table t2; ...@@ -1125,7 +1125,10 @@ show create table t2;
drop table t2; drop table t2;
# Test error handling # Test error handling
--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ /
# Clean up filename -- embedded server reports whole path without .frm,
# regular server reports relative path with .frm (argh!)
--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t2.frm t2
--error 1005 --error 1005
create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb; create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
...@@ -1280,6 +1283,9 @@ source include/varchar.inc; ...@@ -1280,6 +1283,9 @@ source include/varchar.inc;
# Some errors/warnings on create # Some errors/warnings on create
# #
# Clean up filename -- embedded server reports whole path without .frm,
# regular server reports relative path with .frm (argh!)
--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t1.frm t1
--error 1005 --error 1005
create table t1 (v varchar(65530), key(v)); create table t1 (v varchar(65530), key(v));
create table t1 (v varchar(65536)); create table t1 (v varchar(65536));
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
# Test of update statement that uses many tables. # Test of update statement that uses many tables.
# #
# Requires grants, so won't work with embedded server test
-- source include/not_embedded.inc
--disable_warnings --disable_warnings
drop table if exists t1,t2,t3; drop table if exists t1,t2,t3;
drop database if exists mysqltest; drop database if exists mysqltest;
......
# Can't run test of external client with embedded server
-- source include/not_embedded.inc
# #
## Bug #5036 mysqlshow is missing a column ## Bug #5036 mysqlshow is missing a column
# #
......
...@@ -436,20 +436,6 @@ create database mysqltest ; ...@@ -436,20 +436,6 @@ create database mysqltest ;
prepare stmt3 from ' drop database mysqltest '; prepare stmt3 from ' drop database mysqltest ';
drop database mysqltest ; drop database mysqltest ;
## grant/revoke + drop user
--error 1295
prepare stmt3 from ' grant all on test.t1 to drop_user@localhost
identified by ''looser'' ';
grant all on test.t1 to drop_user@localhost
identified by 'looser' ;
--error 1295
prepare stmt3 from ' revoke all privileges on test.t1 from
drop_user@localhost ';
revoke all privileges on test.t1 from drop_user@localhost ;
--error 1295
prepare stmt3 from ' drop user drop_user@localhost ';
drop user drop_user@localhost;
#### table related commands #### table related commands
## describe ## describe
prepare stmt3 from ' describe t2 '; prepare stmt3 from ' describe t2 ';
...@@ -606,7 +592,7 @@ prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ; ...@@ -606,7 +592,7 @@ prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ; create table t5 (a int) ;
# rename must fail, t7 does not exist # rename must fail, t7 does not exist
# Clean up the filename here because embedded server reports whole path # Clean up the filename here because embedded server reports whole path
--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / --replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ / t7.frm t7
--error 1017 --error 1017
execute stmt1 ; execute stmt1 ;
create table t7 (a int) ; create table t7 (a int) ;
......
...@@ -116,4 +116,17 @@ show grants for second_user@localhost ; ...@@ -116,4 +116,17 @@ show grants for second_user@localhost ;
drop database mysqltest; drop database mysqltest;
## grant/revoke + drop user
--error 1295
prepare stmt3 from ' grant all on test.t1 to drop_user@localhost
identified by ''looser'' ';
grant all on test.t1 to drop_user@localhost
identified by 'looser' ;
--error 1295
prepare stmt3 from ' revoke all privileges on test.t1 from
drop_user@localhost ';
revoke all privileges on test.t1 from drop_user@localhost ;
--error 1295
prepare stmt3 from ' drop user drop_user@localhost ';
drop user drop_user@localhost;
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
# Testing SQL SECURITY of stored procedures # Testing SQL SECURITY of stored procedures
# #
# Can't test with embedded server that doesn't support grants
-- source include/not_embedded.inc
connect (con1root,localhost,root,,); connect (con1root,localhost,root,,);
connection con1root; connection con1root;
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
# Test behavior of various per-account limits (aka quotas) # Test behavior of various per-account limits (aka quotas)
# #
# Requires privileges to be enabled
-- source include/not_embedded.inc
# Prepare play-ground # Prepare play-ground
--disable_warnings --disable_warnings
drop table if exists t1; drop table if exists t1;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment