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

Proposed by Ignacio Nin
Status: Merged
Merged at revision: 388
Proposed branch: lp:~percona-core/percona-xtradb-cluster/release-5.5.31
Merge into: lp:percona-xtradb-cluster/percona-xtradb-cluster-5.5
Diff against target: 152418 lines (+73128/-69354)
335 files modified
Makefile (+2/-2)
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 (+294/-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-binary.sh (+14/-5)
build/build-dpkg.sh (+33/-9)
build/build-rpm.sh (+10/-3)
build/debian/additions/debian-start (+7/-0)
build/debian/control (+10/-9)
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 (+5/-5)
build/percona-shared-compat.spec (+1/-1)
build/percona-xtradb-cluster.spec (+74/-39)
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:~percona-core/percona-xtradb-cluster/release-5.5.31
Reviewer Review Type Date Requested Status
Percona core Pending
Review via email: mp+172218@code.launchpad.net

Description of the change

Changes for release 5.5.31

To post a comment you must log in.

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: