Merge lp:~raghavendra-prabhu/percona-xtradb-cluster/merge-ps-5.5.31 into lp:~raghavendra-prabhu/percona-xtradb-cluster/release-5.5.31

Proposed by Raghavendra D Prabhu
Status: Merged
Merged at revision: 404
Proposed branch: lp:~raghavendra-prabhu/percona-xtradb-cluster/merge-ps-5.5.31
Merge into: lp:~raghavendra-prabhu/percona-xtradb-cluster/release-5.5.31
Diff against target: 150177 lines (+72052/-69159)
302 files modified
Percona-Server/BUILD/compile-alpha-debug (+2/-1)
Percona-Server/BUILD/compile-amd64-debug-max (+2/-1)
Percona-Server/BUILD/compile-amd64-max (+2/-1)
Percona-Server/BUILD/compile-darwin-mwcc (+2/-1)
Percona-Server/BUILD/compile-hpux11-parisc2-aCC (+2/-1)
Percona-Server/BUILD/compile-irix-mips64-mipspro (+2/-1)
Percona-Server/BUILD/compile-ndb-autotest (+1/-1)
Percona-Server/BUILD/compile-pentium (+2/-1)
Percona-Server/BUILD/compile-pentium-debug-max-no-embedded (+2/-1)
Percona-Server/BUILD/compile-pentium-debug-max-no-ndb (+1/-1)
Percona-Server/BUILD/compile-pentium-max (+2/-1)
Percona-Server/BUILD/compile-pentium-pgcc (+2/-1)
Percona-Server/BUILD/compile-ppc-debug (+2/-1)
Percona-Server/BUILD/compile-ppc-debug-max (+2/-1)
Percona-Server/BUILD/compile-ppc-debug-max-no-ndb (+2/-1)
Percona-Server/BUILD/compile-ppc-max (+2/-1)
Percona-Server/BUILD/compile-solaris-sparc-debug (+2/-1)
Percona-Server/BUILD/compile-solaris-sparc-purify (+2/-1)
Percona-Server/VERSION (+1/-1)
Percona-Server/client/client_priv.h (+1/-1)
Percona-Server/client/completion_hash.h (+2/-1)
Percona-Server/client/echo.c (+2/-1)
Percona-Server/client/get_password.c (+2/-1)
Percona-Server/client/mysqlcheck.c (+61/-27)
Percona-Server/client/mysqldump.c (+1/-1)
Percona-Server/client/mysqltest.cc (+4/-1)
Percona-Server/client/sql_string.cc (+2/-2)
Percona-Server/cmake/configure.pl (+1/-1)
Percona-Server/cmake/create_initial_db.cmake.in (+1/-1)
Percona-Server/cmake/make_dist.cmake.in (+1/-1)
Percona-Server/cmake/mysql_version.cmake (+1/-1)
Percona-Server/cmake/package_name.cmake (+1/-1)
Percona-Server/cmake/plugin.cmake (+1/-1)
Percona-Server/cmake/ssl.cmake (+1/-1)
Percona-Server/cmake/zlib.cmake (+6/-2)
Percona-Server/configure.cmake (+1/-1)
Percona-Server/extra/charset2html.c (+2/-1)
Percona-Server/extra/yassl/CMakeLists.txt (+1/-1)
Percona-Server/extra/yassl/examples/client/client.cpp (+1/-1)
Percona-Server/extra/yassl/examples/echoclient/echoclient.cpp (+1/-1)
Percona-Server/extra/yassl/examples/echoserver/echoserver.cpp (+1/-1)
Percona-Server/extra/yassl/examples/server/server.cpp (+1/-1)
Percona-Server/extra/yassl/include/buffer.hpp (+1/-1)
Percona-Server/extra/yassl/include/cert_wrapper.hpp (+1/-2)
Percona-Server/extra/yassl/include/lock.hpp (+1/-1)
Percona-Server/extra/yassl/include/openssl/prefix_ssl.h (+1/-2)
Percona-Server/extra/yassl/include/socket_wrapper.hpp (+1/-1)
Percona-Server/extra/yassl/include/yassl_error.hpp (+3/-3)
Percona-Server/extra/yassl/include/yassl_imp.hpp (+1/-2)
Percona-Server/extra/yassl/include/yassl_int.hpp (+1/-1)
Percona-Server/extra/yassl/include/yassl_types.hpp (+6/-3)
Percona-Server/extra/yassl/src/buffer.cpp (+1/-2)
Percona-Server/extra/yassl/src/cert_wrapper.cpp (+1/-2)
Percona-Server/extra/yassl/src/crypto_wrapper.cpp (+1/-1)
Percona-Server/extra/yassl/src/handshake.cpp (+36/-2)
Percona-Server/extra/yassl/src/lock.cpp (+1/-1)
Percona-Server/extra/yassl/src/make.bat (+1/-1)
Percona-Server/extra/yassl/src/socket_wrapper.cpp (+1/-1)
Percona-Server/extra/yassl/src/ssl.cpp (+1/-2)
Percona-Server/extra/yassl/src/template_instnt.cpp (+2/-1)
Percona-Server/extra/yassl/src/yassl.cpp (+1/-1)
Percona-Server/extra/yassl/src/yassl_error.cpp (+5/-1)
Percona-Server/extra/yassl/src/yassl_imp.cpp (+172/-26)
Percona-Server/extra/yassl/taocrypt/benchmark/benchmark.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/benchmark/make.bat (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/aes.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/asn.hpp (+1/-2)
Percona-Server/extra/yassl/taocrypt/include/block.hpp (+1/-2)
Percona-Server/extra/yassl/taocrypt/include/blowfish.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/des.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/hash.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/hc128.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/integer.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/kernelc.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/misc.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/modes.hpp (+1/-2)
Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/rabbit.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/rsa.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/runtime.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/include/types.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/mySTL/stdexcept.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/mySTL/vector.hpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/aes.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/aestables.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/algebra.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/arc4.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/blowfish.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/coding.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/dsa.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/hash.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/hc128.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/make.bat (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/md4.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/md5.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/misc.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/rabbit.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/random.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/ripemd.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/rsa.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/sha.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/template_instnt.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/src/twofish.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/test/make.bat (+1/-1)
Percona-Server/extra/yassl/taocrypt/test/memory.cpp (+1/-1)
Percona-Server/extra/yassl/taocrypt/test/test.cpp (+1/-1)
Percona-Server/extra/yassl/testsuite/make.bat (+1/-1)
Percona-Server/extra/yassl/testsuite/test.hpp (+1/-1)
Percona-Server/extra/yassl/testsuite/testsuite.cpp (+1/-1)
Percona-Server/include/base64.h (+2/-1)
Percona-Server/include/errmsg.h (+1/-0)
Percona-Server/include/ft_global.h (+1/-1)
Percona-Server/include/m_ctype.h (+3/-1)
Percona-Server/include/m_string.h (+1/-1)
Percona-Server/include/my_base.h (+1/-0)
Percona-Server/include/my_md5.h (+2/-1)
Percona-Server/include/my_sys.h (+1/-1)
Percona-Server/include/my_user.h (+2/-1)
Percona-Server/include/my_xml.h (+2/-1)
Percona-Server/include/myisampack.h (+1/-1)
Percona-Server/include/mysql.h (+1/-1)
Percona-Server/include/mysql/service_my_snprintf.h (+1/-1)
Percona-Server/include/mysql/thread_pool_priv.h (+1/-1)
Percona-Server/include/mysql_time.h (+2/-1)
Percona-Server/include/mysql_version.h.in (+2/-1)
Percona-Server/include/welcome_copyright_notice.h (+1/-1)
Percona-Server/libmysql/CMakeLists.txt (+5/-2)
Percona-Server/libmysql/errmsg.c (+1/-0)
Percona-Server/libmysql/libmysql.c (+8/-1)
Percona-Server/libmysql/libmysql.map (+146/-0)
Percona-Server/mysql-test/collections/default.experimental (+1/-0)
Percona-Server/mysql-test/include/get_relay_log_pos.inc (+1/-1)
Percona-Server/mysql-test/include/rpl_init.inc (+0/-3)
Percona-Server/mysql-test/mysql-test-run.pl (+23/-4)
Percona-Server/mysql-test/r/cast.result (+18/-0)
Percona-Server/mysql-test/r/change_user_notembedded.result (+5/-0)
Percona-Server/mysql-test/r/ctype_utf8mb4.result (+18/-0)
Percona-Server/mysql-test/r/failed_auth_3909.result (+20/-0)
Percona-Server/mysql-test/r/join_outer.result (+32/-0)
Percona-Server/mysql-test/r/mysqltest.result (+3/-3)
Percona-Server/mysql-test/r/partition.result (+2/-2)
Percona-Server/mysql-test/r/percona_server_variables_debug.result (+2/-0)
Percona-Server/mysql-test/r/percona_server_variables_release.result (+1/-0)
Percona-Server/mysql-test/r/show_check.result (+9/-9)
Percona-Server/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result (+1/-0)
Percona-Server/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test (+3/-1)
Percona-Server/mysql-test/suite/binlog/t/disabled.def (+1/-1)
Percona-Server/mysql-test/suite/innodb/r/innodb_bug14147491.result (+15/-4)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug12400341.test (+4/-0)
Percona-Server/mysql-test/suite/innodb/t/innodb_bug14147491.test (+45/-9)
Percona-Server/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result (+11605/-11605)
Percona-Server/mysql-test/suite/parts/r/partition_alter1_1_innodb.result (+32/-32)
Percona-Server/mysql-test/suite/parts/r/partition_alter1_2_innodb.result (+21002/-21002)
Percona-Server/mysql-test/suite/parts/r/partition_alter2_1_1_innodb.result (+40/-40)
Percona-Server/mysql-test/suite/parts/r/partition_alter2_1_2_innodb.result (+40/-40)
Percona-Server/mysql-test/suite/parts/r/partition_alter2_2_1_innodb.result (+11354/-11354)
Percona-Server/mysql-test/suite/parts/r/partition_alter2_2_2_innodb.result (+40/-40)
Percona-Server/mysql-test/suite/parts/r/partition_alter4_innodb.result (+208/-208)
Percona-Server/mysql-test/suite/parts/r/partition_basic_innodb.result (+23390/-23390)
Percona-Server/mysql-test/suite/parts/r/partition_engine_innodb.result (+11/-11)
Percona-Server/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result (+12/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_percona_bug1092593.result (+20/-0)
Percona-Server/mysql-test/suite/rpl/r/rpl_row_until.result (+12/-10)
Percona-Server/mysql-test/suite/rpl/r/rpl_stm_until.result (+1/-11)
Percona-Server/mysql-test/suite/rpl/t/disabled.def (+0/-1)
Percona-Server/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test (+12/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_percona_bug1092593-slave.opt (+1/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_percona_bug1092593.test (+81/-0)
Percona-Server/mysql-test/suite/rpl/t/rpl_row_until.test (+52/-25)
Percona-Server/mysql-test/suite/rpl/t/rpl_stm_until.test (+2/-33)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_buffer_pool_evict_basic.result (+7/-0)
Percona-Server/mysql-test/suite/sys_vars/r/innodb_use_atomic_writes_basic.result (+30/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_buffer_pool_evict_basic.test (+10/-0)
Percona-Server/mysql-test/suite/sys_vars/t/innodb_use_atomic_writes_basic.test (+29/-0)
Percona-Server/mysql-test/t/cast.test (+13/-0)
Percona-Server/mysql-test/t/change_user_notembedded.test (+24/-0)
Percona-Server/mysql-test/t/ctype_utf8mb4.test (+15/-0)
Percona-Server/mysql-test/t/failed_auth_3909.test (+37/-0)
Percona-Server/mysql-test/t/join_outer.test (+30/-0)
Percona-Server/mysql-test/t/mysql_plugin.test (+16/-50)
Percona-Server/mysql-test/t/percona_bug1170103.test (+23/-0)
Percona-Server/mysys/errors.c (+2/-2)
Percona-Server/mysys/mf_keycache.c (+2/-1)
Percona-Server/mysys/my_lockmem.c (+1/-1)
Percona-Server/mysys/my_malloc.c (+9/-3)
Percona-Server/mysys/my_once.c (+1/-1)
Percona-Server/mysys/my_write.c (+3/-3)
Percona-Server/mysys/thr_alarm.c (+8/-14)
Percona-Server/packaging/WiX/mysql_server.wxs.in (+5/-2)
Percona-Server/packaging/rpm-uln/mysql.spec.sh (+18/-11)
Percona-Server/regex/my_regex.h (+1/-1)
Percona-Server/regex/regcomp.c (+1/-1)
Percona-Server/scripts/mysql_system_tables_data.sql (+9/-5)
Percona-Server/scripts/wsrep_sst_xtrabackup.sh (+4/-1)
Percona-Server/sql/CMakeLists.txt (+3/-9)
Percona-Server/sql/db.opt (+2/-0)
Percona-Server/sql/ha_partition.cc (+469/-25)
Percona-Server/sql/ha_partition.h (+16/-4)
Percona-Server/sql/handler.cc (+16/-2)
Percona-Server/sql/item.cc (+2/-2)
Percona-Server/sql/item.h (+19/-1)
Percona-Server/sql/item_cmpfunc.cc (+4/-3)
Percona-Server/sql/item_func.cc (+2/-2)
Percona-Server/sql/item_func.h (+12/-9)
Percona-Server/sql/item_sum.cc (+4/-0)
Percona-Server/sql/key.cc (+72/-44)
Percona-Server/sql/key.h (+3/-1)
Percona-Server/sql/log_event.cc (+11/-5)
Percona-Server/sql/log_event.h (+28/-2)
Percona-Server/sql/mysqld.cc (+25/-5)
Percona-Server/sql/mysqld.h (+1/-0)
Percona-Server/sql/opt_range.cc (+91/-19)
Percona-Server/sql/partition_element.h (+3/-4)
Percona-Server/sql/partition_info.cc (+286/-2)
Percona-Server/sql/partition_info.h (+16/-1)
Percona-Server/sql/rpl_utility.cc (+1/-0)
Percona-Server/sql/set_var.cc (+7/-10)
Percona-Server/sql/set_var.h (+23/-7)
Percona-Server/sql/sp_head.cc (+2/-1)
Percona-Server/sql/sql_acl.cc (+50/-7)
Percona-Server/sql/sql_admin.cc (+6/-2)
Percona-Server/sql/sql_admin.h (+3/-1)
Percona-Server/sql/sql_binlog.cc (+1/-1)
Percona-Server/sql/sql_class.cc (+13/-6)
Percona-Server/sql/sql_class.h (+1/-0)
Percona-Server/sql/sql_handler.cc (+10/-5)
Percona-Server/sql/sql_parse.cc (+18/-1)
Percona-Server/sql/sql_partition.cc (+200/-19)
Percona-Server/sql/sql_partition.h (+3/-2)
Percona-Server/sql/sql_partition_admin.cc (+3/-1)
Percona-Server/sql/sql_prepare.cc (+4/-3)
Percona-Server/sql/sql_repl.cc (+17/-33)
Percona-Server/sql/sql_select.cc (+5/-4)
Percona-Server/sql/sql_show.cc (+23/-15)
Percona-Server/sql/sql_string.cc (+1/-1)
Percona-Server/sql/sql_table.cc (+7/-4)
Percona-Server/sql/sql_view.cc (+9/-3)
Percona-Server/sql/sql_yacc.yy (+22/-3)
Percona-Server/sql/sys_vars.cc (+1/-1)
Percona-Server/storage/innobase/btr/btr0cur.c (+27/-20)
Percona-Server/storage/innobase/buf/buf0buf.c (+14/-2)
Percona-Server/storage/innobase/buf/buf0rea.c (+1/-1)
Percona-Server/storage/innobase/dict/dict0crea.c (+9/-0)
Percona-Server/storage/innobase/dict/dict0dict.c (+13/-3)
Percona-Server/storage/innobase/dyn/dyn0dyn.c (+4/-4)
Percona-Server/storage/innobase/fil/fil0fil.c (+24/-0)
Percona-Server/storage/innobase/handler/ha_innodb.cc (+159/-3)
Percona-Server/storage/innobase/handler/i_s.cc (+2/-1)
Percona-Server/storage/innobase/ibuf/ibuf0ibuf.c (+11/-1)
Percona-Server/storage/innobase/include/db0err.h (+1/-0)
Percona-Server/storage/innobase/include/dyn0dyn.h (+50/-38)
Percona-Server/storage/innobase/include/dyn0dyn.ic (+42/-101)
Percona-Server/storage/innobase/include/ha_prototypes.h (+11/-0)
Percona-Server/storage/innobase/include/mtr0mtr.h (+6/-4)
Percona-Server/storage/innobase/include/page0zip.ic (+3/-3)
Percona-Server/storage/innobase/include/srv0srv.h (+10/-0)
Percona-Server/storage/innobase/include/ut0dbg.h (+0/-40)
Percona-Server/storage/innobase/lock/lock0lock.c (+5/-0)
Percona-Server/storage/innobase/mtr/mtr0mtr.c (+80/-77)
Percona-Server/storage/innobase/os/os0file.c (+60/-0)
Percona-Server/storage/innobase/page/page0zip.c (+6/-5)
Percona-Server/storage/innobase/read/read0read.c (+6/-0)
Percona-Server/storage/innobase/row/row0mysql.c (+1/-1)
Percona-Server/storage/innobase/row/row0sel.c (+7/-3)
Percona-Server/storage/innobase/srv/srv0srv.c (+46/-15)
Percona-Server/storage/innobase/sync/sync0arr.c (+4/-4)
Percona-Server/storage/innobase/trx/trx0sys.c (+3/-1)
Percona-Server/storage/innobase/trx/trx0trx.c (+13/-0)
Percona-Server/storage/innobase/ut/ut0dbg.c (+1/-33)
Percona-Server/storage/innobase/ut/ut0ut.c (+2/-0)
Percona-Server/storage/myisam/mi_close.c (+6/-3)
Percona-Server/storage/myisam/mi_create.c (+8/-4)
Percona-Server/storage/myisam/mi_open.c (+29/-8)
Percona-Server/storage/myisam/mi_write.c (+8/-5)
Percona-Server/storage/myisam/myisampack.c (+2/-1)
Percona-Server/storage/perfschema/pfs_engine_table.cc (+4/-4)
Percona-Server/storage/perfschema/pfs_global.cc (+2/-2)
Percona-Server/storage/perfschema/pfs_global.h (+2/-2)
Percona-Server/strings/ctype-bin.c (+20/-7)
Percona-Server/strings/ctype-mb.c (+39/-12)
Percona-Server/strings/ctype-simple.c (+20/-6)
Percona-Server/strings/ctype-uca.c (+19/-7)
Percona-Server/strings/ctype-utf8.c (+23/-10)
Percona-Server/strings/ctype.c (+2/-0)
Percona-Server/strings/decimal.c (+2/-2)
Percona-Server/support-files/MySQL-shared-compat.spec.sh (+1/-1)
Percona-Server/support-files/mysql.spec.sh (+124/-57)
Percona-Server/tests/mysql_client_test.c (+196/-160)
Percona-Server/unittest/mysys/my_vsnprintf-t.c (+3/-1)
Percona-Server/vio/viossl.c (+3/-0)
build/build-dpkg.sh (+19/-6)
build/build-rpm.sh (+1/-2)
build/debian/control (+5/-4)
build/debian/rules (+2/-2)
build/percona-xtradb-cluster.spec (+35/-30)
build/rpm/mysql-dubious-exports.patch (+158/-0)
doc-ps/source/conf.py (+1/-1)
doc-ps/source/performance/innodb_lazy_drop_table.rst (+5/-0)
doc-ps/source/performance/threadpool.rst (+32/-45)
doc-ps/source/release-notes/Percona-Server-5.5.30-30.2.rst (+78/-0)
doc-ps/source/release-notes/release-notes_index.rst (+1/-0)
doc-ps/source/upstream-bug-fixes.rst (+48/-18)
To merge this branch: bzr merge lp:~raghavendra-prabhu/percona-xtradb-cluster/merge-ps-5.5.31
Reviewer Review Type Date Requested Status
Ignacio Nin (community) Approve
Review via email: mp+165469@code.launchpad.net

Description of the change

@Ignacio:
Need review of packaging merge.

Look at the commit message for conflict details.

To post a comment you must log in.
Revision history for this message
Ignacio Nin (ignacio-nin) wrote :

Raghu, the patch looks good in the build/ files. Of course it needs to be checked for every linux but a priori this is fine.

Q -- What about Percona-Server/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result? Is it necessary? Introduces a lot of noise...

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/BUILD/compile-alpha-debug'
2--- Percona-Server/BUILD/compile-alpha-debug 2010-12-28 23:47:05 +0000
3+++ Percona-Server/BUILD/compile-alpha-debug 2013-05-23 20:25:41 +0000
4@@ -1,6 +1,7 @@
5 #! /bin/sh
6
7-# Copyright (C) 2000, 2005 MySQL AB
8+# Copyright (c) 2000, 2001, 2005-2007 MySQL AB
9+# Use is subject to license terms
10 #
11 # This program is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13
14=== modified file 'Percona-Server/BUILD/compile-amd64-debug-max'
15--- Percona-Server/BUILD/compile-amd64-debug-max 2010-12-28 23:47:05 +0000
16+++ Percona-Server/BUILD/compile-amd64-debug-max 2013-05-23 20:25:41 +0000
17@@ -1,6 +1,7 @@
18 #! /bin/sh
19
20-# Copyright (C) 2005 MySQL AB
21+# Copyright (c) 2005, 2006 MySQL AB
22+# Use is subject to license terms
23 #
24 # This program is free software; you can redistribute it and/or modify
25 # it under the terms of the GNU General Public License as published by
26
27=== modified file 'Percona-Server/BUILD/compile-amd64-max'
28--- Percona-Server/BUILD/compile-amd64-max 2010-12-28 23:47:05 +0000
29+++ Percona-Server/BUILD/compile-amd64-max 2013-05-23 20:25:41 +0000
30@@ -1,6 +1,7 @@
31 #! /bin/sh
32
33-# Copyright (C) 2005 MySQL AB
34+# Copyright (c) 2005, 2006 MySQL AB
35+# Use is subject to license terms
36 #
37 # This program is free software; you can redistribute it and/or modify
38 # it under the terms of the GNU General Public License as published by
39
40=== modified file 'Percona-Server/BUILD/compile-darwin-mwcc'
41--- Percona-Server/BUILD/compile-darwin-mwcc 2010-12-28 23:47:05 +0000
42+++ Percona-Server/BUILD/compile-darwin-mwcc 2013-05-23 20:25:41 +0000
43@@ -1,6 +1,7 @@
44 #! /bin/sh
45
46-# Copyright (C) 2005 MySQL AB
47+# Copyright (c) 2005, 2006 MySQL AB
48+# Use is subject to license terms
49 #
50 # This program is free software; you can redistribute it and/or modify
51 # it under the terms of the GNU General Public License as published by
52
53=== modified file 'Percona-Server/BUILD/compile-hpux11-parisc2-aCC'
54--- Percona-Server/BUILD/compile-hpux11-parisc2-aCC 2010-12-28 23:47:05 +0000
55+++ Percona-Server/BUILD/compile-hpux11-parisc2-aCC 2013-05-23 20:25:41 +0000
56@@ -1,6 +1,7 @@
57 #!/bin/sh
58
59-# Copyright (C) 2004, 2005 MySQL AB
60+# Copyright (c) 2004, 2005, 2007 MySQL AB
61+# Use is subject to license terms
62 #
63 # This program is free software; you can redistribute it and/or modify
64 # it under the terms of the GNU General Public License as published by
65
66=== modified file 'Percona-Server/BUILD/compile-irix-mips64-mipspro'
67--- Percona-Server/BUILD/compile-irix-mips64-mipspro 2010-12-28 23:47:05 +0000
68+++ Percona-Server/BUILD/compile-irix-mips64-mipspro 2013-05-23 20:25:41 +0000
69@@ -1,6 +1,7 @@
70 #!/bin/sh
71
72-# Copyright (C) 2004, 2005 MySQL AB
73+# Copyright (c) 2004, 2005, 2007 MySQL AB
74+# Use is subject to license terms
75 #
76 # This program is free software; you can redistribute it and/or modify
77 # it under the terms of the GNU General Public License as published by
78
79=== modified file 'Percona-Server/BUILD/compile-ndb-autotest'
80--- Percona-Server/BUILD/compile-ndb-autotest 2010-12-29 00:26:31 +0000
81+++ Percona-Server/BUILD/compile-ndb-autotest 2013-05-23 20:25:41 +0000
82@@ -1,6 +1,6 @@
83 #! /bin/sh
84
85-# Copyright (C) 2006 MySQL AB
86+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
87 #
88 # This program is free software; you can redistribute it and/or modify
89 # it under the terms of the GNU General Public License as published by
90
91=== modified file 'Percona-Server/BUILD/compile-pentium'
92--- Percona-Server/BUILD/compile-pentium 2010-12-28 23:47:05 +0000
93+++ Percona-Server/BUILD/compile-pentium 2013-05-23 20:25:41 +0000
94@@ -1,6 +1,7 @@
95 #! /bin/sh
96
97-# Copyright (C) 2000, 2002 MySQL AB
98+# Copyright (c) 2000-2002, 2007 MySQL AB
99+# Use is subject to license terms
100 #
101 # This program is free software; you can redistribute it and/or modify
102 # it under the terms of the GNU General Public License as published by
103
104=== modified file 'Percona-Server/BUILD/compile-pentium-debug-max-no-embedded'
105--- Percona-Server/BUILD/compile-pentium-debug-max-no-embedded 2010-12-28 23:47:05 +0000
106+++ Percona-Server/BUILD/compile-pentium-debug-max-no-embedded 2013-05-23 20:25:41 +0000
107@@ -1,6 +1,7 @@
108 #! /bin/sh
109
110-# Copyright (C) 2004, 2005 MySQL AB
111+# Copyright (c) 2004-2006 MySQL AB
112+# Use is subject to license terms
113 #
114 # This program is free software; you can redistribute it and/or modify
115 # it under the terms of the GNU General Public License as published by
116
117=== modified file 'Percona-Server/BUILD/compile-pentium-debug-max-no-ndb'
118--- Percona-Server/BUILD/compile-pentium-debug-max-no-ndb 2010-12-29 00:26:31 +0000
119+++ Percona-Server/BUILD/compile-pentium-debug-max-no-ndb 2013-05-23 20:25:41 +0000
120@@ -1,6 +1,6 @@
121 #! /bin/sh
122
123-# Copyright (C) 2005, 2007 MySQL AB
124+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
125 #
126 # This program is free software; you can redistribute it and/or modify
127 # it under the terms of the GNU General Public License as published by
128
129=== modified file 'Percona-Server/BUILD/compile-pentium-max'
130--- Percona-Server/BUILD/compile-pentium-max 2010-12-28 23:47:05 +0000
131+++ Percona-Server/BUILD/compile-pentium-max 2013-05-23 20:25:41 +0000
132@@ -1,6 +1,7 @@
133 #! /bin/sh
134
135-# Copyright (C) 2001, 2005 MySQL AB
136+# Copyright (c) 2001-2006 MySQL AB
137+# Use is subject to license terms
138 #
139 # This program is free software; you can redistribute it and/or modify
140 # it under the terms of the GNU General Public License as published by
141
142=== modified file 'Percona-Server/BUILD/compile-pentium-pgcc'
143--- Percona-Server/BUILD/compile-pentium-pgcc 2010-12-28 23:47:05 +0000
144+++ Percona-Server/BUILD/compile-pentium-pgcc 2013-05-23 20:25:41 +0000
145@@ -1,6 +1,7 @@
146 #! /bin/sh
147
148-# Copyright (C) 2000, 2005 MySQL AB
149+# Copyright (c) 2000, 2001, 2005, 2007 MySQL AB
150+# Use is subject to license terms
151 #
152 # This program is free software; you can redistribute it and/or modify
153 # it under the terms of the GNU General Public License as published by
154
155=== modified file 'Percona-Server/BUILD/compile-ppc-debug'
156--- Percona-Server/BUILD/compile-ppc-debug 2010-12-28 23:47:05 +0000
157+++ Percona-Server/BUILD/compile-ppc-debug 2013-05-23 20:25:41 +0000
158@@ -1,6 +1,7 @@
159 #! /bin/sh
160
161-# Copyright (C) 2004 MySQL AB
162+# Copyright (c) 2004, 2006 MySQL AB
163+# Use is subject to license terms
164 #
165 # This program is free software; you can redistribute it and/or modify
166 # it under the terms of the GNU General Public License as published by
167
168=== modified file 'Percona-Server/BUILD/compile-ppc-debug-max'
169--- Percona-Server/BUILD/compile-ppc-debug-max 2010-12-28 23:47:05 +0000
170+++ Percona-Server/BUILD/compile-ppc-debug-max 2013-05-23 20:25:41 +0000
171@@ -1,6 +1,7 @@
172 #! /bin/sh
173
174-# Copyright (C) 2004, 2005 MySQL AB
175+# Copyright (c) 2004-2006 MySQL AB
176+# Use is subject to license terms
177 #
178 # This program is free software; you can redistribute it and/or modify
179 # it under the terms of the GNU General Public License as published by
180
181=== modified file 'Percona-Server/BUILD/compile-ppc-debug-max-no-ndb'
182--- Percona-Server/BUILD/compile-ppc-debug-max-no-ndb 2010-12-28 23:47:05 +0000
183+++ Percona-Server/BUILD/compile-ppc-debug-max-no-ndb 2013-05-23 20:25:41 +0000
184@@ -1,6 +1,7 @@
185 #! /bin/sh
186
187-# Copyright (C) 2005 MySQL AB
188+# Copyright (c) 2005, 2006 MySQL AB
189+# Use is subject to license terms
190 #
191 # This program is free software; you can redistribute it and/or modify
192 # it under the terms of the GNU General Public License as published by
193
194=== modified file 'Percona-Server/BUILD/compile-ppc-max'
195--- Percona-Server/BUILD/compile-ppc-max 2010-12-28 23:47:05 +0000
196+++ Percona-Server/BUILD/compile-ppc-max 2013-05-23 20:25:41 +0000
197@@ -1,6 +1,7 @@
198 #! /bin/sh
199
200-# Copyright (C) 2004, 2005 MySQL AB
201+# Copyright (c) 2004-2006 MySQL AB
202+# Use is subject to license terms
203 #
204 # This program is free software; you can redistribute it and/or modify
205 # it under the terms of the GNU General Public License as published by
206
207=== modified file 'Percona-Server/BUILD/compile-solaris-sparc-debug'
208--- Percona-Server/BUILD/compile-solaris-sparc-debug 2010-12-28 23:47:05 +0000
209+++ Percona-Server/BUILD/compile-solaris-sparc-debug 2013-05-23 20:25:41 +0000
210@@ -1,6 +1,7 @@
211 #!/bin/sh
212
213-# Copyright (C) 2001, 2005 MySQL AB
214+# Copyright (c) 2001, 2002, 2005-2007 MySQL AB
215+# Use is subject to license terms
216 #
217 # This program is free software; you can redistribute it and/or modify
218 # it under the terms of the GNU General Public License as published by
219
220=== modified file 'Percona-Server/BUILD/compile-solaris-sparc-purify'
221--- Percona-Server/BUILD/compile-solaris-sparc-purify 2010-12-28 23:47:05 +0000
222+++ Percona-Server/BUILD/compile-solaris-sparc-purify 2013-05-23 20:25:41 +0000
223@@ -1,6 +1,7 @@
224 #! /bin/sh
225
226-# Copyright (C) 2000, 2005 MySQL AB
227+# Copyright (c) 2000-2002, 2005-2007 MySQL AB
228+# Use is subject to license terms
229 #
230 # This program is free software; you can redistribute it and/or modify
231 # it under the terms of the GNU General Public License as published by
232
233=== modified file 'Percona-Server/VERSION'
234--- Percona-Server/VERSION 2013-03-21 16:54:18 +0000
235+++ Percona-Server/VERSION 2013-05-23 20:25:41 +0000
236@@ -1,4 +1,4 @@
237 MYSQL_VERSION_MAJOR=5
238 MYSQL_VERSION_MINOR=5
239-MYSQL_VERSION_PATCH=30
240+MYSQL_VERSION_PATCH=31
241 MYSQL_VERSION_EXTRA=
242
243=== modified file 'Percona-Server/client/client_priv.h'
244--- Percona-Server/client/client_priv.h 2012-08-07 06:10:00 +0000
245+++ Percona-Server/client/client_priv.h 2013-05-23 20:25:41 +0000
246@@ -1,5 +1,5 @@
247 /*
248- Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
249+ Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
250
251 This program is free software; you can redistribute it and/or modify
252 it under the terms of the GNU General Public License as published by
253
254=== modified file 'Percona-Server/client/completion_hash.h'
255--- Percona-Server/client/completion_hash.h 2010-12-28 18:57:23 +0000
256+++ Percona-Server/client/completion_hash.h 2013-05-23 20:25:41 +0000
257@@ -1,4 +1,5 @@
258-/* Copyright (C) 2000-2002 MySQL AB
259+/* Copyright (c) 2000-2002, 2006 MySQL AB
260+ Use is subject to license terms
261
262 This program is free software; you can redistribute it and/or
263 modify it under the terms of the GNU Library General Public
264
265=== modified file 'Percona-Server/client/echo.c'
266--- Percona-Server/client/echo.c 2007-03-20 17:31:49 +0000
267+++ Percona-Server/client/echo.c 2013-05-23 20:25:41 +0000
268@@ -1,4 +1,5 @@
269-/* Copyright (C) 2000 MySQL AB
270+/* Copyright (c) 2000, 2007 MySQL AB
271+ Use is subject to license terms
272
273 This program is free software; you can redistribute it and/or modify
274 it under the terms of the GNU General Public License as published by
275
276=== modified file 'Percona-Server/client/get_password.c'
277--- Percona-Server/client/get_password.c 2008-02-19 17:45:11 +0000
278+++ Percona-Server/client/get_password.c 2013-05-23 20:25:41 +0000
279@@ -1,4 +1,5 @@
280-/* Copyright (C) 2000 MySQL AB
281+/* Copyright (c) 2000, 2001, 2003, 2006, 2008 MySQL AB
282+ Use is subject to license terms
283
284 This program is free software; you can redistribute it and/or modify
285 it under the terms of the GNU General Public License as published by
286
287=== modified file 'Percona-Server/client/mysqlcheck.c'
288--- Percona-Server/client/mysqlcheck.c 2012-08-07 13:37:13 +0000
289+++ Percona-Server/client/mysqlcheck.c 2013-05-23 20:25:41 +0000
290@@ -15,7 +15,7 @@
291 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
292 */
293
294-#define CHECK_VERSION "2.5.0"
295+#define CHECK_VERSION "2.5.1"
296
297 #include "client_priv.h"
298 #include <m_ctype.h>
299@@ -29,6 +29,10 @@
300 #define EX_USAGE 1
301 #define EX_MYSQLERR 2
302
303+/* ALTER instead of repair. */
304+#define MAX_ALTER_STR_SIZE 128 * 1024
305+#define KEY_PARTITIONING_CHANGED_STR "KEY () partitioning changed"
306+
307 static MYSQL mysql_connection, *sock = 0;
308 static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
309 opt_compress = 0, opt_databases = 0, opt_fast = 0,
310@@ -44,7 +48,7 @@
311 *default_charset= 0, *current_host= 0;
312 static char *opt_plugin_dir= 0, *opt_default_auth= 0;
313 static int first_error = 0;
314-DYNAMIC_ARRAY tables4repair, tables4rebuild;
315+DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
316 #ifdef HAVE_SMEM
317 static char *shared_memory_base_name=0;
318 #endif
319@@ -591,6 +595,17 @@
320 } /* process_all_tables_in_db */
321
322
323+static int run_query(const char *query)
324+{
325+ if (mysql_query(sock, query))
326+ {
327+ fprintf(stderr, "Failed to %s\n", query);
328+ fprintf(stderr, "Error: %s\n", mysql_error(sock));
329+ return 1;
330+ }
331+ return 0;
332+}
333+
334
335 static int fix_table_storage_name(const char *name)
336 {
337@@ -599,12 +614,7 @@
338 if (strncmp(name, "#mysql50#", 9))
339 return 1;
340 sprintf(qbuf, "RENAME TABLE `%s` TO `%s`", name, name + 9);
341- if (mysql_query(sock, qbuf))
342- {
343- fprintf(stderr, "Failed to %s\n", qbuf);
344- fprintf(stderr, "Error: %s\n", mysql_error(sock));
345- rc= 1;
346- }
347+ rc= run_query(qbuf);
348 if (verbose)
349 printf("%-50s %s\n", name, rc ? "FAILED" : "OK");
350 return rc;
351@@ -617,12 +627,7 @@
352 if (strncmp(name, "#mysql50#", 9))
353 return 1;
354 sprintf(qbuf, "ALTER DATABASE `%s` UPGRADE DATA DIRECTORY NAME", name);
355- if (mysql_query(sock, qbuf))
356- {
357- fprintf(stderr, "Failed to %s\n", qbuf);
358- fprintf(stderr, "Error: %s\n", mysql_error(sock));
359- rc= 1;
360- }
361+ rc= run_query(qbuf);
362 if (verbose)
363 printf("%-50s %s\n", name, rc ? "FAILED" : "OK");
364 return rc;
365@@ -685,13 +690,7 @@
366 static int disable_binlog()
367 {
368 const char *stmt= "SET SQL_LOG_BIN=0";
369- if (mysql_query(sock, stmt))
370- {
371- fprintf(stderr, "Failed to %s\n", stmt);
372- fprintf(stderr, "Error: %s\n", mysql_error(sock));
373- return 1;
374- }
375- return 0;
376+ return run_query(stmt);
377 }
378
379 static int handle_request_for_tables(char *tables, uint length)
380@@ -761,12 +760,14 @@
381 MYSQL_RES *res;
382 MYSQL_ROW row;
383 char prev[NAME_LEN*2+2];
384+ char prev_alter[MAX_ALTER_STR_SIZE];
385 uint i;
386 my_bool found_error=0, table_rebuild=0;
387
388 res = mysql_use_result(sock);
389
390 prev[0] = '\0';
391+ prev_alter[0]= 0;
392 for (i = 0; (row = mysql_fetch_row(res)); i++)
393 {
394 int changed = strcmp(prev, row[0]);
395@@ -783,12 +784,18 @@
396 strcmp(row[3],"OK"))
397 {
398 if (table_rebuild)
399- insert_dynamic(&tables4rebuild, (uchar*) prev);
400+ {
401+ if (prev_alter[0])
402+ insert_dynamic(&alter_table_cmds, (uchar*) prev_alter);
403+ else
404+ insert_dynamic(&tables4rebuild, (uchar*) prev);
405+ }
406 else
407 insert_dynamic(&tables4repair, (uchar*) prev);
408 }
409 found_error=0;
410 table_rebuild=0;
411+ prev_alter[0]= 0;
412 if (opt_silent)
413 continue;
414 }
415@@ -797,11 +804,30 @@
416 else if (!status && changed)
417 {
418 printf("%s\n%-9s: %s", row[0], row[2], row[3]);
419- if (strcmp(row[2],"note"))
420+ if (opt_auto_repair && strcmp(row[2],"note"))
421 {
422- found_error=1;
423- if (opt_auto_repair && strstr(row[3], "ALTER TABLE") != NULL)
424+ const char *alter_txt= strstr(row[3], "ALTER TABLE");
425+ found_error=1;
426+ if (alter_txt)
427+ {
428 table_rebuild=1;
429+ if (!strncmp(row[3], KEY_PARTITIONING_CHANGED_STR,
430+ strlen(KEY_PARTITIONING_CHANGED_STR)) &&
431+ strstr(alter_txt, "PARTITION BY"))
432+ {
433+ if (strlen(alter_txt) >= MAX_ALTER_STR_SIZE)
434+ {
435+ printf("Error: Alter command too long (>= %d),"
436+ " please do \"%s\" or dump/reload to fix it!\n",
437+ MAX_ALTER_STR_SIZE,
438+ alter_txt);
439+ table_rebuild= 0;
440+ prev_alter[0]= 0;
441+ }
442+ else
443+ strcpy(prev_alter, alter_txt);
444+ }
445+ }
446 }
447 }
448 else
449@@ -813,7 +839,12 @@
450 if (found_error && opt_auto_repair && what_to_do != DO_REPAIR)
451 {
452 if (table_rebuild)
453- insert_dynamic(&tables4rebuild, (uchar*) prev);
454+ {
455+ if (prev_alter[0])
456+ insert_dynamic(&alter_table_cmds, (uchar*) prev_alter);
457+ else
458+ insert_dynamic(&tables4rebuild, (uchar*) prev);
459+ }
460 else
461 insert_dynamic(&tables4repair, (uchar*) prev);
462 }
463@@ -915,7 +946,8 @@
464
465 if (opt_auto_repair &&
466 (my_init_dynamic_array(&tables4repair, sizeof(char)*(NAME_LEN*2+2),16,64) ||
467- my_init_dynamic_array(&tables4rebuild, sizeof(char)*(NAME_LEN*2+2),16,64)))
468+ my_init_dynamic_array(&tables4rebuild, sizeof(char)*(NAME_LEN*2+2),16,64) ||
469+ my_init_dynamic_array(&alter_table_cmds, MAX_ALTER_STR_SIZE, 0, 1)))
470 {
471 first_error = 1;
472 goto end;
473@@ -943,6 +975,8 @@
474 }
475 for (i = 0; i < tables4rebuild.elements ; i++)
476 rebuild_table((char*) dynamic_array_ptr(&tables4rebuild, i));
477+ for (i = 0; i < alter_table_cmds.elements ; i++)
478+ run_query((char*) dynamic_array_ptr(&alter_table_cmds, i));
479 }
480 end:
481 dbDisconnect(current_host);
482
483=== modified file 'Percona-Server/client/mysqldump.c'
484--- Percona-Server/client/mysqldump.c 2013-04-18 16:15:44 +0000
485+++ Percona-Server/client/mysqldump.c 2013-05-23 20:25:41 +0000
486@@ -1,5 +1,5 @@
487 /*
488- Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
489+ Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
490
491 This program is free software; you can redistribute it and/or modify
492 it under the terms of the GNU General Public License as published by
493
494=== modified file 'Percona-Server/client/mysqltest.cc'
495--- Percona-Server/client/mysqltest.cc 2013-03-21 16:54:18 +0000
496+++ Percona-Server/client/mysqltest.cc 2013-05-23 20:25:41 +0000
497@@ -4075,7 +4075,10 @@
498 cur_con->name, ds_user.str, ds_passwd.str, ds_db.str));
499
500 if (mysql_change_user(mysql, ds_user.str, ds_passwd.str, ds_db.str))
501- die("change user failed: %s", mysql_error(mysql));
502+ handle_error(command, mysql_errno(mysql), mysql_error(mysql),
503+ mysql_sqlstate(mysql), &ds_res);
504+ else
505+ handle_no_error(command);
506
507 dynstr_free(&ds_user);
508 dynstr_free(&ds_passwd);
509
510=== modified file 'Percona-Server/client/sql_string.cc'
511--- Percona-Server/client/sql_string.cc 2012-10-10 20:32:32 +0000
512+++ Percona-Server/client/sql_string.cc 2013-05-23 20:25:41 +0000
513@@ -1,5 +1,5 @@
514 /*
515- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
516+ Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
517
518 This program is free software; you can redistribute it and/or modify
519 it under the terms of the GNU General Public License as published by
520@@ -735,7 +735,7 @@
521 {
522 if (from->Alloced_length >= from_length)
523 return from;
524- if (from->alloced || !to || from == to)
525+ if ((from->alloced && (from->Alloced_length != 0)) || !to || from == to)
526 {
527 (void) from->realloc(from_length);
528 return from;
529
530=== modified file 'Percona-Server/cmake/configure.pl'
531--- Percona-Server/cmake/configure.pl 2013-01-16 01:34:54 +0000
532+++ Percona-Server/cmake/configure.pl 2013-05-23 20:25:41 +0000
533@@ -1,6 +1,6 @@
534 #!/usr/bin/perl
535
536-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
537+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
538 #
539 # This program is free software; you can redistribute it and/or modify
540 # it under the terms of the GNU General Public License as published by
541
542=== modified file 'Percona-Server/cmake/create_initial_db.cmake.in'
543--- Percona-Server/cmake/create_initial_db.cmake.in 2012-10-03 14:05:07 +0000
544+++ Percona-Server/cmake/create_initial_db.cmake.in 2013-05-23 20:25:41 +0000
545@@ -1,4 +1,4 @@
546-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
547+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
548 #
549 # This program is free software; you can redistribute it and/or modify
550 # it under the terms of the GNU General Public License as published by
551
552=== modified file 'Percona-Server/cmake/make_dist.cmake.in'
553--- Percona-Server/cmake/make_dist.cmake.in 2012-03-22 15:16:11 +0000
554+++ Percona-Server/cmake/make_dist.cmake.in 2013-05-23 20:25:41 +0000
555@@ -1,4 +1,4 @@
556-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
557+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
558 #
559 # This program is free software; you can redistribute it and/or modify
560 # it under the terms of the GNU General Public License as published by
561
562=== modified file 'Percona-Server/cmake/mysql_version.cmake'
563--- Percona-Server/cmake/mysql_version.cmake 2012-10-23 11:41:34 +0000
564+++ Percona-Server/cmake/mysql_version.cmake 2013-05-23 20:25:41 +0000
565@@ -1,4 +1,4 @@
566-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
567+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
568 #
569 # This program is free software; you can redistribute it and/or modify
570 # it under the terms of the GNU General Public License as published by
571
572=== modified file 'Percona-Server/cmake/package_name.cmake'
573--- Percona-Server/cmake/package_name.cmake 2012-10-23 11:41:34 +0000
574+++ Percona-Server/cmake/package_name.cmake 2013-05-23 20:25:41 +0000
575@@ -1,4 +1,4 @@
576-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
577+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
578 #
579 # This program is free software; you can redistribute it and/or modify
580 # it under the terms of the GNU General Public License as published by
581
582=== modified file 'Percona-Server/cmake/plugin.cmake'
583--- Percona-Server/cmake/plugin.cmake 2012-10-24 15:06:43 +0000
584+++ Percona-Server/cmake/plugin.cmake 2013-05-23 20:25:41 +0000
585@@ -1,4 +1,4 @@
586-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
587+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
588 #
589 # This program is free software; you can redistribute it and/or modify
590 # it under the terms of the GNU General Public License as published by
591
592=== modified file 'Percona-Server/cmake/ssl.cmake'
593--- Percona-Server/cmake/ssl.cmake 2012-07-24 13:15:58 +0000
594+++ Percona-Server/cmake/ssl.cmake 2013-05-23 20:25:41 +0000
595@@ -1,4 +1,4 @@
596-# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
597+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
598 #
599 # This program is free software; you can redistribute it and/or modify
600 # it under the terms of the GNU General Public License as published by
601
602=== modified file 'Percona-Server/cmake/zlib.cmake'
603--- Percona-Server/cmake/zlib.cmake 2011-06-30 15:46:53 +0000
604+++ Percona-Server/cmake/zlib.cmake 2013-05-23 20:25:41 +0000
605@@ -57,13 +57,17 @@
606 INCLUDE(CheckFunctionExists)
607 SET(CMAKE_REQUIRED_LIBRARIES z)
608 CHECK_FUNCTION_EXISTS(crc32 HAVE_CRC32)
609+ CHECK_FUNCTION_EXISTS(compressBound HAVE_COMPRESSBOUND)
610+ CHECK_FUNCTION_EXISTS(deflateBound HAVE_DEFLATEBOUND)
611 SET(CMAKE_REQUIRED_LIBRARIES)
612- IF(HAVE_CRC32)
613+ IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
614 SET(ZLIB_LIBRARY z CACHE INTERNAL "System zlib library")
615- SET(WITH_ZLIB "system" CACHE STRING "Which zlib to use (possible values are 'bundled' or 'system')")
616+ SET(WITH_ZLIB "system" CACHE STRING
617+ "Which zlib to use (possible values are 'bundled' or 'system')")
618 SET(ZLIB_SOURCES "")
619 ELSE()
620 SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
621+ MESSAGE(STATUS "system zlib found but not usable")
622 ENDIF()
623 ENDIF()
624 IF(NOT ZLIB_FOUND)
625
626=== modified file 'Percona-Server/configure.cmake'
627--- Percona-Server/configure.cmake 2013-02-06 07:02:45 +0000
628+++ Percona-Server/configure.cmake 2013-05-23 20:25:41 +0000
629@@ -1,5 +1,5 @@
630
631-# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
632+# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
633 #
634 # This program is free software; you can redistribute it and/or modify
635 # it under the terms of the GNU General Public License as published by
636
637=== modified file 'Percona-Server/extra/charset2html.c'
638--- Percona-Server/extra/charset2html.c 2008-03-29 14:15:06 +0000
639+++ Percona-Server/extra/charset2html.c 2013-05-23 20:25:41 +0000
640@@ -1,4 +1,5 @@
641-/* Copyright (C) 2000 MySQL AB
642+/* Copyright (c) 2000, 2002-2004, 2007, 2008 MySQL AB
643+ Use is subject to license terms
644
645 This program is free software; you can redistribute it and/or modify
646 it under the terms of the GNU General Public License as published by
647
648=== modified file 'Percona-Server/extra/yassl/CMakeLists.txt'
649--- Percona-Server/extra/yassl/CMakeLists.txt 2012-02-13 12:44:54 +0000
650+++ Percona-Server/extra/yassl/CMakeLists.txt 2013-05-23 20:25:41 +0000
651@@ -1,4 +1,4 @@
652-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
653+# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
654 #
655 # This program is free software; you can redistribute it and/or modify
656 # it under the terms of the GNU General Public License as published by
657
658=== modified file 'Percona-Server/extra/yassl/examples/client/client.cpp'
659--- Percona-Server/extra/yassl/examples/client/client.cpp 2012-02-10 14:33:27 +0000
660+++ Percona-Server/extra/yassl/examples/client/client.cpp 2013-05-23 20:25:41 +0000
661@@ -1,5 +1,5 @@
662 /*
663- Copyright (C) 2006 MySQL AB
664+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
665
666 This program is free software; you can redistribute it and/or modify
667 it under the terms of the GNU General Public License as published by
668
669=== modified file 'Percona-Server/extra/yassl/examples/echoclient/echoclient.cpp'
670--- Percona-Server/extra/yassl/examples/echoclient/echoclient.cpp 2012-02-10 14:33:27 +0000
671+++ Percona-Server/extra/yassl/examples/echoclient/echoclient.cpp 2013-05-23 20:25:41 +0000
672@@ -1,5 +1,5 @@
673 /*
674- Copyright (C) 2006 MySQL AB
675+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
676
677 This program is free software; you can redistribute it and/or modify
678 it under the terms of the GNU General Public License as published by
679
680=== modified file 'Percona-Server/extra/yassl/examples/echoserver/echoserver.cpp'
681--- Percona-Server/extra/yassl/examples/echoserver/echoserver.cpp 2012-02-10 14:33:27 +0000
682+++ Percona-Server/extra/yassl/examples/echoserver/echoserver.cpp 2013-05-23 20:25:41 +0000
683@@ -1,5 +1,5 @@
684 /*
685- Copyright (C) 2006 MySQL AB
686+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
687
688 This program is free software; you can redistribute it and/or modify
689 it under the terms of the GNU General Public License as published by
690
691=== modified file 'Percona-Server/extra/yassl/examples/server/server.cpp'
692--- Percona-Server/extra/yassl/examples/server/server.cpp 2012-02-10 14:33:27 +0000
693+++ Percona-Server/extra/yassl/examples/server/server.cpp 2013-05-23 20:25:41 +0000
694@@ -1,5 +1,5 @@
695 /*
696- Copyright (C) 2006 MySQL AB
697+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
698
699 This program is free software; you can redistribute it and/or modify
700 it under the terms of the GNU General Public License as published by
701
702=== modified file 'Percona-Server/extra/yassl/include/buffer.hpp'
703--- Percona-Server/extra/yassl/include/buffer.hpp 2012-02-13 11:40:12 +0000
704+++ Percona-Server/extra/yassl/include/buffer.hpp 2013-05-23 20:25:41 +0000
705@@ -1,5 +1,5 @@
706 /*
707- Copyright (C) 2000-2007 MySQL AB
708+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
709
710 This program is free software; you can redistribute it and/or modify
711 it under the terms of the GNU General Public License as published by
712
713=== modified file 'Percona-Server/extra/yassl/include/cert_wrapper.hpp'
714--- Percona-Server/extra/yassl/include/cert_wrapper.hpp 2012-02-10 09:41:54 +0000
715+++ Percona-Server/extra/yassl/include/cert_wrapper.hpp 2013-05-23 20:25:41 +0000
716@@ -1,6 +1,5 @@
717 /*
718- Copyright (c) 2005-2007 MySQL AB, 2008 Sun Microsystems, Inc.
719- Use is subject to license terms.
720+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
721
722 This program is free software; you can redistribute it and/or modify
723 it under the terms of the GNU General Public License as published by
724
725=== modified file 'Percona-Server/extra/yassl/include/lock.hpp'
726--- Percona-Server/extra/yassl/include/lock.hpp 2012-11-21 13:44:15 +0000
727+++ Percona-Server/extra/yassl/include/lock.hpp 2013-05-23 20:25:41 +0000
728@@ -1,5 +1,5 @@
729 /*
730- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
731+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
732
733 This program is free software; you can redistribute it and/or modify
734 it under the terms of the GNU General Public License as published by
735
736=== modified file 'Percona-Server/extra/yassl/include/openssl/prefix_ssl.h'
737--- Percona-Server/extra/yassl/include/openssl/prefix_ssl.h 2012-02-10 09:39:51 +0000
738+++ Percona-Server/extra/yassl/include/openssl/prefix_ssl.h 2013-05-23 20:25:41 +0000
739@@ -1,6 +1,5 @@
740 /*
741- Copyright (c) 2006, 2007 MySQL AB, 2008 Sun Microsystems, Inc.
742- Use is subject to license terms.
743+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
744
745 This program is free software; you can redistribute it and/or modify
746 it under the terms of the GNU General Public License as published by
747
748=== modified file 'Percona-Server/extra/yassl/include/socket_wrapper.hpp'
749--- Percona-Server/extra/yassl/include/socket_wrapper.hpp 2012-02-13 11:40:12 +0000
750+++ Percona-Server/extra/yassl/include/socket_wrapper.hpp 2013-05-23 20:25:41 +0000
751@@ -1,5 +1,5 @@
752 /*
753- Copyright (C) 2000-2007 MySQL AB
754+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
755
756 This program is free software; you can redistribute it and/or modify
757 it under the terms of the GNU General Public License as published by
758
759=== modified file 'Percona-Server/extra/yassl/include/yassl_error.hpp'
760--- Percona-Server/extra/yassl/include/yassl_error.hpp 2012-11-21 13:44:15 +0000
761+++ Percona-Server/extra/yassl/include/yassl_error.hpp 2013-05-23 20:25:41 +0000
762@@ -1,6 +1,5 @@
763 /*
764- Copyright (c) 2005-2007 MySQL AB, 2010 Sun Microsystems, Inc.
765- Use is subject to license terms.
766+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
767
768 This program is free software; you can redistribute it and/or modify
769 it under the terms of the GNU General Public License as published by
770@@ -53,7 +52,8 @@
771 badVersion_error = 117,
772 compress_error = 118,
773 decompress_error = 119,
774- pms_version_error = 120
775+ pms_version_error = 120,
776+ sanityCipher_error = 121
777
778 // !!!! add error message to .cpp !!!!
779
780
781=== modified file 'Percona-Server/extra/yassl/include/yassl_imp.hpp'
782--- Percona-Server/extra/yassl/include/yassl_imp.hpp 2012-02-10 09:41:54 +0000
783+++ Percona-Server/extra/yassl/include/yassl_imp.hpp 2013-05-23 20:25:41 +0000
784@@ -1,6 +1,5 @@
785 /*
786- Copyright (c) 2005-2007 MySQL AB, 2008 Sun Microsystems, Inc.
787- Use is subject to license terms.
788+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
789
790 This program is free software; you can redistribute it and/or modify
791 it under the terms of the GNU General Public License as published by
792
793=== modified file 'Percona-Server/extra/yassl/include/yassl_int.hpp'
794--- Percona-Server/extra/yassl/include/yassl_int.hpp 2012-02-13 12:44:54 +0000
795+++ Percona-Server/extra/yassl/include/yassl_int.hpp 2013-05-23 20:25:41 +0000
796@@ -1,5 +1,5 @@
797 /*
798- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
799+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
800
801 This program is free software; you can redistribute it and/or modify
802 it under the terms of the GNU General Public License as published by
803
804=== modified file 'Percona-Server/extra/yassl/include/yassl_types.hpp'
805--- Percona-Server/extra/yassl/include/yassl_types.hpp 2012-02-13 12:44:54 +0000
806+++ Percona-Server/extra/yassl/include/yassl_types.hpp 2013-05-23 20:25:41 +0000
807@@ -1,6 +1,5 @@
808 /*
809- Copyright (c) 2005-2007 MySQL AB, 2008 Sun Microsystems, Inc.
810- Use is subject to license terms.
811+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
812
813 This program is free software; you can redistribute it and/or modify
814 it under the terms of the GNU General Public License as published by
815@@ -220,7 +219,11 @@
816 const int MAX_RECORD_SIZE = 16384; // 2^14, max size by standard
817 const int COMPRESS_EXTRA = 1024; // extra compression possible addition
818 const int SESSION_FLUSH_COUNT = 256; // when to flush session cache
819-
820+const int MAX_PAD_SIZE = 256; // max TLS padding size
821+const int COMPRESS_CONSTANT = 13; // compression calculation constant
822+const int COMPRESS_UPPER = 55; // compression calculation numerator
823+const int COMPRESS_LOWER = 64; // compression calculation denominator
824+const int COMPRESS_DUMMY_SIZE = 64; // compression dummy round size
825
826 typedef uint8 Cipher; // first byte is always 0x00 for SSLv3 & TLS
827
828
829=== modified file 'Percona-Server/extra/yassl/src/buffer.cpp'
830--- Percona-Server/extra/yassl/src/buffer.cpp 2012-02-13 12:44:54 +0000
831+++ Percona-Server/extra/yassl/src/buffer.cpp 2013-05-23 20:25:41 +0000
832@@ -1,6 +1,5 @@
833 /*
834- Copyright (c) 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc.
835- Use is subject to license terms.
836+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
837
838 This program is free software; you can redistribute it and/or modify
839 it under the terms of the GNU General Public License as published by
840
841=== modified file 'Percona-Server/extra/yassl/src/cert_wrapper.cpp'
842--- Percona-Server/extra/yassl/src/cert_wrapper.cpp 2012-11-21 13:44:15 +0000
843+++ Percona-Server/extra/yassl/src/cert_wrapper.cpp 2013-05-23 20:25:41 +0000
844@@ -1,6 +1,5 @@
845 /*
846- Copyright (c) 2005-2007 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
847- Use is subject to license terms.
848+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
849
850 This program is free software; you can redistribute it and/or modify
851 it under the terms of the GNU General Public License as published by
852
853=== modified file 'Percona-Server/extra/yassl/src/crypto_wrapper.cpp'
854--- Percona-Server/extra/yassl/src/crypto_wrapper.cpp 2012-02-13 12:44:54 +0000
855+++ Percona-Server/extra/yassl/src/crypto_wrapper.cpp 2013-05-23 20:25:41 +0000
856@@ -1,5 +1,5 @@
857 /*
858- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
859+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
860
861 This program is free software; you can redistribute it and/or modify
862 it under the terms of the GNU General Public License as published by
863
864=== modified file 'Percona-Server/extra/yassl/src/handshake.cpp'
865--- Percona-Server/extra/yassl/src/handshake.cpp 2013-03-21 16:54:18 +0000
866+++ Percona-Server/extra/yassl/src/handshake.cpp 2013-05-23 20:25:41 +0000
867@@ -1,6 +1,5 @@
868 /*
869- Copyright (c) 2005-2008 MySQL AB, 2009 Sun Microsystems, Inc.
870- Use is subject to license terms.
871+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
872
873 This program is free software; you can redistribute it and/or modify
874 it under the terms of the GNU General Public License as published by
875@@ -221,12 +220,45 @@
876 }
877
878
879+// sanity checks on encrypted message size
880+static int sanity_check_message(SSL& ssl, uint msgSz)
881+{
882+ uint minSz = 0;
883+
884+ if (ssl.getSecurity().get_parms().cipher_type_ == block) {
885+ uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
886+ if (msgSz % blockSz)
887+ return -1;
888+
889+ minSz = ssl.getSecurity().get_parms().hash_size_ + 1; // pad byte too
890+ if (blockSz > minSz)
891+ minSz = blockSz;
892+
893+ if (ssl.isTLSv1_1())
894+ minSz += blockSz; // explicit IV
895+ }
896+ else { // stream
897+ minSz = ssl.getSecurity().get_parms().hash_size_;
898+ }
899+
900+ if (msgSz < minSz)
901+ return -1;
902+
903+ return 0;
904+}
905+
906+
907 // decrypt input message in place, store size in case needed later
908 void decrypt_message(SSL& ssl, input_buffer& input, uint sz)
909 {
910 input_buffer plain(sz);
911 opaque* cipher = input.get_buffer() + input.get_current();
912
913+ if (sanity_check_message(ssl, sz) != 0) {
914+ ssl.SetError(sanityCipher_error);
915+ return;
916+ }
917+
918 ssl.useCrypto().use_cipher().decrypt(plain.get_buffer(), cipher, sz);
919 memcpy(cipher, plain.get_buffer(), sz);
920 ssl.useSecurity().use_parms().encrypt_size_ = sz;
921@@ -774,6 +806,8 @@
922 return 0;
923 }
924 decrypt_message(ssl, buffer, hdr.length_);
925+ if (ssl.GetError())
926+ return 0;
927 }
928
929 mySTL::auto_ptr<Message> msg(mf.CreateObject(hdr.type_));
930
931=== modified file 'Percona-Server/extra/yassl/src/lock.cpp'
932--- Percona-Server/extra/yassl/src/lock.cpp 2012-11-21 13:44:15 +0000
933+++ Percona-Server/extra/yassl/src/lock.cpp 2013-05-23 20:25:41 +0000
934@@ -1,5 +1,5 @@
935 /*
936- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
937+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
938
939 This program is free software; you can redistribute it and/or modify
940 it under the terms of the GNU General Public License as published by
941
942=== modified file 'Percona-Server/extra/yassl/src/make.bat'
943--- Percona-Server/extra/yassl/src/make.bat 2012-02-10 14:33:27 +0000
944+++ Percona-Server/extra/yassl/src/make.bat 2013-05-23 20:25:41 +0000
945@@ -1,4 +1,4 @@
946-REM Copyright (C) 2006, 2007 MySQL AB
947+REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
948 REM
949 REM This program is free software; you can redistribute it and/or modify
950 REM it under the terms of the GNU General Public License as published by
951
952=== modified file 'Percona-Server/extra/yassl/src/socket_wrapper.cpp'
953--- Percona-Server/extra/yassl/src/socket_wrapper.cpp 2012-02-13 12:44:54 +0000
954+++ Percona-Server/extra/yassl/src/socket_wrapper.cpp 2013-05-23 20:25:41 +0000
955@@ -1,5 +1,5 @@
956 /*
957- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
958+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
959
960 This program is free software; you can redistribute it and/or modify
961 it under the terms of the GNU General Public License as published by
962
963=== modified file 'Percona-Server/extra/yassl/src/ssl.cpp'
964--- Percona-Server/extra/yassl/src/ssl.cpp 2012-11-21 13:44:15 +0000
965+++ Percona-Server/extra/yassl/src/ssl.cpp 2013-05-23 20:25:41 +0000
966@@ -1,6 +1,5 @@
967 /*
968- Copyright (c) 2005-2007 MySQL AB, 2008-2010 Sun Microsystems, Inc.
969- Use is subject to license terms.
970+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
971
972 This program is free software; you can redistribute it and/or modify
973 it under the terms of the GNU General Public License as published by
974
975=== modified file 'Percona-Server/extra/yassl/src/template_instnt.cpp'
976--- Percona-Server/extra/yassl/src/template_instnt.cpp 2009-05-15 12:57:51 +0000
977+++ Percona-Server/extra/yassl/src/template_instnt.cpp 2013-05-23 20:25:41 +0000
978@@ -1,5 +1,6 @@
979 /*
980- Copyright (C) 2000-2007 MySQL AB
981+ Copyright (c) 2000-2008 MySQL AB
982+ Use is subject to license terms
983
984 This program is free software; you can redistribute it and/or modify
985 it under the terms of the GNU General Public License as published by
986
987=== modified file 'Percona-Server/extra/yassl/src/yassl.cpp'
988--- Percona-Server/extra/yassl/src/yassl.cpp 2012-02-10 14:33:27 +0000
989+++ Percona-Server/extra/yassl/src/yassl.cpp 2013-05-23 20:25:41 +0000
990@@ -1,5 +1,5 @@
991 /*
992- Copyright (C) 2000-2007 MySQL AB
993+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
994
995 This program is free software; you can redistribute it and/or modify
996 it under the terms of the GNU General Public License as published by
997
998=== modified file 'Percona-Server/extra/yassl/src/yassl_error.cpp'
999--- Percona-Server/extra/yassl/src/yassl_error.cpp 2012-11-21 13:44:15 +0000
1000+++ Percona-Server/extra/yassl/src/yassl_error.cpp 2013-05-23 20:25:41 +0000
1001@@ -1,5 +1,5 @@
1002 /*
1003- Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
1004+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1005
1006 This program is free software; you can redistribute it and/or modify
1007 it under the terms of the GNU General Public License as published by
1008@@ -144,6 +144,10 @@
1009 strncpy(buffer, "bad PreMasterSecret version error", max);
1010 break;
1011
1012+ case sanityCipher_error :
1013+ strncpy(buffer, "sanity check on cipher text size error", max);
1014+ break;
1015+
1016 // openssl errors
1017 case SSL_ERROR_WANT_READ :
1018 strncpy(buffer, "the read operation would block", max);
1019
1020=== modified file 'Percona-Server/extra/yassl/src/yassl_imp.cpp'
1021--- Percona-Server/extra/yassl/src/yassl_imp.cpp 2012-03-02 12:23:52 +0000
1022+++ Percona-Server/extra/yassl/src/yassl_imp.cpp 2013-05-23 20:25:41 +0000
1023@@ -972,30 +972,193 @@
1024 }
1025
1026
1027+// check all bytes for equality
1028+static int constant_compare(const byte* a, const byte* b, int len)
1029+{
1030+ int good = 0;
1031+ int bad = 0;
1032+
1033+ for (int i = 0; i < len; i++) {
1034+ if (a[i] == b[i])
1035+ good++;
1036+ else
1037+ bad++;
1038+ }
1039+
1040+ if (good == len)
1041+ return 0;
1042+ else
1043+ return 0 - bad; // failure
1044+}
1045+
1046+
1047+// check bytes for pad value
1048+static int pad_check(const byte* input, byte pad, int len)
1049+{
1050+ int good = 0;
1051+ int bad = 0;
1052+
1053+ for (int i = 0; i < len; i++) {
1054+ if (input[i] == pad)
1055+ good++;
1056+ else
1057+ bad++;
1058+ }
1059+
1060+ if (good == len)
1061+ return 0;
1062+ else
1063+ return 0 - bad; // failure
1064+}
1065+
1066+
1067+// get number of compression rounds
1068+static inline int get_rounds(int pLen, int padLen, int t)
1069+{
1070+ int roundL1 = 1; // round ups
1071+ int roundL2 = 1;
1072+
1073+ int L1 = COMPRESS_CONSTANT + pLen - t;
1074+ int L2 = COMPRESS_CONSTANT + pLen - padLen - 1 - t;
1075+
1076+ L1 -= COMPRESS_UPPER;
1077+ L2 -= COMPRESS_UPPER;
1078+
1079+ if ( (L1 % COMPRESS_LOWER) == 0)
1080+ roundL1 = 0;
1081+ if ( (L2 % COMPRESS_LOWER) == 0)
1082+ roundL2 = 0;
1083+
1084+ L1 /= COMPRESS_LOWER;
1085+ L2 /= COMPRESS_LOWER;
1086+
1087+ L1 += roundL1;
1088+ L2 += roundL2;
1089+
1090+ return L1 - L2;
1091+}
1092+
1093+
1094+// do compression rounds on dummy data
1095+static inline void compress_rounds(SSL& ssl, int rounds, const byte* dummy)
1096+{
1097+ if (rounds) {
1098+ Digest* digest = NULL;
1099+
1100+ MACAlgorithm ma = ssl.getSecurity().get_parms().mac_algorithm_;
1101+ if (ma == sha)
1102+ digest = NEW_YS SHA;
1103+ else if (ma == md5)
1104+ digest = NEW_YS MD5;
1105+ else if (ma == rmd)
1106+ digest = NEW_YS RMD;
1107+ else
1108+ return;
1109+
1110+ for (int i = 0; i < rounds; i++)
1111+ digest->update(dummy, COMPRESS_LOWER);
1112+
1113+ ysDelete(digest);
1114+ }
1115+}
1116+
1117+
1118+// timing resistant pad verification
1119+static int timing_verify(SSL& ssl, const byte* input, int padLen, int t,
1120+ int pLen)
1121+{
1122+ byte verify[SHA_LEN];
1123+ byte dummy[MAX_PAD_SIZE];
1124+
1125+ memset(dummy, 1, sizeof(dummy));
1126+
1127+ if ( (t + padLen + 1) > pLen) {
1128+ pad_check(dummy, (byte)padLen, MAX_PAD_SIZE);
1129+ if (ssl.isTLS())
1130+ TLS_hmac(ssl, verify, input, pLen - t, application_data, 1);
1131+ else
1132+ hmac(ssl, verify, input, pLen - t, application_data, 1);
1133+ constant_compare(verify, input + pLen - t, t);
1134+
1135+ return -1;
1136+ }
1137+
1138+ if (pad_check(input + pLen - (padLen + 1), (byte)padLen, padLen + 1) != 0) {
1139+ pad_check(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1);
1140+ if (ssl.isTLS())
1141+ TLS_hmac(ssl, verify, input, pLen - t, application_data, 1);
1142+ else
1143+ hmac(ssl, verify, input, pLen - t, application_data, 1);
1144+ constant_compare(verify, input + pLen - t, t);
1145+
1146+ return -1;
1147+ }
1148+
1149+ pad_check(dummy, (byte)padLen, MAX_PAD_SIZE - padLen - 1);
1150+ if (ssl.isTLS())
1151+ TLS_hmac(ssl, verify, input, pLen - padLen - 1 - t, application_data,1);
1152+ else
1153+ hmac(ssl, verify, input, pLen - padLen - 1 - t, application_data, 1);
1154+
1155+ compress_rounds(ssl, get_rounds(pLen, padLen, t), dummy);
1156+
1157+ if (constant_compare(verify, input + (pLen - padLen - 1 - t), t) != 0)
1158+ return -1;
1159+
1160+ return 0;
1161+}
1162+
1163+
1164 // Process handler for Data
1165 void Data::Process(input_buffer& input, SSL& ssl)
1166 {
1167 int msgSz = ssl.getSecurity().get_parms().encrypt_size_;
1168 int pad = 0, padSz = 0;
1169 int ivExtra = 0;
1170+ int digestSz = ssl.getCrypto().get_digest().get_digestSize();
1171+ const byte* rawData = input.get_buffer() + input.get_current();
1172+ opaque verify[SHA_LEN];
1173
1174 if (ssl.getSecurity().get_parms().cipher_type_ == block) {
1175 if (ssl.isTLSv1_1()) // IV
1176 ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
1177 pad = *(input.get_buffer() + input.get_current() + msgSz -ivExtra - 1);
1178 padSz = 1;
1179- }
1180- int digestSz = ssl.getCrypto().get_digest().get_digestSize();
1181+
1182+ if (ssl.isTLS()) {
1183+ if (timing_verify(ssl, rawData, pad,digestSz, msgSz-ivExtra) != 0) {
1184+ ssl.SetError(verify_error);
1185+ return;
1186+ }
1187+ }
1188+ else { // SSLv3, some don't do this padding right
1189+ int sz3 = msgSz - digestSz - pad - 1;
1190+ hmac(ssl, verify, rawData, sz3, application_data, true);
1191+ if (constant_compare(verify, rawData + sz3, digestSz) != 0) {
1192+ ssl.SetError(verify_error);
1193+ return;
1194+ }
1195+ }
1196+ }
1197+ else { // stream
1198+ int streamSz = msgSz - digestSz;
1199+ if (ssl.isTLS())
1200+ TLS_hmac(ssl, verify, rawData, streamSz, application_data, true);
1201+ else
1202+ hmac(ssl, verify, rawData, streamSz, application_data, true);
1203+ if (constant_compare(verify, rawData + streamSz, digestSz) != 0) {
1204+ ssl.SetError(verify_error);
1205+ return;
1206+ }
1207+ }
1208+
1209 int dataSz = msgSz - ivExtra - digestSz - pad - padSz;
1210- opaque verify[SHA_LEN];
1211
1212 if (dataSz < 0) {
1213 ssl.SetError(bad_input);
1214 return;
1215 }
1216
1217- const byte* rawData = input.get_buffer() + input.get_current();
1218-
1219 // read data
1220 if (dataSz) { // could be compressed
1221 if (ssl.CompressionOn()) {
1222@@ -1013,27 +1176,10 @@
1223 input.read(data->get_buffer(), dataSz);
1224 data->add_size(dataSz);
1225 }
1226-
1227- if (ssl.isTLS())
1228- TLS_hmac(ssl, verify, rawData, dataSz, application_data, true);
1229- else
1230- hmac(ssl, verify, rawData, dataSz, application_data, true);
1231- }
1232-
1233- // read mac and skip fill
1234- opaque mac[SHA_LEN];
1235- input.read(mac, digestSz);
1236- input.set_current(input.get_current() + pad + padSz);
1237-
1238- // verify
1239- if (dataSz) {
1240- if (memcmp(mac, verify, digestSz)) {
1241- ssl.SetError(verify_error);
1242- return;
1243- }
1244- }
1245- else
1246- ssl.get_SEQIncrement(true); // even though no data, increment verify
1247+ }
1248+
1249+ // advance past mac and fill
1250+ input.set_current(input.get_current() + digestSz + pad + padSz);
1251 }
1252
1253
1254
1255=== modified file 'Percona-Server/extra/yassl/taocrypt/benchmark/benchmark.cpp'
1256--- Percona-Server/extra/yassl/taocrypt/benchmark/benchmark.cpp 2012-02-10 14:33:27 +0000
1257+++ Percona-Server/extra/yassl/taocrypt/benchmark/benchmark.cpp 2013-05-23 20:25:41 +0000
1258@@ -1,5 +1,5 @@
1259 /*
1260- Copyright (C) 2006, 2007 MySQL AB
1261+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1262
1263 This program is free software; you can redistribute it and/or modify
1264 it under the terms of the GNU General Public License as published by
1265
1266=== modified file 'Percona-Server/extra/yassl/taocrypt/benchmark/make.bat'
1267--- Percona-Server/extra/yassl/taocrypt/benchmark/make.bat 2012-02-10 14:33:27 +0000
1268+++ Percona-Server/extra/yassl/taocrypt/benchmark/make.bat 2013-05-23 20:25:41 +0000
1269@@ -1,4 +1,4 @@
1270-REM Copyright (C) 2006, 2007 MySQL AB
1271+REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1272 REM
1273 REM This program is free software; you can redistribute it and/or modify
1274 REM it under the terms of the GNU General Public License as published by
1275
1276=== modified file 'Percona-Server/extra/yassl/taocrypt/include/aes.hpp'
1277--- Percona-Server/extra/yassl/taocrypt/include/aes.hpp 2012-11-21 13:44:15 +0000
1278+++ Percona-Server/extra/yassl/taocrypt/include/aes.hpp 2013-05-23 20:25:41 +0000
1279@@ -1,5 +1,5 @@
1280 /*
1281- Copyright (C) 2000-2007 MySQL AB
1282+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1283
1284 This program is free software; you can redistribute it and/or modify
1285 it under the terms of the GNU General Public License as published by
1286
1287=== modified file 'Percona-Server/extra/yassl/taocrypt/include/asn.hpp'
1288--- Percona-Server/extra/yassl/taocrypt/include/asn.hpp 2012-02-13 12:44:54 +0000
1289+++ Percona-Server/extra/yassl/taocrypt/include/asn.hpp 2013-05-23 20:25:41 +0000
1290@@ -1,6 +1,5 @@
1291 /*
1292- Copyright (c) 2005-2007 MySQL AB, 2010 Sun Microsystems, Inc.
1293- Use is subject to license terms.
1294+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1295
1296 This program is free software; you can redistribute it and/or modify
1297 it under the terms of the GNU General Public License as published by
1298
1299=== modified file 'Percona-Server/extra/yassl/taocrypt/include/block.hpp'
1300--- Percona-Server/extra/yassl/taocrypt/include/block.hpp 2012-02-13 12:44:54 +0000
1301+++ Percona-Server/extra/yassl/taocrypt/include/block.hpp 2013-05-23 20:25:41 +0000
1302@@ -1,6 +1,5 @@
1303 /*
1304- Copyright (c) 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc.
1305- Use is subject to license terms.
1306+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1307
1308 This program is free software; you can redistribute it and/or modify
1309 it under the terms of the GNU General Public License as published by
1310
1311=== modified file 'Percona-Server/extra/yassl/taocrypt/include/blowfish.hpp'
1312--- Percona-Server/extra/yassl/taocrypt/include/blowfish.hpp 2012-02-13 12:44:54 +0000
1313+++ Percona-Server/extra/yassl/taocrypt/include/blowfish.hpp 2013-05-23 20:25:41 +0000
1314@@ -1,5 +1,5 @@
1315 /*
1316- Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
1317+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1318
1319 This program is free software; you can redistribute it and/or modify
1320 it under the terms of the GNU General Public License as published by
1321
1322=== modified file 'Percona-Server/extra/yassl/taocrypt/include/des.hpp'
1323--- Percona-Server/extra/yassl/taocrypt/include/des.hpp 2012-02-13 11:40:12 +0000
1324+++ Percona-Server/extra/yassl/taocrypt/include/des.hpp 2013-05-23 20:25:41 +0000
1325@@ -1,5 +1,5 @@
1326 /*
1327- Copyright (C) 2000-2007 MySQL AB
1328+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1329
1330 This program is free software; you can redistribute it and/or modify
1331 it under the terms of the GNU General Public License as published by
1332
1333=== modified file 'Percona-Server/extra/yassl/taocrypt/include/hash.hpp'
1334--- Percona-Server/extra/yassl/taocrypt/include/hash.hpp 2012-02-13 11:40:12 +0000
1335+++ Percona-Server/extra/yassl/taocrypt/include/hash.hpp 2013-05-23 20:25:41 +0000
1336@@ -1,5 +1,5 @@
1337 /*
1338- Copyright (C) 2000-2007 MySQL AB
1339+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1340
1341 This program is free software; you can redistribute it and/or modify
1342 it under the terms of the GNU General Public License as published by
1343
1344=== modified file 'Percona-Server/extra/yassl/taocrypt/include/hc128.hpp'
1345--- Percona-Server/extra/yassl/taocrypt/include/hc128.hpp 2012-02-10 14:33:27 +0000
1346+++ Percona-Server/extra/yassl/taocrypt/include/hc128.hpp 2013-05-23 20:25:41 +0000
1347@@ -1,5 +1,5 @@
1348 /*
1349- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1350+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1351
1352 This program is free software; you can redistribute it and/or modify
1353 it under the terms of the GNU General Public License as published by
1354
1355=== modified file 'Percona-Server/extra/yassl/taocrypt/include/integer.hpp'
1356--- Percona-Server/extra/yassl/taocrypt/include/integer.hpp 2012-02-10 14:33:27 +0000
1357+++ Percona-Server/extra/yassl/taocrypt/include/integer.hpp 2013-05-23 20:25:41 +0000
1358@@ -1,5 +1,5 @@
1359 /*
1360- Copyright (C) 2000-2007 MySQL AB
1361+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1362
1363 This program is free software; you can redistribute it and/or modify
1364 it under the terms of the GNU General Public License as published by
1365
1366=== modified file 'Percona-Server/extra/yassl/taocrypt/include/kernelc.hpp'
1367--- Percona-Server/extra/yassl/taocrypt/include/kernelc.hpp 2012-02-10 14:33:27 +0000
1368+++ Percona-Server/extra/yassl/taocrypt/include/kernelc.hpp 2013-05-23 20:25:41 +0000
1369@@ -1,5 +1,5 @@
1370 /*
1371- Copyright (C) 2000-2007 MySQL AB
1372+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1373
1374 This program is free software; you can redistribute it and/or modify
1375 it under the terms of the GNU General Public License as published by
1376
1377=== modified file 'Percona-Server/extra/yassl/taocrypt/include/misc.hpp'
1378--- Percona-Server/extra/yassl/taocrypt/include/misc.hpp 2012-02-13 12:44:54 +0000
1379+++ Percona-Server/extra/yassl/taocrypt/include/misc.hpp 2013-05-23 20:25:41 +0000
1380@@ -1,5 +1,5 @@
1381 /*
1382- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1383+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1384
1385 This program is free software; you can redistribute it and/or modify
1386 it under the terms of the GNU General Public License as published by
1387
1388=== modified file 'Percona-Server/extra/yassl/taocrypt/include/modes.hpp'
1389--- Percona-Server/extra/yassl/taocrypt/include/modes.hpp 2012-02-13 12:44:54 +0000
1390+++ Percona-Server/extra/yassl/taocrypt/include/modes.hpp 2013-05-23 20:25:41 +0000
1391@@ -1,6 +1,5 @@
1392 /*
1393- Copyright (c) 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc.
1394- Use is subject to license terms.
1395+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1396
1397 This program is free software; you can redistribute it and/or modify
1398 it under the terms of the GNU General Public License as published by
1399
1400=== modified file 'Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp'
1401--- Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp 2012-11-21 13:44:15 +0000
1402+++ Percona-Server/extra/yassl/taocrypt/include/pwdbased.hpp 2013-05-23 20:25:41 +0000
1403@@ -1,5 +1,5 @@
1404 /*
1405- Copyright (C) 2000-2007 MySQL AB
1406+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1407
1408 This program is free software; you can redistribute it and/or modify
1409 it under the terms of the GNU General Public License as published by
1410
1411=== modified file 'Percona-Server/extra/yassl/taocrypt/include/rabbit.hpp'
1412--- Percona-Server/extra/yassl/taocrypt/include/rabbit.hpp 2012-02-10 14:33:27 +0000
1413+++ Percona-Server/extra/yassl/taocrypt/include/rabbit.hpp 2013-05-23 20:25:41 +0000
1414@@ -1,5 +1,5 @@
1415 /*
1416- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1417+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1418
1419 This program is free software; you can redistribute it and/or modify
1420 it under the terms of the GNU General Public License as published by
1421
1422=== modified file 'Percona-Server/extra/yassl/taocrypt/include/rsa.hpp'
1423--- Percona-Server/extra/yassl/taocrypt/include/rsa.hpp 2012-02-13 11:40:12 +0000
1424+++ Percona-Server/extra/yassl/taocrypt/include/rsa.hpp 2013-05-23 20:25:41 +0000
1425@@ -1,5 +1,5 @@
1426 /*
1427- Copyright (C) 2000-2007 MySQL AB
1428+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1429
1430 This program is free software; you can redistribute it and/or modify
1431 it under the terms of the GNU General Public License as published by
1432
1433=== modified file 'Percona-Server/extra/yassl/taocrypt/include/runtime.hpp'
1434--- Percona-Server/extra/yassl/taocrypt/include/runtime.hpp 2012-02-13 12:44:54 +0000
1435+++ Percona-Server/extra/yassl/taocrypt/include/runtime.hpp 2013-05-23 20:25:41 +0000
1436@@ -1,5 +1,5 @@
1437 /*
1438- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1439+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1440
1441 This program is free software; you can redistribute it and/or modify
1442 it under the terms of the GNU General Public License as published by
1443
1444=== modified file 'Percona-Server/extra/yassl/taocrypt/include/types.hpp'
1445--- Percona-Server/extra/yassl/taocrypt/include/types.hpp 2012-02-10 14:33:27 +0000
1446+++ Percona-Server/extra/yassl/taocrypt/include/types.hpp 2013-05-23 20:25:41 +0000
1447@@ -1,5 +1,5 @@
1448 /*
1449- Copyright (C) 2000-2007 MySQL AB
1450+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1451
1452 This program is free software; you can redistribute it and/or modify
1453 it under the terms of the GNU General Public License as published by
1454
1455=== modified file 'Percona-Server/extra/yassl/taocrypt/mySTL/stdexcept.hpp'
1456--- Percona-Server/extra/yassl/taocrypt/mySTL/stdexcept.hpp 2012-02-10 14:33:27 +0000
1457+++ Percona-Server/extra/yassl/taocrypt/mySTL/stdexcept.hpp 2013-05-23 20:25:41 +0000
1458@@ -1,5 +1,5 @@
1459 /*
1460- Copyright (C) 2000-2007 MySQL AB
1461+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1462
1463 This program is free software; you can redistribute it and/or modify
1464 it under the terms of the GNU General Public License as published by
1465
1466=== modified file 'Percona-Server/extra/yassl/taocrypt/mySTL/vector.hpp'
1467--- Percona-Server/extra/yassl/taocrypt/mySTL/vector.hpp 2012-02-10 14:33:27 +0000
1468+++ Percona-Server/extra/yassl/taocrypt/mySTL/vector.hpp 2013-05-23 20:25:41 +0000
1469@@ -1,5 +1,5 @@
1470 /*
1471- Copyright (C) 2000-2007 MySQL AB
1472+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1473
1474 This program is free software; you can redistribute it and/or modify
1475 it under the terms of the GNU General Public License as published by
1476
1477=== modified file 'Percona-Server/extra/yassl/taocrypt/src/aes.cpp'
1478--- Percona-Server/extra/yassl/taocrypt/src/aes.cpp 2012-02-13 12:44:54 +0000
1479+++ Percona-Server/extra/yassl/taocrypt/src/aes.cpp 2013-05-23 20:25:41 +0000
1480@@ -1,5 +1,5 @@
1481 /*
1482- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1483+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1484
1485 This program is free software; you can redistribute it and/or modify
1486 it under the terms of the GNU General Public License as published by
1487
1488=== modified file 'Percona-Server/extra/yassl/taocrypt/src/aestables.cpp'
1489--- Percona-Server/extra/yassl/taocrypt/src/aestables.cpp 2012-02-10 14:33:27 +0000
1490+++ Percona-Server/extra/yassl/taocrypt/src/aestables.cpp 2013-05-23 20:25:41 +0000
1491@@ -1,5 +1,5 @@
1492 /*
1493- Copyright (C) 2000-2007 MySQL AB
1494+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1495
1496 This program is free software; you can redistribute it and/or modify
1497 it under the terms of the GNU General Public License as published by
1498
1499=== modified file 'Percona-Server/extra/yassl/taocrypt/src/algebra.cpp'
1500--- Percona-Server/extra/yassl/taocrypt/src/algebra.cpp 2012-02-13 12:44:54 +0000
1501+++ Percona-Server/extra/yassl/taocrypt/src/algebra.cpp 2013-05-23 20:25:41 +0000
1502@@ -1,5 +1,5 @@
1503 /*
1504- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1505+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1506
1507 This program is free software; you can redistribute it and/or modify
1508 it under the terms of the GNU General Public License as published by
1509
1510=== modified file 'Percona-Server/extra/yassl/taocrypt/src/arc4.cpp'
1511--- Percona-Server/extra/yassl/taocrypt/src/arc4.cpp 2012-02-10 14:33:27 +0000
1512+++ Percona-Server/extra/yassl/taocrypt/src/arc4.cpp 2013-05-23 20:25:41 +0000
1513@@ -1,5 +1,5 @@
1514 /*
1515- Copyright (C) 2000-2007 MySQL AB
1516+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1517
1518 This program is free software; you can redistribute it and/or modify
1519 it under the terms of the GNU General Public License as published by
1520
1521=== modified file 'Percona-Server/extra/yassl/taocrypt/src/blowfish.cpp'
1522--- Percona-Server/extra/yassl/taocrypt/src/blowfish.cpp 2012-02-13 12:44:54 +0000
1523+++ Percona-Server/extra/yassl/taocrypt/src/blowfish.cpp 2013-05-23 20:25:41 +0000
1524@@ -1,5 +1,5 @@
1525 /*
1526- Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
1527+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1528
1529 This program is free software; you can redistribute it and/or modify
1530 it under the terms of the GNU General Public License as published by
1531
1532=== modified file 'Percona-Server/extra/yassl/taocrypt/src/coding.cpp'
1533--- Percona-Server/extra/yassl/taocrypt/src/coding.cpp 2012-11-21 13:44:15 +0000
1534+++ Percona-Server/extra/yassl/taocrypt/src/coding.cpp 2013-05-23 20:25:41 +0000
1535@@ -1,5 +1,5 @@
1536 /*
1537- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1538+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1539
1540 This program is free software; you can redistribute it and/or modify
1541 it under the terms of the GNU General Public License as published by
1542
1543=== modified file 'Percona-Server/extra/yassl/taocrypt/src/dsa.cpp'
1544--- Percona-Server/extra/yassl/taocrypt/src/dsa.cpp 2012-02-10 14:33:27 +0000
1545+++ Percona-Server/extra/yassl/taocrypt/src/dsa.cpp 2013-05-23 20:25:41 +0000
1546@@ -1,5 +1,5 @@
1547 /*
1548- Copyright (C) 2000-2007 MySQL AB
1549+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1550
1551 This program is free software; you can redistribute it and/or modify
1552 it under the terms of the GNU General Public License as published by
1553
1554=== modified file 'Percona-Server/extra/yassl/taocrypt/src/hash.cpp'
1555--- Percona-Server/extra/yassl/taocrypt/src/hash.cpp 2012-02-10 14:33:27 +0000
1556+++ Percona-Server/extra/yassl/taocrypt/src/hash.cpp 2013-05-23 20:25:41 +0000
1557@@ -1,5 +1,5 @@
1558 /*
1559- Copyright (C) 2000-2007 MySQL AB
1560+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1561
1562 This program is free software; you can redistribute it and/or modify
1563 it under the terms of the GNU General Public License as published by
1564
1565=== modified file 'Percona-Server/extra/yassl/taocrypt/src/hc128.cpp'
1566--- Percona-Server/extra/yassl/taocrypt/src/hc128.cpp 2012-02-10 14:33:27 +0000
1567+++ Percona-Server/extra/yassl/taocrypt/src/hc128.cpp 2013-05-23 20:25:41 +0000
1568@@ -1,5 +1,5 @@
1569 /*
1570- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1571+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1572
1573 This program is free software; you can redistribute it and/or modify
1574 it under the terms of the GNU General Public License as published by
1575
1576=== modified file 'Percona-Server/extra/yassl/taocrypt/src/make.bat'
1577--- Percona-Server/extra/yassl/taocrypt/src/make.bat 2012-02-10 14:33:27 +0000
1578+++ Percona-Server/extra/yassl/taocrypt/src/make.bat 2013-05-23 20:25:41 +0000
1579@@ -1,4 +1,4 @@
1580-REM Copyright (C) 2006, 2007 MySQL AB
1581+REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1582 REM
1583 REM This program is free software; you can redistribute it and/or modify
1584 REM it under the terms of the GNU General Public License as published by
1585
1586=== modified file 'Percona-Server/extra/yassl/taocrypt/src/md4.cpp'
1587--- Percona-Server/extra/yassl/taocrypt/src/md4.cpp 2012-02-10 14:33:27 +0000
1588+++ Percona-Server/extra/yassl/taocrypt/src/md4.cpp 2013-05-23 20:25:41 +0000
1589@@ -1,5 +1,5 @@
1590 /*
1591- Copyright (C) 2000-2007 MySQL AB
1592+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1593
1594 This program is free software; you can redistribute it and/or modify
1595 it under the terms of the GNU General Public License as published by
1596
1597=== modified file 'Percona-Server/extra/yassl/taocrypt/src/md5.cpp'
1598--- Percona-Server/extra/yassl/taocrypt/src/md5.cpp 2012-02-10 14:33:27 +0000
1599+++ Percona-Server/extra/yassl/taocrypt/src/md5.cpp 2013-05-23 20:25:41 +0000
1600@@ -1,5 +1,5 @@
1601 /*
1602- Copyright (C) 2000-2007 MySQL AB
1603+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1604
1605 This program is free software; you can redistribute it and/or modify
1606 it under the terms of the GNU General Public License as published by
1607
1608=== modified file 'Percona-Server/extra/yassl/taocrypt/src/misc.cpp'
1609--- Percona-Server/extra/yassl/taocrypt/src/misc.cpp 2012-02-13 12:44:54 +0000
1610+++ Percona-Server/extra/yassl/taocrypt/src/misc.cpp 2013-05-23 20:25:41 +0000
1611@@ -1,5 +1,5 @@
1612 /*
1613- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1614+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1615
1616 This program is free software; you can redistribute it and/or modify
1617 it under the terms of the GNU General Public License as published by
1618
1619=== modified file 'Percona-Server/extra/yassl/taocrypt/src/rabbit.cpp'
1620--- Percona-Server/extra/yassl/taocrypt/src/rabbit.cpp 2012-02-10 14:33:27 +0000
1621+++ Percona-Server/extra/yassl/taocrypt/src/rabbit.cpp 2013-05-23 20:25:41 +0000
1622@@ -1,5 +1,5 @@
1623 /*
1624- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1625+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1626
1627 This program is free software; you can redistribute it and/or modify
1628 it under the terms of the GNU General Public License as published by
1629
1630=== modified file 'Percona-Server/extra/yassl/taocrypt/src/random.cpp'
1631--- Percona-Server/extra/yassl/taocrypt/src/random.cpp 2012-02-13 12:44:54 +0000
1632+++ Percona-Server/extra/yassl/taocrypt/src/random.cpp 2013-05-23 20:25:41 +0000
1633@@ -1,5 +1,5 @@
1634 /*
1635- Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1636+ Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
1637
1638 This program is free software; you can redistribute it and/or modify
1639 it under the terms of the GNU General Public License as published by
1640
1641=== modified file 'Percona-Server/extra/yassl/taocrypt/src/ripemd.cpp'
1642--- Percona-Server/extra/yassl/taocrypt/src/ripemd.cpp 2012-02-10 14:33:27 +0000
1643+++ Percona-Server/extra/yassl/taocrypt/src/ripemd.cpp 2013-05-23 20:25:41 +0000
1644@@ -1,5 +1,5 @@
1645 /*
1646- Copyright (C) 2000-2007 MySQL AB
1647+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1648
1649 This program is free software; you can redistribute it and/or modify
1650 it under the terms of the GNU General Public License as published by
1651
1652=== modified file 'Percona-Server/extra/yassl/taocrypt/src/rsa.cpp'
1653--- Percona-Server/extra/yassl/taocrypt/src/rsa.cpp 2012-02-10 14:33:27 +0000
1654+++ Percona-Server/extra/yassl/taocrypt/src/rsa.cpp 2013-05-23 20:25:41 +0000
1655@@ -1,5 +1,5 @@
1656 /*
1657- Copyright (C) 2000-2007 MySQL AB
1658+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1659
1660 This program is free software; you can redistribute it and/or modify
1661 it under the terms of the GNU General Public License as published by
1662
1663=== modified file 'Percona-Server/extra/yassl/taocrypt/src/sha.cpp'
1664--- Percona-Server/extra/yassl/taocrypt/src/sha.cpp 2012-02-10 14:33:27 +0000
1665+++ Percona-Server/extra/yassl/taocrypt/src/sha.cpp 2013-05-23 20:25:41 +0000
1666@@ -1,5 +1,5 @@
1667 /*
1668- Copyright (C) 2000-2007 MySQL AB
1669+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1670
1671 This program is free software; you can redistribute it and/or modify
1672 it under the terms of the GNU General Public License as published by
1673
1674=== modified file 'Percona-Server/extra/yassl/taocrypt/src/template_instnt.cpp'
1675--- Percona-Server/extra/yassl/taocrypt/src/template_instnt.cpp 2012-02-10 14:33:27 +0000
1676+++ Percona-Server/extra/yassl/taocrypt/src/template_instnt.cpp 2013-05-23 20:25:41 +0000
1677@@ -1,5 +1,5 @@
1678 /*
1679- Copyright (C) 2000-2007 MySQL AB
1680+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1681
1682 This program is free software; you can redistribute it and/or modify
1683 it under the terms of the GNU General Public License as published by
1684
1685=== modified file 'Percona-Server/extra/yassl/taocrypt/src/twofish.cpp'
1686--- Percona-Server/extra/yassl/taocrypt/src/twofish.cpp 2012-02-13 12:44:54 +0000
1687+++ Percona-Server/extra/yassl/taocrypt/src/twofish.cpp 2013-05-23 20:25:41 +0000
1688@@ -1,5 +1,5 @@
1689 /*
1690- Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
1691+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1692
1693 This program is free software; you can redistribute it and/or modify
1694 it under the terms of the GNU General Public License as published by
1695
1696=== modified file 'Percona-Server/extra/yassl/taocrypt/test/make.bat'
1697--- Percona-Server/extra/yassl/taocrypt/test/make.bat 2012-02-10 14:33:27 +0000
1698+++ Percona-Server/extra/yassl/taocrypt/test/make.bat 2013-05-23 20:25:41 +0000
1699@@ -1,4 +1,4 @@
1700-REM Copyright (C) 2006, 2007 MySQL AB
1701+REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1702 REM
1703 REM This program is free software; you can redistribute it and/or modify
1704 REM it under the terms of the GNU General Public License as published by
1705
1706=== modified file 'Percona-Server/extra/yassl/taocrypt/test/memory.cpp'
1707--- Percona-Server/extra/yassl/taocrypt/test/memory.cpp 2012-11-21 13:44:15 +0000
1708+++ Percona-Server/extra/yassl/taocrypt/test/memory.cpp 2013-05-23 20:25:41 +0000
1709@@ -1,5 +1,5 @@
1710 /*
1711- Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
1712+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1713
1714 This program is free software; you can redistribute it and/or modify
1715 it under the terms of the GNU General Public License as published by
1716
1717=== modified file 'Percona-Server/extra/yassl/taocrypt/test/test.cpp'
1718--- Percona-Server/extra/yassl/taocrypt/test/test.cpp 2012-02-13 11:40:12 +0000
1719+++ Percona-Server/extra/yassl/taocrypt/test/test.cpp 2013-05-23 20:25:41 +0000
1720@@ -1,5 +1,5 @@
1721 /*
1722- Copyright (C) 2006, 2007 MySQL AB
1723+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1724
1725 This program is free software; you can redistribute it and/or modify
1726 it under the terms of the GNU General Public License as published by
1727
1728=== modified file 'Percona-Server/extra/yassl/testsuite/make.bat'
1729--- Percona-Server/extra/yassl/testsuite/make.bat 2012-02-10 14:33:27 +0000
1730+++ Percona-Server/extra/yassl/testsuite/make.bat 2013-05-23 20:25:41 +0000
1731@@ -1,4 +1,4 @@
1732-REM Copyright (C) 2006, 2007 MySQL AB
1733+REM Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1734 REM
1735 REM This program is free software; you can redistribute it and/or modify
1736 REM it under the terms of the GNU General Public License as published by
1737
1738=== modified file 'Percona-Server/extra/yassl/testsuite/test.hpp'
1739--- Percona-Server/extra/yassl/testsuite/test.hpp 2012-02-13 12:44:54 +0000
1740+++ Percona-Server/extra/yassl/testsuite/test.hpp 2013-05-23 20:25:41 +0000
1741@@ -1,5 +1,5 @@
1742 /*
1743- Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
1744+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1745
1746 This program is free software; you can redistribute it and/or modify
1747 it under the terms of the GNU General Public License as published by
1748
1749=== modified file 'Percona-Server/extra/yassl/testsuite/testsuite.cpp'
1750--- Percona-Server/extra/yassl/testsuite/testsuite.cpp 2012-02-13 11:40:12 +0000
1751+++ Percona-Server/extra/yassl/testsuite/testsuite.cpp 2013-05-23 20:25:41 +0000
1752@@ -1,5 +1,5 @@
1753 /*
1754- Copyright (C) 2006, 2007 MySQL AB
1755+ Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
1756
1757 This program is free software; you can redistribute it and/or modify
1758 it under the terms of the GNU General Public License as published by
1759
1760=== modified file 'Percona-Server/include/base64.h'
1761--- Percona-Server/include/base64.h 2006-12-23 19:20:40 +0000
1762+++ Percona-Server/include/base64.h 2013-05-23 20:25:41 +0000
1763@@ -1,4 +1,5 @@
1764-/* Copyright (C) 2003 MySQL AB
1765+/* Copyright (c) 2003-2006 MySQL AB
1766+ Use is subject to license terms
1767
1768 This program is free software; you can redistribute it and/or modify
1769 it under the terms of the GNU General Public License as published by
1770
1771=== modified file 'Percona-Server/include/errmsg.h'
1772--- Percona-Server/include/errmsg.h 2011-06-30 15:46:53 +0000
1773+++ Percona-Server/include/errmsg.h 2013-05-23 20:25:41 +0000
1774@@ -25,6 +25,7 @@
1775 void init_client_errs(void);
1776 void finish_client_errs(void);
1777 extern const char *client_errors[]; /* Error messages */
1778+extern const char **mysql_client_errors; /* Error messages */
1779 #ifdef __cplusplus
1780 }
1781 #endif
1782
1783=== modified file 'Percona-Server/include/ft_global.h'
1784--- Percona-Server/include/ft_global.h 2011-06-30 15:46:53 +0000
1785+++ Percona-Server/include/ft_global.h 2013-05-23 20:25:41 +0000
1786@@ -1,4 +1,4 @@
1787-/* Copyright (c) 2000-2007 MySQL AB, 2009 Sun Microsystems, Inc.
1788+/* Copyright (c) 2000-2005, 2007 MySQL AB, 2009 Sun Microsystems, Inc.
1789 Use is subject to license terms.
1790
1791 This program is free software; you can redistribute it and/or modify
1792
1793=== modified file 'Percona-Server/include/m_ctype.h'
1794--- Percona-Server/include/m_ctype.h 2012-02-16 09:48:16 +0000
1795+++ Percona-Server/include/m_ctype.h 2013-05-23 20:25:41 +0000
1796@@ -1,4 +1,4 @@
1797-/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1798+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
1799
1800 This program is free software; you can redistribute it and/or modify
1801 it under the terms of the GNU General Public License as published by
1802@@ -149,6 +149,8 @@
1803 struct charset_info_st;
1804
1805
1806+extern int (*my_string_stack_guard)(int);
1807+
1808 /* See strings/CHARSET_INFO.txt for information about this structure */
1809 typedef struct my_collation_handler_st
1810 {
1811
1812=== modified file 'Percona-Server/include/m_string.h'
1813--- Percona-Server/include/m_string.h 2013-02-24 13:36:00 +0000
1814+++ Percona-Server/include/m_string.h 2013-05-23 20:25:41 +0000
1815@@ -1,5 +1,5 @@
1816 /*
1817- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
1818+ Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1819
1820 This program is free software; you can redistribute it and/or modify
1821 it under the terms of the GNU General Public License as published by
1822
1823=== modified file 'Percona-Server/include/my_base.h'
1824--- Percona-Server/include/my_base.h 2012-03-01 08:27:43 +0000
1825+++ Percona-Server/include/my_base.h 2013-05-23 20:25:41 +0000
1826@@ -319,6 +319,7 @@
1827 #define HA_CREATE_PAGE_CHECKSUM 32
1828 #define HA_CREATE_DELAY_KEY_WRITE 64
1829 #define HA_CREATE_RELIES_ON_SQL_LAYER 128
1830+#define HA_CREATE_INTERNAL_TABLE 256
1831
1832 /*
1833 The following flags (OR-ed) are passed to handler::info() method.
1834
1835=== modified file 'Percona-Server/include/my_md5.h'
1836--- Percona-Server/include/my_md5.h 2009-09-23 21:32:31 +0000
1837+++ Percona-Server/include/my_md5.h 2013-05-23 20:25:41 +0000
1838@@ -1,7 +1,8 @@
1839 #ifndef MY_MD5_INCLUDED
1840 #define MY_MD5_INCLUDED
1841
1842-/* Copyright (C) 2000 MySQL AB
1843+/* Copyright (c) 2000, 2001, 2007 MySQL AB, 2009 Sun Microsystems, Inc.
1844+ Use is subject to license terms
1845
1846 This program is free software; you can redistribute it and/or modify
1847 it under the terms of the GNU General Public License as published by
1848
1849=== modified file 'Percona-Server/include/my_sys.h'
1850--- Percona-Server/include/my_sys.h 2013-03-21 16:54:18 +0000
1851+++ Percona-Server/include/my_sys.h 2013-05-23 20:25:41 +0000
1852@@ -1,4 +1,4 @@
1853-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
1854+/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
1855
1856 This program is free software; you can redistribute it and/or modify
1857 it under the terms of the GNU General Public License as published by
1858
1859=== modified file 'Percona-Server/include/my_user.h'
1860--- Percona-Server/include/my_user.h 2007-05-10 09:59:39 +0000
1861+++ Percona-Server/include/my_user.h 2013-05-23 20:25:41 +0000
1862@@ -1,4 +1,5 @@
1863-/* Copyright (C) 2005 MySQL AB
1864+/* Copyright (c) 2005-2007 MySQL AB
1865+ Use is subject to license terms
1866
1867 This program is free software; you can redistribute it and/or modify
1868 it under the terms of the GNU General Public License as published by
1869
1870=== modified file 'Percona-Server/include/my_xml.h'
1871--- Percona-Server/include/my_xml.h 2007-05-10 09:59:39 +0000
1872+++ Percona-Server/include/my_xml.h 2013-05-23 20:25:41 +0000
1873@@ -1,4 +1,5 @@
1874-/* Copyright (C) 2000 MySQL AB
1875+/* Copyright (c) 2000, 2002, 2003, 2005, 2007 MySQL AB
1876+ Use is subject to license terms
1877
1878 This program is free software; you can redistribute it and/or modify
1879 it under the terms of the GNU General Public License as published by
1880
1881=== modified file 'Percona-Server/include/myisampack.h'
1882--- Percona-Server/include/myisampack.h 2011-06-30 15:46:53 +0000
1883+++ Percona-Server/include/myisampack.h 2013-05-23 20:25:41 +0000
1884@@ -1,7 +1,7 @@
1885 #ifndef MYISAMPACK_INCLUDED
1886 #define MYISAMPACK_INCLUDED
1887
1888-/* Copyright (c) 2000-2002, 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
1889+/* Copyright (c) 2000-2002, 2004 MySQL AB, 2009 Sun Microsystems, Inc.
1890 Use is subject to license terms.
1891
1892 This program is free software; you can redistribute it and/or modify
1893
1894=== modified file 'Percona-Server/include/mysql.h'
1895--- Percona-Server/include/mysql.h 2012-07-05 06:55:20 +0000
1896+++ Percona-Server/include/mysql.h 2013-05-23 20:25:41 +0000
1897@@ -1,4 +1,4 @@
1898-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
1899+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
1900
1901 This program is free software; you can redistribute it and/or modify
1902 it under the terms of the GNU General Public License as published by
1903
1904=== modified file 'Percona-Server/include/mysql/service_my_snprintf.h'
1905--- Percona-Server/include/mysql/service_my_snprintf.h 2013-03-21 16:54:18 +0000
1906+++ Percona-Server/include/mysql/service_my_snprintf.h 2013-05-23 20:25:41 +0000
1907@@ -1,5 +1,5 @@
1908 #ifndef MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
1909-/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
1910+/* Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
1911
1912 This program is free software; you can redistribute it and/or modify
1913 it under the terms of the GNU General Public License as published by
1914
1915=== modified file 'Percona-Server/include/mysql/thread_pool_priv.h'
1916--- Percona-Server/include/mysql/thread_pool_priv.h 2013-03-21 16:54:18 +0000
1917+++ Percona-Server/include/mysql/thread_pool_priv.h 2013-05-23 20:25:41 +0000
1918@@ -1,5 +1,5 @@
1919 /*
1920- Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
1921+ Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
1922
1923 This program is free software; you can redistribute it and/or modify
1924 it under the terms of the GNU General Public License as published by
1925
1926=== modified file 'Percona-Server/include/mysql_time.h'
1927--- Percona-Server/include/mysql_time.h 2006-12-31 00:02:27 +0000
1928+++ Percona-Server/include/mysql_time.h 2013-05-23 20:25:41 +0000
1929@@ -1,4 +1,5 @@
1930-/* Copyright (C) 2004 MySQL AB
1931+/* Copyright (c) 2004, 2006 MySQL AB
1932+ Use is subject to license terms
1933
1934 This program is free software; you can redistribute it and/or modify
1935 it under the terms of the GNU General Public License as published by
1936
1937=== modified file 'Percona-Server/include/mysql_version.h.in'
1938--- Percona-Server/include/mysql_version.h.in 2007-09-13 14:19:46 +0000
1939+++ Percona-Server/include/mysql_version.h.in 2013-05-23 20:25:41 +0000
1940@@ -1,4 +1,5 @@
1941-/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
1942+/* Copyright (c) 1996, 1999-2004, 2007 MySQL AB
1943+ Use is subject to license terms
1944 This file is public domain and comes with NO WARRANTY of any kind */
1945
1946 /* Version numbers for protocol & mysqld */
1947
1948=== modified file 'Percona-Server/include/welcome_copyright_notice.h'
1949--- Percona-Server/include/welcome_copyright_notice.h 2013-03-21 16:54:18 +0000
1950+++ Percona-Server/include/welcome_copyright_notice.h 2013-05-23 20:25:41 +0000
1951@@ -1,4 +1,4 @@
1952-/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
1953+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
1954
1955 This program is free software; you can redistribute it and/or modify
1956 it under the terms of the GNU General Public License as published by
1957
1958=== modified file 'Percona-Server/libmysql/CMakeLists.txt'
1959--- Percona-Server/libmysql/CMakeLists.txt 2012-02-16 09:48:16 +0000
1960+++ Percona-Server/libmysql/CMakeLists.txt 2013-05-23 20:25:41 +0000
1961@@ -208,8 +208,11 @@
1962 IF(NOT libmysql_link_flag)
1963 SET(libmysql_link_flags)
1964 ENDIF()
1965- SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
1966- "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}")
1967+ IF(INSTALL_LAYOUT STREQUAL "RPM")
1968+ SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libmysql.map ${LINK_FLAG_NO_UNDEFINED}")
1969+ ELSE()
1970+ SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS "${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED}")
1971+ ENDIF(INSTALL_LAYOUT STREQUAL "RPM")
1972 ENDIF()
1973 # clean direct output needs to be set several targets have the same name
1974 #(mysqlclient in this case)
1975
1976=== modified file 'Percona-Server/libmysql/errmsg.c'
1977--- Percona-Server/libmysql/errmsg.c 2011-06-30 15:46:53 +0000
1978+++ Percona-Server/libmysql/errmsg.c 2013-05-23 20:25:41 +0000
1979@@ -23,6 +23,7 @@
1980 #include <my_sys.h>
1981 #include "errmsg.h"
1982
1983+const char **mysql_client_errors = client_errors;
1984 const char *client_errors[]=
1985 {
1986 "Unknown MySQL error",
1987
1988=== modified file 'Percona-Server/libmysql/libmysql.c'
1989--- Percona-Server/libmysql/libmysql.c 2013-03-22 03:29:56 +0000
1990+++ Percona-Server/libmysql/libmysql.c 2013-05-23 20:25:41 +0000
1991@@ -2107,7 +2107,14 @@
1992 DBUG_RETURN(1);
1993 }
1994
1995- net_clear(net, 1); /* Sets net->write_pos */
1996+ if (net->vio)
1997+ net_clear(net, 1); /* Sets net->write_pos */
1998+ else
1999+ {
2000+ set_stmt_errmsg(stmt, net);
2001+ DBUG_RETURN(1);
2002+ }
2003+
2004 /* Reserve place for null-marker bytes */
2005 null_count= (stmt->param_count+7) /8;
2006 if (my_realloc_str(net, null_count + 1))
2007
2008=== added file 'Percona-Server/libmysql/libmysql.map'
2009--- Percona-Server/libmysql/libmysql.map 1970-01-01 00:00:00 +0000
2010+++ Percona-Server/libmysql/libmysql.map 2013-05-23 20:25:41 +0000
2011@@ -0,0 +1,146 @@
2012+# symbols exported from mysql 5.1
2013+libmysqlclient_16 {
2014+ global:
2015+ _fini;
2016+ _init;
2017+ my_init;
2018+ myodbc_remove_escape;
2019+ mysql_affected_rows;
2020+ mysql_autocommit;
2021+ mysql_change_user;
2022+ mysql_character_set_name;
2023+ mysql_close;
2024+ mysql_commit;
2025+ mysql_data_seek;
2026+ mysql_debug;
2027+ mysql_dump_debug_info;
2028+ mysql_embedded;
2029+ mysql_eof;
2030+ mysql_errno;
2031+ mysql_error;
2032+ mysql_escape_string;
2033+ mysql_fetch_field;
2034+ mysql_fetch_field_direct;
2035+ mysql_fetch_fields;
2036+ mysql_fetch_lengths;
2037+ mysql_fetch_row;
2038+ mysql_field_count;
2039+ mysql_field_seek;
2040+ mysql_field_tell;
2041+ mysql_free_result;
2042+ mysql_get_character_set_info;
2043+ mysql_get_client_info;
2044+ mysql_get_client_version;
2045+ mysql_get_host_info;
2046+ mysql_get_parameters;
2047+ mysql_get_proto_info;
2048+ mysql_get_server_info;
2049+ mysql_get_server_version;
2050+ mysql_get_ssl_cipher;
2051+ mysql_hex_string;
2052+ mysql_info;
2053+ mysql_init;
2054+ mysql_insert_id;
2055+ mysql_kill;
2056+ mysql_list_dbs;
2057+ mysql_list_fields;
2058+ mysql_list_processes;
2059+ mysql_list_tables;
2060+ mysql_more_results;
2061+ mysql_next_result;
2062+ mysql_num_fields;
2063+ mysql_num_rows;
2064+ mysql_options;
2065+ mysql_ping;
2066+ mysql_query;
2067+ mysql_read_query_result;
2068+ mysql_real_connect;
2069+ mysql_real_escape_string;
2070+ mysql_real_query;
2071+ mysql_refresh;
2072+ mysql_rollback;
2073+ mysql_row_seek;
2074+ mysql_row_tell;
2075+ mysql_select_db;
2076+ mysql_send_query;
2077+ mysql_server_end;
2078+ mysql_server_init;
2079+ mysql_set_character_set;
2080+ mysql_set_local_infile_default;
2081+ mysql_set_local_infile_handler;
2082+ mysql_set_server_option;
2083+ mysql_shutdown;
2084+ mysql_sqlstate;
2085+ mysql_ssl_set;
2086+ mysql_stat;
2087+ mysql_stmt_affected_rows;
2088+ mysql_stmt_attr_get;
2089+ mysql_stmt_attr_set;
2090+ mysql_stmt_bind_param;
2091+ mysql_stmt_bind_result;
2092+ mysql_stmt_close;
2093+ mysql_stmt_data_seek;
2094+ mysql_stmt_errno;
2095+ mysql_stmt_error;
2096+ mysql_stmt_execute;
2097+ mysql_stmt_fetch;
2098+ mysql_stmt_fetch_column;
2099+ mysql_stmt_field_count;
2100+ mysql_stmt_free_result;
2101+ mysql_stmt_init;
2102+ mysql_stmt_insert_id;
2103+ mysql_stmt_num_rows;
2104+ mysql_stmt_param_count;
2105+ mysql_stmt_param_metadata;
2106+ mysql_stmt_prepare;
2107+ mysql_stmt_reset;
2108+ mysql_stmt_result_metadata;
2109+ mysql_stmt_row_seek;
2110+ mysql_stmt_row_tell;
2111+ mysql_stmt_send_long_data;
2112+ mysql_stmt_sqlstate;
2113+ mysql_stmt_store_result;
2114+ mysql_store_result;
2115+ mysql_thread_end;
2116+ mysql_thread_id;
2117+ mysql_thread_init;
2118+ mysql_thread_safe;
2119+ mysql_use_result;
2120+ mysql_warning_count;
2121+# These are documented in Paul DuBois' MySQL book, so we treat them as part
2122+# of the de-facto API.
2123+ free_defaults;
2124+ handle_options;
2125+ load_defaults;
2126+ my_print_help;
2127+# This isn't really documented anywhere, but it seems to be part of the
2128+# de-facto API as well. We're not going to export the deprecated version
2129+# make_scrambled_password, however.
2130+ my_make_scrambled_password;
2131+ local:
2132+ *;
2133+};
2134+# symbols added in mysql 5.5
2135+libmysqlclient_18 {
2136+ global:
2137+ mysql_client_find_plugin;
2138+ mysql_client_register_plugin;
2139+ mysql_load_plugin;
2140+ mysql_load_plugin_v;
2141+ mysql_plugin_options;
2142+ mysql_stmt_next_result;
2143+#
2144+# Ideally the following symbols wouldn't be exported, but various applications
2145+# require them. We limit the namespace damage by prefixing mysql_
2146+# (see mysql-dubious-exports.patch), which means the symbols are not present
2147+# in libmysqlclient_16.
2148+#
2149+# mysql-connector-odbc requires these
2150+ mysql_default_charset_info;
2151+ mysql_get_charset;
2152+ mysql_get_charset_by_csname;
2153+ mysql_net_realloc;
2154+# PHP's mysqli.so requires this (via the ER() macro)
2155+ client_errors;
2156+ mysql_client_errors;
2157+};
2158
2159=== modified file 'Percona-Server/mysql-test/collections/default.experimental'
2160--- Percona-Server/mysql-test/collections/default.experimental 2013-03-21 16:54:18 +0000
2161+++ Percona-Server/mysql-test/collections/default.experimental 2013-05-23 20:25:41 +0000
2162@@ -6,6 +6,7 @@
2163 funcs_1.charset_collation_1 # depends on compile-time decisions
2164
2165 main.func_math @freebsd # Bug#11751977 2010-05-04 alik main.func_math fails on FreeBSD in PB2
2166+main.kill @solaris # Bug#16064876 2013-01-02 prthirum main.kill fails on sol10 sparc64
2167 main.lock_multi_bug38499 # Bug#11755645 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
2168 main.outfile_loaddata @solaris # Bug#11755168 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
2169 main.signal_demo3 @solaris # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
2170
2171=== modified file 'Percona-Server/mysql-test/include/get_relay_log_pos.inc'
2172--- Percona-Server/mysql-test/include/get_relay_log_pos.inc 2010-10-21 07:37:10 +0000
2173+++ Percona-Server/mysql-test/include/get_relay_log_pos.inc 2013-05-23 20:25:41 +0000
2174@@ -40,7 +40,6 @@
2175 # '# .... end_log_pos 46'
2176 eval LOAD DATA LOCAL INFILE '$_tmp_file' INTO TABLE mysqlbinlog_events
2177 LINES STARTING BY '#' (c2) SET c1 = NULL;
2178---enable_warnings
2179
2180 # Event pos in relay log file is inserted into table events_at
2181 CREATE TEMPORARY TABLE events_at(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
2182@@ -49,6 +48,7 @@
2183 # Event pos in master log file is inserted into table events_pos
2184 CREATE TEMPORARY TABLE events_pos(c1 INT AUTO_INCREMENT KEY, c2 varchar(256))
2185 SELECT c2 FROM mysqlbinlog_events WHERE c2 LIKE '% end_log_pos %' ORDER BY c1;
2186+--enable_warnings
2187
2188 # events_at events_pos
2189 # c1------c2-------------------------- c1------c2------------------------
2190
2191=== modified file 'Percona-Server/mysql-test/include/rpl_init.inc'
2192--- Percona-Server/mysql-test/include/rpl_init.inc 2010-12-20 14:15:01 +0000
2193+++ Percona-Server/mysql-test/include/rpl_init.inc 2013-05-23 20:25:41 +0000
2194@@ -7,7 +7,6 @@
2195 # well as extra connections server_1_1, server_2_1, ...,
2196 # server_N_1. server_I and server_I_1 are connections to the same
2197 # server.
2198-# - Sets up @@auto_increment_increment and @@auto_increment_increment.
2199 # - Verifies that @@server_id of all servers are different.
2200 # - Calls RESET MASTER, RESET SLAVE, USE test, CHANGE MASTER, START SLAVE.
2201 # - Sets the connection to server_1 before exiting.
2202@@ -179,8 +178,6 @@
2203 RESET MASTER;
2204 RESET SLAVE;
2205 }
2206- eval SET auto_increment_increment= $rpl_server_count;
2207- eval SET auto_increment_offset= $_rpl_server;
2208
2209 --dec $_rpl_server
2210 }
2211
2212=== modified file 'Percona-Server/mysql-test/mysql-test-run.pl'
2213--- Percona-Server/mysql-test/mysql-test-run.pl 2013-03-21 16:54:18 +0000
2214+++ Percona-Server/mysql-test/mysql-test-run.pl 2013-05-23 20:25:41 +0000
2215@@ -700,9 +700,11 @@
2216 mtr_report("\nRetrying test $tname, ".
2217 "attempt($retries/$opt_retry)...\n");
2218 #saving the log file as filename.failed in case of retry
2219- my $worker_logdir= $result->{savedir};
2220- my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
2221- rename $log_file_name,$log_file_name.".failed";
2222+ if ( $result->is_failed() ) {
2223+ my $worker_logdir= $result->{savedir};
2224+ my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
2225+ rename $log_file_name,$log_file_name.".failed";
2226+ }
2227 delete($result->{result});
2228 $result->{retries}= $retries+1;
2229 $result->write_test($sock, 'TESTCASE');
2230@@ -3844,6 +3846,7 @@
2231
2232 sub run_testcase ($) {
2233 my $tinfo= shift;
2234+ my $print_freq=20;
2235
2236 mtr_verbose("Running test:", $tinfo->{name});
2237 resfile_report_test($tinfo) if $opt_resfile;
2238@@ -4003,6 +4006,7 @@
2239 my $test= start_mysqltest($tinfo);
2240 # Set only when we have to keep waiting after expectedly died server
2241 my $keep_waiting_proc = 0;
2242+ my $print_timeout= start_timer($print_freq * 60);
2243
2244 while (1)
2245 {
2246@@ -4027,7 +4031,22 @@
2247 }
2248 if (! $keep_waiting_proc)
2249 {
2250- $proc= My::SafeProcess->wait_any_timeout($test_timeout);
2251+ if($test_timeout > $print_timeout)
2252+ {
2253+ $proc= My::SafeProcess->wait_any_timeout($print_timeout);
2254+ if ( $proc->{timeout} )
2255+ {
2256+ #print out that the test is still on
2257+ mtr_print("Test still running: $tinfo->{name}");
2258+ #reset the timer
2259+ $print_timeout= start_timer($print_freq * 60);
2260+ next;
2261+ }
2262+ }
2263+ else
2264+ {
2265+ $proc= My::SafeProcess->wait_any_timeout($test_timeout);
2266+ }
2267 }
2268
2269 # Will be restored if we need to keep waiting
2270
2271=== modified file 'Percona-Server/mysql-test/r/cast.result'
2272--- Percona-Server/mysql-test/r/cast.result 2012-02-22 10:20:52 +0000
2273+++ Percona-Server/mysql-test/r/cast.result 2013-05-23 20:25:41 +0000
2274@@ -477,4 +477,22 @@
2275 AND CAST(a AS BINARY)=x'65736D697468';
2276 a
2277 DROP TABLE t1;
2278+#
2279+# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH
2280+# LONGTEXT, UNION, USER VARIABLE
2281+# Bug#14096619 UNABLE TO RESTORE DATABASE DUMP
2282+#
2283+CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)),
2284+CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED));
2285+Warnings:
2286+Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
2287+Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
2288+SHOW CREATE TABLE t1;
2289+Table Create Table
2290+t1 CREATE TABLE `t1` (
2291+ `CONCAT(CAST(REPEAT('9', 1000) AS SIGNED))` varchar(21) NOT NULL DEFAULT '',
2292+ `CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED))` varchar(21) NOT NULL DEFAULT ''
2293+) ENGINE=MyISAM DEFAULT CHARSET=latin1
2294+DROP TABLE t1;
2295+# End of test for Bug#13581962, Bug#14096619
2296 End of 5.1 tests
2297
2298=== added file 'Percona-Server/mysql-test/r/change_user_notembedded.result'
2299--- Percona-Server/mysql-test/r/change_user_notembedded.result 1970-01-01 00:00:00 +0000
2300+++ Percona-Server/mysql-test/r/change_user_notembedded.result 2013-05-23 20:25:41 +0000
2301@@ -0,0 +1,5 @@
2302+ERROR 28000: Access denied for user 'foo'@'localhost' (using password: YES)
2303+ERROR 28000: Access denied for user 'foo'@'localhost' (using password: NO)
2304+ERROR 28000: Access denied for user 'foo'@'localhost' (using password: YES)
2305+ERROR 08S01: Unknown command
2306+ERROR 08S01: Unknown command
2307
2308=== modified file 'Percona-Server/mysql-test/r/ctype_utf8mb4.result'
2309--- Percona-Server/mysql-test/r/ctype_utf8mb4.result 2010-09-28 15:15:58 +0000
2310+++ Percona-Server/mysql-test/r/ctype_utf8mb4.result 2013-05-23 20:25:41 +0000
2311@@ -2539,6 +2539,24 @@
2312 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
2313 DROP TABLE t1, t2;
2314 #
2315+# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH
2316+# LONGTEXT, UNION, USER VARIABLE
2317+# Bug#14096619 UNABLE TO RESTORE DATABASE DUMP
2318+#
2319+CREATE TABLE t1(f1 LONGTEXT CHARACTER SET utf8mb4);
2320+INSERT INTO t1 VALUES ('a');
2321+SELECT @a:= CAST(f1 AS SIGNED) FROM t1
2322+UNION ALL
2323+SELECT CAST(f1 AS SIGNED) FROM t1;
2324+@a:= CAST(f1 AS SIGNED)
2325+0
2326+0
2327+Warnings:
2328+Warning 1292 Truncated incorrect INTEGER value: 'a'
2329+Warning 1292 Truncated incorrect INTEGER value: 'a'
2330+DROP TABLE t1;
2331+# End of test for Bug#13581962,Bug#14096619
2332+#
2333 # End of 5.5 tests
2334 #
2335 #
2336
2337=== added file 'Percona-Server/mysql-test/r/failed_auth_3909.result'
2338--- Percona-Server/mysql-test/r/failed_auth_3909.result 1970-01-01 00:00:00 +0000
2339+++ Percona-Server/mysql-test/r/failed_auth_3909.result 2013-05-23 20:25:41 +0000
2340@@ -0,0 +1,20 @@
2341+optimize table mysql.user;
2342+Table Op Msg_type Msg_text
2343+mysql.user optimize status OK
2344+insert mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar');
2345+Warnings:
2346+Warning 1364 Field 'ssl_cipher' doesn't have a default value
2347+Warning 1364 Field 'x509_issuer' doesn't have a default value
2348+Warning 1364 Field 'x509_subject' doesn't have a default value
2349+flush privileges;
2350+connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET);
2351+ERROR HY000: Plugin 'bar' is not loaded
2352+connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET);
2353+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
2354+connect(localhost,u2,password,test,MASTER_PORT,MASTER_SOCKET);
2355+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
2356+ERROR HY000: Plugin 'bar' is not loaded
2357+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: NO)
2358+ERROR 28000: Access denied for user 'u2'@'localhost' (using password: YES)
2359+delete from mysql.user where plugin = 'bar';
2360+flush privileges;
2361
2362=== modified file 'Percona-Server/mysql-test/r/join_outer.result'
2363--- Percona-Server/mysql-test/r/join_outer.result 2012-02-07 16:32:04 +0000
2364+++ Percona-Server/mysql-test/r/join_outer.result 2013-05-23 20:25:41 +0000
2365@@ -1702,4 +1702,36 @@
2366 f
2367 1
2368 DROP TABLE t1;
2369+#
2370+# Bug#13068506 - QUERY WITH GROUP BY ON NON-AGGR COLUMN RETURNS
2371+# WRONG RESULT
2372+#
2373+CREATE TABLE t1 (i1 int);
2374+INSERT INTO t1 VALUES (100), (101);
2375+CREATE TABLE t2 (i2 int, i3 int);
2376+INSERT INTO t2 VALUES (20,1),(10,2);
2377+CREATE TABLE t3 (i4 int(11));
2378+INSERT INTO t3 VALUES (1),(2);
2379+
2380+SELECT (
2381+SELECT MAX( t2.i2 )
2382+FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 )
2383+WHERE t2.i3 <> t1.i1
2384+) AS field1
2385+FROM t1;;
2386+field1
2387+20
2388+20
2389+
2390+SELECT (
2391+SELECT MAX( t2.i2 )
2392+FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 )
2393+WHERE t2.i3 <> t1.i1
2394+) AS field1
2395+FROM t1 GROUP BY field1;;
2396+field1
2397+20
2398+
2399+drop table t1,t2,t3;
2400+# End of test for Bug#13068506
2401 End of 5.1 tests
2402
2403=== modified file 'Percona-Server/mysql-test/r/mysqltest.result'
2404--- Percona-Server/mysql-test/r/mysqltest.result 2011-11-08 14:55:25 +0000
2405+++ Percona-Server/mysql-test/r/mysqltest.result 2013-05-23 20:25:41 +0000
2406@@ -922,9 +922,9 @@
2407 b varchar(255) YES NULL
2408 c datetime YES NULL
2409 drop table t1;
2410-mysqltest: At line 1: change user failed: Unknown database 'inexistent'
2411-mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
2412-mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
2413+mysqltest: At line 1: query 'change_user root,,inexistent' failed: 1049: Unknown database 'inexistent'
2414+mysqltest: At line 1: query 'change_user inexistent,,test' failed: 1045: Access denied for user 'inexistent'@'localhost' (using password: NO)
2415+mysqltest: At line 1: query 'change_user root,inexistent,test' failed: 1045: Access denied for user 'root'@'localhost' (using password: YES)
2416 REPLACED_FILE1.txt
2417 file1.txt
2418 file2.txt
2419
2420=== modified file 'Percona-Server/mysql-test/r/partition.result'
2421--- Percona-Server/mysql-test/r/partition.result 2012-01-27 12:21:21 +0000
2422+++ Percona-Server/mysql-test/r/partition.result 2013-05-23 20:25:41 +0000
2423@@ -1758,13 +1758,13 @@
2424 partition by key (a);
2425 REPAIR TABLE t1;
2426 Table Op Msg_type Msg_text
2427-test.t1 repair note The storage engine for the table doesn't support repair
2428+test.t1 repair status OK
2429 OPTIMIZE TABLE t1;
2430 Table Op Msg_type Msg_text
2431 test.t1 optimize note The storage engine for the table doesn't support optimize
2432 CHECK TABLE t1;
2433 Table Op Msg_type Msg_text
2434-test.t1 check note The storage engine for the table doesn't support check
2435+test.t1 check status OK
2436 ANALYZE TABLE t1;
2437 Table Op Msg_type Msg_text
2438 test.t1 analyze note The storage engine for the table doesn't support analyze
2439
2440=== modified file 'Percona-Server/mysql-test/r/percona_server_variables_debug.result'
2441--- Percona-Server/mysql-test/r/percona_server_variables_debug.result 2013-04-04 10:52:07 +0000
2442+++ Percona-Server/mysql-test/r/percona_server_variables_debug.result 2013-05-23 20:25:41 +0000
2443@@ -89,6 +89,7 @@
2444 INNODB_AUTOEXTEND_INCREMENT
2445 INNODB_AUTOINC_LOCK_MODE
2446 INNODB_BLOCKING_BUFFER_POOL_RESTORE
2447+INNODB_BUFFER_POOL_EVICT
2448 INNODB_BUFFER_POOL_INSTANCES
2449 INNODB_BUFFER_POOL_POPULATE
2450 INNODB_BUFFER_POOL_RESTORE_AT_STARTUP
2451@@ -177,6 +178,7 @@
2452 INNODB_TRACK_CHANGED_PAGES
2453 INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
2454 INNODB_TRX_RSEG_N_SLOTS_DEBUG
2455+INNODB_USE_ATOMIC_WRITES
2456 INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
2457 INNODB_USE_NATIVE_AIO
2458 INNODB_USE_SYS_MALLOC
2459
2460=== modified file 'Percona-Server/mysql-test/r/percona_server_variables_release.result'
2461--- Percona-Server/mysql-test/r/percona_server_variables_release.result 2013-04-04 10:52:07 +0000
2462+++ Percona-Server/mysql-test/r/percona_server_variables_release.result 2013-05-23 20:25:41 +0000
2463@@ -170,6 +170,7 @@
2464 INNODB_THREAD_CONCURRENCY_TIMER_BASED
2465 INNODB_THREAD_SLEEP_DELAY
2466 INNODB_TRACK_CHANGED_PAGES
2467+INNODB_USE_ATOMIC_WRITES
2468 INNODB_USE_GLOBAL_FLUSH_LOG_AT_TRX_COMMIT
2469 INNODB_USE_NATIVE_AIO
2470 INNODB_USE_SYS_MALLOC
2471
2472=== modified file 'Percona-Server/mysql-test/r/show_check.result'
2473--- Percona-Server/mysql-test/r/show_check.result 2013-01-16 01:34:54 +0000
2474+++ Percona-Server/mysql-test/r/show_check.result 2013-05-23 20:25:41 +0000
2475@@ -15,7 +15,7 @@
2476 def Table 253 128 7 Y 0 31 8
2477 def Op 253 10 5 Y 0 31 8
2478 def Msg_type 253 10 6 Y 0 31 8
2479-def Msg_text 253 255 27 Y 0 31 8
2480+def Msg_text 250 393216 27 Y 0 31 8
2481 Table Op Msg_type Msg_text
2482 test.t1 check status Table is already up to date
2483 check table t1 fast;
2484@@ -23,7 +23,7 @@
2485 def Table 253 128 7 Y 0 31 8
2486 def Op 253 10 5 Y 0 31 8
2487 def Msg_type 253 10 6 Y 0 31 8
2488-def Msg_text 253 255 27 Y 0 31 8
2489+def Msg_text 250 393216 27 Y 0 31 8
2490 Table Op Msg_type Msg_text
2491 test.t1 check status Table is already up to date
2492 check table t1 changed;
2493@@ -31,7 +31,7 @@
2494 def Table 253 128 7 Y 0 31 8
2495 def Op 253 10 5 Y 0 31 8
2496 def Msg_type 253 10 6 Y 0 31 8
2497-def Msg_text 253 255 2 Y 0 31 8
2498+def Msg_text 250 393216 2 Y 0 31 8
2499 Table Op Msg_type Msg_text
2500 test.t1 check status OK
2501 insert into t1 values (5,5,5);
2502@@ -40,7 +40,7 @@
2503 def Table 253 128 7 Y 0 31 8
2504 def Op 253 10 5 Y 0 31 8
2505 def Msg_type 253 10 6 Y 0 31 8
2506-def Msg_text 253 255 2 Y 0 31 8
2507+def Msg_text 250 393216 2 Y 0 31 8
2508 Table Op Msg_type Msg_text
2509 test.t1 check status OK
2510 check table t1 medium;
2511@@ -48,7 +48,7 @@
2512 def Table 253 128 7 Y 0 31 8
2513 def Op 253 10 5 Y 0 31 8
2514 def Msg_type 253 10 6 Y 0 31 8
2515-def Msg_text 253 255 2 Y 0 31 8
2516+def Msg_text 250 393216 2 Y 0 31 8
2517 Table Op Msg_type Msg_text
2518 test.t1 check status OK
2519 check table t1 extended;
2520@@ -56,7 +56,7 @@
2521 def Table 253 128 7 Y 0 31 8
2522 def Op 253 10 5 Y 0 31 8
2523 def Msg_type 253 10 6 Y 0 31 8
2524-def Msg_text 253 255 2 Y 0 31 8
2525+def Msg_text 250 393216 2 Y 0 31 8
2526 Table Op Msg_type Msg_text
2527 test.t1 check status OK
2528 show index from t1;
2529@@ -88,7 +88,7 @@
2530 def Table 253 128 7 Y 0 31 8
2531 def Op 253 10 8 Y 0 31 8
2532 def Msg_type 253 10 6 Y 0 31 8
2533-def Msg_text 253 255 2 Y 0 31 8
2534+def Msg_text 250 393216 2 Y 0 31 8
2535 Table Op Msg_type Msg_text
2536 test.t1 optimize status OK
2537 optimize table t1;
2538@@ -160,7 +160,7 @@
2539 def Table 253 128 7 Y 0 31 8
2540 def Op 253 10 7 Y 0 31 8
2541 def Msg_type 253 10 6 Y 0 31 8
2542-def Msg_text 253 255 2 Y 0 31 8
2543+def Msg_text 250 393216 2 Y 0 31 8
2544 Table Op Msg_type Msg_text
2545 test.t1 analyze status OK
2546 show index from t1;
2547@@ -177,7 +177,7 @@
2548 def Table 253 128 7 Y 0 31 8
2549 def Op 253 10 6 Y 0 31 8
2550 def Msg_type 253 10 6 Y 0 31 8
2551-def Msg_text 253 255 2 Y 0 31 8
2552+def Msg_text 250 393216 2 Y 0 31 8
2553 Table Op Msg_type Msg_text
2554 test.t1 repair status OK
2555 show index from t1;
2556
2557=== modified file 'Percona-Server/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result'
2558--- Percona-Server/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result 2010-06-01 23:25:08 +0000
2559+++ Percona-Server/mysql-test/suite/binlog/r/binlog_spurious_ddl_errors.result 2013-05-23 20:25:41 +0000
2560@@ -48,6 +48,7 @@
2561 ################################################################################
2562 # CLEAN UP #
2563 ################################################################################
2564+flush tables;
2565 UNINSTALL PLUGIN example;
2566 SET @@global.binlog_format = @old_binlog_format;
2567 SET @@session.binlog_format = @old_binlog_format;
2568
2569=== modified file 'Percona-Server/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test'
2570--- Percona-Server/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test 2010-06-01 23:25:08 +0000
2571+++ Percona-Server/mysql-test/suite/binlog/t/binlog_spurious_ddl_errors.test 2013-05-23 20:25:41 +0000
2572@@ -26,7 +26,8 @@
2573 --source include/have_log_bin.inc
2574
2575 SET @old_binlog_format= @@global.binlog_format;
2576-INSTALL PLUGIN example SONAME 'ha_example.so';
2577+--replace_regex /\.dll/.so/
2578+eval INSTALL PLUGIN example SONAME '$EXAMPLE_PLUGIN';
2579
2580 --echo ################################################################################
2581 --echo # Verifies if ER_BINLOG_STMT_MODE_AND_ROW_ENGINE happens by setting the binlog
2582@@ -90,6 +91,7 @@
2583 --echo ################################################################################
2584 --echo # CLEAN UP #
2585 --echo ################################################################################
2586+flush tables;
2587 UNINSTALL PLUGIN example;
2588 SET @@global.binlog_format = @old_binlog_format;
2589 SET @@session.binlog_format = @old_binlog_format;
2590
2591=== modified file 'Percona-Server/mysql-test/suite/binlog/t/disabled.def'
2592--- Percona-Server/mysql-test/suite/binlog/t/disabled.def 2011-05-24 06:40:38 +0000
2593+++ Percona-Server/mysql-test/suite/binlog/t/disabled.def 2013-05-23 20:25:41 +0000
2594@@ -10,4 +10,4 @@
2595 #
2596 ##############################################################################
2597 binlog_truncate_innodb : BUG#11764459 2010-10-20 anitha Originally disabled due to BUG#42643. Product bug fixed, but test changes needed
2598-binlog_spurious_ddl_errors : BUG#11761680 2010-06-03 alik binlog_spurious_ddl_errors.test fails, thus disabled
2599+binlog_spurious_ddl_errors : BUG#11761680 2013-01-18 astha Fixed on mysql-5.6 and trunk
2600
2601=== modified file 'Percona-Server/mysql-test/suite/innodb/r/innodb_bug14147491.result'
2602--- Percona-Server/mysql-test/suite/innodb/r/innodb_bug14147491.result 2012-11-19 09:28:51 +0000
2603+++ Percona-Server/mysql-test/suite/innodb/r/innodb_bug14147491.result 2013-05-23 20:25:41 +0000
2604@@ -4,14 +4,25 @@
2605 CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
2606 INSERT INTO t1 (b) VALUES ('corrupt me');
2607 INSERT INTO t1 (b) VALUES ('corrupt me');
2608-# Restart server to flush buffers
2609+# Write file to make mysql-test-run.pl expect the "crash", but don't
2610+# start it until it's told to
2611+# We give 30 seconds to do a clean shutdown because we do not want
2612+# to redo apply the pages of t1.ibd at the time of recovery.
2613+# We want SQL to initiate the first access to t1.ibd.
2614+# Wait until disconnected.
2615+# Backup the t1.ibd before corrupting
2616 # Corrupt the table
2617 Munged a string.
2618 Munged a string.
2619-# Write file to make mysql-test-run.pl expect crash and restart
2620+# Write file to make mysql-test-run.pl start up the server again
2621+SET DEBUG = '+d,innodb_page_corruption_retries';
2622+# Write file to make mysql-test-run.pl expect the "crash", but don't
2623+# start it until it's told to
2624+# The below SELECT query will crash the server because some pages
2625+# on the disk are corrupted
2626 SELECT * FROM t1;
2627 ERROR HY000: Lost connection to MySQL server during query
2628-# Turn on reconnect
2629-# Wait for server to fully start
2630+# Restore the original t1.ibd
2631+# Write file to make mysql-test-run.pl start up the server again
2632 # Cleanup
2633 DROP TABLE t1;
2634
2635=== modified file 'Percona-Server/mysql-test/suite/innodb/t/innodb_bug12400341.test'
2636--- Percona-Server/mysql-test/suite/innodb/t/innodb_bug12400341.test 2012-01-10 05:23:20 +0000
2637+++ Percona-Server/mysql-test/suite/innodb/t/innodb_bug12400341.test 2013-05-23 20:25:41 +0000
2638@@ -7,6 +7,10 @@
2639 --skip Test requires InnoDB built with UNIV_DEBUG definition.
2640 }
2641
2642+# Don't test under valgrind, undo slots of the previous test might exist still
2643+# and cause unstable result.
2644+--source include/not_valgrind.inc
2645+
2646 call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too");
2647
2648 --disable_query_log
2649
2650=== modified file 'Percona-Server/mysql-test/suite/innodb/t/innodb_bug14147491.test'
2651--- Percona-Server/mysql-test/suite/innodb/t/innodb_bug14147491.test 2012-11-19 09:28:51 +0000
2652+++ Percona-Server/mysql-test/suite/innodb/t/innodb_bug14147491.test 2013-05-23 20:25:41 +0000
2653@@ -10,6 +10,8 @@
2654 source include/not_embedded.inc;
2655 # Require InnoDB
2656 source include/have_innodb.inc;
2657+# Require Debug for SET DEBUG
2658+source include/have_debug.inc;
2659
2660 CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
2661 CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
2662@@ -27,13 +29,26 @@
2663 --enable_query_log
2664 INSERT INTO t1 (b) VALUES ('corrupt me');
2665
2666---echo # Restart server to flush buffers
2667-source include/restart_mysqld.inc;
2668-
2669---echo # Corrupt the table
2670 let $MYSQLD_DATADIR=`select @@datadir`;
2671 let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
2672
2673+--echo # Write file to make mysql-test-run.pl expect the "crash", but don't
2674+--echo # start it until it's told to
2675+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
2676+
2677+--echo # We give 30 seconds to do a clean shutdown because we do not want
2678+--echo # to redo apply the pages of t1.ibd at the time of recovery.
2679+--echo # We want SQL to initiate the first access to t1.ibd.
2680+shutdown_server 30;
2681+
2682+--echo # Wait until disconnected.
2683+--source include/wait_until_disconnected.inc
2684+
2685+--echo # Backup the t1.ibd before corrupting
2686+--copy_file $t1_IBD $MYSQLD_DATADIR/test/t1.ibd.backup
2687+
2688+--echo # Corrupt the table
2689+
2690 perl;
2691 use strict;
2692 use warnings;
2693@@ -59,17 +74,38 @@
2694 close IBD_FILE;
2695 EOF
2696
2697---echo # Write file to make mysql-test-run.pl expect crash and restart
2698+--echo # Write file to make mysql-test-run.pl start up the server again
2699 --exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
2700-
2701+--enable_reconnect
2702+--source include/wait_until_connected_again.inc
2703+
2704+SET DEBUG = '+d,innodb_page_corruption_retries';
2705+
2706+--echo # Write file to make mysql-test-run.pl expect the "crash", but don't
2707+--echo # start it until it's told to
2708+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
2709+
2710+--echo # The below SELECT query will crash the server because some pages
2711+--echo # on the disk are corrupted
2712 --error 2013
2713 SELECT * FROM t1;
2714
2715---echo # Turn on reconnect
2716+# The below mtr command --remove_file fails randomly on windows with
2717+# error number 13 which is permission denied on nix systems. We sleep
2718+# 1 second hoping that any process holding lock on t1.ibd is released.
2719+SLEEP 1;
2720+
2721+--echo # Restore the original t1.ibd
2722+--remove_file $MYSQLD_DATADIR/test/t1.ibd
2723+--move_file $MYSQLD_DATADIR/test/t1.ibd.backup $MYSQLD_DATADIR/test/t1.ibd
2724+
2725+--echo # Write file to make mysql-test-run.pl start up the server again
2726+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
2727 --enable_reconnect
2728-
2729---echo # Wait for server to fully start
2730 --source include/wait_until_connected_again.inc
2731
2732+# Note SET DEBUG = '-d,innodb_page_corruption_retries' is not required
2733+# because the session information is lost after server restart
2734+
2735 --echo # Cleanup
2736 DROP TABLE t1;
2737
2738=== modified file 'Percona-Server/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result'
2739--- Percona-Server/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result 2009-11-25 08:19:34 +0000
2740+++ Percona-Server/mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result 2013-05-23 20:25:41 +0000
2741@@ -531,7 +531,7 @@
2742 # check layout success: 1
2743 REPAIR TABLE t1 EXTENDED;
2744 Table Op Msg_type Msg_text
2745-test.t1 repair note The storage engine for the table doesn't support repair
2746+test.t1 repair status OK
2747 # check layout success: 1
2748 TRUNCATE t1;
2749
2750@@ -1023,7 +1023,7 @@
2751 # check layout success: 1
2752 REPAIR TABLE t1 EXTENDED;
2753 Table Op Msg_type Msg_text
2754-test.t1 repair note The storage engine for the table doesn't support repair
2755+test.t1 repair status OK
2756 # check layout success: 1
2757 TRUNCATE t1;
2758
2759@@ -1530,7 +1530,7 @@
2760 # check layout success: 1
2761 REPAIR TABLE t1 EXTENDED;
2762 Table Op Msg_type Msg_text
2763-test.t1 repair note The storage engine for the table doesn't support repair
2764+test.t1 repair status OK
2765 # check layout success: 1
2766 TRUNCATE t1;
2767
2768@@ -2031,7 +2031,7 @@
2769 # check layout success: 1
2770 REPAIR TABLE t1 EXTENDED;
2771 Table Op Msg_type Msg_text
2772-test.t1 repair note The storage engine for the table doesn't support repair
2773+test.t1 repair status OK
2774 # check layout success: 1
2775 TRUNCATE t1;
2776
2777@@ -2530,7 +2530,7 @@
2778 # check layout success: 1
2779 REPAIR TABLE t1 EXTENDED;
2780 Table Op Msg_type Msg_text
2781-test.t1 repair note The storage engine for the table doesn't support repair
2782+test.t1 repair status OK
2783 # check layout success: 1
2784 TRUNCATE t1;
2785
2786@@ -3040,7 +3040,7 @@
2787 # check layout success: 1
2788 REPAIR TABLE t1 EXTENDED;
2789 Table Op Msg_type Msg_text
2790-test.t1 repair note The storage engine for the table doesn't support repair
2791+test.t1 repair status OK
2792 # check layout success: 1
2793 TRUNCATE t1;
2794
2795@@ -3552,7 +3552,7 @@
2796 # check layout success: 1
2797 REPAIR TABLE t1 EXTENDED;
2798 Table Op Msg_type Msg_text
2799-test.t1 repair note The storage engine for the table doesn't support repair
2800+test.t1 repair status OK
2801 # check layout success: 1
2802 TRUNCATE t1;
2803
2804@@ -4052,7 +4052,7 @@
2805 # check layout success: 1
2806 REPAIR TABLE t1 EXTENDED;
2807 Table Op Msg_type Msg_text
2808-test.t1 repair note The storage engine for the table doesn't support repair
2809+test.t1 repair status OK
2810 # check layout success: 1
2811 TRUNCATE t1;
2812
2813@@ -4545,7 +4545,7 @@
2814 # check layout success: 1
2815 REPAIR TABLE t1 EXTENDED;
2816 Table Op Msg_type Msg_text
2817-test.t1 repair note The storage engine for the table doesn't support repair
2818+test.t1 repair status OK
2819 # check layout success: 1
2820 TRUNCATE t1;
2821
2822@@ -5037,7 +5037,7 @@
2823 # check layout success: 1
2824 REPAIR TABLE t1 EXTENDED;
2825 Table Op Msg_type Msg_text
2826-test.t1 repair note The storage engine for the table doesn't support repair
2827+test.t1 repair status OK
2828 # check layout success: 1
2829 TRUNCATE t1;
2830
2831@@ -5544,7 +5544,7 @@
2832 # check layout success: 1
2833 REPAIR TABLE t1 EXTENDED;
2834 Table Op Msg_type Msg_text
2835-test.t1 repair note The storage engine for the table doesn't support repair
2836+test.t1 repair status OK
2837 # check layout success: 1
2838 TRUNCATE t1;
2839
2840@@ -6045,7 +6045,7 @@
2841 # check layout success: 1
2842 REPAIR TABLE t1 EXTENDED;
2843 Table Op Msg_type Msg_text
2844-test.t1 repair note The storage engine for the table doesn't support repair
2845+test.t1 repair status OK
2846 # check layout success: 1
2847 TRUNCATE t1;
2848
2849@@ -6544,7 +6544,7 @@
2850 # check layout success: 1
2851 REPAIR TABLE t1 EXTENDED;
2852 Table Op Msg_type Msg_text
2853-test.t1 repair note The storage engine for the table doesn't support repair
2854+test.t1 repair status OK
2855 # check layout success: 1
2856 TRUNCATE t1;
2857
2858@@ -7054,7 +7054,7 @@
2859 # check layout success: 1
2860 REPAIR TABLE t1 EXTENDED;
2861 Table Op Msg_type Msg_text
2862-test.t1 repair note The storage engine for the table doesn't support repair
2863+test.t1 repair status OK
2864 # check layout success: 1
2865 TRUNCATE t1;
2866
2867@@ -7566,7 +7566,7 @@
2868 # check layout success: 1
2869 REPAIR TABLE t1 EXTENDED;
2870 Table Op Msg_type Msg_text
2871-test.t1 repair note The storage engine for the table doesn't support repair
2872+test.t1 repair status OK
2873 # check layout success: 1
2874 TRUNCATE t1;
2875
2876@@ -8066,7 +8066,7 @@
2877 # check layout success: 1
2878 REPAIR TABLE t1 EXTENDED;
2879 Table Op Msg_type Msg_text
2880-test.t1 repair note The storage engine for the table doesn't support repair
2881+test.t1 repair status OK
2882 # check layout success: 1
2883 TRUNCATE t1;
2884
2885@@ -8576,7 +8576,7 @@
2886 # check layout success: 1
2887 REPAIR TABLE t1 EXTENDED;
2888 Table Op Msg_type Msg_text
2889-test.t1 repair note The storage engine for the table doesn't support repair
2890+test.t1 repair status OK
2891 # check layout success: 1
2892 TRUNCATE t1;
2893
2894@@ -9084,7 +9084,7 @@
2895 # check layout success: 1
2896 REPAIR TABLE t1 EXTENDED;
2897 Table Op Msg_type Msg_text
2898-test.t1 repair note The storage engine for the table doesn't support repair
2899+test.t1 repair status OK
2900 # check layout success: 1
2901 TRUNCATE t1;
2902
2903@@ -9607,7 +9607,7 @@
2904 # check layout success: 1
2905 REPAIR TABLE t1 EXTENDED;
2906 Table Op Msg_type Msg_text
2907-test.t1 repair note The storage engine for the table doesn't support repair
2908+test.t1 repair status OK
2909 # check layout success: 1
2910 TRUNCATE t1;
2911
2912@@ -10124,7 +10124,7 @@
2913 # check layout success: 1
2914 REPAIR TABLE t1 EXTENDED;
2915 Table Op Msg_type Msg_text
2916-test.t1 repair note The storage engine for the table doesn't support repair
2917+test.t1 repair status OK
2918 # check layout success: 1
2919 TRUNCATE t1;
2920
2921@@ -10639,7 +10639,7 @@
2922 # check layout success: 1
2923 REPAIR TABLE t1 EXTENDED;
2924 Table Op Msg_type Msg_text
2925-test.t1 repair note The storage engine for the table doesn't support repair
2926+test.t1 repair status OK
2927 # check layout success: 1
2928 TRUNCATE t1;
2929
2930@@ -11165,7 +11165,7 @@
2931 # check layout success: 1
2932 REPAIR TABLE t1 EXTENDED;
2933 Table Op Msg_type Msg_text
2934-test.t1 repair note The storage engine for the table doesn't support repair
2935+test.t1 repair status OK
2936 # check layout success: 1
2937 TRUNCATE t1;
2938
2939@@ -11693,7 +11693,7 @@
2940 # check layout success: 1
2941 REPAIR TABLE t1 EXTENDED;
2942 Table Op Msg_type Msg_text
2943-test.t1 repair note The storage engine for the table doesn't support repair
2944+test.t1 repair status OK
2945 # check layout success: 1
2946 TRUNCATE t1;
2947
2948@@ -12209,7 +12209,7 @@
2949 # check layout success: 1
2950 REPAIR TABLE t1 EXTENDED;
2951 Table Op Msg_type Msg_text
2952-test.t1 repair note The storage engine for the table doesn't support repair
2953+test.t1 repair status OK
2954 # check layout success: 1
2955 TRUNCATE t1;
2956
2957@@ -12718,7 +12718,7 @@
2958 # check layout success: 1
2959 REPAIR TABLE t1 EXTENDED;
2960 Table Op Msg_type Msg_text
2961-test.t1 repair note The storage engine for the table doesn't support repair
2962+test.t1 repair status OK
2963 # check layout success: 1
2964 TRUNCATE t1;
2965
2966@@ -13226,7 +13226,7 @@
2967 # check layout success: 1
2968 REPAIR TABLE t1 EXTENDED;
2969 Table Op Msg_type Msg_text
2970-test.t1 repair note The storage engine for the table doesn't support repair
2971+test.t1 repair status OK
2972 # check layout success: 1
2973 TRUNCATE t1;
2974
2975@@ -13749,7 +13749,7 @@
2976 # check layout success: 1
2977 REPAIR TABLE t1 EXTENDED;
2978 Table Op Msg_type Msg_text
2979-test.t1 repair note The storage engine for the table doesn't support repair
2980+test.t1 repair status OK
2981 # check layout success: 1
2982 TRUNCATE t1;
2983
2984@@ -14266,7 +14266,7 @@
2985 # check layout success: 1
2986 REPAIR TABLE t1 EXTENDED;
2987 Table Op Msg_type Msg_text
2988-test.t1 repair note The storage engine for the table doesn't support repair
2989+test.t1 repair status OK
2990 # check layout success: 1
2991 TRUNCATE t1;
2992
2993@@ -14781,7 +14781,7 @@
2994 # check layout success: 1
2995 REPAIR TABLE t1 EXTENDED;
2996 Table Op Msg_type Msg_text
2997-test.t1 repair note The storage engine for the table doesn't support repair
2998+test.t1 repair status OK
2999 # check layout success: 1
3000 TRUNCATE t1;
3001
3002@@ -15307,7 +15307,7 @@
3003 # check layout success: 1
3004 REPAIR TABLE t1 EXTENDED;
3005 Table Op Msg_type Msg_text
3006-test.t1 repair note The storage engine for the table doesn't support repair
3007+test.t1 repair status OK
3008 # check layout success: 1
3009 TRUNCATE t1;
3010
3011@@ -15835,7 +15835,7 @@
3012 # check layout success: 1
3013 REPAIR TABLE t1 EXTENDED;
3014 Table Op Msg_type Msg_text
3015-test.t1 repair note The storage engine for the table doesn't support repair
3016+test.t1 repair status OK
3017 # check layout success: 1
3018 TRUNCATE t1;
3019
3020@@ -16351,7 +16351,7 @@
3021 # check layout success: 1
3022 REPAIR TABLE t1 EXTENDED;
3023 Table Op Msg_type Msg_text
3024-test.t1 repair note The storage engine for the table doesn't support repair
3025+test.t1 repair status OK
3026 # check layout success: 1
3027 TRUNCATE t1;
3028
3029@@ -16846,11579 +16846,11579 @@
3030 # check layout success: 1
3031 REPAIR TABLE t1 EXTENDED;
3032 Table Op Msg_type Msg_text
3033-test.t1 repair note The storage engine for the table doesn't support repair
3034-# check layout success: 1
3035-TRUNCATE t1;
3036-
3037-# check TRUNCATE success: 1
3038-# check layout success: 1
3039-# End usability test (inc/partition_check.inc)
3040-DROP TABLE t1;
3041-CREATE TABLE t1 (
3042-f_int1 INTEGER,
3043-f_int2 INTEGER,
3044-f_char1 CHAR(20),
3045-f_char2 CHAR(20),
3046-f_charbig VARCHAR(1000)
3047-
3048-)
3049-PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5;
3050-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
3051-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
3052-WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
3053-ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1);
3054-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
3055-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
3056-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
3057-# Start usability test (inc/partition_check.inc)
3058-create_command
3059-SHOW CREATE TABLE t1;
3060-Table Create Table
3061-t1 CREATE TABLE `t1` (
3062- `f_int1` int(11) NOT NULL DEFAULT '0',
3063- `f_int2` int(11) NOT NULL DEFAULT '0',
3064- `f_char1` char(20) DEFAULT NULL,
3065- `f_char2` char(20) DEFAULT NULL,
3066- `f_charbig` varchar(1000) DEFAULT NULL,
3067- PRIMARY KEY (`f_int2`,`f_int1`),
3068- UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
3069-) ENGINE=InnoDB DEFAULT CHARSET=latin1
3070-/*!50100 PARTITION BY KEY (f_int1,f_int2)
3071-PARTITIONS 5 */
3072-
3073-# check prerequisites-1 success: 1
3074-# check COUNT(*) success: 1
3075-# check MIN/MAX(f_int1) success: 1
3076-# check MIN/MAX(f_int2) success: 1
3077-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3078-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
3079-CAST(f_int1 AS CHAR), 'delete me' FROM t0_template
3080-WHERE f_int1 IN (2,3);
3081-ERROR 23000: Duplicate entry '2-2' for key 'PRIMARY'
3082-# check prerequisites-3 success: 1
3083-# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE
3084-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3085-SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
3086-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
3087-WHERE f_int1 IN (2,3);
3088-DELETE FROM t1 WHERE f_charbig = 'delete me';
3089-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3090-SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
3091-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
3092-WHERE f_int1 IN (2,3);
3093-DELETE FROM t1 WHERE f_charbig = 'delete me';
3094-# check read via f_int1 success: 1
3095-# check read via f_int2 success: 1
3096-
3097-# check multiple-1 success: 1
3098-DELETE FROM t1 WHERE MOD(f_int1,3) = 0;
3099-
3100-# check multiple-2 success: 1
3101-INSERT INTO t1 SELECT * FROM t0_template
3102-WHERE MOD(f_int1,3) = 0;
3103-
3104-# check multiple-3 success: 1
3105-UPDATE t1 SET f_int1 = f_int1 + @max_row
3106-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4
3107-AND @max_row_div2 + @max_row_div4;
3108-
3109-# check multiple-4 success: 1
3110-DELETE FROM t1
3111-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row
3112-AND @max_row_div2 + @max_row_div4 + @max_row;
3113-
3114-# check multiple-5 success: 1
3115-SELECT COUNT(*) INTO @try_count FROM t0_template
3116-WHERE MOD(f_int1,3) = 0
3117-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
3118-SELECT COUNT(*) INTO @clash_count
3119-FROM t1 INNER JOIN t0_template USING(f_int1)
3120-WHERE MOD(f_int1,3) = 0
3121-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
3122-SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1;
3123-INSERT INTO t1
3124-SET f_int1 = @cur_value , f_int2 = @cur_value,
3125-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
3126-f_charbig = '#SINGLE#';
3127-
3128-# check single-1 success: 1
3129-SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1;
3130-INSERT INTO t1
3131-SET f_int1 = @cur_value , f_int2 = @cur_value,
3132-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
3133-f_charbig = '#SINGLE#';
3134-
3135-# check single-2 success: 1
3136-SELECT MIN(f_int1) INTO @cur_value1 FROM t1;
3137-SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1;
3138-UPDATE t1 SET f_int1 = @cur_value2
3139-WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
3140-
3141-# check single-3 success: 1
3142-SET @cur_value1= -1;
3143-SELECT MAX(f_int1) INTO @cur_value2 FROM t1;
3144-UPDATE t1 SET f_int1 = @cur_value1
3145-WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#';
3146-
3147-# check single-4 success: 1
3148-SELECT MAX(f_int1) INTO @cur_value FROM t1;
3149-DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#';
3150-
3151-# check single-5 success: 1
3152-DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#';
3153-
3154-# check single-6 success: 1
3155-INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##';
3156-
3157-# check single-7 success: 1
3158-DELETE FROM t1 WHERE f_charbig = '#2147483647##';
3159-DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0;
3160-INSERT t1 SET f_int1 = 0 , f_int2 = 0,
3161-f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR),
3162-f_charbig = '#NULL#';
3163-INSERT INTO t1
3164-SET f_int1 = NULL , f_int2 = -@max_row,
3165-f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR),
3166-f_charbig = '#NULL#';
3167-ERROR 23000: Column 'f_int1' cannot be null
3168-# check null success: 1
3169-DELETE FROM t1
3170-WHERE f_int1 = 0 AND f_int2 = 0
3171-AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR)
3172-AND f_charbig = '#NULL#';
3173-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3174-SELECT f_int1, f_int1, '', '', 'was inserted'
3175- FROM t0_template source_tab
3176-WHERE MOD(f_int1,3) = 0
3177-AND f_int1 BETWEEN @max_row_div2 AND @max_row
3178-ON DUPLICATE KEY
3179-UPDATE f_int1 = 2 * @max_row + source_tab.f_int1,
3180-f_int2 = 2 * @max_row + source_tab.f_int1,
3181-f_charbig = 'was updated';
3182-
3183-# check unique-1-a success: 1
3184-
3185-# check unique-1-b success: 1
3186-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3187-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3188-f_int2 = CAST(f_char1 AS SIGNED INT),
3189-f_charbig = CONCAT('===',f_char1,'===')
3190-WHERE f_charbig = 'was updated';
3191-REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3192-SELECT f_int1, - f_int1, '', '', 'was inserted or replaced'
3193- FROM t0_template source_tab
3194-WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row;
3195-
3196-# check replace success: 1
3197-DELETE FROM t1
3198-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4;
3199-DELETE FROM t1
3200-WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND
3201-f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row;
3202-UPDATE t1 SET f_int2 = f_int1,
3203-f_char1 = CAST(f_int1 AS CHAR),
3204-f_char2 = CAST(f_int1 AS CHAR),
3205-f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===')
3206-WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2;
3207-SET AUTOCOMMIT= 0;
3208-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3209-SELECT f_int1, f_int1, '', '', 'was inserted'
3210-FROM t0_template source_tab
3211-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
3212-
3213-# check transactions-1 success: 1
3214-COMMIT WORK;
3215-
3216-# check transactions-2 success: 1
3217-ROLLBACK WORK;
3218-
3219-# check transactions-3 success: 1
3220-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3221-COMMIT WORK;
3222-ROLLBACK WORK;
3223-
3224-# check transactions-4 success: 1
3225-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3226-SELECT f_int1, f_int1, '', '', 'was inserted'
3227-FROM t0_template source_tab
3228-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
3229-
3230-# check transactions-5 success: 1
3231-ROLLBACK WORK;
3232-
3233-# check transactions-6 success: 1
3234-# INFO: Storage engine used for t1 seems to be transactional.
3235-COMMIT;
3236-
3237-# check transactions-7 success: 1
3238-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3239-COMMIT WORK;
3240-SET @@session.sql_mode = 'traditional';
3241-SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows;
3242-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3243-SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1,
3244-'', '', 'was inserted' FROM t0_template
3245-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
3246-ERROR 22012: Division by 0
3247-COMMIT;
3248-
3249-# check transactions-8 success: 1
3250-# INFO: Storage engine used for t1 seems to be able to revert
3251-# changes made by the failing statement.
3252-SET @@session.sql_mode = '';
3253-SET AUTOCOMMIT= 1;
3254-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3255-COMMIT WORK;
3256-UPDATE t1 SET f_charbig = REPEAT('b', 1000);
3257-
3258-# check special-1 success: 1
3259-UPDATE t1 SET f_charbig = '';
3260-
3261-# check special-2 success: 1
3262-UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===');
3263-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
3264-SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template
3265-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3266-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3267-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3268-'just inserted' FROM t0_template
3269-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3270-CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW
3271-BEGIN
3272-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3273-f_charbig = 'updated by trigger'
3274- WHERE f_int1 = new.f_int1;
3275-END|
3276-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3277-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
3278-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3279-
3280-# check trigger-1 success: 1
3281-DROP TRIGGER trg_1;
3282-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3283-f_int2 = CAST(f_char1 AS SIGNED INT),
3284-f_charbig = 'just inserted'
3285- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3286-DELETE FROM t0_aux
3287-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3288-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3289-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3290-'just inserted' FROM t0_template
3291-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3292-CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW
3293-BEGIN
3294-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3295-f_charbig = 'updated by trigger'
3296- WHERE f_int1 = new.f_int1;
3297-END|
3298-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3299-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
3300-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3301-
3302-# check trigger-2 success: 1
3303-DROP TRIGGER trg_1;
3304-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3305-f_int2 = CAST(f_char1 AS SIGNED INT),
3306-f_charbig = 'just inserted'
3307- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3308-DELETE FROM t0_aux
3309-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3310-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3311-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3312-'just inserted' FROM t0_template
3313-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3314-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
3315-BEGIN
3316-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3317-f_charbig = 'updated by trigger'
3318- WHERE f_int1 = new.f_int1;
3319-END|
3320-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3321-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3322-
3323-# check trigger-3 success: 1
3324-DROP TRIGGER trg_1;
3325-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3326-f_int2 = CAST(f_char1 AS SIGNED INT),
3327-f_charbig = 'just inserted'
3328- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3329-DELETE FROM t0_aux
3330-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3331-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3332-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3333-'just inserted' FROM t0_template
3334-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3335-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
3336-BEGIN
3337-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3338-f_charbig = 'updated by trigger'
3339- WHERE f_int1 = - old.f_int1;
3340-END|
3341-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3342-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3343-
3344-# check trigger-4 success: 1
3345-DROP TRIGGER trg_1;
3346-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3347-f_int2 = CAST(f_char1 AS SIGNED INT),
3348-f_charbig = 'just inserted'
3349- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3350-DELETE FROM t0_aux
3351-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3352-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3353-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3354-'just inserted' FROM t0_template
3355-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3356-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
3357-BEGIN
3358-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3359-f_charbig = 'updated by trigger'
3360- WHERE f_int1 = new.f_int1;
3361-END|
3362-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3363-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3364-
3365-# check trigger-5 success: 1
3366-DROP TRIGGER trg_1;
3367-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3368-f_int2 = CAST(f_char1 AS SIGNED INT),
3369-f_charbig = 'just inserted'
3370- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3371-DELETE FROM t0_aux
3372-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3373-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3374-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3375-'just inserted' FROM t0_template
3376-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3377-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
3378-BEGIN
3379-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3380-f_charbig = 'updated by trigger'
3381- WHERE f_int1 = - old.f_int1;
3382-END|
3383-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3384-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3385-
3386-# check trigger-6 success: 1
3387-DROP TRIGGER trg_1;
3388-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3389-f_int2 = CAST(f_char1 AS SIGNED INT),
3390-f_charbig = 'just inserted'
3391- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3392-DELETE FROM t0_aux
3393-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3394-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3395-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3396-'just inserted' FROM t0_template
3397-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3398-CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW
3399-BEGIN
3400-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3401-f_charbig = 'updated by trigger'
3402- WHERE f_int1 = - old.f_int1;
3403-END|
3404-DELETE FROM t0_aux
3405-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3406-
3407-# check trigger-7 success: 1
3408-DROP TRIGGER trg_1;
3409-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3410-f_int2 = CAST(f_char1 AS SIGNED INT),
3411-f_charbig = 'just inserted'
3412- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3413-DELETE FROM t0_aux
3414-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3415-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3416-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3417-'just inserted' FROM t0_template
3418-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3419-CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW
3420-BEGIN
3421-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3422-f_charbig = 'updated by trigger'
3423- WHERE f_int1 = - old.f_int1;
3424-END|
3425-DELETE FROM t0_aux
3426-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3427-
3428-# check trigger-8 success: 1
3429-DROP TRIGGER trg_1;
3430-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3431-f_int2 = CAST(f_char1 AS SIGNED INT),
3432-f_charbig = 'just inserted'
3433- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3434-DELETE FROM t0_aux
3435-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3436-DELETE FROM t1
3437-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3438-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
3439-BEGIN
3440-SET new.f_int1 = old.f_int1 + @max_row,
3441-new.f_int2 = old.f_int2 - @max_row,
3442-new.f_charbig = '####updated per update trigger####';
3443-END|
3444-UPDATE t1
3445-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
3446-f_charbig = '####updated per update statement itself####';
3447-
3448-# check trigger-9 success: 1
3449-DROP TRIGGER trg_2;
3450-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3451-f_int2 = CAST(f_char1 AS SIGNED INT),
3452-f_charbig = CONCAT('===',f_char1,'===');
3453-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
3454-BEGIN
3455-SET new.f_int1 = new.f_int1 + @max_row,
3456-new.f_int2 = new.f_int2 - @max_row,
3457-new.f_charbig = '####updated per update trigger####';
3458-END|
3459-UPDATE t1
3460-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
3461-f_charbig = '####updated per update statement itself####';
3462-
3463-# check trigger-10 success: 1
3464-DROP TRIGGER trg_2;
3465-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3466-f_int2 = CAST(f_char1 AS SIGNED INT),
3467-f_charbig = CONCAT('===',f_char1,'===');
3468-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
3469-BEGIN
3470-SET new.f_int1 = @my_max1 + @counter,
3471-new.f_int2 = @my_min2 - @counter,
3472-new.f_charbig = '####updated per insert trigger####';
3473-SET @counter = @counter + 1;
3474-END|
3475-SET @counter = 1;
3476-SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
3477-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3478-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
3479-CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
3480-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
3481-ORDER BY f_int1;
3482-DROP TRIGGER trg_3;
3483-
3484-# check trigger-11 success: 1
3485-DELETE FROM t1
3486-WHERE f_int1 <> CAST(f_char1 AS SIGNED INT)
3487-AND f_int2 <> CAST(f_char1 AS SIGNED INT)
3488-AND f_charbig = '####updated per insert trigger####';
3489-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
3490-BEGIN
3491-SET new.f_int1 = @my_max1 + @counter,
3492-new.f_int2 = @my_min2 - @counter,
3493-new.f_charbig = '####updated per insert trigger####';
3494-SET @counter = @counter + 1;
3495-END|
3496-SET @counter = 1;
3497-SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
3498-INSERT INTO t1 (f_char1, f_char2, f_charbig)
3499-SELECT CAST(f_int1 AS CHAR),
3500-CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
3501-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
3502-ORDER BY f_int1;
3503-DROP TRIGGER trg_3;
3504-
3505-# check trigger-12 success: 1
3506-DELETE FROM t1
3507-WHERE f_int1 <> CAST(f_char1 AS SIGNED INT)
3508-AND f_int2 <> CAST(f_char1 AS SIGNED INT)
3509-AND f_charbig = '####updated per insert trigger####';
3510-ANALYZE TABLE t1;
3511-Table Op Msg_type Msg_text
3512-test.t1 analyze status OK
3513-CHECK TABLE t1 EXTENDED;
3514-Table Op Msg_type Msg_text
3515-test.t1 check status OK
3516-CHECKSUM TABLE t1 EXTENDED;
3517-Table Checksum
3518-test.t1 <some_value>
3519-OPTIMIZE TABLE t1;
3520-Table Op Msg_type Msg_text
3521-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
3522-test.t1 optimize status OK
3523-# check layout success: 1
3524-REPAIR TABLE t1 EXTENDED;
3525-Table Op Msg_type Msg_text
3526-test.t1 repair note The storage engine for the table doesn't support repair
3527-# check layout success: 1
3528-TRUNCATE t1;
3529-
3530-# check TRUNCATE success: 1
3531-# check layout success: 1
3532-# End usability test (inc/partition_check.inc)
3533-DROP TABLE t1;
3534-CREATE TABLE t1 (
3535-f_int1 INTEGER,
3536-f_int2 INTEGER,
3537-f_char1 CHAR(20),
3538-f_char2 CHAR(20),
3539-f_charbig VARCHAR(1000)
3540-
3541-)
3542-PARTITION BY LIST(MOD(f_int1 + f_int2,4))
3543-(PARTITION part_3 VALUES IN (-3),
3544-PARTITION part_2 VALUES IN (-2),
3545-PARTITION part_1 VALUES IN (-1),
3546-PARTITION part_N VALUES IN (NULL),
3547-PARTITION part0 VALUES IN (0),
3548-PARTITION part1 VALUES IN (1),
3549-PARTITION part2 VALUES IN (2),
3550-PARTITION part3 VALUES IN (3));
3551-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
3552-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
3553-WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
3554-ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1);
3555-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
3556-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
3557-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
3558-# Start usability test (inc/partition_check.inc)
3559-create_command
3560-SHOW CREATE TABLE t1;
3561-Table Create Table
3562-t1 CREATE TABLE `t1` (
3563- `f_int1` int(11) NOT NULL DEFAULT '0',
3564- `f_int2` int(11) NOT NULL DEFAULT '0',
3565- `f_char1` char(20) DEFAULT NULL,
3566- `f_char2` char(20) DEFAULT NULL,
3567- `f_charbig` varchar(1000) DEFAULT NULL,
3568- PRIMARY KEY (`f_int2`,`f_int1`),
3569- UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
3570-) ENGINE=InnoDB DEFAULT CHARSET=latin1
3571-/*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4))
3572-(PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB,
3573- PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB,
3574- PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB,
3575- PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB,
3576- PARTITION part0 VALUES IN (0) ENGINE = InnoDB,
3577- PARTITION part1 VALUES IN (1) ENGINE = InnoDB,
3578- PARTITION part2 VALUES IN (2) ENGINE = InnoDB,
3579- PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
3580-
3581-# check prerequisites-1 success: 1
3582-# check COUNT(*) success: 1
3583-# check MIN/MAX(f_int1) success: 1
3584-# check MIN/MAX(f_int2) success: 1
3585-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3586-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
3587-CAST(f_int1 AS CHAR), 'delete me' FROM t0_template
3588-WHERE f_int1 IN (2,3);
3589-ERROR 23000: Duplicate entry '2-2' for key 'PRIMARY'
3590-# check prerequisites-3 success: 1
3591-# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE
3592-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3593-SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
3594-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
3595-WHERE f_int1 IN (2,3);
3596-DELETE FROM t1 WHERE f_charbig = 'delete me';
3597-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3598-SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
3599-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
3600-WHERE f_int1 IN (2,3);
3601-DELETE FROM t1 WHERE f_charbig = 'delete me';
3602-# check read via f_int1 success: 1
3603-# check read via f_int2 success: 1
3604-
3605-# check multiple-1 success: 1
3606-DELETE FROM t1 WHERE MOD(f_int1,3) = 0;
3607-
3608-# check multiple-2 success: 1
3609-INSERT INTO t1 SELECT * FROM t0_template
3610-WHERE MOD(f_int1,3) = 0;
3611-
3612-# check multiple-3 success: 1
3613-UPDATE t1 SET f_int1 = f_int1 + @max_row
3614-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4
3615-AND @max_row_div2 + @max_row_div4;
3616-
3617-# check multiple-4 success: 1
3618-DELETE FROM t1
3619-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row
3620-AND @max_row_div2 + @max_row_div4 + @max_row;
3621-
3622-# check multiple-5 success: 1
3623-SELECT COUNT(*) INTO @try_count FROM t0_template
3624-WHERE MOD(f_int1,3) = 0
3625-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
3626-SELECT COUNT(*) INTO @clash_count
3627-FROM t1 INNER JOIN t0_template USING(f_int1)
3628-WHERE MOD(f_int1,3) = 0
3629-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
3630-SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1;
3631-INSERT INTO t1
3632-SET f_int1 = @cur_value , f_int2 = @cur_value,
3633-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
3634-f_charbig = '#SINGLE#';
3635-
3636-# check single-1 success: 1
3637-SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1;
3638-INSERT INTO t1
3639-SET f_int1 = @cur_value , f_int2 = @cur_value,
3640-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
3641-f_charbig = '#SINGLE#';
3642-
3643-# check single-2 success: 1
3644-SELECT MIN(f_int1) INTO @cur_value1 FROM t1;
3645-SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1;
3646-UPDATE t1 SET f_int1 = @cur_value2
3647-WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
3648-
3649-# check single-3 success: 1
3650-SET @cur_value1= -1;
3651-SELECT MAX(f_int1) INTO @cur_value2 FROM t1;
3652-UPDATE t1 SET f_int1 = @cur_value1
3653-WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#';
3654-
3655-# check single-4 success: 1
3656-SELECT MAX(f_int1) INTO @cur_value FROM t1;
3657-DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#';
3658-
3659-# check single-5 success: 1
3660-DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#';
3661-
3662-# check single-6 success: 1
3663-INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##';
3664-
3665-# check single-7 success: 1
3666-DELETE FROM t1 WHERE f_charbig = '#2147483647##';
3667-DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0;
3668-INSERT t1 SET f_int1 = 0 , f_int2 = 0,
3669-f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR),
3670-f_charbig = '#NULL#';
3671-INSERT INTO t1
3672-SET f_int1 = NULL , f_int2 = -@max_row,
3673-f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR),
3674-f_charbig = '#NULL#';
3675-ERROR 23000: Column 'f_int1' cannot be null
3676-# check null success: 1
3677-DELETE FROM t1
3678-WHERE f_int1 = 0 AND f_int2 = 0
3679-AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR)
3680-AND f_charbig = '#NULL#';
3681-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3682-SELECT f_int1, f_int1, '', '', 'was inserted'
3683- FROM t0_template source_tab
3684-WHERE MOD(f_int1,3) = 0
3685-AND f_int1 BETWEEN @max_row_div2 AND @max_row
3686-ON DUPLICATE KEY
3687-UPDATE f_int1 = 2 * @max_row + source_tab.f_int1,
3688-f_int2 = 2 * @max_row + source_tab.f_int1,
3689-f_charbig = 'was updated';
3690-
3691-# check unique-1-a success: 1
3692-
3693-# check unique-1-b success: 1
3694-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3695-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3696-f_int2 = CAST(f_char1 AS SIGNED INT),
3697-f_charbig = CONCAT('===',f_char1,'===')
3698-WHERE f_charbig = 'was updated';
3699-REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3700-SELECT f_int1, - f_int1, '', '', 'was inserted or replaced'
3701- FROM t0_template source_tab
3702-WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row;
3703-
3704-# check replace success: 1
3705-DELETE FROM t1
3706-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4;
3707-DELETE FROM t1
3708-WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND
3709-f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row;
3710-UPDATE t1 SET f_int2 = f_int1,
3711-f_char1 = CAST(f_int1 AS CHAR),
3712-f_char2 = CAST(f_int1 AS CHAR),
3713-f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===')
3714-WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2;
3715-SET AUTOCOMMIT= 0;
3716-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3717-SELECT f_int1, f_int1, '', '', 'was inserted'
3718-FROM t0_template source_tab
3719-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
3720-
3721-# check transactions-1 success: 1
3722-COMMIT WORK;
3723-
3724-# check transactions-2 success: 1
3725-ROLLBACK WORK;
3726-
3727-# check transactions-3 success: 1
3728-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3729-COMMIT WORK;
3730-ROLLBACK WORK;
3731-
3732-# check transactions-4 success: 1
3733-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3734-SELECT f_int1, f_int1, '', '', 'was inserted'
3735-FROM t0_template source_tab
3736-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
3737-
3738-# check transactions-5 success: 1
3739-ROLLBACK WORK;
3740-
3741-# check transactions-6 success: 1
3742-# INFO: Storage engine used for t1 seems to be transactional.
3743-COMMIT;
3744-
3745-# check transactions-7 success: 1
3746-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3747-COMMIT WORK;
3748-SET @@session.sql_mode = 'traditional';
3749-SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows;
3750-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3751-SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1,
3752-'', '', 'was inserted' FROM t0_template
3753-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
3754-ERROR 22012: Division by 0
3755-COMMIT;
3756-
3757-# check transactions-8 success: 1
3758-# INFO: Storage engine used for t1 seems to be able to revert
3759-# changes made by the failing statement.
3760-SET @@session.sql_mode = '';
3761-SET AUTOCOMMIT= 1;
3762-DELETE FROM t1 WHERE f_charbig = 'was inserted';
3763-COMMIT WORK;
3764-UPDATE t1 SET f_charbig = REPEAT('b', 1000);
3765-
3766-# check special-1 success: 1
3767-UPDATE t1 SET f_charbig = '';
3768-
3769-# check special-2 success: 1
3770-UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===');
3771-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
3772-SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template
3773-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3774-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3775-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3776-'just inserted' FROM t0_template
3777-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3778-CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW
3779-BEGIN
3780-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3781-f_charbig = 'updated by trigger'
3782- WHERE f_int1 = new.f_int1;
3783-END|
3784-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3785-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
3786-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3787-
3788-# check trigger-1 success: 1
3789-DROP TRIGGER trg_1;
3790-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3791-f_int2 = CAST(f_char1 AS SIGNED INT),
3792-f_charbig = 'just inserted'
3793- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3794-DELETE FROM t0_aux
3795-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3796-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3797-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3798-'just inserted' FROM t0_template
3799-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3800-CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW
3801-BEGIN
3802-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3803-f_charbig = 'updated by trigger'
3804- WHERE f_int1 = new.f_int1;
3805-END|
3806-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3807-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
3808-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3809-
3810-# check trigger-2 success: 1
3811-DROP TRIGGER trg_1;
3812-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3813-f_int2 = CAST(f_char1 AS SIGNED INT),
3814-f_charbig = 'just inserted'
3815- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3816-DELETE FROM t0_aux
3817-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3818-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3819-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3820-'just inserted' FROM t0_template
3821-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3822-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
3823-BEGIN
3824-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3825-f_charbig = 'updated by trigger'
3826- WHERE f_int1 = new.f_int1;
3827-END|
3828-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3829-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3830-
3831-# check trigger-3 success: 1
3832-DROP TRIGGER trg_1;
3833-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3834-f_int2 = CAST(f_char1 AS SIGNED INT),
3835-f_charbig = 'just inserted'
3836- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3837-DELETE FROM t0_aux
3838-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3839-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3840-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3841-'just inserted' FROM t0_template
3842-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3843-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
3844-BEGIN
3845-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3846-f_charbig = 'updated by trigger'
3847- WHERE f_int1 = - old.f_int1;
3848-END|
3849-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3850-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3851-
3852-# check trigger-4 success: 1
3853-DROP TRIGGER trg_1;
3854-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3855-f_int2 = CAST(f_char1 AS SIGNED INT),
3856-f_charbig = 'just inserted'
3857- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3858-DELETE FROM t0_aux
3859-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3860-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3861-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3862-'just inserted' FROM t0_template
3863-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3864-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
3865-BEGIN
3866-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3867-f_charbig = 'updated by trigger'
3868- WHERE f_int1 = new.f_int1;
3869-END|
3870-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3871-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3872-
3873-# check trigger-5 success: 1
3874-DROP TRIGGER trg_1;
3875-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3876-f_int2 = CAST(f_char1 AS SIGNED INT),
3877-f_charbig = 'just inserted'
3878- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3879-DELETE FROM t0_aux
3880-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3881-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3882-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3883-'just inserted' FROM t0_template
3884-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3885-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
3886-BEGIN
3887-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3888-f_charbig = 'updated by trigger'
3889- WHERE f_int1 = - old.f_int1;
3890-END|
3891-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
3892-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3893-
3894-# check trigger-6 success: 1
3895-DROP TRIGGER trg_1;
3896-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3897-f_int2 = CAST(f_char1 AS SIGNED INT),
3898-f_charbig = 'just inserted'
3899- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3900-DELETE FROM t0_aux
3901-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3902-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3903-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3904-'just inserted' FROM t0_template
3905-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3906-CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW
3907-BEGIN
3908-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3909-f_charbig = 'updated by trigger'
3910- WHERE f_int1 = - old.f_int1;
3911-END|
3912-DELETE FROM t0_aux
3913-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3914-
3915-# check trigger-7 success: 1
3916-DROP TRIGGER trg_1;
3917-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3918-f_int2 = CAST(f_char1 AS SIGNED INT),
3919-f_charbig = 'just inserted'
3920- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3921-DELETE FROM t0_aux
3922-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3923-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
3924-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
3925-'just inserted' FROM t0_template
3926-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3927-CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW
3928-BEGIN
3929-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
3930-f_charbig = 'updated by trigger'
3931- WHERE f_int1 = - old.f_int1;
3932-END|
3933-DELETE FROM t0_aux
3934-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
3935-
3936-# check trigger-8 success: 1
3937-DROP TRIGGER trg_1;
3938-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3939-f_int2 = CAST(f_char1 AS SIGNED INT),
3940-f_charbig = 'just inserted'
3941- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
3942-DELETE FROM t0_aux
3943-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3944-DELETE FROM t1
3945-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
3946-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
3947-BEGIN
3948-SET new.f_int1 = old.f_int1 + @max_row,
3949-new.f_int2 = old.f_int2 - @max_row,
3950-new.f_charbig = '####updated per update trigger####';
3951-END|
3952-UPDATE t1
3953-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
3954-f_charbig = '####updated per update statement itself####';
3955-
3956-# check trigger-9 success: 1
3957-DROP TRIGGER trg_2;
3958-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3959-f_int2 = CAST(f_char1 AS SIGNED INT),
3960-f_charbig = CONCAT('===',f_char1,'===');
3961-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
3962-BEGIN
3963-SET new.f_int1 = new.f_int1 + @max_row,
3964-new.f_int2 = new.f_int2 - @max_row,
3965-new.f_charbig = '####updated per update trigger####';
3966-END|
3967-UPDATE t1
3968-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
3969-f_charbig = '####updated per update statement itself####';
3970-
3971-# check trigger-10 success: 1
3972-DROP TRIGGER trg_2;
3973-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
3974-f_int2 = CAST(f_char1 AS SIGNED INT),
3975-f_charbig = CONCAT('===',f_char1,'===');
3976-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
3977-BEGIN
3978-SET new.f_int1 = @my_max1 + @counter,
3979-new.f_int2 = @my_min2 - @counter,
3980-new.f_charbig = '####updated per insert trigger####';
3981-SET @counter = @counter + 1;
3982-END|
3983-SET @counter = 1;
3984-SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
3985-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
3986-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
3987-CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
3988-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
3989-ORDER BY f_int1;
3990-DROP TRIGGER trg_3;
3991-
3992-# check trigger-11 success: 1
3993-DELETE FROM t1
3994-WHERE f_int1 <> CAST(f_char1 AS SIGNED INT)
3995-AND f_int2 <> CAST(f_char1 AS SIGNED INT)
3996-AND f_charbig = '####updated per insert trigger####';
3997-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
3998-BEGIN
3999-SET new.f_int1 = @my_max1 + @counter,
4000-new.f_int2 = @my_min2 - @counter,
4001-new.f_charbig = '####updated per insert trigger####';
4002-SET @counter = @counter + 1;
4003-END|
4004-SET @counter = 1;
4005-SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
4006-INSERT INTO t1 (f_char1, f_char2, f_charbig)
4007-SELECT CAST(f_int1 AS CHAR),
4008-CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
4009-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
4010-ORDER BY f_int1;
4011-DROP TRIGGER trg_3;
4012-
4013-# check trigger-12 success: 1
4014-DELETE FROM t1
4015-WHERE f_int1 <> CAST(f_char1 AS SIGNED INT)
4016-AND f_int2 <> CAST(f_char1 AS SIGNED INT)
4017-AND f_charbig = '####updated per insert trigger####';
4018-ANALYZE TABLE t1;
4019-Table Op Msg_type Msg_text
4020-test.t1 analyze status OK
4021-CHECK TABLE t1 EXTENDED;
4022-Table Op Msg_type Msg_text
4023-test.t1 check status OK
4024-CHECKSUM TABLE t1 EXTENDED;
4025-Table Checksum
4026-test.t1 <some_value>
4027-OPTIMIZE TABLE t1;
4028-Table Op Msg_type Msg_text
4029-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
4030-test.t1 optimize status OK
4031-# check layout success: 1
4032-REPAIR TABLE t1 EXTENDED;
4033-Table Op Msg_type Msg_text
4034-test.t1 repair note The storage engine for the table doesn't support repair
4035-# check layout success: 1
4036-TRUNCATE t1;
4037-
4038-# check TRUNCATE success: 1
4039-# check layout success: 1
4040-# End usability test (inc/partition_check.inc)
4041-DROP TABLE t1;
4042-CREATE TABLE t1 (
4043-f_int1 INTEGER,
4044-f_int2 INTEGER,
4045-f_char1 CHAR(20),
4046-f_char2 CHAR(20),
4047-f_charbig VARCHAR(1000)
4048-
4049-)
4050-PARTITION BY RANGE((f_int1 + f_int2) DIV 2)
4051-(PARTITION parta VALUES LESS THAN (0),
4052-PARTITION partb VALUES LESS THAN (5),
4053-PARTITION partc VALUES LESS THAN (10),
4054-PARTITION partd VALUES LESS THAN (10 + 5),
4055-PARTITION parte VALUES LESS THAN (20),
4056-PARTITION partf VALUES LESS THAN (2147483646));
4057-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
4058-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
4059-WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
4060-ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1);
4061-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
4062-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
4063-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
4064-# Start usability test (inc/partition_check.inc)
4065-create_command
4066-SHOW CREATE TABLE t1;
4067-Table Create Table
4068-t1 CREATE TABLE `t1` (
4069- `f_int1` int(11) NOT NULL DEFAULT '0',
4070- `f_int2` int(11) NOT NULL DEFAULT '0',
4071- `f_char1` char(20) DEFAULT NULL,
4072- `f_char2` char(20) DEFAULT NULL,
4073- `f_charbig` varchar(1000) DEFAULT NULL,
4074- PRIMARY KEY (`f_int2`,`f_int1`),
4075- UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
4076-) ENGINE=InnoDB DEFAULT CHARSET=latin1
4077-/*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2)
4078-(PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB,
4079- PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB,
4080- PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB,
4081- PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB,
4082- PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB,
4083- PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
4084-
4085-# check prerequisites-1 success: 1
4086-# check COUNT(*) success: 1
4087-# check MIN/MAX(f_int1) success: 1
4088-# check MIN/MAX(f_int2) success: 1
4089-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4090-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
4091-CAST(f_int1 AS CHAR), 'delete me' FROM t0_template
4092-WHERE f_int1 IN (2,3);
4093-ERROR 23000: Duplicate entry '2-2' for key 'PRIMARY'
4094-# check prerequisites-3 success: 1
4095-# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE
4096-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4097-SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
4098-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
4099-WHERE f_int1 IN (2,3);
4100-DELETE FROM t1 WHERE f_charbig = 'delete me';
4101-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4102-SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
4103-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
4104-WHERE f_int1 IN (2,3);
4105-DELETE FROM t1 WHERE f_charbig = 'delete me';
4106-# check read via f_int1 success: 1
4107-# check read via f_int2 success: 1
4108-
4109-# check multiple-1 success: 1
4110-DELETE FROM t1 WHERE MOD(f_int1,3) = 0;
4111-
4112-# check multiple-2 success: 1
4113-INSERT INTO t1 SELECT * FROM t0_template
4114-WHERE MOD(f_int1,3) = 0;
4115-
4116-# check multiple-3 success: 1
4117-UPDATE t1 SET f_int1 = f_int1 + @max_row
4118-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4
4119-AND @max_row_div2 + @max_row_div4;
4120-
4121-# check multiple-4 success: 1
4122-DELETE FROM t1
4123-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row
4124-AND @max_row_div2 + @max_row_div4 + @max_row;
4125-
4126-# check multiple-5 success: 1
4127-SELECT COUNT(*) INTO @try_count FROM t0_template
4128-WHERE MOD(f_int1,3) = 0
4129-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
4130-SELECT COUNT(*) INTO @clash_count
4131-FROM t1 INNER JOIN t0_template USING(f_int1)
4132-WHERE MOD(f_int1,3) = 0
4133-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
4134-SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1;
4135-INSERT INTO t1
4136-SET f_int1 = @cur_value , f_int2 = @cur_value,
4137-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
4138-f_charbig = '#SINGLE#';
4139-
4140-# check single-1 success: 1
4141-SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1;
4142-INSERT INTO t1
4143-SET f_int1 = @cur_value , f_int2 = @cur_value,
4144-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
4145-f_charbig = '#SINGLE#';
4146-
4147-# check single-2 success: 1
4148-SELECT MIN(f_int1) INTO @cur_value1 FROM t1;
4149-SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1;
4150-UPDATE t1 SET f_int1 = @cur_value2
4151-WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
4152-
4153-# check single-3 success: 1
4154-SET @cur_value1= -1;
4155-SELECT MAX(f_int1) INTO @cur_value2 FROM t1;
4156-UPDATE t1 SET f_int1 = @cur_value1
4157-WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#';
4158-
4159-# check single-4 success: 1
4160-SELECT MAX(f_int1) INTO @cur_value FROM t1;
4161-DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#';
4162-
4163-# check single-5 success: 1
4164-DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#';
4165-
4166-# check single-6 success: 1
4167-INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##';
4168-ERROR HY000: Table has no partition for value 2147483647
4169-DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0;
4170-INSERT t1 SET f_int1 = 0 , f_int2 = 0,
4171-f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR),
4172-f_charbig = '#NULL#';
4173-INSERT INTO t1
4174-SET f_int1 = NULL , f_int2 = -@max_row,
4175-f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR),
4176-f_charbig = '#NULL#';
4177-ERROR 23000: Column 'f_int1' cannot be null
4178-# check null success: 1
4179-DELETE FROM t1
4180-WHERE f_int1 = 0 AND f_int2 = 0
4181-AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR)
4182-AND f_charbig = '#NULL#';
4183-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4184-SELECT f_int1, f_int1, '', '', 'was inserted'
4185- FROM t0_template source_tab
4186-WHERE MOD(f_int1,3) = 0
4187-AND f_int1 BETWEEN @max_row_div2 AND @max_row
4188-ON DUPLICATE KEY
4189-UPDATE f_int1 = 2 * @max_row + source_tab.f_int1,
4190-f_int2 = 2 * @max_row + source_tab.f_int1,
4191-f_charbig = 'was updated';
4192-
4193-# check unique-1-a success: 1
4194-
4195-# check unique-1-b success: 1
4196-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4197-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4198-f_int2 = CAST(f_char1 AS SIGNED INT),
4199-f_charbig = CONCAT('===',f_char1,'===')
4200-WHERE f_charbig = 'was updated';
4201-REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4202-SELECT f_int1, - f_int1, '', '', 'was inserted or replaced'
4203- FROM t0_template source_tab
4204-WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row;
4205-
4206-# check replace success: 1
4207-DELETE FROM t1
4208-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4;
4209-DELETE FROM t1
4210-WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND
4211-f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row;
4212-UPDATE t1 SET f_int2 = f_int1,
4213-f_char1 = CAST(f_int1 AS CHAR),
4214-f_char2 = CAST(f_int1 AS CHAR),
4215-f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===')
4216-WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2;
4217-SET AUTOCOMMIT= 0;
4218-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4219-SELECT f_int1, f_int1, '', '', 'was inserted'
4220-FROM t0_template source_tab
4221-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
4222-
4223-# check transactions-1 success: 1
4224-COMMIT WORK;
4225-
4226-# check transactions-2 success: 1
4227-ROLLBACK WORK;
4228-
4229-# check transactions-3 success: 1
4230-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4231-COMMIT WORK;
4232-ROLLBACK WORK;
4233-
4234-# check transactions-4 success: 1
4235-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4236-SELECT f_int1, f_int1, '', '', 'was inserted'
4237-FROM t0_template source_tab
4238-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
4239-
4240-# check transactions-5 success: 1
4241-ROLLBACK WORK;
4242-
4243-# check transactions-6 success: 1
4244-# INFO: Storage engine used for t1 seems to be transactional.
4245-COMMIT;
4246-
4247-# check transactions-7 success: 1
4248-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4249-COMMIT WORK;
4250-SET @@session.sql_mode = 'traditional';
4251-SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows;
4252-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4253-SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1,
4254-'', '', 'was inserted' FROM t0_template
4255-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
4256-ERROR 22012: Division by 0
4257-COMMIT;
4258-
4259-# check transactions-8 success: 1
4260-# INFO: Storage engine used for t1 seems to be able to revert
4261-# changes made by the failing statement.
4262-SET @@session.sql_mode = '';
4263-SET AUTOCOMMIT= 1;
4264-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4265-COMMIT WORK;
4266-UPDATE t1 SET f_charbig = REPEAT('b', 1000);
4267-
4268-# check special-1 success: 1
4269-UPDATE t1 SET f_charbig = '';
4270-
4271-# check special-2 success: 1
4272-UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===');
4273-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
4274-SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template
4275-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4276-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4277-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4278-'just inserted' FROM t0_template
4279-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4280-CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW
4281-BEGIN
4282-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4283-f_charbig = 'updated by trigger'
4284- WHERE f_int1 = new.f_int1;
4285-END|
4286-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4287-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
4288-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4289-
4290-# check trigger-1 success: 1
4291-DROP TRIGGER trg_1;
4292-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4293-f_int2 = CAST(f_char1 AS SIGNED INT),
4294-f_charbig = 'just inserted'
4295- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4296-DELETE FROM t0_aux
4297-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4298-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4299-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4300-'just inserted' FROM t0_template
4301-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4302-CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW
4303-BEGIN
4304-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4305-f_charbig = 'updated by trigger'
4306- WHERE f_int1 = new.f_int1;
4307-END|
4308-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4309-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
4310-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4311-
4312-# check trigger-2 success: 1
4313-DROP TRIGGER trg_1;
4314-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4315-f_int2 = CAST(f_char1 AS SIGNED INT),
4316-f_charbig = 'just inserted'
4317- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4318-DELETE FROM t0_aux
4319-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4320-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4321-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4322-'just inserted' FROM t0_template
4323-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4324-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
4325-BEGIN
4326-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4327-f_charbig = 'updated by trigger'
4328- WHERE f_int1 = new.f_int1;
4329-END|
4330-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4331-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4332-
4333-# check trigger-3 success: 1
4334-DROP TRIGGER trg_1;
4335-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4336-f_int2 = CAST(f_char1 AS SIGNED INT),
4337-f_charbig = 'just inserted'
4338- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4339-DELETE FROM t0_aux
4340-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4341-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4342-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4343-'just inserted' FROM t0_template
4344-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4345-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
4346-BEGIN
4347-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4348-f_charbig = 'updated by trigger'
4349- WHERE f_int1 = - old.f_int1;
4350-END|
4351-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4352-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4353-
4354-# check trigger-4 success: 1
4355-DROP TRIGGER trg_1;
4356-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4357-f_int2 = CAST(f_char1 AS SIGNED INT),
4358-f_charbig = 'just inserted'
4359- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4360-DELETE FROM t0_aux
4361-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4362-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4363-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4364-'just inserted' FROM t0_template
4365-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4366-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
4367-BEGIN
4368-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4369-f_charbig = 'updated by trigger'
4370- WHERE f_int1 = new.f_int1;
4371-END|
4372-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4373-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4374-
4375-# check trigger-5 success: 1
4376-DROP TRIGGER trg_1;
4377-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4378-f_int2 = CAST(f_char1 AS SIGNED INT),
4379-f_charbig = 'just inserted'
4380- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4381-DELETE FROM t0_aux
4382-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4383-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4384-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4385-'just inserted' FROM t0_template
4386-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4387-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
4388-BEGIN
4389-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4390-f_charbig = 'updated by trigger'
4391- WHERE f_int1 = - old.f_int1;
4392-END|
4393-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4394-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4395-
4396-# check trigger-6 success: 1
4397-DROP TRIGGER trg_1;
4398-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4399-f_int2 = CAST(f_char1 AS SIGNED INT),
4400-f_charbig = 'just inserted'
4401- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4402-DELETE FROM t0_aux
4403-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4404-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4405-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4406-'just inserted' FROM t0_template
4407-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4408-CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW
4409-BEGIN
4410-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4411-f_charbig = 'updated by trigger'
4412- WHERE f_int1 = - old.f_int1;
4413-END|
4414-DELETE FROM t0_aux
4415-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4416-
4417-# check trigger-7 success: 1
4418-DROP TRIGGER trg_1;
4419-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4420-f_int2 = CAST(f_char1 AS SIGNED INT),
4421-f_charbig = 'just inserted'
4422- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4423-DELETE FROM t0_aux
4424-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4425-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4426-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4427-'just inserted' FROM t0_template
4428-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4429-CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW
4430-BEGIN
4431-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4432-f_charbig = 'updated by trigger'
4433- WHERE f_int1 = - old.f_int1;
4434-END|
4435-DELETE FROM t0_aux
4436-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4437-
4438-# check trigger-8 success: 1
4439-DROP TRIGGER trg_1;
4440-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4441-f_int2 = CAST(f_char1 AS SIGNED INT),
4442-f_charbig = 'just inserted'
4443- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4444-DELETE FROM t0_aux
4445-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4446-DELETE FROM t1
4447-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4448-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
4449-BEGIN
4450-SET new.f_int1 = old.f_int1 + @max_row,
4451-new.f_int2 = old.f_int2 - @max_row,
4452-new.f_charbig = '####updated per update trigger####';
4453-END|
4454-UPDATE t1
4455-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
4456-f_charbig = '####updated per update statement itself####';
4457-
4458-# check trigger-9 success: 1
4459-DROP TRIGGER trg_2;
4460-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4461-f_int2 = CAST(f_char1 AS SIGNED INT),
4462-f_charbig = CONCAT('===',f_char1,'===');
4463-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
4464-BEGIN
4465-SET new.f_int1 = new.f_int1 + @max_row,
4466-new.f_int2 = new.f_int2 - @max_row,
4467-new.f_charbig = '####updated per update trigger####';
4468-END|
4469-UPDATE t1
4470-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
4471-f_charbig = '####updated per update statement itself####';
4472-
4473-# check trigger-10 success: 1
4474-DROP TRIGGER trg_2;
4475-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4476-f_int2 = CAST(f_char1 AS SIGNED INT),
4477-f_charbig = CONCAT('===',f_char1,'===');
4478-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
4479-BEGIN
4480-SET new.f_int1 = @my_max1 + @counter,
4481-new.f_int2 = @my_min2 - @counter,
4482-new.f_charbig = '####updated per insert trigger####';
4483-SET @counter = @counter + 1;
4484-END|
4485-SET @counter = 1;
4486-SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
4487-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4488-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
4489-CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
4490-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
4491-ORDER BY f_int1;
4492-DROP TRIGGER trg_3;
4493-
4494-# check trigger-11 success: 1
4495-DELETE FROM t1
4496-WHERE f_int1 <> CAST(f_char1 AS SIGNED INT)
4497-AND f_int2 <> CAST(f_char1 AS SIGNED INT)
4498-AND f_charbig = '####updated per insert trigger####';
4499-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
4500-BEGIN
4501-SET new.f_int1 = @my_max1 + @counter,
4502-new.f_int2 = @my_min2 - @counter,
4503-new.f_charbig = '####updated per insert trigger####';
4504-SET @counter = @counter + 1;
4505-END|
4506-SET @counter = 1;
4507-SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
4508-INSERT INTO t1 (f_char1, f_char2, f_charbig)
4509-SELECT CAST(f_int1 AS CHAR),
4510-CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
4511-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
4512-ORDER BY f_int1;
4513-DROP TRIGGER trg_3;
4514-
4515-# check trigger-12 success: 1
4516-DELETE FROM t1
4517-WHERE f_int1 <> CAST(f_char1 AS SIGNED INT)
4518-AND f_int2 <> CAST(f_char1 AS SIGNED INT)
4519-AND f_charbig = '####updated per insert trigger####';
4520-ANALYZE TABLE t1;
4521-Table Op Msg_type Msg_text
4522-test.t1 analyze status OK
4523-CHECK TABLE t1 EXTENDED;
4524-Table Op Msg_type Msg_text
4525-test.t1 check status OK
4526-CHECKSUM TABLE t1 EXTENDED;
4527-Table Checksum
4528-test.t1 <some_value>
4529-OPTIMIZE TABLE t1;
4530-Table Op Msg_type Msg_text
4531-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
4532-test.t1 optimize status OK
4533-# check layout success: 1
4534-REPAIR TABLE t1 EXTENDED;
4535-Table Op Msg_type Msg_text
4536-test.t1 repair note The storage engine for the table doesn't support repair
4537-# check layout success: 1
4538-TRUNCATE t1;
4539-
4540-# check TRUNCATE success: 1
4541-# check layout success: 1
4542-# End usability test (inc/partition_check.inc)
4543-DROP TABLE t1;
4544-CREATE TABLE t1 (
4545-f_int1 INTEGER,
4546-f_int2 INTEGER,
4547-f_char1 CHAR(20),
4548-f_char2 CHAR(20),
4549-f_charbig VARCHAR(1000)
4550-
4551-)
4552-PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2
4553-(PARTITION parta VALUES LESS THAN (0),
4554-PARTITION partb VALUES LESS THAN (5),
4555-PARTITION partc VALUES LESS THAN (10),
4556-PARTITION partd VALUES LESS THAN (2147483646));
4557-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
4558-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
4559-WHERE f_int1 BETWEEN 1 AND @max_row_div2 - 1;
4560-ALTER TABLE t1 ADD UNIQUE INDEX uidx1 (f_int1,f_int2), ADD PRIMARY KEY(f_int2,f_int1);
4561-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
4562-SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template
4563-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row;
4564-# Start usability test (inc/partition_check.inc)
4565-create_command
4566-SHOW CREATE TABLE t1;
4567-Table Create Table
4568-t1 CREATE TABLE `t1` (
4569- `f_int1` int(11) NOT NULL DEFAULT '0',
4570- `f_int2` int(11) NOT NULL DEFAULT '0',
4571- `f_char1` char(20) DEFAULT NULL,
4572- `f_char2` char(20) DEFAULT NULL,
4573- `f_charbig` varchar(1000) DEFAULT NULL,
4574- PRIMARY KEY (`f_int2`,`f_int1`),
4575- UNIQUE KEY `uidx1` (`f_int1`,`f_int2`)
4576-) ENGINE=InnoDB DEFAULT CHARSET=latin1
4577-/*!50100 PARTITION BY RANGE (f_int1)
4578-SUBPARTITION BY HASH (f_int2)
4579-SUBPARTITIONS 2
4580-(PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB,
4581- PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB,
4582- PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB,
4583- PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
4584-
4585-# check prerequisites-1 success: 1
4586-# check COUNT(*) success: 1
4587-# check MIN/MAX(f_int1) success: 1
4588-# check MIN/MAX(f_int2) success: 1
4589-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4590-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
4591-CAST(f_int1 AS CHAR), 'delete me' FROM t0_template
4592-WHERE f_int1 IN (2,3);
4593-ERROR 23000: Duplicate entry '2-2' for key 'PRIMARY'
4594-# check prerequisites-3 success: 1
4595-# INFO: f_int1 AND/OR f_int2 AND/OR (f_int1,f_int2) is UNIQUE
4596-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4597-SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
4598-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
4599-WHERE f_int1 IN (2,3);
4600-DELETE FROM t1 WHERE f_charbig = 'delete me';
4601-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4602-SELECT 2 * @max_row + f_int1, f_int1, CAST((2 * @max_row + f_int1) AS CHAR),
4603-CAST((2 * @max_row + f_int1) AS CHAR), 'delete me' FROM t0_template
4604-WHERE f_int1 IN (2,3);
4605-DELETE FROM t1 WHERE f_charbig = 'delete me';
4606-# check read via f_int1 success: 1
4607-# check read via f_int2 success: 1
4608-
4609-# check multiple-1 success: 1
4610-DELETE FROM t1 WHERE MOD(f_int1,3) = 0;
4611-
4612-# check multiple-2 success: 1
4613-INSERT INTO t1 SELECT * FROM t0_template
4614-WHERE MOD(f_int1,3) = 0;
4615-
4616-# check multiple-3 success: 1
4617-UPDATE t1 SET f_int1 = f_int1 + @max_row
4618-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4
4619-AND @max_row_div2 + @max_row_div4;
4620-
4621-# check multiple-4 success: 1
4622-DELETE FROM t1
4623-WHERE f_int1 BETWEEN @max_row_div2 - @max_row_div4 + @max_row
4624-AND @max_row_div2 + @max_row_div4 + @max_row;
4625-
4626-# check multiple-5 success: 1
4627-SELECT COUNT(*) INTO @try_count FROM t0_template
4628-WHERE MOD(f_int1,3) = 0
4629-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
4630-SELECT COUNT(*) INTO @clash_count
4631-FROM t1 INNER JOIN t0_template USING(f_int1)
4632-WHERE MOD(f_int1,3) = 0
4633-AND f_int1 BETWEEN @max_row_div2 AND @max_row;
4634-SELECT MIN(f_int1) - 1 INTO @cur_value FROM t1;
4635-INSERT INTO t1
4636-SET f_int1 = @cur_value , f_int2 = @cur_value,
4637-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
4638-f_charbig = '#SINGLE#';
4639-
4640-# check single-1 success: 1
4641-SELECT MAX(f_int1) + 1 INTO @cur_value FROM t1;
4642-INSERT INTO t1
4643-SET f_int1 = @cur_value , f_int2 = @cur_value,
4644-f_char1 = CAST(@cur_value AS CHAR), f_char2 = CAST(@cur_value AS CHAR),
4645-f_charbig = '#SINGLE#';
4646-
4647-# check single-2 success: 1
4648-SELECT MIN(f_int1) INTO @cur_value1 FROM t1;
4649-SELECT MAX(f_int1) + 1 INTO @cur_value2 FROM t1;
4650-UPDATE t1 SET f_int1 = @cur_value2
4651-WHERE f_int1 = @cur_value1 AND f_charbig = '#SINGLE#';
4652-
4653-# check single-3 success: 1
4654-SET @cur_value1= -1;
4655-SELECT MAX(f_int1) INTO @cur_value2 FROM t1;
4656-UPDATE t1 SET f_int1 = @cur_value1
4657-WHERE f_int1 = @cur_value2 AND f_charbig = '#SINGLE#';
4658-
4659-# check single-4 success: 1
4660-SELECT MAX(f_int1) INTO @cur_value FROM t1;
4661-DELETE FROM t1 WHERE f_int1 = @cur_value AND f_charbig = '#SINGLE#';
4662-
4663-# check single-5 success: 1
4664-DELETE FROM t1 WHERE f_int1 = -1 AND f_charbig = '#SINGLE#';
4665-
4666-# check single-6 success: 1
4667-INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#2147483647##';
4668-ERROR HY000: Table has no partition for value 2147483647
4669-DELETE FROM t1 WHERE f_int1 IS NULL OR f_int1 = 0;
4670-INSERT t1 SET f_int1 = 0 , f_int2 = 0,
4671-f_char1 = CAST(0 AS CHAR), f_char2 = CAST(0 AS CHAR),
4672-f_charbig = '#NULL#';
4673-INSERT INTO t1
4674-SET f_int1 = NULL , f_int2 = -@max_row,
4675-f_char1 = CAST(-@max_row AS CHAR), f_char2 = CAST(-@max_row AS CHAR),
4676-f_charbig = '#NULL#';
4677-ERROR 23000: Column 'f_int1' cannot be null
4678-# check null success: 1
4679-DELETE FROM t1
4680-WHERE f_int1 = 0 AND f_int2 = 0
4681-AND f_char1 = CAST(0 AS CHAR) AND f_char2 = CAST(0 AS CHAR)
4682-AND f_charbig = '#NULL#';
4683-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4684-SELECT f_int1, f_int1, '', '', 'was inserted'
4685- FROM t0_template source_tab
4686-WHERE MOD(f_int1,3) = 0
4687-AND f_int1 BETWEEN @max_row_div2 AND @max_row
4688-ON DUPLICATE KEY
4689-UPDATE f_int1 = 2 * @max_row + source_tab.f_int1,
4690-f_int2 = 2 * @max_row + source_tab.f_int1,
4691-f_charbig = 'was updated';
4692-
4693-# check unique-1-a success: 1
4694-
4695-# check unique-1-b success: 1
4696-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4697-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4698-f_int2 = CAST(f_char1 AS SIGNED INT),
4699-f_charbig = CONCAT('===',f_char1,'===')
4700-WHERE f_charbig = 'was updated';
4701-REPLACE INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4702-SELECT f_int1, - f_int1, '', '', 'was inserted or replaced'
4703- FROM t0_template source_tab
4704-WHERE MOD(f_int1,3) = 0 AND f_int1 BETWEEN @max_row_div2 AND @max_row;
4705-
4706-# check replace success: 1
4707-DELETE FROM t1
4708-WHERE f_int1 BETWEEN @max_row_div2 AND @max_row_div2 + @max_row_div4;
4709-DELETE FROM t1
4710-WHERE f_int1 = f_int2 AND MOD(f_int1,3) = 0 AND
4711-f_int1 BETWEEN @max_row_div2 + @max_row_div4 AND @max_row;
4712-UPDATE t1 SET f_int2 = f_int1,
4713-f_char1 = CAST(f_int1 AS CHAR),
4714-f_char2 = CAST(f_int1 AS CHAR),
4715-f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===')
4716-WHERE f_charbig = 'was inserted or replaced' AND f_int1 = - f_int2;
4717-SET AUTOCOMMIT= 0;
4718-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4719-SELECT f_int1, f_int1, '', '', 'was inserted'
4720-FROM t0_template source_tab
4721-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
4722-
4723-# check transactions-1 success: 1
4724-COMMIT WORK;
4725-
4726-# check transactions-2 success: 1
4727-ROLLBACK WORK;
4728-
4729-# check transactions-3 success: 1
4730-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4731-COMMIT WORK;
4732-ROLLBACK WORK;
4733-
4734-# check transactions-4 success: 1
4735-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4736-SELECT f_int1, f_int1, '', '', 'was inserted'
4737-FROM t0_template source_tab
4738-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
4739-
4740-# check transactions-5 success: 1
4741-ROLLBACK WORK;
4742-
4743-# check transactions-6 success: 1
4744-# INFO: Storage engine used for t1 seems to be transactional.
4745-COMMIT;
4746-
4747-# check transactions-7 success: 1
4748-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4749-COMMIT WORK;
4750-SET @@session.sql_mode = 'traditional';
4751-SELECT @max_row_div2 + @max_row_div4 - @max_row_div4 + 1 INTO @exp_inserted_rows;
4752-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4753-SELECT IF(f_int1 = @max_row_div2,f_int1 / 0,f_int1),f_int1,
4754-'', '', 'was inserted' FROM t0_template
4755-WHERE f_int1 BETWEEN @max_row_div4 AND @max_row_div2 + @max_row_div4;
4756-ERROR 22012: Division by 0
4757-COMMIT;
4758-
4759-# check transactions-8 success: 1
4760-# INFO: Storage engine used for t1 seems to be able to revert
4761-# changes made by the failing statement.
4762-SET @@session.sql_mode = '';
4763-SET AUTOCOMMIT= 1;
4764-DELETE FROM t1 WHERE f_charbig = 'was inserted';
4765-COMMIT WORK;
4766-UPDATE t1 SET f_charbig = REPEAT('b', 1000);
4767-
4768-# check special-1 success: 1
4769-UPDATE t1 SET f_charbig = '';
4770-
4771-# check special-2 success: 1
4772-UPDATE t1 SET f_charbig = CONCAT('===',CAST(f_int1 AS CHAR),'===');
4773-INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
4774-SELECT f_int1,f_int2,f_char1,f_char2,'just inserted' FROM t0_template
4775-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4776-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4777-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4778-'just inserted' FROM t0_template
4779-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4780-CREATE TRIGGER trg_1 BEFORE INSERT ON t0_aux FOR EACH ROW
4781-BEGIN
4782-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4783-f_charbig = 'updated by trigger'
4784- WHERE f_int1 = new.f_int1;
4785-END|
4786-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4787-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
4788-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4789-
4790-# check trigger-1 success: 1
4791-DROP TRIGGER trg_1;
4792-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4793-f_int2 = CAST(f_char1 AS SIGNED INT),
4794-f_charbig = 'just inserted'
4795- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4796-DELETE FROM t0_aux
4797-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4798-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4799-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4800-'just inserted' FROM t0_template
4801-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4802-CREATE TRIGGER trg_1 AFTER INSERT ON t0_aux FOR EACH ROW
4803-BEGIN
4804-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4805-f_charbig = 'updated by trigger'
4806- WHERE f_int1 = new.f_int1;
4807-END|
4808-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4809-SELECT f_int1,f_int2,f_char1,f_char2,NULL FROM t0_template
4810-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4811-
4812-# check trigger-2 success: 1
4813-DROP TRIGGER trg_1;
4814-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4815-f_int2 = CAST(f_char1 AS SIGNED INT),
4816-f_charbig = 'just inserted'
4817- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4818-DELETE FROM t0_aux
4819-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4820-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4821-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4822-'just inserted' FROM t0_template
4823-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4824-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
4825-BEGIN
4826-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4827-f_charbig = 'updated by trigger'
4828- WHERE f_int1 = new.f_int1;
4829-END|
4830-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4831-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4832-
4833-# check trigger-3 success: 1
4834-DROP TRIGGER trg_1;
4835-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4836-f_int2 = CAST(f_char1 AS SIGNED INT),
4837-f_charbig = 'just inserted'
4838- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4839-DELETE FROM t0_aux
4840-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4841-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4842-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4843-'just inserted' FROM t0_template
4844-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4845-CREATE TRIGGER trg_1 BEFORE UPDATE ON t0_aux FOR EACH ROW
4846-BEGIN
4847-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4848-f_charbig = 'updated by trigger'
4849- WHERE f_int1 = - old.f_int1;
4850-END|
4851-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4852-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4853-
4854-# check trigger-4 success: 1
4855-DROP TRIGGER trg_1;
4856-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4857-f_int2 = CAST(f_char1 AS SIGNED INT),
4858-f_charbig = 'just inserted'
4859- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4860-DELETE FROM t0_aux
4861-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4862-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4863-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4864-'just inserted' FROM t0_template
4865-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4866-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
4867-BEGIN
4868-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4869-f_charbig = 'updated by trigger'
4870- WHERE f_int1 = new.f_int1;
4871-END|
4872-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4873-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4874-
4875-# check trigger-5 success: 1
4876-DROP TRIGGER trg_1;
4877-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4878-f_int2 = CAST(f_char1 AS SIGNED INT),
4879-f_charbig = 'just inserted'
4880- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4881-DELETE FROM t0_aux
4882-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4883-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4884-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4885-'just inserted' FROM t0_template
4886-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4887-CREATE TRIGGER trg_1 AFTER UPDATE ON t0_aux FOR EACH ROW
4888-BEGIN
4889-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4890-f_charbig = 'updated by trigger'
4891- WHERE f_int1 = - old.f_int1;
4892-END|
4893-UPDATE t0_aux SET f_int1 = - f_int1, f_int2 = - f_int2
4894-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4895-
4896-# check trigger-6 success: 1
4897-DROP TRIGGER trg_1;
4898-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4899-f_int2 = CAST(f_char1 AS SIGNED INT),
4900-f_charbig = 'just inserted'
4901- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4902-DELETE FROM t0_aux
4903-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4904-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4905-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4906-'just inserted' FROM t0_template
4907-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4908-CREATE TRIGGER trg_1 BEFORE DELETE ON t0_aux FOR EACH ROW
4909-BEGIN
4910-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4911-f_charbig = 'updated by trigger'
4912- WHERE f_int1 = - old.f_int1;
4913-END|
4914-DELETE FROM t0_aux
4915-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4916-
4917-# check trigger-7 success: 1
4918-DROP TRIGGER trg_1;
4919-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4920-f_int2 = CAST(f_char1 AS SIGNED INT),
4921-f_charbig = 'just inserted'
4922- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4923-DELETE FROM t0_aux
4924-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4925-INSERT INTO t0_aux(f_int1,f_int2,f_char1,f_char2,f_charbig)
4926-SELECT -f_int1,-f_int1,CAST(-f_int1 AS CHAR),CAST(-f_int1 AS CHAR),
4927-'just inserted' FROM t0_template
4928-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4929-CREATE TRIGGER trg_1 AFTER DELETE ON t0_aux FOR EACH ROW
4930-BEGIN
4931-UPDATE t1 SET f_int1 = -f_int1, f_int2 = -f_int2,
4932-f_charbig = 'updated by trigger'
4933- WHERE f_int1 = - old.f_int1;
4934-END|
4935-DELETE FROM t0_aux
4936-WHERE f_int1 IN (- (@max_row_div2 - 1),- @max_row_div2,- (@max_row_div2 + 1));
4937-
4938-# check trigger-8 success: 1
4939-DROP TRIGGER trg_1;
4940-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4941-f_int2 = CAST(f_char1 AS SIGNED INT),
4942-f_charbig = 'just inserted'
4943- WHERE f_int1 <> CAST(f_char1 AS SIGNED INT);
4944-DELETE FROM t0_aux
4945-WHERE ABS(f_int1) BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4946-DELETE FROM t1
4947-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1;
4948-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
4949-BEGIN
4950-SET new.f_int1 = old.f_int1 + @max_row,
4951-new.f_int2 = old.f_int2 - @max_row,
4952-new.f_charbig = '####updated per update trigger####';
4953-END|
4954-UPDATE t1
4955-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
4956-f_charbig = '####updated per update statement itself####';
4957-
4958-# check trigger-9 success: 1
4959-DROP TRIGGER trg_2;
4960-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4961-f_int2 = CAST(f_char1 AS SIGNED INT),
4962-f_charbig = CONCAT('===',f_char1,'===');
4963-CREATE TRIGGER trg_2 BEFORE UPDATE ON t1 FOR EACH ROW
4964-BEGIN
4965-SET new.f_int1 = new.f_int1 + @max_row,
4966-new.f_int2 = new.f_int2 - @max_row,
4967-new.f_charbig = '####updated per update trigger####';
4968-END|
4969-UPDATE t1
4970-SET f_int1 = f_int1 + @max_row, f_int2 = f_int2 - @max_row,
4971-f_charbig = '####updated per update statement itself####';
4972-
4973-# check trigger-10 success: 1
4974-DROP TRIGGER trg_2;
4975-UPDATE t1 SET f_int1 = CAST(f_char1 AS SIGNED INT),
4976-f_int2 = CAST(f_char1 AS SIGNED INT),
4977-f_charbig = CONCAT('===',f_char1,'===');
4978-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
4979-BEGIN
4980-SET new.f_int1 = @my_max1 + @counter,
4981-new.f_int2 = @my_min2 - @counter,
4982-new.f_charbig = '####updated per insert trigger####';
4983-SET @counter = @counter + 1;
4984-END|
4985-SET @counter = 1;
4986-SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
4987-INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig)
4988-SELECT f_int1, f_int1, CAST(f_int1 AS CHAR),
4989-CAST(f_int1 AS CHAR), 'just inserted' FROM t0_template
4990-WHERE f_int1 BETWEEN @max_row_div2 - 1 AND @max_row_div2 + 1
4991-ORDER BY f_int1;
4992-DROP TRIGGER trg_3;
4993-
4994-# check trigger-11 success: 1
4995-DELETE FROM t1
4996-WHERE f_int1 <> CAST(f_char1 AS SIGNED INT)
4997-AND f_int2 <> CAST(f_char1 AS SIGNED INT)
4998-AND f_charbig = '####updated per insert trigger####';
4999-CREATE TRIGGER trg_3 BEFORE INSERT ON t1 FOR EACH ROW
5000-BEGIN
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: