Commit 5a15eeca authored by msvensson@neptunus.(none)'s avatar msvensson@neptunus.(none)

Merge neptunus.(none):/home/msvensson/mysql/same_tools/my50-same_tools

into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
parents 3d4cd814 f10fdf4c
......@@ -125,6 +125,11 @@ test-force-pl:
./mysql-test-run.pl --force && \
./mysql-test-run.pl --ps-protocol --force
test-force-pl-mem:
cd mysql-test; \
./mysql-test-run.pl --force --mem && \
./mysql-test-run.pl --ps-protocol --force --mem
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -38,7 +38,9 @@ noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
mysqladmin_SOURCES = mysqladmin.cc
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c \
mysqltest_SOURCES= mysqltest.c \
$(top_srcdir)/mysys/my_getsystime.c \
$(top_srcdir)/mysys/my_copy.c \
$(yassl_dummy_link_fix)
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c $(top_srcdir)/mysys/my_new.cc
......
This diff is collapsed.
......@@ -11,8 +11,8 @@ insert into t1 values('ab_def');
insert into t1 values('abc_ef');
insert into t1 values('abcd_f');
insert into t1 values('abcde_');
-- should return ab_def
# should return ab_def
select c1 as c1u from t1 where c1 like 'ab\_def';
-- should return ab_def
# should return ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
drop table t1;
let $1 = 10;
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
echo $1;
dec $1;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
echo here is the sourced script;
--source include/sourced.inc
This diff is collapsed.
......@@ -249,7 +249,7 @@ sub mtr_im_check_main_alive($) {
# Check that IM does not accept client connections.
if ( mtr_ping_mysqld_server($im->{'port'}) )
if ( mtr_ping_port($im->{'port'}) )
{
mtr_debug("IM-main (port: $im->{port}) " .
"is accepting connections.");
......@@ -338,7 +338,7 @@ sub mtr_im_check_mysqld_alive($) {
# Check that mysqld does not accept client connections.
if ( mtr_ping_mysqld_server($mysqld_instance->{'port'}) )
if ( mtr_ping_port($mysqld_instance->{'port'}) )
{
mtr_debug("Mysqld instance (port: $mysqld_instance->{port}) " .
"is accepting connections.");
......@@ -510,7 +510,7 @@ sub mtr_im_wait_for_connection($$$) {
{
mtr_debug("Trying to connect to IM ($cur_attempt of $total_attempts)...");
if ( mtr_ping_mysqld_server($im->{'port'}) )
if ( mtr_ping_port($im->{'port'}) )
{
mtr_debug("IM is accepting connections " .
"on port $im->{port}.");
......@@ -543,7 +543,7 @@ sub mtr_im_wait_for_mysqld($$$) {
mtr_debug("Trying to connect to mysqld " .
"($cur_attempt of $total_attempts)...");
if ( mtr_ping_mysqld_server($mysqld->{'port'}) )
if ( mtr_ping_port($mysqld->{'port'}) )
{
mtr_debug("Mysqld is accepting connections " .
"on port $mysqld->{port}.");
......
......@@ -11,6 +11,8 @@ sub mtr_get_opts_from_file ($);
sub mtr_fromfile ($);
sub mtr_tofile ($@);
sub mtr_tonewfile($@);
sub mtr_lastlinefromfile($);
sub mtr_appendfile_to_file ($$);
##############################################################################
#
......@@ -139,6 +141,20 @@ sub mtr_fromfile ($) {
return $text;
}
sub mtr_lastlinefromfile ($) {
my $file= shift;
my $text;
open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!");
while (my $line= <FILE>)
{
$text= $line;
}
close FILE;
return $text;
}
sub mtr_tofile ($@) {
my $file= shift;
......@@ -155,5 +171,17 @@ sub mtr_tonewfile ($@) {
close FILE;
}
sub mtr_appendfile_to_file ($$) {
my $from_file= shift;
my $to_file= shift;
open(TOFILE,">>",$to_file) or mtr_error("can't open file \"$to_file\": $!");
open(FROMFILE,"<",$from_file)
or mtr_error("can't open file \"$from_file\": $!");
print TOFILE while (<FROMFILE>);
close FROMFILE;
close TOFILE;
}
1;
......@@ -139,6 +139,8 @@ sub mtr_copy_dir($$) {
my $from_dir= shift;
my $to_dir= shift;
# mtr_verbose("Copying from $from_dir to $to_dir");
mkpath("$to_dir");
opendir(DIR, "$from_dir")
or mtr_error("Can't find $from_dir$!");
......
This diff is collapsed.
......@@ -10,6 +10,7 @@ sub mtr_report_test_name($);
sub mtr_report_test_passed($);
sub mtr_report_test_failed($);
sub mtr_report_test_skipped($);
sub mtr_report_test_not_skipped_though_disabled($);
sub mtr_show_failed_diff ($);
sub mtr_report_stats ($);
......@@ -21,6 +22,7 @@ sub mtr_warning (@);
sub mtr_error (@);
sub mtr_child_error (@);
sub mtr_debug (@);
sub mtr_verbose (@);
##############################################################################
......@@ -96,7 +98,24 @@ sub mtr_report_test_skipped ($) {
}
else
{
print "[ skipped ]\n";
print "[ skipped ] $tinfo->{'comment'}\n";
}
}
sub mtr_report_tests_not_skipped_though_disabled ($) {
my $tests= shift;
if ( $::opt_enable_disabled )
{
my @disabled_tests= grep {$_->{'dont_skip_though_disabled'}} @$tests;
if ( @disabled_tests )
{
print "\nTest(s) which will be run though they are marked as disabled:\n";
foreach my $tinfo ( sort {$a->{'name'} cmp $b->{'name'}} @disabled_tests )
{
printf " %-20s : %s\n", $tinfo->{'name'}, $tinfo->{'comment'};
}
}
}
}
......@@ -107,7 +126,7 @@ sub mtr_report_test_passed ($) {
if ( $::opt_timer and -f "$::opt_vardir/log/timer" )
{
$timer= mtr_fromfile("$::opt_vardir/log/timer");
$::glob_tot_real_time += $timer;
$::glob_tot_real_time += ($timer/1000);
$timer= sprintf "%12s", $timer;
}
$tinfo->{'result'}= 'MTR_RES_PASSED';
......@@ -122,7 +141,7 @@ sub mtr_report_test_failed ($) {
{
print "[ fail ] timeout\n";
}
elsif ( $tinfo->{'ndb_test'} and !$::flag_ndb_status_ok)
elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
{
print "[ fail ] ndbcluster start failure\n";
return;
......@@ -157,6 +176,7 @@ sub mtr_report_stats ($) {
my $tot_passed= 0;
my $tot_failed= 0;
my $tot_tests= 0;
my $tot_restarts= 0;
my $found_problems= 0; # Some warnings are errors...
foreach my $tinfo (@$tests)
......@@ -175,6 +195,10 @@ sub mtr_report_stats ($) {
$tot_tests++;
$tot_failed++;
}
if ( $tinfo->{'restarted'} )
{
$tot_restarts++;
}
}
# ----------------------------------------------------------------------
......@@ -197,6 +221,14 @@ sub mtr_report_stats ($) {
"the documentation at\n",
"http://www.mysql.com/doc/en/MySQL_test_suite.html\n";
}
print
"The servers were restarted $tot_restarts times\n";
if ( $::opt_timer )
{
print
"Spent $::glob_tot_real_time seconds actually executing testcases\n"
}
# ----------------------------------------------------------------------
# If a debug run, there might be interesting information inside
......@@ -216,7 +248,10 @@ sub mtr_report_stats ($) {
else
{
# We report different types of problems in order
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x" )
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x",
"InnoDB: Warning", "missing DBUG_RETURN",
"mysqld: Warning",
"Attempting backtrace", "Assertion .* failed" )
{
foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") )
{
......@@ -230,7 +265,8 @@ sub mtr_report_stats ($) {
# Skip some non fatal warnings from the log files
if ( /Warning:\s+Table:.* on (delete|rename)/ or
/Warning:\s+Setting lower_case_table_names=2/ or
/Warning:\s+One can only use the --user.*root/ )
/Warning:\s+One can only use the --user.*root/ or
/InnoDB: Warning: we did not need to do crash recovery/)
{
next; # Skip these lines
}
......@@ -241,6 +277,7 @@ sub mtr_report_stats ($) {
}
}
}
}
if ( $found_problems )
{
mtr_warning("Got errors/warnings while running tests, please examine",
......@@ -248,7 +285,6 @@ sub mtr_report_stats ($) {
}
}
}
}
print "\n";
......@@ -331,5 +367,11 @@ sub mtr_debug (@) {
print STDERR "####: ",join(" ", @_),"\n";
}
}
sub mtr_verbose (@) {
if ( $::opt_verbose )
{
print STDERR "> ",join(" ", @_),"\n";
}
}
1;
......@@ -25,10 +25,9 @@ sub run_stress_test ()
mtr_report("Starting stress testing\n");
if ( ! $::glob_use_embedded_server and ! $::opt_local_master )
if ( ! $::glob_use_embedded_server )
{
$::master->[0]->{'pid'}= mysqld_start('master',0,[],[],0);
if ( ! $::master->[0]->{'pid'} )
if ( ! mysqld_start($::master->[0],[],[]) )
{
mtr_error("Can't start the mysqld server");
}
......
This diff is collapsed.
drop table if exists t1;
create table t1(n int not null, key(n), key(n), key(n), key(n));
check table t1 extended;
check table t1 extended;
insert into t1 values (200000);
Table Op Msg_type Msg_text
test.t1 check status OK
......
......@@ -4913,8 +4913,7 @@ bonfire
Colombo
nondecreasing
DROP TABLE t1;
ALTER TABLE t2 RENAME t1
#;
ALTER TABLE t2 RENAME t1;
DROP TABLE t1;
CREATE TABLE t1 (
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
......
......@@ -77,9 +77,9 @@ drop table if exists t1;
create table t1 (i int);
lock tables t1 read;
create database mysqltest;
drop table t1;
drop table t1;
show open tables;
drop database mysqltest;
drop database mysqltest;
select 1;
1
1
......
......@@ -9,13 +9,13 @@ n
flush tables with read lock;
drop table t2;
ERROR HY000: Can't execute the query because you have a conflicting read lock
drop table t2;
drop table t2;
unlock tables;
create database mysqltest;
create table mysqltest.t1(n int);
insert into mysqltest.t1 values (23);
flush tables with read lock;
drop database mysqltest;
drop database mysqltest;
select * from mysqltest.t1;
n
23
......@@ -51,7 +51,7 @@ drop table t1, t2, t3;
create table t1 (c1 int);
create table t2 (c1 int);
lock table t1 write;
flush tables with read lock;
insert into t2 values(1);
flush tables with read lock;
insert into t2 values(1);
unlock tables;
drop table t1, t2;
......@@ -5,7 +5,7 @@ insert into t1 values(1);
flush tables with read lock;
select * from t1;
a
commit;
commit;
select * from t1;
a
unlock tables;
......@@ -14,8 +14,8 @@ select * from t1 for update;
a
1
begin;
select * from t1 for update;
flush tables with read lock;
select * from t1 for update;
flush tables with read lock;
commit;
a
1
......@@ -45,7 +45,7 @@ flush tables with read lock;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 98
commit;
commit;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 98
......
drop table if exists t1;
create table t1 (kill_id int);
insert into t1 values(connection_id());
flush tables with read lock;
flush tables with read lock;
select ((@id := kill_id) - kill_id) from t1;
((@id := kill_id) - kill_id)
0
......
......@@ -63,7 +63,7 @@ FROM t1
WHERE conn = 'default';
IS_USED_LOCK('bug16501') = connection_id
1
SELECT GET_LOCK('bug16501',600);
SELECT GET_LOCK('bug16501',600);
SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
IS_USED_LOCK('bug16501') = CONNECTION_ID()
1
......
......@@ -336,12 +336,12 @@ drop database mysqltest_1;
set password = password("changed");
ERROR 42000: Access denied for user ''@'localhost' to database 'mysql'
lock table mysql.user write;
flush privileges;
grant all on *.* to 'mysqltest_1'@'localhost';
flush privileges;
grant all on *.* to 'mysqltest_1'@'localhost';
unlock tables;
lock table mysql.user write;
set password for 'mysqltest_1'@'localhost' = password('');
revoke all on *.* from 'mysqltest_1'@'localhost';
set password for 'mysqltest_1'@'localhost' = password('');
revoke all on *.* from 'mysqltest_1'@'localhost';
unlock tables;
drop user 'mysqltest_1'@'localhost';
create database TESTDB;
......
......@@ -452,7 +452,7 @@ handler t1 read first;
c1
1
send the below to another connection, do not wait for the result
optimize table t1;
optimize table t1;
proceed with the normal connection
handler t1 read next;
c1
......@@ -469,7 +469,7 @@ flush tables with read lock;
drop table t1;
ERROR HY000: Can't execute the query because you have a conflicting read lock
send the below to another connection, do not wait for the result
drop table t1;
drop table t1;
proceed with the normal connection
select * from t1;
c1
......
......@@ -22,8 +22,8 @@ basedir VALUE
server_id VALUE
skip-stack-trace VALUE
skip-innodb VALUE
skip-bdb VALUE
skip-ndbcluster VALUE
skip-bdb VALUE
SHOW INSTANCE OPTIONS mysqld2;
option_name value
instance_name VALUE
......@@ -42,8 +42,8 @@ basedir VALUE
server_id VALUE
skip-stack-trace VALUE
skip-innodb VALUE
skip-bdb VALUE
skip-ndbcluster VALUE
skip-bdb VALUE
START INSTANCE mysqld2;
Success: the process has been started.
STOP INSTANCE mysqld2;
......
......@@ -10,7 +10,7 @@ start transaction;
select f1();
f1()
100
update t1 set col2=0 where col1=1;
update t1 set col2=0 where col1=1;
select * from t1;
col1 col2
1 100
......
......@@ -22,7 +22,7 @@ create table t2 (id int unsigned not null);
insert into t2 select id from t1;
create table t3 (kill_id int);
insert into t3 values(connection_id());
select id from t1 where id in (select distinct id from t2);
select id from t1 where id in (select distinct id from t2);
select ((@id := kill_id) - kill_id) from t3;
((@id := kill_id) - kill_id)
0
......@@ -32,7 +32,7 @@ drop table t1, t2, t3;
select get_lock("a", 10);
get_lock("a", 10)
1
select get_lock("a", 10);
select get_lock("a", 10);
get_lock("a", 10)
NULL
select 1;
......
......@@ -2,8 +2,8 @@ drop table if exists t1,t2;
create table t1(n int);
insert into t1 values (1);
lock tables t1 write;
update low_priority t1 set n = 4;
select n from t1;
update low_priority t1 set n = 4;
select n from t1;
unlock tables;
n
4
......@@ -11,8 +11,8 @@ drop table t1;
create table t1(n int);
insert into t1 values (1);
lock tables t1 read;
update low_priority t1 set n = 4;
select n from t1;
update low_priority t1 set n = 4;
select n from t1;
unlock tables;
n
1
......@@ -23,7 +23,7 @@ insert into t1 values(1,1);
insert into t1 values(2,2);
insert into t2 values(1,2);
lock table t1 read;
update t1,t2 set c=a where b=d;
update t1,t2 set c=a where b=d;
select c from t2;
c
2
......@@ -32,7 +32,7 @@ drop table t2;
create table t1 (a int);
create table t2 (a int);
lock table t1 write, t2 write;
insert t1 select * from t2;
insert t1 select * from t2;
drop table t2;
ERROR 42S02: Table 'test.t2' doesn't exist
drop table t1;
......@@ -45,7 +45,7 @@ unlock tables;
drop table t1;
CREATE DATABASE mysqltest_1;
FLUSH TABLES WITH READ LOCK;
DROP DATABASE mysqltest_1;
DROP DATABASE mysqltest_1;
DROP DATABASE mysqltest_1;
ERROR HY000: Can't execute the query because you have a conflicting read lock
UNLOCK TABLES;
......@@ -55,7 +55,7 @@ use mysql;
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
FLUSH TABLES;
use mysql;
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
SELECT user.Select_priv FROM user, db WHERE user.user = db.user LIMIT 1;
OPTIMIZE TABLES columns_priv, db, host, user;
Table Op Msg_type Msg_text
mysql.columns_priv optimize status OK
......@@ -69,14 +69,14 @@ use test;
use test;
CREATE TABLE t1 (c1 int);
LOCK TABLE t1 WRITE;
FLUSH TABLES WITH READ LOCK;
FLUSH TABLES WITH READ LOCK;
CREATE TABLE t2 (c1 int);
UNLOCK TABLES;
UNLOCK TABLES;
DROP TABLE t1, t2;
CREATE TABLE t1 (c1 int);
LOCK TABLE t1 WRITE;
FLUSH TABLES WITH READ LOCK;
FLUSH TABLES WITH READ LOCK;
CREATE TABLE t2 AS SELECT * FROM t1;
ERROR HY000: Table 't2' was not locked with LOCK TABLES
UNLOCK TABLES;
......@@ -84,7 +84,7 @@ UNLOCK TABLES;
DROP TABLE t1;
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
lock tables t1 write;
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; alter table t1 auto_increment=0; //
unlock tables;
drop table t1;
......@@ -195,7 +195,7 @@ select (@before:=unix_timestamp())*0;
(@before:=unix_timestamp())*0
0
begin;
select * from t1 for update;
select * from t1 for update;
insert into t2 values (20);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
select (@after:=unix_timestamp())*0;
......
......@@ -509,8 +509,8 @@ create table t2 (a int);
insert into t2 values (10), (20), (30);
create view v1 as select a as b, a/10 as a from t2;
lock table t1 write;
alter table t1 add column c int default 100 after a;
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
alter table t1 add column c int default 100 after a;
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
unlock tables;
select * from t1;
a c b
......
......@@ -152,8 +152,38 @@ mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: End of line junk detected: "sleep 7
# Another comment
"
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: End of line junk detected: "disconnect default
#
# comment
# comment2
# comment 3
--disable_query_log
"
mysqltest: At line 1: End of line junk detected: "disconnect default # comment
# comment part2
# comment 3
--disable_query_log
"
mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Extra delimiter ";" found
mysqltest: At line 1: Missing argument(s) to 'error'
mysqltest: At line 1: Missing argument(s) to 'error'
mysqltest: At line 1: The sqlstate definition must start with an uppercase S
mysqltest: At line 1: The error name definition must start with an uppercase E
mysqltest: At line 1: Invalid argument to error: '9eeeee' - the errno may only consist of digits[0-9]
mysqltest: At line 1: Invalid argument to error: '1sssss' - the errno may only consist of digits[0-9]
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
mysqltest: At line 1: The sqlstate may only consist of digits[0-9] and _uppercase_ letters
mysqltest: At line 1: The sqlstate must be exactly 5 chars long
mysqltest: At line 1: Unknown SQL error name 'E9999'
mysqltest: At line 1: Invalid argument to error: '999e9' - the errno may only consist of digits[0-9]
mysqltest: At line 1: Invalid argument to error: '9b' - the errno may only consist of digits[0-9]
mysqltest: At line 1: Too many errorcodes specified
MySQL
"MySQL"
MySQL: The world''s most popular open source database
......@@ -168,8 +198,8 @@ source database
- most popular open
- source database
- MySQL: The world''s
-- most popular open
-- source database
-- most popular
-- open source database
# MySQL: The
--world''s
# most popular
......@@ -195,8 +225,8 @@ source database
# source database
-- MySQL: The
-- world''s most
-- popular open
-- source database
-- popular
-- open source database
# MySQL: The
- world''s most
-- popular open
......@@ -224,12 +254,11 @@ banana = banana
Not a banana: ba\$cat\$cat
mysqltest: At line 1: Missing arguments to let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Variable name in hi=hi does not start with '$'
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Variable name in =hi does not start with '$'
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Missing assignment operator in let
# Execute: --echo # <whatever> success: $success
# <whatever> success: 1
......@@ -240,7 +269,7 @@ mysqltest: At line 1: Missing assignment operator in let
1
# Execute: echo $success ;
1
mysqltest: At line 1: Missing file name in source
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
mysqltest: At line 1: Could not open file ./non_existingFile
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
......@@ -333,16 +362,16 @@ Counter is greater than 0, (counter=10)
Counter is not 0, (counter=0)
1
Testing while with not
mysqltest: In included file "./include/mysqltest_while.inc": At line 64: Nesting too deeply
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest_while.inc": At line 64: Nesting too deeply
mysqltest: At line 1: missing '(' in while
mysqltest: At line 1: missing ')' in while
mysqltest: At line 1: Missing '{' after while. Found "dec $i"
mysqltest: At line 1: Stray '}' - end of block before beginning
mysqltest: At line 1: Stray 'end' command - end of block before beginning
mysqltest: At line 1: query '' failed: 1065: Query was empty
mysqltest: At line 1: query '{' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{' at line 1
mysqltest: At line 1: Missing '{' after while. Found "echo hej"
mysqltest: At line 3: Missing end of block
mysqltest: At line 1: Missing newline between while and '{'
mysqltest: At line 3: Missing end of block
mysqltest: At line 1: missing '(' in if
mysqltest: At line 1: Stray 'end' command - end of block before beginning
select "b" bs col1, "c" bs col2;
......@@ -372,17 +401,15 @@ mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1
mysqltest: At line 1: Invalid integer argument "10!"
mysqltest: At line 1: End of line junk detected: "!"
mysqltest: At line 1: Invalid integer argument "a"
mysqltest: At line 1: Syntax error in connect - expected '(' found 'mysqltest: At line 1: Missing connection host
mysqltest: At line 1: Missing connection host
mysqltest: At line 1: Missing connection user
mysqltest: At line 1: Missing connection user
mysqltest: At line 1: Missing connection password
mysqltest: At line 1: Missing connection db
mysqltest: At line 1: Could not open connection 'con2': 1049 Unknown database 'illegal_db'
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1049: Unknown database 'illegal_db'
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
mysqltest: At line 1: Illegal option to connect: SMTP
OK
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted - increase MAX_CONS in mysqltest.c
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 7: Connection limit exhausted, you can have max 128 connections
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 3: connection 'test_con1' not found in connection pool
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/mysqltest.sql": At line 2: Connection test_con1 already exists
connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET);
......@@ -450,3 +477,45 @@ sleep;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sleep' at line 1
;
ERROR 42000: Query was empty
select "b" as col1, "c" as col2;
col1 col2
b c
select "b" as col1, "b" as col2, "c" as col3;
col1 col2 col3
b b c
seled "b" bs col1, "d" bs col2;
col1 col2
b d
select "raspberry and strawberry","blackberry","tomato";
raspberry and strawberry blackberry tomato
raspberry and strawberry blackberry tomato
mysqltest: At line 1: Error parsing replace_regex "a"
mysqltest: At line 1: Error parsing replace_regex "a;"
mysqltest: At line 1: Error parsing replace_regex "a"
mysqltest: At line 1: Error parsing replace_regex "a "
mysqltest: At line 1: Error parsing replace_regex "a b"
mysqltest: At line 1: Error parsing replace_regex "/a b c"
mysqltest: At line 1: Error parsing replace_regex "/a /b c "
create table t1 (a int, b int);
insert into t1 values (1,3);
insert into t1 values (2,4);
select * from t1;
a D
1 1
1 4
drop table t1;
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
mysqltest: At line 1: End of line junk detected: "write_file filename ";
"
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
hello
hello
hello
mysqltest: At line 1: Max delimiter length(16) exceeded
hello
hello
End of tests
This diff is collapsed.
......@@ -326,7 +326,7 @@ insert into t1 values(3);
set i_var = sleep(3);
return 0;
end;|
select f1();
select f1();
select sleep(4);
sleep(4)
0
......
......@@ -43,7 +43,7 @@ Note 1051 Unknown table 't4'
CREATE TABLE t1 (a int);
CREATE TABLE t3 (a int);
FLUSH TABLES WITH READ LOCK;
RENAME TABLE t1 TO t2, t3 to t4;
RENAME TABLE t1 TO t2, t3 to t4;
show tables;
Tables_in_test
t1
......
......@@ -44,7 +44,7 @@ create table t2(id int);
insert into t2 values(connection_id());
create temporary table t3(n int);
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
update t1 set n = n + get_lock('crash_lock%20C', 2);
update t1 set n = n + get_lock('crash_lock%20C', 2);
select (@id := id) - id from t2;
(@id := id) - id
0
......
reset master;
reset slave;
start slave;
show binary logs;
Log_name
master-bin.000001
master-bin.000002
drop table if exists t1;
create table t1(n int);
insert into t1 values (3351);
select * from t1;
n
3351
drop table t1;
slave stop;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
reset master;
change master to master_host='127.0.0.1',master_port=9307, master_user='root';
start slave;
create temporary table t1 (a int);
create temporary table t1 (a int);
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 2
create temporary table t1 (a int);
create temporary table t1 (a int);
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 4
stop slave;
insert into t1 values(1);
create table t2 as select * from t1;
start slave;
show status like 'slave_open_temp_tables';
Variable_name Value
Slave_open_temp_tables 4
select * from t2;
a
1
drop table t2;
......@@ -20,7 +20,7 @@ create table t2 (a int primary key);
insert into t2 values(1);
create table t3 (id int);
insert into t3 values(connection_id());
update t2 set a = a + 1 + get_lock('crash_lock%20C', 10);
update t2 set a = a + 1 + get_lock('crash_lock%20C', 10);
select (@id := id) - id from t3;
(@id := id) - id
0
......
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 1
show status like 'Rpl_status';
Variable_name Value
Rpl_status AUTH_MASTER
create table t1(n int);
drop table t1;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 2
show status like 'Rpl_status';
Variable_name Value
Rpl_status ACTIVE_SLAVE
start slave;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 3
show status like 'Rpl_status';
Variable_name Value
Rpl_status ACTIVE_SLAVE
start slave;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 4
show status like 'Rpl_status';
Variable_name Value
Rpl_status ACTIVE_SLAVE
reset master;
drop table if exists t1;
create table t1 type=HEAP select 10 as a;
insert into t1 values(11);
show binlog events from 79;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 79 Query 1 79 use `test`; create table t1 type=HEAP select 10 as a
master-bin.001 154 Query 1 154 use `test`; insert into t1 values(11)
reset slave;
start slave;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(2) NOT NULL default '0'
) TYPE=HEAP
select * from t1;
a
10
11
select * from t1;
a
select * from t1 limit 10;
a
show binlog events in 'master-bin.002' from 79;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.002 79 Query 1 79 use `test`; DELETE FROM `test`.`t1`
select * from t1;
a
drop table t1;
......@@ -12,7 +12,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)`
select master_pos_wait('master-bin.999999',0);
select master_pos_wait('master-bin.999999',0);
stop slave sql_thread;
master_pos_wait('master-bin.999999',0)
NULL
......@@ -31,7 +31,7 @@ create procedure bug9486()
update t1, t2 set val= 1 where id1=id2;
call bug9486();
lock tables t2 write;
call bug9486();
call bug9486();
show processlist;
Id User Host db Command Time State Info
# root localhost test Sleep # NULL
......@@ -77,7 +77,7 @@ select * from t1;
end|
use test;
lock table t1 write;
call p2();
call p2();
use test;
drop procedure p1;
create procedure p1() select * from t1;
......
......@@ -85,8 +85,7 @@ flush status|
flush query cache|
delete from t1|
drop procedure bug3583|
drop table t1;
#|
drop table t1|
drop procedure if exists bug6807|
create procedure bug6807()
begin
......
......@@ -2717,8 +2717,7 @@ select (1,2,3) = (select * from t1);
ERROR 21000: Operand should contain 3 column(s)
select (select * from t1) = (1,2,3);
ERROR 21000: Operand should contain 2 column(s)
drop table t1
#;
drop table t1;
CREATE TABLE `t1` (
`itemid` bigint(20) unsigned NOT NULL auto_increment,
`sessionid` bigint(20) unsigned default NULL,
......
drop table if exists t1;
CREATE TABLE t1 (x1 int);
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -8,7 +8,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -16,7 +16,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -24,7 +24,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -32,7 +32,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -40,7 +40,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -48,7 +48,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -56,7 +56,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -64,7 +64,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -72,7 +72,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -80,7 +80,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -88,7 +88,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -104,7 +104,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -112,7 +112,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -120,7 +120,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -128,7 +128,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -136,7 +136,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -144,7 +144,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x1 x2 int;
ALTER TABLE t1 CHANGE x1 x2 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......@@ -152,7 +152,7 @@ t2 CREATE TABLE `t2` (
`xx` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
ALTER TABLE t1 CHANGE x2 x1 int;
ALTER TABLE t1 CHANGE x2 x1 int;
CREATE TABLE t2 LIKE t1;
SHOW CREATE TABLE t2;
Table Create Table
......
......@@ -55,6 +55,7 @@ flush privileges;
connect (con10,localhost,test,gambling2,);
connect (con5,localhost,test,gambling2,mysql);
connection con5;
set password="";
--error 1372
set password='gambling3';
......
......@@ -1295,7 +1295,7 @@ SELECT fld3 FROM t2;
#
DROP TABLE t1;
ALTER TABLE t2 RENAME t1
ALTER TABLE t2 RENAME t1;
#
# Drop and recreate
......
This diff is collapsed.
......@@ -354,14 +354,14 @@ create table t1 (a int, b int);
insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2);
prepare stmt from
"explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?";
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
set @v=5;
execute stmt using @v;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
set @v=0;
execute stmt using @v;
set @v=0;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
execute stmt using @v;
set @v=5;
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
execute stmt using @v;
drop table t1;
deallocate prepare stmt;
......
......@@ -316,8 +316,8 @@ prepare stmt4 from ' show table status from test like ''t9%'' ';
--replace_column 8 # 12 # 13 # 14 #
# Bug#4288
execute stmt4;
--replace_column 2 #
prepare stmt4 from ' show status like ''Threads_running'' ';
--replace_column 2 #
execute stmt4;
prepare stmt4 from ' show variables like ''sql_mode'' ';
execute stmt4;
......
......@@ -35,7 +35,7 @@ use mysqltest;
--source include/ps_create.inc
--source include/ps_renew.inc
--enable_query_log
eval use $DB;
use test;
grant usage on mysqltest.* to second_user@localhost
identified by 'looser' ;
grant select on mysqltest.t9 to second_user@localhost
......
......@@ -695,7 +695,7 @@ select a from t1;
flush query cache;
drop table t1, t2;
set GLOBAL query_cache_size=1355776
set GLOBAL query_cache_size=1355776;
#
......
#
# Running test with abort-slave-event-count=1
# This will force slave to reconnect after every event
#
require_manager;
connect (master,localhost,root,,test,0,$MASTER_MYPORT);
connect (slave,localhost,root,,test,0,slave.sock);
connection master;
reset master;
server_stop master;
server_start master;
connection slave;
reset slave;
start slave;
connection master;
show binary logs;
--disable_warnings
drop table if exists t1;
--enable_warnings
create table t1(n int);
insert into t1 values (3351);
sync_slave_with_master;
select * from t1;
connection master;
drop table t1;
sync_slave_with_master;
# End of 4.1 tests
# This test makes some assumptions about values of thread ids, which should be
# true if the servers have been restarted for this test. So we want to
# stop/restart servers. Note that if assumptions are wrong, the test will not
# fail; it will just fail to test the error-prone scenario.
# Using the manager is the only way to have more than one slave server.
# So you must run this test with --manager.
require_manager;
server_stop master;
server_start master;
server_stop slave;
server_start slave;
# no need for slave_sec (no assumptions on thread ids for this server).
source include/master-slave.inc;
connect (slave_sec,localhost,root,,test,0,slave.sock-1);
connection master;
save_master_pos;
connection slave;
sync_with_master;
reset master;
save_master_pos;
connection slave_sec;
eval change master to master_host='127.0.0.1',master_port=$SLAVE_MYPORT, master_user='root';
start slave;
sync_with_master;
# :P now we have a chain ready-to-test.
connection master;
create temporary table t1 (a int);
save_master_pos;
connection slave;
sync_with_master;
connection master1;
create temporary table t1 (a int);
save_master_pos;
connection slave;
sync_with_master;
save_master_pos;
# First test:
connection slave_sec;
# Before BUG#1686 ("If 2 master threads with same-name temp table, slave makes
# bad binlog") was fixed, sync_with_master failed
sync_with_master;
show status like 'slave_open_temp_tables';
# 'master' and 'master1' usually have thread id 2-3 or 3-4.
# 'slave' and 'slave1' usually have thread id 2-3.
connection slave;
create temporary table t1 (a int);
connection slave1;
create temporary table t1 (a int);
# So it's likely that in the binlog of slave we get
# server_id=of_master thread_id=3 create temp...
# server_id=of_slave thread_id=3 create temp...
# which would confuse slave-sec unless slave-sec uses server id to distinguish
# between temp tables (here thread id is obviously not enough to distinguish).
save_master_pos;
# Second test:
connection slave_sec;
# If we did not use the server id to distinguish between temp tables,
# sync_with_master would fail
sync_with_master;
show status like 'slave_open_temp_tables';
# Third test (BUG#1240 "slave of slave breaks when STOP SLAVE was issud on
# parent slave and temp tables").
stop slave;
connection slave;
insert into t1 values(1);
create table t2 as select * from t1;
save_master_pos;
connection slave_sec;
start slave;
sync_with_master;
show status like 'slave_open_temp_tables';
select * from t2;
# clean up
connection slave;
drop table t2;
save_master_pos;
connection slave_sec;
sync_with_master;
# On purpose, we don't delete the temporary tables explicitely.
# So temp tables remain on slave (remember they are not deleted when the slave
# SQL thread terminates). If you run this test with
# --valgrind --valgrind-options=--show-reachable=yes
# you will see if they get cleaned up at slave's shutdown (that is, if the
# memory they use is freed (it should) by mysqld before it terminates).
# If they wouldn't be cleaned up, you would see some "still reachable" blocks in
# Valgrind.
# End of 4.1 tests
require_manager;
source include/master-slave.inc;
connect (slave_sec,localhost,root,,test,0,slave.sock-1);
connect (slave_ter,localhost,root,,test,0,slave.sock-2);
connection master;
show variables like 'rpl_recovery_rank';
show status like 'Rpl_status';
create table t1(n int);
drop table t1;
sync_slave_with_master;
show variables like 'rpl_recovery_rank';
show status like 'Rpl_status';
connection slave_sec;
start slave;
sync_with_master;
show variables like 'rpl_recovery_rank';
show status like 'Rpl_status';
connection slave_ter;
start slave;
sync_with_master;
show variables like 'rpl_recovery_rank';
show status like 'Rpl_status';
# End of 4.1 tests
......@@ -8,6 +8,8 @@
# merge table getting renamed.
--source include/not_windows.inc
let $SERVER_VERSION=`select version()`;
create table t1 (a int);
insert into t1 values (10);
create table t2 (a int);
......
# You must run this test with --manager.
require_manager;
# Don't know why, but using TCP/IP connections makes this test fail
# with "Lost connection to MySQL server during query" when we
# issue a query after the server restart.
# Maybe this is something awkward in mysqltest or in the manager?
# So we use sockets.
connect (master,localhost,root,,test,0,$MASTER_MYPORT);
connect (slave,localhost,root,,test,0,slave.sock);
connection master;
reset master;
drop table if exists t1;
# we use CREATE SELECT to verify that DELETE does not get into binlog
# before CREATE SELECT
create table t1 type=HEAP select 10 as a;
insert into t1 values(11);
save_master_pos;
show binlog events from 79;
connection slave;
reset slave;
start slave;
sync_with_master;
show create table t1;
select * from t1; # should be one row
server_stop master;
server_start master;
connection master;
select * from t1;
# to check that DELETE is not written twice
# (the LIMIT is to not use the query cache)
select * from t1 limit 10;
save_master_pos;
show binlog events in 'master-bin.002' from 79;
connection slave;
sync_with_master;
select * from t1; # should be empty
# clean up
connection master;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;
# End of 4.1 tests
......@@ -2940,11 +2940,11 @@ begin
show warnings;
end|
--disable_parsing
show binlog events;
show storage engines;
show master status;
show slave hosts;
show slave status;
show binlog events|
show storage engines|
show master status|
show slave hosts|
show slave status|
--enable_parsing
call bug4902()|
......
......@@ -19,11 +19,11 @@ begin
show grants for 'root'@'localhost';
end|
--disable_parsing
show binlog events;
show storage engines;
show master status;
show slave hosts;
show slave status;
show binlog events|
show storage engines|
show master status|
show slave hosts|
show slave status|
--enable_parsing
call bug4902()|
......@@ -108,7 +108,7 @@ flush status|
flush query cache|
delete from t1|
drop procedure bug3583|
drop table t1;
drop table t1|
#
# BUG#6807: Stored procedure crash if CREATE PROCEDURE ... KILL QUERY
......
......@@ -1728,7 +1728,7 @@ select (select a from t1) = (1,2);
select (1,2,3) = (select * from t1);
-- error 1241
select (select * from t1) = (1,2,3);
drop table t1
drop table t1;
#
# Item_int_with_ref check (BUG#10020)
......
......@@ -26,7 +26,7 @@ grant create view,select on test.* to mysqltest_1@localhost;
connect (user1,localhost,mysqltest_1,,test);
connection user1;
-- error ER_SPECIFIC_ACCESS_DENIED
-- error ER_SPECIFIC_ACCESS_DENIED_ERROR
create definer=root@localhost view v1 as select * from mysqltest.t1;
create view v1 as select * from mysqltest.t1;
# try to modify view without DROP privilege on it
......
......@@ -52,7 +52,7 @@ select 2;
select 3;
# Disconnect so that we will not be confused by a future abort from this
# connection.
disconnect default
disconnect default;
#
# Do the same test as above on a TCP connection
......
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