summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/commit.inc34
-rw-r--r--mysql-test/include/daemon_example_bad_format.ini8
-rw-r--r--mysql-test/include/daemon_example_bad_soname.ini9
-rw-r--r--mysql-test/include/default_my.cnf4
-rw-r--r--mysql-test/include/default_mysqld.cnf4
-rw-r--r--mysql-test/include/mtr_check.sql31
-rw-r--r--mysql-test/include/mtr_warnings.sql15
-rw-r--r--mysql-test/include/mysqld--help.inc2
-rw-r--r--mysql-test/include/plugin.defs1
-rw-r--r--mysql-test/include/set_binlog_format_mixed.sql16
-rw-r--r--mysql-test/include/set_binlog_format_row.sql16
-rw-r--r--mysql-test/include/set_binlog_format_statement.sql16
12 files changed, 144 insertions, 12 deletions
diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc
index 9df1571a849..fdb9ef1f563 100644
--- a/mysql-test/include/commit.inc
+++ b/mysql-test/include/commit.inc
@@ -521,10 +521,34 @@ commit;
call p_verify_status_increment(2, 2, 2, 2);
--echo # 15. Read-write statement: UPDATE IGNORE, change 0 rows.
--echo #
+--disable_warnings
update ignore t1 set a=2 where a=1;
-call p_verify_status_increment(2, 2, 1, 0);
-commit;
-call p_verify_status_increment(2, 2, 1, 0);
+--enable_warnings
+if (`select @@binlog_format = 'STATEMENT'`)
+{
+ --disable_query_log
+ call p_verify_status_increment(2, 2, 1, 0);
+ --enable_query_log
+}
+if (`select @@binlog_format != 'STATEMENT'`)
+{
+ --disable_query_log
+ call p_verify_status_increment(1, 0, 1, 0);
+ --enable_query_log
+}
+commit;
+if (`select @@binlog_format = 'STATEMENT'`)
+{
+ --disable_query_log
+ call p_verify_status_increment(2, 2, 1, 0);
+ --enable_query_log
+}
+if (`select @@binlog_format != 'STATEMENT'`)
+{
+ --disable_query_log
+ call p_verify_status_increment(1, 0, 1, 0);
+ --enable_query_log
+}
--echo #
--echo # Create a stored function that modifies a
--echo # non-transactional table. Demonstrate that changes in
@@ -603,7 +627,9 @@ call p_verify_status_increment(2, 0, 1, 0);
--echo # 21. Read-write statement: UPDATE, change 0 (transactional) rows.
--echo #
+--disable_warnings
update t1 set a=2 where a=f1()+10;
+--enable_warnings
call p_verify_status_increment(2, 0, 1, 0);
commit;
call p_verify_status_increment(2, 0, 1, 0);
@@ -703,7 +729,9 @@ call p_verify_status_increment(4, 4, 4, 4);
--echo #
insert into t2 select a from t1;
commit;
+--disable_warnings
replace into t2 select a from t1;
+--enable_warnings
commit;
call p_verify_status_increment(8, 8, 8, 8);
#
diff --git a/mysql-test/include/daemon_example_bad_format.ini b/mysql-test/include/daemon_example_bad_format.ini
new file mode 100644
index 00000000000..8f880ef0ba0
--- /dev/null
+++ b/mysql-test/include/daemon_example_bad_format.ini
@@ -0,0 +1,8 @@
+#
+# Plugin configuration file. Place the following on a separate line:
+#
+# library binary file name (without .so or .dll)
+# component_name
+# [component_name] - additional components in plugin
+#
+libdaemon_example
diff --git a/mysql-test/include/daemon_example_bad_soname.ini b/mysql-test/include/daemon_example_bad_soname.ini
new file mode 100644
index 00000000000..5f42b5a6214
--- /dev/null
+++ b/mysql-test/include/daemon_example_bad_soname.ini
@@ -0,0 +1,9 @@
+#
+# Plugin configuration file. Place the following on a separate line:
+#
+# library binary file name (without .so or .dll)
+# component_name
+# [component_name] - additional components in plugin
+#
+libdaemon_BADNAME
+daemon_BADNAME
diff --git a/mysql-test/include/default_my.cnf b/mysql-test/include/default_my.cnf
index a4f3b14fd54..ef7e9f60dd7 100644
--- a/mysql-test/include/default_my.cnf
+++ b/mysql-test/include/default_my.cnf
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2007 MySQL AB, 2009, 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
@@ -11,7 +11,7 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Use default setting for mysqld processes
!include default_mysqld.cnf
diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf
index 3a8c4c100f2..26587d885c1 100644
--- a/mysql-test/include/default_mysqld.cnf
+++ b/mysql-test/include/default_mysqld.cnf
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Sun Microsystems, Inc
+# Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
#
# 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
@@ -11,7 +11,7 @@
#
# 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Default values that applies to all MySQL Servers
[mysqld]
diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql
index fcd5eebc269..c9708f988de 100644
--- a/mysql-test/include/mtr_check.sql
+++ b/mysql-test/include/mtr_check.sql
@@ -1,3 +1,18 @@
+-- Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+--
+-- 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,
+-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
delimiter ||;
use mtr||
@@ -12,11 +27,9 @@ BEGIN
-- Dump all global variables except those
-- that are supposed to change
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
- WHERE variable_name != 'timestamp'
+ WHERE variable_name NOT IN ('timestamp', 'innodb_file_format_max')
AND variable_name not like "Last_IO_Err*"
- AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND
- variable_name != 'INNODB_FILE_FORMAT_CHECK'
- ORDER BY variable_name;
+ ORDER BY VARIABLE_NAME;
-- Dump all databases, there should be none
-- except those that was created during bootstrap
@@ -61,3 +74,13 @@ BEGIN
mysql.user;
END||
+
+--
+-- Procedure used by test case used to force all
+-- servers to restart after testcase and thus skipping
+-- check test case after test
+--
+CREATE DEFINER=root@localhost PROCEDURE force_restart()
+BEGIN
+ SELECT 1 INTO OUTFILE 'force_restart';
+END||
diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql
index 57cd04d81a1..ce1563fc993 100644
--- a/mysql-test/include/mtr_warnings.sql
+++ b/mysql-test/include/mtr_warnings.sql
@@ -1,3 +1,18 @@
+-- Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+--
+-- 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,
+-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
delimiter ||;
use mtr||
diff --git a/mysql-test/include/mysqld--help.inc b/mysql-test/include/mysqld--help.inc
index 3b8fdd482fc..84a6c8091a9 100644
--- a/mysql-test/include/mysqld--help.inc
+++ b/mysql-test/include/mysqld--help.inc
@@ -26,7 +26,7 @@ perl;
# And substitute the content some environment variables with their
# names:
- @env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
+ @env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
$re1=join('|', @skipvars, @plugins);
$re2=join('|', @plugins);
diff --git a/mysql-test/include/plugin.defs b/mysql-test/include/plugin.defs
index e07c603c8e5..6fbe4f68328 100644
--- a/mysql-test/include/plugin.defs
+++ b/mysql-test/include/plugin.defs
@@ -39,3 +39,4 @@ ha_archive storage/archive ARCHIVE_PLUGIN
ha_blackhole storage/blackhole BLACKHOLE_PLUGIN
ha_federated storage/federated FEDERATED_PLUGIN
mypluglib plugin/fulltext SIMPLE_PARSER
+libdaemon_example plugin/daemon_example DAEMONEXAMPLE
diff --git a/mysql-test/include/set_binlog_format_mixed.sql b/mysql-test/include/set_binlog_format_mixed.sql
index 836992d1080..65c779ef141 100644
--- a/mysql-test/include/set_binlog_format_mixed.sql
+++ b/mysql-test/include/set_binlog_format_mixed.sql
@@ -1,2 +1,18 @@
+# Copyright (c) 2007 MySQL AB
+# Use is subject to license terms.
+#
+# 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,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
SET GLOBAL BINLOG_FORMAT=MIXED;
SET SESSION BINLOG_FORMAT=MIXED;
diff --git a/mysql-test/include/set_binlog_format_row.sql b/mysql-test/include/set_binlog_format_row.sql
index 49f34c8ccd1..0400ed48be9 100644
--- a/mysql-test/include/set_binlog_format_row.sql
+++ b/mysql-test/include/set_binlog_format_row.sql
@@ -1,2 +1,18 @@
+# Copyright (c) 2007 MySQL AB
+# Use is subject to license terms.
+#
+# 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,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
SET GLOBAL BINLOG_FORMAT=ROW;
SET SESSION BINLOG_FORMAT=ROW;
diff --git a/mysql-test/include/set_binlog_format_statement.sql b/mysql-test/include/set_binlog_format_statement.sql
index ed286e7e3cc..b582230e648 100644
--- a/mysql-test/include/set_binlog_format_statement.sql
+++ b/mysql-test/include/set_binlog_format_statement.sql
@@ -1,2 +1,18 @@
+# Copyright (c) 2007 MySQL AB
+# Use is subject to license terms.
+#
+# 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,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
SET GLOBAL BINLOG_FORMAT=STATEMENT;
SET SESSION BINLOG_FORMAT=STATEMENT;