Commit 4189e7c8 authored by unknown's avatar unknown

Cleanup tests and results after merge from 4.1 of embedded

server testing cleanups.


mysql-test/r/innodb.result:
  Update results
mysql-test/r/insert_select-binlog.result:
  Update results
mysql-test/r/mix_innodb_myisam_binlog.result:
  Update results
mysql-test/r/ps_1general.result:
  Update results
mysql-test/r/ps_grant.result:
  Update results
mysql-test/r/view.result:
  Update results
mysql-test/t/client_xml.test:
  Skip test with embedded server
mysql-test/t/flush_read_lock_kill.test:
  Skip test with embedded server
mysql-test/t/grant3.test:
  Skip test with embedded server
mysql-test/t/information_schema.test:
  Skip test with embedded server
mysql-test/t/innodb.test:
  Fix up filenames
mysql-test/t/multi_update.test:
  Skip test with embedded server
mysql-test/t/mysqlshow.test:
  Skip test with embedded server
mysql-test/t/ps_1general.test:
  Move grant-related tests to ps_grant, and fix cleanup of filename
mysql-test/t/ps_grant.test:
  Add additional tests
mysql-test/t/sp-security.test:
  Skip test with embedded server
mysql-test/t/user_limits.test:
  Skip test with embedded server
mysql-test/t/view.test:
  Split grant-related tests to new test file view_grant
parent bee2a64d
......@@ -1606,7 +1606,7 @@ t2 CREATE TABLE `t2` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
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;
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;
show create table t2;
Table Create Table
......@@ -2360,7 +2360,7 @@ length(v)
65530
drop table t1;
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));
Warnings:
Note 1246 Converting column 'v' from VARCHAR to TEXT
......
......@@ -6,9 +6,9 @@ reset master;
insert into t1 select * from t2;
ERROR 23000: Duplicate entry '2' for key 1
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
master-bin.000001 79 Query 1 79 use `test`; insert into t1 select * from t2
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
master-bin.000001 98 Query 1 192 use `test`; insert into t1 select * from t2
select * from t1;
a
1
......@@ -20,6 +20,6 @@ reset master;
create table t2(unique(a)) select a from t1;
ERROR 23000: Duplicate entry '1' for key 1
show binlog events;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.000001 4 Start 1 4 Server ver: VERSION, Binlog ver: 3
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server ver: VERSION, Binlog ver: 4
drop table t1;
......@@ -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 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 347 Xid 1 # COMMIT /* xid=7 */
master-bin.000001 347 Xid 1 # COMMIT /* xid=8 */
delete from t1;
delete from t2;
reset master;
......@@ -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 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 616 Xid 1 # COMMIT /* xid=24 */
master-bin.000001 616 Xid 1 # COMMIT /* xid=25 */
delete from t1;
delete from t2;
reset master;
......@@ -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 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 703 Xid 1 # COMMIT /* xid=36 */
master-bin.000001 703 Xid 1 # COMMIT /* xid=37 */
delete from t1;
delete from t2;
reset master;
......@@ -101,7 +101,7 @@ insert into t2 select * from t1;
show binlog events from 98;
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 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
delete from t1;
delete from t2;
......@@ -112,18 +112,18 @@ insert into t2 select * from t1;
show binlog events from 98;
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 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
insert into t1 values(11);
commit;
show binlog events from 98;
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 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 307 Query 1 # use `test`; BEGIN
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;
delete from t1;
delete from t2;
......@@ -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 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 348 Xid 1 # COMMIT /* xid=77 */
master-bin.000001 348 Xid 1 # COMMIT /* xid=78 */
delete from t1;
delete from t2;
reset master;
......@@ -161,7 +161,7 @@ show binlog events from 98;
Log_name Pos Event_type Server_id End_log_pos Info
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 254 Xid 1 # COMMIT /* xid=93 */
master-bin.000001 254 Xid 1 # COMMIT /* xid=94 */
delete from t1;
delete from t2;
reset master;
......@@ -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 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 342 Xid 1 # COMMIT /* xid=104 */
master-bin.000001 342 Xid 1 # COMMIT /* xid=105 */
delete from t1;
delete from t2;
alter table t2 type=MyISAM;
......
......@@ -410,18 +410,6 @@ create database mysqltest ;
prepare stmt3 from ' drop database mysqltest ';
ERROR HY000: This command is not supported in the prepared statement protocol yet
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 ';
execute stmt3;
Field Type Null Key Default Extra
......@@ -572,7 +560,7 @@ drop table t2;
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ;
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) ;
execute stmt1 ;
execute stmt1 ;
......
......@@ -36,19 +36,19 @@ identified by 'looser' ;
show grants for second_user@localhost ;
Grants for second_user@localhost
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`.`t9` TO 'second_user'@'localhost'
drop table mysqltest.t9 ;
show grants for second_user@localhost ;
Grants for second_user@localhost
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`.`t9` TO 'second_user'@'localhost'
show grants for second_user@localhost ;
Grants for second_user@localhost
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`.`t9` TO 'second_user'@'localhost'
prepare s_t1 from 'select a as my_col from t1' ;
execute s_t1 ;
my_col
......@@ -79,3 +79,15 @@ commit ;
show grants for second_user@localhost ;
ERROR 42000: There is no such grant defined for user 'second_user' on host 'localhost'
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
# sure that basic encoding issues are handled properly
create table t1 (
......
......@@ -7,6 +7,9 @@
# -master.opt. But this test is designed to still pass then (though it
# 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
connect (con1,localhost,root,,);
......
# Can't run with embedded server
-- source include/not_embedded.inc
# Test of GRANT commands
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 &
# show databases
......
......@@ -1125,7 +1125,10 @@ show create table t2;
drop table t2;
# 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
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;
# 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
create table t1 (v varchar(65530), key(v));
create table t1 (v varchar(65536));
......
......@@ -2,6 +2,9 @@
# 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
drop table if exists t1,t2,t3;
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
#
......
......@@ -436,20 +436,6 @@ create database mysqltest ;
prepare stmt3 from ' 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
## describe
prepare stmt3 from ' describe t2 ';
......@@ -606,7 +592,7 @@ prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ;
# rename must fail, t7 does not exist
# 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
execute stmt1 ;
create table t7 (a int) ;
......
......@@ -116,4 +116,17 @@ show grants for second_user@localhost ;
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 @@
# 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,,);
connection con1root;
......
......@@ -2,6 +2,9 @@
# Test behavior of various per-account limits (aka quotas)
#
# Requires privileges to be enabled
-- source include/not_embedded.inc
# Prepare play-ground
--disable_warnings
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