summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/alter_table.test20
-rw-r--r--mysql-test/t/bdb-deadlock.test2
-rw-r--r--mysql-test/t/connect.test3
-rw-r--r--mysql-test/t/ctype_ucs.test17
-rw-r--r--mysql-test/t/ctype_ucs_binlog.test19
-rw-r--r--mysql-test/t/drop.test22
-rw-r--r--mysql-test/t/drop_temp_table.test3
-rw-r--r--mysql-test/t/flush_block_commit.test4
-rw-r--r--mysql-test/t/grant.test23
-rw-r--r--mysql-test/t/grant2.test3
-rw-r--r--mysql-test/t/grant_cache.test2
-rw-r--r--mysql-test/t/innodb-deadlock.test2
-rw-r--r--mysql-test/t/innodb-lock.test2
-rw-r--r--mysql-test/t/innodb-replace.test17
-rw-r--r--mysql-test/t/innodb.test15
-rw-r--r--mysql-test/t/insert_select-binlog.test34
-rw-r--r--mysql-test/t/insert_select.test31
-rw-r--r--mysql-test/t/kill.test13
-rw-r--r--mysql-test/t/lowercase_table_grant.test3
-rw-r--r--mysql-test/t/mix_innodb_myisam_binlog.test3
-rw-r--r--mysql-test/t/mysql_protocols.test2
-rw-r--r--mysql-test/t/mysqlbinlog.test3
-rw-r--r--mysql-test/t/mysqlbinlog2.test3
-rw-r--r--mysql-test/t/mysqldump.test3
-rw-r--r--mysql-test/t/ndb_types.test40
-rw-r--r--mysql-test/t/packet.test2
-rw-r--r--mysql-test/t/ps_1general.test117
-rw-r--r--mysql-test/t/ps_grant.test119
-rw-r--r--mysql-test/t/rename.test4
-rw-r--r--mysql-test/t/rpl_variables.test4
-rw-r--r--mysql-test/t/select.test4
-rw-r--r--mysql-test/t/show_check.test4
-rw-r--r--mysql-test/t/skip_name_resolve.test3
-rw-r--r--mysql-test/t/system_mysql_db_fix.test3
-rw-r--r--mysql-test/t/timezone2.test68
-rw-r--r--mysql-test/t/timezone_grant.test71
-rw-r--r--mysql-test/t/type_blob.test30
-rw-r--r--mysql-test/t/type_float.test4
-rw-r--r--mysql-test/t/type_ranges.test9
-rw-r--r--mysql-test/t/user_var-binlog.test19
-rw-r--r--mysql-test/t/user_var.test18
-rw-r--r--mysql-test/t/variables.test2
42 files changed, 466 insertions, 304 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index c2277dc1755..92651442041 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -41,6 +41,7 @@ PRIMARY KEY (GROUP_ID,LANG_ID),
KEY NAME (NAME));
#show table status like "t1";
ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
+--replace_column 8 #
SHOW FULL COLUMNS FROM t1;
DROP TABLE t1;
@@ -108,25 +109,6 @@ drop table t1;
drop database mysqltest;
#
-# Rights for renaming test (Bug #3270)
-#
-connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-connection root;
---disable_warnings
-create database mysqltest;
---enable_warnings
-create table mysqltest.t1 (a int,b int,c int);
-grant all on mysqltest.t1 to mysqltest_1@localhost;
-connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
-connection user1;
--- error 1142
-alter table t1 rename t2;
-connection root;
-revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
-delete from mysql.user where user=_binary'mysqltest_1';
-drop database mysqltest;
-
-#
# ALTER TABLE ... ENABLE/DISABLE KEYS
create table t1 (n1 int not null, n2 int, n3 int, n4 float,
diff --git a/mysql-test/t/bdb-deadlock.test b/mysql-test/t/bdb-deadlock.test
index d86403fcffc..5e6ca666cc2 100644
--- a/mysql-test/t/bdb-deadlock.test
+++ b/mysql-test/t/bdb-deadlock.test
@@ -5,7 +5,7 @@
# connection in a separate thread.
#
-#-- source include/not_embedded.inc
+-- source include/not_embedded.inc
-- source include/have_bdb.inc
connect (con1,localhost,root,,);
diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test
index 4598ca5ea15..034cd11d0c1 100644
--- a/mysql-test/t/connect.test
+++ b/mysql-test/t/connect.test
@@ -3,6 +3,9 @@
# Unfortunately the check is incomplete as we can't handle errors on connect
# Also we can't connect without database
+# This test makes no sense with the embedded server
+--source include/not_embedded.inc
+
#connect (con1,localhost,root,,"");
#show tables;
connect (con1,localhost,root,,mysql);
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index 38956e12a3b..db5b13cf1b4 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -329,23 +329,6 @@ prepare stmt1 from @str2;
execute stmt1 using @ivar;
#
-# Check correct binlogging of UCS2 user variables (BUG#3875)
-#
-SET TIMESTAMP=10000;
-create table t2 (c char(30)) charset=ucs2;
-set @v=convert('abc' using ucs2);
-reset master;
-insert into t2 values (@v);
-show binlog events from 79;
-# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
-# absolutely need variables names to be quoted and strings to be
-# escaped).
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
-drop table t2;
-
-
-#
# Check that ucs2 works with ENUM and SET type
#
set names latin1;
diff --git a/mysql-test/t/ctype_ucs_binlog.test b/mysql-test/t/ctype_ucs_binlog.test
new file mode 100644
index 00000000000..57b831a9dcb
--- /dev/null
+++ b/mysql-test/t/ctype_ucs_binlog.test
@@ -0,0 +1,19 @@
+--source include/not_embedded.inc
+
+#
+# Check correct binlogging of UCS2 user variables (BUG#3875)
+#
+SET TIMESTAMP=10000;
+create table t2 (c char(30)) charset=ucs2;
+set @v=convert('abc' using ucs2);
+reset master;
+insert into t2 values (@v);
+show binlog events from 79;
+# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
+# absolutely need variables names to be quoted and strings to be
+# escaped).
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
+drop table t2;
+
+
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test
index 6f0e5b3f14c..5e123ca0de8 100644
--- a/mysql-test/t/drop.test
+++ b/mysql-test/t/drop.test
@@ -30,6 +30,28 @@ select * from mysqltest.mysqltest;
drop database if exists mysqltest;
--disable_info
create database mysqltest;
+
+#
+# drop many tables - bug#3891
+# we'll do it in mysqltest db, to be able to use longer table names
+# (tableN instead on tN)
+#
+use mysqltest;
+--error 1051
+drop table table1, table2, table3, table4, table5, table6,
+table7, table8, table9, table10, table11, table12, table13,
+table14, table15, table16, table17, table18, table19, table20,
+table21, table22, table23, table24, table25, table26, table27,
+table28;
+
+--error 1051
+drop table table1, table2, table3, table4, table5, table6,
+table7, table8, table9, table10, table11, table12, table13,
+table14, table15, table16, table17, table18, table19, table20,
+table21, table22, table23, table24, table25, table26, table27,
+table28, table29, table30;
+
+use test;
drop database mysqltest;
# test drop/create database and FLUSH TABLES WITH READ LOCK
diff --git a/mysql-test/t/drop_temp_table.test b/mysql-test/t/drop_temp_table.test
index dcd95721179..dbe7959acb2 100644
--- a/mysql-test/t/drop_temp_table.test
+++ b/mysql-test/t/drop_temp_table.test
@@ -1,3 +1,6 @@
+# Embedded server doesn't support binlog
+-- source include/not_embedded.inc
+
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
connection con1;
diff --git a/mysql-test/t/flush_block_commit.test b/mysql-test/t/flush_block_commit.test
index 87715452089..49d68d05fb6 100644
--- a/mysql-test/t/flush_block_commit.test
+++ b/mysql-test/t/flush_block_commit.test
@@ -3,6 +3,10 @@
# We verify that we did not introduce a deadlock.
# This is intended to mimick how mysqldump and innobackup work.
+# This test doesn't work with the embedded server
+-- source include/not_embedded.inc
+
+# And it requires InnoDB
-- source include/have_innodb.inc
connect (con1,localhost,root,,);
diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test
index ca9ca9a5f97..1c8fbe0ff0d 100644
--- a/mysql-test/t/grant.test
+++ b/mysql-test/t/grant.test
@@ -1,5 +1,8 @@
# Test of GRANT commands
+# Grant tests not performed with embedded server
+-- source include/not_embedded.inc
+
# Cleanup
--disable_warnings
drop table if exists t1;
@@ -369,3 +372,23 @@ delete from mysql.columns_priv where user="mysqltest_3";
flush privileges;
drop database mysqltest_1;
drop database mysqltest_2;
+
+#
+# Rights for renaming test (Bug #3270)
+#
+connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
+connection root;
+--disable_warnings
+create database mysqltest;
+--enable_warnings
+create table mysqltest.t1 (a int,b int,c int);
+grant all on mysqltest.t1 to mysqltest_1@localhost;
+connect (user1,localhost,mysqltest_1,,mysqltest,$MASTER_MYPORT,$MASTER_MYSOCK);
+connection user1;
+-- error 1142
+alter table t1 rename t2;
+connection root;
+revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
+delete from mysql.user where user=_binary'mysqltest_1';
+drop database mysqltest;
+
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
index b00bbd56b5c..362efc1230d 100644
--- a/mysql-test/t/grant2.test
+++ b/mysql-test/t/grant2.test
@@ -1,3 +1,6 @@
+# Grant tests not performed with embedded server
+-- source include/not_embedded.inc
+
SET NAMES binary;
#
diff --git a/mysql-test/t/grant_cache.test b/mysql-test/t/grant_cache.test
index e5bde977bb7..7d6f7262f0a 100644
--- a/mysql-test/t/grant_cache.test
+++ b/mysql-test/t/grant_cache.test
@@ -1,3 +1,5 @@
+# Grant tests not performed with embedded server
+-- source include/not_embedded.inc
-- source include/have_query_cache.inc
#
diff --git a/mysql-test/t/innodb-deadlock.test b/mysql-test/t/innodb-deadlock.test
index 8a36982b0c1..7a7f657f35d 100644
--- a/mysql-test/t/innodb-deadlock.test
+++ b/mysql-test/t/innodb-deadlock.test
@@ -1,4 +1,6 @@
-- source include/have_innodb.inc
+# Can't test this with embedded server
+-- source include/not_embedded.inc
connect (con1,localhost,root,,);
connect (con2,localhost,root,,);
diff --git a/mysql-test/t/innodb-lock.test b/mysql-test/t/innodb-lock.test
index a3b6f8993f2..887a664e262 100644
--- a/mysql-test/t/innodb-lock.test
+++ b/mysql-test/t/innodb-lock.test
@@ -1,4 +1,6 @@
-- source include/have_innodb.inc
+# Can't test this with embedded server
+-- source include/not_embedded.inc
#
# Check and select innodb lock type
diff --git a/mysql-test/t/innodb-replace.test b/mysql-test/t/innodb-replace.test
new file mode 100644
index 00000000000..e7e96da1443
--- /dev/null
+++ b/mysql-test/t/innodb-replace.test
@@ -0,0 +1,17 @@
+-- source include/have_innodb.inc
+# embedded server ignores 'delayed', so skip this
+-- source include/not_embedded.inc
+
+#
+# Bug #1078
+#
+create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) engine=innodb;
+select * from t1;
+--error 1031
+replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
+select * from t1;
+--error 1031
+replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
+select * from t1;
+drop table t1;
+
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index cf7be4f882c..770221f5238 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -1021,19 +1021,6 @@ SELECT t2.id, t1.label FROM t2 INNER JOIN
ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
drop table t1,t2;
-#
-# Bug #1078
-#
-create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) engine=innodb;
-select * from t1;
---error 1031
-replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
-select * from t1;
---error 1031
-replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
-select * from t1;
-drop table t1;
-
create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=myisam;
create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=innodb;
create table t3 (a int, b varchar(200), c text not null) checksum=1 engine=innodb;
@@ -1110,7 +1097,7 @@ show create table t2;
drop table t2;
# Test error handling
---replace_result \\ /
+--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ /
--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;
diff --git a/mysql-test/t/insert_select-binlog.test b/mysql-test/t/insert_select-binlog.test
new file mode 100644
index 00000000000..9bb1ec274ef
--- /dev/null
+++ b/mysql-test/t/insert_select-binlog.test
@@ -0,0 +1,34 @@
+# Embedded server doesn't support binlog
+-- source include/not_embedded.inc
+
+# Check if a partly-completed INSERT SELECT in a MyISAM table goes into the
+# binlog
+
+create table t1(a int, unique(a));
+insert into t1 values(2);
+create table t2(a int);
+insert into t2 values(1),(2);
+reset master;
+--error 1062
+insert into t1 select * from t2;
+# The above should produce an error, but still be in the binlog;
+# verify the binlog :
+let $VERSION=`select version()`;
+--replace_result $VERSION VERSION
+show binlog events;
+select * from t1;
+drop table t1, t2;
+
+# Verify that a partly-completed CREATE TABLE .. SELECT does not
+# get into the binlog (Bug #6682)
+create table t1(a int);
+insert into t1 values(1),(1);
+reset master;
+--error 1062
+create table t2(unique(a)) select a from t1;
+# The above should produce an error, *and* not appear in the binlog
+let $VERSION=`select version()`;
+--replace_result $VERSION VERSION
+show binlog events;
+drop table t1;
+
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 39b8bfcaaaa..ecc83e3883b 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -71,37 +71,6 @@ WHERE numeropost=9 ORDER BY numreponse ASC;
DROP TABLE t1,t2;
-# Check if a partly-completed INSERT SELECT in a MyISAM table goes
-# into the binlog
-
-create table t1(a int, unique(a));
-insert into t1 values(2);
-create table t2(a int);
-insert into t2 values(1),(2);
-reset master;
---error 1062
-insert into t1 select * from t2;
-# The above should produce an error, but still be in the binlog;
-# verify the binlog :
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
-show binlog events;
-select * from t1;
-drop table t1, t2;
-
-# Verify that a partly-completed CREATE TABLE .. SELECT does not
-# get into the binlog (Bug #6682)
-create table t1(a int);
-insert into t1 values(1),(1);
-reset master;
---error 1062
-create table t2(unique(a)) select a from t1;
-# The above should produce an error, *and* not appear in the binlog
-let $VERSION=`select version()`;
---replace_result $VERSION VERSION
-show binlog events;
-drop table t1;
-
#
# Test of insert ... select from same table
#
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 65d4f27059f..4afb60a7bdd 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -23,12 +23,15 @@ connection con2;
select ((@id := kill_id) - kill_id) from t1;
kill @id;
-# Wait for thread to do.
---sleep 5
-# verify that con1 is doning a reconnect
connection con1;
-ping
-ping
+
+--disable_reconnect
+# this statement should fail
+--error 2006
+select 1;
+--enable_reconnect
+# this should work, and we should have a new connection_id()
+select ((@id := kill_id) - kill_id) from t1;
select @id != connection_id();
#make sure the server is still alive
diff --git a/mysql-test/t/lowercase_table_grant.test b/mysql-test/t/lowercase_table_grant.test
index 5ac35c81c21..3d6adb477a3 100644
--- a/mysql-test/t/lowercase_table_grant.test
+++ b/mysql-test/t/lowercase_table_grant.test
@@ -1,3 +1,6 @@
+# Don't test with embedded server
+-- source include/not_embedded.inc
+
# Test of grants when lower_case_table_names is on
use mysql;
diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test
index 89a7f8f3036..544fa5559fa 100644
--- a/mysql-test/t/mix_innodb_myisam_binlog.test
+++ b/mysql-test/t/mix_innodb_myisam_binlog.test
@@ -5,6 +5,9 @@
# did some tests manually on a slave; tables are replicated fine and
# Exec_Master_Log_Pos advances as expected.
+# Embedded server doesn't support binlogging
+-- source include/not_embedded.inc
+
-- source include/have_innodb.inc
--disable_warnings
diff --git a/mysql-test/t/mysql_protocols.test b/mysql-test/t/mysql_protocols.test
index e5158586124..6e2d4f20429 100644
--- a/mysql-test/t/mysql_protocols.test
+++ b/mysql-test/t/mysql_protocols.test
@@ -1,3 +1,5 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
# test for Bug #4998 "--protocol doesn't reject bad values"
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index ea66a44d44e..435fa8289da 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -1,5 +1,8 @@
# We are using .opt file since we need small binlog size
+# Embedded server doesn't support binlogging
+-- source include/not_embedded.inc
+
# we need this for getting fixed timestamps inside of this test
set timestamp=1000000000;
diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test
index c6cff7558d4..0eddc4ec2e4 100644
--- a/mysql-test/t/mysqlbinlog2.test
+++ b/mysql-test/t/mysqlbinlog2.test
@@ -1,6 +1,9 @@
# Test for the new options --start-datetime, stop-datetime,
# and a few others.
+# Embedded server doesn't support binlogging
+-- source include/not_embedded.inc
+
--disable_warnings
drop table if exists t1;
--enable_warnings
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index f753e9dcf29..c321fb9c6b7 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -1,3 +1,6 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
+
--disable_warnings
DROP TABLE IF EXISTS t1, `"t"1`;
--enable_warnings
diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test
index d9f50c8b3fc..d66718ca4e4 100644
--- a/mysql-test/t/ndb_types.test
+++ b/mysql-test/t/ndb_types.test
@@ -7,10 +7,12 @@ DROP TABLE IF EXISTS t1;
#
# Test creation of different column types in NDB
#
-
CREATE TABLE t1 (
auto int(5) unsigned NOT NULL auto_increment,
string char(10) default "hello",
+ vstring varchar(10) default "hello",
+ bin binary(7),
+ vbin varbinary(7),
tiny tinyint(4) DEFAULT '0' NOT NULL ,
short smallint(6) DEFAULT '1' NOT NULL ,
medium mediumint(8) DEFAULT '0' NOT NULL,
@@ -23,12 +25,13 @@ CREATE TABLE t1 (
umedium mediumint(8) unsigned DEFAULT '0' NOT NULL,
ulong int(11) unsigned DEFAULT '0' NOT NULL,
ulonglong bigint(13) unsigned DEFAULT '0' NOT NULL,
- time_stamp timestamp,
+ options enum('one','two','tree') not null,
+ flags set('one','two','tree') not null,
date_field date,
+ year_field year,
time_field time,
date_time datetime,
- options enum('one','two','tree') not null,
- flags set('one','two','tree') not null,
+ time_stamp timestamp not null default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (auto),
KEY (utiny),
KEY (tiny),
@@ -43,5 +46,34 @@ CREATE TABLE t1 (
KEY (options,flags)
);
+set @now = now();
+sleep 1;
+insert into t1
+(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
+ real_float,real_double, utiny, ushort, umedium,ulong,ulonglong,
+ options,flags,date_field,year_field,time_field,date_time)
+values
+("aaaa","aaaa",0xAAAA,0xAAAA,-1,-1,-1,-1,-1,1.1,1.1,1,1,1,1,1,
+ 'one','one', '1901-01-01','1901','01:01:01','1901-01-01 01:01:01');
+
+select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
+ real_float,real_double, utiny, ushort, umedium,ulong,ulonglong,
+ options,flags,date_field,year_field,time_field,date_time
+from t1;
+select time_stamp>@now from t1;
+
+set @now = now();
+sleep 1;
+update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB,
+tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2,
+real_double=2.2,utiny=2,ushort=2,umedium=2,ulong=2,ulonglong=2,
+options='one',flags='one', date_field='1902-02-02',year_field='1902',
+time_field='02:02:02',date_time='1902-02-02 02:02:02' where auto=1;
+
+select auto,string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
+ real_float,real_double, utiny, ushort, umedium,ulong,ulonglong,
+ options,flags,date_field,year_field,time_field,date_time
+from t1;
+select time_stamp>@now from t1;
drop table t1;
diff --git a/mysql-test/t/packet.test b/mysql-test/t/packet.test
index cbeaa04ca52..c7f10d75d74 100644
--- a/mysql-test/t/packet.test
+++ b/mysql-test/t/packet.test
@@ -1,3 +1,5 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
#
# Check protocol handling
diff --git a/mysql-test/t/ps_1general.test b/mysql-test/t/ps_1general.test
index b3ce6d7fd82..bf177a108dd 100644
--- a/mysql-test/t/ps_1general.test
+++ b/mysql-test/t/ps_1general.test
@@ -317,9 +317,6 @@ prepare stmt4 from ' show engine bdb logs ';
--disable_result_log
execute stmt4;
--enable_result_log
-prepare stmt4 from ' show full processlist ';
---replace_column 1 number 6 time 3 localhost
-execute stmt4;
prepare stmt4 from ' show grants for user ';
--error 1295
prepare stmt4 from ' show create table t2 ';
@@ -600,7 +597,8 @@ drop table t2;
prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
create table t5 (a int) ;
# rename must fail, t7 does not exist
---replace_result \\ /
+# Clean up the filename here because embedded server reports whole path
+--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ /
--error 1017
execute stmt1 ;
create table t7 (a int) ;
@@ -843,117 +841,6 @@ execute stmt1 ;
drop table t5 ;
-
-################ GRANT/REVOKE/DROP affecting a parallel session ################
---disable_query_log
-select '------ grant/revoke/drop affects a parallel session test ------'
- as test_sequence ;
---enable_query_log
-
-#---------------------------------------------------------------------#
-# Here we test that:
-# 1. A new GRANT will be visible within another sessions. #
-# #
-# Let's assume there is a parallel session with an already prepared #
-# statement for a table. #
-# A DROP TABLE will affect the EXECUTE properties. #
-# A REVOKE will affect the EXECUTE properties. #
-#---------------------------------------------------------------------#
-
-# Who am I ?
-# this is different across different systems:
-# select current_user(), user() ;
-
-#### create a new user account ####
-## There should be no grants for that non existing user
---error 1141
-show grants for second_user@localhost ;
-## create a new user account by using GRANT statements on t9
-create database mysqltest;
-# create the tables (t1 and t9) used in many tests
-use mysqltest;
---disable_query_log
---source include/ps_create.inc
---source include/ps_renew.inc
---enable_query_log
-eval use $DB;
-grant usage on mysqltest.* to second_user@localhost
-identified by 'looser' ;
-grant select on mysqltest.t9 to second_user@localhost
-identified by 'looser' ;
-show grants for second_user@localhost ;
-
-
-#### establish a second session to the new user account
-connect (con3,localhost,second_user,looser,mysqltest);
-## switch to the second session
-connection con3;
-# Who am I ?
-select current_user();
-## check the access rights
-show grants for current_user();
-prepare s_t9 from 'select c1 as my_col
- from t9 where c1= 1' ;
-execute s_t9 ;
-# check that we cannot do a SELECT on the table t1;
---error 1142
-select a as my_col from t1;
-
-
-#### give access rights to t1 and drop table t9
-## switch back to the first session
-connection default;
-grant select on mysqltest.t1 to second_user@localhost
-identified by 'looser' ;
-show grants for second_user@localhost ;
-drop table mysqltest.t9 ;
-show grants for second_user@localhost ;
-
-
-#### check the access as new user
-## switch to the second session
-connection con3;
-######## Question 1: The table t1 should be now accessible. ########
-show grants for second_user@localhost ;
-prepare s_t1 from 'select a as my_col from t1' ;
-execute s_t1 ;
-######## Question 2: The table t9 does not exist. ########
---error 1146
-execute s_t9 ;
-
-
-#### revoke the access rights to t1
-## switch back to the first session
-connection default;
-revoke all privileges on mysqltest.t1 from second_user@localhost
-identified by 'looser' ;
-show grants for second_user@localhost ;
-
-#### check the access as new user
-## switch to the second session
-connection con3;
-show grants for second_user@localhost ;
-######## Question 2: The table t1 should be now not accessible. ########
---error 1142
-execute s_t1 ;
-
-## cleanup
-## switch back to the first session
-connection default;
-## disconnect the second session
-disconnect con3 ;
-## remove all rights of second_user@localhost
-revoke all privileges, grant option from second_user@localhost ;
-show grants for second_user@localhost ;
-drop user second_user@localhost ;
-commit ;
---error 1141
-show grants for second_user@localhost ;
-
-drop table t1,t9 ;
-drop database mysqltest;
-
-
##### RULES OF THUMB TO PRESERVE THE SYSTEMATICS OF THE PS TEST CASES #####
#
# 0. You don't have the time to
diff --git a/mysql-test/t/ps_grant.test b/mysql-test/t/ps_grant.test
new file mode 100644
index 00000000000..06613072824
--- /dev/null
+++ b/mysql-test/t/ps_grant.test
@@ -0,0 +1,119 @@
+# Can't test grants with embedded server
+-- source include/not_embedded.inc
+
+# Tested here simply so it is not tested with embedded server
+prepare stmt4 from ' show full processlist ';
+--replace_column 1 number 6 time 3 localhost
+execute stmt4;
+
+let $type= 'MYISAM' ;
+
+################ GRANT/REVOKE/DROP affecting a parallel session ################
+--disable_query_log
+select '------ grant/revoke/drop affects a parallel session test ------'
+ as test_sequence ;
+--enable_query_log
+
+#---------------------------------------------------------------------#
+# Here we test that:
+# 1. A new GRANT will be visible within another sessions. #
+# #
+# Let's assume there is a parallel session with an already prepared #
+# statement for a table. #
+# A DROP TABLE will affect the EXECUTE properties. #
+# A REVOKE will affect the EXECUTE properties. #
+#---------------------------------------------------------------------#
+
+# Who am I ?
+# this is different across different systems:
+# select current_user(), user() ;
+
+#### create a new user account ####
+## There should be no grants for that non existing user
+--error 1141
+show grants for second_user@localhost ;
+## create a new user account by using GRANT statements on t9
+create database mysqltest;
+# create the tables (t1 and t9) used in many tests
+use mysqltest;
+--disable_query_log
+--source include/ps_create.inc
+--source include/ps_renew.inc
+--enable_query_log
+eval use $DB;
+grant usage on mysqltest.* to second_user@localhost
+identified by 'looser' ;
+grant select on mysqltest.t9 to second_user@localhost
+identified by 'looser' ;
+show grants for second_user@localhost ;
+
+
+#### establish a second session to the new user account
+connect (con3,localhost,second_user,looser,mysqltest);
+## switch to the second session
+connection con3;
+# Who am I ?
+select current_user();
+## check the access rights
+show grants for current_user();
+prepare s_t9 from 'select c1 as my_col
+ from t9 where c1= 1' ;
+execute s_t9 ;
+# check that we cannot do a SELECT on the table t1;
+--error 1142
+select a as my_col from t1;
+
+
+#### give access rights to t1 and drop table t9
+## switch back to the first session
+connection default;
+grant select on mysqltest.t1 to second_user@localhost
+identified by 'looser' ;
+show grants for second_user@localhost ;
+drop table mysqltest.t9 ;
+show grants for second_user@localhost ;
+
+
+#### check the access as new user
+## switch to the second session
+connection con3;
+######## Question 1: The table t1 should be now accessible. ########
+show grants for second_user@localhost ;
+prepare s_t1 from 'select a as my_col from t1' ;
+execute s_t1 ;
+######## Question 2: The table t9 does not exist. ########
+--error 1146
+execute s_t9 ;
+
+
+#### revoke the access rights to t1
+## switch back to the first session
+connection default;
+revoke all privileges on mysqltest.t1 from second_user@localhost
+identified by 'looser' ;
+show grants for second_user@localhost ;
+
+#### check the access as new user
+## switch to the second session
+connection con3;
+show grants for second_user@localhost ;
+######## Question 2: The table t1 should be now not accessible. ########
+--error 1142
+execute s_t1 ;
+
+## cleanup
+## switch back to the first session
+connection default;
+## disconnect the second session
+disconnect con3 ;
+## remove all rights of second_user@localhost
+revoke all privileges, grant option from second_user@localhost ;
+show grants for second_user@localhost ;
+drop user second_user@localhost ;
+commit ;
+--error 1141
+show grants for second_user@localhost ;
+
+drop database mysqltest;
+
+
diff --git a/mysql-test/t/rename.test b/mysql-test/t/rename.test
index 497ff721c99..6fa208f37ec 100644
--- a/mysql-test/t/rename.test
+++ b/mysql-test/t/rename.test
@@ -2,6 +2,10 @@
# Test of rename table
#
+# Test requires concurrent connections, which can't be tested on embedded
+# server
+-- source include/not_embedded.inc
+
--disable_warnings
drop table if exists t0,t1,t2,t3,t4;
# Clear up from other tests (to ensure that SHOW TABLES below is right)
diff --git a/mysql-test/t/rpl_variables.test b/mysql-test/t/rpl_variables.test
new file mode 100644
index 00000000000..b332c006118
--- /dev/null
+++ b/mysql-test/t/rpl_variables.test
@@ -0,0 +1,4 @@
+source include/master-slave.inc;
+
+set global slave_net_timeout=100;
+set global sql_slave_skip_counter=100;
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index f7144f436df..f58a78205ec 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1742,8 +1742,12 @@ select period as "Nuvarande period" from t1 group by "Nuvarande period" limit 1;
show tables;
show tables from test like "s%";
show tables from test like "t?";
+# We mask out the Privileges column because it differs with embedded server
+--replace_column 8 #
show full columns from t2;
+--replace_column 8 #
show full columns from t2 from test like 'f%';
+--replace_column 8 #
show full columns from t2 from test like 's%';
show keys from t2;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index cd8d4dba6ab..0cf1476b24c 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -1,3 +1,7 @@
+# Requires use of multiple simultaneous connections, not supported with
+# embedded server testing
+-- source include/not_embedded.inc
+
#
# Test of some show commands
#
diff --git a/mysql-test/t/skip_name_resolve.test b/mysql-test/t/skip_name_resolve.test
index 68dcf329427..b669579acbf 100644
--- a/mysql-test/t/skip_name_resolve.test
+++ b/mysql-test/t/skip_name_resolve.test
@@ -1,3 +1,6 @@
+# Can't be tested with embedded server
+-- source include/not_embedded.inc
+
# Bug #8471: IP address with mask fail when skip-name-resolve is on
GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255';
SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255';
diff --git a/mysql-test/t/system_mysql_db_fix.test b/mysql-test/t/system_mysql_db_fix.test
index 1539d210a3a..d0aae7b411c 100644
--- a/mysql-test/t/system_mysql_db_fix.test
+++ b/mysql-test/t/system_mysql_db_fix.test
@@ -1,3 +1,6 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
+
#
# This is the test for mysql_fix_privilege_tables
#
diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test
index 32ed359a2db..f952c0f65b2 100644
--- a/mysql-test/t/timezone2.test
+++ b/mysql-test/t/timezone2.test
@@ -200,74 +200,6 @@ select convert_tz(ts, @@time_zone, 'Japan') from t1;
drop table t1;
#
-# Test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone
-# tables". We should allow implicit access to time zone description tables
-# even for unprivileged users.
-#
-
-# Let us prepare playground
-delete from mysql.user where user like 'mysqltest\_%';
-delete from mysql.db where user like 'mysqltest\_%';
-delete from mysql.tables_priv where user like 'mysqltest\_%';
-delete from mysql.columns_priv where user like 'mysqltest\_%';
-flush privileges;
-create table t1 (a int, b datetime);
-create table t2 (c int, d datetime);
-
-grant all privileges on test.* to mysqltest_1@localhost;
-connect (tzuser, localhost, mysqltest_1,,);
-connection tzuser;
-show grants for current_user();
-set time_zone= '+00:00';
-set time_zone= 'Europe/Moscow';
-select convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC');
-select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
-# Let us also check whenever multi-update works ok
-update t1, t2 set t1.b = convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC')
- where t1.a = t2.c and t2.d = (select max(d) from t2);
-# But still these two statements should not work:
---error 1044
-select * from mysql.time_zone_name;
---error 1044
-select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name;
-
-#
-# Test for bug #6765 "Implicit access to time zone description tables
-# requires privileges for them if some table or column level grants
-# present"
-#
-connection default;
-# Let use some table-level grants instead of db-level
-# to make life more interesting
-delete from mysql.db where user like 'mysqltest\_%';
-flush privileges;
-grant all privileges on test.t1 to mysqltest_1@localhost;
-grant all privileges on test.t2 to mysqltest_1@localhost;
-# The test itself is almost the same as previous one
-connect (tzuser2, localhost, mysqltest_1,,);
-connection tzuser2;
-show grants for current_user();
-set time_zone= '+00:00';
-set time_zone= 'Europe/Moscow';
-select convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC');
-select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
-update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC')
- where t1.a = t2.c and t2.d = (select max(d) from t2);
-# Again these two statements should not work (but with different errors):
---error 1142
-select * from mysql.time_zone_name;
---error 1142
-select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name;
-
-# Clean-up
-connection default;
-delete from mysql.user where user like 'mysqltest\_%';
-delete from mysql.db where user like 'mysqltest\_%';
-delete from mysql.tables_priv where user like 'mysqltest\_%';
-flush privileges;
-drop table t1, t2;
-
-#
# Test for bug #7705 "CONVERT_TZ() crashes with subquery/WHERE on index
# column". Queries in which one of time zone arguments of CONVERT_TZ() is
# determined as constant only at val() stage (not at fix_fields() stage),
diff --git a/mysql-test/t/timezone_grant.test b/mysql-test/t/timezone_grant.test
new file mode 100644
index 00000000000..501315668f5
--- /dev/null
+++ b/mysql-test/t/timezone_grant.test
@@ -0,0 +1,71 @@
+# Embedded server testing does not support grants
+-- source include/not_embedded.inc
+
+#
+# Test for bug #6116 "SET time_zone := ... requires access to mysql.time_zone
+# tables". We should allow implicit access to time zone description tables
+# even for unprivileged users.
+#
+
+# Let us prepare playground
+delete from mysql.user where user like 'mysqltest\_%';
+delete from mysql.db where user like 'mysqltest\_%';
+delete from mysql.tables_priv where user like 'mysqltest\_%';
+delete from mysql.columns_priv where user like 'mysqltest\_%';
+flush privileges;
+create table t1 (a int, b datetime);
+create table t2 (c int, d datetime);
+
+grant all privileges on test.* to mysqltest_1@localhost;
+connect (tzuser, localhost, mysqltest_1,,);
+connection tzuser;
+show grants for current_user();
+set time_zone= '+00:00';
+set time_zone= 'Europe/Moscow';
+select convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC');
+select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
+# Let us also check whenever multi-update works ok
+update t1, t2 set t1.b = convert_tz('2004-10-21 19:00:00', 'Europe/Moscow', 'UTC')
+ where t1.a = t2.c and t2.d = (select max(d) from t2);
+# But still these two statements should not work:
+--error 1044
+select * from mysql.time_zone_name;
+--error 1044
+select Name, convert_tz('2004-10-21 19:00:00', Name, 'UTC') from mysql.time_zone_name;
+
+#
+# Test for bug #6765 "Implicit access to time zone description tables
+# requires privileges for them if some table or column level grants
+# present"
+#
+connection default;
+# Let use some table-level grants instead of db-level
+# to make life more interesting
+delete from mysql.db where user like 'mysqltest\_%';
+flush privileges;
+grant all privileges on test.t1 to mysqltest_1@localhost;
+grant all privileges on test.t2 to mysqltest_1@localhost;
+# The test itself is almost the same as previous one
+connect (tzuser2, localhost, mysqltest_1,,);
+connection tzuser2;
+show grants for current_user();
+set time_zone= '+00:00';
+set time_zone= 'Europe/Moscow';
+select convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC');
+select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
+update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC')
+ where t1.a = t2.c and t2.d = (select max(d) from t2);
+# Again these two statements should not work (but with different errors):
+--error 1142
+select * from mysql.time_zone_name;
+--error 1142
+select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name;
+
+# Clean-up
+connection default;
+delete from mysql.user where user like 'mysqltest\_%';
+delete from mysql.db where user like 'mysqltest\_%';
+delete from mysql.tables_priv where user like 'mysqltest\_%';
+flush privileges;
+drop table t1, t2;
+
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index f70193ddbe0..b081c27cb30 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -77,8 +77,11 @@ insert into t1 values (NULL,NULL,NULL,NULL);
update t1 set c="",b=null where c="1";
lock tables t1 READ;
+# We mask out the Privileges column because it differs for embedded server
+--replace_column 8 #
show full fields from t1;
lock tables t1 WRITE;
+--replace_column 8 #
show full fields from t1;
unlock tables;
@@ -299,18 +302,25 @@ drop table t1;
create table t1 (id integer auto_increment unique,imagem LONGBLOB not null);
insert into t1 (id) values (1);
-select
- charset(load_file('../../std_data/words.dat')),
- collation(load_file('../../std_data/words.dat')),
- coercibility(load_file('../../std_data/words.dat'));
-explain extended select
- charset(load_file('../../std_data/words.dat')),
- collation(load_file('../../std_data/words.dat')),
- coercibility(load_file('../../std_data/words.dat'));
-update t1 set imagem=load_file('../../std_data/words.dat') where id=1;
+# We have to clean up the path in the results for safe comparison
+--replace_result $MYSQL_TEST_DIR ../..
+eval select
+ charset(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
+ collation(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
+ coercibility(load_file('$MYSQL_TEST_DIR/std_data/words.dat'));
+--replace_result $MYSQL_TEST_DIR ../..
+eval explain extended select
+ charset(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
+ collation(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
+ coercibility(load_file('$MYSQL_TEST_DIR/std_data/words.dat'));
+--replace_result $MYSQL_TEST_DIR ../..
+eval update t1 set imagem=load_file('$MYSQL_TEST_DIR/std_data/words.dat') where id=1;
select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1;
drop table t1;
-create table t1 select load_file('../../std_data/words.dat');
+--replace_result $MYSQL_TEST_DIR ../..
+eval create table t1 select load_file('$MYSQL_TEST_DIR/std_data/words.dat') l;
+# We mask out the Privileges column because it differs for embedded server
+--replace_column 8 #
show full fields from t1;
drop table t1;
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index 6e991dc53d4..41812ef2652 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -16,6 +16,8 @@ SELECT 123.23E+02,-123.23E-02,"123.23E+02"+0.0,"-123.23E-02"+0.0;
SELECT 2147483647E+02,21474836.47E+06;
create table t1 (f1 float(24),f2 float(52));
+# We mask out Privileges column because it differs for embedded server
+--replace_column 8 #
show full columns from t1;
insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150);
@@ -66,6 +68,8 @@ drop table t1;
#
create table t1 (f float, f2 float(24), f3 float(6,2), d double, d2 float(53), d3 double(10,3), de decimal, de2 decimal(6), de3 decimal(5,2), n numeric, n2 numeric(8), n3 numeric(5,6));
+# We mask out Privileges column because it differs for embedded server
+--replace_column 8 #
show full columns from t1;
drop table t1;
diff --git a/mysql-test/t/type_ranges.test b/mysql-test/t/type_ranges.test
index 572dc0af313..fb089cfd3df 100644
--- a/mysql-test/t/type_ranges.test
+++ b/mysql-test/t/type_ranges.test
@@ -46,6 +46,8 @@ CREATE TABLE t1 (
KEY (options,flags)
);
+# We mask out the Privileges column because it differs with embedded server
+--replace_column 8 #
show full fields from t1;
show keys from t1;
@@ -120,7 +122,10 @@ drop table t2;
create table t2 select * from t1;
update t2 set string="changed" where auto=16;
+# We mask out the Privileges column because it differs with embedded server
+--replace_column 8 #
show full columns from t1;
+--replace_column 8 #
show full columns from t2;
select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and ((t1.string<>t2.string and (t1.string is not null or t2.string is not null)) or (t1.tiny<>t2.tiny and (t1.tiny is not null or t2.tiny is not null)) or (t1.short<>t2.short and (t1.short is not null or t2.short is not null)) or (t1.medium<>t2.medium and (t1.medium is not null or t2.medium is not null)) or (t1.long_int<>t2.long_int and (t1.long_int is not null or t2.long_int is not null)) or (t1.longlong<>t2.longlong and (t1.longlong is not null or t2.longlong is not null)) or (t1.real_float<>t2.real_float and (t1.real_float is not null or t2.real_float is not null)) or (t1.real_double<>t2.real_double and (t1.real_double is not null or t2.real_double is not null)) or (t1.utiny<>t2.utiny and (t1.utiny is not null or t2.utiny is not null)) or (t1.ushort<>t2.ushort and (t1.ushort is not null or t2.ushort is not null)) or (t1.umedium<>t2.umedium and (t1.umedium is not null or t2.umedium is not null)) or (t1.ulong<>t2.ulong and (t1.ulong is not null or t2.ulong is not null)) or (t1.ulonglong<>t2.ulonglong and (t1.ulonglong is not null or t2.ulonglong is not null)) or (t1.time_stamp<>t2.time_stamp and (t1.time_stamp is not null or t2.time_stamp is not null)) or (t1.date_field<>t2.date_field and (t1.date_field is not null or t2.date_field is not null)) or (t1.time_field<>t2.time_field and (t1.time_field is not null or t2.time_field is not null)) or (t1.date_time<>t2.date_time and (t1.date_time is not null or t2.date_time is not null)) or (t1.new_blob_col<>t2.new_blob_col and (t1.new_blob_col is not null or t2.new_blob_col is not null)) or (t1.tinyblob_col<>t2.tinyblob_col and (t1.tinyblob_col is not null or t2.tinyblob_col is not null)) or (t1.mediumblob_col<>t2.mediumblob_col and (t1.mediumblob_col is not null or t2.mediumblob_col is not null)) or (t1.options<>t2.options and (t1.options is not null or t2.options is not null)) or (t1.flags<>t2.flags and (t1.flags is not null or t2.flags is not null)) or (t1.new_field<>t2.new_field and (t1.new_field is not null or t2.new_field is not null)));
select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and not (t1.string<=>t2.string and t1.tiny<=>t2.tiny and t1.short<=>t2.short and t1.medium<=>t2.medium and t1.long_int<=>t2.long_int and t1.longlong<=>t2.longlong and t1.real_float<=>t2.real_float and t1.real_double<=>t2.real_double and t1.utiny<=>t2.utiny and t1.ushort<=>t2.ushort and t1.umedium<=>t2.umedium and t1.ulong<=>t2.ulong and t1.ulonglong<=>t2.ulonglong and t1.time_stamp<=>t2.time_stamp and t1.date_field<=>t2.date_field and t1.time_field<=>t2.time_field and t1.date_time<=>t2.date_time and t1.new_blob_col<=>t2.new_blob_col and t1.tinyblob_col<=>t2.tinyblob_col and t1.mediumblob_col<=>t2.mediumblob_col and t1.options<=>t2.options and t1.flags<=>t2.flags and t1.new_field<=>t2.new_field);
@@ -128,6 +133,8 @@ select t1.auto,t2.auto from t1,t2 where t1.auto=t2.auto and not (t1.string<=>t2.
drop table t2;
create table t2 (primary key (auto)) select auto+1 as auto,1 as t1, "a" as t2, repeat("a",256) as t3, binary repeat("b",256) as t4 from t1;
+# We mask out the Privileges column because it differs with embedded server
+--replace_column 8 #
show full columns from t2;
select * from t2;
drop table t1,t2;
@@ -138,6 +145,8 @@ create table t2 select * from t1;
--error 1060
create table t3 select * from t1, t2; # Should give an error
create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
+# We mask out the Privileges column because it differs with embedded server
+--replace_column 8 #
show full columns from t3;
drop table t1,t2,t3;
diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test
new file mode 100644
index 00000000000..8b11ea735ad
--- /dev/null
+++ b/mysql-test/t/user_var-binlog.test
@@ -0,0 +1,19 @@
+# Embedded server does not support binlogging
+--source include/not_embedded.inc
+
+# Check that user variables are binlogged correctly (BUG#3875)
+create table t1 (a varchar(50));
+reset master;
+SET TIMESTAMP=10000;
+SET @`a b`='hello';
+INSERT INTO t1 VALUES(@`a b`);
+set @var1= "';aaa";
+SET @var2=char(ascii('a'));
+insert into t1 values (@var1),(@var2);
+show binlog events from 79;
+# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
+# absolutely need variables names to be quoted and strings to be
+# escaped).
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
+drop table t1;
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index cfeb5f228a7..b907f21056c 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -98,24 +98,6 @@ select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST';
select charset(@a),collation(@a),coercibility(@a);
select (@a:=_latin2'test' collate latin2_bin) = _latin2'TEST' collate latin2_general_ci;
-# Check that user variables are binlogged correctly (BUG#3875)
-create table t1 (a varchar(50));
-reset master;
-SET TIMESTAMP=10000;
-SET @`a b`='hello';
-INSERT INTO t1 VALUES(@`a b`);
-set @var1= "';aaa";
-SET @var2=char(ascii('a'));
-insert into t1 values (@var1),(@var2);
-show binlog events from 79;
-# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
-# absolutely need variables names to be quoted and strings to be
-# escaped).
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
---exec $MYSQL_BINLOG --short-form $MYSQL_TEST_DIR/var/log/master-bin.000001
-drop table t1;
-
-
#
# Bug #6321 strange error:
# string function FIELD(<uservariable content NULL>, ...)
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index f80ca6378a1..50bcc1c038c 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -218,7 +218,6 @@ set read_buffer_size=100;
set read_rnd_buffer_size=100;
set global rpl_recovery_rank=100;
set global server_id=100;
-set global slave_net_timeout=100;
set global slow_launch_time=100;
set sort_buffer_size=100;
set sql_auto_is_null=1;
@@ -237,7 +236,6 @@ select @@sql_max_join_size,@@max_join_size;
set sql_quote_show_create=1;
set sql_safe_updates=1;
set sql_select_limit=1;
-set global sql_slave_skip_counter=100;
set sql_warnings=1;
set global table_cache=100;
set storage_engine=myisam;