Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
This commit is contained in:
commit
184467a2cc
@ -5,5 +5,13 @@
|
|||||||
45001f7c3b2hhCXDKfUvzkX9TNe6VA
|
45001f7c3b2hhCXDKfUvzkX9TNe6VA
|
||||||
45002051rHJfMEXAIMiAZV0clxvKSA
|
45002051rHJfMEXAIMiAZV0clxvKSA
|
||||||
4513d8e4Af4dQWuk13sArwofRgFDQw
|
4513d8e4Af4dQWuk13sArwofRgFDQw
|
||||||
|
45143312u0Tz4r0wPXCbUKwdHa2jWA
|
||||||
|
45143b90ewOQuTW8-jrB3ZSAQvMRJw
|
||||||
|
45184588w9U72A6KX1hUFeAC4shSHA
|
||||||
|
45185df8mZbxfp85FbA0VxUXkmDewA
|
||||||
4519a6c5BVUxEHTf5iJnjZkixMBs8g
|
4519a6c5BVUxEHTf5iJnjZkixMBs8g
|
||||||
451ab499rgdjXyOnUDqHu-wBDoS-OQ
|
451ab499rgdjXyOnUDqHu-wBDoS-OQ
|
||||||
|
451b110a3ZV6MITl93ehXk2wxrbW7g
|
||||||
|
45214442pBGT9KuZEGixBH71jTzbOA
|
||||||
|
45214a07hVsIGwvwa-WrO-jpeaSwVw
|
||||||
|
452a92d0-31-8wSzSfZi165fcGcXPA
|
||||||
|
@ -46,7 +46,8 @@ mysqladmin_SOURCES = mysqladmin.cc
|
|||||||
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
|
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 \
|
||||||
$(yassl_dummy_link_fix)
|
$(yassl_dummy_link_fix)
|
||||||
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
|
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD) \
|
||||||
|
$(top_builddir)/mysys/libmysys.a
|
||||||
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \
|
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c \
|
||||||
$(top_srcdir)/mysys/my_new.cc \
|
$(top_srcdir)/mysys/my_new.cc \
|
||||||
$(top_srcdir)/mysys/my_bit.c \
|
$(top_srcdir)/mysys/my_bit.c \
|
||||||
|
@ -386,6 +386,21 @@ int main(int argc,char *argv[])
|
|||||||
else
|
else
|
||||||
status.add_to_history=1;
|
status.add_to_history=1;
|
||||||
status.exit_status=1;
|
status.exit_status=1;
|
||||||
|
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
The file descriptor-layer may be out-of-sync with the file-number layer,
|
||||||
|
so we make sure that "stdout" is really open. If its file is closed then
|
||||||
|
explicitly close the FD layer.
|
||||||
|
*/
|
||||||
|
int stdout_fileno_copy;
|
||||||
|
stdout_fileno_copy= dup(fileno(stdout)); /* Okay if fileno fails. */
|
||||||
|
if (stdout_fileno_copy == -1)
|
||||||
|
fclose(stdout);
|
||||||
|
else
|
||||||
|
close(stdout_fileno_copy); /* Clean up dup(). */
|
||||||
|
}
|
||||||
|
|
||||||
load_defaults("my",load_default_groups,&argc,&argv);
|
load_defaults("my",load_default_groups,&argc,&argv);
|
||||||
defaults_argv=argv;
|
defaults_argv=argv;
|
||||||
if (get_options(argc, (char **) argv))
|
if (get_options(argc, (char **) argv))
|
||||||
|
@ -3405,7 +3405,7 @@ static int do_reset_master(MYSQL *mysql_con)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int start_transaction(MYSQL *mysql_con, my_bool consistent_read_now)
|
static int start_transaction(MYSQL *mysql_con)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
We use BEGIN for old servers. --single-transaction --master-data will fail
|
We use BEGIN for old servers. --single-transaction --master-data will fail
|
||||||
@ -3420,10 +3420,8 @@ static int start_transaction(MYSQL *mysql_con, my_bool consistent_read_now)
|
|||||||
"SET SESSION TRANSACTION ISOLATION "
|
"SET SESSION TRANSACTION ISOLATION "
|
||||||
"LEVEL REPEATABLE READ") ||
|
"LEVEL REPEATABLE READ") ||
|
||||||
mysql_query_with_error_report(mysql_con, 0,
|
mysql_query_with_error_report(mysql_con, 0,
|
||||||
consistent_read_now ?
|
|
||||||
"START TRANSACTION "
|
"START TRANSACTION "
|
||||||
"WITH CONSISTENT SNAPSHOT" :
|
"/*!40100 WITH CONSISTENT SNAPSHOT */"));
|
||||||
"BEGIN"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3913,7 +3911,7 @@ int main(int argc, char **argv)
|
|||||||
if ((opt_lock_all_tables || opt_master_data) &&
|
if ((opt_lock_all_tables || opt_master_data) &&
|
||||||
do_flush_tables_read_lock(mysql))
|
do_flush_tables_read_lock(mysql))
|
||||||
goto err;
|
goto err;
|
||||||
if (opt_single_transaction && start_transaction(mysql, test(opt_master_data)))
|
if (opt_single_transaction && start_transaction(mysql))
|
||||||
goto err;
|
goto err;
|
||||||
if (opt_delete_master_logs && do_reset_master(mysql))
|
if (opt_delete_master_logs && do_reset_master(mysql))
|
||||||
goto err;
|
goto err;
|
||||||
|
6299
client/mysqltest.c
6299
client/mysqltest.c
File diff suppressed because it is too large
Load Diff
@ -57,6 +57,16 @@ typedef long my_time_t;
|
|||||||
#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2)
|
#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2)
|
||||||
#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2)
|
#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2)
|
||||||
|
|
||||||
|
#define MYSQL_TIME_WARN_TRUNCATED 1
|
||||||
|
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2
|
||||||
|
|
||||||
|
/* Limits for the TIME data type */
|
||||||
|
#define TIME_MAX_HOUR 838
|
||||||
|
#define TIME_MAX_MINUTE 59
|
||||||
|
#define TIME_MAX_SECOND 59
|
||||||
|
#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \
|
||||||
|
TIME_MAX_SECOND)
|
||||||
|
|
||||||
enum enum_mysql_timestamp_type
|
enum enum_mysql_timestamp_type
|
||||||
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
|
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
|
||||||
uint flags, int *was_cut);
|
uint flags, int *was_cut);
|
||||||
@ -69,7 +79,9 @@ ulonglong TIME_to_ulonglong(const MYSQL_TIME *time);
|
|||||||
|
|
||||||
|
|
||||||
my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
|
my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
|
||||||
int *was_cut);
|
int *warning);
|
||||||
|
|
||||||
|
int check_time_range(struct st_mysql_time *time, int *warning);
|
||||||
|
|
||||||
long calc_daynr(uint year,uint month,uint day);
|
long calc_daynr(uint year,uint month,uint day);
|
||||||
uint calc_days_in_year(uint year);
|
uint calc_days_in_year(uint year);
|
||||||
@ -97,15 +109,25 @@ int my_date_to_str(const MYSQL_TIME *l_time, char *to);
|
|||||||
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
|
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
|
||||||
int my_TIME_to_str(const MYSQL_TIME *l_time, char *to);
|
int my_TIME_to_str(const MYSQL_TIME *l_time, char *to);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The following must be sorted so that simple intervals comes first.
|
Available interval types used in any statement.
|
||||||
(get_interval_value() depends on this)
|
|
||||||
|
'interval_type' must be sorted so that simple intervals comes first,
|
||||||
|
ie year, quarter, month, week, day, hour, etc. The order based on
|
||||||
|
interval size is also important and the intervals should be kept in a
|
||||||
|
large to smaller order. (get_interval_value() depends on this)
|
||||||
|
|
||||||
|
Note: If you change the order of elements in this enum you should fix
|
||||||
|
order of elements in 'interval_type_to_name' and 'interval_names'
|
||||||
|
arrays
|
||||||
|
|
||||||
|
See also interval_type_to_name, get_interval_value, interval_names
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum interval_type
|
enum interval_type
|
||||||
{
|
{
|
||||||
INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_DAY, INTERVAL_HOUR,
|
INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY,
|
||||||
INTERVAL_MINUTE, INTERVAL_WEEK, INTERVAL_SECOND, INTERVAL_MICROSECOND ,
|
INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_MICROSECOND,
|
||||||
INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
|
INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
|
||||||
INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
|
INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
|
||||||
INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,
|
INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
-- source include/master-slave.inc
|
-- source include/master-slave.inc
|
||||||
|
|
||||||
|
let $SERVER_VERSION=`select version()`;
|
||||||
|
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
insert into t1 values (10);
|
insert into t1 values (10);
|
||||||
create table t2 (a int);
|
create table t2 (a int);
|
||||||
|
@ -36,6 +36,7 @@ SELECT * FROM t1;
|
|||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
connection master;
|
connection master;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
let $SERVER_VERSION=`select version()`;
|
||||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||||
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
|
@ -11,8 +11,8 @@ insert into t1 values('ab_def');
|
|||||||
insert into t1 values('abc_ef');
|
insert into t1 values('abc_ef');
|
||||||
insert into t1 values('abcd_f');
|
insert into t1 values('abcd_f');
|
||||||
insert into t1 values('abcde_');
|
insert into t1 values('abcde_');
|
||||||
-- should return ab_def
|
# should return ab_def
|
||||||
select c1 as c1u from t1 where c1 like '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 '#';
|
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -1,137 +0,0 @@
|
|||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
echo here is the sourced script;
|
|
@ -1 +0,0 @@
|
|||||||
--source include/sourced.inc
|
|
@ -143,7 +143,7 @@ sub collect_test_cases ($) {
|
|||||||
{
|
{
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
next if $::opt_do_test and ! defined mtr_match_prefix($elem,$::opt_do_test);
|
next if $::opt_do_test and ! defined mtr_match_prefix($elem,$::opt_do_test);
|
||||||
|
|
||||||
collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled,
|
collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled,
|
||||||
@ -152,43 +152,79 @@ sub collect_test_cases ($) {
|
|||||||
closedir TESTDIR;
|
closedir TESTDIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
# To speed things up, we sort first in if the test require a restart
|
# Reorder the test cases in an order that wil make them faster to run
|
||||||
# or not, second in alphanumeric order.
|
|
||||||
|
|
||||||
if ( $::opt_reorder )
|
if ( $::opt_reorder )
|
||||||
{
|
{
|
||||||
|
|
||||||
my %sort_criteria;
|
my %sort_criteria;
|
||||||
my $tinfo;
|
|
||||||
|
|
||||||
# Make a mapping of test name to a string that represents how that test
|
# Make a mapping of test name to a string that represents how that test
|
||||||
# should be sorted among the other tests. Put the most important criterion
|
# should be sorted among the other tests. Put the most important criterion
|
||||||
# first, then a sub-criterion, then sub-sub-criterion, et c.
|
# first, then a sub-criterion, then sub-sub-criterion, et c.
|
||||||
foreach $tinfo (@$cases)
|
foreach my $tinfo (@$cases)
|
||||||
{
|
{
|
||||||
my @this_criteria = ();
|
my @criteria = ();
|
||||||
|
|
||||||
# Append the criteria for sorting, in order of importance.
|
# Look for tests that muct be in run in a defined order
|
||||||
push(@this_criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~"); # Ending with "~" makes empty sort later than filled
|
# that is defined by test having the same name except for
|
||||||
push(@this_criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
|
# the ending digit
|
||||||
push(@this_criteria, "restart=" . ($tinfo->{'master_restart'} ? "1" : "0"));
|
|
||||||
push(@this_criteria, "big_test=" . ($tinfo->{'big_test'} ? "1" : "0"));
|
# Put variables into hash
|
||||||
push(@this_criteria, join("|", sort keys %{$tinfo})); # Group similar things together. The values may differ substantially. FIXME?
|
my $test_name= $tinfo->{'name'};
|
||||||
push(@this_criteria, $tinfo->{'name'}); # Finally, order by the name
|
my $depend_on_test_name;
|
||||||
|
if ( $test_name =~ /^([\D]+)([0-9]{1})$/ )
|
||||||
$sort_criteria{$tinfo->{"name"}} = join(" ", @this_criteria);
|
{
|
||||||
|
my $base_name= $1;
|
||||||
|
my $idx= $2;
|
||||||
|
mtr_verbose("$test_name => $base_name idx=$idx");
|
||||||
|
if ( $idx > 1 )
|
||||||
|
{
|
||||||
|
$idx-= 1;
|
||||||
|
$base_name= "$base_name$idx";
|
||||||
|
mtr_verbose("New basename $base_name");
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $tinfo2 (@$cases)
|
||||||
|
{
|
||||||
|
if ( $tinfo2->{'name'} eq $base_name )
|
||||||
|
{
|
||||||
|
mtr_verbose("found dependent test $tinfo2->{'name'}");
|
||||||
|
$depend_on_test_name=$base_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( defined $depend_on_test_name )
|
||||||
|
{
|
||||||
|
mtr_verbose("Giving $test_name same critera as $depend_on_test_name");
|
||||||
|
$sort_criteria{$test_name} = $sort_criteria{$depend_on_test_name};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#
|
||||||
|
# Append the criteria for sorting, in order of importance.
|
||||||
|
#
|
||||||
|
push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
|
||||||
|
# Group test with equal options together.
|
||||||
|
# Ending with "~" makes empty sort later than filled
|
||||||
|
push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
|
||||||
|
|
||||||
|
$sort_criteria{$test_name} = join(" ", @criteria);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@$cases = sort { $sort_criteria{$a->{"name"}} cmp $sort_criteria{$b->{"name"}}; } @$cases;
|
@$cases = sort {
|
||||||
|
$sort_criteria{$a->{'name'}} . $a->{'name'} cmp
|
||||||
|
$sort_criteria{$b->{'name'}} . $b->{'name'}; } @$cases;
|
||||||
|
|
||||||
### For debugging the sort-order
|
if ( $::opt_script_debug )
|
||||||
# foreach $tinfo (@$cases)
|
{
|
||||||
# {
|
# For debugging the sort-order
|
||||||
# print $sort_criteria{$tinfo->{"name"}};
|
foreach my $tinfo (@$cases)
|
||||||
# print " -> \t";
|
{
|
||||||
# print $tinfo->{"name"};
|
print("$sort_criteria{$tinfo->{'name'}} -> \t$tinfo->{'name'}\n");
|
||||||
# print "\n";
|
}
|
||||||
# }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $cases;
|
return $cases;
|
||||||
@ -245,6 +281,7 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
$tinfo->{'path'}= $path;
|
$tinfo->{'path'}= $path;
|
||||||
$tinfo->{'timezone'}= "GMT-3"; # for UNIX_TIMESTAMP tests to work
|
$tinfo->{'timezone'}= "GMT-3"; # for UNIX_TIMESTAMP tests to work
|
||||||
|
|
||||||
|
$tinfo->{'slave_num'}= 0; # Default, no slave
|
||||||
if ( defined mtr_match_prefix($tname,"rpl") )
|
if ( defined mtr_match_prefix($tname,"rpl") )
|
||||||
{
|
{
|
||||||
if ( $::opt_skip_rpl )
|
if ( $::opt_skip_rpl )
|
||||||
@ -254,7 +291,8 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tinfo->{'slave_num'}= 1; # Default, use one slave
|
|
||||||
|
$tinfo->{'slave_num'}= 1; # Default for rpl* tests, use one slave
|
||||||
|
|
||||||
if ( $tname eq 'rpl_failsafe' or $tname eq 'rpl_chain_temp_table' )
|
if ( $tname eq 'rpl_failsafe' or $tname eq 'rpl_chain_temp_table' )
|
||||||
{
|
{
|
||||||
@ -272,13 +310,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
{
|
{
|
||||||
# This is an ndb test or all tests should be run with ndb cluster started
|
# This is an ndb test or all tests should be run with ndb cluster started
|
||||||
$tinfo->{'ndb_test'}= 1;
|
$tinfo->{'ndb_test'}= 1;
|
||||||
if ( $::opt_skip_ndbcluster )
|
|
||||||
{
|
|
||||||
# All ndb test's should be skipped
|
|
||||||
$tinfo->{'skip'}= 1;
|
|
||||||
$tinfo->{'comment'}= "No ndbcluster test(--skip-ndbcluster)";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ( ! $::opt_ndbcluster_supported )
|
if ( ! $::opt_ndbcluster_supported )
|
||||||
{
|
{
|
||||||
# Ndb is not supported, skip them
|
# Ndb is not supported, skip them
|
||||||
@ -286,6 +317,13 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
$tinfo->{'comment'}= "No ndbcluster support";
|
$tinfo->{'comment'}= "No ndbcluster support";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
elsif ( $::opt_skip_ndbcluster )
|
||||||
|
{
|
||||||
|
# All ndb test's should be skipped
|
||||||
|
$tinfo->{'skip'}= 1;
|
||||||
|
$tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -316,57 +354,58 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
|
|
||||||
if ( -f $master_opt_file )
|
if ( -f $master_opt_file )
|
||||||
{
|
{
|
||||||
$tinfo->{'master_restart'}= 1; # We think so for now
|
|
||||||
|
|
||||||
MASTER_OPT:
|
my $master_opt= mtr_get_opts_from_file($master_opt_file);
|
||||||
|
|
||||||
|
foreach my $opt ( @$master_opt )
|
||||||
{
|
{
|
||||||
my $master_opt= mtr_get_opts_from_file($master_opt_file);
|
my $value;
|
||||||
|
|
||||||
foreach my $opt ( @$master_opt )
|
# The opt file is used both to send special options to the mysqld
|
||||||
|
# as well as pass special test case specific options to this
|
||||||
|
# script
|
||||||
|
|
||||||
|
$value= mtr_match_prefix($opt, "--timezone=");
|
||||||
|
if ( defined $value )
|
||||||
{
|
{
|
||||||
my $value;
|
$tinfo->{'timezone'}= $value;
|
||||||
|
next;
|
||||||
# This is a dirty hack from old mysql-test-run, we use the opt
|
|
||||||
# file to flag other things as well, it is not a opt list at
|
|
||||||
# all
|
|
||||||
|
|
||||||
$value= mtr_match_prefix($opt, "--timezone=");
|
|
||||||
if ( defined $value )
|
|
||||||
{
|
|
||||||
$tinfo->{'timezone'}= $value;
|
|
||||||
last MASTER_OPT;
|
|
||||||
}
|
|
||||||
|
|
||||||
$value= mtr_match_prefix($opt, "--result-file=");
|
|
||||||
if ( defined $value )
|
|
||||||
{
|
|
||||||
$tinfo->{'result_file'}= "r/$value.result";
|
|
||||||
if ( $::opt_result_ext and $::opt_record or
|
|
||||||
-f "$tinfo->{'result_file'}$::opt_result_ext")
|
|
||||||
{
|
|
||||||
$tinfo->{'result_file'}.= $::opt_result_ext;
|
|
||||||
}
|
|
||||||
$tinfo->{'master_restart'}= 0;
|
|
||||||
last MASTER_OPT;
|
|
||||||
}
|
|
||||||
|
|
||||||
# If we set default time zone, remove the one we have
|
|
||||||
$value= mtr_match_prefix($opt, "--default-time-zone=");
|
|
||||||
if ( defined $value )
|
|
||||||
{
|
|
||||||
$tinfo->{'master_opt'}= [];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Ok, this was a real option list, add it
|
$value= mtr_match_prefix($opt, "--result-file=");
|
||||||
push(@{$tinfo->{'master_opt'}}, @$master_opt);
|
if ( defined $value )
|
||||||
|
{
|
||||||
|
# Specifies the file mysqltest should compare
|
||||||
|
# output against
|
||||||
|
$tinfo->{'result_file'}= "r/$value.result";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# If we set default time zone, remove the one we have
|
||||||
|
$value= mtr_match_prefix($opt, "--default-time-zone=");
|
||||||
|
if ( defined $value )
|
||||||
|
{
|
||||||
|
$tinfo->{'timezone'}= "";
|
||||||
|
# Fallthrough, add this option
|
||||||
|
}
|
||||||
|
|
||||||
|
# The --restart option forces a restart even if no special
|
||||||
|
# option is set. If the options are the same as next testcase
|
||||||
|
# there is no need to restart after the testcase
|
||||||
|
# has completed
|
||||||
|
if ( $opt eq "--force-restart" )
|
||||||
|
{
|
||||||
|
$tinfo->{'force_restart'}= 1;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Ok, this was a real option, add it
|
||||||
|
push(@{$tinfo->{'master_opt'}}, $opt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( -f $slave_opt_file )
|
if ( -f $slave_opt_file )
|
||||||
{
|
{
|
||||||
$tinfo->{'slave_restart'}= 1;
|
|
||||||
my $slave_opt= mtr_get_opts_from_file($slave_opt_file);
|
my $slave_opt= mtr_get_opts_from_file($slave_opt_file);
|
||||||
|
|
||||||
foreach my $opt ( @$slave_opt )
|
foreach my $opt ( @$slave_opt )
|
||||||
@ -381,7 +420,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
if ( -f $slave_mi_file )
|
if ( -f $slave_mi_file )
|
||||||
{
|
{
|
||||||
$tinfo->{'slave_mi'}= mtr_get_opts_from_file($slave_mi_file);
|
$tinfo->{'slave_mi'}= mtr_get_opts_from_file($slave_mi_file);
|
||||||
$tinfo->{'slave_restart'}= 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( -f $master_sh )
|
if ( -f $master_sh )
|
||||||
@ -395,7 +433,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tinfo->{'master_sh'}= $master_sh;
|
$tinfo->{'master_sh'}= $master_sh;
|
||||||
$tinfo->{'master_restart'}= 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,7 +447,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tinfo->{'slave_sh'}= $slave_sh;
|
$tinfo->{'slave_sh'}= $slave_sh;
|
||||||
$tinfo->{'slave_restart'}= 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -515,17 +551,6 @@ sub collect_one_test_case($$$$$$$) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# We can't restart a running server that may be in use
|
|
||||||
|
|
||||||
if ( $::glob_use_running_server and
|
|
||||||
( $tinfo->{'master_restart'} or $tinfo->{'slave_restart'} ) )
|
|
||||||
{
|
|
||||||
$tinfo->{'skip'}= 1;
|
|
||||||
$tinfo->{'comment'}= "Can't restart a running server";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,12 +23,28 @@ sub gcov_prepare () {
|
|||||||
-or -name \*.da | xargs rm`;
|
-or -name \*.da | xargs rm`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Used by gcov
|
||||||
|
our @mysqld_src_dirs=
|
||||||
|
(
|
||||||
|
"strings",
|
||||||
|
"mysys",
|
||||||
|
"include",
|
||||||
|
"extra",
|
||||||
|
"regex",
|
||||||
|
"isam",
|
||||||
|
"merge",
|
||||||
|
"myisam",
|
||||||
|
"myisammrg",
|
||||||
|
"heap",
|
||||||
|
"sql",
|
||||||
|
);
|
||||||
|
|
||||||
sub gcov_collect () {
|
sub gcov_collect () {
|
||||||
|
|
||||||
print "Collecting source coverage info...\n";
|
print "Collecting source coverage info...\n";
|
||||||
-f $::opt_gcov_msg and unlink($::opt_gcov_msg);
|
-f $::opt_gcov_msg and unlink($::opt_gcov_msg);
|
||||||
-f $::opt_gcov_err and unlink($::opt_gcov_err);
|
-f $::opt_gcov_err and unlink($::opt_gcov_err);
|
||||||
foreach my $d ( @::mysqld_src_dirs )
|
foreach my $d ( @mysqld_src_dirs )
|
||||||
{
|
{
|
||||||
chdir("$::glob_basedir/$d");
|
chdir("$::glob_basedir/$d");
|
||||||
foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) )
|
foreach my $f ( (glob("*.h"), glob("*.cc"), glob("*.c")) )
|
||||||
|
@ -12,6 +12,7 @@ sub mtr_fromfile ($);
|
|||||||
sub mtr_tofile ($@);
|
sub mtr_tofile ($@);
|
||||||
sub mtr_tonewfile($@);
|
sub mtr_tonewfile($@);
|
||||||
sub mtr_lastlinefromfile($);
|
sub mtr_lastlinefromfile($);
|
||||||
|
sub mtr_appendfile_to_file ($$);
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@ -170,4 +171,17 @@ sub mtr_tonewfile ($@) {
|
|||||||
close FILE;
|
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;
|
1;
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
# and is part of the translation of the Bourne shell script with the
|
# and is part of the translation of the Bourne shell script with the
|
||||||
# same name.
|
# same name.
|
||||||
|
|
||||||
#use Carp qw(cluck);
|
|
||||||
use Socket;
|
use Socket;
|
||||||
use Errno;
|
use Errno;
|
||||||
use strict;
|
use strict;
|
||||||
@ -93,8 +92,6 @@ sub spawn_impl ($$$$$$$$) {
|
|||||||
my $pid_file= shift; # FIXME
|
my $pid_file= shift; # FIXME
|
||||||
my $spawn_opts= shift;
|
my $spawn_opts= shift;
|
||||||
|
|
||||||
mtr_error("Can't spawn with empty \"path\"") unless defined $path;
|
|
||||||
|
|
||||||
if ( $::opt_script_debug )
|
if ( $::opt_script_debug )
|
||||||
{
|
{
|
||||||
print STDERR "\n";
|
print STDERR "\n";
|
||||||
@ -118,6 +115,9 @@ sub spawn_impl ($$$$$$$$) {
|
|||||||
print STDERR "#### ", "-" x 78, "\n";
|
print STDERR "#### ", "-" x 78, "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mtr_error("Can't spawn with empty \"path\"") unless defined $path;
|
||||||
|
|
||||||
|
|
||||||
FORK:
|
FORK:
|
||||||
{
|
{
|
||||||
my $pid= fork();
|
my $pid= fork();
|
||||||
@ -339,19 +339,6 @@ sub mtr_kill_leftovers () {
|
|||||||
mtr_report("Killing Possible Leftover Processes");
|
mtr_report("Killing Possible Leftover Processes");
|
||||||
mtr_debug("mtr_kill_leftovers(): started.");
|
mtr_debug("mtr_kill_leftovers(): started.");
|
||||||
|
|
||||||
mkpath("$::opt_vardir/log"); # Needed for mysqladmin log
|
|
||||||
|
|
||||||
# Stop or kill Instance Manager and all its children. If we failed to do
|
|
||||||
# that, we can only abort -- there is nothing left to do.
|
|
||||||
|
|
||||||
mtr_error("Failed to stop Instance Manager.")
|
|
||||||
unless mtr_im_stop($::instance_manager);
|
|
||||||
|
|
||||||
# Start shutdown of masters and slaves. Don't touch IM-managed mysqld
|
|
||||||
# instances -- they should be stopped by mtr_im_stop().
|
|
||||||
|
|
||||||
mtr_debug("Shutting down mysqld-instances...");
|
|
||||||
|
|
||||||
my @kill_pids;
|
my @kill_pids;
|
||||||
my %admin_pids;
|
my %admin_pids;
|
||||||
|
|
||||||
@ -377,40 +364,41 @@ sub mtr_kill_leftovers () {
|
|||||||
$srv->{'pid'}= 0; # Assume we are done with it
|
$srv->{'pid'}= 0; # Assume we are done with it
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start shutdown of clusters.
|
if ( ! $::opt_skip_ndbcluster )
|
||||||
|
|
||||||
mtr_debug("Shutting down cluster...");
|
|
||||||
|
|
||||||
foreach my $cluster (@{$::clusters})
|
|
||||||
{
|
{
|
||||||
mtr_debug(" - cluster " .
|
# Start shutdown of clusters.
|
||||||
"(pid: $cluster->{pid}; " .
|
mtr_debug("Shutting down cluster...");
|
||||||
"pid file: '$cluster->{path_pid})");
|
|
||||||
|
|
||||||
my $pid= mtr_ndbmgm_start($cluster, "shutdown");
|
foreach my $cluster (@{$::clusters})
|
||||||
|
|
||||||
# Save the pid of the ndb_mgm process
|
|
||||||
$admin_pids{$pid}= 1;
|
|
||||||
|
|
||||||
push(@kill_pids,{
|
|
||||||
pid => $cluster->{'pid'},
|
|
||||||
pidfile => $cluster->{'path_pid'}
|
|
||||||
});
|
|
||||||
|
|
||||||
$cluster->{'pid'}= 0; # Assume we are done with it
|
|
||||||
|
|
||||||
|
|
||||||
foreach my $ndbd (@{$cluster->{'ndbds'}})
|
|
||||||
{
|
{
|
||||||
mtr_debug(" - ndbd " .
|
mtr_debug(" - cluster " .
|
||||||
"(pid: $ndbd->{pid}; " .
|
"(pid: $cluster->{pid}; " .
|
||||||
"pid file: '$ndbd->{path_pid})");
|
"pid file: '$cluster->{path_pid})");
|
||||||
|
|
||||||
|
my $pid= mtr_ndbmgm_start($cluster, "shutdown");
|
||||||
|
|
||||||
|
# Save the pid of the ndb_mgm process
|
||||||
|
$admin_pids{$pid}= 1;
|
||||||
|
|
||||||
push(@kill_pids,{
|
push(@kill_pids,{
|
||||||
pid => $ndbd->{'pid'},
|
pid => $cluster->{'pid'},
|
||||||
pidfile => $ndbd->{'path_pid'},
|
pidfile => $cluster->{'path_pid'}
|
||||||
});
|
});
|
||||||
$ndbd->{'pid'}= 0; # Assume we are done with it
|
|
||||||
|
$cluster->{'pid'}= 0; # Assume we are done with it
|
||||||
|
|
||||||
|
foreach my $ndbd (@{$cluster->{'ndbds'}})
|
||||||
|
{
|
||||||
|
mtr_debug(" - ndbd " .
|
||||||
|
"(pid: $ndbd->{pid}; " .
|
||||||
|
"pid file: '$ndbd->{path_pid})");
|
||||||
|
|
||||||
|
push(@kill_pids,{
|
||||||
|
pid => $ndbd->{'pid'},
|
||||||
|
pidfile => $ndbd->{'path_pid'},
|
||||||
|
});
|
||||||
|
$ndbd->{'pid'}= 0; # Assume we are done with it
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,13 +53,6 @@ sub mtr_show_failed_diff ($) {
|
|||||||
{
|
{
|
||||||
$result_file= $eval_file;
|
$result_file= $eval_file;
|
||||||
}
|
}
|
||||||
elsif ( $::opt_result_ext and
|
|
||||||
( $::opt_record or -f "$result_file$::opt_result_ext" ))
|
|
||||||
{
|
|
||||||
# If we have an special externsion for result files we use it if we are
|
|
||||||
# recording or a result file with that extension exists.
|
|
||||||
$result_file= "$result_file$::opt_result_ext";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $diffopts= $::opt_udiff ? "-u" : "-c";
|
my $diffopts= $::opt_udiff ? "-u" : "-c";
|
||||||
|
|
||||||
@ -151,9 +144,11 @@ sub mtr_report_test_failed ($) {
|
|||||||
print "[ fail ]\n";
|
print "[ fail ]\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
# FIXME Instead of this test, and meaningless error message in 'else'
|
if ( $tinfo->{'comment'} )
|
||||||
# we should write out into $::path_timefile when the error occurs.
|
{
|
||||||
if ( -f $::path_timefile )
|
print "\nERROR: $tinfo->{'comment'}\n";
|
||||||
|
}
|
||||||
|
elsif ( -f $::path_timefile )
|
||||||
{
|
{
|
||||||
print "\nErrors are (from $::path_timefile) :\n";
|
print "\nErrors are (from $::path_timefile) :\n";
|
||||||
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
|
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
|
||||||
@ -177,7 +172,7 @@ sub mtr_report_stats ($) {
|
|||||||
my $tot_failed= 0;
|
my $tot_failed= 0;
|
||||||
my $tot_tests= 0;
|
my $tot_tests= 0;
|
||||||
my $tot_restarts= 0;
|
my $tot_restarts= 0;
|
||||||
my $found_problems= 0; # Some warnings are errors...
|
my $found_problems= 0; # Some warnings in the logfiles are errors...
|
||||||
|
|
||||||
foreach my $tinfo (@$tests)
|
foreach my $tinfo (@$tests)
|
||||||
{
|
{
|
||||||
@ -288,6 +283,7 @@ sub mtr_report_stats ($) {
|
|||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
|
# Print a list of testcases that failed
|
||||||
if ( $tot_failed != 0 )
|
if ( $tot_failed != 0 )
|
||||||
{
|
{
|
||||||
my $test_mode= join(" ", @::glob_test_mode) || "default";
|
my $test_mode= join(" ", @::glob_test_mode) || "default";
|
||||||
@ -301,7 +297,30 @@ sub mtr_report_stats ($) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Print a list of check_testcases that failed(if any)
|
||||||
|
if ( $::opt_check_testcases )
|
||||||
|
{
|
||||||
|
my @check_testcases= ();
|
||||||
|
|
||||||
|
foreach my $tinfo (@$tests)
|
||||||
|
{
|
||||||
|
if ( defined $tinfo->{'check_testcase_failed'} )
|
||||||
|
{
|
||||||
|
push(@check_testcases, $tinfo->{'name'});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( @check_testcases )
|
||||||
|
{
|
||||||
|
print "Check of testcase failed for: ";
|
||||||
|
print join(" ", @check_testcases);
|
||||||
|
print "\n\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( $tot_failed != 0 || $found_problems)
|
if ( $tot_failed != 0 || $found_problems)
|
||||||
{
|
{
|
||||||
mtr_error("there where failing test cases");
|
mtr_error("there where failing test cases");
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -220,7 +220,7 @@ select (@before:=unix_timestamp())*0;
|
|||||||
(@before:=unix_timestamp())*0
|
(@before:=unix_timestamp())*0
|
||||||
0
|
0
|
||||||
begin;
|
begin;
|
||||||
select * from t1 for update;
|
select * from t1 for update;
|
||||||
insert into t2 values (20);
|
insert into t2 values (20);
|
||||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
select (@after:=unix_timestamp())*0;
|
select (@after:=unix_timestamp())*0;
|
||||||
|
@ -195,7 +195,7 @@ select (@before:=unix_timestamp())*0;
|
|||||||
(@before:=unix_timestamp())*0
|
(@before:=unix_timestamp())*0
|
||||||
0
|
0
|
||||||
begin;
|
begin;
|
||||||
select * from t1 for update;
|
select * from t1 for update;
|
||||||
insert into t2 values (20);
|
insert into t2 values (20);
|
||||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
select (@after:=unix_timestamp())*0;
|
select (@after:=unix_timestamp())*0;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1(n int not null, key(n), key(n), key(n), key(n));
|
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);
|
insert into t1 values (200000);
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check status OK
|
test.t1 check status OK
|
||||||
|
@ -4913,8 +4913,7 @@ bonfire
|
|||||||
Colombo
|
Colombo
|
||||||
nondecreasing
|
nondecreasing
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
ALTER TABLE t2 RENAME t1
|
ALTER TABLE t2 RENAME t1;
|
||||||
#;
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
|
Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL,
|
||||||
|
@ -79,9 +79,9 @@ drop table if exists t1;
|
|||||||
create table t1 (i int);
|
create table t1 (i int);
|
||||||
lock tables t1 read;
|
lock tables t1 read;
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
show open tables;
|
show open tables;
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
select 1;
|
select 1;
|
||||||
1
|
1
|
||||||
1
|
1
|
||||||
|
@ -9,13 +9,13 @@ n
|
|||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||||
drop table t2;
|
drop table t2;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
create table mysqltest.t1(n int);
|
create table mysqltest.t1(n int);
|
||||||
insert into mysqltest.t1 values (23);
|
insert into mysqltest.t1 values (23);
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
select * from mysqltest.t1;
|
select * from mysqltest.t1;
|
||||||
n
|
n
|
||||||
23
|
23
|
||||||
@ -51,7 +51,7 @@ drop table t1, t2, t3;
|
|||||||
create table t1 (c1 int);
|
create table t1 (c1 int);
|
||||||
create table t2 (c1 int);
|
create table t2 (c1 int);
|
||||||
lock table t1 write;
|
lock table t1 write;
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
insert into t2 values(1);
|
insert into t2 values(1);
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
|
@ -5,7 +5,7 @@ insert into t1 values(1);
|
|||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
commit;
|
commit;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
unlock tables;
|
unlock tables;
|
||||||
@ -14,8 +14,8 @@ select * from t1 for update;
|
|||||||
a
|
a
|
||||||
1
|
1
|
||||||
begin;
|
begin;
|
||||||
select * from t1 for update;
|
select * from t1 for update;
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
commit;
|
commit;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -45,7 +45,7 @@ flush tables with read lock;
|
|||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 102
|
master-bin.000001 102
|
||||||
commit;
|
commit;
|
||||||
show master status;
|
show master status;
|
||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000001 102
|
master-bin.000001 102
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1 (kill_id int);
|
create table t1 (kill_id int);
|
||||||
insert into t1 values(connection_id());
|
insert into t1 values(connection_id());
|
||||||
flush tables with read lock;
|
flush tables with read lock;
|
||||||
select ((@id := kill_id) - kill_id) from t1;
|
select ((@id := kill_id) - kill_id) from t1;
|
||||||
((@id := kill_id) - kill_id)
|
((@id := kill_id) - kill_id)
|
||||||
0
|
0
|
||||||
|
@ -9,7 +9,7 @@ test.t1 check status OK
|
|||||||
unlock tables;
|
unlock tables;
|
||||||
lock table t1 read;
|
lock table t1 read;
|
||||||
lock table t1 read;
|
lock table t1 read;
|
||||||
flush table t1;
|
flush table t1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
@ -19,7 +19,7 @@ a
|
|||||||
1
|
1
|
||||||
unlock tables;
|
unlock tables;
|
||||||
lock table t1 write;
|
lock table t1 write;
|
||||||
lock table t1 read;
|
lock table t1 read;
|
||||||
flush table t1;
|
flush table t1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
@ -27,7 +27,7 @@ a
|
|||||||
unlock tables;
|
unlock tables;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
lock table t1 read;
|
lock table t1 read;
|
||||||
lock table t1 write;
|
lock table t1 write;
|
||||||
flush table t1;
|
flush table t1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a
|
a
|
||||||
|
@ -79,6 +79,16 @@ uncompress(a) uncompressed_length(a)
|
|||||||
NULL NULL
|
NULL NULL
|
||||||
a 1
|
a 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1(a blob);
|
||||||
|
insert into t1 values ('0'), (NULL), ('0');
|
||||||
|
select compress(a), compress(a) from t1;
|
||||||
|
select compress(a) is null from t1;
|
||||||
|
compress(a) is null
|
||||||
|
0
|
||||||
|
1
|
||||||
|
0
|
||||||
|
drop table t1;
|
||||||
|
End of 4.1 tests
|
||||||
create table t1 (a varchar(32) not null);
|
create table t1 (a varchar(32) not null);
|
||||||
insert into t1 values ('foo');
|
insert into t1 values ('foo');
|
||||||
explain select * from t1 where uncompress(a) is null;
|
explain select * from t1 where uncompress(a) is null;
|
||||||
|
@ -71,3 +71,17 @@ NULL
|
|||||||
NULL
|
NULL
|
||||||
NULL
|
NULL
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
End of 4.1 tests
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 DAY;
|
||||||
|
CAST('2006-09-26' AS DATE) + INTERVAL 1 DAY
|
||||||
|
2006-09-27
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 MONTH;
|
||||||
|
CAST('2006-09-26' AS DATE) + INTERVAL 1 MONTH
|
||||||
|
2006-10-26
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR;
|
||||||
|
CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR
|
||||||
|
2007-09-26
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK;
|
||||||
|
CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK
|
||||||
|
2006-10-03
|
||||||
|
End of 5.0 tests
|
||||||
|
@ -63,7 +63,7 @@ FROM t1
|
|||||||
WHERE conn = 'default';
|
WHERE conn = 'default';
|
||||||
IS_USED_LOCK('bug16501') = connection_id
|
IS_USED_LOCK('bug16501') = connection_id
|
||||||
1
|
1
|
||||||
SELECT GET_LOCK('bug16501',600);
|
SELECT GET_LOCK('bug16501',600);
|
||||||
SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
|
SELECT IS_USED_LOCK('bug16501') = CONNECTION_ID();
|
||||||
IS_USED_LOCK('bug16501') = CONNECTION_ID()
|
IS_USED_LOCK('bug16501') = CONNECTION_ID()
|
||||||
1
|
1
|
||||||
|
@ -107,7 +107,9 @@ subtime("02:01:01.999999", "01:01:01.999999")
|
|||||||
01:00:00.000000
|
01:00:00.000000
|
||||||
select timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002");
|
select timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002");
|
||||||
timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002")
|
timediff("1997-01-01 23:59:59.000001","1995-12-31 23:59:59.000002")
|
||||||
8807:59:59.999999
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '8807:59:59.999999'
|
||||||
select timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002");
|
select timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002");
|
||||||
timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002")
|
timediff("1997-12-31 23:59:59.000001","1997-12-30 01:01:01.000002")
|
||||||
46:58:57.999999
|
46:58:57.999999
|
||||||
@ -219,13 +221,16 @@ SELECT TIMEDIFF(t1, t4) As ttt, TIMEDIFF(t2, t3) As qqq,
|
|||||||
TIMEDIFF(t3, t2) As eee, TIMEDIFF(t2, t4) As rrr from test;
|
TIMEDIFF(t3, t2) As eee, TIMEDIFF(t2, t4) As rrr from test;
|
||||||
ttt qqq eee rrr
|
ttt qqq eee rrr
|
||||||
-744:00:00 NULL NULL NULL
|
-744:00:00 NULL NULL NULL
|
||||||
26305:01:02 22:58:58 -22:58:58 NULL
|
838:59:59 22:58:58 -22:58:58 NULL
|
||||||
-26305:01:02 -22:58:58 22:58:58 NULL
|
-838:59:59 -22:58:58 22:58:58 NULL
|
||||||
NULL 26:02:02 -26:02:02 NULL
|
NULL 26:02:02 -26:02:02 NULL
|
||||||
00:00:00 -26:02:02 26:02:02 NULL
|
00:00:00 -26:02:02 26:02:02 NULL
|
||||||
NULL NULL NULL NULL
|
NULL NULL NULL NULL
|
||||||
NULL NULL NULL NULL
|
NULL NULL NULL NULL
|
||||||
00:00:00 -24:00:00 24:00:00 NULL
|
00:00:00 -24:00:00 24:00:00 NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '26305:01:02'
|
||||||
|
Warning 1292 Truncated incorrect time value: '-26305:01:02'
|
||||||
drop table t1, test;
|
drop table t1, test;
|
||||||
select addtime("-01:01:01.01", "-23:59:59.1") as a;
|
select addtime("-01:01:01.01", "-23:59:59.1") as a;
|
||||||
a
|
a
|
||||||
@ -235,7 +240,9 @@ a
|
|||||||
10000
|
10000
|
||||||
select microsecond(19971231235959.01) as a;
|
select microsecond(19971231235959.01) as a;
|
||||||
a
|
a
|
||||||
10000
|
0
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '19971231235959.01'
|
||||||
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
|
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
|
||||||
a
|
a
|
||||||
1997-12-31 00:00:10.090000
|
1997-12-31 00:00:10.090000
|
||||||
|
@ -339,7 +339,9 @@ extract(DAY_MINUTE FROM "02 10:11:12")
|
|||||||
21011
|
21011
|
||||||
select extract(DAY_SECOND FROM "225 10:11:12");
|
select extract(DAY_SECOND FROM "225 10:11:12");
|
||||||
extract(DAY_SECOND FROM "225 10:11:12")
|
extract(DAY_SECOND FROM "225 10:11:12")
|
||||||
225101112
|
8385959
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '225 10:11:12'
|
||||||
select extract(HOUR FROM "1999-01-02 10:11:12");
|
select extract(HOUR FROM "1999-01-02 10:11:12");
|
||||||
extract(HOUR FROM "1999-01-02 10:11:12")
|
extract(HOUR FROM "1999-01-02 10:11:12")
|
||||||
10
|
10
|
||||||
@ -612,7 +614,7 @@ date_add(date,INTERVAL "1 1:1:1" DAY_SECOND)
|
|||||||
2003-01-03 01:01:01
|
2003-01-03 01:01:01
|
||||||
select date_add(date,INTERVAL "1" WEEK) from t1;
|
select date_add(date,INTERVAL "1" WEEK) from t1;
|
||||||
date_add(date,INTERVAL "1" WEEK)
|
date_add(date,INTERVAL "1" WEEK)
|
||||||
2003-01-09 00:00:00
|
2003-01-09
|
||||||
select date_add(date,INTERVAL "1" QUARTER) from t1;
|
select date_add(date,INTERVAL "1" QUARTER) from t1;
|
||||||
date_add(date,INTERVAL "1" QUARTER)
|
date_add(date,INTERVAL "1" QUARTER)
|
||||||
2003-04-02
|
2003-04-02
|
||||||
@ -621,7 +623,7 @@ timestampadd(MINUTE, 1, date)
|
|||||||
2003-01-02 00:01:00
|
2003-01-02 00:01:00
|
||||||
select timestampadd(WEEK, 1, date) from t1;
|
select timestampadd(WEEK, 1, date) from t1;
|
||||||
timestampadd(WEEK, 1, date)
|
timestampadd(WEEK, 1, date)
|
||||||
2003-01-09 00:00:00
|
2003-01-09
|
||||||
select timestampadd(SQL_TSI_SECOND, 1, date) from t1;
|
select timestampadd(SQL_TSI_SECOND, 1, date) from t1;
|
||||||
timestampadd(SQL_TSI_SECOND, 1, date)
|
timestampadd(SQL_TSI_SECOND, 1, date)
|
||||||
2003-01-02 00:00:01
|
2003-01-02 00:00:01
|
||||||
@ -902,6 +904,93 @@ fmtddate field2
|
|||||||
Sep-4 12:00AM abcd
|
Sep-4 12:00AM abcd
|
||||||
DROP TABLE testBug8868;
|
DROP TABLE testBug8868;
|
||||||
SET NAMES DEFAULT;
|
SET NAMES DEFAULT;
|
||||||
|
SELECT SEC_TO_TIME(3300000);
|
||||||
|
SEC_TO_TIME(3300000)
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '3300000'
|
||||||
|
SELECT SEC_TO_TIME(3300000)+0;
|
||||||
|
SEC_TO_TIME(3300000)+0
|
||||||
|
8385959.000000
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '3300000'
|
||||||
|
SELECT SEC_TO_TIME(3600 * 4294967296);
|
||||||
|
SEC_TO_TIME(3600 * 4294967296)
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '15461882265600'
|
||||||
|
SELECT TIME_TO_SEC('916:40:00');
|
||||||
|
TIME_TO_SEC('916:40:00')
|
||||||
|
3020399
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||||
|
SELECT ADDTIME('500:00:00', '416:40:00');
|
||||||
|
ADDTIME('500:00:00', '416:40:00')
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||||
|
SELECT ADDTIME('916:40:00', '416:40:00');
|
||||||
|
ADDTIME('916:40:00', '416:40:00')
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||||
|
Warning 1292 Truncated incorrect time value: '1255:39:59'
|
||||||
|
SELECT SUBTIME('916:40:00', '416:40:00');
|
||||||
|
SUBTIME('916:40:00', '416:40:00')
|
||||||
|
422:19:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '916:40:00'
|
||||||
|
SELECT SUBTIME('-916:40:00', '416:40:00');
|
||||||
|
SUBTIME('-916:40:00', '416:40:00')
|
||||||
|
-838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '-916:40:00'
|
||||||
|
Warning 1292 Truncated incorrect time value: '-1255:39:59'
|
||||||
|
SELECT MAKETIME(916,0,0);
|
||||||
|
MAKETIME(916,0,0)
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '916:00:00'
|
||||||
|
SELECT MAKETIME(4294967296, 0, 0);
|
||||||
|
MAKETIME(4294967296, 0, 0)
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '4294967296:00:00'
|
||||||
|
SELECT MAKETIME(-4294967296, 0, 0);
|
||||||
|
MAKETIME(-4294967296, 0, 0)
|
||||||
|
-838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '-4294967296:00:00'
|
||||||
|
SELECT MAKETIME(0, 4294967296, 0);
|
||||||
|
MAKETIME(0, 4294967296, 0)
|
||||||
|
NULL
|
||||||
|
SELECT MAKETIME(0, 0, 4294967296);
|
||||||
|
MAKETIME(0, 0, 4294967296)
|
||||||
|
NULL
|
||||||
|
SELECT MAKETIME(CAST(-1 AS UNSIGNED), 0, 0);
|
||||||
|
MAKETIME(CAST(-1 AS UNSIGNED), 0, 0)
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '18446744073709551615:00:00'
|
||||||
|
SELECT EXTRACT(HOUR FROM '100000:02:03');
|
||||||
|
EXTRACT(HOUR FROM '100000:02:03')
|
||||||
|
838
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '100000:02:03'
|
||||||
|
CREATE TABLE t1(f1 TIME);
|
||||||
|
INSERT INTO t1 VALUES('916:00:00 a');
|
||||||
|
Warnings:
|
||||||
|
Warning 1265 Data truncated for column 'f1' at row 1
|
||||||
|
Warning 1264 Out of range value adjusted for column 'f1' at row 1
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1
|
||||||
|
838:59:59
|
||||||
|
DROP TABLE t1;
|
||||||
|
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
|
||||||
|
SEC_TO_TIME(CAST(-1 AS UNSIGNED))
|
||||||
|
838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '18446744073709551615'
|
||||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
|
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
|
||||||
union
|
union
|
||||||
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
|
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
|
||||||
|
@ -336,12 +336,12 @@ drop database mysqltest_1;
|
|||||||
set password = password("changed");
|
set password = password("changed");
|
||||||
ERROR 42000: Access denied for user ''@'localhost' to database 'mysql'
|
ERROR 42000: Access denied for user ''@'localhost' to database 'mysql'
|
||||||
lock table mysql.user write;
|
lock table mysql.user write;
|
||||||
flush privileges;
|
flush privileges;
|
||||||
grant all on *.* to 'mysqltest_1'@'localhost';
|
grant all on *.* to 'mysqltest_1'@'localhost';
|
||||||
unlock tables;
|
unlock tables;
|
||||||
lock table mysql.user write;
|
lock table mysql.user write;
|
||||||
set password for 'mysqltest_1'@'localhost' = password('');
|
set password for 'mysqltest_1'@'localhost' = password('');
|
||||||
revoke all on *.* from 'mysqltest_1'@'localhost';
|
revoke all on *.* from 'mysqltest_1'@'localhost';
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop user 'mysqltest_1'@'localhost';
|
drop user 'mysqltest_1'@'localhost';
|
||||||
create database TESTDB;
|
create database TESTDB;
|
||||||
|
@ -476,7 +476,7 @@ handler t1 read first;
|
|||||||
c1
|
c1
|
||||||
1
|
1
|
||||||
send the below to another connection, do not wait for the result
|
send the below to another connection, do not wait for the result
|
||||||
optimize table t1;
|
optimize table t1;
|
||||||
proceed with the normal connection
|
proceed with the normal connection
|
||||||
handler t1 read next;
|
handler t1 read next;
|
||||||
c1
|
c1
|
||||||
@ -502,7 +502,7 @@ flush tables with read lock;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
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
|
send the below to another connection, do not wait for the result
|
||||||
drop table t1;
|
drop table t1;
|
||||||
proceed with the normal connection
|
proceed with the normal connection
|
||||||
select * from t1;
|
select * from t1;
|
||||||
c1
|
c1
|
||||||
|
@ -476,7 +476,7 @@ handler t1 read first;
|
|||||||
c1
|
c1
|
||||||
1
|
1
|
||||||
send the below to another connection, do not wait for the result
|
send the below to another connection, do not wait for the result
|
||||||
optimize table t1;
|
optimize table t1;
|
||||||
proceed with the normal connection
|
proceed with the normal connection
|
||||||
handler t1 read next;
|
handler t1 read next;
|
||||||
c1
|
c1
|
||||||
@ -502,7 +502,7 @@ flush tables with read lock;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
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
|
send the below to another connection, do not wait for the result
|
||||||
drop table t1;
|
drop table t1;
|
||||||
proceed with the normal connection
|
proceed with the normal connection
|
||||||
select * from t1;
|
select * from t1;
|
||||||
c1
|
c1
|
||||||
|
@ -10,7 +10,7 @@ start transaction;
|
|||||||
select f1();
|
select f1();
|
||||||
f1()
|
f1()
|
||||||
100
|
100
|
||||||
update t1 set col2=0 where col1=1;
|
update t1 set col2=0 where col1=1;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
col1 col2
|
col1 col2
|
||||||
1 100
|
1 100
|
||||||
|
@ -22,7 +22,7 @@ create table t2 (id int unsigned not null);
|
|||||||
insert into t2 select id from t1;
|
insert into t2 select id from t1;
|
||||||
create table t3 (kill_id int);
|
create table t3 (kill_id int);
|
||||||
insert into t3 values(connection_id());
|
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;
|
select ((@id := kill_id) - kill_id) from t3;
|
||||||
((@id := kill_id) - kill_id)
|
((@id := kill_id) - kill_id)
|
||||||
0
|
0
|
||||||
@ -32,7 +32,7 @@ drop table t1, t2, t3;
|
|||||||
select get_lock("a", 10);
|
select get_lock("a", 10);
|
||||||
get_lock("a", 10)
|
get_lock("a", 10)
|
||||||
1
|
1
|
||||||
select get_lock("a", 10);
|
select get_lock("a", 10);
|
||||||
get_lock("a", 10)
|
get_lock("a", 10)
|
||||||
NULL
|
NULL
|
||||||
select 1;
|
select 1;
|
||||||
|
@ -2,8 +2,8 @@ drop table if exists t1,t2;
|
|||||||
create table t1(n int);
|
create table t1(n int);
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
lock tables t1 write;
|
lock tables t1 write;
|
||||||
update low_priority t1 set n = 4;
|
update low_priority t1 set n = 4;
|
||||||
select n from t1;
|
select n from t1;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
n
|
n
|
||||||
4
|
4
|
||||||
@ -11,8 +11,8 @@ drop table t1;
|
|||||||
create table t1(n int);
|
create table t1(n int);
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
lock tables t1 read;
|
lock tables t1 read;
|
||||||
update low_priority t1 set n = 4;
|
update low_priority t1 set n = 4;
|
||||||
select n from t1;
|
select n from t1;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
n
|
n
|
||||||
1
|
1
|
||||||
@ -23,7 +23,7 @@ insert into t1 values(1,1);
|
|||||||
insert into t1 values(2,2);
|
insert into t1 values(2,2);
|
||||||
insert into t2 values(1,2);
|
insert into t2 values(1,2);
|
||||||
lock table t1 read;
|
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;
|
select c from t2;
|
||||||
c
|
c
|
||||||
2
|
2
|
||||||
@ -32,14 +32,14 @@ drop table t2;
|
|||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
create table t2 (a int);
|
create table t2 (a int);
|
||||||
lock table t1 write, t2 write;
|
lock table t1 write, t2 write;
|
||||||
insert t1 select * from t2;
|
insert t1 select * from t2;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
create table t2 (a int);
|
create table t2 (a int);
|
||||||
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
|
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
|
||||||
insert t1 select * from t2;
|
insert t1 select * from t2;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||||
drop table t1;
|
drop table t1;
|
||||||
@ -54,7 +54,7 @@ use mysql;
|
|||||||
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
use mysql;
|
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;
|
OPTIMIZE TABLES columns_priv, db, host, user;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
mysql.columns_priv optimize status OK
|
mysql.columns_priv optimize status OK
|
||||||
@ -68,14 +68,14 @@ use test;
|
|||||||
use test;
|
use test;
|
||||||
CREATE TABLE t1 (c1 int);
|
CREATE TABLE t1 (c1 int);
|
||||||
LOCK TABLE t1 WRITE;
|
LOCK TABLE t1 WRITE;
|
||||||
FLUSH TABLES WITH READ LOCK;
|
FLUSH TABLES WITH READ LOCK;
|
||||||
CREATE TABLE t2 (c1 int);
|
CREATE TABLE t2 (c1 int);
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
CREATE TABLE t1 (c1 int);
|
CREATE TABLE t1 (c1 int);
|
||||||
LOCK TABLE t1 WRITE;
|
LOCK TABLE t1 WRITE;
|
||||||
FLUSH TABLES WITH READ LOCK;
|
FLUSH TABLES WITH READ LOCK;
|
||||||
CREATE TABLE t2 AS SELECT * FROM t1;
|
CREATE TABLE t2 AS SELECT * FROM t1;
|
||||||
ERROR HY000: Table 't2' was not locked with LOCK TABLES
|
ERROR HY000: Table 't2' was not locked with LOCK TABLES
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
@ -83,7 +83,7 @@ UNLOCK TABLES;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE DATABASE mysqltest_1;
|
CREATE DATABASE mysqltest_1;
|
||||||
FLUSH TABLES WITH READ LOCK;
|
FLUSH TABLES WITH READ LOCK;
|
||||||
DROP DATABASE mysqltest_1;
|
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
|
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
@ -91,7 +91,7 @@ DROP DATABASE mysqltest_1;
|
|||||||
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
|
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
|
||||||
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
|
create table t1 (f1 int(12) unsigned not null auto_increment, primary key(f1)) engine=innodb;
|
||||||
lock tables t1 write;
|
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;
|
unlock tables;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -39,14 +39,14 @@ ERROR HY000: You can't use usual read lock with log tables. Try READ LOCAL inste
|
|||||||
lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL;
|
lock tables mysql.slow_log READ LOCAL, mysql.general_log READ LOCAL;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
lock tables mysql.general_log READ LOCAL;
|
lock tables mysql.general_log READ LOCAL;
|
||||||
flush logs;
|
flush logs;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
select "Mark that we woke up from flush logs in the test"
|
select "Mark that we woke up from flush logs in the test"
|
||||||
as "test passed";
|
as "test passed";
|
||||||
test passed
|
test passed
|
||||||
Mark that we woke up from flush logs in the test
|
Mark that we woke up from flush logs in the test
|
||||||
lock tables mysql.general_log READ LOCAL;
|
lock tables mysql.general_log READ LOCAL;
|
||||||
truncate mysql.general_log;
|
truncate mysql.general_log;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
select "Mark that we woke up from TRUNCATE in the test"
|
select "Mark that we woke up from TRUNCATE in the test"
|
||||||
as "test passed";
|
as "test passed";
|
||||||
|
@ -509,8 +509,8 @@ create table t2 (a int);
|
|||||||
insert into t2 values (10), (20), (30);
|
insert into t2 values (10), (20), (30);
|
||||||
create view v1 as select a as b, a/10 as a from t2;
|
create view v1 as select a as b, a/10 as a from t2;
|
||||||
lock table t1 write;
|
lock table t1 write;
|
||||||
alter table t1 add column c int default 100 after 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;
|
update t1, v1 set t1.b=t1.a+t1.b+v1.b where t1.a=v1.a;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a c b
|
a c b
|
||||||
|
@ -149,4 +149,17 @@ ERROR at line 1: USE must be followed by a database name
|
|||||||
\\
|
\\
|
||||||
';
|
';
|
||||||
';
|
';
|
||||||
|
create table t17583 (a int);
|
||||||
|
insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
select count(*) from t17583;
|
||||||
|
count(*)
|
||||||
|
1280
|
||||||
|
drop table t17583;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
@ -152,8 +152,38 @@ mysqltest: At line 1: Missing delimiter
|
|||||||
mysqltest: At line 1: End of line junk detected: "sleep 7
|
mysqltest: At line 1: End of line junk detected: "sleep 7
|
||||||
# Another comment
|
# 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: 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"
|
"MySQL"
|
||||||
MySQL: The world''s most popular open source database
|
MySQL: The world''s most popular open source database
|
||||||
@ -239,7 +269,7 @@ mysqltest: At line 1: Missing assignment operator in let
|
|||||||
1
|
1
|
||||||
# Execute: echo $success ;
|
# Execute: echo $success ;
|
||||||
1
|
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: 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/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
|
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
|
||||||
@ -332,16 +362,16 @@ Counter is greater than 0, (counter=10)
|
|||||||
Counter is not 0, (counter=0)
|
Counter is not 0, (counter=0)
|
||||||
1
|
1
|
||||||
Testing while with not
|
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 ')' in while
|
mysqltest: At line 1: missing ')' in while
|
||||||
mysqltest: At line 1: Missing '{' after while. Found "dec $i"
|
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 of block before beginning
|
||||||
mysqltest: At line 1: Stray 'end' command - 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 1: Missing '{' after while. Found "echo hej"
|
||||||
mysqltest: At line 3: Missing end of block
|
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: missing '(' in if
|
||||||
mysqltest: At line 1: Stray 'end' command - end of block before beginning
|
mysqltest: At line 1: Stray 'end' command - end of block before beginning
|
||||||
select "b" bs col1, "c" bs col2;
|
select "b" bs col1, "c" bs col2;
|
||||||
@ -371,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: Invalid integer argument "10!"
|
||||||
mysqltest: At line 1: End of line junk detected: "!"
|
mysqltest: At line 1: End of line junk detected: "!"
|
||||||
mysqltest: At line 1: Invalid integer argument "a"
|
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 required argument 'connection name' to command 'connect'
|
||||||
mysqltest: At line 1: Missing connection host
|
mysqltest: At line 1: Missing required argument 'connection name' to command 'connect'
|
||||||
mysqltest: At line 1: Missing connection user
|
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
|
||||||
mysqltest: At line 1: Missing connection user
|
mysqltest: At line 1: Missing required argument 'host' to command 'connect'
|
||||||
mysqltest: At line 1: Missing connection password
|
mysqltest: At line 1: query 'connect con2,localhost,root,,illegal_db' failed: 1049: Unknown database 'illegal_db'
|
||||||
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: Illegal argument for port: 'illegal_port'
|
mysqltest: At line 1: Illegal argument for port: 'illegal_port'
|
||||||
mysqltest: At line 1: Illegal option to connect: SMTP
|
mysqltest: At line 1: Illegal option to connect: SMTP
|
||||||
OK
|
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 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
|
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);
|
connect(localhost,root,,test,MASTER_PORT,MASTER_SOCKET);
|
||||||
@ -449,7 +477,6 @@ 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: 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
|
ERROR 42000: Query was empty
|
||||||
End of 5.0 tests
|
|
||||||
select "b" as col1, "c" as col2;
|
select "b" as col1, "c" as col2;
|
||||||
col1 col2
|
col1 col2
|
||||||
b c
|
b c
|
||||||
@ -477,4 +504,18 @@ a D
|
|||||||
1 1
|
1 1
|
||||||
1 4
|
1 4
|
||||||
drop table t1;
|
drop table t1;
|
||||||
End of 5.1 tests
|
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
|
||||||
|
@ -1090,41 +1090,15 @@ drop table t1;
|
|||||||
create table t1 (a int) engine myisam
|
create table t1 (a int) engine myisam
|
||||||
partition by range (a)
|
partition by range (a)
|
||||||
subpartition by hash (a)
|
subpartition by hash (a)
|
||||||
(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx'
|
(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
|
||||||
(SUBPARTITION subpart00, SUBPARTITION subpart01));
|
(SUBPARTITION subpart00, SUBPARTITION subpart01));
|
||||||
hello/master-data/test/t1.frm
|
Checking if file exists before alter
|
||||||
hello/master-data/test/t1.par
|
|
||||||
hello/master-data/test/t1#P#p0#SP#subpart00.MYD
|
|
||||||
hello/master-data/test/t1#P#p0#SP#subpart00.MYI
|
|
||||||
hello/master-data/test/t1#P#p0#SP#subpart01.MYD
|
|
||||||
hello/master-data/test/t1#P#p0#SP#subpart01.MYI
|
|
||||||
hello/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
|
|
||||||
hello/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
|
|
||||||
hello/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
|
|
||||||
hello/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
|
|
||||||
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
||||||
(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx'
|
(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
|
||||||
(SUBPARTITION subpart10, SUBPARTITION subpart11),
|
(SUBPARTITION subpart10, SUBPARTITION subpart11),
|
||||||
partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'hello/master-data/tmpdata' INDEX DIRECTORY = 'hello/master-data/tmpinx'
|
partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx'
|
||||||
(SUBPARTITION subpart20, SUBPARTITION subpart21));
|
(SUBPARTITION subpart20, SUBPARTITION subpart21));
|
||||||
hello/master-data/test/t1.frm
|
Checking if file exists after alter
|
||||||
hello/master-data/test/t1.par
|
|
||||||
hello/master-data/test/t1#P#p1#SP#subpart10.MYD
|
|
||||||
hello/master-data/test/t1#P#p1#SP#subpart10.MYI
|
|
||||||
hello/master-data/test/t1#P#p1#SP#subpart11.MYD
|
|
||||||
hello/master-data/test/t1#P#p1#SP#subpart11.MYI
|
|
||||||
hello/master-data/test/t1#P#p2#SP#subpart20.MYD
|
|
||||||
hello/master-data/test/t1#P#p2#SP#subpart20.MYI
|
|
||||||
hello/master-data/test/t1#P#p2#SP#subpart21.MYD
|
|
||||||
hello/master-data/test/t1#P#p2#SP#subpart21.MYI
|
|
||||||
hello/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
|
|
||||||
hello/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
|
|
||||||
hello/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
|
|
||||||
hello/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
|
|
||||||
hello/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
|
|
||||||
hello/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
|
|
||||||
hello/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
|
|
||||||
hello/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 (a bigint unsigned not null, primary key(a))
|
create table t1 (a bigint unsigned not null, primary key(a))
|
||||||
engine = myisam
|
engine = myisam
|
||||||
|
@ -499,54 +499,6 @@ create temporary table if not exists t1 (a1 int);
|
|||||||
execute stmt;
|
execute stmt;
|
||||||
drop temporary table t1;
|
drop temporary table t1;
|
||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
CREATE TABLE t1(
|
|
||||||
ID int(10) unsigned NOT NULL auto_increment,
|
|
||||||
Member_ID varchar(15) NOT NULL default '',
|
|
||||||
Action varchar(12) NOT NULL,
|
|
||||||
Action_Date datetime NOT NULL,
|
|
||||||
Track varchar(15) default NULL,
|
|
||||||
User varchar(12) default NULL,
|
|
||||||
Date_Updated timestamp NOT NULL default CURRENT_TIMESTAMP on update
|
|
||||||
CURRENT_TIMESTAMP,
|
|
||||||
PRIMARY KEY (ID),
|
|
||||||
KEY Action (Action),
|
|
||||||
KEY Action_Date (Action_Date)
|
|
||||||
);
|
|
||||||
INSERT INTO t1(Member_ID, Action, Action_Date, Track) VALUES
|
|
||||||
('111111', 'Disenrolled', '2006-03-01', 'CAD' ),
|
|
||||||
('111111', 'Enrolled', '2006-03-01', 'CAD' ),
|
|
||||||
('111111', 'Disenrolled', '2006-07-03', 'CAD' ),
|
|
||||||
('222222', 'Enrolled', '2006-03-07', 'CAD' ),
|
|
||||||
('222222', 'Enrolled', '2006-03-07', 'CHF' ),
|
|
||||||
('222222', 'Disenrolled', '2006-08-02', 'CHF' ),
|
|
||||||
('333333', 'Enrolled', '2006-03-01', 'CAD' ),
|
|
||||||
('333333', 'Disenrolled', '2006-03-01', 'CAD' ),
|
|
||||||
('444444', 'Enrolled', '2006-03-01', 'CAD' ),
|
|
||||||
('555555', 'Disenrolled', '2006-03-01', 'CAD' ),
|
|
||||||
('555555', 'Enrolled', '2006-07-21', 'CAD' ),
|
|
||||||
('555555', 'Disenrolled', '2006-03-01', 'CHF' ),
|
|
||||||
('666666', 'Enrolled', '2006-02-09', 'CAD' ),
|
|
||||||
('666666', 'Enrolled', '2006-05-12', 'CHF' ),
|
|
||||||
('666666', 'Disenrolled', '2006-06-01', 'CAD' );
|
|
||||||
PREPARE STMT FROM
|
|
||||||
"SELECT GROUP_CONCAT(Track SEPARATOR ', ') FROM t1
|
|
||||||
WHERE Member_ID=? AND Action='Enrolled' AND
|
|
||||||
(Track,Action_Date) IN (SELECT Track, MAX(Action_Date) FROM t1
|
|
||||||
WHERE Member_ID=?
|
|
||||||
GROUP BY Track
|
|
||||||
HAVING Track>='CAD' AND
|
|
||||||
MAX(Action_Date)>'2006-03-01')";
|
|
||||||
SET @id='111111';
|
|
||||||
EXECUTE STMT USING @id,@id;
|
|
||||||
GROUP_CONCAT(Track SEPARATOR ', ')
|
|
||||||
NULL
|
|
||||||
SET @id='222222';
|
|
||||||
EXECUTE STMT USING @id,@id;
|
|
||||||
GROUP_CONCAT(Track SEPARATOR ', ')
|
|
||||||
CAD
|
|
||||||
DEALLOCATE PREPARE STMT;
|
|
||||||
DROP TABLE t1;
|
|
||||||
End of 4.1 tests
|
|
||||||
create table t1 (a varchar(20));
|
create table t1 (a varchar(20));
|
||||||
insert into t1 values ('foo');
|
insert into t1 values ('foo');
|
||||||
prepare stmt FROM 'SELECT char_length (a) FROM t1';
|
prepare stmt FROM 'SELECT char_length (a) FROM t1';
|
||||||
@ -564,77 +516,6 @@ SELECT FOUND_ROWS();
|
|||||||
FOUND_ROWS()
|
FOUND_ROWS()
|
||||||
2
|
2
|
||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
create table t1 (a char(3) not null, b char(3) not null,
|
|
||||||
c char(3) not null, primary key (a, b, c));
|
|
||||||
create table t2 like t1;
|
|
||||||
prepare stmt from
|
|
||||||
"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
|
|
||||||
where t1.a=1";
|
|
||||||
execute stmt;
|
|
||||||
a
|
|
||||||
execute stmt;
|
|
||||||
a
|
|
||||||
execute stmt;
|
|
||||||
a
|
|
||||||
prepare stmt from
|
|
||||||
"select t1.a, t1.b, t1.c, t2.a, t2.b, t2.c from
|
|
||||||
(t1 left outer join t2 on t2.a=? and t1.b=t2.b)
|
|
||||||
left outer join t2 t3 on t3.a=? where t1.a=?";
|
|
||||||
set @a:=1, @b:=1, @c:=1;
|
|
||||||
execute stmt using @a, @b, @c;
|
|
||||||
a b c a b c
|
|
||||||
execute stmt using @a, @b, @c;
|
|
||||||
a b c a b c
|
|
||||||
execute stmt using @a, @b, @c;
|
|
||||||
a b c a b c
|
|
||||||
deallocate prepare stmt;
|
|
||||||
drop table t1,t2;
|
|
||||||
SET @aux= "SELECT COUNT(*)
|
|
||||||
FROM INFORMATION_SCHEMA.COLUMNS A,
|
|
||||||
INFORMATION_SCHEMA.COLUMNS B
|
|
||||||
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
|
|
||||||
AND A.TABLE_NAME = B.TABLE_NAME
|
|
||||||
AND A.COLUMN_NAME = B.COLUMN_NAME AND
|
|
||||||
A.TABLE_NAME = 'user'";
|
|
||||||
prepare my_stmt from @aux;
|
|
||||||
execute my_stmt;
|
|
||||||
COUNT(*)
|
|
||||||
39
|
|
||||||
execute my_stmt;
|
|
||||||
COUNT(*)
|
|
||||||
39
|
|
||||||
execute my_stmt;
|
|
||||||
COUNT(*)
|
|
||||||
39
|
|
||||||
deallocate prepare my_stmt;
|
|
||||||
drop procedure if exists p1|
|
|
||||||
drop table if exists t1|
|
|
||||||
create table t1 (id int)|
|
|
||||||
insert into t1 values(1)|
|
|
||||||
create procedure p1(a int, b int)
|
|
||||||
begin
|
|
||||||
declare c int;
|
|
||||||
select max(id)+1 into c from t1;
|
|
||||||
insert into t1 select a+b;
|
|
||||||
insert into t1 select a-b;
|
|
||||||
insert into t1 select a-c;
|
|
||||||
end|
|
|
||||||
set @a= 3, @b= 4|
|
|
||||||
prepare stmt from "call p1(?, ?)"|
|
|
||||||
execute stmt using @a, @b|
|
|
||||||
execute stmt using @a, @b|
|
|
||||||
select * from t1|
|
|
||||||
id
|
|
||||||
1
|
|
||||||
7
|
|
||||||
-1
|
|
||||||
1
|
|
||||||
7
|
|
||||||
-1
|
|
||||||
-5
|
|
||||||
deallocate prepare stmt|
|
|
||||||
drop procedure p1|
|
|
||||||
drop table t1|
|
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1051 Unknown table 't1'
|
Note 1051 Unknown table 't1'
|
||||||
@ -698,47 +579,6 @@ id
|
|||||||
3
|
3
|
||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
create table t1 (a int);
|
|
||||||
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
|
||||||
prepare stmt from "select * from t1 limit ?, ?";
|
|
||||||
set @offset=0, @limit=1;
|
|
||||||
execute stmt using @offset, @limit;
|
|
||||||
a
|
|
||||||
1
|
|
||||||
select * from t1 limit 0, 1;
|
|
||||||
a
|
|
||||||
1
|
|
||||||
set @offset=3, @limit=2;
|
|
||||||
execute stmt using @offset, @limit;
|
|
||||||
a
|
|
||||||
4
|
|
||||||
5
|
|
||||||
select * from t1 limit 3, 2;
|
|
||||||
a
|
|
||||||
4
|
|
||||||
5
|
|
||||||
prepare stmt from "select * from t1 limit ?";
|
|
||||||
execute stmt using @limit;
|
|
||||||
a
|
|
||||||
1
|
|
||||||
2
|
|
||||||
prepare stmt from "select * from t1 where a in (select a from t1 limit ?)";
|
|
||||||
ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
|
|
||||||
prepare stmt from "select * from t1 union all select * from t1 limit ?, ?";
|
|
||||||
set @offset=9;
|
|
||||||
set @limit=2;
|
|
||||||
execute stmt using @offset, @limit;
|
|
||||||
a
|
|
||||||
10
|
|
||||||
1
|
|
||||||
prepare stmt from "(select * from t1 limit ?, ?) union all
|
|
||||||
(select * from t1 limit ?, ?) order by a limit ?";
|
|
||||||
execute stmt using @offset, @limit, @offset, @limit, @limit;
|
|
||||||
a
|
|
||||||
10
|
|
||||||
10
|
|
||||||
drop table t1;
|
|
||||||
deallocate prepare stmt;
|
|
||||||
create table t1 (id int);
|
create table t1 (id int);
|
||||||
prepare stmt from "insert into t1 (id) select id from t1 union select id from t1";
|
prepare stmt from "insert into t1 (id) select id from t1 union select id from t1";
|
||||||
execute stmt;
|
execute stmt;
|
||||||
@ -839,15 +679,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
|
|||||||
select ? from t1;
|
select ? from t1;
|
||||||
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 '? from t1' at line 1
|
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 '? from t1' at line 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE b12651_T1(a int) ENGINE=MYISAM;
|
|
||||||
CREATE TABLE b12651_T2(b int) ENGINE=MYISAM;
|
|
||||||
CREATE VIEW b12651_V1 as SELECT b FROM b12651_T2;
|
|
||||||
PREPARE b12651 FROM 'SELECT 1 FROM b12651_T1 WHERE a IN (SELECT b FROM b12651_V1)';
|
|
||||||
EXECUTE b12651;
|
|
||||||
1
|
|
||||||
DROP VIEW b12651_V1;
|
|
||||||
DROP TABLE b12651_T1, b12651_T2;
|
|
||||||
DEALLOCATE PREPARE b12651;
|
|
||||||
prepare stmt from "select @@time_zone";
|
prepare stmt from "select @@time_zone";
|
||||||
execute stmt;
|
execute stmt;
|
||||||
@@time_zone
|
@@time_zone
|
||||||
@ -1064,6 +895,194 @@ select @@max_prepared_stmt_count, @@prepared_stmt_count;
|
|||||||
@@max_prepared_stmt_count @@prepared_stmt_count
|
@@max_prepared_stmt_count @@prepared_stmt_count
|
||||||
3 0
|
3 0
|
||||||
set global max_prepared_stmt_count= @old_max_prepared_stmt_count;
|
set global max_prepared_stmt_count= @old_max_prepared_stmt_count;
|
||||||
|
drop table if exists t1;
|
||||||
|
create temporary table if not exists t1 (a1 int);
|
||||||
|
prepare stmt from "delete t1 from t1 where (cast(a1/3 as unsigned) * 3) = a1";
|
||||||
|
drop temporary table t1;
|
||||||
|
create temporary table if not exists t1 (a1 int);
|
||||||
|
execute stmt;
|
||||||
|
drop temporary table t1;
|
||||||
|
create temporary table if not exists t1 (a1 int);
|
||||||
|
execute stmt;
|
||||||
|
drop temporary table t1;
|
||||||
|
create temporary table if not exists t1 (a1 int);
|
||||||
|
execute stmt;
|
||||||
|
drop temporary table t1;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
CREATE TABLE t1(
|
||||||
|
ID int(10) unsigned NOT NULL auto_increment,
|
||||||
|
Member_ID varchar(15) NOT NULL default '',
|
||||||
|
Action varchar(12) NOT NULL,
|
||||||
|
Action_Date datetime NOT NULL,
|
||||||
|
Track varchar(15) default NULL,
|
||||||
|
User varchar(12) default NULL,
|
||||||
|
Date_Updated timestamp NOT NULL default CURRENT_TIMESTAMP on update
|
||||||
|
CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (ID),
|
||||||
|
KEY Action (Action),
|
||||||
|
KEY Action_Date (Action_Date)
|
||||||
|
);
|
||||||
|
INSERT INTO t1(Member_ID, Action, Action_Date, Track) VALUES
|
||||||
|
('111111', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||||
|
('111111', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||||
|
('111111', 'Disenrolled', '2006-07-03', 'CAD' ),
|
||||||
|
('222222', 'Enrolled', '2006-03-07', 'CAD' ),
|
||||||
|
('222222', 'Enrolled', '2006-03-07', 'CHF' ),
|
||||||
|
('222222', 'Disenrolled', '2006-08-02', 'CHF' ),
|
||||||
|
('333333', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||||
|
('333333', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||||
|
('444444', 'Enrolled', '2006-03-01', 'CAD' ),
|
||||||
|
('555555', 'Disenrolled', '2006-03-01', 'CAD' ),
|
||||||
|
('555555', 'Enrolled', '2006-07-21', 'CAD' ),
|
||||||
|
('555555', 'Disenrolled', '2006-03-01', 'CHF' ),
|
||||||
|
('666666', 'Enrolled', '2006-02-09', 'CAD' ),
|
||||||
|
('666666', 'Enrolled', '2006-05-12', 'CHF' ),
|
||||||
|
('666666', 'Disenrolled', '2006-06-01', 'CAD' );
|
||||||
|
PREPARE STMT FROM
|
||||||
|
"SELECT GROUP_CONCAT(Track SEPARATOR ', ') FROM t1
|
||||||
|
WHERE Member_ID=? AND Action='Enrolled' AND
|
||||||
|
(Track,Action_Date) IN (SELECT Track, MAX(Action_Date) FROM t1
|
||||||
|
WHERE Member_ID=?
|
||||||
|
GROUP BY Track
|
||||||
|
HAVING Track>='CAD' AND
|
||||||
|
MAX(Action_Date)>'2006-03-01')";
|
||||||
|
SET @id='111111';
|
||||||
|
EXECUTE STMT USING @id,@id;
|
||||||
|
GROUP_CONCAT(Track SEPARATOR ', ')
|
||||||
|
NULL
|
||||||
|
SET @id='222222';
|
||||||
|
EXECUTE STMT USING @id,@id;
|
||||||
|
GROUP_CONCAT(Track SEPARATOR ', ')
|
||||||
|
CAD
|
||||||
|
DEALLOCATE PREPARE STMT;
|
||||||
|
DROP TABLE t1;
|
||||||
|
End of 4.1 tests
|
||||||
|
create table t1 (a varchar(20));
|
||||||
|
insert into t1 values ('foo');
|
||||||
|
prepare stmt FROM 'SELECT char_length (a) FROM t1';
|
||||||
|
ERROR 42000: FUNCTION test.char_length does not exist
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a char(3) not null, b char(3) not null,
|
||||||
|
c char(3) not null, primary key (a, b, c));
|
||||||
|
create table t2 like t1;
|
||||||
|
prepare stmt from
|
||||||
|
"select t1.a from (t1 left outer join t2 on t2.a=1 and t1.b=t2.b)
|
||||||
|
where t1.a=1";
|
||||||
|
execute stmt;
|
||||||
|
a
|
||||||
|
execute stmt;
|
||||||
|
a
|
||||||
|
execute stmt;
|
||||||
|
a
|
||||||
|
prepare stmt from
|
||||||
|
"select t1.a, t1.b, t1.c, t2.a, t2.b, t2.c from
|
||||||
|
(t1 left outer join t2 on t2.a=? and t1.b=t2.b)
|
||||||
|
left outer join t2 t3 on t3.a=? where t1.a=?";
|
||||||
|
set @a:=1, @b:=1, @c:=1;
|
||||||
|
execute stmt using @a, @b, @c;
|
||||||
|
a b c a b c
|
||||||
|
execute stmt using @a, @b, @c;
|
||||||
|
a b c a b c
|
||||||
|
execute stmt using @a, @b, @c;
|
||||||
|
a b c a b c
|
||||||
|
deallocate prepare stmt;
|
||||||
|
drop table t1,t2;
|
||||||
|
SET @aux= "SELECT COUNT(*)
|
||||||
|
FROM INFORMATION_SCHEMA.COLUMNS A,
|
||||||
|
INFORMATION_SCHEMA.COLUMNS B
|
||||||
|
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
|
||||||
|
AND A.TABLE_NAME = B.TABLE_NAME
|
||||||
|
AND A.COLUMN_NAME = B.COLUMN_NAME AND
|
||||||
|
A.TABLE_NAME = 'user'";
|
||||||
|
prepare my_stmt from @aux;
|
||||||
|
execute my_stmt;
|
||||||
|
COUNT(*)
|
||||||
|
39
|
||||||
|
execute my_stmt;
|
||||||
|
COUNT(*)
|
||||||
|
39
|
||||||
|
execute my_stmt;
|
||||||
|
COUNT(*)
|
||||||
|
39
|
||||||
|
deallocate prepare my_stmt;
|
||||||
|
drop procedure if exists p1|
|
||||||
|
drop table if exists t1|
|
||||||
|
create table t1 (id int)|
|
||||||
|
insert into t1 values(1)|
|
||||||
|
create procedure p1(a int, b int)
|
||||||
|
begin
|
||||||
|
declare c int;
|
||||||
|
select max(id)+1 into c from t1;
|
||||||
|
insert into t1 select a+b;
|
||||||
|
insert into t1 select a-b;
|
||||||
|
insert into t1 select a-c;
|
||||||
|
end|
|
||||||
|
set @a= 3, @b= 4|
|
||||||
|
prepare stmt from "call p1(?, ?)"|
|
||||||
|
execute stmt using @a, @b|
|
||||||
|
execute stmt using @a, @b|
|
||||||
|
select * from t1|
|
||||||
|
id
|
||||||
|
1
|
||||||
|
7
|
||||||
|
-1
|
||||||
|
1
|
||||||
|
7
|
||||||
|
-1
|
||||||
|
-5
|
||||||
|
deallocate prepare stmt|
|
||||||
|
drop procedure p1|
|
||||||
|
drop table t1|
|
||||||
|
create table t1 (a int);
|
||||||
|
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
prepare stmt from "select * from t1 limit ?, ?";
|
||||||
|
set @offset=0, @limit=1;
|
||||||
|
execute stmt using @offset, @limit;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
select * from t1 limit 0, 1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
set @offset=3, @limit=2;
|
||||||
|
execute stmt using @offset, @limit;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
select * from t1 limit 3, 2;
|
||||||
|
a
|
||||||
|
4
|
||||||
|
5
|
||||||
|
prepare stmt from "select * from t1 limit ?";
|
||||||
|
execute stmt using @limit;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
prepare stmt from "select * from t1 where a in (select a from t1 limit ?)";
|
||||||
|
ERROR 42000: This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
|
||||||
|
prepare stmt from "select * from t1 union all select * from t1 limit ?, ?";
|
||||||
|
set @offset=9;
|
||||||
|
set @limit=2;
|
||||||
|
execute stmt using @offset, @limit;
|
||||||
|
a
|
||||||
|
10
|
||||||
|
1
|
||||||
|
prepare stmt from "(select * from t1 limit ?, ?) union all
|
||||||
|
(select * from t1 limit ?, ?) order by a limit ?";
|
||||||
|
execute stmt using @offset, @limit, @offset, @limit, @limit;
|
||||||
|
a
|
||||||
|
10
|
||||||
|
10
|
||||||
|
drop table t1;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
CREATE TABLE b12651_T1(a int) ENGINE=MYISAM;
|
||||||
|
CREATE TABLE b12651_T2(b int) ENGINE=MYISAM;
|
||||||
|
CREATE VIEW b12651_V1 as SELECT b FROM b12651_T2;
|
||||||
|
PREPARE b12651 FROM 'SELECT 1 FROM b12651_T1 WHERE a IN (SELECT b FROM b12651_V1)';
|
||||||
|
EXECUTE b12651;
|
||||||
|
1
|
||||||
|
DROP VIEW b12651_V1;
|
||||||
|
DROP TABLE b12651_T1, b12651_T2;
|
||||||
|
DEALLOCATE PREPARE b12651;
|
||||||
create table t1 (id int);
|
create table t1 (id int);
|
||||||
prepare ins_call from "insert into t1 (id) values (1)";
|
prepare ins_call from "insert into t1 (id) values (1)";
|
||||||
execute ins_call;
|
execute ins_call;
|
||||||
@ -1360,27 +1379,48 @@ i
|
|||||||
1
|
1
|
||||||
DEALLOCATE PREPARE stmt;
|
DEALLOCATE PREPARE stmt;
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
flush status;
|
||||||
|
prepare sq from 'show status like "slow_queries"';
|
||||||
|
execute sq;
|
||||||
|
Variable_name Value
|
||||||
|
Slow_queries 0
|
||||||
|
prepare no_index from 'select 1 from information_schema.tables limit 1';
|
||||||
|
execute sq;
|
||||||
|
Variable_name Value
|
||||||
|
Slow_queries 0
|
||||||
|
execute no_index;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
execute sq;
|
||||||
|
Variable_name Value
|
||||||
|
Slow_queries 1
|
||||||
|
deallocate prepare no_index;
|
||||||
|
deallocate prepare sq;
|
||||||
End of 5.0 tests.
|
End of 5.0 tests.
|
||||||
create procedure proc_1() reset query cache;
|
create procedure proc_1() reset query cache;
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin reset query cache; return 1; end|
|
create function func_1() returns int begin reset query cache; return 1; end|
|
||||||
|
ERROR 0A000: RESET is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: RESET is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "reset query cache";
|
prepare abc from "reset query cache";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
create procedure proc_1() reset master;
|
create procedure proc_1() reset master;
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin reset master; return 1; end|
|
create function func_1() returns int begin reset master; return 1; end|
|
||||||
|
ERROR 0A000: RESET is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: RESET is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "reset master";
|
prepare abc from "reset master";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1390,11 +1430,13 @@ create procedure proc_1() reset slave;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin reset slave; return 1; end|
|
create function func_1() returns int begin reset slave; return 1; end|
|
||||||
|
ERROR 0A000: RESET is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: RESET is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "reset slave";
|
prepare abc from "reset slave";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1429,13 +1471,13 @@ call proc_1();
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush hosts; return 1; end|
|
create function func_1() returns int begin flush hosts; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush hosts";
|
prepare abc from "flush hosts";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1445,13 +1487,13 @@ create procedure proc_1() flush privileges;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush privileges; return 1; end|
|
create function func_1() returns int begin flush privileges; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush privileges";
|
prepare abc from "flush privileges";
|
||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
create procedure proc_1() flush tables with read lock;
|
create procedure proc_1() flush tables with read lock;
|
||||||
@ -1461,9 +1503,13 @@ call proc_1();
|
|||||||
unlock tables;
|
unlock tables;
|
||||||
call proc_1();
|
call proc_1();
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush tables with read lock; return 1; end|
|
create function func_1() returns int begin flush tables with read lock; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
|
select func_1(), func_1(), func_1() from dual;
|
||||||
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush tables with read lock";
|
prepare abc from "flush tables with read lock";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1474,13 +1520,13 @@ create procedure proc_1() flush tables;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush tables; return 1; end|
|
create function func_1() returns int begin flush tables; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush tables";
|
prepare abc from "flush tables";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1540,13 +1586,13 @@ mysql user 0 0
|
|||||||
mysql general_log 1 0
|
mysql general_log 1 0
|
||||||
mysql host 0 0
|
mysql host 0 0
|
||||||
flush tables;
|
flush tables;
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush tables; return 1; end|
|
create function func_1() returns int begin flush tables; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
flush tables;
|
flush tables;
|
||||||
select Host, User from mysql.user limit 0;
|
select Host, User from mysql.user limit 0;
|
||||||
Host User
|
Host User
|
||||||
@ -1603,13 +1649,13 @@ create procedure proc_1() flush logs;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush logs; return 1; end|
|
create function func_1() returns int begin flush logs; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush logs";
|
prepare abc from "flush logs";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1619,13 +1665,13 @@ create procedure proc_1() flush status;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush status; return 1; end|
|
create function func_1() returns int begin flush status; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush status";
|
prepare abc from "flush status";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1635,39 +1681,39 @@ create procedure proc_1() flush slave;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush slave; return 1; end|
|
create function func_1() returns int begin flush slave; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush slave";
|
prepare abc from "flush slave";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
create procedure proc_1() flush master;
|
create procedure proc_1() flush master;
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush master; return 1; end|
|
create function func_1() returns int begin flush master; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush master";
|
prepare abc from "flush master";
|
||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
create procedure proc_1() flush des_key_file;
|
create procedure proc_1() flush des_key_file;
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush des_key_file; return 1; end|
|
create function func_1() returns int begin flush des_key_file; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush des_key_file";
|
prepare abc from "flush des_key_file";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1677,13 +1723,13 @@ create procedure proc_1() flush user_resources;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin flush user_resources; return 1; end|
|
create function func_1() returns int begin flush user_resources; return 1; end|
|
||||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
drop procedure proc_1;
|
||||||
prepare abc from "flush user_resources";
|
prepare abc from "flush user_resources";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1763,18 +1809,6 @@ Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
|||||||
execute abc;
|
execute abc;
|
||||||
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
Db Name Definer Type Execute at Interval value Interval field Starts Ends Status
|
||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
create procedure proc_1() show scheduler status;
|
|
||||||
drop procedure proc_1;
|
|
||||||
create function func_1() returns int begin show scheduler status; return 1; end|
|
|
||||||
ERROR 0A000: Not allowed to return a result set from a function
|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
|
||||||
drop function func_1;
|
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
|
||||||
prepare abc from "show scheduler status";
|
|
||||||
ERROR HY000: This command is not supported in the prepared statement protocol yet
|
|
||||||
deallocate prepare abc;
|
|
||||||
ERROR HY000: Unknown prepared statement handler (abc) given to DEALLOCATE PREPARE
|
|
||||||
drop procedure if exists a;
|
drop procedure if exists a;
|
||||||
create procedure a() select 42;
|
create procedure a() select 42;
|
||||||
create procedure proc_1(a char(2)) show create procedure a;
|
create procedure proc_1(a char(2)) show create procedure a;
|
||||||
@ -1952,11 +1986,11 @@ ERROR HY000: No paths allowed for shared library
|
|||||||
drop procedure proc_1;
|
drop procedure proc_1;
|
||||||
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
|
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
|
||||||
call proc_1();
|
call proc_1();
|
||||||
ERROR HY000: Can't open shared library '/work/mysql-5.1-runtime/mysql-test/lib/mysql/some_plugin.so' (errno: 0 cannot open shared object file: No such file or directory)
|
ERROR HY000: Can't open shared library
|
||||||
call proc_1();
|
call proc_1();
|
||||||
ERROR HY000: Can't open shared library '/work/mysql-5.1-runtime/mysql-test/lib/mysql/some_plugin.so' (errno: 22 cannot open shared object file: No such file or directory)
|
ERROR HY000: Can't open shared library
|
||||||
call proc_1();
|
call proc_1();
|
||||||
ERROR HY000: Can't open shared library '/work/mysql-5.1-runtime/mysql-test/lib/mysql/some_plugin.so' (errno: 22 cannot open shared object file: No such file or directory)
|
ERROR HY000: Can't open shared library
|
||||||
drop procedure proc_1;
|
drop procedure proc_1;
|
||||||
create function func_1() returns int begin install plugin my_plug soname '/tmp/plugin'; return 1; end|
|
create function func_1() returns int begin install plugin my_plug soname '/tmp/plugin'; return 1; end|
|
||||||
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
|
||||||
@ -2086,7 +2120,7 @@ drop user pstest_xyz@localhost;
|
|||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
drop event if exists xyz;
|
drop event if exists xyz;
|
||||||
create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end|
|
create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end|
|
||||||
ERROR 0A000: Not allowed to return a result set from a function
|
ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
ERROR 42000: FUNCTION test.func_1 does not exist
|
ERROR 42000: FUNCTION test.func_1 does not exist
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
@ -130,3 +130,36 @@ prepare st_18492 from 'select * from t1 where 3 in (select (1+1) union select 1)
|
|||||||
execute st_18492;
|
execute st_18492;
|
||||||
a
|
a
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1 (a int, b varchar(4));
|
||||||
|
create table t2 (a int, b varchar(4), primary key(a));
|
||||||
|
prepare stmt1 from 'insert into t1 (a, b) values (?, ?)';
|
||||||
|
prepare stmt2 from 'insert into t2 (a, b) values (?, ?)';
|
||||||
|
set @intarg= 11;
|
||||||
|
set @varchararg= '2222';
|
||||||
|
execute stmt1 using @intarg, @varchararg;
|
||||||
|
execute stmt2 using @intarg, @varchararg;
|
||||||
|
set @intarg= 12;
|
||||||
|
execute stmt1 using @intarg, @UNDEFINED;
|
||||||
|
execute stmt2 using @intarg, @UNDEFINED;
|
||||||
|
set @intarg= 13;
|
||||||
|
execute stmt1 using @UNDEFINED, @varchararg;
|
||||||
|
execute stmt2 using @UNDEFINED, @varchararg;
|
||||||
|
ERROR 23000: Column 'a' cannot be null
|
||||||
|
set @intarg= 14;
|
||||||
|
set @nullarg= Null;
|
||||||
|
execute stmt1 using @UNDEFINED, @nullarg;
|
||||||
|
execute stmt2 using @nullarg, @varchararg;
|
||||||
|
ERROR 23000: Column 'a' cannot be null
|
||||||
|
select * from t1;
|
||||||
|
a b
|
||||||
|
11 2222
|
||||||
|
12 NULL
|
||||||
|
NULL 2222
|
||||||
|
NULL NULL
|
||||||
|
select * from t2;
|
||||||
|
a b
|
||||||
|
11 2222
|
||||||
|
12 NULL
|
||||||
|
drop table t1;
|
||||||
|
drop table t2;
|
||||||
|
End of 5.0 tests.
|
||||||
|
File diff suppressed because one or more lines are too long
@ -326,7 +326,7 @@ insert into t1 values(3);
|
|||||||
set i_var = sleep(3);
|
set i_var = sleep(3);
|
||||||
return 0;
|
return 0;
|
||||||
end;|
|
end;|
|
||||||
select f1();
|
select f1();
|
||||||
select sleep(4);
|
select sleep(4);
|
||||||
sleep(4)
|
sleep(4)
|
||||||
0
|
0
|
||||||
|
@ -43,7 +43,7 @@ Note 1051 Unknown table 't4'
|
|||||||
CREATE TABLE t1 (a int);
|
CREATE TABLE t1 (a int);
|
||||||
CREATE TABLE t3 (a int);
|
CREATE TABLE t3 (a int);
|
||||||
FLUSH TABLES WITH READ LOCK;
|
FLUSH TABLES WITH READ LOCK;
|
||||||
RENAME TABLE t1 TO t2, t3 to t4;
|
RENAME TABLE t1 TO t2, t3 to t4;
|
||||||
show tables;
|
show tables;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
t1
|
t1
|
||||||
|
@ -26,7 +26,7 @@ create table t2 (a int primary key);
|
|||||||
insert into t2 values(1);
|
insert into t2 values(1);
|
||||||
create table t3 (id int);
|
create table t3 (id int);
|
||||||
insert into t3 values(connection_id());
|
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;
|
select (@id := id) - id from t3;
|
||||||
(@id := id) - id
|
(@id := id) - id
|
||||||
0
|
0
|
||||||
|
@ -12,7 +12,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select master_pos_wait(_latin1'master-bin.999999',0,2) AS `master_pos_wait('master-bin.999999',0,2)`
|
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;
|
stop slave sql_thread;
|
||||||
master_pos_wait('master-bin.999999',0)
|
master_pos_wait('master-bin.999999',0)
|
||||||
NULL
|
NULL
|
||||||
|
@ -21,7 +21,7 @@ END|
|
|||||||
SELECT get_lock("test", 200);
|
SELECT get_lock("test", 200);
|
||||||
get_lock("test", 200)
|
get_lock("test", 200)
|
||||||
1
|
1
|
||||||
CALL test.p1();
|
CALL test.p1();
|
||||||
CALL test.p2();
|
CALL test.p2();
|
||||||
SELECT release_lock("test");
|
SELECT release_lock("test");
|
||||||
release_lock("test")
|
release_lock("test")
|
||||||
|
@ -21,7 +21,7 @@ END|
|
|||||||
SELECT get_lock("test", 200);
|
SELECT get_lock("test", 200);
|
||||||
get_lock("test", 200)
|
get_lock("test", 200)
|
||||||
1
|
1
|
||||||
CALL test.p1();
|
CALL test.p1();
|
||||||
CALL test.p2();
|
CALL test.p2();
|
||||||
SELECT release_lock("test");
|
SELECT release_lock("test");
|
||||||
release_lock("test")
|
release_lock("test")
|
||||||
|
@ -44,7 +44,7 @@ create table t2(id int);
|
|||||||
insert into t2 values(connection_id());
|
insert into t2 values(connection_id());
|
||||||
create temporary table t3(n int);
|
create temporary table t3(n int);
|
||||||
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
|
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;
|
select (@id := id) - id from t2;
|
||||||
(@id := id) - id
|
(@id := id) - id
|
||||||
0
|
0
|
||||||
|
@ -672,7 +672,22 @@ SHOW TABLES FROM no_such_database;
|
|||||||
ERROR 42000: Unknown database 'no_such_database'
|
ERROR 42000: Unknown database 'no_such_database'
|
||||||
SHOW COLUMNS FROM no_such_table;
|
SHOW COLUMNS FROM no_such_table;
|
||||||
ERROR 42S02: Table 'test.no_such_table' doesn't exist
|
ERROR 42S02: Table 'test.no_such_table' doesn't exist
|
||||||
End of 5.0 tests.
|
flush status;
|
||||||
|
show status like 'slow_queries';
|
||||||
|
Variable_name Value
|
||||||
|
Slow_queries 0
|
||||||
|
show tables;
|
||||||
|
Tables_in_test
|
||||||
|
show status like 'slow_queries';
|
||||||
|
Variable_name Value
|
||||||
|
Slow_queries 0
|
||||||
|
select 1 from information_schema.tables limit 1;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
show status like 'slow_queries';
|
||||||
|
Variable_name Value
|
||||||
|
Slow_queries 1
|
||||||
|
End of 5.0 tests
|
||||||
SHOW AUTHORS;
|
SHOW AUTHORS;
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
show create database mysqltest;
|
show create database mysqltest;
|
||||||
|
@ -31,7 +31,7 @@ create procedure bug9486()
|
|||||||
update t1, t2 set val= 1 where id1=id2;
|
update t1, t2 set val= 1 where id1=id2;
|
||||||
call bug9486();
|
call bug9486();
|
||||||
lock tables t2 write;
|
lock tables t2 write;
|
||||||
call bug9486();
|
call bug9486();
|
||||||
show processlist;
|
show processlist;
|
||||||
Id User Host db Command Time State Info
|
Id User Host db Command Time State Info
|
||||||
# root localhost test Sleep # NULL
|
# root localhost test Sleep # NULL
|
||||||
@ -77,7 +77,7 @@ select * from t1;
|
|||||||
end|
|
end|
|
||||||
use test;
|
use test;
|
||||||
lock table t1 write;
|
lock table t1 write;
|
||||||
call p2();
|
call p2();
|
||||||
use test;
|
use test;
|
||||||
drop procedure p1;
|
drop procedure p1;
|
||||||
create procedure p1() select * from t1;
|
create procedure p1() select * from t1;
|
||||||
|
@ -74,8 +74,7 @@ flush status|
|
|||||||
flush query cache|
|
flush query cache|
|
||||||
delete from t1|
|
delete from t1|
|
||||||
drop procedure bug3583|
|
drop procedure bug3583|
|
||||||
drop table t1;
|
drop table t1|
|
||||||
#|
|
|
||||||
drop procedure if exists bug6807|
|
drop procedure if exists bug6807|
|
||||||
create procedure bug6807()
|
create procedure bug6807()
|
||||||
begin
|
begin
|
||||||
|
@ -2717,8 +2717,7 @@ select (1,2,3) = (select * from t1);
|
|||||||
ERROR 21000: Operand should contain 3 column(s)
|
ERROR 21000: Operand should contain 3 column(s)
|
||||||
select (select * from t1) = (1,2,3);
|
select (select * from t1) = (1,2,3);
|
||||||
ERROR 21000: Operand should contain 2 column(s)
|
ERROR 21000: Operand should contain 2 column(s)
|
||||||
drop table t1
|
drop table t1;
|
||||||
#;
|
|
||||||
CREATE TABLE `t1` (
|
CREATE TABLE `t1` (
|
||||||
`itemid` bigint(20) unsigned NOT NULL auto_increment,
|
`itemid` bigint(20) unsigned NOT NULL auto_increment,
|
||||||
`sessionid` bigint(20) unsigned default NULL,
|
`sessionid` bigint(20) unsigned default NULL,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
CREATE TABLE t1 (x1 int);
|
CREATE TABLE t1 (x1 int);
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -8,7 +8,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -16,7 +16,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -24,7 +24,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -32,7 +32,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -40,7 +40,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -48,7 +48,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -56,7 +56,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -64,7 +64,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -72,7 +72,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -80,7 +80,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -88,7 +88,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -96,7 +96,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -104,7 +104,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -112,7 +112,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -120,7 +120,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -128,7 +128,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -136,7 +136,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -144,7 +144,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x1 x2 int;
|
ALTER TABLE t1 CHANGE x1 x2 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -152,7 +152,7 @@ t2 CREATE TABLE `t2` (
|
|||||||
`xx` int(11) DEFAULT NULL
|
`xx` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
ALTER TABLE t1 CHANGE x2 x1 int;
|
ALTER TABLE t1 CHANGE x2 x1 int;
|
||||||
CREATE TABLE t2 LIKE t1;
|
CREATE TABLE t2 LIKE t1;
|
||||||
SHOW CREATE TABLE t2;
|
SHOW CREATE TABLE t2;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
|
@ -215,6 +215,7 @@ select @@version;
|
|||||||
select @@global.version;
|
select @@global.version;
|
||||||
@@global.version
|
@@global.version
|
||||||
#
|
#
|
||||||
|
End of 4.1 tests
|
||||||
set @first_var= NULL;
|
set @first_var= NULL;
|
||||||
create table t1 select @first_var;
|
create table t1 select @first_var;
|
||||||
show create table t1;
|
show create table t1;
|
||||||
@ -301,3 +302,11 @@ select @var;
|
|||||||
@var
|
@var
|
||||||
3
|
3
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
insert into city 'blah';
|
||||||
|
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 ''blah'' at line 1
|
||||||
|
SHOW COUNT(*) WARNINGS;
|
||||||
|
@@session.warning_count
|
||||||
|
1
|
||||||
|
SHOW COUNT(*) ERRORS;
|
||||||
|
@@session.error_count
|
||||||
|
1
|
||||||
|
@ -59,6 +59,7 @@ flush privileges;
|
|||||||
|
|
||||||
connect (con10,localhost,test,gambling2,);
|
connect (con10,localhost,test,gambling2,);
|
||||||
connect (con5,localhost,test,gambling2,mysql);
|
connect (con5,localhost,test,gambling2,mysql);
|
||||||
|
connection con5;
|
||||||
set password="";
|
set password="";
|
||||||
--error 1372
|
--error 1372
|
||||||
set password='gambling3';
|
set password='gambling3';
|
||||||
|
@ -20,6 +20,9 @@ SET SESSION debug="d,crash_commit_before";
|
|||||||
--error 2013
|
--error 2013
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
|
# Turn on reconnect
|
||||||
|
--enable_reconnect
|
||||||
|
|
||||||
# Call script that will poll the server waiting for it to be back online again
|
# Call script that will poll the server waiting for it to be back online again
|
||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
|
@ -1295,7 +1295,7 @@ SELECT fld3 FROM t2;
|
|||||||
#
|
#
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
ALTER TABLE t2 RENAME t1
|
ALTER TABLE t2 RENAME t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Drop and recreate
|
# Drop and recreate
|
||||||
|
@ -9,29 +9,18 @@
|
|||||||
# Do not use any TAB characters for whitespace.
|
# Do not use any TAB characters for whitespace.
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#events_bugs : BUG#17619 2006-02-21 andrey Race conditions
|
|
||||||
#events_stress : BUG#17619 2006-02-21 andrey Race conditions
|
|
||||||
#events : BUG#17619 2006-02-21 andrey Race conditions
|
|
||||||
#events_scheduling : BUG#19170 2006-04-26 andrey Test case of 19170 fails on some platforms. Has to be checked.
|
|
||||||
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
|
im_options : Bug#20294 2006-07-24 stewart Instance manager test im_options fails randomly
|
||||||
#im_life_cycle : Bug#20368 2006-06-10 alik im_life_cycle test fails
|
|
||||||
im_daemon_life_cycle : BUG#22379 2006-09-15 ingo im_daemon_life_cycle.test fails on merge of 5.1 -> 5.1-engines
|
|
||||||
im_instance_conf : BUG#20294 2006-09-16 ingo Instance manager test im_instance_conf fails randomly
|
|
||||||
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
|
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
|
||||||
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||||
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
|
||||||
#ndb_binlog_ignore_db : BUG#21279 2006-07-25 ingo Randomly throws a warning
|
|
||||||
ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
|
ndb_load : BUG#17233 2006-05-04 tomas failed load data from infile causes mysqld dbug_assert, binlog not flushed
|
||||||
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
|
partition_03ndb : BUG#16385 2006-03-24 mikael Partitions: crash when updating a range partitioned NDB table
|
||||||
ps : BUG#21524 2006-08-08 pgalbraith 'ps' test fails in --ps-protocol test AMD64 bit
|
|
||||||
ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open
|
ps_7ndb : BUG#18950 2006-02-16 jmiller create table like does not obtain LOCK_open
|
||||||
rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
|
rpl_ndb_2innodb : BUG#19227 2006-04-20 pekka pk delete apparently not replicated
|
||||||
rpl_ndb_2myisam : BUG#19227 Seems to pass currently
|
rpl_ndb_2myisam : BUG#19227 Seems to pass currently
|
||||||
#rpl_ndb_commit_afterflush : BUG#19328 2006-05-04 tomas Slave timeout with COM_REGISTER_SLAVE error causing stop
|
|
||||||
rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD
|
rpl_ndb_dd_partitions : BUG#19259 2006-04-21 rpl_ndb_dd_partitions fails on s/AMD
|
||||||
rpl_ndb_ddl : BUG#18946 result file needs update + test needs to checked
|
rpl_ndb_ddl : BUG#18946 result file needs update + test needs to checked
|
||||||
rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement
|
rpl_ndb_innodb2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement
|
||||||
#rpl_ndb_log : BUG#18947 2006-03-21 tomas CRBR: order in binlog of create table and insert (on different table) not determ
|
|
||||||
rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement
|
rpl_ndb_myisam2ndb : Bug #19710 Cluster replication to partition table fails on DELETE FROM statement
|
||||||
rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
|
rpl_row_blob_innodb : BUG#18980 2006-04-10 kent Test fails randomly
|
||||||
rpl_sp : BUG#16456 2006-02-16 jmiller
|
rpl_sp : BUG#16456 2006-02-16 jmiller
|
||||||
@ -39,8 +28,5 @@ rpl_multi_engine : BUG#22583 2006-09-23 lars
|
|||||||
|
|
||||||
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
|
# the below testcase have been reworked to avoid the bug, test contains comment, keep bug open
|
||||||
#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events
|
#ndb_binlog_ddl_multi : BUG#18976 2006-04-10 kent CRBR: multiple binlog, second binlog may miss schema log events
|
||||||
#rpl_ndb_idempotent : BUG#21298 2006-07-27 msvensson
|
|
||||||
#rpl_row_basic_7ndb : BUG#21298 2006-07-27 msvensson
|
|
||||||
#rpl_truncate_7ndb : BUG#21298 2006-07-27 msvensson
|
|
||||||
ndb_binlog_discover : bug#21806 2006-08-24
|
ndb_binlog_discover : bug#21806 2006-08-24
|
||||||
ndb_autodiscover3 : bug#21806
|
ndb_autodiscover3 : bug#21806
|
||||||
|
@ -56,7 +56,19 @@ insert into t1 values(NULL), (compress('a'));
|
|||||||
select uncompress(a), uncompressed_length(a) from t1;
|
select uncompress(a), uncompressed_length(a) from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
#
|
||||||
|
# Bug #23254: problem with compress(NULL)
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1(a blob);
|
||||||
|
insert into t1 values ('0'), (NULL), ('0');
|
||||||
|
--disable_result_log
|
||||||
|
select compress(a), compress(a) from t1;
|
||||||
|
--enable_result_log
|
||||||
|
select compress(a) is null from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #18539: uncompress(d) is null: impossible?
|
# Bug #18539: uncompress(d) is null: impossible?
|
||||||
|
@ -64,4 +64,17 @@ insert into t1 values (date_add('2000-01-04', INTERVAL NULL DAY));
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#21811
|
||||||
|
#
|
||||||
|
# Make sure we end up with an appropriate
|
||||||
|
# date format (DATE) after addition operation
|
||||||
|
#
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 DAY;
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 MONTH;
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 YEAR;
|
||||||
|
SELECT CAST('2006-09-26' AS DATE) + INTERVAL 1 WEEK;
|
||||||
|
|
||||||
|
--echo End of 5.0 tests
|
||||||
|
@ -466,6 +466,47 @@ SET NAMES DEFAULT;
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
# Bug #11655: Wrong time is returning from nested selects - maximum time exists
|
||||||
|
#
|
||||||
|
# check if SEC_TO_TIME() handles out-of-range values correctly
|
||||||
|
SELECT SEC_TO_TIME(3300000);
|
||||||
|
SELECT SEC_TO_TIME(3300000)+0;
|
||||||
|
SELECT SEC_TO_TIME(3600 * 4294967296);
|
||||||
|
|
||||||
|
# check if TIME_TO_SEC() handles out-of-range values correctly
|
||||||
|
SELECT TIME_TO_SEC('916:40:00');
|
||||||
|
|
||||||
|
# check if ADDTIME() handles out-of-range values correctly
|
||||||
|
SELECT ADDTIME('500:00:00', '416:40:00');
|
||||||
|
SELECT ADDTIME('916:40:00', '416:40:00');
|
||||||
|
|
||||||
|
# check if SUBTIME() handles out-of-range values correctly
|
||||||
|
SELECT SUBTIME('916:40:00', '416:40:00');
|
||||||
|
SELECT SUBTIME('-916:40:00', '416:40:00');
|
||||||
|
|
||||||
|
# check if MAKETIME() handles out-of-range values correctly
|
||||||
|
SELECT MAKETIME(916,0,0);
|
||||||
|
SELECT MAKETIME(4294967296, 0, 0);
|
||||||
|
SELECT MAKETIME(-4294967296, 0, 0);
|
||||||
|
SELECT MAKETIME(0, 4294967296, 0);
|
||||||
|
SELECT MAKETIME(0, 0, 4294967296);
|
||||||
|
SELECT MAKETIME(CAST(-1 AS UNSIGNED), 0, 0);
|
||||||
|
|
||||||
|
# check if EXTRACT() handles out-of-range values correctly
|
||||||
|
SELECT EXTRACT(HOUR FROM '100000:02:03');
|
||||||
|
|
||||||
|
# check if we get proper warnings if both input string truncation
|
||||||
|
# and out-of-range value occur
|
||||||
|
CREATE TABLE t1(f1 TIME);
|
||||||
|
INSERT INTO t1 VALUES('916:00:00 a');
|
||||||
|
SELECT * FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #20927: sec_to_time treats big unsigned as signed
|
||||||
|
#
|
||||||
|
# check if SEC_TO_TIME() handles BIGINT UNSIGNED values correctly
|
||||||
|
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
|
||||||
# Bug #19844 time_format in Union truncates values
|
# Bug #19844 time_format in Union truncates values
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
--source include/im_check_env.inc
|
--source include/im_check_env.inc
|
||||||
|
|
||||||
|
# Turn on reconnect, not on by default anymore
|
||||||
|
--enable_reconnect
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
# Kill the IM main process and check that the IM Angel will restart the main
|
# Kill the IM main process and check that the IM Angel will restart the main
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
# See mysql-test/std_data/init_file.dat and
|
# See mysql-test/std_data/init_file.dat and
|
||||||
# mysql-test/t/init_file-master.opt for the actual test
|
# mysql-test/t/init_file-master.opt for the actual test
|
||||||
#
|
#
|
||||||
|
|
||||||
--echo ok
|
--echo ok
|
||||||
--echo end of 4.1 tests
|
--echo end of 4.1 tests
|
||||||
|
@ -153,4 +153,21 @@ drop table t1;
|
|||||||
--exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
|
--exec echo "SELECT '\';';" >> $MYSQLTEST_VARDIR/tmp/bug20103.sql
|
||||||
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
|
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20103.sql 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#17583: mysql drops connection when stdout is not writable
|
||||||
|
#
|
||||||
|
create table t17583 (a int);
|
||||||
|
insert into t17583 (a) values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
insert into t17583 select a from t17583;
|
||||||
|
# Close to the minimal data needed to exercise bug.
|
||||||
|
select count(*) from t17583;
|
||||||
|
--exec echo "select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; select count(*) from t17583; " |$MYSQL test >&-
|
||||||
|
drop table t17583;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
@ -317,7 +317,6 @@ select 3 from t1 ;
|
|||||||
#
|
#
|
||||||
#select 3 from t1 ;
|
#select 3 from t1 ;
|
||||||
|
|
||||||
# End of 4.1 tests
|
|
||||||
--error 1
|
--error 1
|
||||||
--exec echo "disable_abort_on_error; enable_abort_on_error; error 1064; select 3 from t1; select 3 from t1;" | $MYSQL_TEST 2>&1
|
--exec echo "disable_abort_on_error; enable_abort_on_error; error 1064; select 3 from t1; select 3 from t1;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
@ -360,18 +359,80 @@ select 3 from t1 ;
|
|||||||
# Missing delimiter
|
# Missing delimiter
|
||||||
# The comment will be "sucked into" the sleep command since
|
# The comment will be "sucked into" the sleep command since
|
||||||
# delimiter is missing until after "show status"
|
# delimiter is missing until after "show status"
|
||||||
--system echo "sleep 4" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
--system echo "# A comment" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
sleep 4
|
||||||
--system echo "show status;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
# A comment
|
||||||
|
show status;
|
||||||
|
EOF
|
||||||
--error 1
|
--error 1
|
||||||
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Missing delimiter until eof
|
# Missing delimiter until eof
|
||||||
# The comment will be "sucked into" the sleep command since
|
# The comment will be "sucked into" the sleep command since
|
||||||
# delimiter is missing
|
# delimiter is missing
|
||||||
--system echo "sleep 7" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
--system echo "# Another comment" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
sleep 7
|
||||||
|
# Another comment
|
||||||
|
EOF
|
||||||
|
--error 1
|
||||||
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Missing delimiter until "disable_query_log"
|
||||||
|
#
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
|
disconnect default
|
||||||
|
|
||||||
|
#
|
||||||
|
# comment
|
||||||
|
# comment 3
|
||||||
|
disable_query_log;
|
||||||
|
EOF
|
||||||
|
--error 1
|
||||||
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Missing delimiter until "disable_query_log"
|
||||||
|
#
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
|
disconnect default
|
||||||
|
|
||||||
|
#
|
||||||
|
# comment
|
||||||
|
|
||||||
|
# comment 3
|
||||||
|
disable_query_log;
|
||||||
|
EOF
|
||||||
|
--error 1
|
||||||
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Missing delimiter until eof
|
||||||
|
#
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
|
disconnect default
|
||||||
|
|
||||||
|
#
|
||||||
|
# comment
|
||||||
|
# comment2
|
||||||
|
|
||||||
|
# comment 3
|
||||||
|
--disable_query_log
|
||||||
|
EOF
|
||||||
|
--error 1
|
||||||
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
||||||
|
|
||||||
|
#
|
||||||
|
# Missing delimiter until eof
|
||||||
|
#
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
|
disconnect default # comment
|
||||||
|
# comment part2
|
||||||
|
|
||||||
|
# comment 3
|
||||||
|
--disable_query_log
|
||||||
|
EOF
|
||||||
--error 1
|
--error 1
|
||||||
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
|
||||||
|
|
||||||
@ -388,6 +449,67 @@ select 3 from t1 ;
|
|||||||
--sleep 1 # Wait for insert delayed to be executed.
|
--sleep 1 # Wait for insert delayed to be executed.
|
||||||
--sleep 1 # Wait for insert delayed to be executed.
|
--sleep 1 # Wait for insert delayed to be executed.
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# Test error
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Missing argument
|
||||||
|
--error 1
|
||||||
|
--exec echo "error;" | $MYSQL_TEST 2>&1
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# First char must be uppercase 'S' or 'E' or [0-9]
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error s99999" | $MYSQL_TEST 2>&1
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error e99999" | $MYSQL_TEST 2>&1
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error 9eeeee" | $MYSQL_TEST 2>&1
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error 1sssss" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# First char 'S' but too long
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error S999999" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# First char 'S' but lowercase char found
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error S99a99" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# First char 'S' but too short
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error S9999" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# First char 'E' but not found in error array
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error E9999" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# First char [0-9] but contains chars
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error 999e9" | $MYSQL_TEST 2>&1
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error 9b" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# Multiple errorcodes separated by ','
|
||||||
|
--error 1,1,1,1
|
||||||
|
#--error 9,ER_PARSE_ERROR
|
||||||
|
#--error ER_PARSE_ERROR
|
||||||
|
#--error 9,ER_PARSE_ERROR,9,ER_PARSE_ERROR
|
||||||
|
#--error 9, ER_PARSE_ERROR, 9, ER_PARSE_ERROR
|
||||||
|
#--error 9,S00000,9,ER_PARSE_ERROR
|
||||||
|
#--error 9,S00000,9,ER_PARSE_ERROR,ER_PARSE_ERROR,ER_PARSE_ERROR,9,10,11,12
|
||||||
|
--error 9,S00000,9
|
||||||
|
--error 9,S00000,9,9,10,11,12
|
||||||
|
--error 9 ,10
|
||||||
|
--error 9 , 10
|
||||||
|
--error 9 , 10
|
||||||
|
--error 9 , 10
|
||||||
|
|
||||||
|
# Too many errorcodes specified
|
||||||
|
--error 1
|
||||||
|
--exec echo "--error 1,2,3,4,5,6,7,8,9,10,11" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Test echo command
|
# Test echo command
|
||||||
@ -610,6 +732,7 @@ echo $var3_var3;
|
|||||||
|
|
||||||
# Fix win paths
|
# Fix win paths
|
||||||
--replace_result \\ /
|
--replace_result \\ /
|
||||||
|
# Source a nonexisting file
|
||||||
--error 1
|
--error 1
|
||||||
--exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1
|
--exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
@ -627,13 +750,16 @@ echo $var3_var3;
|
|||||||
|
|
||||||
|
|
||||||
# Test execution of source in a while loop
|
# Test execution of source in a while loop
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/sourced.inc
|
||||||
|
echo here is the sourced script;
|
||||||
|
EOF
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
let $outer= 2; # Number of outer loops
|
let $outer= 2; # Number of outer loops
|
||||||
while ($outer)
|
while ($outer)
|
||||||
{
|
{
|
||||||
eval SELECT '$outer = outer loop variable after while' AS "";
|
eval SELECT '$outer = outer loop variable after while' AS "";
|
||||||
|
|
||||||
--source include/sourced.inc
|
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
|
||||||
|
|
||||||
eval SELECT '$outer = outer loop variable before dec' AS "";
|
eval SELECT '$outer = outer loop variable before dec' AS "";
|
||||||
dec $outer;
|
dec $outer;
|
||||||
@ -661,11 +787,12 @@ let $num= 9;
|
|||||||
while ($num)
|
while ($num)
|
||||||
{
|
{
|
||||||
SELECT 'In loop' AS "";
|
SELECT 'In loop' AS "";
|
||||||
--source include/sourced1.inc
|
--source $MYSQLTEST_VARDIR/tmp/sourced.inc
|
||||||
dec $num;
|
dec $num;
|
||||||
}
|
}
|
||||||
--enable_abort_on_error
|
--enable_abort_on_error
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/sourced.inc
|
||||||
|
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
# Test sleep command
|
# Test sleep command
|
||||||
@ -817,10 +944,150 @@ while (!$i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Exceed max nesting level
|
# Exceed max nesting level
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
# Fix win path
|
# Fix win path
|
||||||
--replace_result \\ /
|
--replace_result \\ / $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
--error 1
|
--error 1
|
||||||
--exec echo "source include/mysqltest_while.inc;" | $MYSQL_TEST 2>&1
|
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc;" | $MYSQL_TEST 2>&1
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc
|
||||||
--error 1
|
--error 1
|
||||||
--exec echo "while \$i;" | $MYSQL_TEST 2>&1
|
--exec echo "while \$i;" | $MYSQL_TEST 2>&1
|
||||||
--error 1
|
--error 1
|
||||||
@ -925,12 +1192,6 @@ select "a" as col1, "c" as col2;
|
|||||||
--error 1
|
--error 1
|
||||||
--exec echo "connect (con2,);" | $MYSQL_TEST 2>&1
|
--exec echo "connect (con2,);" | $MYSQL_TEST 2>&1
|
||||||
--error 1
|
--error 1
|
||||||
--exec echo "connect (con2,localhost);" | $MYSQL_TEST 2>&1
|
|
||||||
--error 1
|
|
||||||
--exec echo "connect (con2, localhost, root);" | $MYSQL_TEST 2>&1
|
|
||||||
--error 1
|
|
||||||
--exec echo "connect (con2, localhost, root,);" | $MYSQL_TEST 2>&1
|
|
||||||
--error 1
|
|
||||||
--exec echo "connect (con2,localhost,root,,illegal_db);" | $MYSQL_TEST 2>&1
|
--exec echo "connect (con2,localhost,root,,illegal_db);" | $MYSQL_TEST 2>&1
|
||||||
--error 1
|
--error 1
|
||||||
--exec echo "connect (con1,localhost,root,,,illegal_port,);" | $MYSQL_TEST 2>&1
|
--exec echo "connect (con1,localhost,root,,,illegal_port,);" | $MYSQL_TEST 2>&1
|
||||||
@ -938,13 +1199,15 @@ select "a" as col1, "c" as col2;
|
|||||||
--exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1
|
--exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
# Repeat connect/disconnect
|
# Repeat connect/disconnect
|
||||||
--system echo "let \$i=100;" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
||||||
--system echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
let $i=100;
|
||||||
--system echo "{" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
while ($i)
|
||||||
--system echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
{
|
||||||
--system echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
connect (test_con1,localhost,root,,);
|
||||||
--system echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
disconnect test_con1;
|
||||||
--system echo "}" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
|
dec $i;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1
|
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
# Repeat connect/disconnect, exceed max number of connections
|
# Repeat connect/disconnect, exceed max number of connections
|
||||||
@ -1149,8 +1412,6 @@ query sleep;
|
|||||||
--error 1065
|
--error 1065
|
||||||
query ;
|
query ;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
|
||||||
|
|
||||||
# test for replace_regex
|
# test for replace_regex
|
||||||
--replace_regex /at/b/
|
--replace_regex /at/b/
|
||||||
select "at" as col1, "c" as col2;
|
select "at" as col1, "c" as col2;
|
||||||
@ -1189,4 +1450,103 @@ insert into t1 values (2,4);
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
# ----------------------------------------------------------------------------
|
||||||
|
# test for remove_file
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec echo "remove_file ;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
remove_file non_existing_file;
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# test for write_file
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
--error 1
|
||||||
|
--exec echo "write_file ;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec echo "write_file filename ;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
Content for test_file1
|
||||||
|
EOF
|
||||||
|
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
|
||||||
|
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp END_DELIMITER;
|
||||||
|
Content for test_file1 contains EOF
|
||||||
|
END_DELIMITER
|
||||||
|
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# test for file_exist
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
--error 1
|
||||||
|
--exec echo "file_exists ;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
--error 0,1
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
--error 1
|
||||||
|
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
Content for test_file1
|
||||||
|
EOF
|
||||||
|
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
--error 1
|
||||||
|
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# test for copy_file
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
|
||||||
|
file1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
copy_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||||
|
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec echo "copy_file ;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec echo "copy_file from_file;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
# test for perl
|
||||||
|
# ----------------------------------------------------------------------------
|
||||||
|
--perl
|
||||||
|
print "hello\n";
|
||||||
|
EOF
|
||||||
|
|
||||||
|
--perl EOF
|
||||||
|
print "hello\n";
|
||||||
|
EOF
|
||||||
|
|
||||||
|
--perl DELIMITER
|
||||||
|
print "hello\n";
|
||||||
|
DELIMITER
|
||||||
|
|
||||||
|
--error 1
|
||||||
|
--exec echo "perl TOO_LONG_DELIMITER ;" | $MYSQL_TEST 2>&1
|
||||||
|
|
||||||
|
perl;
|
||||||
|
print "hello\n";
|
||||||
|
EOF
|
||||||
|
|
||||||
|
perl;
|
||||||
|
# Print "hello"
|
||||||
|
print "hello\n";
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
--echo End of tests
|
||||||
|
@ -1 +1 @@
|
|||||||
--loose-to-force-a-restart
|
--force-restart
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
# Taken fromm the select test
|
# Taken fromm the select test
|
||||||
#
|
#
|
||||||
-- source include/have_partition.inc
|
-- source include/have_partition.inc
|
||||||
|
-- source include/have_innodb.inc
|
||||||
#
|
#
|
||||||
# This test is disabled on Windows due to BUG#19107
|
# This test is disabled on Windows due to BUG#19107
|
||||||
#
|
#
|
||||||
@ -1286,37 +1287,51 @@ eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx'''
|
|||||||
let $inx_directory = `select @inx_dir`;
|
let $inx_directory = `select @inx_dir`;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
eval create table t1 (a int) engine myisam
|
eval create table t1 (a int) engine myisam
|
||||||
partition by range (a)
|
partition by range (a)
|
||||||
subpartition by hash (a)
|
subpartition by hash (a)
|
||||||
(partition p0 VALUES LESS THAN (1) $data_directory $inx_directory
|
(partition p0 VALUES LESS THAN (1) $data_directory $inx_directory
|
||||||
(SUBPARTITION subpart00, SUBPARTITION subpart01));
|
(SUBPARTITION subpart00, SUBPARTITION subpart01));
|
||||||
|
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--echo Checking if file exists before alter
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYI
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYD
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYI
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
|
||||||
(partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
|
(partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
|
||||||
(SUBPARTITION subpart10, SUBPARTITION subpart11),
|
(SUBPARTITION subpart10, SUBPARTITION subpart11),
|
||||||
partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
|
partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
|
||||||
(SUBPARTITION subpart20, SUBPARTITION subpart21));
|
(SUBPARTITION subpart20, SUBPARTITION subpart21));
|
||||||
|
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--echo Checking if file exists after alter
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1.* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/test/t1#* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYI
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/tmpdata/t1#* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYD
|
||||||
--replace_result $MYSQLTEST_VARDIR "hello"
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart11.MYI
|
||||||
--exec ls $MYSQLTEST_VARDIR/master-data/tmpinx/t1#* || true
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYD
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYI
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYD
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYI
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI
|
||||||
|
--file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
--exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
|
--exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
|
||||||
|
1
mysql-test/t/ps-master.opt
Normal file
1
mysql-test/t/ps-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--log-slow-queries --log-long-format --log-queries-not-using-indexes
|
@ -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);
|
insert into t1 (a, b) values (1,1), (1,2), (2,1), (2,2);
|
||||||
prepare stmt from
|
prepare stmt from
|
||||||
"explain select * from t1 where t1.a=2 and t1.a=t1.b and t1.b > 1 + ?";
|
"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;
|
set @v=5;
|
||||||
execute stmt using @v;
|
|
||||||
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
|
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
|
||||||
|
execute stmt using @v;
|
||||||
set @v=0;
|
set @v=0;
|
||||||
execute stmt using @v;
|
|
||||||
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
|
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
|
||||||
|
execute stmt using @v;
|
||||||
set @v=5;
|
set @v=5;
|
||||||
|
--replace_column 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 -
|
||||||
execute stmt using @v;
|
execute stmt using @v;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
@ -1437,6 +1437,20 @@ DEALLOCATE PREPARE stmt;
|
|||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug 19764: SHOW commands end up in the slow log as table scans
|
||||||
|
#
|
||||||
|
|
||||||
|
flush status;
|
||||||
|
prepare sq from 'show status like "slow_queries"';
|
||||||
|
execute sq;
|
||||||
|
prepare no_index from 'select 1 from information_schema.tables limit 1';
|
||||||
|
execute sq;
|
||||||
|
execute no_index;
|
||||||
|
execute sq;
|
||||||
|
deallocate prepare no_index;
|
||||||
|
deallocate prepare sq;
|
||||||
|
|
||||||
--echo End of 5.0 tests.
|
--echo End of 5.0 tests.
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -1447,13 +1461,15 @@ create procedure proc_1() reset query cache;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin reset query cache; return 1; end|
|
create function func_1() returns int begin reset query cache; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "reset query cache";
|
prepare abc from "reset query cache";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1462,13 +1478,15 @@ deallocate prepare abc;
|
|||||||
|
|
||||||
|
|
||||||
create procedure proc_1() reset master;
|
create procedure proc_1() reset master;
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin reset master; return 1; end|
|
create function func_1() returns int begin reset master; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "reset master";
|
prepare abc from "reset master";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1480,13 +1498,15 @@ create procedure proc_1() reset slave;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin reset slave; return 1; end|
|
create function func_1() returns int begin reset slave; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "reset slave";
|
prepare abc from "reset slave";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1527,15 +1547,15 @@ call proc_1();
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush hosts; return 1; end|
|
create function func_1() returns int begin flush hosts; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush hosts";
|
prepare abc from "flush hosts";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1547,15 +1567,15 @@ create procedure proc_1() flush privileges;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush privileges; return 1; end|
|
create function func_1() returns int begin flush privileges; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush privileges";
|
prepare abc from "flush privileges";
|
||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
|
|
||||||
@ -1567,11 +1587,15 @@ call proc_1();
|
|||||||
unlock tables;
|
unlock tables;
|
||||||
call proc_1();
|
call proc_1();
|
||||||
unlock tables;
|
unlock tables;
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush tables with read lock; return 1; end|
|
create function func_1() returns int begin flush tables with read lock; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
|
select func_1(), func_1(), func_1() from dual;
|
||||||
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush tables with read lock";
|
prepare abc from "flush tables with read lock";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1584,15 +1608,15 @@ create procedure proc_1() flush tables;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush tables; return 1; end|
|
create function func_1() returns int begin flush tables; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush tables";
|
prepare abc from "flush tables";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1622,15 +1646,15 @@ select Host, User from mysql.user limit 0;
|
|||||||
select Host, Db from mysql.host limit 0;
|
select Host, Db from mysql.host limit 0;
|
||||||
show open tables from mysql;
|
show open tables from mysql;
|
||||||
flush tables;
|
flush tables;
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush tables; return 1; end|
|
create function func_1() returns int begin flush tables; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
flush tables;
|
flush tables;
|
||||||
select Host, User from mysql.user limit 0;
|
select Host, User from mysql.user limit 0;
|
||||||
select Host, Db from mysql.host limit 0;
|
select Host, Db from mysql.host limit 0;
|
||||||
@ -1659,15 +1683,15 @@ create procedure proc_1() flush logs;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush logs; return 1; end|
|
create function func_1() returns int begin flush logs; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush logs";
|
prepare abc from "flush logs";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1679,15 +1703,15 @@ create procedure proc_1() flush status;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush status; return 1; end|
|
create function func_1() returns int begin flush status; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush status";
|
prepare abc from "flush status";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1699,15 +1723,15 @@ create procedure proc_1() flush slave;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush slave; return 1; end|
|
create function func_1() returns int begin flush slave; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush slave";
|
prepare abc from "flush slave";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1716,15 +1740,15 @@ deallocate prepare abc;
|
|||||||
|
|
||||||
|
|
||||||
create procedure proc_1() flush master;
|
create procedure proc_1() flush master;
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush master; return 1; end|
|
create function func_1() returns int begin flush master; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush master";
|
prepare abc from "flush master";
|
||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
|
|
||||||
@ -1733,15 +1757,15 @@ create procedure proc_1() flush des_key_file;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush des_key_file; return 1; end|
|
create function func_1() returns int begin flush des_key_file; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush des_key_file";
|
prepare abc from "flush des_key_file";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1753,15 +1777,15 @@ create procedure proc_1() flush user_resources;
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
create function func_1() returns int begin flush user_resources; return 1; end|
|
create function func_1() returns int begin flush user_resources; return 1; end|
|
||||||
|
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
select func_1(), func_1(), func_1() from dual;
|
select func_1(), func_1(), func_1() from dual;
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
drop function func_1;
|
||||||
|
drop procedure proc_1;
|
||||||
prepare abc from "flush user_resources";
|
prepare abc from "flush user_resources";
|
||||||
execute abc;
|
execute abc;
|
||||||
execute abc;
|
execute abc;
|
||||||
@ -1865,22 +1889,6 @@ execute abc;
|
|||||||
deallocate prepare abc;
|
deallocate prepare abc;
|
||||||
|
|
||||||
|
|
||||||
create procedure proc_1() show scheduler status;
|
|
||||||
drop procedure proc_1;
|
|
||||||
delimiter |;
|
|
||||||
--error ER_SP_NO_RETSET
|
|
||||||
create function func_1() returns int begin show scheduler status; return 1; end|
|
|
||||||
delimiter ;|
|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
select func_1(), func_1(), func_1() from dual;
|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
drop function func_1;
|
|
||||||
--error ER_UNSUPPORTED_PS
|
|
||||||
prepare abc from "show scheduler status";
|
|
||||||
--error ER_UNKNOWN_STMT_HANDLER
|
|
||||||
deallocate prepare abc;
|
|
||||||
|
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop procedure if exists a;
|
drop procedure if exists a;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
@ -1997,10 +2005,13 @@ call proc_1();
|
|||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
drop procedure proc_1;
|
||||||
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
|
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
|
||||||
|
--replace_regex /(Can\'t open shared library).*$/\1/
|
||||||
--error ER_CANT_OPEN_LIBRARY
|
--error ER_CANT_OPEN_LIBRARY
|
||||||
call proc_1();
|
call proc_1();
|
||||||
|
--replace_regex /(Can\'t open shared library).*$/\1/
|
||||||
--error ER_CANT_OPEN_LIBRARY
|
--error ER_CANT_OPEN_LIBRARY
|
||||||
call proc_1();
|
call proc_1();
|
||||||
|
--replace_regex /(Can\'t open shared library).*$/\1/
|
||||||
--error ER_CANT_OPEN_LIBRARY
|
--error ER_CANT_OPEN_LIBRARY
|
||||||
call proc_1();
|
call proc_1();
|
||||||
drop procedure proc_1;
|
drop procedure proc_1;
|
||||||
@ -2150,7 +2161,7 @@ drop event if exists xyz;
|
|||||||
#drop event xyz;
|
#drop event xyz;
|
||||||
#drop procedure proc_1;
|
#drop procedure proc_1;
|
||||||
delimiter |;
|
delimiter |;
|
||||||
--error ER_SP_NO_RETSET
|
--error ER_EVENT_RECURSIVITY_FORBIDDEN
|
||||||
create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end|
|
create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
--error ER_SP_DOES_NOT_EXIST
|
||||||
|
@ -144,3 +144,37 @@ prepare st_18492 from 'select * from t1 where 3 in (select (1+1) union select 1)
|
|||||||
execute st_18492;
|
execute st_18492;
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#19356: Assertion failure with undefined @uservar in prepared statement execution
|
||||||
|
#
|
||||||
|
create table t1 (a int, b varchar(4));
|
||||||
|
create table t2 (a int, b varchar(4), primary key(a));
|
||||||
|
|
||||||
|
prepare stmt1 from 'insert into t1 (a, b) values (?, ?)';
|
||||||
|
prepare stmt2 from 'insert into t2 (a, b) values (?, ?)';
|
||||||
|
|
||||||
|
set @intarg= 11;
|
||||||
|
set @varchararg= '2222';
|
||||||
|
execute stmt1 using @intarg, @varchararg;
|
||||||
|
execute stmt2 using @intarg, @varchararg;
|
||||||
|
set @intarg= 12;
|
||||||
|
execute stmt1 using @intarg, @UNDEFINED;
|
||||||
|
execute stmt2 using @intarg, @UNDEFINED;
|
||||||
|
set @intarg= 13;
|
||||||
|
execute stmt1 using @UNDEFINED, @varchararg;
|
||||||
|
--error 1048
|
||||||
|
execute stmt2 using @UNDEFINED, @varchararg;
|
||||||
|
set @intarg= 14;
|
||||||
|
set @nullarg= Null;
|
||||||
|
execute stmt1 using @UNDEFINED, @nullarg;
|
||||||
|
--error 1048
|
||||||
|
execute stmt2 using @nullarg, @varchararg;
|
||||||
|
|
||||||
|
select * from t1;
|
||||||
|
select * from t2;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
drop table t2;
|
||||||
|
|
||||||
|
--echo End of 5.0 tests.
|
||||||
|
@ -316,8 +316,8 @@ prepare stmt4 from ' show table status from test like ''t9%'' ';
|
|||||||
--replace_column 8 # 12 # 13 # 14 #
|
--replace_column 8 # 12 # 13 # 14 #
|
||||||
# Bug#4288
|
# Bug#4288
|
||||||
execute stmt4;
|
execute stmt4;
|
||||||
--replace_column 2 #
|
|
||||||
prepare stmt4 from ' show status like ''Threads_running'' ';
|
prepare stmt4 from ' show status like ''Threads_running'' ';
|
||||||
|
--replace_column 2 #
|
||||||
execute stmt4;
|
execute stmt4;
|
||||||
prepare stmt4 from ' show variables like ''sql_mode'' ';
|
prepare stmt4 from ' show variables like ''sql_mode'' ';
|
||||||
execute stmt4;
|
execute stmt4;
|
||||||
|
@ -35,7 +35,7 @@ use mysqltest;
|
|||||||
--source include/ps_create.inc
|
--source include/ps_create.inc
|
||||||
--source include/ps_renew.inc
|
--source include/ps_renew.inc
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
eval use $DB;
|
use test;
|
||||||
grant usage on mysqltest.* to second_user@localhost
|
grant usage on mysqltest.* to second_user@localhost
|
||||||
identified by 'looser' ;
|
identified by 'looser' ;
|
||||||
grant select on mysqltest.t9 to second_user@localhost
|
grant select on mysqltest.t9 to second_user@localhost
|
||||||
|
@ -699,7 +699,7 @@ select a from t1;
|
|||||||
flush query cache;
|
flush query cache;
|
||||||
|
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
set GLOBAL query_cache_size=1355776
|
set GLOBAL query_cache_size=1355776;
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -19,7 +19,7 @@ start slave;
|
|||||||
connection master;
|
connection master;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
--enable_warning
|
--enable_warnings
|
||||||
create table t1 (n int);
|
create table t1 (n int);
|
||||||
insert into t1 values (1);
|
insert into t1 values (1);
|
||||||
save_master_pos;
|
save_master_pos;
|
||||||
|
@ -39,6 +39,7 @@ SELECT * FROM t1 ORDER BY a,b;
|
|||||||
--echo **** On Master ****
|
--echo **** On Master ****
|
||||||
connection master;
|
connection master;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
let SERVER_VERSION=`select version()`;
|
||||||
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
|
--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/
|
||||||
--replace_result $SERVER_VERSION SERVER_VERSION
|
--replace_result $SERVER_VERSION SERVER_VERSION
|
||||||
SHOW BINLOG EVENTS;
|
SHOW BINLOG EVENTS;
|
||||||
|
1
mysql-test/t/show_check-master.opt
Normal file
1
mysql-test/t/show_check-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--log-slow-queries --log-long-format --log-queries-not-using-indexes
|
@ -501,7 +501,19 @@ SHOW TABLES FROM no_such_database;
|
|||||||
--error ER_NO_SUCH_TABLE
|
--error ER_NO_SUCH_TABLE
|
||||||
SHOW COLUMNS FROM no_such_table;
|
SHOW COLUMNS FROM no_such_table;
|
||||||
|
|
||||||
# End of 5.0 tests.
|
|
||||||
|
#
|
||||||
|
# Bug #19764: SHOW commands end up in the slow log as table scans
|
||||||
|
#
|
||||||
|
flush status;
|
||||||
|
show status like 'slow_queries';
|
||||||
|
show tables;
|
||||||
|
show status like 'slow_queries';
|
||||||
|
# Table scan query, to ensure that slow_queries does still get incremented
|
||||||
|
# (mysqld is started with --log-queries-not-using-indexes)
|
||||||
|
select 1 from information_schema.tables limit 1;
|
||||||
|
show status like 'slow_queries';
|
||||||
|
|
||||||
--echo End of 5.0 tests.
|
--echo End of 5.0 tests.
|
||||||
|
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
|
@ -319,7 +319,7 @@ begin
|
|||||||
declare x int;
|
declare x int;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
--error 1332
|
--error 1332
|
||||||
create procedure p()
|
create procedure p()
|
||||||
begin
|
begin
|
||||||
declare c condition for 1064;
|
declare c condition for 1064;
|
||||||
|
@ -2940,11 +2940,11 @@ begin
|
|||||||
end|
|
end|
|
||||||
--disable_parsing
|
--disable_parsing
|
||||||
--replace_regex /table_id: [0-9]+/table_id: #/
|
--replace_regex /table_id: [0-9]+/table_id: #/
|
||||||
show binlog events;
|
show binlog events|
|
||||||
show storage engines;
|
show storage engines|
|
||||||
show master status;
|
show master status|
|
||||||
show slave hosts;
|
show slave hosts|
|
||||||
show slave status;
|
show slave status|
|
||||||
--enable_parsing
|
--enable_parsing
|
||||||
|
|
||||||
call bug4902()|
|
call bug4902()|
|
||||||
|
@ -19,11 +19,11 @@ begin
|
|||||||
show grants for 'root'@'localhost';
|
show grants for 'root'@'localhost';
|
||||||
end|
|
end|
|
||||||
--disable_parsing
|
--disable_parsing
|
||||||
show binlog events;
|
show binlog events|
|
||||||
show storage engines;
|
show storage engines|
|
||||||
show master status;
|
show master status|
|
||||||
show slave hosts;
|
show slave hosts|
|
||||||
show slave status;
|
show slave status|
|
||||||
--enable_parsing
|
--enable_parsing
|
||||||
|
|
||||||
call bug4902()|
|
call bug4902()|
|
||||||
@ -110,7 +110,7 @@ flush status|
|
|||||||
flush query cache|
|
flush query cache|
|
||||||
delete from t1|
|
delete from t1|
|
||||||
drop procedure bug3583|
|
drop procedure bug3583|
|
||||||
drop table t1;
|
drop table t1|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#6807: Stored procedure crash if CREATE PROCEDURE ... KILL QUERY
|
# 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);
|
select (1,2,3) = (select * from t1);
|
||||||
-- error 1241
|
-- error 1241
|
||||||
select (select * from t1) = (1,2,3);
|
select (select * from t1) = (1,2,3);
|
||||||
drop table t1
|
drop table t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Item_int_with_ref check (BUG#10020)
|
# Item_int_with_ref check (BUG#10020)
|
||||||
|
@ -42,7 +42,7 @@ CREATE TABLE db (
|
|||||||
KEY User (User)
|
KEY User (User)
|
||||||
)
|
)
|
||||||
engine=MyISAM;
|
engine=MyISAM;
|
||||||
--enable-warnings
|
--enable_warnings
|
||||||
|
|
||||||
INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y');
|
INSERT INTO db VALUES ('%','test', '','Y','Y','Y','Y','Y','Y');
|
||||||
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y');
|
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y');
|
||||||
@ -60,7 +60,7 @@ CREATE TABLE host (
|
|||||||
PRIMARY KEY Host (Host,Db)
|
PRIMARY KEY Host (Host,Db)
|
||||||
)
|
)
|
||||||
engine=MyISAM;
|
engine=MyISAM;
|
||||||
--enable-warnings
|
--enable_warnings
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
CREATE TABLE user (
|
CREATE TABLE user (
|
||||||
@ -79,7 +79,7 @@ CREATE TABLE user (
|
|||||||
PRIMARY KEY Host (Host,User)
|
PRIMARY KEY Host (Host,User)
|
||||||
)
|
)
|
||||||
engine=MyISAM;
|
engine=MyISAM;
|
||||||
--enable-warnings
|
--enable_warnings
|
||||||
|
|
||||||
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y');
|
INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y');
|
||||||
INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N');
|
INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N');
|
||||||
|
@ -144,6 +144,8 @@ select @@version;
|
|||||||
--replace_column 1 #
|
--replace_column 1 #
|
||||||
select @@global.version;
|
select @@global.version;
|
||||||
|
|
||||||
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
# Bug #6598: problem with cast(NULL as signed integer);
|
# Bug #6598: problem with cast(NULL as signed integer);
|
||||||
#
|
#
|
||||||
|
|
||||||
@ -210,4 +212,10 @@ select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
|
|||||||
select @var;
|
select @var;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
#
|
||||||
|
# Bug#19024 - SHOW COUNT(*) WARNINGS not return Errors
|
||||||
|
#
|
||||||
|
--error 1064
|
||||||
|
insert into city 'blah';
|
||||||
|
SHOW COUNT(*) WARNINGS;
|
||||||
|
SHOW COUNT(*) ERRORS;
|
||||||
|
@ -55,7 +55,7 @@ select 2;
|
|||||||
select 3;
|
select 3;
|
||||||
# Disconnect so that we will not be confused by a future abort from this
|
# Disconnect so that we will not be confused by a future abort from this
|
||||||
# connection.
|
# connection.
|
||||||
disconnect default
|
disconnect default;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Do the same test as above on a TCP connection
|
# Do the same test as above on a TCP connection
|
||||||
|
@ -20,7 +20,7 @@ ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_m
|
|||||||
my_clock.c my_compress.c my_conio.c my_copy.c my_crc32.c my_create.c my_delete.c
|
my_clock.c my_compress.c my_conio.c my_copy.c my_crc32.c my_create.c my_delete.c
|
||||||
my_div.c my_error.c my_file.c my_fopen.c my_fstream.c my_gethostbyname.c
|
my_div.c my_error.c my_file.c my_fopen.c my_fstream.c my_gethostbyname.c
|
||||||
my_gethwaddr.c my_getopt.c my_getsystime.c my_getwd.c my_handler.c my_init.c
|
my_gethwaddr.c my_getopt.c my_getsystime.c my_getwd.c my_handler.c my_init.c
|
||||||
my_lib.c my_lock.c my_lockmem.c my_lread.c my_lwrite.c my_malloc.c my_messnc.c
|
my_lib.c my_lock.c my_lockmem.c my_malloc.c my_messnc.c
|
||||||
my_mkdir.c my_mmap.c my_net.c my_once.c my_open.c my_pread.c my_pthread.c
|
my_mkdir.c my_mmap.c my_net.c my_once.c my_open.c my_pread.c my_pthread.c
|
||||||
my_quick.c my_read.c my_realloc.c my_redel.c my_rename.c my_seek.c my_sleep.c
|
my_quick.c my_read.c my_realloc.c my_redel.c my_rename.c my_seek.c my_sleep.c
|
||||||
my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c my_wincond.c
|
my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c my_wincond.c
|
||||||
|
@ -43,7 +43,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
|
|||||||
tree.c trie.c list.c hash.c array.c string.c typelib.c \
|
tree.c trie.c list.c hash.c array.c string.c typelib.c \
|
||||||
my_copy.c my_append.c my_lib.c \
|
my_copy.c my_append.c my_lib.c \
|
||||||
my_delete.c my_rename.c my_redel.c \
|
my_delete.c my_rename.c my_redel.c \
|
||||||
my_chsize.c my_lread.c my_lwrite.c my_clock.c \
|
my_chsize.c my_clock.c \
|
||||||
my_quick.c my_lockmem.c my_static.c \
|
my_quick.c my_lockmem.c my_static.c \
|
||||||
my_sync.c my_getopt.c my_mkdir.c \
|
my_sync.c my_getopt.c my_mkdir.c \
|
||||||
default_modify.c default.c \
|
default_modify.c default.c \
|
||||||
|
@ -312,7 +312,7 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
|
|||||||
{
|
{
|
||||||
char *buf;
|
char *buf;
|
||||||
int fd;
|
int fd;
|
||||||
uint len;
|
uint len, tmp_len;
|
||||||
MY_STAT stat_info;
|
MY_STAT stat_info;
|
||||||
|
|
||||||
if (!my_stat(filename, &stat_info, MYF(myflags)) ||
|
if (!my_stat(filename, &stat_info, MYF(myflags)) ||
|
||||||
@ -321,12 +321,11 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
if ((fd=my_open(filename,O_RDONLY,myflags)) < 0)
|
if ((fd=my_open(filename,O_RDONLY,myflags)) < 0)
|
||||||
{
|
goto error;
|
||||||
my_free(buf,myflags);
|
tmp_len=my_read(fd, buf, len, myflags);
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
len=read(fd,buf,len);
|
|
||||||
my_close(fd,myflags);
|
my_close(fd,myflags);
|
||||||
|
if (tmp_len != len)
|
||||||
|
goto error;
|
||||||
|
|
||||||
if (my_parse_charset_xml(buf,len,add_collation))
|
if (my_parse_charset_xml(buf,len,add_collation))
|
||||||
{
|
{
|
||||||
@ -340,6 +339,10 @@ static my_bool my_read_charset_file(const char *filename, myf myflags)
|
|||||||
|
|
||||||
my_free(buf, myflags);
|
my_free(buf, myflags);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
error:
|
||||||
|
my_free(buf, myflags);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
rm -f .deps/* raid.o mf_iocache.o libmysys.a
|
rm -f .deps/* raid.o mf_iocache.o libmysys.a
|
||||||
ccc -DDEFAULT_BASEDIR="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DHAVE_CONFIG_H -I./../include -I../include -I.. -DDBUG_OFF -fast -O3 -fomit-frame-pointer -c array.c checksum.c default.c errors.c getopt.c getopt1.c getvar.c hash.c list.c mf_brkhant.c mf_cache.c mf_casecnv.c mf_dirname.c mf_fn_ext.c mf_format.c mf_getdate.c mf_keycache.c mf_loadpath.c mf_pack.c mf_pack2.c mf_path.c mf_qsort.c mf_qsort2.c mf_radix.c mf_reccache.c mf_same.c mf_sort.c mf_soundex.c mf_stripp.c mf_unixpath.c mf_wcomp.c mf_wfile.c mulalloc.c my_alarm.c my_alloc.c my_append.c my_chsize.c my_clock.c my_compress.c my_copy.c my_create.c my_delete.c my_div.c my_error.c my_fopen.c my_fstream.c my_getwd.c my_init.c my_lib.c my_lockmem.c my_lread.c my_lwrite.c my_malloc.c my_messnc.c my_mkdir.c my_net.c my_once.c my_open.c my_pread.c my_pthread.c my_quick.c my_read.c my_realloc.c my_redel.c my_rename.c my_seek.c my_static.c my_tempnam.c my_thr_init.c my_write.c ptr_cmp.c queues.c safemalloc.c string.c thr_alarm.c thr_lock.c thr_mutex.c thr_rwlock.c tree.c typelib.c
|
ccc -DDEFAULT_BASEDIR="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DHAVE_CONFIG_H -I./../include -I../include -I.. -DDBUG_OFF -fast -O3 -fomit-frame-pointer -c array.c checksum.c default.c errors.c getopt.c getopt1.c getvar.c hash.c list.c mf_brkhant.c mf_cache.c mf_casecnv.c mf_dirname.c mf_fn_ext.c mf_format.c mf_getdate.c mf_keycache.c mf_loadpath.c mf_pack.c mf_pack2.c mf_path.c mf_qsort.c mf_qsort2.c mf_radix.c mf_reccache.c mf_same.c mf_sort.c mf_soundex.c mf_stripp.c mf_unixpath.c mf_wcomp.c mf_wfile.c mulalloc.c my_alarm.c my_alloc.c my_append.c my_chsize.c my_clock.c my_compress.c my_copy.c my_create.c my_delete.c my_div.c my_error.c my_fopen.c my_fstream.c my_getwd.c my_init.c my_lib.c my_lockmem.c my_malloc.c my_messnc.c my_mkdir.c my_net.c my_once.c my_open.c my_pread.c my_pthread.c my_quick.c my_read.c my_realloc.c my_redel.c my_rename.c my_seek.c my_static.c my_tempnam.c my_thr_init.c my_write.c ptr_cmp.c queues.c safemalloc.c string.c thr_alarm.c thr_lock.c thr_mutex.c thr_rwlock.c tree.c typelib.c
|
||||||
make raid.o mf_iocache.o my_lock.o
|
make raid.o mf_iocache.o my_lock.o
|
||||||
ar -cr libmysys.a array.o raid.o mf_iocache.o my_lock.o
|
ar -cr libmysys.a array.o raid.o mf_iocache.o my_lock.o
|
||||||
|
@ -333,7 +333,11 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
|
|||||||
{
|
{
|
||||||
info->read_end=info->write_pos;
|
info->read_end=info->write_pos;
|
||||||
info->end_of_file=my_b_tell(info);
|
info->end_of_file=my_b_tell(info);
|
||||||
info->seek_not_done=1;
|
/*
|
||||||
|
Trigger a new seek only if we have a valid
|
||||||
|
file handle.
|
||||||
|
*/
|
||||||
|
info->seek_not_done= (info->file != -1);
|
||||||
}
|
}
|
||||||
else if (type == WRITE_CACHE)
|
else if (type == WRITE_CACHE)
|
||||||
{
|
{
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
/* Copyright (C) 2000 MySQL AB
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
||||||
|
|
||||||
#include "mysys_priv.h"
|
|
||||||
#include "mysys_err.h"
|
|
||||||
|
|
||||||
/* Read a chunk of bytes from a file */
|
|
||||||
|
|
||||||
uint32 my_lread(int Filedes, byte *Buffer, uint32 Count, myf MyFlags)
|
|
||||||
/* File descriptor */
|
|
||||||
/* Buffer must be at least count bytes */
|
|
||||||
/* Max number of bytes returnd */
|
|
||||||
/* Flags on what to do on error */
|
|
||||||
{
|
|
||||||
uint32 readbytes;
|
|
||||||
DBUG_ENTER("my_lread");
|
|
||||||
DBUG_PRINT("my",("Fd: %d Buffer: %ld Count: %ld MyFlags: %d",
|
|
||||||
Filedes, Buffer, Count, MyFlags));
|
|
||||||
|
|
||||||
/* Temp hack to get count to int32 while read wants int */
|
|
||||||
if ((readbytes = (uint32) read(Filedes, Buffer, (uint) Count)) != Count)
|
|
||||||
{
|
|
||||||
my_errno=errno;
|
|
||||||
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
|
||||||
{
|
|
||||||
if (readbytes == MY_FILE_ERROR)
|
|
||||||
my_error(EE_READ, MYF(ME_BELL+ME_WAITTANG),
|
|
||||||
my_filename(Filedes),errno);
|
|
||||||
else
|
|
||||||
if (MyFlags & (MY_NABP | MY_FNABP))
|
|
||||||
my_error(EE_EOFERR, MYF(ME_BELL+ME_WAITTANG),
|
|
||||||
my_filename(Filedes),errno);
|
|
||||||
}
|
|
||||||
if (readbytes == MY_FILE_ERROR || MyFlags & (MY_NABP | MY_FNABP))
|
|
||||||
DBUG_RETURN((uint32) -1); /* Return med felkod */
|
|
||||||
}
|
|
||||||
if (MyFlags & (MY_NABP | MY_FNABP))
|
|
||||||
DBUG_RETURN(0); /* Ok vid l{sning */
|
|
||||||
DBUG_RETURN(readbytes);
|
|
||||||
} /* my_lread */
|
|
@ -1,46 +0,0 @@
|
|||||||
/* Copyright (C) 2000 MySQL AB
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
||||||
|
|
||||||
#include "mysys_priv.h"
|
|
||||||
#include "mysys_err.h"
|
|
||||||
|
|
||||||
/* Write a chunk of bytes to a file */
|
|
||||||
|
|
||||||
uint32 my_lwrite(int Filedes, const byte *Buffer, uint32 Count, myf MyFlags)
|
|
||||||
{
|
|
||||||
uint32 writenbytes;
|
|
||||||
DBUG_ENTER("my_lwrite");
|
|
||||||
DBUG_PRINT("my",("Fd: %d Buffer: 0x%lx Count: %ld MyFlags: %d",
|
|
||||||
Filedes, Buffer, Count, MyFlags));
|
|
||||||
|
|
||||||
/* Temp hack to get count to int32 while write wants int */
|
|
||||||
if ((writenbytes = (uint32) write(Filedes, Buffer, (uint) Count)) != Count)
|
|
||||||
{
|
|
||||||
my_errno=errno;
|
|
||||||
if (writenbytes == (uint32) -1 || MyFlags & (MY_NABP | MY_FNABP))
|
|
||||||
{
|
|
||||||
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
|
||||||
{
|
|
||||||
my_error(EE_WRITE, MYF(ME_BELL+ME_WAITTANG),
|
|
||||||
my_filename(Filedes),errno);
|
|
||||||
}
|
|
||||||
DBUG_RETURN((uint32) -1); /* Return med felkod */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (MyFlags & (MY_NABP | MY_FNABP))
|
|
||||||
DBUG_RETURN(0); /* Ok vid l{sning */
|
|
||||||
DBUG_RETURN(writenbytes);
|
|
||||||
} /* my_lwrite */
|
|
@ -75,8 +75,12 @@ uint my_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
|
|||||||
DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
|
DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
|
||||||
readbytes,Count,Filedes,my_errno));
|
readbytes,Count,Filedes,my_errno));
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
if (readbytes == 0 && errno == EINTR)
|
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
|
||||||
continue; /* Interrupted */
|
{
|
||||||
|
DBUG_PRINT("debug", ("my_pread() was interrupted and returned %d",
|
||||||
|
(int) readbytes));
|
||||||
|
continue; /* Interrupted */
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
||||||
{
|
{
|
||||||
@ -170,8 +174,8 @@ uint my_pwrite(int Filedes, const byte *Buffer, uint Count, my_off_t offset,
|
|||||||
VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
|
VOID(sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((writenbytes == 0 && my_errno == EINTR) ||
|
if ((writenbytes > 0 && (uint) writenbytes != (uint) -1) ||
|
||||||
(writenbytes > 0 && (uint) writenbytes != (uint) -1))
|
my_errno == EINTR)
|
||||||
continue; /* Retry */
|
continue; /* Retry */
|
||||||
#endif
|
#endif
|
||||||
if (MyFlags & (MY_NABP | MY_FNABP))
|
if (MyFlags & (MY_NABP | MY_FNABP))
|
||||||
|
@ -26,6 +26,14 @@ uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf MyFlags)
|
|||||||
|
|
||||||
if ((readbytes = (uint) read(Filedes, Buffer, Count)) != Count)
|
if ((readbytes = (uint) read(Filedes, Buffer, Count)) != Count)
|
||||||
{
|
{
|
||||||
|
#ifndef DBUG_OFF
|
||||||
|
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
|
||||||
|
{
|
||||||
|
DBUG_PRINT("error", ("my_quick_read() was interrupted and returned %d"
|
||||||
|
". This function does not retry the read!",
|
||||||
|
(int) readbytes));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
my_errno=errno;
|
my_errno=errno;
|
||||||
return readbytes;
|
return readbytes;
|
||||||
}
|
}
|
||||||
@ -35,8 +43,24 @@ uint my_quick_read(File Filedes,byte *Buffer,uint Count,myf MyFlags)
|
|||||||
|
|
||||||
uint my_quick_write(File Filedes,const byte *Buffer,uint Count)
|
uint my_quick_write(File Filedes,const byte *Buffer,uint Count)
|
||||||
{
|
{
|
||||||
if ((uint) write(Filedes,Buffer,Count) != Count)
|
#ifndef DBUG_OFF
|
||||||
|
uint writtenbytes;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if ((
|
||||||
|
#ifndef DBUG_OFF
|
||||||
|
writtenbytes =
|
||||||
|
#endif
|
||||||
|
(uint) write(Filedes,Buffer,Count)) != Count)
|
||||||
{
|
{
|
||||||
|
#ifndef DBUG_OFF
|
||||||
|
if ((writtenbytes == 0 || (int) writtenbytes == -1) && errno == EINTR)
|
||||||
|
{
|
||||||
|
DBUG_PRINT("error", ("my_quick_write() was interrupted and returned %d"
|
||||||
|
". This function does not retry the write!",
|
||||||
|
(int) writtenbytes));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
my_errno=errno;
|
my_errno=errno;
|
||||||
return (uint) -1;
|
return (uint) -1;
|
||||||
}
|
}
|
||||||
|
@ -51,10 +51,11 @@ uint my_read(File Filedes, byte *Buffer, uint Count, myf MyFlags)
|
|||||||
DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
|
DBUG_PRINT("warning",("Read only %ld bytes off %ld from %d, errno: %d",
|
||||||
readbytes, Count, Filedes, my_errno));
|
readbytes, Count, Filedes, my_errno));
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
if ((int) readbytes <= 0 && errno == EINTR)
|
if ((readbytes == 0 || (int) readbytes == -1) && errno == EINTR)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("debug", ("my_read() was interrupted and returned %d", (int) readbytes));
|
DBUG_PRINT("debug", ("my_read() was interrupted and returned %d",
|
||||||
continue; /* Interrupted */
|
(int) readbytes));
|
||||||
|
continue; /* Interrupted */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
if (MyFlags & (MY_WME | MY_FAE | MY_FNABP))
|
||||||
|
@ -29,8 +29,13 @@ my_off_t my_seek(File fd, my_off_t pos, int whence,
|
|||||||
whence, MyFlags));
|
whence, MyFlags));
|
||||||
DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */
|
DBUG_ASSERT(pos != MY_FILEPOS_ERROR); /* safety check */
|
||||||
|
|
||||||
if (-1 != fd)
|
/*
|
||||||
newpos=lseek(fd, pos, whence);
|
Make sure we are using a valid file descriptor!
|
||||||
|
*/
|
||||||
|
DBUG_ASSERT(fd != -1);
|
||||||
|
|
||||||
|
newpos= lseek(fd, pos, whence);
|
||||||
|
|
||||||
if (newpos == (os_off_t) -1)
|
if (newpos == (os_off_t) -1)
|
||||||
{
|
{
|
||||||
my_errno=errno;
|
my_errno=errno;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user