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

Proposed by Raghavendra D Prabhu
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 388
Proposed branch: lp:~raghavendra-prabhu/percona-xtradb-cluster/release-5.5.31
Merge into: lp:percona-xtradb-cluster/percona-xtradb-cluster-5.5
Diff against target: 152169 lines (+73046/-69330)
333 files modified
Makefile.ps (+2/-2)
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/wsrep.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/default.c (+37/-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/CMakeLists.txt (+1/-1)
Percona-Server/scripts/clustercheck.sh (+2/-2)
Percona-Server/scripts/mysql_system_tables_data.sql (+9/-5)
Percona-Server/scripts/mysqld_safe.sh (+17/-4)
Percona-Server/scripts/pyclustercheck (+109/-0)
Percona-Server/scripts/wsrep_sst_common.sh (+8/-1)
Percona-Server/scripts/wsrep_sst_mysqldump.sh (+8/-8)
Percona-Server/scripts/wsrep_sst_rsync.sh (+33/-3)
Percona-Server/scripts/wsrep_sst_xtrabackup.sh (+293/-36)
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.h (+6/-0)
Percona-Server/sql/log_event.cc (+40/-5)
Percona-Server/sql/log_event.h (+28/-2)
Percona-Server/sql/mysqld.cc (+52/-9)
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/slave.cc (+0/-17)
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 (+23/-6)
Percona-Server/sql/sql_class.h (+1/-0)
Percona-Server/sql/sql_handler.cc (+10/-5)
Percona-Server/sql/sql_parse.cc (+24/-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/sql/tztime.cc (+3/-0)
Percona-Server/sql/wsrep_hton.cc (+2/-0)
Percona-Server/sql/wsrep_mysqld.cc (+11/-2)
Percona-Server/sql/wsrep_mysqld.h (+1/-0)
Percona-Server/sql/wsrep_var.cc (+1/-0)
Percona-Server/storage/innobase/btr/btr0cur.c (+27/-20)
Percona-Server/storage/innobase/buf/buf0buf.c (+14/-5)
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 (+169/-14)
Percona-Server/storage/innobase/handler/ha_innodb.h (+1/-0)
Percona-Server/storage/innobase/handler/i_s.cc (+70/-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/trx0i_s.h (+16/-0)
Percona-Server/storage/innobase/include/trx0sys.h (+15/-15)
Percona-Server/storage/innobase/include/ut0dbg.h (+0/-40)
Percona-Server/storage/innobase/lock/lock0lock.c (+6/-1)
Percona-Server/storage/innobase/mtr/mtr0mtr.c (+80/-77)
Percona-Server/storage/innobase/os/os0file.c (+60/-0)
Percona-Server/storage/innobase/os/os0proc.c (+9/-0)
Percona-Server/storage/innobase/page/page0zip.c (+6/-5)
Percona-Server/storage/innobase/read/read0read.c (+6/-0)
Percona-Server/storage/innobase/row/row0ins.c (+12/-10)
Percona-Server/storage/innobase/row/row0mysql.c (+1/-1)
Percona-Server/storage/innobase/row/row0sel.c (+7/-3)
Percona-Server/storage/innobase/row/row0upd.c (+64/-10)
Percona-Server/storage/innobase/srv/srv0srv.c (+46/-15)
Percona-Server/storage/innobase/srv/srv0start.c (+10/-0)
Percona-Server/storage/innobase/sync/sync0arr.c (+4/-4)
Percona-Server/storage/innobase/trx/trx0i_s.c (+15/-0)
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.server.sh (+24/-4)
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)
WSREP-REVISION (+1/-1)
build/build-dpkg.sh (+19/-6)
build/build-rpm.sh (+1/-2)
build/debian/additions/debian-start (+7/-0)
build/debian/control (+5/-4)
build/debian/percona-xtradb-cluster-server-5.5.install (+1/-0)
build/debian/percona-xtradb-cluster-server-5.5.mysql.init (+131/-31)
build/debian/rules (+3/-3)
build/percona-shared-compat.spec (+1/-1)
build/percona-xtradb-cluster.spec (+39/-33)
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/release-5.5.31
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+168543@code.launchpad.net

Description of the change

Review required after the co-ordinates are changed. I have tested this and it looks good.

To post a comment you must log in.
Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Ignore the diff shown in this MP (don't know how all of that got here)

The diff (from fix) is only the https://bazaar.launchpad.net/~raghavendra-prabhu/percona-xtradb-cluster/release-5.5.31/revision/416 (from revision 416).

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Looks good to me.

If disk format compatibility between PXC and MySQL + Galera libs is important, then it's an important patch to push to Galera upstream.

review: Approve

Preview Diff

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

Subscribers

People subscribed via source and target branches