mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint_20061016
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
This commit is contained in:
@ -890,7 +890,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
|
|||||||
die(NullS);
|
die(NullS);
|
||||||
if (!eval_result && (uint) stat_info.st_size != ds->length)
|
if (!eval_result && (uint) stat_info.st_size != ds->length)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info",("Size differs: result size: %u file size: %u",
|
DBUG_PRINT("info",("Size differs: result size: %u file size: %llu",
|
||||||
ds->length, stat_info.st_size));
|
ds->length, stat_info.st_size));
|
||||||
DBUG_PRINT("info",("result: '%s'", ds->str));
|
DBUG_PRINT("info",("result: '%s'", ds->str));
|
||||||
DBUG_RETURN(RESULT_LENGTH_MISMATCH);
|
DBUG_RETURN(RESULT_LENGTH_MISMATCH);
|
||||||
@ -1810,7 +1810,7 @@ void my_ungetc(int c)
|
|||||||
void read_until_delimiter(DYNAMIC_STRING *ds,
|
void read_until_delimiter(DYNAMIC_STRING *ds,
|
||||||
DYNAMIC_STRING *ds_delimiter)
|
DYNAMIC_STRING *ds_delimiter)
|
||||||
{
|
{
|
||||||
int c;
|
char c;
|
||||||
DBUG_ENTER("read_until_delimiter");
|
DBUG_ENTER("read_until_delimiter");
|
||||||
DBUG_PRINT("enter", ("delimiter: %s, length: %d",
|
DBUG_PRINT("enter", ("delimiter: %s, length: %d",
|
||||||
ds_delimiter->str, ds_delimiter->length));
|
ds_delimiter->str, ds_delimiter->length));
|
||||||
@ -2558,7 +2558,7 @@ void do_get_errcodes(struct st_command *command)
|
|||||||
|
|
||||||
*to_ptr= 0;
|
*to_ptr= 0;
|
||||||
to->type= ERR_SQLSTATE;
|
to->type= ERR_SQLSTATE;
|
||||||
DBUG_PRINT("info", ("ERR_SQLSTATE: %d", to->code.sqlstate));
|
DBUG_PRINT("info", ("ERR_SQLSTATE: %s", to->code.sqlstate));
|
||||||
}
|
}
|
||||||
else if (*p == 's')
|
else if (*p == 's')
|
||||||
{
|
{
|
||||||
@ -3346,7 +3346,7 @@ int read_line(char *buf, int size)
|
|||||||
LINT_INIT(last_quote);
|
LINT_INIT(last_quote);
|
||||||
|
|
||||||
start_lineno= cur_file->lineno;
|
start_lineno= cur_file->lineno;
|
||||||
DBUG_PRINT("info", ("start_lineno: %d", start_lineno));
|
DBUG_PRINT("info", ("Starting to read at lineno: %d", start_lineno));
|
||||||
for (; p < buf_end ;)
|
for (; p < buf_end ;)
|
||||||
{
|
{
|
||||||
skip_char= 0;
|
skip_char= 0;
|
||||||
@ -3370,7 +3370,7 @@ int read_line(char *buf, int size)
|
|||||||
die("Missing end of block");
|
die("Missing end of block");
|
||||||
|
|
||||||
*p= 0;
|
*p= 0;
|
||||||
DBUG_PRINT("info", ("end of file"));
|
DBUG_PRINT("info", ("end of file at line %d", cur_file->lineno));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
cur_file--;
|
cur_file--;
|
||||||
@ -3393,17 +3393,21 @@ int read_line(char *buf, int size)
|
|||||||
if (end_of_query(c))
|
if (end_of_query(c))
|
||||||
{
|
{
|
||||||
*p= 0;
|
*p= 0;
|
||||||
DBUG_PRINT("exit", ("Found delimiter '%s'", delimiter));
|
DBUG_PRINT("exit", ("Found delimiter '%s' at line %d",
|
||||||
|
delimiter, cur_file->lineno));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
else if ((c == '{' &&
|
else if ((c == '{' &&
|
||||||
(!strncasecmp(buf, "while", min(5, p - buf)) ||
|
(!my_strnncoll_simple(charset_info, "while", 5,
|
||||||
!strncasecmp(buf, "if", min(2, p - buf)))))
|
buf, min(5, p - buf), 0) ||
|
||||||
|
!my_strnncoll_simple(charset_info, "if", 2,
|
||||||
|
buf, min(2, p - buf), 0))))
|
||||||
{
|
{
|
||||||
/* Only if and while commands can be terminated by { */
|
/* Only if and while commands can be terminated by { */
|
||||||
*p++= c;
|
*p++= c;
|
||||||
*p= 0;
|
*p= 0;
|
||||||
DBUG_PRINT("exit", ("Found '{' indicating begining of block"));
|
DBUG_PRINT("exit", ("Found '{' indicating start of block at line %d",
|
||||||
|
cur_file->lineno));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
else if (c == '\'' || c == '"' || c == '`')
|
else if (c == '\'' || c == '"' || c == '`')
|
||||||
@ -3418,7 +3422,8 @@ int read_line(char *buf, int size)
|
|||||||
{
|
{
|
||||||
/* Comments are terminated by newline */
|
/* Comments are terminated by newline */
|
||||||
*p= 0;
|
*p= 0;
|
||||||
DBUG_PRINT("exit", ("Found newline in comment"));
|
DBUG_PRINT("exit", ("Found newline in comment at line: %d",
|
||||||
|
cur_file->lineno));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -3433,13 +3438,19 @@ int read_line(char *buf, int size)
|
|||||||
{
|
{
|
||||||
/* Skip all space at begining of line */
|
/* Skip all space at begining of line */
|
||||||
if (c == '\n')
|
if (c == '\n')
|
||||||
start_lineno= cur_file->lineno; /* Query hasn't started yet */
|
{
|
||||||
|
/* Query hasn't started yet */
|
||||||
|
start_lineno= cur_file->lineno;
|
||||||
|
DBUG_PRINT("info", ("Query hasn't started yet, start_lineno: %d",
|
||||||
|
start_lineno));
|
||||||
|
}
|
||||||
skip_char= 1;
|
skip_char= 1;
|
||||||
}
|
}
|
||||||
else if (end_of_query(c))
|
else if (end_of_query(c))
|
||||||
{
|
{
|
||||||
*p= 0;
|
*p= 0;
|
||||||
DBUG_PRINT("exit", ("Found delimiter '%s'", delimiter));
|
DBUG_PRINT("exit", ("Found delimiter '%s' at line: %d",
|
||||||
|
delimiter, cur_file->lineno));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
else if (c == '}')
|
else if (c == '}')
|
||||||
@ -3447,7 +3458,8 @@ int read_line(char *buf, int size)
|
|||||||
/* A "}" need to be by itself in the begining of a line to terminate */
|
/* A "}" need to be by itself in the begining of a line to terminate */
|
||||||
*p++= c;
|
*p++= c;
|
||||||
*p= 0;
|
*p= 0;
|
||||||
DBUG_PRINT("exit", ("Found '}' in begining of a line"));
|
DBUG_PRINT("exit", ("Found '}' in begining of a line at line: %d",
|
||||||
|
cur_file->lineno));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
else if (c == '\'' || c == '"' || c == '`')
|
else if (c == '\'' || c == '"' || c == '`')
|
||||||
@ -4317,7 +4329,7 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
|
|||||||
bind[i].is_null= &is_null[i];
|
bind[i].is_null= &is_null[i];
|
||||||
bind[i].length= &length[i];
|
bind[i].length= &length[i];
|
||||||
|
|
||||||
DBUG_PRINT("bind", ("col[%d]: buffer_type: %d, buffer_length: %d",
|
DBUG_PRINT("bind", ("col[%d]: buffer_type: %d, buffer_length: %lu",
|
||||||
i, bind[i].buffer_type, bind[i].buffer_length));
|
i, bind[i].buffer_type, bind[i].buffer_length));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7267,5 +7279,3 @@ void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val)
|
|||||||
char *end= longlong10_to_str(val, buff, 10);
|
char *end= longlong10_to_str(val, buff, 10);
|
||||||
replace_dynstr_append_mem(ds, buff, end - buff);
|
replace_dynstr_append_mem(ds, buff, end - buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,8 @@ extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
|
|||||||
extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
|
extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
|
||||||
uint *_slevel_);
|
uint *_slevel_);
|
||||||
extern void _db_pargs_(uint _line_,const char *keyword);
|
extern void _db_pargs_(uint _line_,const char *keyword);
|
||||||
extern void _db_doprnt_ _VARARGS((const char *format,...));
|
extern void _db_doprnt_ _VARARGS((const char *format,...))
|
||||||
|
ATTRIBUTE_FORMAT(printf, 1, 2);
|
||||||
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
|
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
|
||||||
uint length);
|
uint length);
|
||||||
extern void _db_end_(void);
|
extern void _db_end_(void);
|
||||||
|
@ -153,6 +153,26 @@ INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
|
|||||||
SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2);
|
SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND `id3` = 2);
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #22728 - Handler_rollback value is growing
|
||||||
|
#
|
||||||
|
flush status;
|
||||||
|
create table t1 (c1 int) engine=innodb;
|
||||||
|
connect (con1,localhost,root,,);
|
||||||
|
connect (con2,localhost,root,,);
|
||||||
|
connection con2;
|
||||||
|
handler t1 open;
|
||||||
|
handler t1 read first;
|
||||||
|
disconnect con2;
|
||||||
|
connection con1;
|
||||||
|
show /*!50002 GLOBAL */ status like 'Handler_rollback';
|
||||||
|
connection default;
|
||||||
|
drop table t1;
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
|
--echo End of 4.1 tests
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #12882 min/max inconsistent on empty table
|
# Bug #12882 min/max inconsistent on empty table
|
||||||
#
|
#
|
||||||
|
@ -575,8 +575,6 @@ sub mtr_options_from_test_file($$) {
|
|||||||
|
|
||||||
while ( my $line= <$F> )
|
while ( my $line= <$F> )
|
||||||
{
|
{
|
||||||
next if ( $line !~ /^--/ );
|
|
||||||
|
|
||||||
# Match this line against tag in "tags" array
|
# Match this line against tag in "tags" array
|
||||||
foreach my $tag (@tags)
|
foreach my $tag (@tags)
|
||||||
{
|
{
|
||||||
@ -588,14 +586,21 @@ sub mtr_options_from_test_file($$) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# If test sources another file, open it as well
|
# If test sources another file, open it as well
|
||||||
if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ )
|
if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ or
|
||||||
|
$line =~ /^([[:space:]]*)source(.*);$/ )
|
||||||
{
|
{
|
||||||
my $value= $2;
|
my $value= $2;
|
||||||
$value =~ s/^\s+//; # Remove leading space
|
$value =~ s/^\s+//; # Remove leading space
|
||||||
$value =~ s/[[:space:]]+$//; # Remove ending space
|
$value =~ s/[[:space:]]+$//; # Remove ending space
|
||||||
|
|
||||||
my $sourced_file= "$::glob_mysql_test_dir/$value";
|
my $sourced_file= "$::glob_mysql_test_dir/$value";
|
||||||
mtr_options_from_test_file($tinfo, $sourced_file);
|
if ( -f $sourced_file )
|
||||||
|
{
|
||||||
|
# Only source the file if it exists, we may get
|
||||||
|
# false positives in the regexes above if someone
|
||||||
|
# writes "source nnnn;" in a test case(such as mysqltest.test)
|
||||||
|
mtr_options_from_test_file($tinfo, $sourced_file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,7 @@ sub mtr_report_test_failed ($) {
|
|||||||
if ( $tinfo->{'timeout'} )
|
if ( $tinfo->{'timeout'} )
|
||||||
{
|
{
|
||||||
print "[ fail ] timeout\n";
|
print "[ fail ] timeout\n";
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
|
elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
|
||||||
{
|
{
|
||||||
|
@ -468,11 +468,11 @@ sub initial_setup () {
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Look for the path where to find the client binaries
|
# Look for the path where to find the client binaries
|
||||||
$path_client_bindir= mtr_path_exists("$glob_basedir/client/release",
|
$path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
|
||||||
|
"$glob_basedir/client_debug",
|
||||||
|
"$glob_basedir/client/release",
|
||||||
"$glob_basedir/client/debug",
|
"$glob_basedir/client/debug",
|
||||||
"$glob_basedir/client",
|
"$glob_basedir/client",
|
||||||
"$glob_basedir/client_release",
|
|
||||||
"$glob_basedir/client_debug",
|
|
||||||
"$glob_basedir/bin");
|
"$glob_basedir/bin");
|
||||||
|
|
||||||
# Look for the mysqld executable
|
# Look for the mysqld executable
|
||||||
@ -484,6 +484,7 @@ sub initial_setup () {
|
|||||||
"$path_client_bindir/mysqld-debug",
|
"$path_client_bindir/mysqld-debug",
|
||||||
"$path_client_bindir/mysqld-max",
|
"$path_client_bindir/mysqld-max",
|
||||||
"$glob_basedir/libexec/mysqld",
|
"$glob_basedir/libexec/mysqld",
|
||||||
|
"$glob_basedir/bin/mysqld",
|
||||||
"$glob_basedir/sql/release/mysqld",
|
"$glob_basedir/sql/release/mysqld",
|
||||||
"$glob_basedir/sql/debug/mysqld");
|
"$glob_basedir/sql/debug/mysqld");
|
||||||
|
|
||||||
@ -1386,11 +1387,14 @@ sub executable_setup () {
|
|||||||
mtr_exe_exists("$ndb_path/src/kernel/ndbd",
|
mtr_exe_exists("$ndb_path/src/kernel/ndbd",
|
||||||
"$glob_basedir/bin/ndbd");
|
"$glob_basedir/bin/ndbd");
|
||||||
|
|
||||||
$path_ndb_examples_dir=
|
if ( $mysql_version_id >= 50000 )
|
||||||
mtr_path_exists("$ndb_path/ndbapi-examples",
|
{
|
||||||
"$ndb_path/examples");
|
$path_ndb_examples_dir=
|
||||||
$exe_ndb_example=
|
mtr_path_exists("$ndb_path/ndbapi-examples",
|
||||||
mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
|
"$ndb_path/examples");
|
||||||
|
$exe_ndb_example=
|
||||||
|
mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Look for the udf_example library
|
# Look for the udf_example library
|
||||||
@ -1413,18 +1417,27 @@ sub executable_setup () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Look for mysql_client_test executable
|
if ( $glob_win32 and $mysql_version_id < 50000 )
|
||||||
if ( $glob_use_embedded_server )
|
|
||||||
{
|
{
|
||||||
$exe_mysql_client_test=
|
# Skip looking for exe_mysql_client_test as its not built by default
|
||||||
mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded");
|
# in 4.1 for windows.
|
||||||
|
$exe_mysql_client_test= "unavailable";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$exe_mysql_client_test=
|
# Look for mysql_client_test executable
|
||||||
mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
|
if ( $glob_use_embedded_server )
|
||||||
"$glob_basedir/tests/release/mysql_client_test",
|
{
|
||||||
"$glob_basedir/tests/debug/mysql_client_test");
|
$exe_mysql_client_test=
|
||||||
|
mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$exe_mysql_client_test=
|
||||||
|
mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
|
||||||
|
"$glob_basedir/tests/release/mysql_client_test",
|
||||||
|
"$glob_basedir/tests/debug/mysql_client_test");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1548,8 +1561,11 @@ sub environment_setup () {
|
|||||||
$ENV{'NDB_TOOLS_OUTPUT'}= $path_ndb_testrun_log;
|
$ENV{'NDB_TOOLS_OUTPUT'}= $path_ndb_testrun_log;
|
||||||
$ENV{'NDB_CONNECTSTRING'}= $opt_ndbconnectstring;
|
$ENV{'NDB_CONNECTSTRING'}= $opt_ndbconnectstring;
|
||||||
|
|
||||||
$ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir;
|
if ( $mysql_version_id >= 50000 )
|
||||||
$ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example;
|
{
|
||||||
|
$ENV{'NDB_EXAMPLES_DIR'}= $path_ndb_examples_dir;
|
||||||
|
$ENV{'MY_NDB_EXAMPLES_BINARY'}= $exe_ndb_example;
|
||||||
|
}
|
||||||
$ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
|
$ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2809,6 +2825,33 @@ sub do_after_run_mysqltest($)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub find_testcase_skipped_reason($)
|
||||||
|
{
|
||||||
|
my ($tinfo)= @_;
|
||||||
|
|
||||||
|
# Open mysqltest.log
|
||||||
|
my $F= IO::File->new($path_timefile) or
|
||||||
|
mtr_error("can't open file \"$path_timefile\": $!");
|
||||||
|
my $reason;
|
||||||
|
|
||||||
|
while ( my $line= <$F> )
|
||||||
|
{
|
||||||
|
# Look for "reason: <reason fo skiping test>"
|
||||||
|
if ( $line =~ /reason: (.*)/ )
|
||||||
|
{
|
||||||
|
$reason= $1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! $reason )
|
||||||
|
{
|
||||||
|
mtr_warning("Could not find reason for skipping test in $path_timefile");
|
||||||
|
$reason= "Detected by testcase(reason unknown) ";
|
||||||
|
}
|
||||||
|
$tinfo->{'comment'}= $reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Run a single test case
|
# Run a single test case
|
||||||
@ -2881,10 +2924,7 @@ sub run_testcase ($) {
|
|||||||
# Testcase itself tell us to skip this one
|
# Testcase itself tell us to skip this one
|
||||||
|
|
||||||
# Try to get reason from mysqltest.log
|
# Try to get reason from mysqltest.log
|
||||||
my $last_line= mtr_lastlinefromfile($path_timefile) if -f $path_timefile;
|
find_testcase_skipped_reason($tinfo);
|
||||||
my $reason= mtr_match_prefix($last_line, "reason: ");
|
|
||||||
$tinfo->{'comment'}=
|
|
||||||
defined $reason ? $reason : "Detected by testcase(reason unknown) ";
|
|
||||||
mtr_report_test_skipped($tinfo);
|
mtr_report_test_skipped($tinfo);
|
||||||
}
|
}
|
||||||
elsif ( $res == 63 )
|
elsif ( $res == 63 )
|
||||||
|
@ -991,6 +991,18 @@ SEC_TO_TIME(CAST(-1 AS UNSIGNED))
|
|||||||
838:59:59
|
838:59:59
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect time value: '18446744073709551615'
|
Warning 1292 Truncated incorrect time value: '18446744073709551615'
|
||||||
|
SET NAMES latin1;
|
||||||
|
SET character_set_results = NULL;
|
||||||
|
SHOW VARIABLES LIKE 'character_set_results';
|
||||||
|
Variable_name Value
|
||||||
|
character_set_results
|
||||||
|
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
|
||||||
|
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
|
||||||
|
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
|
||||||
|
fmtddate field2
|
||||||
|
Sep-4 12:00AM abcd
|
||||||
|
DROP TABLE testBug8868;
|
||||||
|
SET NAMES DEFAULT;
|
||||||
(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);
|
||||||
|
@ -111,6 +111,16 @@ SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` =
|
|||||||
id1
|
id1
|
||||||
2
|
2
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
flush status;
|
||||||
|
create table t1 (c1 int) engine=innodb;
|
||||||
|
handler t1 open;
|
||||||
|
handler t1 read first;
|
||||||
|
c1
|
||||||
|
show /*!50002 GLOBAL */ status like 'Handler_rollback';
|
||||||
|
Variable_name Value
|
||||||
|
Handler_rollback 0
|
||||||
|
drop table t1;
|
||||||
|
End of 4.1 tests
|
||||||
create table t1m (a int) engine = MEMORY;
|
create table t1m (a int) engine = MEMORY;
|
||||||
create table t1i (a int);
|
create table t1i (a int);
|
||||||
create table t2m (a int) engine = MEMORY;
|
create table t2m (a int) engine = MEMORY;
|
||||||
|
@ -1980,7 +1980,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI
|
|||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set sql_mode='strict_all_tables';
|
set sql_mode='strict_all_tables';
|
||||||
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL) ENGINE = INNODB;
|
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL);
|
||||||
CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1;
|
CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1;
|
||||||
CREATE VIEW v2 (vcol1) AS SELECT col1 FROM t1 WHERE col2 > 2;
|
CREATE VIEW v2 (vcol1) AS SELECT col1 FROM t1 WHERE col2 > 2;
|
||||||
INSERT INTO t1 (col1) VALUES(12);
|
INSERT INTO t1 (col1) VALUES(12);
|
||||||
@ -2032,7 +2032,7 @@ f3 f1
|
|||||||
1 3
|
1 3
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (f1 char) ENGINE = innodb;
|
CREATE TABLE t1 (f1 char);
|
||||||
INSERT INTO t1 VALUES ('A');
|
INSERT INTO t1 VALUES ('A');
|
||||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||||
INSERT INTO t1 VALUES('B');
|
INSERT INTO t1 VALUES('B');
|
||||||
|
@ -446,25 +446,6 @@ create table t1 select now() - now(), curtime() - curtime(),
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
#
|
|
||||||
# 21913: DATE_FORMAT() Crashes mysql server if I use it through
|
|
||||||
# mysql-connector-j driver.
|
|
||||||
#
|
|
||||||
|
|
||||||
SET NAMES latin1;
|
|
||||||
SET character_set_results = NULL;
|
|
||||||
SHOW VARIABLES LIKE 'character_set_results';
|
|
||||||
|
|
||||||
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
|
|
||||||
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
|
|
||||||
|
|
||||||
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
|
|
||||||
|
|
||||||
DROP TABLE testBug8868;
|
|
||||||
|
|
||||||
SET NAMES DEFAULT;
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #11655: Wrong time is returning from nested selects - maximum time exists
|
# Bug #11655: Wrong time is returning from nested selects - maximum time exists
|
||||||
#
|
#
|
||||||
@ -507,6 +488,26 @@ DROP TABLE t1;
|
|||||||
#
|
#
|
||||||
# check if SEC_TO_TIME() handles BIGINT UNSIGNED values correctly
|
# check if SEC_TO_TIME() handles BIGINT UNSIGNED values correctly
|
||||||
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
|
SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
|
||||||
|
|
||||||
|
#
|
||||||
|
# 21913: DATE_FORMAT() Crashes mysql server if I use it through
|
||||||
|
# mysql-connector-j driver.
|
||||||
|
#
|
||||||
|
|
||||||
|
SET NAMES latin1;
|
||||||
|
SET character_set_results = NULL;
|
||||||
|
SHOW VARIABLES LIKE 'character_set_results';
|
||||||
|
|
||||||
|
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
|
||||||
|
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
|
||||||
|
|
||||||
|
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
|
||||||
|
|
||||||
|
DROP TABLE testBug8868;
|
||||||
|
|
||||||
|
SET NAMES DEFAULT;
|
||||||
|
|
||||||
|
#
|
||||||
# Bug #19844 time_format in Union truncates values
|
# Bug #19844 time_format in Union truncates values
|
||||||
#
|
#
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
--loose-to-force-a-restart
|
--force-restart
|
||||||
|
1
mysql-test/t/rpl_empty_master_crash-master.opt
Normal file
1
mysql-test/t/rpl_empty_master_crash-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--force-restart
|
@ -1801,9 +1801,7 @@ drop table t1;
|
|||||||
# underlying tables (BUG#6443)
|
# underlying tables (BUG#6443)
|
||||||
#
|
#
|
||||||
set sql_mode='strict_all_tables';
|
set sql_mode='strict_all_tables';
|
||||||
--disable_warnings
|
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL);
|
||||||
CREATE TABLE t1 (col1 INT NOT NULL, col2 INT NOT NULL) ENGINE = INNODB;
|
|
||||||
--enable_warnings
|
|
||||||
CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1;
|
CREATE VIEW v1 (vcol1) AS SELECT col1 FROM t1;
|
||||||
CREATE VIEW v2 (vcol1) AS SELECT col1 FROM t1 WHERE col2 > 2;
|
CREATE VIEW v2 (vcol1) AS SELECT col1 FROM t1 WHERE col2 > 2;
|
||||||
-- error 1364
|
-- error 1364
|
||||||
@ -1859,9 +1857,7 @@ drop table t1;
|
|||||||
#
|
#
|
||||||
# Test for bug #11771: wrong query_id in SELECT * FROM <view>
|
# Test for bug #11771: wrong query_id in SELECT * FROM <view>
|
||||||
#
|
#
|
||||||
--disable_warnings
|
CREATE TABLE t1 (f1 char);
|
||||||
CREATE TABLE t1 (f1 char) ENGINE = innodb;
|
|
||||||
--enable_warnings
|
|
||||||
INSERT INTO t1 VALUES ('A');
|
INSERT INTO t1 VALUES ('A');
|
||||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@ if test -e "Makefile"; then make -k clean; fi
|
|||||||
rm -f */.deps/*.P
|
rm -f */.deps/*.P
|
||||||
rm -rf Makefile.in.bk
|
rm -rf Makefile.in.bk
|
||||||
|
|
||||||
# Metrowerks enviornment
|
# Setup Metrowerks environment
|
||||||
. $path/mwenv
|
. $path/mwenv
|
||||||
|
|
||||||
# run auto tools
|
# Run autotools(use BUILD/autorun.sh)
|
||||||
. $path/compile-AUTOTOOLS
|
. BUILD/autorun.sh
|
||||||
|
|
||||||
# configure
|
# configure
|
||||||
./configure $base_configs $extra_configs
|
./configure $base_configs $extra_configs
|
||||||
|
@ -4855,7 +4855,7 @@ end_with_restore_list:
|
|||||||
{
|
{
|
||||||
if (end_active_trans(thd))
|
if (end_active_trans(thd))
|
||||||
goto error;
|
goto error;
|
||||||
/* Conditionally writes to binlog. */
|
|
||||||
res= mysql_create_view(thd, first_table, thd->lex->create_view_mode);
|
res= mysql_create_view(thd, first_table, thd->lex->create_view_mode);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -577,7 +577,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views,
|
|||||||
List_iterator_fast<LEX_STRING> names(lex->view_list);
|
List_iterator_fast<LEX_STRING> names(lex->view_list);
|
||||||
LEX_STRING *name;
|
LEX_STRING *name;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i= 0; name= names++; i++)
|
for (i= 0; name= names++; i++)
|
||||||
{
|
{
|
||||||
buff.append(i ? ", " : "(");
|
buff.append(i ? ", " : "(");
|
||||||
@ -1417,7 +1417,6 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
|
|||||||
query_cache_invalidate3(thd, view, 0);
|
query_cache_invalidate3(thd, view, 0);
|
||||||
sp_cache_invalidate();
|
sp_cache_invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mysql_bin_log.is_open())
|
if (mysql_bin_log.is_open())
|
||||||
{
|
{
|
||||||
thd->clear_error();
|
thd->clear_error();
|
||||||
@ -1426,6 +1425,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||||
|
|
||||||
if (error)
|
if (error)
|
||||||
{
|
{
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
|
@ -82,7 +82,7 @@ int vio_ssl_read(Vio *vio, gptr buf, int size)
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
DBUG_ENTER("vio_ssl_read");
|
DBUG_ENTER("vio_ssl_read");
|
||||||
DBUG_PRINT("enter", ("sd: %d, buf: 0x%p, size: %d, ssl_: 0x%p",
|
DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d, ssl_: 0x%lx",
|
||||||
vio->sd, buf, size, vio->ssl_arg));
|
vio->sd, buf, size, vio->ssl_arg));
|
||||||
|
|
||||||
r= SSL_read((SSL*) vio->ssl_arg, buf, size);
|
r= SSL_read((SSL*) vio->ssl_arg, buf, size);
|
||||||
@ -99,7 +99,7 @@ int vio_ssl_write(Vio *vio, const gptr buf, int size)
|
|||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
DBUG_ENTER("vio_ssl_write");
|
DBUG_ENTER("vio_ssl_write");
|
||||||
DBUG_PRINT("enter", ("sd: %d, buf: 0x%p, size: %d", vio->sd, buf, size));
|
DBUG_PRINT("enter", ("sd: %d, buf: 0x%lx, size: %d", vio->sd, buf, size));
|
||||||
|
|
||||||
r= SSL_write((SSL*) vio->ssl_arg, buf, size);
|
r= SSL_write((SSL*) vio->ssl_arg, buf, size);
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
|
Reference in New Issue
Block a user