mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
merge from next-mr
This commit is contained in:
@@ -547,9 +547,9 @@ call p_verify_status_increment(0, 0, 0, 0);
|
||||
--echo # the binary log.
|
||||
--echo #
|
||||
select f1();
|
||||
call p_verify_status_increment(0, 0, 1, 0);
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
commit;
|
||||
call p_verify_status_increment(0, 0, 1, 0);
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
|
||||
--echo # 17. Read-only statement, a function changes non-trans-table.
|
||||
--echo #
|
||||
@@ -557,15 +557,19 @@ call p_verify_status_increment(0, 0, 1, 0);
|
||||
--echo # non-transactional changes saved in the transaction cache to
|
||||
--echo # the binary log.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
select f1() from t1;
|
||||
call p_verify_status_increment(1, 0, 2, 0);
|
||||
--enable_warnings
|
||||
call p_verify_status_increment(2, 0, 2, 0);
|
||||
commit;
|
||||
call p_verify_status_increment(1, 0, 2, 0);
|
||||
call p_verify_status_increment(2, 0, 2, 0);
|
||||
|
||||
--echo # 18. Read-write statement: UPDATE, change 0 (transactional) rows.
|
||||
--echo #
|
||||
select count(*) from t2;
|
||||
--disable_warnings
|
||||
update t1 set a=2 where a=f1()+10;
|
||||
--enable_warnings
|
||||
select count(*) from t2;
|
||||
call p_verify_status_increment(2, 0, 2, 0);
|
||||
commit;
|
||||
@@ -579,7 +583,7 @@ call p_verify_status_increment(2, 0, 2, 0);
|
||||
drop table t2;
|
||||
set sql_mode=no_engine_substitution;
|
||||
create temporary table t2 (a int);
|
||||
call p_verify_status_increment(0, 0, 0, 0);
|
||||
call p_verify_status_increment(1, 0, 0, 0);
|
||||
set sql_mode=default;
|
||||
--echo # 19. A function changes temp-trans-table.
|
||||
--echo #
|
||||
@@ -636,9 +640,9 @@ call p_verify_status_increment(2, 0, 1, 0);
|
||||
--echo # 25. DDL: DROP TEMPORARY TABLE, does not start a transaction
|
||||
--echo #
|
||||
drop temporary table t2;
|
||||
call p_verify_status_increment(0, 0, 0, 0);
|
||||
call p_verify_status_increment(1, 0, 0, 0);
|
||||
commit;
|
||||
call p_verify_status_increment(0, 0, 0, 0);
|
||||
call p_verify_status_increment(1, 0, 0, 0);
|
||||
|
||||
--echo # 26. Verify that SET AUTOCOMMIT issues an implicit commit
|
||||
--echo #
|
||||
@@ -719,17 +723,17 @@ call p_verify_status_increment(4, 4, 4, 4);
|
||||
--echo # Sic: no table is created.
|
||||
create table if not exists t2 (a int) select 6 union select 7;
|
||||
--echo # Sic: first commits the statement, and then the transaction.
|
||||
call p_verify_status_increment(4, 4, 4, 4);
|
||||
call p_verify_status_increment(2, 0, 4, 4);
|
||||
create table t3 select a from t2;
|
||||
call p_verify_status_increment(4, 4, 4, 4);
|
||||
call p_verify_status_increment(2, 0, 4, 4);
|
||||
alter table t3 add column (b int);
|
||||
call p_verify_status_increment(2, 0, 2, 0);
|
||||
alter table t3 rename t4;
|
||||
call p_verify_status_increment(2, 2, 2, 2);
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
rename table t4 to t3;
|
||||
call p_verify_status_increment(2, 2, 2, 2);
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
truncate table t3;
|
||||
call p_verify_status_increment(4, 4, 4, 4);
|
||||
call p_verify_status_increment(2, 0, 2, 0);
|
||||
create view v1 as select * from t2;
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
check table t1;
|
||||
|
@@ -1,3 +1,18 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
#
|
||||
# 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; version 2 of the License.
|
||||
#
|
||||
# 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
|
||||
|
||||
# Use default setting for mysqld processes
|
||||
!include default_mysqld.cnf
|
||||
!include default_client.cnf
|
||||
@@ -9,6 +24,8 @@
|
||||
|
||||
log-bin= master-bin
|
||||
|
||||
# Run tests with the performance schema instrumentation
|
||||
loose-enable-performance-schema
|
||||
|
||||
[mysqlbinlog]
|
||||
disable-force-if-open
|
||||
|
@@ -1,3 +1,18 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
#
|
||||
# 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; version 2 of the License.
|
||||
#
|
||||
# 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
|
||||
|
||||
# Default values that applies to all MySQL Servers
|
||||
[mysqld]
|
||||
open-files-limit= 1024
|
||||
@@ -26,3 +41,6 @@ slave-net-timeout=120
|
||||
|
||||
log-bin=mysqld-bin
|
||||
|
||||
# Run tests with the performance schema instrumentation
|
||||
loose-enable-performance-schema
|
||||
|
||||
|
@@ -1,7 +1,9 @@
|
||||
#
|
||||
# Whether server supports dynamic loading.
|
||||
#
|
||||
--require r/have_dynamic_loading.require
|
||||
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||
--skip The test requires dynamic loading
|
||||
}
|
||||
disable_query_log;
|
||||
show variables like 'have_dynamic_loading';
|
||||
enable_query_log;
|
||||
|
@@ -1,13 +1,21 @@
|
||||
#
|
||||
# Check if server has support for loading udf's
|
||||
# i.e it will support dlopen
|
||||
# Check if server has support for loading plugins
|
||||
#
|
||||
--source include/have_dynamic_loading.inc
|
||||
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||
--skip Example plugin requires dynamic loading
|
||||
}
|
||||
|
||||
#
|
||||
# Check if the variable EXAMPLE_PLUGIN is set
|
||||
#
|
||||
--require r/have_example_plugin.require
|
||||
disable_query_log;
|
||||
eval select LENGTH('$EXAMPLE_PLUGIN') > 0 as 'have_example_plugin';
|
||||
if (`SELECT LENGTH('$EXAMPLE_PLUGIN') = 0`) {
|
||||
--skip Example plugin requires the environment variable \$EXAMPLE_PLUGIN to be set (normally done by mtr)
|
||||
}
|
||||
|
||||
#
|
||||
# Check if --plugin-dir was setup for exampledb
|
||||
#
|
||||
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$EXAMPLE_PLUGIN_OPT'`) {
|
||||
--skip Example plugin requires that --plugin-dir is set to the example plugin dir (either the .opt file does not contain \$EXAMPLE_PLUGIN_OPT or another plugin is in use)
|
||||
}
|
||||
enable_query_log;
|
||||
|
20
mysql-test/include/have_perfschema.inc
Normal file
20
mysql-test/include/have_perfschema.inc
Normal file
@@ -0,0 +1,20 @@
|
||||
# Copyright (C) 2010 Sun Microsystems, Inc.
|
||||
#
|
||||
# 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; version 2 of the License.
|
||||
#
|
||||
# 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
|
||||
|
||||
if (!`SELECT count(*) FROM information_schema.engines WHERE
|
||||
(support = 'YES' OR support = 'DEFAULT') AND
|
||||
engine = 'PERFORMANCE_SCHEMA'`){
|
||||
skip Need performance schema compiled in;
|
||||
}
|
@@ -1,10 +1,9 @@
|
||||
#
|
||||
# Check if dynamic loading is supported
|
||||
# Check if server has support for loading plugins
|
||||
#
|
||||
--require r/have_dynamic_loading.require
|
||||
disable_query_log;
|
||||
show variables like 'have_dynamic_loading';
|
||||
enable_query_log;
|
||||
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||
--skip Requires dynamic loading
|
||||
}
|
||||
|
||||
#
|
||||
# Check if the variable SEMISYNC_MASTER_PLUGIN is set
|
||||
|
@@ -1,13 +1,20 @@
|
||||
#
|
||||
# Check if server has support for loading udf's
|
||||
# i.e it will support dlopen
|
||||
# Check if server has support for loading plugins
|
||||
#
|
||||
--source include/have_dynamic_loading.inc
|
||||
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||
--skip simple parser requires dynamic loading
|
||||
}
|
||||
|
||||
#
|
||||
# Check if the variable SIMPLE_PARSER is set
|
||||
#
|
||||
--require r/have_simple_parser.require
|
||||
disable_query_log;
|
||||
eval select LENGTH('$SIMPLE_PARSER') > 0 as 'have_simple_parser';
|
||||
enable_query_log;
|
||||
if (`SELECT LENGTH('$SIMPLE_PARSER') = 0`) {
|
||||
--skip simple parser requires the environment variable \$SIMPLE_PARSER to be set (normally done by mtr)
|
||||
}
|
||||
|
||||
#
|
||||
# Check if --plugin-dir was setup for simple parser
|
||||
#
|
||||
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$SIMPLE_PARSER_OPT'`) {
|
||||
--skip simple parser requires that --plugin-dir is set to the udf plugin dir (either the .opt file does not contain \$UDF_EXAMPLE_LIB_OPT or another plugin is in use)
|
||||
}
|
||||
|
@@ -1,13 +1,20 @@
|
||||
#
|
||||
# Check if server has support for loading udf's
|
||||
# i.e it will support dlopen
|
||||
# Check if server has support for loading plugins
|
||||
#
|
||||
--source include/have_dynamic_loading.inc
|
||||
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||
--skip UDF requires dynamic loading
|
||||
}
|
||||
|
||||
#
|
||||
# Check if the variable UDF_EXAMPLE_LIB is set
|
||||
#
|
||||
--require r/have_udf_example.require
|
||||
disable_query_log;
|
||||
eval select LENGTH('$UDF_EXAMPLE_LIB') > 0 as 'have_udf_example_lib';
|
||||
enable_query_log;
|
||||
if (`SELECT LENGTH('$UDF_EXAMPLE_LIB') = 0`) {
|
||||
--skip UDF requires the environment variable \$UDF_EXAMPLE_LIB to be set (normally done by mtr)
|
||||
}
|
||||
|
||||
#
|
||||
# Check if --plugin-dir was setup for udf
|
||||
#
|
||||
if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$UDF_EXAMPLE_LIB_OPT'`) {
|
||||
--skip UDF requires that --plugin-dir is set to the udf plugin dir (either the .opt file does not contain \$UDF_EXAMPLE_LIB_OPT or another plugin is in use)
|
||||
}
|
||||
|
@@ -11,7 +11,8 @@ exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help
|
||||
|
||||
perl;
|
||||
@skipvars=qw/basedir open-files-limit general-log-file log
|
||||
log-slow-queries pid-file slow-query-log-file/;
|
||||
log-slow-queries pid-file slow-query-log-file
|
||||
datadir slave-load-tmpdir tmpdir/;
|
||||
@plugins=qw/innodb ndb ndbcluster safemalloc debug temp-pool ssl des-key-file
|
||||
thread-concurrency super-large-pages mutex-deadlock-detector/;
|
||||
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_SHAREDIR/;
|
||||
|
@@ -55,11 +55,13 @@ connection master;
|
||||
--echo "Running on the master"
|
||||
--enable_info
|
||||
eval CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=$engine_type;
|
||||
--disable_warnings
|
||||
INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00));
|
||||
INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00));
|
||||
INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00));
|
||||
INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00));
|
||||
SELECT * FROM t1 ORDER BY sum;
|
||||
--enable_warnings
|
||||
--disable_info
|
||||
|
||||
sync_slave_with_master;
|
||||
|
Reference in New Issue
Block a user