mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge
This commit is contained in:
@ -502,16 +502,16 @@ call p_verify_status_increment(2, 2, 2, 2);
|
||||
--echo # 12. Read-write statement: IODKU, change 0 rows.
|
||||
--echo #
|
||||
insert t1 set a=2 on duplicate key update a=2;
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
commit;
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
|
||||
--echo # 13. Read-write statement: INSERT IGNORE, change 0 rows.
|
||||
--echo #
|
||||
insert ignore t1 set a=2;
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
commit;
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
|
||||
--echo # 14. Read-write statement: INSERT IGNORE, change 1 row.
|
||||
--echo #
|
||||
|
@ -1737,6 +1737,35 @@ EXPLAIN SELECT * FROM t1 WHERE date_column BETWEEN '2010-09-01' AND '2010-10-01'
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #31384 DATE_ADD() and DATE_SUB() return binary data
|
||||
--echo #
|
||||
SELECT @@collation_connection, @@character_set_results;
|
||||
CREATE TABLE t1 AS
|
||||
SELECT
|
||||
DATE_SUB('2007-08-03', INTERVAL 1 MINUTE) AS field_str1,
|
||||
DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
|
||||
DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY) AS field_date,
|
||||
DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
--enable_metadata
|
||||
# PS protocol gives different "Max length" value for DATETIME.
|
||||
--disable_ps_protocol
|
||||
SELECT
|
||||
DATE_SUB('2007-08-03', INTERVAL 1 DAY) AS field_str1,
|
||||
DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE) AS field1_str2,
|
||||
DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY) AS field_date,
|
||||
DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE) AS field_datetime;
|
||||
--disable_metadata
|
||||
--enable_ps_protocol
|
||||
SELECT
|
||||
HEX(DATE_SUB('2007-08-03', INTERVAL 1 MINUTE)) AS field_str1,
|
||||
HEX(DATE_SUB('2007-08-03 17:33:00', INTERVAL 1 MINUTE)) AS field1_str2,
|
||||
HEX(DATE_SUB(DATE('2007-08-03'), INTERVAL 1 DAY)) AS field_date,
|
||||
HEX(DATE_SUB(CAST('2007-08-03 17:33:00' AS DATETIME), INTERVAL 1 MINUTE)) AS field_datetime;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#52159 returning time type from function and empty left join causes debug assertion
|
||||
--echo #
|
||||
|
@ -44,3 +44,19 @@ SELECT COUNT(*) FROM t2 IGNORE INDEX(p) WHERE p=POINTFROMTEXT('POINT(1 2)');
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Test for bug #58650 "Failing assertion: primary_key_no == -1 ||
|
||||
--echo # primary_key_no == 0".
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
--echo # The minimal test case.
|
||||
create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a));
|
||||
drop table t1;
|
||||
--echo # The original test case.
|
||||
create table t1 (a int not null, b linestring not null, unique key b (b(12)));
|
||||
create unique index a on t1(a);
|
||||
drop table t1;
|
||||
|
78
mysql-test/include/have_dbi_dbd-mysql.inc
Normal file
78
mysql-test/include/have_dbi_dbd-mysql.inc
Normal file
@ -0,0 +1,78 @@
|
||||
#
|
||||
# Originally created by John Embretsen, 2011-01-26.
|
||||
#
|
||||
# Checks for the existence of Perl modules DBI and DBD::mysql as seen from the
|
||||
# perl installation used by "external" executable perl scripts, i.e. scripts
|
||||
# that are executed as standalone scripts interpreted by the perl installation
|
||||
# specified by the "shebang" line in the top of these scripts.
|
||||
#
|
||||
# If either module is not found, the test will be skipped.
|
||||
#
|
||||
# For use in tests that call perl scripts that require these modules.
|
||||
#
|
||||
# This file is intended to work on Unix. Windows may need different treatment.
|
||||
# Reasoning:
|
||||
# - "shebangs" are not relevant on Windows, but need to be handled here.
|
||||
# - Perl scripts cannot be made executable on Windows, interpreter must be
|
||||
# specified.
|
||||
#
|
||||
# Note that if there are multiple perl installations and not all have the
|
||||
# required modules, this check may fail even if the perl in path does have
|
||||
# the modules available. This may happen if the perl specified by the script's
|
||||
# shebang (e.g. #!/usr/bin/perl) does not have these modules, and script is
|
||||
# called without specifying the perl interpreter. However, this will be
|
||||
# a correct result in cases where a test calls a script with a similar shebang.
|
||||
#
|
||||
################################################################################
|
||||
|
||||
--source include/not_windows.inc
|
||||
|
||||
# We jump through some hoops since there is no direct way to check if an
|
||||
# external command went OK or not from a mysql-test file:
|
||||
#
|
||||
# - In theory, we could do as simple as "exec perl -MDBI -MDBD::mysql -e 1",
|
||||
# however we cannot check the result (exit code) from within a test script.
|
||||
# Also, this may not yield the same result as other uses of perl due to the
|
||||
# shebang issue mentioned above.
|
||||
# - Instead we use a separate helper perl script that checks for the modules.
|
||||
# - If the modules are found, the perl script leaves a file which sets a
|
||||
# variable that can be read by this file.
|
||||
# If the modules are not found, the perl script does not set this variable,
|
||||
# but leaves an empty file instead.
|
||||
#
|
||||
# This is done because there is apparently no direct way to transfer
|
||||
# information from perl to the test script itself.
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--disable_warnings
|
||||
|
||||
# We do not use embedded perl in this script because that would not have yielded
|
||||
# correct results for a situation where an external Perl script is called like
|
||||
# "scriptname" instead of "perl scriptname" and the shebang in the script points
|
||||
# to a specific perl that may be different than the perl in PATH.
|
||||
#
|
||||
# Instead, we call a separate helper script which checks for the modules in its
|
||||
# own environment. We call it without "perl" in front.
|
||||
|
||||
--let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl
|
||||
--let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt
|
||||
|
||||
# Make the script executable and execute it.
|
||||
--chmod 0755 $perlChecker
|
||||
--exec $perlChecker
|
||||
|
||||
# Source the resulting temporary file and look for a variable being set.
|
||||
--source $resultFile
|
||||
|
||||
if (!$dbidbd) {
|
||||
--skip Test needs Perl modules DBI and DBD::mysql
|
||||
}
|
||||
|
||||
# Clean up
|
||||
--remove_file $resultFile
|
||||
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
--enable_warnings
|
||||
|
@ -183,9 +183,6 @@ INSERT INTO global_suppressions VALUES
|
||||
("The slave I.O thread stops because a fatal error is encountered when it try to get the value of SERVER_ID variable from master."),
|
||||
(".SELECT UNIX_TIMESTAMP... failed on master, do not trust column Seconds_Behind_Master of SHOW SLAVE STATUS"),
|
||||
|
||||
/* Test case for Bug#31590 in order_by.test produces the following error */
|
||||
("Out of sort memory; increase server sort buffer size"),
|
||||
|
||||
/* Special case for Bug #26402 in show_check.test
|
||||
- Question marks are not valid file name parts on Windows. Ignore
|
||||
this error message.
|
||||
|
@ -4,12 +4,26 @@
|
||||
|
||||
--source include/not_windows.inc
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_dbi_dbd-mysql.inc
|
||||
|
||||
if (!$MYSQLHOTCOPY)
|
||||
{
|
||||
# Fail the test if the mysqlhotcopy script is missing.
|
||||
# If the tool's location changes, mysql-test-run.pl must be updated to
|
||||
# reflect this (look for "MYSQLHOTCOPY").
|
||||
die due to missing mysqlhotcopy tool;
|
||||
}
|
||||
|
||||
# NOTE (johnemb, 2011-01-26):
|
||||
# In this test mysqlhotcopy (a perl script) is executed as a standalone
|
||||
# executable, i.e. not necessarily using the perl interpreter in PATH,
|
||||
# because that is how the documentation demonstrates it.
|
||||
#
|
||||
# We include have_dbi_dbd-mysql.inc above so that the test will
|
||||
# be skipped if Perl modules required by the mysqlhotcopy tool are not
|
||||
# found when the script is run this way.
|
||||
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS hotcopy_test;
|
||||
@ -93,7 +107,7 @@ DROP DATABASE hotcopy_save;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--error 9,2304
|
||||
--error 9,11,2304
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
|
@ -27,7 +27,7 @@
|
||||
# with name1, name2 etc from the comma separated list of plugin names
|
||||
# in the optional 4th argument.
|
||||
|
||||
auth_test_plugin plugin/auth PLUGIN_AUTH test_plugin_server
|
||||
auth_test_plugin plugin/auth PLUGIN_AUTH test_plugin_server,cleartext_plugin_server
|
||||
qa_auth_interface plugin/auth PLUGIN_AUTH_INTERFACE qa_auth_interface
|
||||
qa_auth_server plugin/auth PLUGIN_AUTH_SERVER qa_auth_server
|
||||
qa_auth_client plugin/auth PLUGIN_AUTH_CLIENT qa_auth_client
|
||||
|
@ -45,15 +45,7 @@ if ($rpl_server_parameters)
|
||||
--source include/rpl_connection.inc
|
||||
|
||||
# Write file to make mysql-test-run.pl start up the server again
|
||||
--let WRITE_TO_FILE= $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
--let WRITE_TO_VAR= $_rpl_start_server_command
|
||||
perl;
|
||||
my $file= $ENV{'WRITE_TO_FILE'};
|
||||
my $var= $ENV{'WRITE_TO_VAR'};
|
||||
open WRITE_FILE, ">> $file" or die "Error opening $file: $!";
|
||||
print WRITE_FILE $var, "\n" or die "Error appending to $file: $!";
|
||||
close WRITE_FILE or die "Error closing $file: $!";
|
||||
EOF
|
||||
--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
|
||||
--source include/rpl_reconnect.inc
|
||||
|
||||
|
@ -44,9 +44,7 @@ if ($rpl_debug)
|
||||
|
||||
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||
# it until it's told to
|
||||
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
wait
|
||||
EOF
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
|
||||
|
||||
# Send shutdown to the connected server and give
|
||||
# it 10 seconds to die before zapping it
|
||||
|
@ -88,7 +88,7 @@ while ($_rpl_i) {
|
||||
{
|
||||
--echo Sync IO: $_rpl_slave_io_running; Sync SQL: $_rpl_slave_sql_running
|
||||
}
|
||||
--let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' = 'Yes', 1, '')`
|
||||
--let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' != 'No', 1, '')`
|
||||
--let $_rpl_slave_sql_running= `SELECT IF('$_rpl_slave_sql_running' = 'Yes', 1, '')`
|
||||
if ($_rpl_slave_io_running)
|
||||
{
|
||||
|
Reference in New Issue
Block a user