summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bzrignore12
-rw-r--r--BUILD/Makefile.am6
-rwxr-xr-xBUILD/check-cpu35
-rw-r--r--BitKeeper/etc/collapsed12
-rwxr-xr-xCMakeLists.txt15
-rw-r--r--Docs/Makefile.am5
-rwxr-xr-xDocs/Support/colspec-fix.pl78
-rwxr-xr-xDocs/Support/docbook-fixup.pl200
-rwxr-xr-xDocs/Support/docbook-prefix.pl50
-rwxr-xr-xDocs/Support/docbook-split70
-rwxr-xr-xDocs/Support/generate-text-files.pl15
-rwxr-xr-xDocs/Support/make-docbook29
-rwxr-xr-xDocs/Support/make-makefile7
-rwxr-xr-xDocs/Support/test-make-manual137
-rwxr-xr-xDocs/Support/test-make-manual-de137
-rwxr-xr-xDocs/Support/xwf67
-rw-r--r--Makefile.am77
-rw-r--r--SSL/Makefile.am5
-rw-r--r--VC++Files/copy_mysql_files.bat17
-rw-r--r--VC++Files/mysys/mysys.vcproj43
-rwxr-xr-xVC++Files/prepare14
-rw-r--r--VC++Files/test1/mysql_thr.c15
-rw-r--r--VC++Files/thr_test/thr_test.c15
-rwxr-xr-xbdb/CMakeLists.txt15
-rw-r--r--bdb/Makefile.in5
-rwxr-xr-xclient/CMakeLists.txt17
-rw-r--r--client/Makefile.am36
-rw-r--r--client/client_priv.h5
-rw-r--r--client/completion_hash.cc3
-rw-r--r--client/completion_hash.h6
-rw-r--r--client/get_password.c3
-rw-r--r--client/my_readline.h3
-rw-r--r--client/mysql.cc32
-rw-r--r--client/mysql_upgrade.c129
-rw-r--r--client/mysqladmin.cc9
-rw-r--r--client/mysqlbinlog.cc60
-rw-r--r--client/mysqlcheck.c3
-rw-r--r--client/mysqldump.c7
-rw-r--r--client/mysqlimport.c7
-rw-r--r--client/mysqlmanager-pwgen.c3
-rw-r--r--client/mysqlmanagerc.c3
-rw-r--r--client/mysqlshow.c7
-rw-r--r--client/mysqltest.c157
-rw-r--r--client/readline.cc6
-rw-r--r--client/sql_string.cc3
-rw-r--r--client/sql_string.h3
-rw-r--r--cmd-line-utils/Makefile.am4
-rw-r--r--cmd-line-utils/readline/bind.c4
-rw-r--r--cmd-line-utils/readline/histfile.c6
-rw-r--r--cmd-line-utils/readline/undo.c2
-rw-r--r--configure.in35
-rwxr-xr-xdbug/CMakeLists.txt15
-rw-r--r--dbug/Makefile.am6
-rwxr-xr-xextra/CMakeLists.txt15
-rw-r--r--extra/Makefile.am5
-rw-r--r--extra/charset2html.c3
-rw-r--r--extra/comp_err.c3
-rw-r--r--extra/innochecksum.c3
-rw-r--r--extra/my_print_defaults.c3
-rw-r--r--extra/mysql_waitpid.c3
-rw-r--r--extra/perror.c3
-rw-r--r--extra/replace.c9
-rw-r--r--extra/resolve_stack_dump.c3
-rw-r--r--extra/resolveip.c3
-rwxr-xr-xextra/yassl/CMakeLists.txt15
-rw-r--r--extra/yassl/Makefile.am3
-rw-r--r--extra/yassl/README66
-rw-r--r--extra/yassl/examples/client/client.cpp75
-rw-r--r--extra/yassl/examples/echoclient/echoclient.cpp25
-rw-r--r--extra/yassl/examples/echoserver/echoserver.cpp11
-rw-r--r--extra/yassl/examples/server/server.cpp33
-rw-r--r--extra/yassl/include/factory.hpp7
-rw-r--r--extra/yassl/include/openssl/prefix_ssl.h4
-rw-r--r--extra/yassl/include/openssl/ssl.h9
-rw-r--r--extra/yassl/include/socket_wrapper.hpp6
-rw-r--r--extra/yassl/include/yassl_error.hpp5
-rw-r--r--extra/yassl/include/yassl_imp.hpp15
-rw-r--r--extra/yassl/include/yassl_int.hpp11
-rw-r--r--extra/yassl/include/yassl_types.hpp3
-rw-r--r--extra/yassl/src/handshake.cpp101
-rw-r--r--extra/yassl/src/make.bat20
-rw-r--r--extra/yassl/src/socket_wrapper.cpp10
-rw-r--r--extra/yassl/src/ssl.cpp156
-rw-r--r--extra/yassl/src/yassl_error.cpp12
-rw-r--r--extra/yassl/src/yassl_imp.cpp151
-rw-r--r--extra/yassl/src/yassl_int.cpp160
-rwxr-xr-xextra/yassl/taocrypt/CMakeLists.txt15
-rw-r--r--extra/yassl/taocrypt/Makefile.am3
-rw-r--r--extra/yassl/taocrypt/benchmark/Makefile.am3
-rw-r--r--extra/yassl/taocrypt/benchmark/make.bat20
-rw-r--r--extra/yassl/taocrypt/include/aes.hpp13
-rw-r--r--extra/yassl/taocrypt/include/algebra.hpp3
-rw-r--r--extra/yassl/taocrypt/include/arc4.hpp3
-rw-r--r--extra/yassl/taocrypt/include/asn.hpp6
-rw-r--r--extra/yassl/taocrypt/include/block.hpp7
-rw-r--r--extra/yassl/taocrypt/include/blowfish.hpp18
-rw-r--r--extra/yassl/taocrypt/include/des.hpp25
-rw-r--r--extra/yassl/taocrypt/include/integer.hpp10
-rw-r--r--extra/yassl/taocrypt/include/md5.hpp7
-rw-r--r--extra/yassl/taocrypt/include/misc.hpp19
-rw-r--r--extra/yassl/taocrypt/include/modes.hpp22
-rw-r--r--extra/yassl/taocrypt/include/ripemd.hpp7
-rw-r--r--extra/yassl/taocrypt/include/rsa.hpp3
-rw-r--r--extra/yassl/taocrypt/include/sha.hpp7
-rw-r--r--extra/yassl/taocrypt/include/twofish.hpp17
-rw-r--r--extra/yassl/taocrypt/src/aes.cpp26
-rw-r--r--extra/yassl/taocrypt/src/algebra.cpp6
-rw-r--r--extra/yassl/taocrypt/src/arc4.cpp15
-rw-r--r--extra/yassl/taocrypt/src/blowfish.cpp25
-rw-r--r--extra/yassl/taocrypt/src/des.cpp54
-rw-r--r--extra/yassl/taocrypt/src/integer.cpp79
-rw-r--r--extra/yassl/taocrypt/src/make.bat23
-rw-r--r--extra/yassl/taocrypt/src/md4.cpp6
-rw-r--r--extra/yassl/taocrypt/src/md5.cpp37
-rw-r--r--extra/yassl/taocrypt/src/misc.cpp138
-rw-r--r--extra/yassl/taocrypt/src/random.cpp3
-rw-r--r--extra/yassl/taocrypt/src/ripemd.cpp38
-rw-r--r--extra/yassl/taocrypt/src/sha.cpp41
-rw-r--r--extra/yassl/taocrypt/src/twofish.cpp25
-rw-r--r--extra/yassl/taocrypt/test/Makefile.am3
-rw-r--r--extra/yassl/taocrypt/test/make.bat20
-rw-r--r--extra/yassl/taocrypt/test/test.cpp2
-rw-r--r--extra/yassl/testsuite/make.bat20
-rw-r--r--extra/yassl/testsuite/test.hpp67
-rwxr-xr-xheap/CMakeLists.txt15
-rw-r--r--heap/Makefile.am5
-rw-r--r--heap/_check.c5
-rw-r--r--heap/_rectest.c5
-rw-r--r--heap/heapdef.h5
-rw-r--r--heap/hp_block.c7
-rw-r--r--heap/hp_clear.c8
-rw-r--r--heap/hp_close.c5
-rw-r--r--heap/hp_create.c5
-rw-r--r--heap/hp_delete.c5
-rw-r--r--heap/hp_extra.c5
-rw-r--r--heap/hp_hash.c5
-rw-r--r--heap/hp_info.c5
-rw-r--r--heap/hp_open.c5
-rw-r--r--heap/hp_panic.c5
-rw-r--r--heap/hp_rename.c5
-rw-r--r--heap/hp_rfirst.c5
-rw-r--r--heap/hp_rkey.c5
-rw-r--r--heap/hp_rlast.c5
-rw-r--r--heap/hp_rnext.c5
-rw-r--r--heap/hp_rprev.c5
-rw-r--r--heap/hp_rrnd.c5
-rw-r--r--heap/hp_rsame.c5
-rw-r--r--heap/hp_scan.c5
-rw-r--r--heap/hp_static.c5
-rw-r--r--heap/hp_test1.c5
-rw-r--r--heap/hp_test2.c5
-rw-r--r--heap/hp_update.c5
-rw-r--r--heap/hp_write.c17
-rw-r--r--include/Makefile.am30
-rw-r--r--include/abi_check.ic914
-rw-r--r--include/base64.h3
-rw-r--r--include/config-netware.h3
-rw-r--r--include/config-os2.h4
-rw-r--r--include/config-win.h4
-rw-r--r--include/decimal.h3
-rw-r--r--include/errmsg.h3
-rw-r--r--include/ft_global.h3
-rw-r--r--include/hash.h3
-rw-r--r--include/heap.h11
-rw-r--r--include/help_end.h15
-rw-r--r--include/help_start.h15
-rw-r--r--include/keycache.h3
-rw-r--r--include/m_ctype.h3
-rw-r--r--include/m_string.h3
-rw-r--r--include/md5.h3
-rw-r--r--include/my_aes.h5
-rw-r--r--include/my_alarm.h3
-rw-r--r--include/my_alloc.h3
-rw-r--r--include/my_base.h3
-rw-r--r--include/my_bitmap.h3
-rw-r--r--include/my_dbug.h3
-rw-r--r--include/my_dir.h3
-rw-r--r--include/my_getopt.h5
-rw-r--r--include/my_global.h75
-rw-r--r--include/my_handler.h6
-rw-r--r--include/my_libwrap.h3
-rw-r--r--include/my_list.h3
-rw-r--r--include/my_net.h3
-rw-r--r--include/my_no_pthread.h3
-rw-r--r--include/my_nosys.h3
-rw-r--r--include/my_pthread.h107
-rw-r--r--include/my_sys.h24
-rw-r--r--include/my_time.h5
-rw-r--r--include/my_tree.h8
-rw-r--r--include/my_user.h3
-rw-r--r--include/my_xml.h3
-rw-r--r--include/myisam.h3
-rw-r--r--include/myisammrg.h3
-rw-r--r--include/myisampack.h3
-rw-r--r--include/mysql.h5
-rw-r--r--include/mysql_com.h3
-rw-r--r--include/mysql_embed.h3
-rw-r--r--include/mysql_h.ic19
-rw-r--r--include/mysql_time.h5
-rw-r--r--include/mysys_err.h3
-rw-r--r--include/queues.h3
-rw-r--r--include/raid.h3
-rw-r--r--include/rijndael.h5
-rw-r--r--include/sha1.h5
-rw-r--r--include/sql_common.h5
-rw-r--r--include/sslopt-case.h3
-rw-r--r--include/sslopt-longopts.h3
-rw-r--r--include/sslopt-vars.h3
-rw-r--r--include/t_ctype.h3
-rw-r--r--include/thr_alarm.h3
-rw-r--r--include/thr_lock.h4
-rw-r--r--include/typelib.h6
-rw-r--r--include/violite.h3
-rwxr-xr-xinnobase/CMakeLists.txt53
-rw-r--r--innobase/Makefile.am6
-rw-r--r--innobase/btr/Makefile.am9
-rw-r--r--innobase/buf/Makefile.am9
-rw-r--r--innobase/data/Makefile.am9
-rw-r--r--innobase/dict/Makefile.am9
-rw-r--r--innobase/dict/dict0dict.c29
-rw-r--r--innobase/dyn/Makefile.am9
-rw-r--r--innobase/eval/Makefile.am9
-rw-r--r--innobase/fil/Makefile.am9
-rw-r--r--innobase/fsp/Makefile.am9
-rw-r--r--innobase/fut/Makefile.am9
-rw-r--r--innobase/ha/Makefile.am9
-rw-r--r--innobase/ibuf/Makefile.am6
-rw-r--r--innobase/include/Makefile.am6
-rw-r--r--innobase/include/hash0hash.h3
-rw-r--r--innobase/include/row0mysql.h2
-rw-r--r--innobase/include/sync0rw.h14
-rw-r--r--innobase/include/sync0sync.h32
-rw-r--r--innobase/include/sync0sync.ic4
-rw-r--r--innobase/lock/Makefile.am9
-rw-r--r--innobase/log/Makefile.am9
-rw-r--r--innobase/log/log0recv.c10
-rw-r--r--innobase/mach/Makefile.am9
-rw-r--r--innobase/mem/Makefile.am9
-rw-r--r--innobase/mtr/Makefile.am9
-rw-r--r--innobase/os/Makefile.am6
-rw-r--r--innobase/os/os0file.c2
-rw-r--r--innobase/page/Makefile.am9
-rw-r--r--innobase/pars/Makefile.am9
-rw-r--r--innobase/que/Makefile.am9
-rw-r--r--innobase/read/Makefile.am9
-rw-r--r--innobase/rem/Makefile.am9
-rw-r--r--innobase/row/Makefile.am9
-rw-r--r--innobase/row/row0mysql.c11
-rw-r--r--innobase/srv/Makefile.am9
-rw-r--r--innobase/srv/srv0start.c11
-rw-r--r--innobase/sync/Makefile.am9
-rw-r--r--innobase/sync/sync0rw.c14
-rw-r--r--innobase/sync/sync0sync.c32
-rw-r--r--innobase/thr/Makefile.am9
-rw-r--r--innobase/trx/Makefile.am9
-rw-r--r--innobase/trx/trx0roll.c20
-rw-r--r--innobase/trx/trx0trx.c18
-rw-r--r--innobase/usr/Makefile.am9
-rw-r--r--innobase/ut/Makefile.am9
-rwxr-xr-xlibmysql/CMakeLists.txt15
-rw-r--r--libmysql/Makefile.am3
-rw-r--r--libmysql/client_settings.h5
-rw-r--r--libmysql/libmysql.c24
-rw-r--r--libmysql_r/Makefile.am3
-rw-r--r--libmysqld/Makefile.am6
-rw-r--r--libmysqld/emb_qcache.cc3
-rw-r--r--libmysqld/emb_qcache.h5
-rw-r--r--libmysqld/embedded_priv.h5
-rw-r--r--libmysqld/examples/Makefile.am3
-rwxr-xr-xlibmysqld/examples/test-run2
-rw-r--r--libmysqld/lib_sql.cc11
-rw-r--r--libmysqld/libmysqld.c3
-rw-r--r--man/Makefile.am6
-rwxr-xr-xmyisam/CMakeLists.txt15
-rw-r--r--myisam/Makefile.am5
-rw-r--r--myisam/ft_boolean_search.c5
-rw-r--r--myisam/ft_eval.c5
-rw-r--r--myisam/ft_eval.h3
-rw-r--r--myisam/ft_nlq_search.c5
-rw-r--r--myisam/ft_parser.c5
-rw-r--r--myisam/ft_static.c5
-rw-r--r--myisam/ft_stem.c5
-rw-r--r--myisam/ft_stopwords.c5
-rw-r--r--myisam/ft_test1.c5
-rw-r--r--myisam/ft_test1.h5
-rw-r--r--myisam/ft_update.c5
-rw-r--r--myisam/ftdefs.h5
-rw-r--r--myisam/fulltext.h5
-rw-r--r--myisam/mi_cache.c5
-rw-r--r--myisam/mi_changed.c5
-rw-r--r--myisam/mi_check.c103
-rw-r--r--myisam/mi_checksum.c5
-rw-r--r--myisam/mi_close.c5
-rw-r--r--myisam/mi_create.c22
-rw-r--r--myisam/mi_dbug.c5
-rw-r--r--myisam/mi_delete.c5
-rw-r--r--myisam/mi_delete_all.c5
-rw-r--r--myisam/mi_delete_table.c5
-rw-r--r--myisam/mi_dynrec.c17
-rw-r--r--myisam/mi_extra.c5
-rw-r--r--myisam/mi_info.c5
-rw-r--r--myisam/mi_key.c5
-rw-r--r--myisam/mi_keycache.c3
-rw-r--r--myisam/mi_locking.c14
-rw-r--r--myisam/mi_log.c5
-rw-r--r--myisam/mi_open.c42
-rw-r--r--myisam/mi_packrec.c374
-rw-r--r--myisam/mi_page.c5
-rw-r--r--myisam/mi_panic.c5
-rw-r--r--myisam/mi_preload.c5
-rw-r--r--myisam/mi_range.c6
-rw-r--r--myisam/mi_rename.c5
-rw-r--r--myisam/mi_rfirst.c5
-rw-r--r--myisam/mi_rkey.c5
-rw-r--r--myisam/mi_rlast.c5
-rw-r--r--myisam/mi_rnext.c5
-rw-r--r--myisam/mi_rnext_same.c5
-rw-r--r--myisam/mi_rprev.c5
-rw-r--r--myisam/mi_rrnd.c5
-rw-r--r--myisam/mi_rsame.c5
-rw-r--r--myisam/mi_rsamepos.c5
-rw-r--r--myisam/mi_scan.c5
-rw-r--r--myisam/mi_search.c5
-rw-r--r--myisam/mi_static.c5
-rw-r--r--myisam/mi_statrec.c5
-rw-r--r--myisam/mi_test1.c7
-rw-r--r--myisam/mi_test2.c5
-rw-r--r--myisam/mi_test3.c5
-rw-r--r--myisam/mi_unique.c5
-rw-r--r--myisam/mi_update.c8
-rw-r--r--myisam/mi_write.c8
-rw-r--r--myisam/myisam_ftdump.c5
-rw-r--r--myisam/myisamchk.c3
-rw-r--r--myisam/myisamdef.h6
-rw-r--r--myisam/myisamlog.c5
-rw-r--r--myisam/myisampack.c27
-rw-r--r--myisam/rt_index.c6
-rw-r--r--myisam/rt_index.h6
-rw-r--r--myisam/rt_key.c3
-rw-r--r--myisam/rt_key.h6
-rw-r--r--myisam/rt_mbr.c6
-rw-r--r--myisam/rt_mbr.h6
-rw-r--r--myisam/rt_split.c10
-rw-r--r--myisam/rt_test.c5
-rw-r--r--myisam/sort.c5
-rw-r--r--myisam/sp_defs.h6
-rw-r--r--myisam/sp_key.c3
-rw-r--r--myisam/sp_test.c5
-rwxr-xr-xmyisammrg/CMakeLists.txt15
-rw-r--r--myisammrg/Makefile.am5
-rw-r--r--myisammrg/myrg_close.c5
-rw-r--r--myisammrg/myrg_create.c5
-rw-r--r--myisammrg/myrg_def.h5
-rw-r--r--myisammrg/myrg_delete.c5
-rw-r--r--myisammrg/myrg_extra.c5
-rw-r--r--myisammrg/myrg_info.c5
-rw-r--r--myisammrg/myrg_locking.c5
-rw-r--r--myisammrg/myrg_open.c5
-rw-r--r--myisammrg/myrg_panic.c5
-rw-r--r--myisammrg/myrg_queue.c5
-rw-r--r--myisammrg/myrg_range.c5
-rw-r--r--myisammrg/myrg_rfirst.c5
-rw-r--r--myisammrg/myrg_rkey.c7
-rw-r--r--myisammrg/myrg_rlast.c5
-rw-r--r--myisammrg/myrg_rnext.c5
-rw-r--r--myisammrg/myrg_rnext_same.c5
-rw-r--r--myisammrg/myrg_rprev.c5
-rw-r--r--myisammrg/myrg_rrnd.c5
-rw-r--r--myisammrg/myrg_rsame.c5
-rw-r--r--myisammrg/myrg_static.c5
-rw-r--r--myisammrg/myrg_update.c5
-rw-r--r--myisammrg/myrg_write.c5
-rw-r--r--mysql-test/Makefile.am30
-rw-r--r--mysql-test/include/federated.inc1
-rw-r--r--mysql-test/include/innodb_rollback_on_timeout.inc37
-rw-r--r--mysql-test/include/wait_show_pattern.inc51
-rw-r--r--mysql-test/include/wait_slave_status.inc43
-rw-r--r--mysql-test/install_test_db.sh28
-rw-r--r--mysql-test/lib/mtr_cases.pl28
-rw-r--r--mysql-test/lib/mtr_diff.pl14
-rw-r--r--mysql-test/lib/mtr_gcov.pl14
-rw-r--r--mysql-test/lib/mtr_gprof.pl14
-rw-r--r--mysql-test/lib/mtr_im.pl14
-rw-r--r--mysql-test/lib/mtr_io.pl28
-rw-r--r--mysql-test/lib/mtr_match.pl14
-rw-r--r--mysql-test/lib/mtr_misc.pl15
-rw-r--r--mysql-test/lib/mtr_process.pl24
-rw-r--r--mysql-test/lib/mtr_report.pl21
-rw-r--r--mysql-test/lib/mtr_stress.pl14
-rw-r--r--mysql-test/lib/mtr_timer.pl14
-rw-r--r--mysql-test/lib/mtr_unique.pl28
-rw-r--r--mysql-test/my_create_tables.c15
-rw-r--r--mysql-test/mysql-test-run-shell.sh (renamed from mysql-test/mysql-test-run.sh)0
-rwxr-xr-xmysql-test/mysql-test-run.pl553
-rw-r--r--mysql-test/mysql_test_run_new.c8
-rw-r--r--mysql-test/ndb/ndbcluster.sh14
-rw-r--r--mysql-test/r/alter_table-big.result18
-rw-r--r--mysql-test/r/alter_table.result260
-rw-r--r--mysql-test/r/archive.result6
-rw-r--r--mysql-test/r/bdb.result34
-rw-r--r--mysql-test/r/bigint.result11
-rw-r--r--mysql-test/r/compare.result4
-rw-r--r--mysql-test/r/ctype_cp932_binlog.result6
-rw-r--r--mysql-test/r/ctype_hebrew.result11
-rw-r--r--mysql-test/r/ctype_ucs_binlog.result20
-rw-r--r--mysql-test/r/ctype_utf8.result24
-rw-r--r--mysql-test/r/date_formats.result66
-rw-r--r--mysql-test/r/default.result92
-rw-r--r--mysql-test/r/distinct.result37
-rw-r--r--mysql-test/r/federated.result28
-rw-r--r--mysql-test/r/fix_priv_tables.result36
-rw-r--r--mysql-test/r/fix_priv_tabs.result0
-rw-r--r--mysql-test/r/flush2.result24
-rw-r--r--mysql-test/r/flush_block_commit.result15
-rw-r--r--mysql-test/r/flush_block_commit_notembedded.result15
-rw-r--r--mysql-test/r/func_group.result267
-rw-r--r--mysql-test/r/func_in.result4
-rw-r--r--mysql-test/r/func_misc.result7
-rw-r--r--mysql-test/r/func_str.result12
-rw-r--r--mysql-test/r/func_time.result6
-rw-r--r--mysql-test/r/gis-rtree.result11
-rw-r--r--mysql-test/r/gis.result26
-rw-r--r--mysql-test/r/group_min_max.result124
-rw-r--r--mysql-test/r/have_mysql_upgrade.result2
-rw-r--r--mysql-test/r/index_merge.result2
-rw-r--r--mysql-test/r/index_merge_ror.result11
-rw-r--r--mysql-test/r/information_schema.result2
-rw-r--r--mysql-test/r/init_connect.result2
-rw-r--r--mysql-test/r/innodb_mysql.result36
-rw-r--r--mysql-test/r/innodb_timeout_rollback.result35
-rw-r--r--mysql-test/r/insert.result6
-rw-r--r--mysql-test/r/insert_notembedded.result107
-rw-r--r--mysql-test/r/insert_select.result100
-rw-r--r--mysql-test/r/join.result20
-rw-r--r--mysql-test/r/join_nested.result43
-rw-r--r--mysql-test/r/key_cache.result4
-rw-r--r--mysql-test/r/limit.result1
-rw-r--r--mysql-test/r/lowercase_fs_off.result1
-rw-r--r--mysql-test/r/mix_innodb_myisam_binlog.result4
-rw-r--r--mysql-test/r/myisam.result36
-rw-r--r--mysql-test/r/mysql.result6
-rw-r--r--mysql-test/r/mysql_upgrade.result127
-rw-r--r--mysql-test/r/mysqladmin.result4
-rw-r--r--mysql-test/r/mysqlbinlog.result261
-rw-r--r--mysql-test/r/mysqlbinlog2.result1086
-rw-r--r--mysql-test/r/mysqldump.result150
-rw-r--r--mysql-test/r/mysqltest.result6
-rw-r--r--mysql-test/r/ndb_basic.result16
-rw-r--r--mysql-test/r/ndb_index_ordered.result8
-rw-r--r--mysql-test/r/ndb_index_unique.result50
-rw-r--r--mysql-test/r/ndb_lock.result35
-rw-r--r--mysql-test/r/ndb_read_multi_range.result14
-rw-r--r--mysql-test/r/ndb_types.result1
-rw-r--r--mysql-test/r/ndb_update.result9
-rw-r--r--mysql-test/r/order_by.result12
-rw-r--r--mysql-test/r/ps.result165
-rw-r--r--mysql-test/r/range.result4
-rw-r--r--mysql-test/r/read_only.result5
-rw-r--r--mysql-test/r/rpl000015.result2
-rw-r--r--mysql-test/r/rpl_charset.result158
-rw-r--r--mysql-test/r/rpl_charset_sjis.result26
-rw-r--r--mysql-test/r/rpl_deadlock.result2
-rw-r--r--mysql-test/r/rpl_do_grant.result11
-rw-r--r--mysql-test/r/rpl_drop_db.result2
-rw-r--r--mysql-test/r/rpl_ignore_revoke.result1
-rw-r--r--mysql-test/r/rpl_init_slave.result3
-rw-r--r--mysql-test/r/rpl_locale.result20
-rw-r--r--mysql-test/r/rpl_max_relay_size.result2
-rw-r--r--mysql-test/r/rpl_sp.result245
-rw-r--r--mysql-test/r/rpl_timezone.result46
-rw-r--r--mysql-test/r/rpl_variables.result2
-rw-r--r--mysql-test/r/select.result23
-rw-r--r--mysql-test/r/show_check.result2
-rw-r--r--mysql-test/r/sp-error.result19
-rw-r--r--mysql-test/r/sp.result118
-rw-r--r--mysql-test/r/subselect.result13
-rw-r--r--mysql-test/r/symlink.result23
-rw-r--r--mysql-test/r/type_binary.result9
-rw-r--r--mysql-test/r/type_bit.result10
-rw-r--r--mysql-test/r/type_bit_innodb.result2
-rw-r--r--mysql-test/r/type_float.result2
-rw-r--r--mysql-test/r/type_varchar.result36
-rw-r--r--mysql-test/r/udf.result46
-rw-r--r--mysql-test/r/user_var-binlog.result28
-rw-r--r--mysql-test/r/user_var.result9
-rw-r--r--mysql-test/r/varbinary.result52
-rw-r--r--mysql-test/r/variables.result57
-rw-r--r--mysql-test/r/view.result8
-rw-r--r--mysql-test/r/view_grant.result76
-rw-r--r--mysql-test/r/windows.result6
-rw-r--r--mysql-test/std_data/bad_gis_data.dat1
-rw-r--r--mysql-test/std_data/bug19371.MYDbin0 -> 40 bytes
-rw-r--r--mysql-test/std_data/bug19371.MYIbin0 -> 1024 bytes
-rw-r--r--mysql-test/std_data/bug19371.frmbin0 -> 8578 bytes
-rw-r--r--mysql-test/t/alter_table-big.test62
-rw-r--r--mysql-test/t/alter_table.test191
-rw-r--r--mysql-test/t/archive.test10
-rw-r--r--mysql-test/t/backup.test3
-rw-r--r--mysql-test/t/bdb.test35
-rw-r--r--mysql-test/t/bigint.test9
-rw-r--r--mysql-test/t/ctype_hebrew.test16
-rw-r--r--mysql-test/t/ctype_utf8.test20
-rw-r--r--mysql-test/t/date_formats.test8
-rw-r--r--mysql-test/t/default.test58
-rw-r--r--mysql-test/t/delayed.test5
-rw-r--r--mysql-test/t/disabled.def3
-rw-r--r--mysql-test/t/distinct.test88
-rw-r--r--mysql-test/t/execution_constants.test3
-rw-r--r--mysql-test/t/federated.test32
-rw-r--r--mysql-test/t/fix_priv_tables.test66
-rw-r--r--mysql-test/t/flush2-master.opt1
-rw-r--r--mysql-test/t/flush2.test9
-rw-r--r--mysql-test/t/flush_block_commit.test21
-rw-r--r--mysql-test/t/flush_block_commit_notembedded.test32
-rw-r--r--mysql-test/t/func_gconcat.test2
-rw-r--r--mysql-test/t/func_group.test94
-rw-r--r--mysql-test/t/func_in.test7
-rw-r--r--mysql-test/t/func_misc.test7
-rw-r--r--mysql-test/t/func_str.test8
-rw-r--r--mysql-test/t/func_time.test12
-rw-r--r--mysql-test/t/gis-rtree.test17
-rw-r--r--mysql-test/t/gis.test22
-rw-r--r--mysql-test/t/group_min_max.test60
-rw-r--r--mysql-test/t/index_merge_ror.test15
-rw-r--r--mysql-test/t/information_schema.test2
-rw-r--r--mysql-test/t/information_schema_chmod.test4
-rw-r--r--mysql-test/t/information_schema_db.test4
-rw-r--r--mysql-test/t/init_connect.test4
-rw-r--r--mysql-test/t/innodb.test1
-rw-r--r--mysql-test/t/innodb_mysql-master.opt1
-rw-r--r--mysql-test/t/innodb_mysql.test2
-rw-r--r--mysql-test/t/innodb_timeout_rollback-master.opt1
-rw-r--r--mysql-test/t/innodb_timeout_rollback.test5
-rw-r--r--mysql-test/t/insert.test12
-rw-r--r--mysql-test/t/insert_notembedded.test154
-rw-r--r--mysql-test/t/insert_select.test137
-rw-r--r--mysql-test/t/join.test22
-rw-r--r--mysql-test/t/join_nested.test51
-rw-r--r--mysql-test/t/key_cache.test7
-rw-r--r--mysql-test/t/kill.test5
-rw-r--r--mysql-test/t/limit.test2
-rw-r--r--mysql-test/t/lock_multi.test1
-rw-r--r--mysql-test/t/lowercase_fs_off.test1
-rw-r--r--mysql-test/t/mix_innodb_myisam_binlog.test22
-rw-r--r--mysql-test/t/myisam.test69
-rw-r--r--mysql-test/t/mysql.test43
-rw-r--r--mysql-test/t/mysql_delimiter.sql10
-rwxr-xr-xmysql-test/t/mysql_delimiter_19799.sql1
-rw-r--r--mysql-test/t/mysql_upgrade.test23
-rw-r--r--mysql-test/t/mysqladmin.test34
-rw-r--r--mysql-test/t/mysqlbinlog.test42
-rw-r--r--mysql-test/t/mysqldump.test44
-rw-r--r--mysql-test/t/mysqltest.test43
-rw-r--r--mysql-test/t/ndb_basic.test19
-rw-r--r--mysql-test/t/ndb_index_ordered.test12
-rw-r--r--mysql-test/t/ndb_index_unique.test23
-rw-r--r--mysql-test/t/ndb_lock.test49
-rw-r--r--mysql-test/t/ndb_read_multi_range.test15
-rw-r--r--mysql-test/t/ndb_types.test10
-rw-r--r--mysql-test/t/ndb_update.test5
-rw-r--r--mysql-test/t/order_by.test17
-rw-r--r--mysql-test/t/ps.test236
-rw-r--r--mysql-test/t/query_cache_notembedded.test4
-rw-r--r--mysql-test/t/range.test4
-rw-r--r--mysql-test/t/read_only.test12
-rw-r--r--mysql-test/t/rpl000015.test4
-rw-r--r--mysql-test/t/rpl000017.test2
-rw-r--r--mysql-test/t/rpl_charset_sjis.test25
-rw-r--r--mysql-test/t/rpl_deadlock.test3
-rw-r--r--mysql-test/t/rpl_do_grant.test16
-rw-r--r--mysql-test/t/rpl_drop_db.test7
-rw-r--r--mysql-test/t/rpl_ignore_revoke.test4
-rw-r--r--mysql-test/t/rpl_init_slave.test6
-rw-r--r--mysql-test/t/rpl_locale.test24
-rw-r--r--mysql-test/t/rpl_max_relay_size.test5
-rw-r--r--mysql-test/t/rpl_rotate_logs.test10
-rw-r--r--mysql-test/t/rpl_sp.test62
-rw-r--r--mysql-test/t/rpl_timezone.test7
-rw-r--r--mysql-test/t/rpl_variables.test6
-rw-r--r--mysql-test/t/select.test33
-rw-r--r--mysql-test/t/sp-error.test32
-rw-r--r--mysql-test/t/sp.test129
-rw-r--r--mysql-test/t/status.test3
-rw-r--r--mysql-test/t/subselect.test12
-rw-r--r--mysql-test/t/symlink.test41
-rw-r--r--mysql-test/t/system_mysql_db_fix30020-master.opt (renamed from mysql-test/t/system_mysql_db_fix-master.opt)0
-rw-r--r--mysql-test/t/system_mysql_db_fix30020.test (renamed from mysql-test/t/system_mysql_db_fix.test)6
-rw-r--r--mysql-test/t/system_mysql_db_fix40123-master.opt1
-rw-r--r--mysql-test/t/system_mysql_db_fix40123.test79
-rw-r--r--mysql-test/t/trigger.test15
-rw-r--r--mysql-test/t/type_binary.test8
-rw-r--r--mysql-test/t/type_bit.test11
-rw-r--r--mysql-test/t/type_varchar.test10
-rw-r--r--mysql-test/t/udf.test54
-rw-r--r--mysql-test/t/user_var.test5
-rw-r--r--mysql-test/t/varbinary.test47
-rw-r--r--mysql-test/t/variables.test44
-rw-r--r--mysql-test/t/view_grant.test126
-rw-r--r--mysql-test/t/windows.test9
-rwxr-xr-xmysys/CMakeLists.txt18
-rw-r--r--mysys/Makefile.am7
-rw-r--r--mysys/array.c3
-rw-r--r--mysys/base64.c5
-rw-r--r--mysys/charset-def.c3
-rw-r--r--mysys/charset.c3
-rw-r--r--mysys/checksum.c3
-rw-r--r--mysys/default.c13
-rw-r--r--mysys/default_modify.c3
-rw-r--r--mysys/errors.c3
-rw-r--r--mysys/hash.c3
-rw-r--r--mysys/list.c3
-rw-r--r--mysys/make-conf.c3
-rw-r--r--mysys/md5.c3
-rw-r--r--mysys/mf_brkhant.c3
-rw-r--r--mysys/mf_cache.c3
-rw-r--r--mysys/mf_dirname.c3
-rw-r--r--mysys/mf_fn_ext.c3
-rw-r--r--mysys/mf_format.c3
-rw-r--r--mysys/mf_getdate.c3
-rw-r--r--mysys/mf_iocache.c10
-rw-r--r--mysys/mf_iocache2.c3
-rw-r--r--mysys/mf_keycache.c3
-rw-r--r--mysys/mf_keycaches.c3
-rw-r--r--mysys/mf_loadpath.c3
-rw-r--r--mysys/mf_pack.c3
-rw-r--r--mysys/mf_path.c3
-rw-r--r--mysys/mf_qsort.c3
-rw-r--r--mysys/mf_qsort2.c3
-rw-r--r--mysys/mf_radix.c3
-rw-r--r--mysys/mf_same.c3
-rw-r--r--mysys/mf_sort.c3
-rw-r--r--mysys/mf_soundex.c3
-rw-r--r--mysys/mf_strip.c3
-rw-r--r--mysys/mf_tempdir.c3
-rw-r--r--mysys/mf_tempfile.c3
-rw-r--r--mysys/mf_unixpath.c3
-rw-r--r--mysys/mf_util.c3
-rw-r--r--mysys/mf_wcomp.c3
-rw-r--r--mysys/mf_wfile.c3
-rw-r--r--mysys/mulalloc.c3
-rw-r--r--mysys/my_access.c3
-rw-r--r--mysys/my_aes.c5
-rw-r--r--mysys/my_alarm.c3
-rw-r--r--mysys/my_alloc.c3
-rw-r--r--mysys/my_append.c3
-rw-r--r--mysys/my_bit.c3
-rw-r--r--mysys/my_bitmap.c3
-rw-r--r--mysys/my_chsize.c3
-rw-r--r--mysys/my_clock.c3
-rw-r--r--mysys/my_compress.c3
-rw-r--r--mysys/my_conio.c3
-rw-r--r--mysys/my_copy.c3
-rw-r--r--mysys/my_crc32.c3
-rw-r--r--mysys/my_create.c3
-rw-r--r--mysys/my_delete.c3
-rw-r--r--mysys/my_div.c3
-rw-r--r--mysys/my_dup.c3
-rw-r--r--mysys/my_error.c3
-rw-r--r--mysys/my_file.c3
-rw-r--r--mysys/my_fopen.c3
-rw-r--r--mysys/my_fstream.c3
-rw-r--r--mysys/my_gethostbyname.c6
-rw-r--r--mysys/my_gethwaddr.c5
-rw-r--r--mysys/my_getopt.c12
-rw-r--r--mysys/my_getpagesize.c40
-rw-r--r--mysys/my_getsystime.c5
-rw-r--r--mysys/my_getwd.c3
-rw-r--r--mysys/my_handler.c6
-rw-r--r--mysys/my_init.c3
-rw-r--r--mysys/my_largepage.c3
-rw-r--r--mysys/my_lib.c3
-rw-r--r--mysys/my_libwrap.c3
-rw-r--r--mysys/my_lock.c3
-rw-r--r--mysys/my_lockmem.c3
-rw-r--r--mysys/my_lread.c3
-rw-r--r--mysys/my_lwrite.c3
-rw-r--r--mysys/my_malloc.c3
-rw-r--r--mysys/my_messnc.c3
-rw-r--r--mysys/my_mkdir.c3
-rw-r--r--mysys/my_mmap.c10
-rw-r--r--mysys/my_net.c3
-rw-r--r--mysys/my_netware.c3
-rw-r--r--mysys/my_new.cc3
-rw-r--r--mysys/my_once.c3
-rw-r--r--mysys/my_open.c3
-rw-r--r--mysys/my_os2cond.c4
-rw-r--r--mysys/my_os2dirsrch.c4
-rw-r--r--mysys/my_os2dirsrch.h4
-rw-r--r--mysys/my_os2dlfcn.c4
-rw-r--r--mysys/my_os2dlfcn.h04
-rw-r--r--mysys/my_os2file64.c4
-rw-r--r--mysys/my_os2thread.c4
-rw-r--r--mysys/my_os2tls.c4
-rw-r--r--mysys/my_port.c6
-rw-r--r--mysys/my_pread.c3
-rw-r--r--mysys/my_pthread.c3
-rw-r--r--mysys/my_quick.c3
-rw-r--r--mysys/my_read.c3
-rw-r--r--mysys/my_realloc.c3
-rw-r--r--mysys/my_redel.c3
-rw-r--r--mysys/my_rename.c3
-rw-r--r--mysys/my_seek.c3
-rw-r--r--mysys/my_semaphore.c5
-rw-r--r--mysys/my_sleep.c3
-rw-r--r--mysys/my_static.c3
-rw-r--r--mysys/my_static.h3
-rw-r--r--mysys/my_symlink.c3
-rw-r--r--mysys/my_symlink2.c3
-rw-r--r--mysys/my_sync.c3
-rw-r--r--mysys/my_thr_init.c139
-rw-r--r--mysys/my_wincond.c38
-rw-r--r--mysys/my_windac.c3
-rw-r--r--mysys/my_winthread.c3
-rw-r--r--mysys/my_write.c3
-rw-r--r--mysys/mysys_priv.h3
-rw-r--r--mysys/ptr_cmp.c3
-rw-r--r--mysys/queues.c3
-rw-r--r--mysys/raid.cc3
-rw-r--r--mysys/raid2.c4
-rw-r--r--mysys/rijndael.c5
-rw-r--r--mysys/safemalloc.c3
-rw-r--r--mysys/sha1.c5
-rw-r--r--mysys/string.c53
-rw-r--r--mysys/test_charset.c3
-rw-r--r--mysys/test_dir.c3
-rw-r--r--mysys/test_fn.c3
-rw-r--r--mysys/test_xml.c3
-rw-r--r--mysys/testhash.c3
-rw-r--r--mysys/thr_alarm.c3
-rw-r--r--mysys/thr_lock.c15
-rw-r--r--mysys/thr_mutex.c3
-rw-r--r--mysys/thr_rwlock.c3
-rw-r--r--mysys/tree.c7
-rw-r--r--mysys/typelib.c54
-rw-r--r--ndb/Makefile.am18
-rw-r--r--ndb/config/common.mk.am15
-rw-r--r--ndb/config/type_kernel.mk.am14
-rw-r--r--ndb/config/type_mgmapiclient.mk.am14
-rw-r--r--ndb/config/type_ndbapi.mk.am14
-rw-r--r--ndb/config/type_ndbapiclient.mk.am14
-rw-r--r--ndb/config/type_ndbapitest.mk.am14
-rw-r--r--ndb/config/type_ndbapitools.mk.am14
-rw-r--r--ndb/config/type_util.mk.am14
-rw-r--r--ndb/docs/Makefile.am18
-rw-r--r--ndb/include/Makefile.am14
-rw-r--r--ndb/include/debugger/DebuggerNames.hpp3
-rw-r--r--ndb/include/debugger/EventLogger.hpp3
-rw-r--r--ndb/include/debugger/GrepError.hpp3
-rw-r--r--ndb/include/debugger/SignalLoggerManager.hpp3
-rw-r--r--ndb/include/editline/editline.h3
-rw-r--r--ndb/include/kernel/AttributeDescriptor.hpp3
-rw-r--r--ndb/include/kernel/AttributeHeader.hpp3
-rw-r--r--ndb/include/kernel/AttributeList.hpp3
-rw-r--r--ndb/include/kernel/BlockNumbers.h3
-rw-r--r--ndb/include/kernel/GlobalSignalNumbers.h3
-rw-r--r--ndb/include/kernel/GrepEvent.hpp3
-rw-r--r--ndb/include/kernel/Interpreter.hpp3
-rw-r--r--ndb/include/kernel/LogLevel.hpp3
-rw-r--r--ndb/include/kernel/NodeBitmask.hpp3
-rw-r--r--ndb/include/kernel/NodeInfo.hpp3
-rw-r--r--ndb/include/kernel/NodeState.hpp3
-rw-r--r--ndb/include/kernel/RefConvert.hpp3
-rw-r--r--ndb/include/kernel/kernel_config_parameters.h15
-rw-r--r--ndb/include/kernel/kernel_types.h3
-rw-r--r--ndb/include/kernel/ndb_limits.h3
-rw-r--r--ndb/include/kernel/signaldata/AbortAll.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AccFrag.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AccLock.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AccScan.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AccSizeAltReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AlterIndx.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AlterTab.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AlterTable.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AlterTrig.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ApiBroadcast.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ApiRegSignalData.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ApiVersion.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ArbitSignalData.hpp3
-rw-r--r--ndb/include/kernel/signaldata/AttrInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/BackupContinueB.hpp3
-rw-r--r--ndb/include/kernel/signaldata/BackupImpl.hpp3
-rw-r--r--ndb/include/kernel/signaldata/BackupSignalData.hpp3
-rw-r--r--ndb/include/kernel/signaldata/BlockCommitOrd.hpp3
-rw-r--r--ndb/include/kernel/signaldata/BuildIndx.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CheckNodeGroups.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CloseComReqConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CmInit.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CmRegSignalData.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CmvmiCfgConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CntrMasterConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CntrMasterReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CntrStart.hpp15
-rw-r--r--ndb/include/kernel/signaldata/ConfigParamId.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ContinueFragmented.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CopyActive.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CopyFrag.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CopyGCIReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CreateEvnt.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CreateFrag.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CreateFragmentation.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CreateIndx.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CreateTab.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CreateTable.hpp3
-rw-r--r--ndb/include/kernel/signaldata/CreateTrig.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DiAddTab.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DiGetNodes.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DictLock.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DictSchemaInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DictSizeAltReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DictStart.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DictTabInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DihAddFrag.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DihContinueB.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DihSizeAltReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DihStartTab.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DihSwitchReplica.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DisconnectRep.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DropIndx.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DropTab.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DropTabFile.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DropTable.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DropTrig.hpp3
-rw-r--r--ndb/include/kernel/signaldata/DumpStateOrd.hpp4
-rw-r--r--ndb/include/kernel/signaldata/EmptyLcp.hpp3
-rw-r--r--ndb/include/kernel/signaldata/EndTo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/EventReport.hpp3
-rw-r--r--ndb/include/kernel/signaldata/EventSubscribeReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ExecFragReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FailRep.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FireTrigOrd.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FsAppendReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FsCloseReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FsConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FsOpenReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FsReadWriteReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FsRef.hpp3
-rw-r--r--ndb/include/kernel/signaldata/FsRemoveReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/GCPSave.hpp3
-rw-r--r--ndb/include/kernel/signaldata/GetTabInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/GetTableId.hpp3
-rw-r--r--ndb/include/kernel/signaldata/GrepImpl.hpp3
-rw-r--r--ndb/include/kernel/signaldata/HotSpareRep.hpp3
-rwxr-xr-xndb/include/kernel/signaldata/IndxAttrInfo.hpp3
-rwxr-xr-xndb/include/kernel/signaldata/IndxKeyInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/KeyInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/LCP.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ListTables.hpp3
-rw-r--r--ndb/include/kernel/signaldata/LqhFrag.hpp3
-rw-r--r--ndb/include/kernel/signaldata/LqhKey.hpp3
-rw-r--r--ndb/include/kernel/signaldata/LqhSizeAltReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/LqhTransConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ManagementServer.hpp3
-rw-r--r--ndb/include/kernel/signaldata/MasterGCP.hpp3
-rw-r--r--ndb/include/kernel/signaldata/MasterLCP.hpp3
-rw-r--r--ndb/include/kernel/signaldata/NFCompleteRep.hpp3
-rw-r--r--ndb/include/kernel/signaldata/NdbSttor.hpp3
-rw-r--r--ndb/include/kernel/signaldata/NdbfsContinueB.hpp3
-rw-r--r--ndb/include/kernel/signaldata/NextScan.hpp3
-rw-r--r--ndb/include/kernel/signaldata/NodeFailRep.hpp3
-rw-r--r--ndb/include/kernel/signaldata/NodeStateSignalData.hpp3
-rw-r--r--ndb/include/kernel/signaldata/PackedSignal.hpp3
-rw-r--r--ndb/include/kernel/signaldata/PrepDropTab.hpp3
-rw-r--r--ndb/include/kernel/signaldata/PrepFailReqRef.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ReadConfig.hpp15
-rw-r--r--ndb/include/kernel/signaldata/ReadNodesConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/RelTabMem.hpp3
-rw-r--r--ndb/include/kernel/signaldata/RepImpl.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ResumeReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ScanFrag.hpp3
-rw-r--r--ndb/include/kernel/signaldata/ScanTab.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SetLogLevelOrd.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SetVarReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SignalData.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SignalDataPrint.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SignalDroppedRep.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SrFragidConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StartFragReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StartInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StartMe.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StartOrd.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StartPerm.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StartRec.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StartTo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StopMe.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StopPerm.hpp3
-rw-r--r--ndb/include/kernel/signaldata/StopReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SumaImpl.hpp3
-rw-r--r--ndb/include/kernel/signaldata/SystemError.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TamperOrd.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcCommit.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcContinueB.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcHbRep.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcIndx.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcKeyConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcKeyFailConf.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcKeyRef.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcKeyReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcRollbackRep.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TcSizeAltReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TestOrd.hpp3
-rwxr-xr-xndb/include/kernel/signaldata/TransIdAI.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TrigAttrInfo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TupCommit.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TupFrag.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TupKey.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TupSizeAltReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TuxBound.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TuxContinueB.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TuxMaint.hpp3
-rw-r--r--ndb/include/kernel/signaldata/TuxSizeAltReq.hpp3
-rw-r--r--ndb/include/kernel/signaldata/UpdateTo.hpp3
-rw-r--r--ndb/include/kernel/signaldata/UpgradeStartup.hpp15
-rw-r--r--ndb/include/kernel/signaldata/UtilDelete.hpp3
-rw-r--r--ndb/include/kernel/signaldata/UtilExecute.hpp3
-rw-r--r--ndb/include/kernel/signaldata/UtilLock.hpp3
-rw-r--r--ndb/include/kernel/signaldata/UtilPrepare.hpp3
-rw-r--r--ndb/include/kernel/signaldata/UtilRelease.hpp3
-rw-r--r--ndb/include/kernel/signaldata/UtilSequence.hpp3
-rw-r--r--ndb/include/kernel/signaldata/WaitGCP.hpp3
-rw-r--r--ndb/include/kernel/trigger_definitions.h3
-rw-r--r--ndb/include/logger/ConsoleLogHandler.hpp3
-rw-r--r--ndb/include/logger/FileLogHandler.hpp5
-rw-r--r--ndb/include/logger/LogHandler.hpp3
-rw-r--r--ndb/include/logger/Logger.hpp3
-rw-r--r--ndb/include/logger/SysLogHandler.hpp3
-rw-r--r--ndb/include/mgmapi/mgmapi.h13
-rw-r--r--ndb/include/mgmapi/mgmapi_config_parameters.h15
-rw-r--r--ndb/include/mgmapi/mgmapi_config_parameters_debug.h15
-rw-r--r--ndb/include/mgmapi/mgmapi_debug.h3
-rw-r--r--ndb/include/mgmapi/ndb_logevent.h3
-rw-r--r--ndb/include/mgmapi/ndbd_exit_codes.h3
-rw-r--r--ndb/include/mgmcommon/ConfigRetriever.hpp3
-rw-r--r--ndb/include/mgmcommon/IPCConfig.hpp3
-rw-r--r--ndb/include/mgmcommon/MgmtErrorReporter.hpp3
-rw-r--r--ndb/include/ndb_constants.h3
-rw-r--r--ndb/include/ndb_global.h.in3
-rw-r--r--ndb/include/ndb_init.h3
-rw-r--r--ndb/include/ndb_net.h14
-rw-r--r--ndb/include/ndb_types.h.in3
-rw-r--r--ndb/include/ndb_version.h.in3
-rw-r--r--ndb/include/ndbapi/Ndb.hpp3
-rw-r--r--ndb/include/ndbapi/NdbApi.hpp3
-rw-r--r--ndb/include/ndbapi/NdbBlob.hpp3
-rw-r--r--ndb/include/ndbapi/NdbDictionary.hpp3
-rw-r--r--ndb/include/ndbapi/NdbError.hpp3
-rw-r--r--ndb/include/ndbapi/NdbEventOperation.hpp3
-rw-r--r--ndb/include/ndbapi/NdbIndexOperation.hpp3
-rw-r--r--ndb/include/ndbapi/NdbIndexScanOperation.hpp3
-rw-r--r--ndb/include/ndbapi/NdbOperation.hpp3
-rw-r--r--ndb/include/ndbapi/NdbPool.hpp3
-rw-r--r--ndb/include/ndbapi/NdbRecAttr.hpp3
-rw-r--r--ndb/include/ndbapi/NdbReceiver.hpp3
-rw-r--r--ndb/include/ndbapi/NdbScanFilter.hpp3
-rw-r--r--ndb/include/ndbapi/NdbScanOperation.hpp3
-rw-r--r--ndb/include/ndbapi/NdbTransaction.hpp3
-rw-r--r--ndb/include/ndbapi/ndb_cluster_connection.hpp3
-rw-r--r--ndb/include/ndbapi/ndb_opt_defaults.h3
-rw-r--r--ndb/include/ndbapi/ndbapi_limits.h3
-rw-r--r--ndb/include/ndbapi/ndberror.h5
-rw-r--r--ndb/include/newtonapi/dba.h3
-rw-r--r--ndb/include/newtonapi/defs/pcn_types.h3
-rw-r--r--ndb/include/portlib/NdbCondition.h3
-rw-r--r--ndb/include/portlib/NdbConfig.h3
-rw-r--r--ndb/include/portlib/NdbDaemon.h3
-rw-r--r--ndb/include/portlib/NdbEnv.h3
-rw-r--r--ndb/include/portlib/NdbHost.h3
-rw-r--r--ndb/include/portlib/NdbMain.h3
-rw-r--r--ndb/include/portlib/NdbMem.h5
-rw-r--r--ndb/include/portlib/NdbMutex.h3
-rw-r--r--ndb/include/portlib/NdbSleep.h3
-rw-r--r--ndb/include/portlib/NdbTCP.h3
-rw-r--r--ndb/include/portlib/NdbThread.h3
-rw-r--r--ndb/include/portlib/NdbTick.h3
-rw-r--r--ndb/include/portlib/PortDefs.h3
-rw-r--r--ndb/include/portlib/prefetch.h3
-rw-r--r--ndb/include/transporter/TransporterCallback.hpp3
-rw-r--r--ndb/include/transporter/TransporterDefinitions.hpp3
-rw-r--r--ndb/include/transporter/TransporterRegistry.hpp3
-rw-r--r--ndb/include/util/BaseString.hpp3
-rw-r--r--ndb/include/util/Bitmask.hpp3
-rw-r--r--ndb/include/util/ConfigValues.hpp15
-rw-r--r--ndb/include/util/File.hpp7
-rw-r--r--ndb/include/util/InputStream.hpp3
-rw-r--r--ndb/include/util/NdbAutoPtr.hpp3
-rw-r--r--ndb/include/util/NdbOut.hpp3
-rw-r--r--ndb/include/util/NdbSqlUtil.hpp3
-rw-r--r--ndb/include/util/OutputStream.hpp3
-rw-r--r--ndb/include/util/Parser.hpp3
-rw-r--r--ndb/include/util/Properties.hpp3
-rw-r--r--ndb/include/util/SimpleProperties.hpp3
-rw-r--r--ndb/include/util/SocketAuthenticator.hpp3
-rw-r--r--ndb/include/util/SocketClient.hpp7
-rw-r--r--ndb/include/util/SocketServer.hpp3
-rw-r--r--ndb/include/util/UtilBuffer.hpp3
-rw-r--r--ndb/include/util/Vector.hpp5
-rw-r--r--ndb/include/util/basestring_vsnprintf.h3
-rw-r--r--ndb/include/util/md5_hash.hpp3
-rw-r--r--ndb/include/util/ndb_opts.h3
-rw-r--r--ndb/include/util/random.h3
-rw-r--r--ndb/include/util/socket_io.h3
-rw-r--r--ndb/include/util/uucode.h3
-rw-r--r--ndb/include/util/version.h3
-rw-r--r--ndb/ndbapi-examples/mgmapi_logevent_example/mgmapi_logevent.cpp3
-rw-r--r--ndb/ndbapi-examples/ndbapi_async_example/ndbapi_async.cpp3
-rw-r--r--ndb/ndbapi-examples/ndbapi_async_example1/ndbapi_async1.cpp3
-rw-r--r--ndb/ndbapi-examples/ndbapi_event_example/ndbapi_event.cpp3
-rw-r--r--ndb/ndbapi-examples/ndbapi_retries_example/ndbapi_retries.cpp3
-rw-r--r--ndb/ndbapi-examples/ndbapi_scan_example/ndbapi_scan.cpp3
-rw-r--r--ndb/ndbapi-examples/ndbapi_simple_example/ndbapi_simple.cpp3
-rw-r--r--ndb/ndbapi-examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp3
-rw-r--r--ndb/src/Makefile.am18
-rw-r--r--ndb/src/common/Makefile.am18
-rw-r--r--ndb/src/common/debugger/BlockNames.cpp3
-rw-r--r--ndb/src/common/debugger/DebuggerNames.cpp3
-rw-r--r--ndb/src/common/debugger/EventLogger.cpp6
-rw-r--r--ndb/src/common/debugger/GrepError.cpp3
-rw-r--r--ndb/src/common/debugger/Makefile.am15
-rw-r--r--ndb/src/common/debugger/SignalLoggerManager.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/AccLock.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/AlterIndx.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/AlterTab.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/AlterTable.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/AlterTrig.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/BackupImpl.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/BackupSignalData.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/CloseComReqConf.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/CntrStart.cpp15
-rw-r--r--ndb/src/common/debugger/signaldata/ContinueB.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/CopyGCI.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/CreateEvnt.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/CreateFragmentation.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/CreateIndx.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/CreateTrig.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/DictTabInfo.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/DihContinueB.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/DisconnectRep.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/DropIndx.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/DropTab.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/DropTrig.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FailRep.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FireTrigOrd.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FsAppendReq.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FsCloseReq.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FsConf.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FsOpenReq.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/FsRef.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/GCPSave.cpp3
-rwxr-xr-xndb/src/common/debugger/signaldata/IndxAttrInfo.cpp3
-rwxr-xr-xndb/src/common/debugger/signaldata/IndxKeyInfo.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/LCP.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/LqhFrag.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/LqhKey.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/LqhTrans.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/Makefile.am14
-rw-r--r--ndb/src/common/debugger/signaldata/MasterLCP.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/NFCompleteRep.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/NdbSttor.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/PackedSignal.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/PrepDropTab.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/ReadNodesConf.cpp15
-rw-r--r--ndb/src/common/debugger/signaldata/ScanFrag.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/ScanTab.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/SignalDataPrint.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/SignalNames.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/StartRec.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/SumaImpl.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/SystemError.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TcIndx.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TcKeyConf.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TcKeyRef.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TcKeyReq.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TcRollbackRep.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TupCommit.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TupKey.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/TuxMaint.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/UtilDelete.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/UtilExecute.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/UtilLock.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/UtilPrepare.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/UtilSequence.cpp3
-rw-r--r--ndb/src/common/debugger/signaldata/print.awk15
-rw-r--r--ndb/src/common/logger/ConsoleLogHandler.cpp3
-rw-r--r--ndb/src/common/logger/FileLogHandler.cpp5
-rw-r--r--ndb/src/common/logger/LogHandler.cpp3
-rw-r--r--ndb/src/common/logger/LogHandlerList.cpp3
-rw-r--r--ndb/src/common/logger/LogHandlerList.hpp3
-rw-r--r--ndb/src/common/logger/Logger.cpp3
-rw-r--r--ndb/src/common/logger/Makefile.am14
-rw-r--r--ndb/src/common/logger/SysLogHandler.cpp3
-rw-r--r--ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp3
-rw-r--r--ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp3
-rw-r--r--ndb/src/common/logger/loggertest/LoggerUnitTest.cpp3
-rw-r--r--ndb/src/common/logger/loggertest/LoggerUnitTest.hpp3
-rw-r--r--ndb/src/common/mgmcommon/ConfigRetriever.cpp3
-rw-r--r--ndb/src/common/mgmcommon/IPCConfig.cpp3
-rw-r--r--ndb/src/common/mgmcommon/Makefile.am15
-rw-r--r--ndb/src/common/mgmcommon/printConfig/printConfig.cpp3
-rw-r--r--ndb/src/common/portlib/Makefile.am18
-rw-r--r--ndb/src/common/portlib/NdbCondition.c3
-rw-r--r--ndb/src/common/portlib/NdbConfig.c3
-rw-r--r--ndb/src/common/portlib/NdbDaemon.c3
-rw-r--r--ndb/src/common/portlib/NdbEnv.c3
-rw-r--r--ndb/src/common/portlib/NdbHost.c3
-rw-r--r--ndb/src/common/portlib/NdbMem.c13
-rw-r--r--ndb/src/common/portlib/NdbMutex.c3
-rw-r--r--ndb/src/common/portlib/NdbPortLibTest.cpp3
-rw-r--r--ndb/src/common/portlib/NdbSleep.c3
-rw-r--r--ndb/src/common/portlib/NdbTCP.cpp3
-rw-r--r--ndb/src/common/portlib/NdbThread.c3
-rw-r--r--ndb/src/common/portlib/NdbTick.c3
-rw-r--r--ndb/src/common/portlib/memtest.c3
-rw-r--r--ndb/src/common/portlib/mmslist.cpp3
-rw-r--r--ndb/src/common/portlib/mmstest.cpp3
-rw-r--r--ndb/src/common/portlib/munmaptest.cpp3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbCondition.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbConditionOSE.h3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbEnv.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbHost.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbMem.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbMem_SoftOse.cpp3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbMutex.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbOut.cpp3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbSleep.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbTCP.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbThread.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/ose/NdbTick.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbCondition.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbDaemon.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbEnv.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbHost.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbMem.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbMutex.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbSleep.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbTCP.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbThread.c3
-rw-r--r--ndb/src/common/portlib/old_dirs/win32/NdbTick.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbCondition.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbDaemon.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbEnv.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbHost.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbMem.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbMutex.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbSleep.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbTCP.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbThread.c3
-rw-r--r--ndb/src/common/portlib/win32/NdbTick.c3
-rw-r--r--ndb/src/common/transporter/Makefile.am14
-rw-r--r--ndb/src/common/transporter/OSE_Receiver.cpp3
-rw-r--r--ndb/src/common/transporter/OSE_Receiver.hpp3
-rw-r--r--ndb/src/common/transporter/OSE_Signals.hpp3
-rw-r--r--ndb/src/common/transporter/OSE_Transporter.cpp3
-rw-r--r--ndb/src/common/transporter/OSE_Transporter.hpp3
-rw-r--r--ndb/src/common/transporter/Packer.cpp3
-rw-r--r--ndb/src/common/transporter/Packer.hpp3
-rw-r--r--ndb/src/common/transporter/SCI_Transporter.cpp3
-rw-r--r--ndb/src/common/transporter/SCI_Transporter.hpp3
-rw-r--r--ndb/src/common/transporter/SHM_Buffer.hpp3
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.cpp3
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.hpp3
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.unix.cpp3
-rw-r--r--ndb/src/common/transporter/SHM_Transporter.win32.cpp3
-rw-r--r--ndb/src/common/transporter/SendBuffer.cpp3
-rw-r--r--ndb/src/common/transporter/SendBuffer.hpp3
-rw-r--r--ndb/src/common/transporter/TCP_Transporter.cpp3
-rw-r--r--ndb/src/common/transporter/TCP_Transporter.hpp3
-rw-r--r--ndb/src/common/transporter/Transporter.cpp11
-rw-r--r--ndb/src/common/transporter/Transporter.hpp3
-rw-r--r--ndb/src/common/transporter/TransporterInternalDefinitions.hpp3
-rw-r--r--ndb/src/common/transporter/TransporterRegistry.cpp3
-rw-r--r--ndb/src/common/transporter/basictest/basicTransporterTest.cpp3
-rw-r--r--ndb/src/common/transporter/buddy.cpp3
-rw-r--r--ndb/src/common/transporter/buddy.hpp3
-rw-r--r--ndb/src/common/transporter/failoverSCI/failoverSCI.cpp3
-rw-r--r--ndb/src/common/transporter/perftest/perfTransporterTest.cpp3
-rw-r--r--ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp3
-rw-r--r--ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp3
-rw-r--r--ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp3
-rw-r--r--ndb/src/common/transporter/priotest/prioTransporterTest.cpp3
-rw-r--r--ndb/src/common/transporter/priotest/prioTransporterTest.hpp3
-rw-r--r--ndb/src/common/util/BaseString.cpp3
-rw-r--r--ndb/src/common/util/Bitmask.cpp15
-rw-r--r--ndb/src/common/util/ConfigValues.cpp218
-rw-r--r--ndb/src/common/util/File.cpp46
-rw-r--r--ndb/src/common/util/InputStream.cpp4
-rw-r--r--ndb/src/common/util/Makefile.am14
-rw-r--r--ndb/src/common/util/NdbErrHnd.cpp3
-rw-r--r--ndb/src/common/util/NdbOut.cpp3
-rw-r--r--ndb/src/common/util/NdbSqlUtil.cpp22
-rw-r--r--ndb/src/common/util/OutputStream.cpp3
-rw-r--r--ndb/src/common/util/Parser.cpp3
-rw-r--r--ndb/src/common/util/Properties.cpp3
-rw-r--r--ndb/src/common/util/SimpleProperties.cpp3
-rw-r--r--ndb/src/common/util/SocketAuthenticator.cpp3
-rw-r--r--ndb/src/common/util/SocketClient.cpp63
-rw-r--r--ndb/src/common/util/SocketServer.cpp3
-rw-r--r--ndb/src/common/util/basestring_vsnprintf.c3
-rw-r--r--ndb/src/common/util/filetest/FileUnitTest.cpp3
-rw-r--r--ndb/src/common/util/filetest/FileUnitTest.hpp3
-rw-r--r--ndb/src/common/util/md5_hash.cpp3
-rw-r--r--ndb/src/common/util/ndb_init.c3
-rw-r--r--ndb/src/common/util/new.cpp14
-rw-r--r--ndb/src/common/util/random.c3
-rw-r--r--ndb/src/common/util/socket_io.cpp90
-rw-r--r--ndb/src/common/util/strdup.c3
-rw-r--r--ndb/src/common/util/testConfigValues/testConfigValues.cpp15
-rw-r--r--ndb/src/common/util/testProperties/testProperties.cpp3
-rw-r--r--ndb/src/common/util/testSimpleProperties/sp_test.cpp3
-rw-r--r--ndb/src/common/util/uucode.c3
-rw-r--r--ndb/src/common/util/version.c3
-rw-r--r--ndb/src/cw/Makefile.am17
-rw-r--r--ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp3
-rw-r--r--ndb/src/cw/cpcc-win32/C++/CPC_GUI.h3
-rw-r--r--ndb/src/cw/cpcc-win32/C++/NdbControls.cpp3
-rw-r--r--ndb/src/cw/cpcc-win32/C++/StdAfx.cpp3
-rw-r--r--ndb/src/cw/cpcc-win32/C++/StdAfx.h3
-rw-r--r--ndb/src/cw/cpcc-win32/C++/TreeView.cpp3
-rw-r--r--ndb/src/cw/cpcc-win32/C++/TreeView.h3
-rw-r--r--ndb/src/cw/cpcc-win32/C++/resource.h3
-rw-r--r--ndb/src/cw/cpcd/APIService.cpp3
-rw-r--r--ndb/src/cw/cpcd/APIService.hpp3
-rw-r--r--ndb/src/cw/cpcd/CPCD.cpp3
-rw-r--r--ndb/src/cw/cpcd/CPCD.hpp3
-rw-r--r--ndb/src/cw/cpcd/Makefile.am14
-rw-r--r--ndb/src/cw/cpcd/Monitor.cpp3
-rw-r--r--ndb/src/cw/cpcd/Process.cpp3
-rw-r--r--ndb/src/cw/cpcd/common.cpp3
-rw-r--r--ndb/src/cw/cpcd/common.hpp3
-rw-r--r--ndb/src/cw/cpcd/main.cpp3
-rw-r--r--ndb/src/cw/test/socketclient/socketClientTest.cpp3
-rw-r--r--ndb/src/cw/util/ClientInterface.cpp3
-rw-r--r--ndb/src/cw/util/ClientInterface.hpp3
-rw-r--r--ndb/src/cw/util/SocketRegistry.cpp3
-rw-r--r--ndb/src/cw/util/SocketRegistry.hpp3
-rw-r--r--ndb/src/cw/util/SocketService.cpp3
-rw-r--r--ndb/src/cw/util/SocketService.hpp3
-rw-r--r--ndb/src/kernel/Makefile.am15
-rw-r--r--ndb/src/kernel/SimBlockList.cpp3
-rw-r--r--ndb/src/kernel/blocks/ERROR_codes.txt10
-rw-r--r--ndb/src/kernel/blocks/Makefile.am18
-rw-r--r--ndb/src/kernel/blocks/backup/Backup.cpp3
-rw-r--r--ndb/src/kernel/blocks/backup/Backup.hpp3
-rw-r--r--ndb/src/kernel/blocks/backup/BackupFormat.hpp3
-rw-r--r--ndb/src/kernel/blocks/backup/BackupInit.cpp3
-rw-r--r--ndb/src/kernel/blocks/backup/FsBuffer.hpp3
-rw-r--r--ndb/src/kernel/blocks/backup/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/backup/read.cpp3
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp63
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp6
-rw-r--r--ndb/src/kernel/blocks/cmvmi/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbacc/Dbacc.hpp3
-rw-r--r--ndb/src/kernel/blocks/dbacc/DbaccInit.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbacc/DbaccMain.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbacc/Makefile.am14
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.cpp12
-rw-r--r--ndb/src/kernel/blocks/dbdict/Dbdict.hpp3
-rw-r--r--ndb/src/kernel/blocks/dbdict/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/dbdict/Master_AddTable.sfl15
-rw-r--r--ndb/src/kernel/blocks/dbdict/SchemaFile.hpp3
-rw-r--r--ndb/src/kernel/blocks/dbdict/Slave_AddTable.sfl19
-rw-r--r--ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbdih/Dbdih.hpp5
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihInit.cpp6
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihMain.cpp8
-rw-r--r--ndb/src/kernel/blocks/dbdih/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/dbdih/Sysfile.hpp3
-rw-r--r--ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp3
-rw-r--r--ndb/src/kernel/blocks/dblqh/Dblqh.hpp5
-rw-r--r--ndb/src/kernel/blocks/dblqh/DblqhInit.cpp3
-rw-r--r--ndb/src/kernel/blocks/dblqh/DblqhMain.cpp47
-rw-r--r--ndb/src/kernel/blocks/dblqh/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp3
-rw-r--r--ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp3
-rw-r--r--ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtc/Dbtc.hpp8
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcInit.cpp6
-rw-r--r--ndb/src/kernel/blocks/dbtc/DbtcMain.cpp94
-rw-r--r--ndb/src/kernel/blocks/dbtc/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/Dbtup.hpp4
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp8
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp13
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupGen.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupLCP.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupScan.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupUndoLog.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtup/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/dbtux/Dbtux.hpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbtux/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/dbutil/DbUtil.cpp3
-rw-r--r--ndb/src/kernel/blocks/dbutil/DbUtil.hpp3
-rw-r--r--ndb/src/kernel/blocks/dbutil/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/mutexes.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Filename.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Filename.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/MemoryChannelOSE.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/Pool.hpp3
-rw-r--r--ndb/src/kernel/blocks/ndbfs/VoidFs.cpp3
-rw-r--r--ndb/src/kernel/blocks/qmgr/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/qmgr/Qmgr.hpp7
-rw-r--r--ndb/src/kernel/blocks/qmgr/QmgrInit.cpp3
-rw-r--r--ndb/src/kernel/blocks/qmgr/QmgrMain.cpp96
-rw-r--r--ndb/src/kernel/blocks/qmgr/timer.hpp3
-rw-r--r--ndb/src/kernel/blocks/suma/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/suma/Suma.cpp3
-rw-r--r--ndb/src/kernel/blocks/suma/Suma.hpp3
-rw-r--r--ndb/src/kernel/blocks/suma/SumaInit.cpp3
-rw-r--r--ndb/src/kernel/blocks/trix/Makefile.am15
-rw-r--r--ndb/src/kernel/blocks/trix/Trix.cpp3
-rw-r--r--ndb/src/kernel/blocks/trix/Trix.hpp3
-rw-r--r--ndb/src/kernel/error/ErrorHandlingMacros.hpp3
-rw-r--r--ndb/src/kernel/error/ErrorReporter.cpp3
-rw-r--r--ndb/src/kernel/error/ErrorReporter.hpp3
-rw-r--r--ndb/src/kernel/error/Makefile.am15
-rw-r--r--ndb/src/kernel/error/TimeModule.cpp3
-rw-r--r--ndb/src/kernel/error/TimeModule.hpp3
-rw-r--r--ndb/src/kernel/error/ndbd_exit_codes.c3
-rw-r--r--ndb/src/kernel/main.cpp3
-rw-r--r--ndb/src/kernel/vm/Array.hpp3
-rw-r--r--ndb/src/kernel/vm/ArrayFifoList.hpp3
-rw-r--r--ndb/src/kernel/vm/ArrayList.hpp3
-rw-r--r--ndb/src/kernel/vm/ArrayPool.hpp3
-rw-r--r--ndb/src/kernel/vm/CArray.hpp3
-rw-r--r--ndb/src/kernel/vm/Callback.hpp3
-rw-r--r--ndb/src/kernel/vm/ClusterConfiguration.cpp3
-rw-r--r--ndb/src/kernel/vm/ClusterConfiguration.hpp3
-rw-r--r--ndb/src/kernel/vm/Configuration.cpp5
-rw-r--r--ndb/src/kernel/vm/Configuration.hpp5
-rw-r--r--ndb/src/kernel/vm/DLFifoList.hpp3
-rw-r--r--ndb/src/kernel/vm/DLHashTable.hpp3
-rw-r--r--ndb/src/kernel/vm/DLHashTable2.hpp3
-rw-r--r--ndb/src/kernel/vm/DLList.hpp3
-rw-r--r--ndb/src/kernel/vm/DataBuffer.hpp3
-rw-r--r--ndb/src/kernel/vm/Emulator.cpp3
-rw-r--r--ndb/src/kernel/vm/Emulator.hpp3
-rw-r--r--ndb/src/kernel/vm/FastScheduler.cpp3
-rw-r--r--ndb/src/kernel/vm/FastScheduler.hpp3
-rw-r--r--ndb/src/kernel/vm/GlobalData.hpp3
-rw-r--r--ndb/src/kernel/vm/KeyDescriptor.hpp3
-rw-r--r--ndb/src/kernel/vm/KeyTable.hpp3
-rw-r--r--ndb/src/kernel/vm/KeyTable2.hpp3
-rw-r--r--ndb/src/kernel/vm/LongSignal.hpp3
-rw-r--r--ndb/src/kernel/vm/Makefile.am15
-rw-r--r--ndb/src/kernel/vm/MetaData.cpp3
-rw-r--r--ndb/src/kernel/vm/MetaData.hpp3
-rw-r--r--ndb/src/kernel/vm/Mutex.cpp3
-rw-r--r--ndb/src/kernel/vm/Mutex.hpp3
-rw-r--r--ndb/src/kernel/vm/Prio.hpp3
-rw-r--r--ndb/src/kernel/vm/RequestTracker.hpp3
-rw-r--r--ndb/src/kernel/vm/SLList.hpp3
-rw-r--r--ndb/src/kernel/vm/SafeCounter.cpp3
-rw-r--r--ndb/src/kernel/vm/SafeCounter.hpp3
-rw-r--r--ndb/src/kernel/vm/SectionReader.cpp3
-rw-r--r--ndb/src/kernel/vm/SectionReader.hpp3
-rw-r--r--ndb/src/kernel/vm/SignalCounter.hpp3
-rw-r--r--ndb/src/kernel/vm/SimBlockList.hpp3
-rw-r--r--ndb/src/kernel/vm/SimplePropertiesSection.cpp3
-rw-r--r--ndb/src/kernel/vm/SimulatedBlock.cpp26
-rw-r--r--ndb/src/kernel/vm/SimulatedBlock.hpp4
-rw-r--r--ndb/src/kernel/vm/SuperPool.cpp3
-rw-r--r--ndb/src/kernel/vm/SuperPool.hpp3
-rw-r--r--ndb/src/kernel/vm/ThreadConfig.cpp3
-rw-r--r--ndb/src/kernel/vm/ThreadConfig.hpp3
-rw-r--r--ndb/src/kernel/vm/TimeQueue.cpp3
-rw-r--r--ndb/src/kernel/vm/TimeQueue.hpp3
-rw-r--r--ndb/src/kernel/vm/TransporterCallback.cpp3
-rw-r--r--ndb/src/kernel/vm/VMSignal.cpp3
-rw-r--r--ndb/src/kernel/vm/VMSignal.hpp3
-rw-r--r--ndb/src/kernel/vm/WaitQueue.hpp3
-rw-r--r--ndb/src/kernel/vm/WatchDog.cpp3
-rw-r--r--ndb/src/kernel/vm/WatchDog.hpp3
-rw-r--r--ndb/src/kernel/vm/al_test/arrayListTest.cpp3
-rw-r--r--ndb/src/kernel/vm/al_test/arrayPoolTest.cpp3
-rw-r--r--ndb/src/kernel/vm/al_test/main.cpp3
-rw-r--r--ndb/src/kernel/vm/ndbd_malloc.cpp3
-rw-r--r--ndb/src/kernel/vm/ndbd_malloc.hpp3
-rw-r--r--ndb/src/kernel/vm/pc.hpp3
-rw-r--r--ndb/src/kernel/vm/testCopy/rr.cpp3
-rw-r--r--ndb/src/kernel/vm/testCopy/testCopy.cpp3
-rw-r--r--ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp3
-rw-r--r--ndb/src/kernel/vm/testLongSig/testLongSig.cpp3
-rw-r--r--ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp3
-rw-r--r--ndb/src/kernel/vm/testSuperPool.cpp3
-rw-r--r--ndb/src/mgmapi/LocalConfig.cpp3
-rw-r--r--ndb/src/mgmapi/LocalConfig.hpp3
-rw-r--r--ndb/src/mgmapi/Makefile.am14
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp22
-rw-r--r--ndb/src/mgmapi/mgmapi_configuration.cpp15
-rw-r--r--ndb/src/mgmapi/mgmapi_configuration.hpp3
-rw-r--r--ndb/src/mgmapi/mgmapi_internal.h3
-rw-r--r--ndb/src/mgmapi/ndb_logevent.cpp3
-rw-r--r--ndb/src/mgmapi/ndb_logevent.hpp3
-rw-r--r--ndb/src/mgmapi/test/keso.c3
-rw-r--r--ndb/src/mgmapi/test/mgmSrvApi.cpp3
-rw-r--r--ndb/src/mgmclient/CommandInterpreter.cpp3
-rw-r--r--ndb/src/mgmclient/Makefile.am14
-rw-r--r--ndb/src/mgmclient/main.cpp3
-rw-r--r--ndb/src/mgmclient/ndb_mgmclient.h3
-rw-r--r--ndb/src/mgmclient/ndb_mgmclient.hpp3
-rw-r--r--ndb/src/mgmclient/test_cpcd/test_cpcd.cpp3
-rw-r--r--ndb/src/mgmsrv/Config.cpp3
-rw-r--r--ndb/src/mgmsrv/Config.hpp3
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.cpp11
-rw-r--r--ndb/src/mgmsrv/ConfigInfo.hpp3
-rw-r--r--ndb/src/mgmsrv/InitConfigFileParser.cpp3
-rw-r--r--ndb/src/mgmsrv/InitConfigFileParser.hpp3
-rw-r--r--ndb/src/mgmsrv/Makefile.am15
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp53
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.hpp3
-rw-r--r--ndb/src/mgmsrv/MgmtSrvrConfig.cpp3
-rw-r--r--ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp3
-rw-r--r--ndb/src/mgmsrv/Services.cpp14
-rw-r--r--ndb/src/mgmsrv/Services.hpp3
-rw-r--r--ndb/src/mgmsrv/SignalQueue.cpp3
-rw-r--r--ndb/src/mgmsrv/SignalQueue.hpp3
-rw-r--r--ndb/src/mgmsrv/convertStrToInt.cpp3
-rw-r--r--ndb/src/mgmsrv/convertStrToInt.hpp3
-rw-r--r--ndb/src/mgmsrv/main.cpp3
-rw-r--r--ndb/src/mgmsrv/mkconfig/mkconfig.cpp3
-rw-r--r--ndb/src/ndbapi/API.hpp3
-rw-r--r--ndb/src/ndbapi/ClusterMgr.cpp12
-rw-r--r--ndb/src/ndbapi/ClusterMgr.hpp7
-rw-r--r--ndb/src/ndbapi/DictCache.cpp3
-rw-r--r--ndb/src/ndbapi/DictCache.hpp3
-rw-r--r--ndb/src/ndbapi/Makefile.am15
-rw-r--r--ndb/src/ndbapi/Ndb.cpp26
-rw-r--r--ndb/src/ndbapi/NdbApiSignal.cpp3
-rw-r--r--ndb/src/ndbapi/NdbApiSignal.hpp3
-rw-r--r--ndb/src/ndbapi/NdbBlob.cpp3
-rw-r--r--ndb/src/ndbapi/NdbBlobImpl.hpp3
-rw-r--r--ndb/src/ndbapi/NdbDictionary.cpp3
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.cpp3
-rw-r--r--ndb/src/ndbapi/NdbDictionaryImpl.hpp3
-rw-r--r--ndb/src/ndbapi/NdbErrorOut.cpp3
-rw-r--r--ndb/src/ndbapi/NdbEventOperation.cpp3
-rw-r--r--ndb/src/ndbapi/NdbEventOperationImpl.cpp3
-rw-r--r--ndb/src/ndbapi/NdbEventOperationImpl.hpp3
-rw-r--r--ndb/src/ndbapi/NdbImpl.hpp3
-rw-r--r--ndb/src/ndbapi/NdbIndexOperation.cpp3
-rw-r--r--ndb/src/ndbapi/NdbLinHash.hpp3
-rw-r--r--ndb/src/ndbapi/NdbOperation.cpp3
-rw-r--r--ndb/src/ndbapi/NdbOperationDefine.cpp3
-rw-r--r--ndb/src/ndbapi/NdbOperationExec.cpp3
-rw-r--r--ndb/src/ndbapi/NdbOperationInt.cpp3
-rw-r--r--ndb/src/ndbapi/NdbOperationScan.cpp3
-rw-r--r--ndb/src/ndbapi/NdbOperationSearch.cpp3
-rw-r--r--ndb/src/ndbapi/NdbPool.cpp3
-rw-r--r--ndb/src/ndbapi/NdbPoolImpl.cpp3
-rw-r--r--ndb/src/ndbapi/NdbPoolImpl.hpp3
-rw-r--r--ndb/src/ndbapi/NdbRecAttr.cpp3
-rw-r--r--ndb/src/ndbapi/NdbReceiver.cpp3
-rw-r--r--ndb/src/ndbapi/NdbScanFilter.cpp3
-rw-r--r--ndb/src/ndbapi/NdbScanOperation.cpp9
-rw-r--r--ndb/src/ndbapi/NdbTransaction.cpp20
-rw-r--r--ndb/src/ndbapi/NdbTransactionScan.cpp3
-rw-r--r--ndb/src/ndbapi/NdbUtil.cpp3
-rw-r--r--ndb/src/ndbapi/NdbUtil.hpp3
-rw-r--r--ndb/src/ndbapi/NdbWaiter.hpp3
-rw-r--r--ndb/src/ndbapi/Ndberr.cpp3
-rw-r--r--ndb/src/ndbapi/Ndbif.cpp4
-rw-r--r--ndb/src/ndbapi/Ndbinit.cpp3
-rw-r--r--ndb/src/ndbapi/Ndblist.cpp5
-rw-r--r--ndb/src/ndbapi/ObjectMap.hpp3
-rw-r--r--ndb/src/ndbapi/SignalSender.cpp12
-rw-r--r--ndb/src/ndbapi/SignalSender.hpp3
-rw-r--r--ndb/src/ndbapi/TransporterFacade.cpp3
-rw-r--r--ndb/src/ndbapi/TransporterFacade.hpp3
-rw-r--r--ndb/src/ndbapi/ndb_cluster_connection.cpp3
-rw-r--r--ndb/src/ndbapi/ndb_cluster_connection_impl.hpp3
-rw-r--r--ndb/src/ndbapi/ndberror.c12
-rw-r--r--ndb/src/ndbapi/signal-sender/SignalSender.cpp3
-rw-r--r--ndb/src/ndbapi/signal-sender/SignalSender.hpp3
-rw-r--r--ndb/test/Makefile.am18
-rw-r--r--ndb/test/include/CpcClient.hpp3
-rw-r--r--ndb/test/include/HugoAsynchTransactions.hpp3
-rw-r--r--ndb/test/include/HugoCalculator.hpp3
-rw-r--r--ndb/test/include/HugoOperations.hpp3
-rw-r--r--ndb/test/include/HugoTransactions.hpp3
-rw-r--r--ndb/test/include/NDBT.hpp3
-rw-r--r--ndb/test/include/NDBT_DataSet.hpp3
-rw-r--r--ndb/test/include/NDBT_DataSetTransaction.hpp3
-rw-r--r--ndb/test/include/NDBT_Error.hpp3
-rw-r--r--ndb/test/include/NDBT_Output.hpp3
-rw-r--r--ndb/test/include/NDBT_ResultRow.hpp3
-rw-r--r--ndb/test/include/NDBT_ReturnCodes.h3
-rw-r--r--ndb/test/include/NDBT_Stats.hpp3
-rw-r--r--ndb/test/include/NDBT_Table.hpp3
-rw-r--r--ndb/test/include/NDBT_Tables.hpp3
-rw-r--r--ndb/test/include/NDBT_Test.hpp3
-rw-r--r--ndb/test/include/NdbBackup.hpp3
-rw-r--r--ndb/test/include/NdbConfig.hpp3
-rw-r--r--ndb/test/include/NdbGrep.hpp3
-rw-r--r--ndb/test/include/NdbRestarter.hpp3
-rw-r--r--ndb/test/include/NdbRestarts.hpp3
-rw-r--r--ndb/test/include/NdbSchemaCon.hpp3
-rw-r--r--ndb/test/include/NdbSchemaOp.hpp3
-rw-r--r--ndb/test/include/NdbTest.hpp3
-rw-r--r--ndb/test/include/NdbTimer.hpp3
-rw-r--r--ndb/test/include/TestNdbEventOperation.hpp3
-rw-r--r--ndb/test/include/UtilTransactions.hpp3
-rw-r--r--ndb/test/include/getarg.h3
-rw-r--r--ndb/test/ndbapi/InsertRecs.cpp3
-rw-r--r--ndb/test/ndbapi/Makefile.am14
-rw-r--r--ndb/test/ndbapi/ScanFilter.hpp3
-rw-r--r--ndb/test/ndbapi/ScanFunctions.hpp3
-rw-r--r--ndb/test/ndbapi/ScanInterpretTest.hpp3
-rw-r--r--ndb/test/ndbapi/TraceNdbApi.cpp3
-rw-r--r--ndb/test/ndbapi/VerifyNdbApi.cpp3
-rw-r--r--ndb/test/ndbapi/acid.cpp3
-rw-r--r--ndb/test/ndbapi/acid2.cpp3
-rw-r--r--ndb/test/ndbapi/adoInsertRecs.cpp3
-rw-r--r--ndb/test/ndbapi/asyncGenerator.cpp3
-rw-r--r--ndb/test/ndbapi/bank/Bank.cpp3
-rw-r--r--ndb/test/ndbapi/bank/Bank.hpp3
-rw-r--r--ndb/test/ndbapi/bank/BankLoad.cpp3
-rw-r--r--ndb/test/ndbapi/bank/Makefile.am14
-rw-r--r--ndb/test/ndbapi/bank/bankCreator.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankMakeGL.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankSumAccounts.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankTimer.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankTransactionMaker.cpp3
-rw-r--r--ndb/test/ndbapi/bank/bankValidateAllGLs.cpp3
-rw-r--r--ndb/test/ndbapi/bank/testBank.cpp3
-rw-r--r--ndb/test/ndbapi/bench/asyncGenerator.cpp3
-rw-r--r--ndb/test/ndbapi/bench/dbGenerator.h3
-rw-r--r--ndb/test/ndbapi/bench/dbPopulate.cpp3
-rw-r--r--ndb/test/ndbapi/bench/dbPopulate.h3
-rw-r--r--ndb/test/ndbapi/bench/macros.h3
-rw-r--r--ndb/test/ndbapi/bench/mainAsyncGenerator.cpp3
-rw-r--r--ndb/test/ndbapi/bench/mainPopulate.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_async1.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_async2.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_error.hpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_schema.hpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_user_transaction.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_user_transaction2.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_user_transaction3.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_user_transaction4.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_user_transaction5.cpp3
-rw-r--r--ndb/test/ndbapi/bench/ndb_user_transaction6.cpp3
-rw-r--r--ndb/test/ndbapi/bench/testData.h3
-rw-r--r--ndb/test/ndbapi/bench/testDefinitions.h3
-rw-r--r--ndb/test/ndbapi/bench/userInterface.cpp3
-rw-r--r--ndb/test/ndbapi/bench/userInterface.h3
-rw-r--r--ndb/test/ndbapi/benchronja.cpp3
-rw-r--r--ndb/test/ndbapi/bulk_copy.cpp3
-rw-r--r--ndb/test/ndbapi/cdrserver.cpp3
-rw-r--r--ndb/test/ndbapi/celloDb.cpp3
-rw-r--r--ndb/test/ndbapi/create_all_tabs.cpp3
-rw-r--r--ndb/test/ndbapi/create_tab.cpp3
-rw-r--r--ndb/test/ndbapi/drop_all_tabs.cpp3
-rw-r--r--ndb/test/ndbapi/flexAsynch.cpp3
-rw-r--r--ndb/test/ndbapi/flexBench.cpp3
-rw-r--r--ndb/test/ndbapi/flexHammer.cpp3
-rw-r--r--ndb/test/ndbapi/flexScan.cpp3
-rw-r--r--ndb/test/ndbapi/flexTT.cpp3
-rw-r--r--ndb/test/ndbapi/flexTimedAsynch.cpp3
-rw-r--r--ndb/test/ndbapi/flex_bench_mysql.cpp3
-rw-r--r--ndb/test/ndbapi/index.cpp3
-rw-r--r--ndb/test/ndbapi/index2.cpp3
-rw-r--r--ndb/test/ndbapi/initronja.cpp3
-rw-r--r--ndb/test/ndbapi/interpreterInTup.cpp3
-rw-r--r--ndb/test/ndbapi/mainAsyncGenerator.cpp3
-rw-r--r--ndb/test/ndbapi/msa.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_async1.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_async2.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_user_populate.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_user_transaction.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_user_transaction2.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_user_transaction3.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_user_transaction4.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_user_transaction5.cpp3
-rw-r--r--ndb/test/ndbapi/ndb_user_transaction6.cpp3
-rw-r--r--ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp3
-rw-r--r--ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp3
-rw-r--r--ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c3
-rw-r--r--ndb/test/ndbapi/old_dirs/vw_test/bcd.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/vw_test/utv.h3
-rw-r--r--ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h3
-rw-r--r--ndb/test/ndbapi/restarter.cpp3
-rw-r--r--ndb/test/ndbapi/restarter2.cpp3
-rw-r--r--ndb/test/ndbapi/restarts.cpp3
-rw-r--r--ndb/test/ndbapi/size.cpp3
-rw-r--r--ndb/test/ndbapi/testBackup.cpp3
-rw-r--r--ndb/test/ndbapi/testBasic.cpp29
-rw-r--r--ndb/test/ndbapi/testBasicAsynch.cpp3
-rw-r--r--ndb/test/ndbapi/testBlobs.cpp3
-rw-r--r--ndb/test/ndbapi/testDataBuffers.cpp3
-rw-r--r--ndb/test/ndbapi/testDeadlock.cpp3
-rw-r--r--ndb/test/ndbapi/testDict.cpp5
-rw-r--r--ndb/test/ndbapi/testGrepVerify.cpp3
-rw-r--r--ndb/test/ndbapi/testIndex.cpp68
-rw-r--r--ndb/test/ndbapi/testInterpreter.cpp3
-rw-r--r--ndb/test/ndbapi/testMgm.cpp3
-rw-r--r--ndb/test/ndbapi/testNdbApi.cpp3
-rw-r--r--ndb/test/ndbapi/testNodeRestart.cpp138
-rw-r--r--ndb/test/ndbapi/testOIBasic.cpp3
-rw-r--r--ndb/test/ndbapi/testOperations.cpp3
-rw-r--r--ndb/test/ndbapi/testOrderedIndex.cpp3
-rw-r--r--ndb/test/ndbapi/testPartitioning.cpp3
-rw-r--r--ndb/test/ndbapi/testReadPerf.cpp3
-rw-r--r--ndb/test/ndbapi/testRestartGci.cpp3
-rw-r--r--ndb/test/ndbapi/testSRBank.cpp3
-rw-r--r--ndb/test/ndbapi/testScan.cpp44
-rw-r--r--ndb/test/ndbapi/testScanInterpreter.cpp3
-rw-r--r--ndb/test/ndbapi/testScanPerf.cpp3
-rw-r--r--ndb/test/ndbapi/testSystemRestart.cpp3
-rw-r--r--ndb/test/ndbapi/testTimeout.cpp3
-rw-r--r--ndb/test/ndbapi/testTransactions.cpp3
-rw-r--r--ndb/test/ndbapi/test_event.cpp3
-rw-r--r--ndb/test/ndbapi/test_event_merge.cpp3
-rw-r--r--ndb/test/ndbapi/test_event_multi_table.cpp3
-rw-r--r--ndb/test/ndbapi/userInterface.cpp3
-rw-r--r--ndb/test/newtonapi/basic_test/basic/basic.cpp3
-rw-r--r--ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp3
-rw-r--r--ndb/test/newtonapi/basic_test/common.cpp3
-rw-r--r--ndb/test/newtonapi/basic_test/common.hpp3
-rw-r--r--ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp3
-rw-r--r--ndb/test/newtonapi/basic_test/too_basic.cpp3
-rw-r--r--ndb/test/newtonapi/perf_test/perf.cpp3
-rw-r--r--ndb/test/odbc/SQL99_test/SQL99_test.cpp3
-rw-r--r--ndb/test/odbc/SQL99_test/SQL99_test.h3
-rw-r--r--ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp3
-rw-r--r--ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp3
-rw-r--r--ndb/test/odbc/client/NDBT_SQLConnect.cpp3
-rw-r--r--ndb/test/odbc/client/NDBT_SQLPrepare.cpp3
-rw-r--r--ndb/test/odbc/client/SQLAllocEnvTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLAllocHandleTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp3
-rw-r--r--ndb/test/odbc/client/SQLBindColTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLBindParameterTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLCancelTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLCloseCursorTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLColAttributeTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLColAttributeTest1.cpp3
-rw-r--r--ndb/test/odbc/client/SQLColAttributeTest2.cpp3
-rw-r--r--ndb/test/odbc/client/SQLColAttributeTest3.cpp3
-rw-r--r--ndb/test/odbc/client/SQLConnectTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLCopyDescTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLDescribeColTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLDisconnectTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLDriverConnectTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLEndTranTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLErrorTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLExecDirectTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLExecuteTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLFetchScrollTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLFetchTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLFreeHandleTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLFreeStmtTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetConnectAttrTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetCursorNameTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetDataTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetDescFieldTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetDescRecTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetDiagFieldTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetDiagRecTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetEnvAttrTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetFunctionsTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetInfoTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetStmtAttrTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLGetTypeInfoTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLMoreResultsTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLNumResultColsTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLParamDataTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLPrepareTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLPutDataTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLRowCountTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLSetConnectAttrTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLSetCursorNameTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLSetDescFieldTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLSetDescRecTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLSetEnvAttrTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLSetStmtAttrTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLTablesTest.cpp3
-rw-r--r--ndb/test/odbc/client/SQLTransactTest.cpp3
-rw-r--r--ndb/test/odbc/client/common.hpp3
-rw-r--r--ndb/test/odbc/client/main.cpp3
-rw-r--r--ndb/test/odbc/driver/testOdbcDriver.cpp19
-rw-r--r--ndb/test/odbc/test_compiler/test_compiler.cpp3
-rw-r--r--ndb/test/run-test/Makefile.am14
-rw-r--r--ndb/test/run-test/daily-basic-tests.txt26
-rw-r--r--ndb/test/run-test/main.cpp3
-rw-r--r--ndb/test/run-test/run-test.hpp3
-rw-r--r--ndb/test/src/CpcClient.cpp3
-rw-r--r--ndb/test/src/HugoAsynchTransactions.cpp3
-rw-r--r--ndb/test/src/HugoCalculator.cpp3
-rw-r--r--ndb/test/src/HugoOperations.cpp3
-rw-r--r--ndb/test/src/HugoTransactions.cpp3
-rw-r--r--ndb/test/src/Makefile.am14
-rw-r--r--ndb/test/src/NDBT_Error.cpp3
-rw-r--r--ndb/test/src/NDBT_Output.cpp3
-rw-r--r--ndb/test/src/NDBT_ResultRow.cpp3
-rw-r--r--ndb/test/src/NDBT_ReturnCodes.cpp3
-rw-r--r--ndb/test/src/NDBT_Table.cpp3
-rw-r--r--ndb/test/src/NDBT_Tables.cpp3
-rw-r--r--ndb/test/src/NDBT_Test.cpp3
-rw-r--r--ndb/test/src/NdbBackup.cpp3
-rw-r--r--ndb/test/src/NdbConfig.cpp3
-rw-r--r--ndb/test/src/NdbGrep.cpp3
-rw-r--r--ndb/test/src/NdbRestarter.cpp3
-rw-r--r--ndb/test/src/NdbRestarts.cpp3
-rw-r--r--ndb/test/src/NdbSchemaCon.cpp3
-rw-r--r--ndb/test/src/NdbSchemaOp.cpp3
-rw-r--r--ndb/test/src/UtilTransactions.cpp3
-rw-r--r--ndb/test/tools/Makefile.am14
-rw-r--r--ndb/test/tools/copy_tab.cpp3
-rw-r--r--ndb/test/tools/cpcc.cpp3
-rw-r--r--ndb/test/tools/create_index.cpp3
-rw-r--r--ndb/test/tools/hugoCalculator.cpp3
-rw-r--r--ndb/test/tools/hugoFill.cpp3
-rw-r--r--ndb/test/tools/hugoLoad.cpp3
-rw-r--r--ndb/test/tools/hugoLockRecords.cpp3
-rw-r--r--ndb/test/tools/hugoPkDelete.cpp3
-rw-r--r--ndb/test/tools/hugoPkRead.cpp3
-rw-r--r--ndb/test/tools/hugoPkReadRecord.cpp3
-rw-r--r--ndb/test/tools/hugoPkUpdate.cpp3
-rw-r--r--ndb/test/tools/hugoScanRead.cpp3
-rw-r--r--ndb/test/tools/hugoScanUpdate.cpp3
-rw-r--r--ndb/test/tools/old_dirs/waiter/waiter.cpp3
-rw-r--r--ndb/test/tools/restart.cpp3
-rw-r--r--ndb/test/tools/transproxy.cpp3
-rw-r--r--ndb/test/tools/verify_index.cpp3
-rw-r--r--ndb/tools/Makefile.am14
-rw-r--r--ndb/tools/delete_all.cpp3
-rw-r--r--ndb/tools/desc.cpp3
-rw-r--r--ndb/tools/drop_index.cpp3
-rw-r--r--ndb/tools/drop_tab.cpp3
-rw-r--r--ndb/tools/listTables.cpp3
-rw-r--r--ndb/tools/ndb_config.cpp6
-rw-r--r--ndb/tools/ndb_test_platform.cpp3
-rw-r--r--ndb/tools/ndbsql.cpp3
-rw-r--r--ndb/tools/restore/Restore.cpp3
-rw-r--r--ndb/tools/restore/Restore.hpp3
-rw-r--r--ndb/tools/restore/consumer.cpp3
-rw-r--r--ndb/tools/restore/consumer.hpp3
-rw-r--r--ndb/tools/restore/consumer_printer.cpp3
-rw-r--r--ndb/tools/restore/consumer_printer.hpp3
-rw-r--r--ndb/tools/restore/consumer_restore.cpp3
-rw-r--r--ndb/tools/restore/consumer_restore.hpp3
-rw-r--r--ndb/tools/restore/consumer_restorem.cpp3
-rw-r--r--ndb/tools/restore/restore_main.cpp3
-rw-r--r--ndb/tools/select_all.cpp3
-rw-r--r--ndb/tools/select_count.cpp3
-rw-r--r--ndb/tools/waiter.cpp3
-rw-r--r--netware/Makefile.am5
-rw-r--r--netware/comp_err.def1
-rw-r--r--netware/isamchk.def2
-rw-r--r--netware/isamlog.def1
-rw-r--r--netware/libmysql.def2
-rw-r--r--netware/my_print_defaults.def2
-rw-r--r--netware/myisam_ftdump.def2
-rw-r--r--netware/myisamchk.def2
-rw-r--r--netware/myisamlog.def2
-rw-r--r--netware/myisampack.def2
-rw-r--r--netware/mysql.def2
-rw-r--r--netware/mysql_client_test.def10
-rw-r--r--netware/mysql_fix_privilege_tables.pl3
-rw-r--r--netware/mysql_install_db.def2
-rw-r--r--netware/mysql_secure_installation.pl3
-rw-r--r--netware/mysql_test_run.def2
-rw-r--r--netware/mysql_upgrade.def11
-rw-r--r--netware/mysql_waitpid.def2
-rw-r--r--netware/mysqladmin.def2
-rw-r--r--netware/mysqlbinlog.def2
-rw-r--r--netware/mysqlcheck.def2
-rw-r--r--netware/mysqld.def2
-rw-r--r--netware/mysqld_safe.def2
-rw-r--r--netware/mysqldump.def2
-rw-r--r--netware/mysqlimport.def2
-rw-r--r--netware/mysqlshow.def1
-rw-r--r--netware/mysqltest.def1
-rw-r--r--netware/pack_isam.def1
-rw-r--r--netware/perror.def2
-rw-r--r--netware/replace.def1
-rw-r--r--netware/resolve_stack_dump.def2
-rw-r--r--netware/resolveip.def1
-rw-r--r--os2/Makefile.am5
-rw-r--r--os2/ReadMe.txt2
-rw-r--r--os2/include/Makefile.am5
-rw-r--r--os2/include/sys/Makefile.am5
-rw-r--r--pstack/Makefile.am5
-rw-r--r--pstack/aout/Makefile.am3
-rwxr-xr-xregex/CMakeLists.txt15
-rw-r--r--regex/Makefile.am6
-rw-r--r--scripts/Makefile.am6
-rw-r--r--scripts/fill_func_tables.sh15
-rw-r--r--scripts/fill_help_tables.sh20
-rw-r--r--scripts/make_binary_distribution.sh19
-rw-r--r--scripts/make_sharedlib_distribution.sh15
-rwxr-xr-xscripts/make_win_bin_dist14
-rw-r--r--scripts/make_win_src_distribution.sh14
-rw-r--r--scripts/mysql_config.sh5
-rw-r--r--scripts/mysql_convert_table_format.sh14
-rw-r--r--scripts/mysql_create_system_tables.sh14
-rw-r--r--scripts/mysql_explain_log.sh125
-rw-r--r--scripts/mysql_find_rows.sh17
-rw-r--r--scripts/mysql_fix_privilege_tables.sh33
-rw-r--r--scripts/mysql_fix_privilege_tables.sql172
-rw-r--r--scripts/mysql_install_db.sh53
-rw-r--r--scripts/mysql_secure_installation.sh32
-rw-r--r--scripts/mysql_upgrade_shell.sh14
-rw-r--r--scripts/mysql_zap.sh15
-rw-r--r--scripts/mysqlaccess.sh4
-rw-r--r--scripts/mysqlbug.sh23
-rw-r--r--scripts/mysqld_multi.sh25
-rw-r--r--scripts/mysqld_safe.sh1
-rw-r--r--scripts/mysqldumpslow.sh10
-rwxr-xr-xserver-tools/CMakeLists.txt15
-rw-r--r--server-tools/Makefile.am18
-rwxr-xr-xserver-tools/instance-manager/CMakeLists.txt15
-rw-r--r--server-tools/instance-manager/IMService.cpp15
-rw-r--r--server-tools/instance-manager/IMService.h15
-rw-r--r--server-tools/instance-manager/Makefile.am3
-rw-r--r--server-tools/instance-manager/WindowsService.cpp15
-rw-r--r--server-tools/instance-manager/WindowsService.h15
-rw-r--r--server-tools/instance-manager/buffer.cc3
-rw-r--r--server-tools/instance-manager/buffer.h3
-rw-r--r--server-tools/instance-manager/command.cc3
-rw-r--r--server-tools/instance-manager/command.h3
-rw-r--r--server-tools/instance-manager/commands.cc3
-rw-r--r--server-tools/instance-manager/commands.h3
-rw-r--r--server-tools/instance-manager/guardian.cc10
-rw-r--r--server-tools/instance-manager/guardian.h3
-rw-r--r--server-tools/instance-manager/instance.cc8
-rw-r--r--server-tools/instance-manager/instance.h3
-rw-r--r--server-tools/instance-manager/instance_map.cc3
-rw-r--r--server-tools/instance-manager/instance_map.h3
-rw-r--r--server-tools/instance-manager/instance_options.cc3
-rw-r--r--server-tools/instance-manager/instance_options.h3
-rw-r--r--server-tools/instance-manager/listener.cc5
-rw-r--r--server-tools/instance-manager/listener.h10
-rw-r--r--server-tools/instance-manager/log.cc5
-rw-r--r--server-tools/instance-manager/log.h10
-rw-r--r--server-tools/instance-manager/manager.cc5
-rw-r--r--server-tools/instance-manager/manager.h10
-rw-r--r--server-tools/instance-manager/messages.cc5
-rw-r--r--server-tools/instance-manager/messages.h10
-rw-r--r--server-tools/instance-manager/mysql_connection.cc5
-rw-r--r--server-tools/instance-manager/mysql_connection.h10
-rw-r--r--server-tools/instance-manager/mysql_manager_error.h3
-rw-r--r--server-tools/instance-manager/mysqlmanager.cc5
-rw-r--r--server-tools/instance-manager/options.cc5
-rw-r--r--server-tools/instance-manager/options.h10
-rw-r--r--server-tools/instance-manager/parse.cc3
-rw-r--r--server-tools/instance-manager/parse.h3
-rw-r--r--server-tools/instance-manager/parse_output.cc3
-rw-r--r--server-tools/instance-manager/parse_output.h3
-rw-r--r--server-tools/instance-manager/portability.h16
-rw-r--r--server-tools/instance-manager/priv.cc5
-rw-r--r--server-tools/instance-manager/priv.h10
-rw-r--r--server-tools/instance-manager/protocol.cc5
-rw-r--r--server-tools/instance-manager/protocol.h10
-rw-r--r--server-tools/instance-manager/thread_registry.cc5
-rw-r--r--server-tools/instance-manager/thread_registry.h10
-rw-r--r--server-tools/instance-manager/user_map.cc5
-rw-r--r--server-tools/instance-manager/user_map.h9
-rw-r--r--sql-bench/Makefile.am6
-rw-r--r--sql-bench/as3ap.sh6
-rw-r--r--sql-bench/bench-count-distinct.sh6
-rw-r--r--sql-bench/bench-init.pl.sh6
-rw-r--r--sql-bench/compare-results.sh6
-rw-r--r--sql-bench/copy-db.sh6
-rw-r--r--sql-bench/crash-me.sh6
-rwxr-xr-xsql-bench/print-limit-table6
-rw-r--r--sql-bench/run-all-tests.sh6
-rw-r--r--sql-bench/server-cfg.sh6
-rw-r--r--sql-bench/test-ATIS.sh6
-rw-r--r--sql-bench/test-alter-table.sh6
-rw-r--r--sql-bench/test-big-tables.sh6
-rw-r--r--sql-bench/test-connect.sh6
-rw-r--r--sql-bench/test-create.sh6
-rw-r--r--sql-bench/test-insert.sh6
-rw-r--r--sql-bench/test-select.sh6
-rw-r--r--sql-bench/test-transactions.sh6
-rw-r--r--sql-bench/test-wisconsin.sh6
-rw-r--r--sql-common/Makefile.am5
-rw-r--r--sql-common/client.c5
-rw-r--r--sql-common/my_time.c27
-rw-r--r--sql-common/my_user.c3
-rw-r--r--sql-common/pack.c3
-rwxr-xr-xsql/CMakeLists.txt19
-rw-r--r--sql/Makefile.am5
-rw-r--r--sql/client_settings.h5
-rw-r--r--sql/custom_conf.h5
-rw-r--r--sql/derror.cc5
-rw-r--r--sql/des_key_file.cc5
-rw-r--r--sql/discover.cc5
-rwxr-xr-xsql/examples/CMakeLists.txt15
-rw-r--r--sql/examples/ha_example.cc3
-rw-r--r--sql/examples/ha_example.h3
-rw-r--r--sql/examples/ha_tina.cc3
-rw-r--r--sql/examples/ha_tina.h3
-rw-r--r--sql/field.cc109
-rw-r--r--sql/field.h124
-rw-r--r--sql/field_conv.cc27
-rw-r--r--sql/filesort.cc5
-rw-r--r--sql/frm_crypt.cc5
-rw-r--r--sql/gen_lex_hash.cc10
-rw-r--r--sql/gstream.cc3
-rw-r--r--sql/gstream.h5
-rw-r--r--sql/ha_archive.cc22
-rw-r--r--sql/ha_archive.h3
-rw-r--r--sql/ha_berkeley.cc5
-rw-r--r--sql/ha_berkeley.h5
-rw-r--r--sql/ha_blackhole.cc3
-rw-r--r--sql/ha_blackhole.h3
-rw-r--r--sql/ha_federated.cc20
-rw-r--r--sql/ha_federated.h3
-rw-r--r--sql/ha_heap.cc7
-rw-r--r--sql/ha_heap.h5
-rw-r--r--sql/ha_innodb.cc59
-rw-r--r--sql/ha_innodb.h4
-rw-r--r--sql/ha_myisam.cc5
-rw-r--r--sql/ha_myisam.h5
-rw-r--r--sql/ha_myisammrg.cc5
-rw-r--r--sql/ha_myisammrg.h5
-rw-r--r--sql/ha_ndbcluster.cc343
-rw-r--r--sql/ha_ndbcluster.h25
-rw-r--r--sql/handler.cc16
-rw-r--r--sql/handler.h5
-rw-r--r--sql/hash_filo.cc5
-rw-r--r--sql/hash_filo.h5
-rw-r--r--sql/hostname.cc5
-rw-r--r--sql/init.cc5
-rw-r--r--sql/item.cc61
-rw-r--r--sql/item.h20
-rw-r--r--sql/item_buff.cc5
-rw-r--r--sql/item_cmpfunc.cc11
-rw-r--r--sql/item_cmpfunc.h6
-rw-r--r--sql/item_create.cc3
-rw-r--r--sql/item_create.h5
-rw-r--r--sql/item_func.cc203
-rw-r--r--sql/item_func.h12
-rw-r--r--sql/item_geofunc.cc5
-rw-r--r--sql/item_geofunc.h3
-rw-r--r--sql/item_row.cc3
-rw-r--r--sql/item_row.h3
-rw-r--r--sql/item_strfunc.cc89
-rw-r--r--sql/item_strfunc.h3
-rw-r--r--sql/item_subselect.cc22
-rw-r--r--sql/item_subselect.h8
-rw-r--r--sql/item_sum.cc373
-rw-r--r--sql/item_sum.h29
-rw-r--r--sql/item_timefunc.cc108
-rw-r--r--sql/item_timefunc.h5
-rw-r--r--sql/item_uniq.cc5
-rw-r--r--sql/item_uniq.h5
-rw-r--r--sql/key.cc5
-rw-r--r--sql/lex.h3
-rw-r--r--sql/lex_symbol.h5
-rw-r--r--sql/lock.cc5
-rw-r--r--sql/log.cc11
-rw-r--r--sql/log_event.cc181
-rw-r--r--sql/log_event.h23
-rw-r--r--sql/matherr.c5
-rw-r--r--sql/mf_iocache.cc5
-rw-r--r--sql/my_decimal.cc5
-rw-r--r--sql/my_decimal.h5
-rw-r--r--sql/my_lock.c5
-rw-r--r--sql/mysql_priv.h29
-rw-r--r--sql/mysqld.cc95
-rw-r--r--sql/mysqld_suffix.h3
-rw-r--r--sql/net_serv.cc8
-rw-r--r--sql/opt_range.cc41
-rw-r--r--sql/opt_range.h5
-rw-r--r--sql/opt_sum.cc3
-rw-r--r--sql/parse_file.cc3
-rw-r--r--sql/parse_file.h3
-rw-r--r--sql/password.c9
-rw-r--r--sql/procedure.cc5
-rw-r--r--sql/procedure.h5
-rw-r--r--sql/protocol.cc3
-rw-r--r--sql/protocol.h5
-rw-r--r--sql/records.cc5
-rw-r--r--sql/repl_failsafe.cc5
-rw-r--r--sql/repl_failsafe.h5
-rw-r--r--sql/set_var.cc44
-rw-r--r--sql/set_var.h15
-rw-r--r--sql/share/Makefile.am3
-rw-r--r--sql/share/charsets/Index.xml3
-rw-r--r--sql/share/charsets/armscii8.xml3
-rw-r--r--sql/share/charsets/ascii.xml3
-rw-r--r--sql/share/charsets/cp1250.xml3
-rw-r--r--sql/share/charsets/cp1251.xml3
-rw-r--r--sql/share/charsets/cp1256.xml3
-rw-r--r--sql/share/charsets/cp1257.xml3
-rw-r--r--sql/share/charsets/cp850.xml3
-rw-r--r--sql/share/charsets/cp852.xml3
-rw-r--r--sql/share/charsets/cp866.xml3
-rw-r--r--sql/share/charsets/dec8.xml3
-rw-r--r--sql/share/charsets/geostd8.xml3
-rw-r--r--sql/share/charsets/greek.xml3
-rw-r--r--sql/share/charsets/hebrew.xml7
-rw-r--r--sql/share/charsets/hp8.xml3
-rw-r--r--sql/share/charsets/keybcs2.xml3
-rw-r--r--sql/share/charsets/koi8r.xml3
-rw-r--r--sql/share/charsets/koi8u.xml3
-rw-r--r--sql/share/charsets/latin1.xml3
-rw-r--r--sql/share/charsets/latin2.xml3
-rw-r--r--sql/share/charsets/latin5.xml3
-rw-r--r--sql/share/charsets/latin7.xml3
-rw-r--r--sql/share/charsets/macce.xml3
-rw-r--r--sql/share/charsets/macroman.xml3
-rw-r--r--sql/share/charsets/swe7.xml3
-rw-r--r--sql/share/errmsg.txt4
-rw-r--r--sql/slave.cc5
-rw-r--r--sql/slave.h3
-rw-r--r--sql/sp.cc27
-rw-r--r--sql/sp.h3
-rw-r--r--sql/sp_cache.cc4
-rw-r--r--sql/sp_cache.h3
-rw-r--r--sql/sp_head.cc25
-rw-r--r--sql/sp_head.h3
-rw-r--r--sql/sp_pcontext.cc3
-rw-r--r--sql/sp_pcontext.h3
-rw-r--r--sql/sp_rcontext.cc3
-rw-r--r--sql/sp_rcontext.h3
-rw-r--r--sql/spatial.cc3
-rw-r--r--sql/spatial.h5
-rw-r--r--sql/sql_acl.cc7
-rw-r--r--sql/sql_acl.h5
-rw-r--r--sql/sql_analyse.cc5
-rw-r--r--sql/sql_analyse.h5
-rw-r--r--sql/sql_array.h3
-rw-r--r--sql/sql_base.cc79
-rw-r--r--sql/sql_bitmap.h3
-rw-r--r--sql/sql_cache.cc59
-rw-r--r--sql/sql_cache.h5
-rw-r--r--sql/sql_class.cc76
-rw-r--r--sql/sql_class.h47
-rw-r--r--sql/sql_client.cc5
-rw-r--r--sql/sql_crypt.cc5
-rw-r--r--sql/sql_crypt.h5
-rw-r--r--sql/sql_cursor.cc5
-rw-r--r--sql/sql_cursor.h10
-rw-r--r--sql/sql_db.cc5
-rw-r--r--sql/sql_delete.cc5
-rw-r--r--sql/sql_derived.cc3
-rw-r--r--sql/sql_do.cc5
-rw-r--r--sql/sql_error.cc3
-rw-r--r--sql/sql_error.h3
-rw-r--r--sql/sql_handler.cc42
-rw-r--r--sql/sql_help.cc3
-rw-r--r--sql/sql_insert.cc25
-rw-r--r--sql/sql_lex.cc16
-rw-r--r--sql/sql_lex.h61
-rw-r--r--sql/sql_list.cc5
-rw-r--r--sql/sql_list.h71
-rw-r--r--sql/sql_load.cc19
-rw-r--r--sql/sql_locale.cc1357
-rw-r--r--sql/sql_manager.cc5
-rw-r--r--sql/sql_manager.h5
-rw-r--r--sql/sql_map.cc5
-rw-r--r--sql/sql_map.h5
-rw-r--r--sql/sql_olap.cc5
-rw-r--r--sql/sql_parse.cc395
-rw-r--r--sql/sql_prepare.cc6
-rw-r--r--sql/sql_rename.cc7
-rw-r--r--sql/sql_repl.cc5
-rw-r--r--sql/sql_repl.h5
-rw-r--r--sql/sql_select.cc92
-rw-r--r--sql/sql_select.h5
-rw-r--r--sql/sql_show.cc11
-rw-r--r--sql/sql_sort.h3
-rw-r--r--sql/sql_state.c3
-rw-r--r--sql/sql_string.cc3
-rw-r--r--sql/sql_string.h9
-rw-r--r--sql/sql_table.cc313
-rw-r--r--sql/sql_test.cc5
-rw-r--r--sql/sql_trigger.cc12
-rw-r--r--sql/sql_trigger.h3
-rw-r--r--sql/sql_udf.cc9
-rw-r--r--sql/sql_udf.h5
-rw-r--r--sql/sql_union.cc3
-rw-r--r--sql/sql_update.cc147
-rw-r--r--sql/sql_view.cc16
-rw-r--r--sql/sql_view.h3
-rw-r--r--sql/sql_yacc.yy76
-rw-r--r--sql/stacktrace.c3
-rw-r--r--sql/stacktrace.h3
-rw-r--r--sql/strfunc.cc3
-rw-r--r--sql/structs.h5
-rw-r--r--sql/table.cc21
-rw-r--r--sql/table.h5
-rw-r--r--sql/thr_malloc.cc5
-rw-r--r--sql/time.cc5
-rw-r--r--sql/tzfile.h3
-rw-r--r--sql/tztime.cc13
-rw-r--r--sql/tztime.h3
-rw-r--r--sql/udf_example.c34
-rw-r--r--sql/udf_example.def2
-rw-r--r--sql/uniques.cc49
-rw-r--r--sql/unireg.cc5
-rw-r--r--sql/unireg.h5
-rwxr-xr-xstrings/CMakeLists.txt15
-rw-r--r--strings/Makefile.am5
-rw-r--r--strings/bchange.c3
-rw-r--r--strings/bcmp.c3
-rw-r--r--strings/bcopy-duff.c3
-rw-r--r--strings/bfill.c4
-rw-r--r--strings/bmove.c4
-rw-r--r--strings/bmove512.c3
-rw-r--r--strings/bmove_upp-sparc.s6
-rw-r--r--strings/bmove_upp.c3
-rw-r--r--strings/bzero.c3
-rw-r--r--strings/conf_to_src.c12
-rw-r--r--strings/ctype-big5.c3
-rw-r--r--strings/ctype-bin.c4
-rw-r--r--strings/ctype-cp932.c3
-rw-r--r--strings/ctype-czech.c3
-rw-r--r--strings/ctype-euc_kr.c3
-rw-r--r--strings/ctype-eucjpms.c4
-rw-r--r--strings/ctype-extra.c30
-rw-r--r--strings/ctype-gb2312.c3
-rw-r--r--strings/ctype-gbk.c3
-rw-r--r--strings/ctype-latin1.c3
-rw-r--r--strings/ctype-mb.c3
-rw-r--r--strings/ctype-simple.c7
-rw-r--r--strings/ctype-sjis.c3
-rw-r--r--strings/ctype-tis620.c3
-rw-r--r--strings/ctype-uca.c4
-rw-r--r--strings/ctype-ucs2.c4
-rw-r--r--strings/ctype-ujis.c4
-rw-r--r--strings/ctype-utf8.c4
-rw-r--r--strings/ctype-win1250ch.c3
-rw-r--r--strings/ctype.c3
-rw-r--r--strings/decimal.c37
-rw-r--r--strings/do_ctype.c3
-rw-r--r--strings/dump_map.c15
-rw-r--r--strings/int2str.c3
-rw-r--r--strings/is_prefix.c3
-rw-r--r--strings/llstr.c3
-rw-r--r--strings/longlong2str-x86.s3
-rw-r--r--strings/longlong2str.c3
-rw-r--r--strings/longlong2str_asm.c3
-rw-r--r--strings/macros.asm6
-rw-r--r--strings/memcmp.c3
-rw-r--r--strings/memcpy.c3
-rw-r--r--strings/memset.c3
-rw-r--r--strings/my_strtoll10-x86.s6
-rw-r--r--strings/my_strtoll10.c3
-rw-r--r--strings/my_vsnprintf.c3
-rw-r--r--strings/ptr_cmp.asm6
-rw-r--r--strings/r_strinstr.c3
-rw-r--r--strings/str2int.c3
-rw-r--r--strings/str_alloc.c3
-rw-r--r--strings/str_test.c3
-rw-r--r--strings/strappend-sparc.s6
-rw-r--r--strings/strappend.c3
-rw-r--r--strings/strcat.c3
-rw-r--r--strings/strcend.c3
-rw-r--r--strings/strchr.c3
-rw-r--r--strings/strcmp.c3
-rw-r--r--strings/strcont.c3
-rw-r--r--strings/strend-sparc.s6
-rw-r--r--strings/strend.c4
-rw-r--r--strings/strfill.c3
-rw-r--r--strings/strings-not-used.h3
-rw-r--r--strings/strings-x86.s3
-rw-r--r--strings/strings.asm6
-rw-r--r--strings/strinstr-sparc.s6
-rw-r--r--strings/strinstr.c3
-rw-r--r--strings/strlen.c3
-rw-r--r--strings/strmake-sparc.s6
-rw-r--r--strings/strmake.c3
-rw-r--r--strings/strmov-sparc.s6
-rw-r--r--strings/strmov.c3
-rw-r--r--strings/strnlen.c3
-rw-r--r--strings/strnmov-sparc.s6
-rw-r--r--strings/strnmov.c3
-rw-r--r--strings/strrchr.c3
-rw-r--r--strings/strstr-sparc.s6
-rw-r--r--strings/strstr.c4
-rw-r--r--strings/strto.c3
-rw-r--r--strings/strtod.c20
-rw-r--r--strings/strtol.c3
-rw-r--r--strings/strtoll.c3
-rw-r--r--strings/strtoul.c3
-rw-r--r--strings/strtoull.c3
-rw-r--r--strings/strxmov-sparc.s6
-rw-r--r--strings/strxmov.asm6
-rw-r--r--strings/strxmov.c4
-rw-r--r--strings/strxnmov.c4
-rw-r--r--strings/t_ctype.h3
-rw-r--r--strings/uca-dump.c15
-rw-r--r--strings/udiv.c3
-rw-r--r--strings/utr11-dump.c15
-rw-r--r--strings/xml.c3
-rw-r--r--support-files/MacOSX/Makefile.am6
-rw-r--r--support-files/Makefile.am6
-rw-r--r--support-files/MySQL-shared-compat.spec.sh5
-rw-r--r--support-files/mysql.server.sh2
-rw-r--r--support-files/mysql.spec.sh21
-rwxr-xr-xtests/CMakeLists.txt15
-rw-r--r--tests/Makefile.am20
-rw-r--r--tests/connect_test.c3
-rw-r--r--tests/deadlock_test.c5
-rw-r--r--tests/insert_test.c3
-rw-r--r--tests/list_test.c3
-rw-r--r--tests/mysql_client_test.c95
-rw-r--r--tests/select_test.c3
-rw-r--r--tests/showdb_test.c3
-rw-r--r--tests/ssl_test.c3
-rw-r--r--tests/thread_test.c3
-rw-r--r--tools/Makefile.am14
-rw-r--r--tools/mysqlmanager.c5
-rwxr-xr-xvio/CMakeLists.txt15
-rw-r--r--vio/Makefile.am43
-rw-r--r--vio/test-ssl.c3
-rw-r--r--vio/test-sslclient.c3
-rw-r--r--vio/test-sslserver.c3
-rw-r--r--vio/vio.c3
-rw-r--r--vio/vio_priv.h3
-rw-r--r--vio/viosocket.c3
-rw-r--r--vio/viossl.c17
-rw-r--r--vio/viosslfactories.c3
-rw-r--r--vio/viotest-ssl.c3
-rwxr-xr-xwin/Makefile.am5
-rw-r--r--win/README3
-rwxr-xr-xwin/build-vs71.bat15
-rwxr-xr-xwin/build-vs8.bat15
-rwxr-xr-xwin/build-vs8_x64.bat15
-rwxr-xr-xwin/configure.js16
-rwxr-xr-xzlib/CMakeLists.txt15
-rw-r--r--zlib/Makefile.am7
2296 files changed, 19067 insertions, 10488 deletions
diff --git a/.bzrignore b/.bzrignore
index d6086ba4a76..ca4ba1432aa 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -9,6 +9,8 @@
*.d
*.da
*.exe
+*.gcda
+*.gcno
*.gcov
*.idb
*.la
@@ -209,6 +211,11 @@ bdb/dist/autom4te.cache/requests
bdb/dist/autom4te.cache/traces.0
bdb/dist/config.hin
bdb/dist/configure
+bdb/dist/db.h
+bdb/dist/db_config.h
+bdb/dist/db_cxx.h
+bdb/dist/db_int.h
+bdb/dist/include.tcl
bdb/dist/tags
bdb/dist/template/db_server_proc
bdb/dist/template/gen_client_ret
@@ -334,6 +341,7 @@ client/sql_string.cpp
client/ssl_test
client/thimble
client/thread_test
+client/tmp.diff
client_debug/*
client_release/*
client_test
@@ -697,6 +705,7 @@ mysql-test/r/*.err
mysql-test/r/*.log
mysql-test/r/*.out
mysql-test/r/*.reject
+mysql-test/r/*.warnings
mysql-test/r/alter_table.err
mysql-test/r/archive.err
mysql-test/r/bdb-alter-table-1.err
@@ -762,10 +771,12 @@ mysql-test/r/rpl000016.eval
mysql-test/r/rpl_log.eval
mysql-test/r/slave-running.eval
mysql-test/r/slave-stopped.eval
+mysql-test/r/tmp.result
mysql-test/r/udf.log
mysql-test/share/mysql
mysql-test/std_data/*.pem
mysql-test/t/index_merge.load
+mysql-test/t/tmp.test
mysql-test/var
mysql-test/var/*
mysql.kdevprj
@@ -1322,4 +1333,3 @@ win/vs71cache.txt
win/vs8cache.txt
zlib/*.ds?
zlib/*.vcproj
-mysql-test/r/*.warnings
diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am
index a5f3623c25e..3fd61790903 100644
--- a/BUILD/Makefile.am
+++ b/BUILD/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2002, 2004-2005 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index fb69fd0acae..55f4e62327b 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -5,9 +5,13 @@
#
check_cpu () {
- if test -r /proc/cpuinfo ; then
+ CPUINFO=/proc/cpuinfo
+ if test -n "$TEST_CPUINFO" ; then
+ CPUINFO=$TEST_CPUINFO
+ fi
+ if test -r "$CPUINFO" -a "$CPUINFO" != " " ; then
# on Linux (and others?) we can get detailed CPU information out of /proc
- cpuinfo="cat /proc/cpuinfo"
+ cpuinfo="cat $CPUINFO"
# detect CPU family
cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
@@ -28,11 +32,12 @@ check_cpu () {
fi
# parse CPU flags
- for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do
+ for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do
eval cpu_flag_$flag=yes
done
else
# Fallback when there is no /proc/cpuinfo
+ CPUINFO=" "
case "`uname -s`" in
FreeBSD|OpenBSD)
cpu_family=`uname -m`;
@@ -84,6 +89,18 @@ check_cpu () {
*Pentium*M*pro*)
cpu_arg="pentium-m";
;;
+ *Celeron\(R\)*\ M*)
+ cpu_arg="pentium-m";
+ ;;
+ *Celeron*Coppermine*)
+ cpu_arg="pentium3"
+ ;;
+ *Celeron\(R\)*)
+ cpu_arg="pentium4"
+ ;;
+ *Celeron*)
+ cpu_arg="pentium2";
+ ;;
*Athlon*64*)
cpu_arg="athlon64";
;;
@@ -120,7 +137,14 @@ check_cpu () {
esac
- if test -z "$cpu_arg"; then
+ if test -z "$cpu_arg" ; then
+ if test "$CPUINFO" != " " ; then
+ # fallback to uname if necessary
+ TEST_CPUINFO=" "
+ check_cpu_cflags=""
+ check_cpu
+ return
+ fi
echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2
check_cpu_cflags=""
return
@@ -177,8 +201,7 @@ check_cpu () {
touch __test.c
while [ "$cpu_arg" ] ; do
- # FIXME: echo -n isn't portable - see contortions autoconf goes through
- echo -n testing $cpu_arg "... " >&2
+ printf "testing $cpu_arg ... " >&2
# compile check
check_cpu_cflags=`eval echo $check_cpu_args`
diff --git a/BitKeeper/etc/collapsed b/BitKeeper/etc/collapsed
index 10bc7a2182a..eb205a2ac2f 100644
--- a/BitKeeper/etc/collapsed
+++ b/BitKeeper/etc/collapsed
@@ -18,4 +18,16 @@
452c6c6dAjuNghfc1ObZ_UQ5SCl85g
4538a7b0EbDHHkWPbIwxO6ZIDdg6Dg
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
+454bb488ijVLOUK_GFjcoISE0GxPUA
+454bb9a8AwlGRC_wWLS2sNMoRBMRGw
+454c946ciQoR4dfTBZ0RTBmGJKp6lw
+454f6e7eAnfLD9OCbGr5X9KiKvfKcQ
+454f704bJiJy0_Nx2drY9P5kK3uOzg
454f8960jsVT_kMKJtZ9OCgXoba0xQ
+454fa71cxshxszXJQYa9jbo0-_hAHw
+4550b0ceIcozdgQhWFUTAtWkN196lA
+4554a95d7txO1DuO9G3nAizI3SkFAA
+4554b3722d71SbPiI2Gx-RhbZjmuIQ
+4558b3d73Cxjlb7Wv1oytdSTthxDfw
+45771031yRCoM_ZfONdYchPvVEgLRg
+45ae6628gqKTsUFfnoNExadETVIkbA
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c858eebb92..b458864c410 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
PROJECT(MySql)
# This reads user configuration, generated by configure.js.
diff --git a/Docs/Makefile.am b/Docs/Makefile.am
index ad78a30118e..08ad0c3ba98 100644
--- a/Docs/Makefile.am
+++ b/Docs/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/Docs/Support/colspec-fix.pl b/Docs/Support/colspec-fix.pl
deleted file mode 100755
index 6c64edd1441..00000000000
--- a/Docs/Support/colspec-fix.pl
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/usr/bin/perl -w
-
-#
-# Script to rewrite colspecs from relative values to absolute values
-#
-
-# arjen 2002-03-14 append "cm" specifier to colwidth field.
-
-use strict;
-
-my $table_width = 12.75; # Specify the max width of the table in cm
-my $gutter_width = 0.55; # Specify the width of the gutters in cm
-
-my $str = join '', <>; # Push stdin (or file)
-
-$str =~ s{([\t ]*(<colspec colwidth=\".+?\" />\s*)+)}
- {&rel2abs($1)}ges;
-
-print STDOUT $str;
-exit;
-
-#
-# Definitions for helper sub-routines
-#
-
-sub msg {
- print STDERR shift, "\n";
-}
-
-sub rel2abs {
- my $str = shift;
- my $colnum = 1;
-
- my @widths = ();
- my $total = 0;
- my $output = '';
-
- my $gutters;
- my $content_width;
- my $total_width;
- my @num_cache;
-
- $str =~ /^(\s+)/;
- my $ws = $1;
-
- while ($str =~ m/<colspec colwidth="(\d+)\*" \/>/g) {
- $total += $1;
- push @widths, $1;
- }
-
- msg("!!! WARNING: Total Percent > 100%: $total%") if $total > 100;
-
- if (! $total) {
- die 'Something bad has happened - the script believes that there are no columns';
- }
-
- $gutters = $#widths * $gutter_width;
- $content_width = $table_width - $gutters;
- # Don't forget that $#... is the last offset not the count
-
- foreach (@widths) {
- my $temp = sprintf ("%0.2f", $_/100 * $content_width);
- $total_width += $temp;
-
- if ($total_width > $content_width) {
- $temp -= $total_width - $content_width;
- msg("!!! WARNING: Column width reduced from " .
- ($temp + ($total_width - $content_width)) . " to $temp !!!");
- $total_width -= $total_width - $content_width;
- }
-
- $output .= $ws . '<colspec colnum="'. $colnum .'" colwidth="'. $temp .'cm" />' . "\n";
- ++$colnum;
- push @num_cache, $temp;
- }
-
- return $output . "\n$ws";
-}
diff --git a/Docs/Support/docbook-fixup.pl b/Docs/Support/docbook-fixup.pl
deleted file mode 100755
index 48ab085ad3e..00000000000
--- a/Docs/Support/docbook-fixup.pl
+++ /dev/null
@@ -1,200 +0,0 @@
-#!/usr/bin/perl -w
-
-# Fix the output of `makeinfo --docbook` version 4.0c
-# Convert the broken docbook output to well-formed XML that conforms to the O'Reilly idiom
-# See code for detailed comments
-# Authors: Arjen Lentz and Zak Greant (original code by Jeremy Cole)
-
-use strict;
-
-my $data = '';
-my @apx = ();
-my $apx = '';
-my @nodes = ();
-my $nodes = '';
-
-msg ("-- Post-processing `makeinfo --docbook` output --");
-msg ("** Written to work with makeinfo version 4.0c **\n");
-
-msg ("Discarding DTD - not required by subsequent scripts");
-# <> is a magic filehandle - either reading lines from stdin or from file(s) specified on the command line
-<>;
-
-msg ("Create an XML PI with ISO-8859-1 character encoding");
-$data = "<?xml version='1.0' encoding='ISO-8859-1'?>";
-
-msg ("Get the rest of the data");
-$data = $data . join "", <>;
-
-msg ("Add missing <bookinfo> and <abstract> opening tags");
-# Note the absence of the g (global) pattern modified. This situation can only happen once.
-# ...as soon as we find the first instance, we can stop looking.
-$data =~ s/<book lang="en">/<book lang="en"><bookinfo><abstract>/;
-
-
-# arjen 2002-05-01
-msg ("Processing docbook-prefix special strings");
-$data =~ s/FIXUPmdashFIXUP/\&mdash\;/g;
-
-$data =~ s/FIXUPdoubledashFIXUP/--/g;
-
-$data =~ s/FIXUPstrongFIXUP/<emphasis\ role\=\"bold\">/g;
-$data =~ s/FIXUPendstrongFIXUP/<\/emphasis>/g;
-
-$data =~ s/FIXUPemphFIXUP/<emphasis>/g;
-$data =~ s/FIXUPendemphFIXUP/<\/emphasis>/g;
-
-$data =~ s/FIXUPfileFIXUP/<filename>/g;
-$data =~ s/FIXUPendfileFIXUP/<\/filename>/g;
-
-$data =~ s/FIXUPsampFIXUP/<literal>/g;
-$data =~ s/FIXUPendsampFIXUP/<\/literal>/g;
-
-
-msg ("Removing mailto: from email addresses...");
-$data =~ s/mailto://g;
-
-msg ("Removing INFORMALFIGURE...");
-$data =~ s{<informalfigure>.+?</informalfigure>}
- {}gs;
-
-msg ("Convert ampersand to XML escape sequence...");
-$data =~ s/&(?!\w+;)/&amp;/g;
-
-# arjen 2002-05-01
-msg ("Changing (TM) to XML escape sequence...");
-$data =~ s/MySQL \(TM\)/MySQL&trade;/g;
-$data =~ s{<command>TM</command>}
- {&trade;}g;
-
-# arjen 2002-05-01
-msg ("Changing ' -- ' to XML escape sequence...");
-$data =~ s/ -- /&mdash;/g;
-
-msg ("Changing @@ to @...");
-$data =~ s/@@/@/g;
-
-msg ("Rework references of the notation '<n>'");
-# Need to talk to Arjen about what the <n> bits are for
-$data =~ s/<(\d)>/[$1]/g;
-
-msg ("Changing '_' to '-' in references...");
-$data =~ s{((?:id|linkend)=\".+?\")}
- {&underscore2hyphen($1)}gex;
-
-msg ("Changing ULINK to SYSTEMITEM...");
-$data =~ s{<ulink url=\"(.+?)\">\s*</ulink>}
- {<systemitem role=\"url\">$1</systemitem>}gs;
-
-msg ("Adding PARA inside ENTRY...");
-$data =~ s{<entry>(.*?)</entry>}
- {<entry><para>$1</para></entry>}gs;
-
-msg ("Fixing spacing problem with titles...");
-$data =~ s{(</\w+>)(\w{2,})}
- {$1 $2}gs;
-
-msg ("Adding closing / to XREF and COLSPEC tags...");
-$data =~ s{<(xref|colspec) (.+?)>}
- {<$1 $2 />}gs;
-
-# arjen 2002-04-26
-msg ("Removing separate target titles from LINKs and make them XREFs...");
-$data =~ s{<link (linkend=.+?)>.+?</link>}
- {<xref $1 />}gs;
-
-# Probably need to strip these
-msg ('Adding "See " to XREFs that used to be @xref...');
-$data =~ s{([.'!)])\s*<xref }
- {$1 See <xref }gs;
-
-msg ('Adding "see " to (XREFs) that used to be (@pxref)...');
-$data =~ s{([([,;])(\s*)<xref }
- {$1$2see <xref }gs;
-
-msg ("Making first row in table THEAD...");
-$data =~ s{( *)<tbody>(\s*<row>.+?</row>)}
- {$1<thead>$2\n$1</thead>\n$1<tbody>}gs;
-
-msg ("Removing EMPHASIS inside THEAD...");
-$data =~ s{<thead>(.+?)</thead>}
- {"<thead>".&strip_tag($1, 'emphasis')."</thead>"}gsex;
-
-msg ("Removing empty PARA...");
-$data =~ s{<para>\s*</para>}
- {}gs;
-
-msg ("Removing lf before /PARA in ENTRY...");
-$data =~ s{\n(</para></entry>)}
- {$1}gs;
-
-msg ("Removing whitespace before /PARA if not on separate line...");
-$data =~ s{(\S+)[\t ]+</para>}
- {$1</para>}g;
-
-msg ("Removing PARA around INDEXTERM if no text in PARA...");
-$data =~ s{<para>((?:<indexterm role=\"[^"]+\">(?:<(primary|secondary)>[^>]+</\2>)+?</indexterm>)+?)\s*</para>}
- {$1}gs;
-
-@apx = ("Users", "MySQL Testimonials", "News", "GPL-license", "LGPL-license");
-
-foreach $apx (@apx) {
- msg ("Removing appendix $apx...");
- $data =~ s{<appendix id=\"$apx\">(.+?)</appendix>}
- {}gs;
-
- # Skip to next appendix regex if the regex did not match anything
- next unless (defined $&);
-
- msg ("...Building list of removed nodes...");
-
- # Split the last bracketed regex match into an array
- # Extract the node names from the tags and push them into an array
- foreach (split "\n", $&) {
- push @nodes, $1 if /<\w+ id=\"(.+?)\">/
- }
-}
-
-# 2002-02-22 arjen@mysql.com (added fix " /" to end of regex, to make it match)
-msg ("Fixing references to removed nodes...");
-# Merge the list of node names into a set of regex alternations
-$nodes = join "|", @nodes;
-
-# Find all references to removed nodes and convert them to absolute URLs
-$data =~ s{<\w+ linkend="($nodes)" />}
- {&xref2link($1)}ges;
-
-print STDOUT $data;
-exit;
-
-#
-# Definitions for helper sub-routines
-#
-
-sub msg {
- print STDERR "docbook-fixup:", shift, "\n";
-}
-
-sub strip_tag($$) {
- (my $str, my $tag) = @_;
- $str =~ s{<$tag>(.+?)</$tag>}{$1}gs;
- return $str;
-}
-
-sub underscore2hyphen($) {
- my $str = shift;
- $str =~ tr/_/-/;
- return $str;
-}
-
-sub xref2link {
- my $ref = shift;
- $ref =~ tr/ /_/;
- $ref =~ s{^((.)(.).+)$}{$2/$3/$1.html};
- return "http://www.mysql.com/doc/" . $ref;
-}
-
-# We might need to encode the high-bit characters to ensure proper representation
-# msg ("Converting high-bit characters to entities");
-# $data =~ s/([\200-\400])/&get_entity($1)>/gs;
-# There is no get_entity function yet - no point writing it til we need it :)
diff --git a/Docs/Support/docbook-prefix.pl b/Docs/Support/docbook-prefix.pl
deleted file mode 100755
index e76d84dbfe0..00000000000
--- a/Docs/Support/docbook-prefix.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl -w
-
-# Preprocess the input of `makeinfo --docbook` version 4.0c
-# Authors: Arjen Lentz and Zak Greant (started by arjen 2002-05-01)
-
-use strict;
-
-my $data = '';
-
-msg ("-- Pre-processing `makeinfo --docbook` input --");
-msg ("** Written to work with makeinfo version 4.0c **\n");
-
-# <> is a magic filehandle - either reading lines from stdin or from file(s) specified on the command line
-msg ("Get the data");
-$data = join "", <>;
-
-msg ("Replacing '\@-' with FIXUPmdashFIXUP");
-$data =~ s/\@-/FIXUPmdashFIXUP/g;
-
-msg ("Replacing '--' with FIXUPdoubledashFIXUP");
-$data =~ s/--/FIXUPdoubledashFIXUP/g;
-
-msg ("Turning \@strong{} into LITERAL blocks");
-$data =~ s/\@strong\{(.*?)\}/FIXUPstrongFIXUP$1FIXUPendstrongFIXUP/gs;
-
-msg ("Turning \@emph{} into LITERAL blocks");
-$data =~ s/\@emph\{(.*?)\}/FIXUPemphFIXUP$1FIXUPendemphFIXUP/gs;
-
-msg ("Turning \@file{} into LITERAL blocks");
-$data =~ s/\@file\{(.*?)\}/FIXUPfileFIXUP$1FIXUPendfileFIXUP/gs;
-
-msg ("Turning \@samp{} into LITERAL blocks");
-$data =~ s/\@samp\{\@\{\}/FIXUPsampFIXUP\@\{FIXUPendsampFIXUP/g;
-$data =~ s/\@samp\{\@\}\}/FIXUPsampFIXUP\@\}FIXUPendsampFIXUP/g;
-$data =~ s/\@samp\{\@\{n\@\}\}/FIXUPsampFIXUP\@\{n\@\}FIXUPendsampFIXUP/g;
-$data =~ s/\@samp\{(.*?)\}/FIXUPsampFIXUP$1FIXUPendsampFIXUP/gs;
-
-
-msg ("Write the data");
-print STDOUT $data;
-exit;
-
-#
-# Definitions for helper sub-routines
-#
-
-sub msg {
- print STDERR "docbook-prefix: ", shift, "\n";
-}
-
diff --git a/Docs/Support/docbook-split b/Docs/Support/docbook-split
deleted file mode 100755
index eafb437efe4..00000000000
--- a/Docs/Support/docbook-split
+++ /dev/null
@@ -1,70 +0,0 @@
-#! /usr/bin/perl -w
-# O'Reilly's Perl script to chop mysql.xml into separate ch/apps/index files.
-# The indexes are actually not used, they're created straight from the xrefs.
-# Breaks the MySQL reference manual into chapters, appendices, and indexes.
-
-use strict;
-
-my $app_letter = "a"; # Start appendix letters at "a"
-my $chap_num = 1; # Start chapter numbers at one (there is no preface)
-my $directory = "mysql_refman_" . time;
-my $ext = ".xml";
-my $line = "";
-my $output_name = "";
-my $start_text = "";
-
-mkdir $directory unless -d $directory;
-
-while (defined $line) {
- if ($line =~ /(<chapter.+)/i ) {
- $start_text = $1;
- $output_name = sprintf("ch%02d%s", $chap_num, $ext);
- ++$chap_num;
- &process_file("chapter");
- }
- elsif ($line =~ /(<appendix.+)/i ) {
- $start_text = $1 ;
- $output_name = "app$app_letter$ext";
- ++$app_letter;
- &process_file("appendix");
- }
- elsif ($line =~ /(<index\s+id=")(.*?)(">.*)/i ) {
- $start_text = $1 . $2 . $3;
- $output_name = lc($2) . $ext;
- &process_file("index");
- }
- else {
- # Skip junk in between chapters, appendices and indexes.
- $line = <>;
- }
-}
-
-sub process_file {
- my $marker = shift;
- my $path = "$directory/$output_name";
-
- open (OUTPUT_FILE, ">$path") or die "Cannot open $path";
-
- print STDERR "Creating $path\n";
-
- # Print out XML PI
- print OUTPUT_FILE "<?xml version='1.0' encoding='ISO-8859-1'?>\n";
-
- # Print whatever happened to appear at the end of the previous chapter.
- print OUTPUT_FILE "$start_text\n" if $start_text;
-
- while (defined $line) {
- $line = <>;
-
- # Note: Anything after the terminating marker is lost, just like
- # lines in between chapters.
- if ($line =~ /(.*<\/\s*$marker\s*>)/i ) {
- print OUTPUT_FILE "$1\n" if $1;
- close OUTPUT_FILE;
- return;
- }
- print OUTPUT_FILE $line;
- }
-}
-
-exit 0;
diff --git a/Docs/Support/generate-text-files.pl b/Docs/Support/generate-text-files.pl
index 0829525f679..69e0478eb8a 100755
--- a/Docs/Support/generate-text-files.pl
+++ b/Docs/Support/generate-text-files.pl
@@ -1,4 +1,19 @@
#!/usr/bin/perl -w -*- perl -*-
+# Copyright (C) 2000, 2003, 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# Generate text files from top directory from the manual.
$from = shift(@ARGV);
diff --git a/Docs/Support/make-docbook b/Docs/Support/make-docbook
deleted file mode 100755
index 93dbc56c0f8..00000000000
--- a/Docs/Support/make-docbook
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-# 2002-01-30 arjen@mysql.com
-# Use this to create mysql.xml (the DocBook XML format output of manual.texi)
-# Requires makeinfo 4.0c
-
-#create include.texi with version/port #
- echo "@c This file is autogenerated by the Makefile" > include.texi
- echo -n "@set mysql_version " >> include.texi
-# grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
-# sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> include.texi
-# 2002-04-26 arjen - the below just picks #.# instead of #.#.#-alpha
-# (code by mwagner - tnx)
- grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
- perl -p -e 's/AM_INIT_AUTOMAKE\(mysql,\s(\d+\.\d+)\..+/$1/' >> include.texi
- echo -n "@set default_port " >> include.texi
- grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
- sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> include.texi
-
-# produce DocBook XML
- Support/docbook-prefix.pl < manual.texi |\
- makeinfo --force --no-ifinfo --docbook -o - |\
- Support/docbook-fixup.pl > mysql.xml
-
- # See if the XML output is well-formed
- xmlwf mysql.xml
-
- # If all is well, keep processing
- cat mysql.xml | Support/colspec-fix.pl | Support/docbook-split;
-
diff --git a/Docs/Support/make-makefile b/Docs/Support/make-makefile
deleted file mode 100755
index 79cf06091fe..00000000000
--- a/Docs/Support/make-makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# Use this when you have deleted Makefile and do not want to do a full
-# build to get it back
-
-cd ..
-automake --gnu Docs/Makefile
-CONFIG_FILES=Docs/Makefile CONFIG_HEADERS= sh ./config.status
diff --git a/Docs/Support/test-make-manual b/Docs/Support/test-make-manual
deleted file mode 100755
index bd4ed4b04e3..00000000000
--- a/Docs/Support/test-make-manual
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/bin/sh
-
-needed_flags=0
-needed_texi2html=0
-needed_texinfo_tex=0
-needed_include_texi=0
-
-if [ -z $BROWSER ]; then
- BROWSER=netscape
- echo "BROWSER not set, using $BROWSER"
-fi
-
-die ()
-{
- echo
- echo $1
- cleanup
- exit 1
-}
-
-cleanup ()
-{
- echo "Cleaning up..."
- if [ $needed_flags ]; then
- bk clean Flags
- fi
-
- if [ $needed_texi2html ]; then
- bk clean Support/texi2html
- fi
-
- if [ $needed_texinfo_tex ]; then
- bk clean Support/texinfo.tex
- fi
-
- if [ $needed_include_texi ]; then
- rm -f include.texi
- fi
-
- for file in \
- manual.aux manual.cp manual.cps manual.dvi \
- manual.fn manual.fns manual.ky manual.html \
- manual.pg manual.toc manual.tp manual.vr \
- mysql.info manual_toc.html ;
- do
- rm -f $file
- done
-
-}
-
-
-if [ -e Flags/usa.txt ]; then
- echo "Good, Flags are there."
-else
- echo -n "Checking out Flags..."
- bk edit Flags >/dev/null 2>&1
- echo " Done."
- needed_flags=1
-fi
-
-if [ -e Support/texi2html ]; then
- echo "Good, texi2html is there."
-else
- echo -n "Checking out texi2html..."
- bk edit Support/texi2html >/dev/null 2>&1
- echo " Done."
- needed_texi2html=1
-fi
-
-if [ -e Support/texinfo.tex ]; then
- echo "Good, texinfo.tex is there."
-else
- echo -n "Checking out texinfo.tex..."
- bk edit Support/texinfo.tex >/dev/null 2>&1
- echo " Done."
- needed_texinfo_tex=1
-fi
-
-if [ -e include.texi ]; then
- echo "Good, include.texi is there."
-else
- echo -n "Creating include.texi..."
- bk edit ../configure.in >/dev/null 2>&1
- echo "@c This file was generated by test-make-manual" > include.texi
- echo -n "@set mysql_version " >> include.texi
- grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
- sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> include.texi
- echo -n "@set default_port " >> include.texi
- grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
- sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> include.texi
- echo " Done."
- needed_include_texi=1
-fi
-
-echo -n "Running makeinfo..."
-makeinfo --no-split -I . manual.texi
-
-if [ $? != 0 ]; then
- die "Manual has errors - fix before you commit"
-else
- echo " Looks good."
-fi
-
-
-echo -n "Running texi2html..."
-/usr/bin/perl ./Support/texi2html -iso -number manual.texi
-
-if [ $? != 0 ]; then
- die "Manual has errors - fix before you commit"
-else
- echo " Looks good."
-fi
-
-
-echo -n "Running texi2dvi..."
-texi2dvi --batch manual.texi > texi2dvi.out
-
-if [ $? != 0 ]; then
- die "Manual has errors - fix before you commit (saved in texi2dvi.out)"
-else
- rm texi2dvi.out
- echo " Looks good."
-fi
-
-echo
-echo
-echo "Please examine your modifications in \`manual.html'."
-echo
-echo "If you would like to use a different browser, set the 'BROWSER' environment"
-echo "variable."
-echo
-
-$BROWSER file:`pwd`/manual_toc.html
-
-echo "-- Press Enter to Continue --"
-read junk
-cleanup
diff --git a/Docs/Support/test-make-manual-de b/Docs/Support/test-make-manual-de
deleted file mode 100755
index a5c03001bda..00000000000
--- a/Docs/Support/test-make-manual-de
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/bin/sh
-
-needed_flags=0
-needed_texi2html=0
-needed_texinfo_tex=0
-needed_include_texi=0
-
-if [ -z $BROWSER ]; then
- BROWSER=netscape
- echo "BROWSER not set, using $BROWSER"
-fi
-
-die ()
-{
- echo
- echo $1
- cleanup
- exit 1
-}
-
-cleanup ()
-{
- echo "Cleaning up..."
- if [ $needed_flags ]; then
- bk clean Flags
- fi
-
- if [ $needed_texi2html ]; then
- bk clean Support/texi2html
- fi
-
- if [ $needed_texinfo_tex ]; then
- bk clean Support/texinfo.tex
- fi
-
- if [ $needed_include_texi ]; then
- rm -f include.texi
- fi
-
- for file in \
- manual.de.aux manual.de.cp manual.de.cps manual.de.dvi \
- manual.de.fn manual.de.fns manual.de.ky manual.de.html \
- manual.de.pg manual.de.toc manual.de.tp manual.de.vr \
- mysql.de.info manual.de_toc.html ;
- do
- rm -f $file
- done
-
-}
-
-
-if [ -e Flags/usa.txt ]; then
- echo "Good, Flags are there."
-else
- echo -n "Checking out Flags..."
- bk edit Flags >/dev/null 2>&1
- echo " Done."
- needed_flags=1
-fi
-
-if [ -e Support/texi2html ]; then
- echo "Good, texi2html is there."
-else
- echo -n "Checking out texi2html..."
- bk edit Support/texi2html >/dev/null 2>&1
- echo " Done."
- needed_texi2html=1
-fi
-
-if [ -e Support/texinfo.tex ]; then
- echo "Good, texinfo.tex is there."
-else
- echo -n "Checking out texinfo.tex..."
- bk edit Support/texinfo.tex >/dev/null 2>&1
- echo " Done."
- needed_texinfo_tex=1
-fi
-
-if [ -e include.texi ]; then
- echo "Good, include.texi is there."
-else
- echo -n "Creating include.texi..."
- bk edit ../configure.in >/dev/null 2>&1
- echo "@c This file was generated by test-make-manual" > include.texi
- echo -n "@set mysql_version " >> include.texi
- grep "AM_INIT_AUTOMAKE(mysql, " ../configure.in | \
- sed -e 's;AM_INIT_AUTOMAKE(mysql, ;;' -e 's;);;' >> include.texi
- echo -n "@set default_port " >> include.texi
- grep "MYSQL_TCP_PORT_DEFAULT=" ../configure.in | \
- sed -e 's;MYSQL_TCP_PORT_DEFAULT=;;' >> include.texi
- echo " Done."
- needed_include_texi=1
-fi
-
-echo -n "Running makeinfo..."
-makeinfo --no-split -I . manual.de.texi
-
-if [ $? != 0 ]; then
- die "Manual has errors - fix before you commit"
-else
- echo " Looks good."
-fi
-
-
-echo -n "Running texi2html..."
-/usr/bin/perl ./Support/texi2html -iso -number manual.de.texi
-
-if [ $? != 0 ]; then
- die "Manual has errors - fix before you commit"
-else
- echo " Looks good."
-fi
-
-
-echo -n "Running texi2dvi..."
-texi2dvi --batch manual.de.texi > texi2dvi.out
-
-if [ $? != 0 ]; then
- die "Manual has errors - fix before you commit (saved in texi2dvi.out)"
-else
- rm texi2dvi.out
- echo " Looks good."
-fi
-
-echo
-echo
-echo "Please examine your modifications in \`manual.de.html'."
-echo
-echo "If you would like to use a different browser, set the 'BROWSER' environment"
-echo "variable."
-echo
-
-$BROWSER file:`pwd`/manual.de_toc.html
-
-echo "-- Press Enter to Continue --"
-read junk
-cleanup
diff --git a/Docs/Support/xwf b/Docs/Support/xwf
deleted file mode 100755
index 38f89774fe8..00000000000
--- a/Docs/Support/xwf
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/usr/bin/perl -w
-#
-# Parse document and report first syntax (well-formedness) error found.
-#
-
-use strict;
-use XML::Parser;
-use Getopt::Std;
-
-my %opts;
-getopts('e', \%opts);
-my $ENTREFS = exists( $opts{'e'} ); # flag: check ent refs
-
-my $parser = XML::Parser->new(
- ErrorContext => 2, # output error context
- );
-
-# get input from files
-if( @ARGV ) {
- foreach( @ARGV ) {
- my $file = $_;
- unless( -r $file ) {
- print STDERR "ERROR: Can't open '$file'.\n";
- return;
- }
- my $input = '';
- open( F, $file );
- while( <F> ) { $input .= $_; }
- close F;
-
- # parse and report errors
- if( &parse_string( $input )) {
- print STDERR "ERROR in $file:\n$@\n";
- } else {
- print STDERR "'$file' is well-formed.\n";
- }
- }
- print "All files checked.\n";
-
-# get input from STDIN
-} else {
- my $input = "";
- while( <STDIN> ) { $input .= $_; }
- if( &parse_string( $input )) {
- print STDERR "ERROR in stream:\n$@\n";
- } else {
- print STDERR "No syntax errors found in XML stream.\n";
- }
-}
-
-
-# parse the string and return error message
-#
-# NOTE: By default, entity refs are not expanded. XML::Parser can be
-# told not to expand entity refs, but will still try to find
-# replacement text just in case, which we don't want. Therefore, we
-# need to do a stupid regexp replacement, removing entities from input.
-#
-sub parse_string {
- my $string = shift;
- unless( $ENTREFS ) {
- $string =~ s/\&[^\s;]+;//g; # remove entity references
- }
- eval { $parser->parse( $string ); };
- $@ =~ s/at \/.*?$//s; # remove module line number
- return $@;
-}
diff --git a/Makefile.am b/Makefile.am
index 1a0afdf25f4..798d1944fd0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -49,6 +48,14 @@ BUILT_SOURCES = linked_client_sources linked_server_sources \
CLEANFILES = $(BUILT_SOURCES) bdb/build_unix/db.h
DISTCLEANFILES = ac_available_languages_fragment
+# Our current filtering of "sql_yacc.cc" in "sql/Makefile.am" creates
+# a problem, if a VPATH build and "sql_yacc.cc" was part of the source
+# distribution we end up with one "sql_yacc.cc" in the source tree,
+# and one in the build tree. This breaks "distcleancheck", until this
+# is sorted out we redefine the find that scans for files not removed
+
+distcleancheck_listfiles = find . -name sql_yacc.cc -o -type f -print
+
linked_include_sources:
cd include; $(MAKE) link_sources
echo timestamp > linked_include_sources
@@ -92,19 +99,20 @@ bin-dist: all
# Create initial database files for Windows installations.
dist-hook:
rm -rf `find $(distdir) -type d -name SCCS -print`
- if echo "$(distdir)" | grep -q '^/' ; then \
- scripts/mysql_install_db --no-defaults --windows \
- --basedir=$(top_srcdir) \
- --datadir="$(distdir)/win/data"; \
- else \
- scripts/mysql_install_db --no-defaults --windows \
- --basedir=$(top_srcdir) \
- --datadir="$$(pwd)/$(distdir)/win/data"; \
- fi
+ rm -f `find $(distdir) -type l -print`
+ mkdir -p $(distdir)/win
+ scripts/mysql_install_db --no-defaults --windows \
+ --basedir=$(top_builddir) \
+ --datadir=$(distdir)/win/data \
+ --srcdir=$(top_srcdir)
tags:
support-files/build-tags
-.PHONY: init-db bin-dist
+
+.PHONY: init-db bin-dist \
+ test test-force test-full test-force-full test-force-mem \
+ test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
+ test-ps test-ns
# Target 'test' will run the regression test suite using the built server.
#
@@ -114,33 +122,34 @@ tags:
# will then calculate the various port numbers it needs from this,
# making sure each user use different ports.
-test:
+test-ps:
+ @PERL@ ./mysql-test-run.pl $(force) --ps-protocol
+
+test-ns:
cd mysql-test ; \
- ./mysql-test-run && \
- ./mysql-test-run --ps-protocol
+ @PERL@ ./mysql-test-run.pl $(force)
-test-force:
- cd mysql-test; \
- ./mysql-test-run --force && \
- ./mysql-test-run --ps-protocol --force
+test: test-ns test-ps
-# We are testing a new Perl version of the test script
-test-pl:
- cd mysql-test; \
- ./mysql-test-run.pl && \
- ./mysql-test-run.pl --ps-protocol
+# To ease script-writing, although in 5.0 it is identical to 'test'
+test-full: test
-test-force-pl:
- cd mysql-test; \
- ./mysql-test-run.pl --force && \
- ./mysql-test-run.pl --ps-protocol --force
+test-force:
+ $(MAKE) force=--force test
+
+test-force-full:
+ $(MAKE) force=--force test-full
#used by autopush.pl to run memory based tests
-test-force-pl-mem:
- cd mysql-test; \
- ./mysql-test-run.pl --force --mem && \
- ./mysql-test-run.pl --ps-protocol --force --mem
+test-force-mem:
+ $(MAKE) 'force=--force --mem' test
+
+# Keep these for a while
+test-pl: test
+test-full-pl: test-full
+test-force-pl: test-force
+test-force-pl-mem: test-force-mem
+test-force-full-pl: test-force-full
# Don't update the files from bitkeeper
%::SCCS/s.%
-
diff --git a/SSL/Makefile.am b/SSL/Makefile.am
index 6edc6146a29..5fc44d3a247 100644
--- a/SSL/Makefile.am
+++ b/SSL/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2003, 2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/VC++Files/copy_mysql_files.bat b/VC++Files/copy_mysql_files.bat
index 2857fabc312..7d6070eb1a8 100644
--- a/VC++Files/copy_mysql_files.bat
+++ b/VC++Files/copy_mysql_files.bat
@@ -1,5 +1,22 @@
REM stop any conflicting service
+@echo off
+REM Copyright (C) 2004 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+@echo on
+
net stop mysql
REM Copy binaries to c:\mysql
diff --git a/VC++Files/mysys/mysys.vcproj b/VC++Files/mysys/mysys.vcproj
index 3f2c5e755ac..87100ce8e5e 100644
--- a/VC++Files/mysys/mysys.vcproj
+++ b/VC++Files/mysys/mysys.vcproj
@@ -3418,6 +3418,49 @@
</FileConfiguration>
</File>
<File
+ RelativePath="my_getpagesize.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Max|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="TLS_DEBUG|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="TLS|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="my_mmap.c">
<FileConfiguration
Name="Debug|Win32">
diff --git a/VC++Files/prepare b/VC++Files/prepare
index f68d0676fc9..d106e277e45 100755
--- a/VC++Files/prepare
+++ b/VC++Files/prepare
@@ -1,4 +1,18 @@
#!/bin/sh
+# Copyright (C) 2002, 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
if [ -f prepare_done ]
then
diff --git a/VC++Files/test1/mysql_thr.c b/VC++Files/test1/mysql_thr.c
index a1ac09f2784..c1f8527748a 100644
--- a/VC++Files/test1/mysql_thr.c
+++ b/VC++Files/test1/mysql_thr.c
@@ -1,3 +1,18 @@
+/* Copyright (C) 2002, 2004-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
/* Testing of connecting to MySQL from X threads */
#include <windows.h>
diff --git a/VC++Files/thr_test/thr_test.c b/VC++Files/thr_test/thr_test.c
index efb9ea27ba7..acb203023b3 100644
--- a/VC++Files/thr_test/thr_test.c
+++ b/VC++Files/thr_test/thr_test.c
@@ -1,3 +1,18 @@
+/* Copyright (C) 2003-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
/* Testing of thread creation to find memory allocation bug
** This is coded to use as few extern functions as possible!
**
diff --git a/bdb/CMakeLists.txt b/bdb/CMakeLists.txt
index c5dd60852d4..be28f58a0d3 100755
--- a/bdb/CMakeLists.txt
+++ b/bdb/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/bdb/Makefile.in b/bdb/Makefile.in
index d40fffed769..ca63bf73a1d 100644
--- a/bdb/Makefile.in
+++ b/bdb/Makefile.in
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2001-2003, 2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 09a6a3f1e2a..2edb1489f81 100755
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
@@ -66,7 +81,7 @@ TARGET_LINK_LIBRARIES(mysqldump mysqlclient mysys dbug yassl taocrypt zlib wsock
ADD_EXECUTABLE(mysqlimport mysqlimport.c)
TARGET_LINK_LIBRARIES(mysqlimport mysqlclient mysys dbug yassl taocrypt zlib wsock32)
-ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c)
+ADD_EXECUTABLE(mysql_upgrade mysql_upgrade.c ../mysys/my_getpagesize.c)
TARGET_LINK_LIBRARIES(mysql_upgrade mysqlclient mysys dbug yassl taocrypt zlib wsock32)
ADD_EXECUTABLE(mysqlshow mysqlshow.c)
diff --git a/client/Makefile.am b/client/Makefile.am
index 29624f2017f..2cb7dce64f9 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,11 +15,6 @@
# This file is public domain and comes with NO WARRANTY of any kind
-if HAVE_YASSL
- yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
-else
- yassl_dummy_link_fix=
-endif
#AUTOMAKE_OPTIONS = nostdinc
INCLUDES = -I$(top_builddir)/include \
-I$(top_srcdir)/include \
@@ -40,27 +34,29 @@ mysqladmin_SOURCES = mysqladmin.cc
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
mysqltest_SOURCES= mysqltest.c \
$(top_srcdir)/mysys/my_getsystime.c \
- $(top_srcdir)/mysys/my_copy.c \
- $(yassl_dummy_link_fix)
+ $(top_srcdir)/mysys/my_copy.c
+
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
-mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c $(top_srcdir)/mysys/my_new.cc
+mysqlbinlog_SOURCES = mysqlbinlog.cc \
+ $(top_srcdir)/mysys/mf_tempdir.c \
+ $(top_srcdir)/mysys/my_new.cc
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
-mysqltestmanager_pwgen_SOURCES = mysqlmanager-pwgen.c
-mysqltestmanagerc_SOURCES= mysqlmanagerc.c $(yassl_dummy_link_fix)
-mysqlcheck_SOURCES= mysqlcheck.c $(yassl_dummy_link_fix)
-mysqlshow_SOURCES= mysqlshow.c $(yassl_dummy_link_fix)
+mysqltestmanager_pwgen_SOURCES = mysqlmanager-pwgen.c
+mysqltestmanagerc_SOURCES= mysqlmanagerc.c
+mysqlcheck_SOURCES= mysqlcheck.c
+mysqlshow_SOURCES= mysqlshow.c
mysqldump_SOURCES= mysqldump.c my_user.c \
- $(top_srcdir)/mysys/mf_getdate.c \
- $(yassl_dummy_link_fix)
-mysqlimport_SOURCES= mysqlimport.c $(yassl_dummy_link_fix)
-mysql_upgrade_SOURCES= mysql_upgrade.c $(yassl_dummy_link_fix)
+ $(top_srcdir)/mysys/mf_getdate.c
+mysqlimport_SOURCES= mysqlimport.c
+mysql_upgrade_SOURCES= mysql_upgrade.c \
+ $(top_srcdir)/mysys/my_getpagesize.c
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c
# Fix for mit-threads
DEFS = -DUNDEF_THREADS_HACK \
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
- -DDATADIR="\"$(localstatedir)\""
+ -DDATADIR="\"$(localstatedir)\""
EXTRA_DIST = get_password.c CMakeLists.txt
diff --git a/client/client_priv.h b/client/client_priv.h
index 7ebbade4ef6..7748dc612d6 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/completion_hash.cc b/client/completion_hash.cc
index 7a3b363c93c..4c777f8a704 100644
--- a/client/completion_hash.cc
+++ b/client/completion_hash.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/completion_hash.h b/client/completion_hash.h
index 2595a445c9d..b91d6e4d187 100644
--- a/client/completion_hash.h
+++ b/client/completion_hash.h
@@ -1,9 +1,9 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/get_password.c b/client/get_password.c
index 1b7b4e65a9f..e7e6c850469 100644
--- a/client/get_password.c
+++ b/client/get_password.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/my_readline.h b/client/my_readline.h
index 6052d462ab9..47be7fa9294 100644
--- a/client/my_readline.h
+++ b/client/my_readline.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/mysql.cc b/client/mysql.cc
index d0965588b80..4e479f3ff70 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -819,10 +818,23 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
default_charset_used= 1;
break;
case OPT_DELIMITER:
- if (argument == disabled_my_option)
+ if (argument == disabled_my_option)
+ {
strmov(delimiter, DEFAULT_DELIMITER);
- else
- strmake(delimiter, argument, sizeof(delimiter) - 1);
+ }
+ else
+ {
+ /* Check that delimiter does not contain a backslash */
+ if (!strstr(argument, "\\"))
+ {
+ strmake(delimiter, argument, sizeof(delimiter) - 1);
+ }
+ else
+ {
+ put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
+ return 0;
+ }
+ }
delimiter_length= (uint)strlen(delimiter);
delimiter_str= delimiter;
break;
@@ -2397,7 +2409,6 @@ print_table_data(MYSQL_RES *result)
const char *buffer;
uint data_length;
uint field_max_length;
- bool right_justified;
uint visible_length;
uint extra_padding;
@@ -3041,6 +3052,14 @@ com_delimiter(String *buffer __attribute__((unused)), char *line)
INFO_ERROR);
return 0;
}
+ else
+ {
+ if (strstr(tmp, "\\"))
+ {
+ put_info("DELIMITER cannot contain a backslash character", INFO_ERROR);
+ return 0;
+ }
+ }
strmake(delimiter, tmp, sizeof(delimiter) - 1);
delimiter_length= (int)strlen(delimiter);
delimiter_str= delimiter;
@@ -3446,7 +3465,6 @@ server_version_string(MYSQL *mysql)
{
char *bufp = buf;
MYSQL_RES *result;
- MYSQL_ROW cur;
bufp = strnmov(buf, mysql_get_server_info(mysql), sizeof buf);
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 520d87b5ed7..8eb72af6b9d 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -31,10 +30,12 @@
const char *mysqlcheck_name= "mysqlcheck.exe";
const char *mysql_name= "mysql.exe";
const char *mysqld_name= "mysqld.exe";
+#define EXTRA_CLIENT_PATHS "client/release", "client/debug"
#else
const char *mysqlcheck_name= "mysqlcheck";
const char *mysql_name= "mysql";
const char *mysqld_name= "mysqld";
+#define EXTRA_CLIENT_PATHS "client"
#endif /*__WIN__*/
extern TYPELIB sql_protocol_typelib;
@@ -142,6 +143,7 @@ void set_extra_default(int id, const struct my_option *opt)
case 'f': /* --force is ours */
case 'u': /* --user passed on cmdline */
case 'T': /* --debug-info is not accepted by mysqlcheck */
+ case 'p': /* --password may change yet */
/* so, do nothing */
break;
default:
@@ -173,7 +175,7 @@ void set_extra_default(int id, const struct my_option *opt)
d->id= id;
d->name= opt->name;
d->n_len= strlen(opt->name);
- if (opt->arg_type != NO_ARG)
+ if (opt->arg_type != NO_ARG && opt->value)
switch (opt->var_type & GET_TYPE_MASK) {
case GET_BOOL:
if (*((int *)opt->value))
@@ -319,6 +321,15 @@ static int create_defaults_file(const char *path, const char *forced_path)
}
dynstr_set(&buf, "\n[client]");
+ if (opt_password)
+ {
+ if (dynstr_append(&buf, "\npassword=")
+ || dynstr_append(&buf, opt_password))
+ {
+ ret = 1;
+ goto error;
+ }
+ }
while (extra_defaults)
{
int len;
@@ -459,7 +470,12 @@ int main(int argc, char **argv)
load_defaults("my", load_default_groups, &argc, &argv);
- if (handle_options(&argc, &argv, my_long_options, get_one_option))
+ /*
+ Must init_dynamic_string before handle_options because string is freed
+ at error label.
+ */
+ if (init_dynamic_string(&cmdline, NULL, 2 * FN_REFLEN + 128, FN_REFLEN) ||
+ handle_options(&argc, &argv, my_long_options, get_one_option))
{
ret= 1;
goto error;
@@ -467,11 +483,6 @@ int main(int argc, char **argv)
if (tty_password)
opt_password= get_tty_password(NullS);
- if (init_dynamic_string(&cmdline, NULL, 2 * FN_REFLEN + 128, FN_REFLEN))
- {
- ret= 1;
- goto error;
- }
if (!basedir)
{
my_getwd(path, sizeof(path), MYF(0));
@@ -499,8 +510,9 @@ int main(int argc, char **argv)
"mysql", NullS))
{
ret= 1;
- puts("Can't find data directory. Please restart with"
- " --datadir=path-to-writable-data-dir");
+ fprintf(stderr,
+ "Can't find data directory. Please restart with"
+ " --datadir=path-to-writable-data-dir");
goto error;
}
@@ -543,25 +555,44 @@ int main(int argc, char **argv)
}
if (find_file(mysqlcheck_name, basedir, MYF(0), path, sizeof(path),
- "bin", NullS))
+ "bin", EXTRA_CLIENT_PATHS, NullS))
{
ret= 1;
- printf("Can't find program '%s'\n", mysqlcheck_name);
- puts("Please restart with --basedir=mysql-install-directory");
+ fprintf(stderr,
+ "Can't find program '%s'\n"
+ "Please restart with --basedir=mysql-install-directory",
+ mysqlcheck_name);
goto error;
}
else
- dynstr_set(&cmdline, path);
+ {
+#ifdef __WIN__
+ /* Windows requires an extra pair of quotes around the entire string. */
+ dynstr_set(&cmdline, "\"");
+#else
+ dynstr_set(&cmdline, "");
+#endif /* __WIN__ */
+ dynstr_append_os_quoted(&cmdline, path, NullS);
+ }
if (defaults_to_use)
{
- dynstr_append(&cmdline, " --defaults-extra-file=");
- dynstr_append(&cmdline, defaults_to_use);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--defaults-extra-file=",
+ defaults_to_use, NullS);
}
-
- dynstr_append(&cmdline, " --check-upgrade --all-databases"
- " --auto-repair --user=");
- dynstr_append(&cmdline, user);
+
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--check-upgrade", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--all-databases", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--auto-repair", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--user=", user, NullS);
+#ifdef __WIN__
+ dynstr_append(&cmdline, "\"");
+#endif /* __WIN__ */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
@@ -569,7 +600,7 @@ int main(int argc, char **argv)
ret= system(cmdline.str);
if (ret)
{
- printf("Error executing '%s'\n", cmdline.str);
+ fprintf(stderr, "Error executing '%s'\n", cmdline.str);
goto error;
}
@@ -580,29 +611,39 @@ int main(int argc, char **argv)
fix_priv_tables:
if (find_file(mysql_name, basedir, MYF(0), path, sizeof(path),
- "bin", NullS))
+ "bin", EXTRA_CLIENT_PATHS, NullS))
{
ret= 1;
- puts("Could not find MySQL command-line client (mysql).\n"
- "Please use --basedir to specify the directory"
- " where MySQL is installed.");
+ fprintf(stderr,
+ "Could not find MySQL command-line client (mysql).\n"
+ "Please use --basedir to specify the directory"
+ " where MySQL is installed.");
goto error;
}
else
- dynstr_set(&cmdline, path);
+ {
+#ifdef __WIN__
+ /* Windows requires an extra pair of quotes around the entire string. */
+ dynstr_set(&cmdline, "\"");
+#else
+ dynstr_set(&cmdline, "");
+#endif /* __WIN__ */
+ dynstr_append_os_quoted(&cmdline, path, NullS);
+ }
if (find_file(MYSQL_FIX_PRIV_TABLES_NAME, basedir, MYF(0),
path, sizeof(path),
- "support_files", "share/mysql", "scripts",
+ "support_files", "share", "share/mysql", "scripts",
NullS)
&& find_file(MYSQL_FIX_PRIV_TABLES_NAME, "/usr/local/mysql", MYF(0),
path, sizeof(path),
"share/mysql", NullS))
{
ret= 1;
- puts("Could not find file " MYSQL_FIX_PRIV_TABLES_NAME "\n"
- "Please use --basedir to specify the directory"
- " where MySQL is installed");
+ fprintf(stderr,
+ "Could not find file " MYSQL_FIX_PRIV_TABLES_NAME "\n"
+ "Please use --basedir to specify the directory"
+ " where MySQL is installed");
goto error;
}
else
@@ -610,20 +651,32 @@ fix_priv_tables:
if (defaults_to_use)
{
- dynstr_append(&cmdline, " --defaults-extra-file=");
- dynstr_append(&cmdline, defaults_to_use);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--defaults-extra-file=",
+ defaults_to_use, NullS);
}
- dynstr_append(&cmdline, " --force --no-auto-rehash --batch --user=");
- dynstr_append(&cmdline, user);
- dynstr_append(&cmdline, " mysql < ");
- dynstr_append(&cmdline, script_line);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--force", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--no-auto-rehash", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--batch", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--user=", user, NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--database=mysql", NullS);
+ dynstr_append(&cmdline, " < ");
+ dynstr_append_os_quoted(&cmdline, script_line, NullS);
+#ifdef __WIN__
+ dynstr_append(&cmdline, "\"");
+#endif /* __WIN__ */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
ret= system(cmdline.str);
if (ret)
- printf("Error executing '%s'\n", cmdline.str);
+ fprintf(stderr, "Error executing '%s'\n", cmdline.str);
error:
dynstr_free(&cmdline);
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 57ab4e071fb..c7033f6914f 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000-2004 MySQL AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -614,7 +613,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
case ADMIN_VER:
new_line=1;
print_version();
- puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
+ puts("Copyright (C) 2000-2006 MySQL AB");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
@@ -1003,7 +1002,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
+ puts("Copyright (C) 2000-2006 MySQL AB");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
puts("Administration program for the mysqld daemon.");
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index ff4e0b5a5cf..7489cdb334c 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -94,8 +93,10 @@ static bool stop_passed= 0;
*/
Format_description_log_event* description_event;
-static int dump_local_log_entries(const char* logname);
-static int dump_remote_log_entries(const char* logname);
+static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname);
+static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname);
static int dump_log_entries(const char* logname);
static int dump_remote_file(NET* net, const char* fname);
static void die(const char* fmt, ...);
@@ -950,8 +951,22 @@ static MYSQL* safe_connect()
static int dump_log_entries(const char* logname)
{
- return (remote_opt ? dump_remote_log_entries(logname) :
- dump_local_log_entries(logname));
+ int rc;
+ PRINT_EVENT_INFO print_event_info;
+ /*
+ Set safe delimiter, to dump things
+ like CREATE PROCEDURE safely
+ */
+ fprintf(result_file, "DELIMITER /*!*/;\n");
+ strcpy(print_event_info.delimiter, "/*!*/;");
+
+ rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
+ dump_local_log_entries(&print_event_info, logname));
+
+ /* Set delimiter back to semicolon */
+ fprintf(result_file, "DELIMITER ;\n");
+ strcpy(print_event_info.delimiter, ";");
+ return rc;
}
@@ -1016,11 +1031,11 @@ static int check_master_version(MYSQL* mysql,
}
-static int dump_remote_log_entries(const char* logname)
+static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname)
{
char buf[128];
- PRINT_EVENT_INFO print_event_info;
ulong len;
uint logname_len;
NET* net;
@@ -1143,7 +1158,7 @@ could be out of memory");
len= 1; // fake Rotate, so don't increment old_off
}
}
- if ((error= process_event(&print_event_info, ev, old_off)))
+ if ((error= process_event(print_event_info, ev, old_off)))
{
error= ((error < 0) ? 0 : 1);
goto err;
@@ -1162,7 +1177,7 @@ could be out of memory");
goto err;
}
- if ((error= process_event(&print_event_info, ev, old_off)))
+ if ((error= process_event(print_event_info, ev, old_off)))
{
my_close(file,MYF(MY_WME));
error= ((error < 0) ? 0 : 1);
@@ -1288,11 +1303,11 @@ at offset %lu ; this could be a log format error or read error",
}
-static int dump_local_log_entries(const char* logname)
+static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname)
{
File fd = -1;
IO_CACHE cache,*file= &cache;
- PRINT_EVENT_INFO print_event_info;
byte tmp_buff[BIN_LOG_HEADER_SIZE];
int error= 0;
@@ -1310,6 +1325,25 @@ static int dump_local_log_entries(const char* logname)
}
else // reading from stdin;
{
+ /*
+ Bug fix: #23735
+ Author: Chuck Bell
+ Description:
+ Windows opens stdin in text mode by default. Certain characters
+ such as CTRL-Z are interpeted as events and the read() method
+ will stop. CTRL-Z is the EOF marker in Windows. to get past this
+ you have to open stdin in binary mode. Setmode() is used to set
+ stdin in binary mode. Errors on setting this mode result in
+ halting the function and printing an error message to stderr.
+ */
+#if defined (__WIN__) || (_WIN64)
+ if (_setmode(fileno(stdin), O_BINARY) == -1)
+ {
+ fprintf(stderr, "Could not set binary mode on stdin.\n");
+ return 1;
+ }
+#endif
+
if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
return 1;
@@ -1364,7 +1398,7 @@ static int dump_local_log_entries(const char* logname)
// file->error == 0 means EOF, that's OK, we break in this case
break;
}
- if ((error= process_event(&print_event_info, ev, old_off)))
+ if ((error= process_event(print_event_info, ev, old_off)))
{
if (error < 0)
error= 0;
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 5d87a4fd23c..b69e9201a28 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 2be60b2df9a..0dfc7ee8e3c 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1419,7 +1418,7 @@ static uint dump_routines_for_db(char *db)
routine body of other routines that are not the creator of!
*/
DBUG_PRINT("info",("length of body for %s row[2] '%s' is %d",
- routine_name, row[2], strlen(row[2])));
+ routine_name, row[2], (int) strlen(row[2])));
if (strlen(row[2]))
{
char *query_str= NULL;
@@ -2001,7 +2000,7 @@ continue_xml:
write_footer(sql_file);
my_fclose(sql_file, MYF(MY_WME));
}
- DBUG_RETURN(num_fields);
+ DBUG_RETURN((uint) num_fields);
} /* get_table_structure */
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 67659684c9c..e7bf1cfd889 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -165,7 +164,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
+ puts("Copyright (C) 2000-2006 MySQL AB");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
printf("\
Loads tables from text files in various formats. The base name of the\n\
diff --git a/client/mysqlmanager-pwgen.c b/client/mysqlmanager-pwgen.c
index 1d942e207ad..716a1e4bf4e 100644
--- a/client/mysqlmanager-pwgen.c
+++ b/client/mysqlmanager-pwgen.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/mysqlmanagerc.c b/client/mysqlmanagerc.c
index 0001a0266e6..1fdedab97fb 100644
--- a/client/mysqlmanagerc.c
+++ b/client/mysqlmanagerc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/mysqlshow.c b/client/mysqlshow.c
index 40405c53565..5be01cc5a52 100644
--- a/client/mysqlshow.c
+++ b/client/mysqlshow.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -236,7 +235,7 @@ static void print_version(void)
static void usage(void)
{
print_version();
- puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB");
+ puts("Copyright (C) 2000-2006 MySQL AB");
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
puts("Shows the structure of a mysql database (databases,tables and columns)\n");
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 2063d31251d..e2d2f0f45a6 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -32,7 +31,7 @@
Holyfoot
*/
-#define MTEST_VERSION "3.0"
+#define MTEST_VERSION "3.1"
#include <my_global.h>
#include <mysql_embed.h>
@@ -103,6 +102,7 @@ static my_bool disable_query_log= 0, disable_result_log= 0;
static my_bool disable_warnings= 0, disable_ps_warnings= 0;
static my_bool disable_info= 1;
static my_bool abort_on_error= 1;
+static my_bool server_initialized= 0;
static char **default_argv;
static const char *load_default_groups[]= { "mysqltest", "client", 0 };
@@ -222,11 +222,13 @@ struct st_connection
char *name;
MYSQL_STMT* stmt;
+#ifdef EMBEDDED_LIBRARY
const char *cur_query;
int cur_query_len;
pthread_mutex_t mutex;
pthread_cond_t cond;
int query_done;
+#endif /*EMBEDDED_LIBRARY*/
};
struct st_connection connections[128];
struct st_connection* cur_con, *next_con, *connections_end;
@@ -271,6 +273,7 @@ enum enum_commands {
Q_DISABLE_PARSING, Q_ENABLE_PARSING,
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT,
+ Q_CHMOD_FILE,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
@@ -351,8 +354,10 @@ const char *command_names[]=
"copy_file",
"perl",
"die",
+
/* Don't execute any more commands, compare result */
"exit",
+ "chmod",
0
};
@@ -719,6 +724,20 @@ void close_connections()
}
+void close_statements()
+{
+ struct st_connection *con;
+ DBUG_ENTER("close_statements");
+ for (con= connections; con < next_con; con++)
+ {
+ if (con->stmt)
+ mysql_stmt_close(con->stmt);
+ con->stmt= 0;
+ }
+ DBUG_VOID_RETURN;
+}
+
+
void close_files()
{
DBUG_ENTER("close_files");
@@ -765,13 +784,18 @@ void free_used_memory()
free_all_replace();
my_free(pass,MYF(MY_ALLOW_ZERO_PTR));
free_defaults(default_argv);
- mysql_server_end();
free_re();
#ifdef __WIN__
free_tmp_sh_file();
free_win_path_patterns();
#endif
- DBUG_VOID_RETURN;
+
+ /* Only call mysql_server_end if mysql_server_init has been called */
+ if (server_initialized)
+ mysql_server_end();
+
+ /* Don't use DBUG after mysql_server_end() */
+ return;
}
@@ -946,8 +970,8 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
die(NullS);
if (!eval_result && (uint) stat_info.st_size != ds->length)
{
- DBUG_PRINT("info",("Size differs: result size: %u file size: %llu",
- ds->length, stat_info.st_size));
+ DBUG_PRINT("info",("Size differs: result size: %u file size: %lu",
+ ds->length, (ulong) stat_info.st_size));
DBUG_PRINT("info",("result: '%s'", ds->str));
DBUG_RETURN(RESULT_LENGTH_MISMATCH);
}
@@ -1235,7 +1259,9 @@ void var_set(const char *var_name, const char *var_name_end,
v->int_dirty= 0;
v->str_val_len= strlen(v->str_val);
}
- strxmov(buf, v->name, "=", v->str_val, NullS);
+ my_snprintf(buf, sizeof(buf), "%.*s=%.*s",
+ v->name_len, v->name,
+ v->str_val_len, v->str_val);
if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
die("Out of memory");
putenv(v->env_s);
@@ -1809,6 +1835,46 @@ void do_copy_file(struct st_command *command)
/*
SYNOPSIS
+ do_chmod_file
+ command command handle
+
+ DESCRIPTION
+ chmod <octal> <file>
+ Change file permission of <file>
+
+*/
+
+void do_chmod_file(struct st_command *command)
+{
+ ulong mode= 0;
+ static DYNAMIC_STRING ds_mode;
+ static DYNAMIC_STRING ds_file;
+ const struct command_arg chmod_file_args[] = {
+ "mode", ARG_STRING, TRUE, &ds_mode, "Mode of file",
+ "file", ARG_STRING, TRUE, &ds_file, "Filename of file to modify"
+ };
+ DBUG_ENTER("do_chmod_file");
+
+ check_command_args(command, command->first_argument,
+ chmod_file_args,
+ sizeof(chmod_file_args)/sizeof(struct command_arg),
+ ' ');
+
+ /* Parse what mode to set */
+ if (ds_mode.length != 4 ||
+ str2int(ds_mode.str, 8, 0, INT_MAX, &mode) == NullS)
+ die("You must write a 4 digit octal number for mode");
+
+ DBUG_PRINT("info", ("chmod %o %s", (uint)mode, ds_file.str));
+ handle_command_error(command, chmod(ds_file.str, mode));
+ dynstr_free(&ds_mode);
+ dynstr_free(&ds_file);
+ DBUG_VOID_RETURN;
+}
+
+
+/*
+ SYNOPSIS
do_file_exists
command called command
@@ -2855,6 +2921,10 @@ void do_close_connection(struct st_command *command)
}
}
#endif
+ if (next_con->stmt)
+ mysql_stmt_close(next_con->stmt);
+ next_con->stmt= 0;
+
mysql_close(&con->mysql);
if (con->util_mysql)
mysql_close(con->util_mysql);
@@ -2916,12 +2986,19 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
Connect failed
Only allow retry if this was an error indicating the server
- could not be contacted
+ could not be contacted. Error code differs depending
+ on protocol/connection type
*/
- if (mysql_errno(mysql) == CR_CONNECTION_ERROR &&
+ if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR ||
+ mysql_errno(mysql) == CR_CONNECTION_ERROR) &&
failed_attempts < opt_max_connect_retries)
+ {
+ verbose_msg("Connect attempt %d/%d failed: %d: %s", failed_attempts,
+ opt_max_connect_retries, mysql_errno(mysql),
+ mysql_error(mysql));
my_sleep(connection_retry_sleep);
+ }
else
{
if (failed_attempts > 0)
@@ -3130,14 +3207,15 @@ void do_connect(struct st_command *command)
else if (!strncmp(con_options, "COMPRESS", 8))
con_compress= 1;
else
- die("Illegal option to connect: %.*s", end - con_options, con_options);
+ die("Illegal option to connect: %.*s",
+ (int) (end - con_options), con_options);
/* Process next option */
con_options= end;
}
if (next_con == connections_end)
die("Connection limit exhausted, you can have max %d connections",
- (sizeof(connections)/sizeof(struct st_connection)));
+ (int) (sizeof(connections)/sizeof(struct st_connection)));
if (find_connection_by_name(ds_connection_name.str))
die("Connection %s already exists", ds_connection_name.str);
@@ -3458,10 +3536,10 @@ int read_line(char *buf, int size)
DBUG_RETURN(0);
}
else if ((c == '{' &&
- (!my_strnncoll_simple(charset_info, "while", 5,
- buf, min(5, p - buf), 0) ||
- !my_strnncoll_simple(charset_info, "if", 2,
- buf, min(2, p - buf), 0))))
+ (!my_strnncoll_simple(charset_info, (const uchar*) "while", 5,
+ (uchar*) buf, min(5, p - buf), 0) ||
+ !my_strnncoll_simple(charset_info, (const uchar*) "if", 2,
+ (uchar*) buf, min(2, p - buf), 0))))
{
/* Only if and while commands can be terminated by { */
*p++= c;
@@ -4193,8 +4271,9 @@ void init_win_path_patterns()
/* List of string patterns to match in order to find paths */
const char* paths[] = { "$MYSQL_TEST_DIR",
"$MYSQL_TMP_DIR",
- "./test/", 0 };
- int num_paths= 3;
+ "$MYSQLTEST_VARDIR",
+ "./test/" };
+ int num_paths= sizeof(paths)/sizeof(char*);
int i;
char* p;
@@ -4214,6 +4293,13 @@ void init_win_path_patterns()
else
p= my_strdup(paths[i], MYF(MY_FAE));
+ /* Don't insert zero length strings in patterns array */
+ if (strlen(p) == 0)
+ {
+ my_free(p, MYF(0));
+ continue;
+ }
+
if (insert_dynamic(&patterns, (gptr) &p))
die(NullS);
@@ -4263,7 +4349,7 @@ void fix_win_paths(const char *val, int len)
{
const char** pattern= dynamic_element(&patterns, i, const char**);
DBUG_PRINT("info", ("pattern: %s", *pattern));
- if (strlen(*pattern) == 0) continue;
+
/* Search for the path in string */
while ((p= strstr(val, *pattern)))
{
@@ -4623,10 +4709,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
/*
- Store the result. If res is NULL, use mysql_field_count to
- determine if that was expected
+ Store the result of the query if it will return any fields
*/
- if (!(res= mysql_store_result(mysql)) && mysql_field_count(mysql))
+ if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0))
{
handle_error(command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), ds);
@@ -4678,7 +4763,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
if (res)
+ {
mysql_free_result(res);
+ res= 0;
+ }
counter++;
} while (!(err= mysql_next_result(mysql)));
if (err > 0)
@@ -4745,7 +4833,7 @@ void handle_error(struct st_command *command,
err_errno, err_error);
/* Abort the run of this test, pass the failed query as reason */
- abort_not_supported_test("Query '%s' failed, required functionality" \
+ abort_not_supported_test("Query '%s' failed, required functionality " \
"not supported", command->query);
}
@@ -5035,6 +5123,14 @@ end:
dynstr_free(&ds_execute_warnings);
}
+
+ /* Close the statement if - no reconnect, need new prepare */
+ if (mysql->reconnect)
+ {
+ mysql_stmt_close(stmt);
+ cur_con->stmt= NULL;
+ }
+
/*
We save the return code (mysql_stmt_errno(stmt)) from the last call sent
to the server into the mysqltest builtin variable $mysql_errno. This
@@ -5042,10 +5138,7 @@ end:
*/
var_set_errno(mysql_stmt_errno(stmt));
-#ifndef BUG15518_FIXED
- mysql_stmt_close(stmt);
- cur_con->stmt= NULL;
-#endif
+
DBUG_VOID_RETURN;
}
@@ -5565,6 +5658,7 @@ int main(int argc, char **argv)
embedded_server_args,
(char**) embedded_server_groups))
die("Can't initialize MySQL server");
+ server_initialized= 1;
if (cur_file == file_stack && cur_file->file == 0)
{
cur_file->file= stdin;
@@ -5684,6 +5778,7 @@ int main(int argc, char **argv)
case Q_FILE_EXIST: do_file_exist(command); break;
case Q_WRITE_FILE: do_write_file(command); break;
case Q_COPY_FILE: do_copy_file(command); break;
+ case Q_CHMOD_FILE: do_chmod_file(command); break;
case Q_PERL: do_perl(command); break;
case Q_DELIMITER:
do_delimiter(command);
@@ -5830,6 +5925,8 @@ int main(int argc, char **argv)
break;
case Q_DISABLE_PS_PROTOCOL:
ps_protocol_enabled= 0;
+ /* Close any open statements */
+ close_statements();
break;
case Q_ENABLE_PS_PROTOCOL:
ps_protocol_enabled= ps_protocol;
@@ -5839,6 +5936,8 @@ int main(int argc, char **argv)
break;
case Q_ENABLE_RECONNECT:
set_reconnect(&cur_con->mysql, 1);
+ /* Close any open statements - no reconnect, need new prepare */
+ close_statements();
break;
case Q_DISABLE_PARSING:
if (parsing_disabled == 0)
@@ -6516,7 +6615,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
{
my_regex_t r;
my_regmatch_t *subs;
- char *buf_end, *replace_end;
+ char *replace_end;
char *buf= *buf_p;
int len;
int buf_len, need_buf_len;
@@ -6536,8 +6635,6 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
SECURE_REG_BUF
- buf_end= buf + buf_len;
-
if (icase)
cflags|= REG_ICASE;
diff --git a/client/readline.cc b/client/readline.cc
index 3d524633d69..ad42ed2ee10 100644
--- a/client/readline.cc
+++ b/client/readline.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -51,7 +50,8 @@ char *batch_readline(LINE_BUFFER *line_buff)
if (!(pos=intern_read_line(line_buff,&out_length)))
return 0;
if (out_length && pos[out_length-1] == '\n')
- out_length--; /* Remove '\n' */
+ if (--out_length && pos[out_length-1] == '\r') /* Remove '\n' */
+ out_length--; /* Remove '\r' */
line_buff->read_length=out_length;
pos[out_length]=0;
return pos;
diff --git a/client/sql_string.cc b/client/sql_string.cc
index 51f802e7465..7d7d5d70754 100644
--- a/client/sql_string.cc
+++ b/client/sql_string.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/client/sql_string.h b/client/sql_string.h
index e284301b214..0e0d2452297 100644
--- a/client/sql_string.h
+++ b/client/sql_string.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/cmd-line-utils/Makefile.am b/cmd-line-utils/Makefile.am
index 88aaedde06d..1a84ce7af38 100644
--- a/cmd-line-utils/Makefile.am
+++ b/cmd-line-utils/Makefile.am
@@ -2,8 +2,8 @@
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/cmd-line-utils/readline/bind.c b/cmd-line-utils/readline/bind.c
index ab1136c7da5..568c3e8776a 100644
--- a/cmd-line-utils/readline/bind.c
+++ b/cmd-line-utils/readline/bind.c
@@ -337,6 +337,7 @@ rl_generic_bind (type, keyseq, data, map)
KEYMAP_ENTRY k;
k.function = 0;
+ k.type= 0;
/* If no keys to bind to, exit right away. */
if (!keyseq || !*keyseq)
@@ -735,7 +736,8 @@ _rl_read_file (filename, sizep)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if (file_size != finfo.st_size || file_size + 1 < file_size)
+ if ((long long) file_size != (long long) finfo.st_size ||
+ file_size + 1 < file_size)
{
if (file >= 0)
close (file);
diff --git a/cmd-line-utils/readline/histfile.c b/cmd-line-utils/readline/histfile.c
index 7d340b346d4..f1822b105a4 100644
--- a/cmd-line-utils/readline/histfile.c
+++ b/cmd-line-utils/readline/histfile.c
@@ -184,7 +184,8 @@ read_history_range (filename, from, to)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if (file_size != finfo.st_size || file_size + 1 < file_size)
+ if ((long long) file_size != (long long) finfo.st_size ||
+ file_size + 1 < file_size)
{
errno = overflow_errno;
goto error_and_exit;
@@ -333,7 +334,8 @@ history_truncate_file (fname, lines)
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if (file_size != finfo.st_size || file_size + 1 < file_size)
+ if ((long long) file_size != (long long) finfo.st_size ||
+ file_size + 1 < file_size)
{
close (file);
#if defined (EFBIG)
diff --git a/cmd-line-utils/readline/undo.c b/cmd-line-utils/readline/undo.c
index b4b5a6511ba..4d256f492b8 100644
--- a/cmd-line-utils/readline/undo.c
+++ b/cmd-line-utils/readline/undo.c
@@ -175,7 +175,7 @@ _rl_fix_last_undo_of_type (type, start, end)
for (rl = rl_undo_list; rl; rl = rl->next)
{
- if (rl->what == (uint) type)
+ if (rl->what == (unsigned int) type)
{
rl->start = start;
rl->end = end;
diff --git a/configure.in b/configure.in
index f6a6eedac70..cf1b4b0cd32 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also change ndb version below and update version.c in ndb
-AM_INIT_AUTOMAKE(mysql, 5.0.32)
+AM_INIT_AUTOMAKE(mysql, 5.0.36)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
@@ -19,7 +19,7 @@ SHARED_LIB_VERSION=$SHARED_LIB_MAJOR_VERSION:0:0
# ndb version
NDB_VERSION_MAJOR=5
NDB_VERSION_MINOR=0
-NDB_VERSION_BUILD=32
+NDB_VERSION_BUILD=36
NDB_VERSION_STATUS=""
# Set all version vars based on $VERSION. How do we do this more elegant ?
@@ -713,6 +713,22 @@ else
AC_MSG_RESULT([no])
fi
+# If we should allow init-file, skip-grant-table and bootstrap options
+AC_MSG_CHECKING(If we should should enable init-file, skip-grant-table options and bootstrap)
+AC_ARG_ENABLE(grant-options,
+ [ --disable-grant-options Disables the use of --init-file, --skip-grant-tables and --bootstrap options],
+ [ mysql_grant_options_enabled=$enableval ],
+ [ mysql_grant_options_enabled=yes ]
+ )
+if test "$mysql_grant_options_enabled" = "yes"
+then
+ AC_MSG_RESULT([yes])
+else
+ AC_DEFINE([DISABLE_GRANT_OPTIONS], [1],
+ [Disables the use of --init-file, --skip-grant-tables and --bootstrap options])
+ AC_MSG_RESULT([no])
+fi
+
MYSQL_SYS_LARGEFILE
# Types that must be checked AFTER large file support is checked
@@ -1073,6 +1089,7 @@ case $SYSTEM_TYPE in
fi
;;
*darwin*)
+ AC_DEFINE([DEFAULT_SKIP_THREAD_PRIORITY], [1], [default to skip thread priority])
if test "$ac_cv_prog_gcc" = "yes"
then
FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT"
@@ -2494,12 +2511,14 @@ thread_dirs=
dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
-sql_client_dirs="strings regex mysys libmysql client"
+sql_client_dirs=
linked_client_targets="linked_libmysql_sources"
-if test "$THREAD_SAFE_CLIENT" != "no"
+if test "$THREAD_SAFE_CLIENT" = "no"
then
- sql_client_dirs="libmysql_r $sql_client_dirs"
+ sql_client_dirs="strings regex mysys dbug extra libmysql client"
+else
+ sql_client_dirs="strings regex mysys dbug extra libmysql libmysql_r client"
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
AC_CONFIG_FILES(libmysql_r/Makefile)
AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
@@ -2528,13 +2547,17 @@ AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware")
export CC CXX CFLAGS CXXFLAGS LD LDFLAGS AR
ac_configure_args="$ac_configure_args CFLAGS='$CFLAGS' CXXFLAGS='$CXXFLAGS'"
-if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
+if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"
then
AC_DEFINE([THREAD], [1],
[Define if you want to have threaded code. This may be undef on client code])
# Avoid _PROGRAMS names
THREAD_LOBJECTS="thr_alarm.o thr_lock.o thr_mutex.o thr_rwlock.o my_pthread.o my_thr_init.o mf_keycache.o"
AC_SUBST(THREAD_LOBJECTS)
+fi
+
+if test "$with_server" != "no"
+then
server_scripts="mysqld_safe mysql_install_db"
sql_server_dirs="strings mysys dbug extra regex"
diff --git a/dbug/CMakeLists.txt b/dbug/CMakeLists.txt
index fe20fdd3db6..375fd19fb40 100755
--- a/dbug/CMakeLists.txt
+++ b/dbug/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -D__WIN32__")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/dbug/Makefile.am b/dbug/Makefile.am
index 57288d32431..39e8bb36c71 100644
--- a/dbug/Makefile.am
+++ b/dbug/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000, 2002, 2004-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index 50e0f04eb14..5ce2f7b02ab 100755
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/extra/Makefile.am b/extra/Makefile.am
index 63d2b4055f7..1448962e427 100644
--- a/extra/Makefile.am
+++ b/extra/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/charset2html.c b/extra/charset2html.c
index 96862ff16a1..8795c82bc34 100644
--- a/extra/charset2html.c
+++ b/extra/charset2html.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/comp_err.c b/extra/comp_err.c
index 14774c87a28..df6df1678a6 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/innochecksum.c b/extra/innochecksum.c
index eda5cef4647..33f925a4cad 100644
--- a/extra/innochecksum.c
+++ b/extra/innochecksum.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index bcf8c7aed7c..af739ae590b 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/mysql_waitpid.c b/extra/mysql_waitpid.c
index c228cc52c8b..a166e6b15af 100644
--- a/extra/mysql_waitpid.c
+++ b/extra/mysql_waitpid.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/perror.c b/extra/perror.c
index b26e516a101..4d19f4dd7eb 100644
--- a/extra/perror.c
+++ b/extra/perror.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/replace.c b/extra/replace.c
index 9acf1620d49..de0a4b05764 100644
--- a/extra/replace.c
+++ b/extra/replace.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1052,8 +1051,10 @@ static int convert_file(REPLACE *rep, my_string name)
{
int error;
FILE *in,*out;
- char dir_buff[FN_REFLEN], tempname[FN_REFLEN];
- char link_name[FN_REFLEN], *org_name = name;
+ char dir_buff[FN_REFLEN], tempname[FN_REFLEN], *org_name = name;
+#ifdef HAVE_READLINK
+ char link_name[FN_REFLEN];
+#endif
File temp_file;
DBUG_ENTER("convert_file");
diff --git a/extra/resolve_stack_dump.c b/extra/resolve_stack_dump.c
index 666125990d2..04ab8a30f0d 100644
--- a/extra/resolve_stack_dump.c
+++ b/extra/resolve_stack_dump.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/resolveip.c b/extra/resolveip.c
index f8cff2a976c..1061cafe380 100644
--- a/extra/resolveip.c
+++ b/extra/resolveip.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt
index 09bd2b046da..5cc97f22a36 100755
--- a/extra/yassl/CMakeLists.txt
+++ b/extra/yassl/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
ADD_DEFINITIONS("-DWIN32 -D_LIB -DYASSL_PREFIX")
INCLUDE_DIRECTORIES(include taocrypt/include taocrypt/mySTL)
diff --git a/extra/yassl/Makefile.am b/extra/yassl/Makefile.am
index b7657dc28f9..35946e002c4 100644
--- a/extra/yassl/Makefile.am
+++ b/extra/yassl/Makefile.am
@@ -1,2 +1,5 @@
SUBDIRS = taocrypt src testsuite
EXTRA_DIST = yassl.dsp yassl.dsw CMakeLists.txt
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/extra/yassl/README b/extra/yassl/README
index 2af4e98fe4c..fbeffd9db77 100644
--- a/extra/yassl/README
+++ b/extra/yassl/README
@@ -1,4 +1,56 @@
-yaSSL Release notes, version 1.4.0 (08/13/06)
+yaSSL Release notes, version 1.5.0 (11/09/06)
+
+ This release of yaSSL contains bug fixes, portability enhancements,
+ and full TLS 1.1 support. Use the functions:
+
+ SSL_METHOD *TLSv1_1_server_method(void);
+ SSL_METHOD *TLSv1_1_client_method(void);
+
+ or the SSLv23 versions (even though yaSSL doesn't support SSL 2.0 the v23
+ means to pick the highest of SSL 3.0, TLS 1.0, or TLS 1.1.
+
+
+See normal build instructions below under 1.0.6.
+See libcurl build instructions below under 1.3.0.
+
+
+
+****************yaSSL Release notes, version 1.4.5 (10/15/06)
+
+
+ This release of yaSSL contains bug fixes, portability enhancements,
+ zlib compression support, removal of assembly instructions at runtime if
+ not supported, and initial TLS 1.1 support.
+
+
+ Compression Notes: yaSSL uses zlib for compression and the compression
+ should only be used if yaSSL is at both ends because the implementation
+ details aren't yet standard. If you'd like to turn compression on use
+ the SSL_set_compression() function on the client before calling
+ SSL_connect(). If both the client and server were built with zlib support
+ then the connection will use compression. If the client isn't built with
+ support then SSL_set_compression() will return an error (-1).
+
+ To build yaSSL with zlib support on Unix simply have zlib support on your
+ system and configure will find it if it's in the standard locations. If
+ it's somewhere else use the option ./configure --with-zlib=DIR. If you'd
+ like to disable compression support in yaSSL use ./configure --without-zlib.
+
+ To build yaSSL with zlib support on Windows:
+
+ 1) download zlib from http://www.zlib.net/
+ 2) follow the instructions in zlib from projects/visualc6/README.txt
+ for how to add the zlib project into the yaSSL workspace noting that
+ you'll need to add configuration support for "Win32 Debug" and
+ "Win32 Release" in note 3 under "To use:".
+ 3) define HAVE_LIBZ when building yaSSL
+
+
+See normal build instructions below under 1.0.6.
+See libcurl build instructions below under 1.3.0.
+
+
+********************yaSSL Release notes, version 1.4.0 (08/13/06)
This release of yaSSL contains bug fixes, portability enhancements,
@@ -122,18 +174,6 @@ Choose (Re)Build All from the project workspace
run Debug\testsuite.exe from yaSSL-Home\testsuite to test the build
---To enable ia32 assembly for TaoCrypt ciphers and message digests
-
- On MSVC this is always on
-
- On GCC **, use ./configure --enable-ia32-asm
-
- ** This isn't on by default because of the use of intel syntax and the
- problem that olders versions of gas have with some addressing statements.
- If you enable this and get assemler errors during compilation or can't
- pass the TaoCrypt tests, please send todd@yassl.com a message and disable
- this option in the meantime.
-
***************** yaSSL Release notes, version 1.0.5
diff --git a/extra/yassl/examples/client/client.cpp b/extra/yassl/examples/client/client.cpp
index d655011deb6..6c3cdf04dc1 100644
--- a/extra/yassl/examples/client/client.cpp
+++ b/extra/yassl/examples/client/client.cpp
@@ -5,6 +5,35 @@
//#define TEST_RESUME
+void ClientError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& sockfd, const char* msg)
+{
+ SSL_CTX_free(ctx);
+ SSL_free(ssl);
+ tcp_close(sockfd);
+ err_sys(msg);
+}
+
+
+#ifdef NON_BLOCKING
+ void NonBlockingSSL_Connect(SSL* ssl, SSL_CTX* ctx, SOCKET_T& sockfd)
+ {
+ int ret = SSL_connect(ssl);
+ while (ret =! SSL_SUCCESS && SSL_get_error(ssl, 0) ==
+ SSL_ERROR_WANT_READ) {
+ printf("... client would block\n");
+ #ifdef _WIN32
+ Sleep(1000);
+ #else
+ sleep(1);
+ #endif
+ ret = SSL_connect(ssl);
+ }
+ if (ret != SSL_SUCCESS)
+ ClientError(ctx, ssl, sockfd, "SSL_connect failed");
+ }
+#endif
+
+
void client_test(void* args)
{
#ifdef _WIN32
@@ -18,6 +47,9 @@ void client_test(void* args)
set_args(argc, argv, *static_cast<func_args*>(args));
tcp_connect(sockfd);
+#ifdef NON_BLOCKING
+ tcp_set_nonblocking(sockfd);
+#endif
SSL_METHOD* method = TLSv1_client_method();
SSL_CTX* ctx = SSL_CTX_new(method);
@@ -27,13 +59,13 @@ void client_test(void* args)
SSL_set_fd(ssl, sockfd);
+
+#ifdef NON_BLOCKING
+ NonBlockingSSL_Connect(ssl, ctx, sockfd);
+#else
if (SSL_connect(ssl) != SSL_SUCCESS)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys("SSL_connect failed");
- }
+ ClientError(ctx, ssl, sockfd, "SSL_connect failed");
+#endif
showPeer(ssl);
const char* cipher = 0;
@@ -49,16 +81,14 @@ void client_test(void* args)
char msg[] = "hello yassl!";
if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys("SSL_write failed");
- }
+ ClientError(ctx, ssl, sockfd, "SSL_write failed");
char reply[1024];
- reply[SSL_read(ssl, reply, sizeof(reply))] = 0;
+ int input = SSL_read(ssl, reply, sizeof(reply));
+ if (input > 0) {
+ reply[input] = 0;
printf("Server response: %s\n", reply);
+ }
#ifdef TEST_RESUME
SSL_SESSION* session = SSL_get_session(ssl);
@@ -75,24 +105,17 @@ void client_test(void* args)
SSL_set_session(sslResume, session);
if (SSL_connect(sslResume) != SSL_SUCCESS)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys("SSL resume failed");
- }
+ ClientError(ctx, sslResume, sockfd, "SSL_resume failed");
showPeer(sslResume);
if (SSL_write(sslResume, msg, sizeof(msg)) != sizeof(msg))
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys("SSL_write failed");
- }
+ ClientError(ctx, sslResume, sockfd, "SSL_write failed");
- reply[SSL_read(sslResume, reply, sizeof(reply))] = 0;
+ input = SSL_read(sslResume, reply, sizeof(reply));
+ if (input > 0) {
+ reply[input] = 0;
printf("Server response: %s\n", reply);
+ }
SSL_shutdown(sslResume);
SSL_free(sslResume);
diff --git a/extra/yassl/examples/echoclient/echoclient.cpp b/extra/yassl/examples/echoclient/echoclient.cpp
index 983254bf8a7..e2c33c7cda2 100644
--- a/extra/yassl/examples/echoclient/echoclient.cpp
+++ b/extra/yassl/examples/echoclient/echoclient.cpp
@@ -3,6 +3,15 @@
#include "../../testsuite/test.hpp"
+void EchoClientError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& sockfd, const char* msg)
+{
+ SSL_CTX_free(ctx);
+ SSL_free(ssl);
+ tcp_close(sockfd);
+ err_sys(msg);
+}
+
+
void echoclient_test(void* args)
{
#ifdef _WIN32
@@ -35,7 +44,7 @@ void echoclient_test(void* args)
tcp_connect(sockfd);
- SSL_METHOD* method = TLSv1_client_method();
+ SSL_METHOD* method = SSLv23_client_method();
SSL_CTX* ctx = SSL_CTX_new(method);
set_certs(ctx);
SSL* ssl = SSL_new(ctx);
@@ -43,12 +52,7 @@ void echoclient_test(void* args)
SSL_set_fd(ssl, sockfd);
if (SSL_connect(ssl) != SSL_SUCCESS)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys("SSL_connect failed");
- }
+ EchoClientError(ctx, ssl, sockfd, "SSL_connect failed");
char send[1024];
char reply[1024];
@@ -57,12 +61,7 @@ void echoclient_test(void* args)
int sendSz = strlen(send) + 1;
if (SSL_write(ssl, send, sendSz) != sendSz)
- {
- SSL_CTX_free(ctx);
- SSL_free(ssl);
- tcp_close(sockfd);
- err_sys("SSL_write failed");
- }
+ EchoClientError(ctx, ssl, sockfd, "SSL_write failed");
if (strncmp(send, "quit", 4) == 0) {
fputs("sending server shutdown command: quit!\n", fout);
diff --git a/extra/yassl/examples/echoserver/echoserver.cpp b/extra/yassl/examples/echoserver/echoserver.cpp
index cd31fedddd8..92613744ba0 100644
--- a/extra/yassl/examples/echoserver/echoserver.cpp
+++ b/extra/yassl/examples/echoserver/echoserver.cpp
@@ -56,7 +56,7 @@ THREAD_RETURN YASSL_API echoserver_test(void* args)
tcp_listen(sockfd);
- SSL_METHOD* method = TLSv1_server_method();
+ SSL_METHOD* method = SSLv23_server_method();
SSL_CTX* ctx = SSL_CTX_new(method);
set_serverCerts(ctx);
@@ -87,8 +87,12 @@ THREAD_RETURN YASSL_API echoserver_test(void* args)
SSL* ssl = SSL_new(ctx);
SSL_set_fd(ssl, clientfd);
- if (SSL_accept(ssl) != SSL_SUCCESS)
- EchoError(ctx, ssl, sockfd, clientfd, "SSL_accept failed");
+ if (SSL_accept(ssl) != SSL_SUCCESS) {
+ printf("SSL_accept failed\n");
+ SSL_free(ssl);
+ tcp_close(clientfd);
+ continue;
+ }
char command[1024];
int echoSz(0);
@@ -130,6 +134,7 @@ THREAD_RETURN YASSL_API echoserver_test(void* args)
if (SSL_write(ssl, command, echoSz) != echoSz)
EchoError(ctx, ssl, sockfd, clientfd, "SSL_write failed");
}
+ SSL_shutdown(ssl);
SSL_free(ssl);
tcp_close(clientfd);
}
diff --git a/extra/yassl/examples/server/server.cpp b/extra/yassl/examples/server/server.cpp
index d0bf70cd634..75ce4224770 100644
--- a/extra/yassl/examples/server/server.cpp
+++ b/extra/yassl/examples/server/server.cpp
@@ -13,6 +13,26 @@ void ServerError(SSL_CTX* ctx, SSL* ssl, SOCKET_T& sockfd, const char* msg)
}
+#ifdef NON_BLOCKING
+ void NonBlockingSSL_Accept(SSL* ssl, SSL_CTX* ctx, SOCKET_T& clientfd)
+ {
+ int ret = SSL_accept(ssl);
+ while (ret != SSL_SUCCESS && SSL_get_error(ssl, 0) ==
+ SSL_ERROR_WANT_READ) {
+ printf("... server would block\n");
+ #ifdef _WIN32
+ Sleep(1000);
+ #else
+ sleep(1);
+ #endif
+ ret = SSL_accept(ssl);
+ }
+ if (ret != SSL_SUCCESS)
+ ServerError(ctx, ssl, clientfd, "SSL_accept failed");
+ }
+#endif
+
+
THREAD_RETURN YASSL_API server_test(void* args)
{
#ifdef _WIN32
@@ -33,7 +53,7 @@ THREAD_RETURN YASSL_API server_test(void* args)
SSL_METHOD* method = TLSv1_server_method();
SSL_CTX* ctx = SSL_CTX_new(method);
- //SSL_CTX_set_cipher_list(ctx, "RC4-SHA");
+ //SSL_CTX_set_cipher_list(ctx, "RC4-SHA:RC4-MD5");
SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, 0);
set_serverCerts(ctx);
DH* dh = set_tmpDH(ctx);
@@ -41,15 +61,22 @@ THREAD_RETURN YASSL_API server_test(void* args)
SSL* ssl = SSL_new(ctx);
SSL_set_fd(ssl, clientfd);
+#ifdef NON_BLOCKING
+ NonBlockingSSL_Accept(ssl, ctx, clientfd);
+#else
if (SSL_accept(ssl) != SSL_SUCCESS)
ServerError(ctx, ssl, clientfd, "SSL_accept failed");
+#endif
showPeer(ssl);
printf("Using Cipher Suite: %s\n", SSL_get_cipher(ssl));
char command[1024];
- command[SSL_read(ssl, command, sizeof(command))] = 0;
+ int input = SSL_read(ssl, command, sizeof(command));
+ if (input > 0) {
+ command[input] = 0;
printf("First client command: %s\n", command);
+ }
char msg[] = "I hear you, fa shizzle!";
if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
@@ -57,6 +84,7 @@ THREAD_RETURN YASSL_API server_test(void* args)
DH_free(dh);
SSL_CTX_free(ctx);
+ SSL_shutdown(ssl);
SSL_free(ssl);
tcp_close(clientfd);
@@ -82,3 +110,4 @@ THREAD_RETURN YASSL_API server_test(void* args)
}
#endif // NO_MAIN_DRIVER
+
diff --git a/extra/yassl/include/factory.hpp b/extra/yassl/include/factory.hpp
index 04d742431dc..dc25cf0ee70 100644
--- a/extra/yassl/include/factory.hpp
+++ b/extra/yassl/include/factory.hpp
@@ -42,12 +42,7 @@
namespace STL = STL_NAMESPACE;
-// VC60 workaround: it doesn't allow typename in some places
-#if defined(_MSC_VER) && (_MSC_VER < 1300)
- #define CPP_TYPENAME
-#else
- #define CPP_TYPENAME typename
-#endif
+
namespace yaSSL {
diff --git a/extra/yassl/include/openssl/prefix_ssl.h b/extra/yassl/include/openssl/prefix_ssl.h
index aa3f799cf80..dc6e3ef81f0 100644
--- a/extra/yassl/include/openssl/prefix_ssl.h
+++ b/extra/yassl/include/openssl/prefix_ssl.h
@@ -52,6 +52,7 @@
#define SSL_set_session yaSSL_set_session
#define SSL_get_session yaSSL_get_session
#define SSL_SESSION_set_timeout yaSSL_SESSION_set_timeout
+#define SSL_CTX_set_session_cache_mode yaSSL_CTX_set_session_cache_mode
#define SSL_get_peer_certificate yaSSL_get_peer_certificate
#define SSL_get_verify_result yaSSL_get_verify_result
#define SSL_CTX_set_verify yaSSL_CTX_set_verify
@@ -98,6 +99,8 @@
#define SSLv3_client_method yaSSLv3_client_method
#define TLSv1_server_method yaTLSv1_server_method
#define TLSv1_client_method yaTLSv1_client_method
+#define TLSv1_1_server_method yaTLSv1_1_server_method
+#define TLSv1_1_client_method yaTLSv1_1_client_method
#define SSLv23_server_method yaSSLv23_server_method
#define SSL_CTX_use_certificate_file yaSSL_CTX_use_certificate_file
#define SSL_CTX_use_PrivateKey_file yaSSL_CTX_use_PrivateKey_file
@@ -159,3 +162,4 @@
#define MD5_Init yaMD5_Init
#define MD5_Update yaMD5_Update
#define MD5_Final yaMD5_Final
+#define SSL_set_compression yaSSL_set_compression
diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h
index 5e7290d2a7a..67c49a808fd 100644
--- a/extra/yassl/include/openssl/ssl.h
+++ b/extra/yassl/include/openssl/ssl.h
@@ -41,7 +41,7 @@
#include "rsa.h"
-#define YASSL_VERSION "1.4.3"
+#define YASSL_VERSION "1.5.0"
#if defined(__cplusplus)
@@ -228,6 +228,7 @@ void SSL_load_error_strings(void);
int SSL_set_session(SSL *ssl, SSL_SESSION *session);
SSL_SESSION* SSL_get_session(SSL* ssl);
long SSL_SESSION_set_timeout(SSL_SESSION*, long);
+long SSL_CTX_set_session_cache_mode(SSL_CTX* ctx, long mode);
X509* SSL_get_peer_certificate(SSL*);
long SSL_get_verify_result(SSL*);
@@ -361,6 +362,8 @@ SSL_METHOD *SSLv3_server_method(void);
SSL_METHOD *SSLv3_client_method(void);
SSL_METHOD *TLSv1_server_method(void);
SSL_METHOD *TLSv1_client_method(void);
+SSL_METHOD *TLSv1_1_server_method(void);
+SSL_METHOD *TLSv1_1_client_method(void);
SSL_METHOD *SSLv23_server_method(void);
int SSL_CTX_use_certificate_file(SSL_CTX*, const char*, int);
@@ -531,6 +534,10 @@ void MD5_Final(unsigned char*, MD5_CTX*);
#define SSL_DEFAULT_CIPHER_LIST "" /* default all */
+/* yaSSL adds */
+int SSL_set_compression(SSL*); /* turn on yaSSL zlib compression */
+
+
#if defined(__cplusplus) && !defined(YASSL_MYSQL_COMPATIBLE)
diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp
index 9fc0d62f90e..bc82384d85e 100644
--- a/extra/yassl/include/socket_wrapper.hpp
+++ b/extra/yassl/include/socket_wrapper.hpp
@@ -70,8 +70,8 @@ typedef unsigned char byte;
// Wraps Windows Sockets and BSD Sockets
class Socket {
socket_t socket_; // underlying socket descriptor
- bool wouldBlock_; // for non-blocking data
- bool blocking_; // is option set
+ bool wouldBlock_; // if non-blocking data, for last read
+ bool nonBlocking_; // is option set
public:
explicit Socket(socket_t s = INVALID_SOCKET);
~Socket();
@@ -85,7 +85,7 @@ public:
bool wait();
bool WouldBlock() const;
- bool IsBlocking() const;
+ bool IsNonBlocking() const;
void closeSocket();
void shutDown(int how = SD_SEND);
diff --git a/extra/yassl/include/yassl_error.hpp b/extra/yassl/include/yassl_error.hpp
index 72b79b05dbd..f820e5811d9 100644
--- a/extra/yassl/include/yassl_error.hpp
+++ b/extra/yassl/include/yassl_error.hpp
@@ -56,7 +56,10 @@ enum YasslError {
receive_error = 114,
certificate_error = 115,
privateKey_error = 116,
- badVersion_error = 117
+ badVersion_error = 117,
+ compress_error = 118,
+ decompress_error = 119,
+ pms_version_error = 120
// !!!! add error message to .cpp !!!!
diff --git a/extra/yassl/include/yassl_imp.hpp b/extra/yassl/include/yassl_imp.hpp
index 180d7fe7fe1..f51a902b2a5 100644
--- a/extra/yassl/include/yassl_imp.hpp
+++ b/extra/yassl/include/yassl_imp.hpp
@@ -132,7 +132,6 @@ class Data : public Message {
public:
Data();
Data(uint16 len, opaque* b);
- Data(uint16 len, const opaque* w);
friend output_buffer& operator<<(output_buffer&, const Data&);
@@ -141,9 +140,9 @@ public:
ContentType get_type() const;
uint16 get_length() const;
- const opaque* get_buffer() const;
void set_length(uint16 l);
opaque* set_buffer();
+ void SetData(uint16, const opaque*);
void Process(input_buffer&, SSL&);
private:
Data(const Data&); // hide copy
@@ -232,11 +231,11 @@ public:
void Process(input_buffer&, SSL&);
const opaque* get_random() const;
- friend void buildClientHello(SSL&, ClientHello&, CompressionMethod);
+ friend void buildClientHello(SSL&, ClientHello&);
friend void ProcessOldClientHello(input_buffer& input, SSL& ssl);
ClientHello();
- explicit ClientHello(ProtocolVersion pv);
+ ClientHello(ProtocolVersion pv, bool useCompression);
private:
ClientHello(const ClientHello&); // hide copy
ClientHello& operator=(const ClientHello&); // and assign
@@ -253,7 +252,7 @@ class ServerHello : public HandShakeBase {
opaque cipher_suite_[SUITE_LEN];
CompressionMethod compression_method_;
public:
- explicit ServerHello(ProtocolVersion pv);
+ ServerHello(ProtocolVersion pv, bool useCompression);
ServerHello();
friend input_buffer& operator>>(input_buffer&, ServerHello&);
@@ -629,8 +628,11 @@ struct Connection {
bool send_server_key_; // server key exchange?
bool master_clean_; // master secret clean?
bool TLS_; // TLSv1 or greater
+ bool TLSv1_1_; // TLSv1.1 or greater
bool sessionID_Set_; // do we have a session
- ProtocolVersion version_;
+ bool compression_; // zlib compression?
+ ProtocolVersion version_; // negotiated version
+ ProtocolVersion chVersion_; // client hello version
RandomPool& random_;
Connection(ProtocolVersion v, RandomPool& ran);
@@ -640,6 +642,7 @@ struct Connection {
void CleanPreMaster();
void CleanMaster();
void TurnOffTLS();
+ void TurnOffTLS1_1();
private:
Connection(const Connection&); // hide copy
Connection& operator=(const Connection&); // and assign
diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp
index 0edff289b61..4a3c0ba4e20 100644
--- a/extra/yassl/include/yassl_int.hpp
+++ b/extra/yassl/include/yassl_int.hpp
@@ -431,6 +431,7 @@ private:
DH_Parms dhParms_;
pem_password_cb passwordCb_;
void* userData_;
+ bool sessionCacheOff_;
Stats stats_;
Mutex mutex_; // for Stats
public:
@@ -445,6 +446,7 @@ public:
const Stats& GetStats() const;
pem_password_cb GetPasswordCb() const;
void* GetUserData() const;
+ bool GetSessionCacheOff() const;
void setVerifyPeer();
void setVerifyNone();
@@ -453,6 +455,7 @@ public:
bool SetDH(const DH&);
void SetPasswordCb(pem_password_cb cb);
void SetUserData(void*);
+ void SetSessionCacheOff();
void IncrementStats(StatsField);
void AddCA(x509* ca);
@@ -600,6 +603,7 @@ public:
const Socket& getSocket() const;
YasslError GetError() const;
bool GetMultiProtocol() const;
+ bool CompressionOn() const;
Crypto& useCrypto();
Security& useSecurity();
@@ -617,9 +621,12 @@ public:
void set_preMaster(const opaque*, uint);
void set_masterSecret(const opaque*);
void SetError(YasslError);
+ int SetCompression();
+ void UnSetCompression();
// helpers
bool isTLS() const;
+ bool isTLSv1_1() const;
void order_error();
void makeMasterSecret();
void makeTLSMasterSecret();
@@ -653,6 +660,10 @@ private:
};
+// compression
+int Compress(const byte*, int, input_buffer&);
+int DeCompress(input_buffer&, int, input_buffer&);
+
// conversion functions
void c32to24(uint32, uint24&);
diff --git a/extra/yassl/include/yassl_types.hpp b/extra/yassl/include/yassl_types.hpp
index e602ee180bf..646c71afddf 100644
--- a/extra/yassl/include/yassl_types.hpp
+++ b/extra/yassl/include/yassl_types.hpp
@@ -211,6 +211,7 @@ const int FINISHED_LABEL_SZ = 15; // TLS finished lable length
const int SEED_LEN = RAN_LEN * 2; // TLS seed, client + server random
const int DEFAULT_TIMEOUT = 500; // Default Session timeout in seconds
const int MAX_RECORD_SIZE = 16384; // 2^14, max size by standard
+const int COMPRESS_EXTRA = 1024; // extra compression possible addition
typedef uint8 Cipher; // first byte is always 0x00 for SSLv3 & TLS
@@ -222,7 +223,7 @@ typedef opaque* DistinguishedName;
typedef bool IsExportable;
-enum CompressionMethod { no_compression = 0 };
+enum CompressionMethod { no_compression = 0, zlib = 221 };
enum CipherType { stream, block };
diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp
index 25f36c4ea8c..c03d72ff2ef 100644
--- a/extra/yassl/src/handshake.cpp
+++ b/extra/yassl/src/handshake.cpp
@@ -40,9 +40,11 @@ namespace yaSSL {
// Build a client hello message from cipher suites and compression method
-void buildClientHello(SSL& ssl, ClientHello& hello,
- CompressionMethod compression = no_compression)
+void buildClientHello(SSL& ssl, ClientHello& hello)
{
+ // store for pre master secret
+ ssl.useSecurity().use_connection().chVersion_ = hello.client_version_;
+
ssl.getCrypto().get_random().Fill(hello.random_, RAN_LEN);
if (ssl.getSecurity().get_resuming()) {
hello.id_len_ = ID_LEN;
@@ -55,7 +57,6 @@ void buildClientHello(SSL& ssl, ClientHello& hello,
memcpy(hello.cipher_suites_, ssl.getSecurity().get_parms().suites_,
hello.suite_len_);
hello.comp_len_ = 1;
- hello.compression_methods_ = compression;
hello.set_length(sizeof(ProtocolVersion) +
RAN_LEN +
@@ -83,7 +84,7 @@ void buildServerHello(SSL& ssl, ServerHello& hello)
hello.cipher_suite_[0] = ssl.getSecurity().get_parms().suite_[0];
hello.cipher_suite_[1] = ssl.getSecurity().get_parms().suite_[1];
- hello.compression_method_ = no_compression;
+ hello.compression_method_ = hello.compression_method_;
hello.set_length(sizeof(ProtocolVersion) + RAN_LEN + ID_LEN +
sizeof(hello.id_len_) + SUITE_LEN + SIZEOF_ENUM);
@@ -151,12 +152,18 @@ void buildHeaders(SSL& ssl, HandShakeHeader& hsHeader,
// add handshake from buffer into md5 and sha hashes, exclude record header
-void hashHandShake(SSL& ssl, const output_buffer& output)
+void hashHandShake(SSL& ssl, const output_buffer& output, bool removeIV = false)
{
uint sz = output.get_size() - RECORD_HEADER;
const opaque* buffer = output.get_buffer() + RECORD_HEADER;
+ if (removeIV) { // TLSv1_1 IV
+ uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
+ sz -= blockSz;
+ buffer += blockSz;
+ }
+
ssl.useHashes().use_MD5().update(buffer, sz);
ssl.useHashes().use_SHA().update(buffer, sz);
}
@@ -229,6 +236,18 @@ void decrypt_message(SSL& ssl, input_buffer& input, uint sz)
ssl.useCrypto().use_cipher().decrypt(plain.get_buffer(), cipher, sz);
memcpy(cipher, plain.get_buffer(), sz);
ssl.useSecurity().use_parms().encrypt_size_ = sz;
+
+ if (ssl.isTLSv1_1()) // IV
+ input.set_current(input.get_current() +
+ ssl.getCrypto().get_cipher().get_blockSize());
+}
+
+
+// output operator for input_buffer
+output_buffer& operator<<(output_buffer& output, const input_buffer& input)
+{
+ output.write(input.get_buffer(), input.get_size());
+ return output;
}
@@ -239,9 +258,12 @@ void cipherFinished(SSL& ssl, Finished& fin, output_buffer& output)
uint finishedSz = ssl.isTLS() ? TLS_FINISHED_SZ : FINISHED_SZ;
uint sz = RECORD_HEADER + HANDSHAKE_HEADER + finishedSz + digestSz;
uint pad = 0;
+ uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
+
if (ssl.getSecurity().get_parms().cipher_type_ == block) {
+ if (ssl.isTLSv1_1())
+ sz += blockSz; // IV
sz += 1; // pad byte
- uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
pad = (sz - RECORD_HEADER) % blockSz;
pad = blockSz - pad;
sz += pad;
@@ -252,14 +274,21 @@ void cipherFinished(SSL& ssl, Finished& fin, output_buffer& output)
buildHeaders(ssl, hsHeader, rlHeader, fin);
rlHeader.length_ = sz - RECORD_HEADER; // record header includes mac
// and pad, hanshake doesn't
+ input_buffer iv;
+ if (ssl.isTLSv1_1() && ssl.getSecurity().get_parms().cipher_type_== block){
+ iv.allocate(blockSz);
+ ssl.getCrypto().get_random().Fill(iv.get_buffer(), blockSz);
+ iv.add_size(blockSz);
+ }
+ uint ivSz = iv.get_size();
output.allocate(sz);
- output << rlHeader << hsHeader << fin;
+ output << rlHeader << iv << hsHeader << fin;
- hashHandShake(ssl, output);
+ hashHandShake(ssl, output, ssl.isTLSv1_1() ? true : false);
opaque digest[SHA_LEN]; // max size
if (ssl.isTLS())
- TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER,
- output.get_size() - RECORD_HEADER, handshake);
+ TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER + ivSz,
+ output.get_size() - RECORD_HEADER - ivSz, handshake);
else
hmac(ssl, digest, output.get_buffer() + RECORD_HEADER,
output.get_size() - RECORD_HEADER, handshake);
@@ -282,9 +311,12 @@ void buildMessage(SSL& ssl, output_buffer& output, const Message& msg)
uint digestSz = ssl.getCrypto().get_digest().get_digestSize();
uint sz = RECORD_HEADER + msg.get_length() + digestSz;
uint pad = 0;
+ uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
+
if (ssl.getSecurity().get_parms().cipher_type_ == block) {
+ if (ssl.isTLSv1_1()) // IV
+ sz += blockSz;
sz += 1; // pad byte
- uint blockSz = ssl.getCrypto().get_cipher().get_blockSize();
pad = (sz - RECORD_HEADER) % blockSz;
pad = blockSz - pad;
sz += pad;
@@ -294,13 +326,21 @@ void buildMessage(SSL& ssl, output_buffer& output, const Message& msg)
buildHeader(ssl, rlHeader, msg);
rlHeader.length_ = sz - RECORD_HEADER; // record header includes mac
// and pad, hanshake doesn't
+ input_buffer iv;
+ if (ssl.isTLSv1_1() && ssl.getSecurity().get_parms().cipher_type_== block){
+ iv.allocate(blockSz);
+ ssl.getCrypto().get_random().Fill(iv.get_buffer(), blockSz);
+ iv.add_size(blockSz);
+ }
+
+ uint ivSz = iv.get_size();
output.allocate(sz);
- output << rlHeader << msg;
+ output << rlHeader << iv << msg;
opaque digest[SHA_LEN]; // max size
if (ssl.isTLS())
- TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER,
- output.get_size() - RECORD_HEADER, msg.get_type());
+ TLS_hmac(ssl, digest, output.get_buffer() + RECORD_HEADER + ivSz,
+ output.get_size() - RECORD_HEADER - ivSz, msg.get_type());
else
hmac(ssl, digest, output.get_buffer() + RECORD_HEADER,
output.get_size() - RECORD_HEADER, msg.get_type());
@@ -456,6 +496,10 @@ void buildSHA_CertVerify(SSL& ssl, byte* digest)
// some clients still send sslv2 client hello
void ProcessOldClientHello(input_buffer& input, SSL& ssl)
{
+ if (input.get_remaining() < 2) {
+ ssl.SetError(bad_input);
+ return;
+ }
byte b0 = input[AUTO];
byte b1 = input[AUTO];
@@ -721,6 +765,7 @@ int DoProcessReply(SSL& ssl)
// each message in record, can be more than 1 if not encrypted
if (ssl.getSecurity().get_parms().pending_ == false) // cipher on
decrypt_message(ssl, buffer, hdr.length_);
+
mySTL::auto_ptr<Message> msg(mf.CreateObject(hdr.type_));
if (!msg.get()) {
ssl.SetError(factory_error);
@@ -744,13 +789,13 @@ void processReply(SSL& ssl)
if (DoProcessReply(ssl))
// didn't complete process
- if (!ssl.getSocket().IsBlocking()) {
- // keep trying now
+ if (!ssl.getSocket().IsNonBlocking()) {
+ // keep trying now, blocking ok
while (!ssl.GetError())
if (DoProcessReply(ssl) == 0) break;
}
else
- // user will have try again later
+ // user will have try again later, non blocking
ssl.SetError(YasslError(SSL_ERROR_WANT_READ));
}
@@ -761,7 +806,8 @@ void sendClientHello(SSL& ssl)
ssl.verifyState(serverNull);
if (ssl.GetError()) return;
- ClientHello ch(ssl.getSecurity().get_connection().version_);
+ ClientHello ch(ssl.getSecurity().get_connection().version_,
+ ssl.getSecurity().get_connection().compression_);
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
output_buffer out;
@@ -859,6 +905,7 @@ void sendFinished(SSL& ssl, ConnectionEnd side, BufferOutput buffer)
buildFinished(ssl, ssl.useHashes().use_verify(), client); // client
}
else {
+ if (!ssl.getSecurity().GetContext()->GetSessionCacheOff())
GetSessions().add(ssl); // store session
if (side == client_end)
buildFinished(ssl, ssl.useHashes().use_verify(), server); // server
@@ -885,7 +932,20 @@ int sendData(SSL& ssl, const void* buffer, int sz)
for (;;) {
int len = min(sz - sent, MAX_RECORD_SIZE);
output_buffer out;
- const Data data(len, static_cast<const opaque*>(buffer) + sent);
+ input_buffer tmp;
+
+ Data data;
+
+ if (ssl.CompressionOn()) {
+ if (Compress(static_cast<const opaque*>(buffer) + sent, len,
+ tmp) == -1) {
+ ssl.SetError(compress_error);
+ return -1;
+ }
+ data.SetData(tmp.get_size(), tmp.get_buffer());
+ }
+ else
+ data.SetData(len, static_cast<const opaque*>(buffer) + sent);
buildMessage(ssl, out, data);
ssl.Send(out.get_buffer(), out.get_size());
@@ -947,7 +1007,8 @@ void sendServerHello(SSL& ssl, BufferOutput buffer)
ssl.verifyState(clientHelloComplete);
if (ssl.GetError()) return;
- ServerHello sh(ssl.getSecurity().get_connection().version_);
+ ServerHello sh(ssl.getSecurity().get_connection().version_,
+ ssl.getSecurity().get_connection().compression_);
RecordLayerHeader rlHeader;
HandShakeHeader hsHeader;
mySTL::auto_ptr<output_buffer> out(NEW_YS output_buffer);
diff --git a/extra/yassl/src/make.bat b/extra/yassl/src/make.bat
index 148427a6f41..6ddf4ff98df 100644
--- a/extra/yassl/src/make.bat
+++ b/extra/yassl/src/make.bat
@@ -1,7 +1,25 @@
REM quick and dirty build file for testing different MSDEVs
+
+@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+@echo on
+
setlocal
-set myFLAGS= /I../include /I../mySTL /I../taocrypt/include /W3 /c /ZI
+set myFLAGS= /I../include /I../taocrypt/mySTL /I../taocrypt/include /W3 /c /ZI
cl %myFLAGS% buffer.cpp
cl %myFLAGS% cert_wrapper.cpp
diff --git a/extra/yassl/src/socket_wrapper.cpp b/extra/yassl/src/socket_wrapper.cpp
index 70944831884..f281b81a24a 100644
--- a/extra/yassl/src/socket_wrapper.cpp
+++ b/extra/yassl/src/socket_wrapper.cpp
@@ -63,7 +63,7 @@ namespace yaSSL {
Socket::Socket(socket_t s)
- : socket_(s), wouldBlock_(false), blocking_(false)
+ : socket_(s), wouldBlock_(false), nonBlocking_(false)
{}
@@ -148,8 +148,8 @@ uint Socket::receive(byte* buf, unsigned int sz, int flags)
if (recvd == -1) {
if (get_lastError() == SOCKET_EWOULDBLOCK ||
get_lastError() == SOCKET_EAGAIN) {
- wouldBlock_ = true;
- blocking_ = true; // socket can block, only way to tell for win32
+ wouldBlock_ = true; // would have blocked this time only
+ nonBlocking_ = true; // socket nonblocking, win32 only way to tell
return 0;
}
}
@@ -191,9 +191,9 @@ bool Socket::WouldBlock() const
}
-bool Socket::IsBlocking() const
+bool Socket::IsNonBlocking() const
{
- return blocking_;
+ return nonBlocking_;
}
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
index fe4661b5946..aa98465069c 100644
--- a/extra/yassl/src/ssl.cpp
+++ b/extra/yassl/src/ssl.cpp
@@ -122,7 +122,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
EVP_BytesToKey(info.name, "MD5", info.iv, (byte*)password,
passwordSz, 1, key, iv);
- STL::auto_ptr<BulkCipher> cipher;
+ mySTL::auto_ptr<BulkCipher> cipher;
if (strncmp(info.name, "DES-CBC", 7) == 0)
cipher.reset(NEW_YS DES);
else if (strncmp(info.name, "DES-EDE3-CBC", 13) == 0)
@@ -138,7 +138,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
return SSL_BAD_FILE;
}
cipher->set_decryptKey(key, info.iv);
- STL::auto_ptr<x509> newx(NEW_YS x509(x->get_length()));
+ mySTL::auto_ptr<x509> newx(NEW_YS x509(x->get_length()));
cipher->decrypt(newx->use_buffer(), x->get_buffer(),
x->get_length());
ysDelete(x);
@@ -184,10 +184,22 @@ SSL_METHOD* TLSv1_client_method()
}
+SSL_METHOD* TLSv1_1_server_method()
+{
+ return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,2));
+}
+
+
+SSL_METHOD* TLSv1_1_client_method()
+{
+ return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,2));
+}
+
+
SSL_METHOD* SSLv23_server_method()
{
// compatibility only, no version 2 support, but does SSL 3 and TLS 1
- return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,1), true);
+ return NEW_YS SSL_METHOD(server_end, ProtocolVersion(3,2), true);
}
@@ -196,7 +208,7 @@ SSL_METHOD* SSLv23_client_method()
// compatibility only, no version 2 support, but does SSL 3 and TLS 1
// though it sends TLS1 hello not SSLv2 so SSLv3 only servers will decline
// TODO: maybe add support to send SSLv2 hello ???
- return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,1), true);
+ return NEW_YS SSL_METHOD(client_end, ProtocolVersion(3,2), true);
}
@@ -407,7 +419,6 @@ int SSL_shutdown(SSL* ssl)
Alert alert(warning, close_notify);
sendAlert(*ssl, alert);
ssl->useLog().ShowTCP(ssl->getSocket().get_fd(), true);
- ssl->useSocket().closeSocket();
GetErrors().Remove();
@@ -415,8 +426,21 @@ int SSL_shutdown(SSL* ssl)
}
+/* on by default but allow user to turn off */
+long SSL_CTX_set_session_cache_mode(SSL_CTX* ctx, long mode)
+{
+ if (mode == SSL_SESS_CACHE_OFF)
+ ctx->SetSessionCacheOff();
+
+ return SSL_SUCCESS;
+}
+
+
SSL_SESSION* SSL_get_session(SSL* ssl)
{
+ if (ssl->getSecurity().GetContext()->GetSessionCacheOff())
+ return 0;
+
return GetSessions().lookup(
ssl->getSecurity().get_connection().sessionID_);
}
@@ -424,6 +448,9 @@ SSL_SESSION* SSL_get_session(SSL* ssl)
int SSL_set_session(SSL* ssl, SSL_SESSION* session)
{
+ if (ssl->getSecurity().GetContext()->GetSessionCacheOff())
+ return SSL_FAILURE;
+
ssl->set_session(session);
return SSL_SUCCESS;
}
@@ -512,6 +539,19 @@ int SSL_get_error(SSL* ssl, int /*previous*/)
}
+
+/* turn on yaSSL zlib compression
+ returns 0 for success, else error (not built in)
+ only need to turn on for client, becuase server on by default if built in
+ but calling for server will tell you whether it's available or not
+*/
+int SSL_set_compression(SSL* ssl)
+{
+ return ssl->SetCompression();
+}
+
+
+
X509* SSL_get_peer_certificate(SSL* ssl)
{
return ssl->getCrypto().get_certManager().get_peerX509();
@@ -1359,6 +1399,56 @@ int SSL_pending(SSL* ssl)
}
+void SSL_CTX_set_default_passwd_cb(SSL_CTX* ctx, pem_password_cb cb)
+{
+ ctx->SetPasswordCb(cb);
+}
+
+
+int SSLeay_add_ssl_algorithms() // compatibility only
+{
+ return 1;
+}
+
+
+void ERR_remove_state(unsigned long)
+{
+ GetErrors().Remove();
+}
+
+
+int ERR_GET_REASON(int l)
+{
+ return l & 0xfff;
+}
+
+
+unsigned long err_helper(bool peek = false)
+{
+ int ysError = GetErrors().Lookup(peek);
+
+ // translate cert error for libcurl, it uses OpenSSL hex code
+ switch (ysError) {
+ case TaoCrypt::SIG_OTHER_E:
+ return CERTFICATE_ERROR;
+ break;
+ default :
+ return 0;
+ }
+}
+
+
+unsigned long ERR_peek_error()
+{
+ return err_helper(true);
+}
+
+
+unsigned long ERR_get_error()
+{
+ return err_helper();
+}
+
// functions for stunnel
@@ -1477,13 +1567,6 @@ int SSL_pending(SSL* ssl)
}
- long SSL_CTX_set_session_cache_mode(SSL_CTX*, long)
- {
- // TDOD:
- return SSL_SUCCESS;
- }
-
-
long SSL_CTX_set_timeout(SSL_CTX*, long)
{
// TDOD:
@@ -1498,12 +1581,6 @@ int SSL_pending(SSL* ssl)
}
- void SSL_CTX_set_default_passwd_cb(SSL_CTX* ctx, pem_password_cb cb)
- {
- ctx->SetPasswordCb(cb);
- }
-
-
int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX*, const char*, int)
{
// TDOD:
@@ -1555,49 +1632,6 @@ int SSL_pending(SSL* ssl)
}
- int SSLeay_add_ssl_algorithms() // compatibility only
- {
- return 1;
- }
-
-
- void ERR_remove_state(unsigned long)
- {
- GetErrors().Remove();
- }
-
-
- int ERR_GET_REASON(int l)
- {
- return l & 0xfff;
- }
-
- unsigned long err_helper(bool peek = false)
- {
- int ysError = GetErrors().Lookup(peek);
-
- // translate cert error for libcurl, it uses OpenSSL hex code
- switch (ysError) {
- case TaoCrypt::SIG_OTHER_E:
- return CERTFICATE_ERROR;
- break;
- default :
- return 0;
- }
- }
-
-
- unsigned long ERR_peek_error()
- {
- return err_helper(true);
- }
-
-
- unsigned long ERR_get_error()
- {
- return err_helper();
- }
-
// end stunnel needs
diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp
index 3531c0a2c74..25c595f40bc 100644
--- a/extra/yassl/src/yassl_error.cpp
+++ b/extra/yassl/src/yassl_error.cpp
@@ -133,6 +133,18 @@ void SetErrorString(YasslError error, char* buffer)
strncpy(buffer, "protocl version mismatch", max);
break;
+ case compress_error :
+ strncpy(buffer, "compression error", max);
+ break;
+
+ case decompress_error :
+ strncpy(buffer, "decompression error", max);
+ break;
+
+ case pms_version_error :
+ strncpy(buffer, "bad PreMasterSecret version error", max);
+ break;
+
// openssl errors
case SSL_ERROR_WANT_READ :
strncpy(buffer, "the read operation would block", max);
diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp
index bd07f8b70f2..bf10c4b8932 100644
--- a/extra/yassl/src/yassl_imp.cpp
+++ b/extra/yassl/src/yassl_imp.cpp
@@ -87,7 +87,7 @@ void EncryptedPreMasterSecret::build(SSL& ssl)
opaque tmp[SECRET_LEN];
memset(tmp, 0, sizeof(tmp));
ssl.getCrypto().get_random().Fill(tmp, SECRET_LEN);
- ProtocolVersion pv = ssl.getSecurity().get_connection().version_;
+ ProtocolVersion pv = ssl.getSecurity().get_connection().chVersion_;
tmp[0] = pv.major_;
tmp[1] = pv.minor_;
ssl.set_preMaster(tmp, SECRET_LEN);
@@ -233,6 +233,10 @@ void EncryptedPreMasterSecret::read(SSL& ssl, input_buffer& input)
rsa.decrypt(preMasterSecret, secret_, length_,
ssl.getCrypto().get_random());
+ ProtocolVersion pv = ssl.getSecurity().get_connection().chVersion_;
+ if (pv.major_ != preMasterSecret[0] || pv.minor_ != preMasterSecret[1])
+ ssl.SetError(pms_version_error); // continue deriving for timing attack
+
ssl.set_preMaster(preMasterSecret, SECRET_LEN);
ssl.makeMasterSecret();
}
@@ -437,6 +441,7 @@ Parameters::Parameters(ConnectionEnd ce, const Ciphers& ciphers,
ProtocolVersion pv, bool haveDH) : entity_(ce)
{
pending_ = true; // suite not set yet
+ strncpy(cipher_name_, "NONE", 5);
if (ciphers.setSuites_) { // use user set list
suites_size_ = ciphers.suiteSz_;
@@ -445,6 +450,7 @@ Parameters::Parameters(ConnectionEnd ce, const Ciphers& ciphers,
}
else
SetSuites(pv, ce == server_end && !haveDH); // defaults
+
}
@@ -613,14 +619,18 @@ output_buffer& operator<<(output_buffer& output, const HandShakeHeader& hdr)
void HandShakeHeader::Process(input_buffer& input, SSL& ssl)
{
ssl.verifyState(*this);
+ if (ssl.GetError()) return;
const HandShakeFactory& hsf = ssl.getFactory().getHandShake();
mySTL::auto_ptr<HandShakeBase> hs(hsf.CreateObject(type_));
if (!hs.get()) {
ssl.SetError(factory_error);
return;
}
- hashHandShake(ssl, input, c24to32(length_));
+ uint len = c24to32(length_);
+ hashHandShake(ssl, input, len);
+
+ hs->set_length(len);
input >> *hs;
hs->Process(input, ssl);
}
@@ -849,11 +859,17 @@ void Alert::Process(input_buffer& input, SSL& ssl)
opaque mac[SHA_LEN];
input.read(mac, digestSz);
+ if (ssl.getSecurity().get_parms().cipher_type_ == block) {
+ int ivExtra = 0;
opaque fill;
- int padSz = ssl.getSecurity().get_parms().encrypt_size_ - aSz -
- digestSz;
+
+ if (ssl.isTLSv1_1())
+ ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
+ int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra -
+ aSz - digestSz;
for (int i = 0; i < padSz; i++)
fill = input[AUTO];
+ }
// verify
if (memcmp(mac, verify, digestSz)) {
@@ -879,9 +895,13 @@ Data::Data(uint16 len, opaque* b)
{}
-Data::Data(uint16 len, const opaque* w)
- : length_(len), buffer_(0), write_buffer_(w)
-{}
+void Data::SetData(uint16 len, const opaque* buffer)
+{
+ assert(write_buffer_ == 0);
+
+ length_ = len;
+ write_buffer_ = buffer;
+}
input_buffer& Data::set(input_buffer& in)
{
@@ -907,17 +927,12 @@ uint16 Data::get_length() const
}
-const opaque* Data::get_buffer() const
-{
- return write_buffer_;
-}
-
-
void Data::set_length(uint16 l)
{
length_ = l;
}
+
opaque* Data::set_buffer()
{
return buffer_;
@@ -937,27 +952,42 @@ void Data::Process(input_buffer& input, SSL& ssl)
{
int msgSz = ssl.getSecurity().get_parms().encrypt_size_;
int pad = 0, padByte = 0;
+ int ivExtra = 0;
+
if (ssl.getSecurity().get_parms().cipher_type_ == block) {
- pad = *(input.get_buffer() + input.get_current() + msgSz - 1);
+ if (ssl.isTLSv1_1()) // IV
+ ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
+ pad = *(input.get_buffer() + input.get_current() + msgSz -ivExtra - 1);
padByte = 1;
}
int digestSz = ssl.getCrypto().get_digest().get_digestSize();
- int dataSz = msgSz - digestSz - pad - padByte;
+ int dataSz = msgSz - ivExtra - digestSz - pad - padByte;
opaque verify[SHA_LEN];
+ const byte* rawData = input.get_buffer() + input.get_current();
+
// read data
- if (dataSz) {
+ if (dataSz) { // could be compressed
+ if (ssl.CompressionOn()) {
+ input_buffer tmp;
+ if (DeCompress(input, dataSz, tmp) == -1) {
+ ssl.SetError(decompress_error);
+ return;
+ }
+ ssl.addData(NEW_YS input_buffer(tmp.get_size(),
+ tmp.get_buffer(), tmp.get_size()));
+ }
+ else {
input_buffer* data;
ssl.addData(data = NEW_YS input_buffer(dataSz));
input.read(data->get_buffer(), dataSz);
data->add_size(dataSz);
+ }
if (ssl.isTLS())
- TLS_hmac(ssl, verify, data->get_buffer(), dataSz, application_data,
- true);
+ TLS_hmac(ssl, verify, rawData, dataSz, application_data, true);
else
- hmac(ssl, verify, data->get_buffer(), dataSz, application_data,
- true);
+ hmac(ssl, verify, rawData, dataSz, application_data, true);
}
// read mac and fill
@@ -1220,6 +1250,13 @@ void ServerHello::Process(input_buffer&, SSL& ssl)
if (ssl.isTLS() && server_version_.minor_ < 1)
// downgrade to SSLv3
ssl.useSecurity().use_connection().TurnOffTLS();
+ else if (ssl.isTLSv1_1() && server_version_.minor_ == 1)
+ // downdrage to TLSv1
+ ssl.useSecurity().use_connection().TurnOffTLS1_1();
+ }
+ else if (ssl.isTLSv1_1() && server_version_.minor_ < 2) {
+ ssl.SetError(badVersion_error);
+ return;
}
else if (ssl.isTLS() && server_version_.minor_ < 1) {
ssl.SetError(badVersion_error);
@@ -1252,6 +1289,10 @@ void ServerHello::Process(input_buffer&, SSL& ssl)
ssl.useSecurity().set_resuming(false);
ssl.useLog().Trace("server denied resumption");
}
+
+ if (ssl.CompressionOn() && !compression_method_)
+ ssl.UnSetCompression(); // server isn't supporting yaSSL zlib request
+
ssl.useStates().useClient() = serverHelloComplete;
}
@@ -1263,8 +1304,9 @@ ServerHello::ServerHello()
}
-ServerHello::ServerHello(ProtocolVersion pv)
- : server_version_(pv)
+ServerHello::ServerHello(ProtocolVersion pv, bool useCompression)
+ : server_version_(pv),
+ compression_method_(useCompression ? zlib : no_compression)
{
memset(random_, 0, RAN_LEN);
memset(session_id_, 0, ID_LEN);
@@ -1341,6 +1383,8 @@ opaque* ClientKeyBase::get_clientKey() const
// input operator for Client Hello
input_buffer& operator>>(input_buffer& input, ClientHello& hello)
{
+ uint begin = input.get_current(); // could have extensions at end
+
// Protocol
hello.client_version_.major_ = input[AUTO];
hello.client_version_.minor_ = input[AUTO];
@@ -1361,8 +1405,19 @@ input_buffer& operator>>(input_buffer& input, ClientHello& hello)
// Compression
hello.comp_len_ = input[AUTO];
- while (hello.comp_len_--) // ignore for now
- hello.compression_methods_ = CompressionMethod(input[AUTO]);
+ hello.compression_methods_ = no_compression;
+ while (hello.comp_len_--) {
+ CompressionMethod cm = CompressionMethod(input[AUTO]);
+ if (cm == zlib)
+ hello.compression_methods_ = zlib;
+ }
+
+ uint read = input.get_current() - begin;
+ uint expected = hello.get_length();
+
+ // ignore client hello extensions for now
+ if (read < expected)
+ input.set_current(input.get_current() + expected - read);
return input;
}
@@ -1400,6 +1455,13 @@ output_buffer& operator<<(output_buffer& output, const ClientHello& hello)
// Client Hello processing handler
void ClientHello::Process(input_buffer&, SSL& ssl)
{
+ // store version for pre master secret
+ ssl.useSecurity().use_connection().chVersion_ = client_version_;
+
+ if (client_version_.major_ != 3) {
+ ssl.SetError(badVersion_error);
+ return;
+ }
if (ssl.GetMultiProtocol()) { // SSLv23 support
if (ssl.isTLS() && client_version_.minor_ < 1) {
// downgrade to SSLv3
@@ -1407,20 +1469,29 @@ void ClientHello::Process(input_buffer&, SSL& ssl)
ProtocolVersion pv = ssl.getSecurity().get_connection().version_;
ssl.useSecurity().use_parms().SetSuites(pv); // reset w/ SSL suites
}
+ else if (ssl.isTLSv1_1() && client_version_.minor_ == 1)
+ // downgrade to TLSv1, but use same suites
+ ssl.useSecurity().use_connection().TurnOffTLS1_1();
+ }
+ else if (ssl.isTLSv1_1() && client_version_.minor_ < 2) {
+ ssl.SetError(badVersion_error);
+ return;
}
else if (ssl.isTLS() && client_version_.minor_ < 1) {
ssl.SetError(badVersion_error);
return;
}
- else if (!ssl.isTLS() && (client_version_.major_ == 3 &&
- client_version_.minor_ >= 1)) {
+ else if (!ssl.isTLS() && client_version_.minor_ >= 1) {
ssl.SetError(badVersion_error);
return;
}
+
ssl.set_random(random_, client_end);
while (id_len_) { // trying to resume
- SSL_SESSION* session = GetSessions().lookup(session_id_);
+ SSL_SESSION* session = 0;
+ if (!ssl.getSecurity().GetContext()->GetSessionCacheOff())
+ session = GetSessions().lookup(session_id_);
if (!session) {
ssl.useLog().Trace("session lookup failed");
break;
@@ -1444,6 +1515,9 @@ void ClientHello::Process(input_buffer&, SSL& ssl)
ssl.matchSuite(cipher_suites_, suite_len_);
ssl.set_pending(ssl.getSecurity().get_parms().suite_[1]);
+ if (compression_methods_ == zlib)
+ ssl.SetCompression();
+
ssl.useStates().useServer() = clientHelloComplete;
}
@@ -1478,8 +1552,9 @@ ClientHello::ClientHello()
}
-ClientHello::ClientHello(ProtocolVersion pv)
- : client_version_(pv)
+ClientHello::ClientHello(ProtocolVersion pv, bool useCompression)
+ : client_version_(pv),
+ compression_methods_(useCompression ? zlib : no_compression)
{
memset(random_, 0, RAN_LEN);
}
@@ -1943,8 +2018,13 @@ void Finished::Process(input_buffer& input, SSL& ssl)
int digestSz = ssl.getCrypto().get_digest().get_digestSize();
input.read(mac, digestSz);
+ uint ivExtra = 0;
+ if (ssl.getSecurity().get_parms().cipher_type_ == block)
+ if (ssl.isTLSv1_1())
+ ivExtra = ssl.getCrypto().get_cipher().get_blockSize();
+
opaque fill;
- int padSz = ssl.getSecurity().get_parms().encrypt_size_ -
+ int padSz = ssl.getSecurity().get_parms().encrypt_size_ - ivExtra -
HANDSHAKE_HEADER - finishedSz - digestSz;
for (int i = 0; i < padSz; i++)
fill = input[AUTO];
@@ -2018,7 +2098,9 @@ void clean(volatile opaque* p, uint sz, RandomPool& ran)
Connection::Connection(ProtocolVersion v, RandomPool& ran)
: pre_master_secret_(0), sequence_number_(0), peer_sequence_number_(0),
pre_secret_len_(0), send_server_key_(false), master_clean_(false),
- TLS_(v.major_ >= 3 && v.minor_ >= 1), version_(v), random_(ran)
+ TLS_(v.major_ >= 3 && v.minor_ >= 1),
+ TLSv1_1_(v.major_ >= 3 && v.minor_ >= 2), compression_(false),
+ version_(v), random_(ran)
{
memset(sessionID_, 0, sizeof(sessionID_));
}
@@ -2043,6 +2125,13 @@ void Connection::TurnOffTLS()
}
+void Connection::TurnOffTLS1_1()
+{
+ TLSv1_1_ = false;
+ version_.minor_ = 1;
+}
+
+
// wipeout master secret
void Connection::CleanMaster()
{
diff --git a/extra/yassl/src/yassl_int.cpp b/extra/yassl/src/yassl_int.cpp
index 5288acb2bcd..1a407ca8ba5 100644
--- a/extra/yassl/src/yassl_int.cpp
+++ b/extra/yassl/src/yassl_int.cpp
@@ -38,6 +38,11 @@
#endif
+#ifdef HAVE_LIBZ
+ #include "zlib.h"
+#endif
+
+
#ifdef YASSL_PURE_C
void* operator new(size_t sz, yaSSL::new_t)
@@ -727,6 +732,32 @@ void SSL::set_preMaster(const opaque* pre, uint sz)
}
+// set yaSSL zlib type compression
+int SSL::SetCompression()
+{
+#ifdef HAVE_LIBZ
+ secure_.use_connection().compression_ = true;
+ return 0;
+#else
+ return -1; // not built in
+#endif
+}
+
+
+// unset yaSSL zlib type compression
+void SSL::UnSetCompression()
+{
+ secure_.use_connection().compression_ = false;
+}
+
+
+// is yaSSL zlib compression on
+bool SSL::CompressionOn() const
+{
+ return secure_.get_connection().compression_;
+}
+
+
// store master secret
void SSL::set_masterSecret(const opaque* sec)
{
@@ -1109,6 +1140,11 @@ void SSL::verifyState(const RecordLayerHeader& rlHeader)
{
if (GetError()) return;
+ if (rlHeader.version_.major_ != 3 || rlHeader.version_.minor_ > 2) {
+ SetError(badVersion_error);
+ return;
+ }
+
if (states_.getRecord() == recordNotReady ||
(rlHeader.type_ == application_data && // data and handshake
states_.getHandShake() != handShakeReady) ) // isn't complete yet
@@ -1247,6 +1283,9 @@ void SSL::matchSuite(const opaque* peer, uint length)
void SSL::set_session(SSL_SESSION* s)
{
+ if (getSecurity().GetContext()->GetSessionCacheOff())
+ return;
+
if (s && GetSessions().lookup(s->GetID(), &secure_.use_resume())) {
secure_.set_resuming(true);
crypto_.use_certManager().setPeerX509(s->GetPeerX509());
@@ -1344,6 +1383,12 @@ bool SSL::isTLS() const
}
+bool SSL::isTLSv1_1() const
+{
+ return secure_.get_connection().TLSv1_1_;
+}
+
+
void SSL::addData(input_buffer* data)
{
buffers_.useData().push_back(data);
@@ -1703,7 +1748,7 @@ bool SSL_METHOD::multipleProtocol() const
SSL_CTX::SSL_CTX(SSL_METHOD* meth)
: method_(meth), certificate_(0), privateKey_(0), passwordCb_(0),
- userData_(0)
+ userData_(0), sessionCacheOff_(false)
{}
@@ -1784,12 +1829,24 @@ void* SSL_CTX::GetUserData() const
}
+bool SSL_CTX::GetSessionCacheOff() const
+{
+ return sessionCacheOff_;
+}
+
+
void SSL_CTX::SetUserData(void* data)
{
userData_ = data;
}
+void SSL_CTX::SetSessionCacheOff()
+{
+ sessionCacheOff_ = true;
+}
+
+
void SSL_CTX::setVerifyPeer()
{
method_->setVerifyPeer();
@@ -2312,9 +2369,110 @@ ASN1_STRING* StringHolder::GetString()
}
+#ifdef HAVE_LIBZ
+
+ void* myAlloc(void* /* opaque */, unsigned int item, unsigned int size)
+ {
+ return NEW_YS unsigned char[item * size];
+ }
+
+
+ void myFree(void* /* opaque */, void* memory)
+ {
+ unsigned char* ptr = static_cast<unsigned char*>(memory);
+ yaSSL::ysArrayDelete(ptr);
+ }
+
+
+ // put size in front of compressed data
+ int Compress(const byte* in, int sz, input_buffer& buffer)
+ {
+ byte tmp[LENGTH_SZ];
+ z_stream c_stream; /* compression stream */
+
+ buffer.allocate(sz + sizeof(uint16) + COMPRESS_EXTRA);
+
+ c_stream.zalloc = myAlloc;
+ c_stream.zfree = myFree;
+ c_stream.opaque = (voidpf)0;
+
+ c_stream.next_in = const_cast<byte*>(in);
+ c_stream.avail_in = sz;
+ c_stream.next_out = buffer.get_buffer() + sizeof(tmp);
+ c_stream.avail_out = buffer.get_capacity() - sizeof(tmp);
+
+ if (deflateInit(&c_stream, 8) != Z_OK) return -1;
+ int err = deflate(&c_stream, Z_FINISH);
+ deflateEnd(&c_stream);
+ if (err != Z_OK && err != Z_STREAM_END) return -1;
+
+ c16toa(sz, tmp);
+ memcpy(buffer.get_buffer(), tmp, sizeof(tmp));
+ buffer.add_size(c_stream.total_out + sizeof(tmp));
+
+ return 0;
+ }
+
+
+ // get uncompressed size in front
+ int DeCompress(input_buffer& in, int sz, input_buffer& out)
+ {
+ byte tmp[LENGTH_SZ];
+
+ in.read(tmp, sizeof(tmp));
+
+ uint16 len;
+ ato16(tmp, len);
+
+ out.allocate(len);
+
+ z_stream d_stream; /* decompression stream */
+
+ d_stream.zalloc = myAlloc;
+ d_stream.zfree = myFree;
+ d_stream.opaque = (voidpf)0;
+
+ d_stream.next_in = in.get_buffer() + in.get_current();
+ d_stream.avail_in = sz - sizeof(tmp);
+ d_stream.next_out = out.get_buffer();
+ d_stream.avail_out = out.get_capacity();
+
+ if (inflateInit(&d_stream) != Z_OK) return -1;
+ int err = inflate(&d_stream, Z_FINISH);
+ inflateEnd(&d_stream);
+ if (err != Z_OK && err != Z_STREAM_END) return -1;
+
+ out.add_size(d_stream.total_out);
+ in.set_current(in.get_current() + sz - sizeof(tmp));
+
+ return 0;
+ }
+
+
+#else // LIBZ
+
+ // these versions should never get called
+ int Compress(const byte* in, int sz, input_buffer& buffer)
+ {
+ assert(0);
+ return -1;
+ }
+
+
+ int DeCompress(input_buffer& in, int sz, input_buffer& out)
+ {
+ assert(0);
+ return -1;
+ }
+
+
+#endif // LIBZ
+
+
} // namespace
+
extern "C" void yaSSL_CleanUp()
{
TaoCrypt::CleanUp();
diff --git a/extra/yassl/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt
index 540827954d0..baa8f97dff6 100755
--- a/extra/yassl/taocrypt/CMakeLists.txt
+++ b/extra/yassl/taocrypt/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
INCLUDE_DIRECTORIES(mySTL include)
ADD_LIBRARY(taocrypt src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
diff --git a/extra/yassl/taocrypt/Makefile.am b/extra/yassl/taocrypt/Makefile.am
index f1340b38437..c03c1a2713b 100644
--- a/extra/yassl/taocrypt/Makefile.am
+++ b/extra/yassl/taocrypt/Makefile.am
@@ -1,2 +1,5 @@
SUBDIRS = src test benchmark
EXTRA_DIST = taocrypt.dsw taocrypt.dsp CMakeLists.txt $(wildcard mySTL/*.hpp)
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/extra/yassl/taocrypt/benchmark/Makefile.am b/extra/yassl/taocrypt/benchmark/Makefile.am
index 674406d8ad6..891dd532b98 100644
--- a/extra/yassl/taocrypt/benchmark/Makefile.am
+++ b/extra/yassl/taocrypt/benchmark/Makefile.am
@@ -4,3 +4,6 @@ benchmark_SOURCES = benchmark.cpp
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
benchmark_CXXFLAGS = -DYASSL_PURE_C
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/extra/yassl/taocrypt/benchmark/make.bat b/extra/yassl/taocrypt/benchmark/make.bat
index 4ebe4b32417..8b3c112ec52 100644
--- a/extra/yassl/taocrypt/benchmark/make.bat
+++ b/extra/yassl/taocrypt/benchmark/make.bat
@@ -1,7 +1,25 @@
REM quick and dirty build file for testing different MSDEVs
+
+@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+@echo on
+
setlocal
-set myFLAGS= /I../include /I../../mySTL /c /W3 /G6 /O2
+set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2
cl %myFLAGS% benchmark.cpp
diff --git a/extra/yassl/taocrypt/include/aes.hpp b/extra/yassl/taocrypt/include/aes.hpp
index cb70f5c0e7e..5c53fc39411 100644
--- a/extra/yassl/taocrypt/include/aes.hpp
+++ b/extra/yassl/taocrypt/include/aes.hpp
@@ -34,6 +34,12 @@
#include "modes.hpp"
+#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
+ #define DO_AES_ASM
+#endif
+
+
+
namespace TaoCrypt {
@@ -46,15 +52,14 @@ public:
enum { BLOCK_SIZE = AES_BLOCK_SIZE };
AES(CipherDir DIR, Mode MODE)
- : Mode_BASE(BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
+ : Mode_BASE(BLOCK_SIZE, DIR, MODE) {}
+#ifdef DO_AES_ASM
void Process(byte*, const byte*, word32);
+#endif
void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION);
void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); }
private:
- CipherDir dir_;
- Mode mode_;
-
static const word32 rcon_[];
word32 rounds_;
diff --git a/extra/yassl/taocrypt/include/algebra.hpp b/extra/yassl/taocrypt/include/algebra.hpp
index 07fc405f093..9cfbcf06ece 100644
--- a/extra/yassl/taocrypt/include/algebra.hpp
+++ b/extra/yassl/taocrypt/include/algebra.hpp
@@ -75,7 +75,8 @@ public:
typedef Integer Element;
AbstractRing() : AbstractGroup() {m_mg.m_pRing = this;}
- AbstractRing(const AbstractRing &source) {m_mg.m_pRing = this;}
+ AbstractRing(const AbstractRing &source) : AbstractGroup()
+ {m_mg.m_pRing = this;}
AbstractRing& operator=(const AbstractRing &source) {return *this;}
virtual bool IsUnit(const Element &a) const =0;
diff --git a/extra/yassl/taocrypt/include/arc4.hpp b/extra/yassl/taocrypt/include/arc4.hpp
index 05b0921f5a1..ddd5082f557 100644
--- a/extra/yassl/taocrypt/include/arc4.hpp
+++ b/extra/yassl/taocrypt/include/arc4.hpp
@@ -46,7 +46,6 @@ public:
ARC4() {}
void Process(byte*, const byte*, word32);
- void AsmProcess(byte*, const byte*, word32);
void SetKey(const byte*, word32);
private:
byte x_;
@@ -55,6 +54,8 @@ private:
ARC4(const ARC4&); // hide copy
const ARC4 operator=(const ARC4&); // and assign
+
+ void AsmProcess(byte*, const byte*, word32);
};
} // namespace
diff --git a/extra/yassl/taocrypt/include/asn.hpp b/extra/yassl/taocrypt/include/asn.hpp
index dbee54be6f1..1151f3c944e 100644
--- a/extra/yassl/taocrypt/include/asn.hpp
+++ b/extra/yassl/taocrypt/include/asn.hpp
@@ -34,7 +34,11 @@
#include "misc.hpp"
#include "block.hpp"
#include "error.hpp"
-#include STL_LIST_FILE
+#ifdef USE_SYS_STL
+ #include <list>
+#else
+ #include "list.hpp"
+#endif
namespace STL = STL_NAMESPACE;
diff --git a/extra/yassl/taocrypt/include/block.hpp b/extra/yassl/taocrypt/include/block.hpp
index a931158a83d..0cf27d0b6b5 100644
--- a/extra/yassl/taocrypt/include/block.hpp
+++ b/extra/yassl/taocrypt/include/block.hpp
@@ -34,7 +34,12 @@
#include "misc.hpp"
#include <string.h> // memcpy
#include <stddef.h> // ptrdiff_t
-#include STL_ALGORITHM_FILE
+
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
diff --git a/extra/yassl/taocrypt/include/blowfish.hpp b/extra/yassl/taocrypt/include/blowfish.hpp
index 40953624232..4d6ad1b034b 100644
--- a/extra/yassl/taocrypt/include/blowfish.hpp
+++ b/extra/yassl/taocrypt/include/blowfish.hpp
@@ -32,12 +32,21 @@
#include "misc.hpp"
#include "modes.hpp"
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
+#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
+ #define DO_BLOWFISH_ASM
+#endif
+
+
namespace TaoCrypt {
enum { BLOWFISH_BLOCK_SIZE = 8 };
@@ -49,15 +58,14 @@ public:
enum { BLOCK_SIZE = BLOWFISH_BLOCK_SIZE, ROUNDS = 16 };
Blowfish(CipherDir DIR, Mode MODE)
- : Mode_BASE(BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
+ : Mode_BASE(BLOCK_SIZE, DIR, MODE) {}
+#ifdef DO_BLOWFISH_ASM
void Process(byte*, const byte*, word32);
+#endif
void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION);
void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); }
private:
- CipherDir dir_;
- Mode mode_;
-
static const word32 p_init_[ROUNDS + 2];
static const word32 s_init_[4 * 256];
diff --git a/extra/yassl/taocrypt/include/des.hpp b/extra/yassl/taocrypt/include/des.hpp
index 48bb1e9119d..19273821f98 100644
--- a/extra/yassl/taocrypt/include/des.hpp
+++ b/extra/yassl/taocrypt/include/des.hpp
@@ -34,6 +34,12 @@
#include "misc.hpp"
#include "modes.hpp"
+
+#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
+ #define DO_DES_ASM
+#endif
+
+
namespace TaoCrypt {
@@ -53,13 +59,9 @@ protected:
class DES : public Mode_BASE, public BasicDES {
public:
DES(CipherDir DIR, Mode MODE)
- : Mode_BASE(DES_BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
+ : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {}
- void Process(byte*, const byte*, word32);
private:
- CipherDir dir_;
- Mode mode_;
-
void ProcessAndXorBlock(const byte*, const byte*, byte*) const;
DES(const DES&); // hide copy
@@ -71,14 +73,10 @@ private:
class DES_EDE2 : public Mode_BASE {
public:
DES_EDE2(CipherDir DIR, Mode MODE)
- : Mode_BASE(DES_BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
+ : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {}
void SetKey(const byte*, word32, CipherDir dir);
- void Process(byte*, const byte*, word32);
private:
- CipherDir dir_;
- Mode mode_;
-
BasicDES des1_;
BasicDES des2_;
@@ -94,15 +92,14 @@ private:
class DES_EDE3 : public Mode_BASE {
public:
DES_EDE3(CipherDir DIR, Mode MODE)
- : Mode_BASE(DES_BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
+ : Mode_BASE(DES_BLOCK_SIZE, DIR, MODE) {}
void SetKey(const byte*, word32, CipherDir dir);
void SetIV(const byte* iv) { memcpy(r_, iv, DES_BLOCK_SIZE); }
+#ifdef DO_DES_ASM
void Process(byte*, const byte*, word32);
+#endif
private:
- CipherDir dir_;
- Mode mode_;
-
BasicDES des1_;
BasicDES des2_;
BasicDES des3_;
diff --git a/extra/yassl/taocrypt/include/integer.hpp b/extra/yassl/taocrypt/include/integer.hpp
index 70b4dc79e73..751c79102c4 100644
--- a/extra/yassl/taocrypt/include/integer.hpp
+++ b/extra/yassl/taocrypt/include/integer.hpp
@@ -45,7 +45,11 @@
#include "random.hpp"
#include "file.hpp"
#include <string.h>
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
#ifdef TAOCRYPT_X86ASM_AVAILABLE
@@ -67,7 +71,8 @@
#endif
// SSE2 intrinsics work in GCC 3.3 or later
-#if defined(__SSE2__) && (__GNUC_MAJOR__ > 3 || __GNUC_MINOR__ > 2)
+#if defined(__SSE2__) && (__GNUC__ == 4 || __GNUC_MAJOR__ > 3 || \
+ __GNUC_MINOR__ > 2)
#define SSE2_INTRINSICS_AVAILABLE
#endif
@@ -106,7 +111,6 @@ namespace TaoCrypt {
#endif
};
- template class TAOCRYPT_DLL AlignedAllocator<word>;
typedef Block<word, AlignedAllocator<word> > AlignedWordBlock;
#else
typedef WordBlock AlignedWordBlock;
diff --git a/extra/yassl/taocrypt/include/md5.hpp b/extra/yassl/taocrypt/include/md5.hpp
index 30d14d54fbf..f607a922155 100644
--- a/extra/yassl/taocrypt/include/md5.hpp
+++ b/extra/yassl/taocrypt/include/md5.hpp
@@ -31,6 +31,11 @@
#include "hash.hpp"
+
+#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
+ #define DO_MD5_ASM
+#endif
+
namespace TaoCrypt {
@@ -49,7 +54,9 @@ public:
MD5(const MD5&);
MD5& operator= (const MD5&);
+#ifdef DO_MD5_ASM
void Update(const byte*, word32);
+#endif
void Init();
void Swap(MD5&);
diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp
index 3d2d4c62466..cc20b60d528 100644
--- a/extra/yassl/taocrypt/include/misc.hpp
+++ b/extra/yassl/taocrypt/include/misc.hpp
@@ -151,6 +151,17 @@ void CleanUp();
#endif
+#ifdef TAOCRYPT_X86ASM_AVAILABLE
+ bool HaveCpuId();
+ bool IsPentium();
+ void CpuId(word32 input, word32 *output);
+
+ extern bool isMMX;
+#endif
+
+
+
+
// Turn on ia32 ASM for Ciphers and Message Digests
// Seperate define since these are more complex, use member offsets
// and user may want to turn off while leaving Big Integer optos on
@@ -200,17 +211,9 @@ void CleanUp();
#ifdef USE_SYS_STL
// use system STL
- #define STL_VECTOR_FILE <vector>
- #define STL_LIST_FILE <list>
- #define STL_ALGORITHM_FILE <algorithm>
- #define STL_MEMORY_FILE <memory>
#define STL_NAMESPACE std
#else
// use mySTL
- #define STL_VECTOR_FILE "vector.hpp"
- #define STL_LIST_FILE "list.hpp"
- #define STL_ALGORITHM_FILE "algorithm.hpp"
- #define STL_MEMORY_FILE "memory.hpp"
#define STL_NAMESPACE mySTL
#endif
diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp
index 65b7318661e..d77f855385c 100644
--- a/extra/yassl/taocrypt/include/modes.hpp
+++ b/extra/yassl/taocrypt/include/modes.hpp
@@ -38,6 +38,7 @@ namespace TaoCrypt {
enum Mode { ECB, CBC };
+
// BlockCipher abstraction
template<CipherDir DIR, class T, Mode MODE>
class BlockCipher {
@@ -63,14 +64,16 @@ class Mode_BASE : public virtual_base {
public:
enum { MaxBlockSz = 16 };
- explicit Mode_BASE(int sz)
+ explicit Mode_BASE(int sz, CipherDir dir, Mode mode)
: blockSz_(sz), reg_(reinterpret_cast<byte*>(r_)),
- tmp_(reinterpret_cast<byte*>(t_))
+ tmp_(reinterpret_cast<byte*>(t_)), dir_(dir), mode_(mode)
{
assert(sz <= MaxBlockSz);
}
virtual ~Mode_BASE() {}
+ virtual void Process(byte*, const byte*, word32);
+
void SetIV(const byte* iv) { memcpy(reg_, iv, blockSz_); }
protected:
int blockSz_;
@@ -80,6 +83,9 @@ protected:
word32 r_[MaxBlockSz / sizeof(word32)]; // align reg_ on word32
word32 t_[MaxBlockSz / sizeof(word32)]; // align tmp_ on word32
+ CipherDir dir_;
+ Mode mode_;
+
void ECB_Process(byte*, const byte*, word32);
void CBC_Encrypt(byte*, const byte*, word32);
void CBC_Decrypt(byte*, const byte*, word32);
@@ -92,6 +98,18 @@ private:
};
+inline void Mode_BASE::Process(byte* out, const byte* in, word32 sz)
+{
+ if (mode_ == ECB)
+ ECB_Process(out, in, sz);
+ else if (mode_ == CBC)
+ if (dir_ == ENCRYPTION)
+ CBC_Encrypt(out, in, sz);
+ else
+ CBC_Decrypt(out, in, sz);
+}
+
+
// ECB Process blocks
inline void Mode_BASE::ECB_Process(byte* out, const byte* in, word32 sz)
{
diff --git a/extra/yassl/taocrypt/include/ripemd.hpp b/extra/yassl/taocrypt/include/ripemd.hpp
index 2e594b7604d..5d443769662 100644
--- a/extra/yassl/taocrypt/include/ripemd.hpp
+++ b/extra/yassl/taocrypt/include/ripemd.hpp
@@ -31,6 +31,11 @@
#include "hash.hpp"
+
+#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
+ #define DO_RIPEMD_ASM
+#endif
+
namespace TaoCrypt {
@@ -49,7 +54,9 @@ public:
RIPEMD160(const RIPEMD160&);
RIPEMD160& operator= (const RIPEMD160&);
+#ifdef DO_RIPEMD_ASM
void Update(const byte*, word32);
+#endif
void Init();
void Swap(RIPEMD160&);
private:
diff --git a/extra/yassl/taocrypt/include/rsa.hpp b/extra/yassl/taocrypt/include/rsa.hpp
index 1b531b9d0c0..c33e21b76a3 100644
--- a/extra/yassl/taocrypt/include/rsa.hpp
+++ b/extra/yassl/taocrypt/include/rsa.hpp
@@ -239,7 +239,8 @@ bool RSA_Encryptor<Pad>::SSL_Verify(const byte* message, word32 sz,
const byte* sig)
{
ByteBlock plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength());
- SSL_Decrypt(key_, sig, plain.get_buffer());
+ if (SSL_Decrypt(key_, sig, plain.get_buffer()) != sz)
+ return false; // not right justified or bad padding
if ( (memcmp(plain.get_buffer(), message, sz)) == 0)
return true;
diff --git a/extra/yassl/taocrypt/include/sha.hpp b/extra/yassl/taocrypt/include/sha.hpp
index 2d65932dc17..510c516b1a4 100644
--- a/extra/yassl/taocrypt/include/sha.hpp
+++ b/extra/yassl/taocrypt/include/sha.hpp
@@ -31,6 +31,11 @@
#include "hash.hpp"
+
+#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
+ #define DO_SHA_ASM
+#endif
+
namespace TaoCrypt {
@@ -46,7 +51,9 @@ public:
word32 getDigestSize() const { return DIGEST_SIZE; }
word32 getPadSize() const { return PAD_SIZE; }
+#ifdef DO_SHA_ASM
void Update(const byte* data, word32 len);
+#endif
void Init();
SHA(const SHA&);
diff --git a/extra/yassl/taocrypt/include/twofish.hpp b/extra/yassl/taocrypt/include/twofish.hpp
index ba144d2defb..8cad4923262 100644
--- a/extra/yassl/taocrypt/include/twofish.hpp
+++ b/extra/yassl/taocrypt/include/twofish.hpp
@@ -32,12 +32,20 @@
#include "misc.hpp"
#include "modes.hpp"
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
+#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
+ #define DO_TWOFISH_ASM
+#endif
+
namespace TaoCrypt {
enum { TWOFISH_BLOCK_SIZE = 16 };
@@ -49,15 +57,14 @@ public:
enum { BLOCK_SIZE = TWOFISH_BLOCK_SIZE };
Twofish(CipherDir DIR, Mode MODE)
- : Mode_BASE(BLOCK_SIZE), dir_(DIR), mode_(MODE) {}
+ : Mode_BASE(BLOCK_SIZE, DIR, MODE) {}
+#ifdef DO_TWOFISH_ASM
void Process(byte*, const byte*, word32);
+#endif
void SetKey(const byte* key, word32 sz, CipherDir fake = ENCRYPTION);
void SetIV(const byte* iv) { memcpy(r_, iv, BLOCK_SIZE); }
private:
- CipherDir dir_;
- Mode mode_;
-
static const byte q_[2][256];
static const word32 mds_[4][256];
diff --git a/extra/yassl/taocrypt/src/aes.cpp b/extra/yassl/taocrypt/src/aes.cpp
index 574a88a736c..2940f06c074 100644
--- a/extra/yassl/taocrypt/src/aes.cpp
+++ b/extra/yassl/taocrypt/src/aes.cpp
@@ -34,33 +34,19 @@
#include "aes.hpp"
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_AES_ASM
-#endif
-
-
namespace TaoCrypt {
-#if !defined(DO_AES_ASM)
-
-// Generic Version
-void AES::Process(byte* out, const byte* in, word32 sz)
-{
- if (mode_ == ECB)
- ECB_Process(out, in, sz);
- else if (mode_ == CBC)
- if (dir_ == ENCRYPTION)
- CBC_Encrypt(out, in, sz);
- else
- CBC_Decrypt(out, in, sz);
-}
-
-#else
+#if defined(DO_AES_ASM)
// ia32 optimized version
void AES::Process(byte* out, const byte* in, word32 sz)
{
+ if (!isMMX) {
+ Mode_BASE::Process(out, in, sz);
+ return;
+ }
+
word32 blocks = sz / BLOCK_SIZE;
if (mode_ == ECB)
diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp
index 375cd6cd524..76c4e99323d 100644
--- a/extra/yassl/taocrypt/src/algebra.cpp
+++ b/extra/yassl/taocrypt/src/algebra.cpp
@@ -29,7 +29,11 @@
#include "runtime.hpp"
#include "algebra.hpp"
-#include STL_VECTOR_FILE
+#ifdef USE_SYS_STL
+ #include <vector>
+#else
+ #include "vector.hpp"
+#endif
namespace STL = STL_NAMESPACE;
diff --git a/extra/yassl/taocrypt/src/arc4.cpp b/extra/yassl/taocrypt/src/arc4.cpp
index ea1e084014c..90b5170c59e 100644
--- a/extra/yassl/taocrypt/src/arc4.cpp
+++ b/extra/yassl/taocrypt/src/arc4.cpp
@@ -80,12 +80,18 @@ inline unsigned int MakeByte(word32& x, word32& y, byte* s)
} // namespace
-#ifndef DO_ARC4_ASM
void ARC4::Process(byte* out, const byte* in, word32 length)
{
if (length == 0) return;
+#ifdef DO_ARC4_ASM
+ if (isMMX) {
+ AsmProcess(out, in, length);
+ return;
+ }
+#endif
+
byte *const s = state_;
word32 x = x_;
word32 y = y_;
@@ -100,13 +106,16 @@ void ARC4::Process(byte* out, const byte* in, word32 length)
y_ = y;
}
-#else // DO_ARC4_ASM
+#ifdef DO_ARC4_ASM
+
#ifdef _MSC_VER
__declspec(naked)
+#else
+ __attribute__ ((noinline))
#endif
-void ARC4::Process(byte* out, const byte* in, word32 length)
+void ARC4::AsmProcess(byte* out, const byte* in, word32 length)
{
#ifdef __GNUC__
#define AS1(x) asm(#x);
diff --git a/extra/yassl/taocrypt/src/blowfish.cpp b/extra/yassl/taocrypt/src/blowfish.cpp
index 40ae1a17e6c..d736292fb19 100644
--- a/extra/yassl/taocrypt/src/blowfish.cpp
+++ b/extra/yassl/taocrypt/src/blowfish.cpp
@@ -37,34 +37,21 @@
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_BLOWFISH_ASM
-#endif
-
namespace TaoCrypt {
-#if !defined(DO_BLOWFISH_ASM)
-
-// Generic Version
-void Blowfish::Process(byte* out, const byte* in, word32 sz)
-{
- if (mode_ == ECB)
- ECB_Process(out, in, sz);
- else if (mode_ == CBC)
- if (dir_ == ENCRYPTION)
- CBC_Encrypt(out, in, sz);
- else
- CBC_Decrypt(out, in, sz);
-}
-
-#else
+#if defined(DO_BLOWFISH_ASM)
// ia32 optimized version
void Blowfish::Process(byte* out, const byte* in, word32 sz)
{
+ if (!isMMX) {
+ Mode_BASE::Process(out, in, sz);
+ return;
+ }
+
word32 blocks = sz / BLOCK_SIZE;
if (mode_ == ECB)
diff --git a/extra/yassl/taocrypt/src/des.cpp b/extra/yassl/taocrypt/src/des.cpp
index 2628e142bae..94428ac587e 100644
--- a/extra/yassl/taocrypt/src/des.cpp
+++ b/extra/yassl/taocrypt/src/des.cpp
@@ -34,16 +34,16 @@
#include "runtime.hpp"
#include "des.hpp"
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_DES_ASM
-#endif
-
namespace TaoCrypt {
@@ -357,18 +357,6 @@ void BasicDES::RawProcessBlock(word32& lIn, word32& rIn) const
}
-void DES::Process(byte* out, const byte* in, word32 sz)
-{
- if (mode_ == ECB)
- ECB_Process(out, in, sz);
- else if (mode_ == CBC)
- if (dir_ == ENCRYPTION)
- CBC_Encrypt(out, in, sz);
- else
- CBC_Decrypt(out, in, sz);
-}
-
-
typedef BlockGetAndPut<word32, BigEndian> Block;
@@ -386,17 +374,6 @@ void DES::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) const
}
-void DES_EDE2::Process(byte* out, const byte* in, word32 sz)
-{
- if (mode_ == ECB)
- ECB_Process(out, in, sz);
- else if (mode_ == CBC)
- if (dir_ == ENCRYPTION)
- CBC_Encrypt(out, in, sz);
- else
- CBC_Decrypt(out, in, sz);
-}
-
void DES_EDE2::SetKey(const byte* key, word32 sz, CipherDir dir)
{
des1_.SetKey(key, sz, dir);
@@ -429,25 +406,16 @@ void DES_EDE3::SetKey(const byte* key, word32 sz, CipherDir dir)
-#if !defined(DO_DES_ASM)
-
-// Generic Version
-void DES_EDE3::Process(byte* out, const byte* in, word32 sz)
-{
- if (mode_ == ECB)
- ECB_Process(out, in, sz);
- else if (mode_ == CBC)
- if (dir_ == ENCRYPTION)
- CBC_Encrypt(out, in, sz);
- else
- CBC_Decrypt(out, in, sz);
-}
-
-#else
+#if defined(DO_DES_ASM)
// ia32 optimized version
void DES_EDE3::Process(byte* out, const byte* in, word32 sz)
{
+ if (!isMMX) {
+ Mode_BASE::Process(out, in, sz);
+ return;
+ }
+
word32 blocks = sz / DES_BLOCK_SIZE;
if (mode_ == CBC)
diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp
index 500160cfe37..1ed69ce34dc 100644
--- a/extra/yassl/taocrypt/src/integer.cpp
+++ b/extra/yassl/taocrypt/src/integer.cpp
@@ -55,12 +55,15 @@ extern "C" word myUMULH(word, word);
#pragma intrinsic (myUMULH)
#endif
+#ifdef __GNUC__
+ #include <signal.h>
+ #include <setjmp.h>
+#endif
+
#ifdef SSE2_INTRINSICS_AVAILABLE
#ifdef __GNUC__
#include <xmmintrin.h>
- #include <signal.h>
- #include <setjmp.h>
#ifdef TAOCRYPT_MEMALIGN_AVAILABLE
#include <malloc.h>
#else
@@ -1015,44 +1018,20 @@ void Portable::Multiply8Bottom(word *R, const word *A, const word *B)
// ************** x86 feature detection ***************
-static bool s_sse2Enabled = true;
-
-static void CpuId(word32 input, word32 *output)
-{
-#ifdef __GNUC__
- __asm__
- (
- // save ebx in case -fPIC is being used
- "push %%ebx; cpuid; mov %%ebx, %%edi; pop %%ebx"
- : "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d"(output[3])
- : "a" (input)
- );
-#else
- __asm
- {
- mov eax, input
- cpuid
- mov edi, output
- mov [edi], eax
- mov [edi+4], ebx
- mov [edi+8], ecx
- mov [edi+12], edx
- }
-#endif
-}
#ifdef SSE2_INTRINSICS_AVAILABLE
+
#ifndef _MSC_VER
-static jmp_buf s_env;
-static void SigIllHandler(int)
-{
+ static jmp_buf s_env;
+ static void SigIllHandler(int)
+ {
longjmp(s_env, 1);
-}
+ }
#endif
static bool HasSSE2()
{
- if (!s_sse2Enabled)
+ if (!IsPentium())
return false;
word32 cpuid[4];
@@ -1081,23 +1060,22 @@ static bool HasSSE2()
if (setjmp(s_env))
result = false;
else
- __asm __volatile ("xorps %xmm0, %xmm0");
+ __asm __volatile ("xorpd %xmm0, %xmm0");
signal(SIGILL, oldHandler);
return result;
#endif
}
-#endif
+#endif // SSE2_INTRINSICS_AVAILABLE
+
static bool IsP4()
{
- word32 cpuid[4];
-
- CpuId(0, cpuid);
- STL::swap(cpuid[2], cpuid[3]);
- if (memcmp(cpuid+1, "GenuineIntel", 12) != 0)
+ if (!IsPentium())
return false;
+ word32 cpuid[4];
+
CpuId(1, cpuid);
return ((cpuid[0] >> 8) & 0xf) == 0xf;
}
@@ -1147,7 +1125,12 @@ static PMul s_pMul4, s_pMul8, s_pMul8B;
static void SetPentiumFunctionPointers()
{
- if (IsP4())
+ if (!IsPentium())
+ {
+ s_pAdd = &Portable::Add;
+ s_pSub = &Portable::Subtract;
+ }
+ else if (IsP4())
{
s_pAdd = &P4Optimized::Add;
s_pSub = &P4Optimized::Subtract;
@@ -1159,7 +1142,13 @@ static void SetPentiumFunctionPointers()
}
#ifdef SSE2_INTRINSICS_AVAILABLE
- if (HasSSE2())
+ if (!IsPentium())
+ {
+ s_pMul4 = &Portable::Multiply4;
+ s_pMul8 = &Portable::Multiply8;
+ s_pMul8B = &Portable::Multiply8Bottom;
+ }
+ else if (HasSSE2())
{
s_pMul4 = &P4Optimized::Multiply4;
s_pMul8 = &P4Optimized::Multiply8;
@@ -1177,11 +1166,6 @@ static void SetPentiumFunctionPointers()
static const char s_RunAtStartupSetPentiumFunctionPointers =
(SetPentiumFunctionPointers(), 0);
-void DisableSSE2()
-{
- s_sse2Enabled = false;
- SetPentiumFunctionPointers();
-}
class LowLevel : public PentiumOptimized
{
@@ -3984,6 +3968,9 @@ Integer CRT(const Integer &xp, const Integer &p, const Integer &xq,
template hword DivideThreeWordsByTwo<hword, Word>(hword*, hword, hword, Word*);
#endif
template word DivideThreeWordsByTwo<word, DWord>(word*, word, word, DWord*);
+#ifdef SSE2_INTRINSICS_AVAILABLE
+template class AlignedAllocator<word>;
+#endif
#endif
diff --git a/extra/yassl/taocrypt/src/make.bat b/extra/yassl/taocrypt/src/make.bat
index ecf7e8f8469..13675ae84de 100644
--- a/extra/yassl/taocrypt/src/make.bat
+++ b/extra/yassl/taocrypt/src/make.bat
@@ -1,7 +1,25 @@
REM quick and dirty build file for testing different MSDEVs
+
+@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+@echo on
+
setlocal
-set myFLAGS= /I../include /I../../mySTL /c /W3 /G6 /O2
+set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2
cl %myFLAGS% aes.cpp
cl %myFLAGS% aestables.cpp
@@ -21,6 +39,7 @@ cl %myFLAGS% file.cpp
cl %myFLAGS% hash.cpp
cl %myFLAGS% integer.cpp
cl %myFLAGS% md2.cpp
+cl %myFLAGS% md4.cpp
cl %myFLAGS% md5.cpp
cl %myFLAGS% misc.cpp
@@ -33,5 +52,5 @@ cl %myFLAGS% template_instnt.cpp
cl %myFLAGS% tftables.cpp
cl %myFLAGS% twofish.cpp
-link.exe -lib /out:taocrypt.lib aes.obj aestables.obj algebra.obj arc4.obj asn.obj bftables.obj blowfish.obj coding.obj des.obj dh.obj dsa.obj file.obj hash.obj integer.obj md2.obj md5.obj misc.obj random.obj ripemd.obj rsa.obj sha.obj template_instnt.obj tftables.obj twofish.obj
+link.exe -lib /out:taocrypt.lib aes.obj aestables.obj algebra.obj arc4.obj asn.obj bftables.obj blowfish.obj coding.obj des.obj dh.obj dsa.obj file.obj hash.obj integer.obj md2.obj md4.obj md5.obj misc.obj random.obj ripemd.obj rsa.obj sha.obj template_instnt.obj tftables.obj twofish.obj
diff --git a/extra/yassl/taocrypt/src/md4.cpp b/extra/yassl/taocrypt/src/md4.cpp
index 0dee8bf40cb..1efda04fbb8 100644
--- a/extra/yassl/taocrypt/src/md4.cpp
+++ b/extra/yassl/taocrypt/src/md4.cpp
@@ -28,7 +28,11 @@
#include "runtime.hpp"
#include "md4.hpp"
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
diff --git a/extra/yassl/taocrypt/src/md5.cpp b/extra/yassl/taocrypt/src/md5.cpp
index 2bddc7fe308..bf485d11b95 100644
--- a/extra/yassl/taocrypt/src/md5.cpp
+++ b/extra/yassl/taocrypt/src/md5.cpp
@@ -28,15 +28,16 @@
#include "runtime.hpp"
#include "md5.hpp"
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_MD5_ASM
-#endif
namespace TaoCrypt {
@@ -84,10 +85,17 @@ void MD5::Swap(MD5& other)
}
-// Update digest with data of size len, do in blocks
+#ifdef DO_MD5_ASM
+
+// Update digest with data of size len
void MD5::Update(const byte* data, word32 len)
{
- byte* local = (byte*)buffer_;
+ if (!isMMX) {
+ HASHwithTransform::Update(data, len);
+ return;
+ }
+
+ byte* local = reinterpret_cast<byte*>(buffer_);
// remove buffered data if possible
if (buffLen_) {
@@ -99,27 +107,14 @@ void MD5::Update(const byte* data, word32 len)
len -= add;
if (buffLen_ == BLOCK_SIZE) {
- ByteReverseIf(local, local, BLOCK_SIZE, LittleEndianOrder);
Transform();
AddLength(BLOCK_SIZE);
buffLen_ = 0;
}
}
- // do block size transforms or all at once for asm
+ // at once for asm
if (buffLen_ == 0) {
- #ifndef DO_MD5_ASM
- while (len >= BLOCK_SIZE) {
- memcpy(&local[0], data, BLOCK_SIZE);
-
- data += BLOCK_SIZE;
- len -= BLOCK_SIZE;
-
- ByteReverseIf(local, local, BLOCK_SIZE, LittleEndianOrder);
- Transform();
- AddLength(BLOCK_SIZE);
- }
- #else
word32 times = len / BLOCK_SIZE;
if (times) {
AsmTransform(data, times);
@@ -128,7 +123,6 @@ void MD5::Update(const byte* data, word32 len)
len -= add;
data += add;
}
- #endif
}
// cache any data left
@@ -139,7 +133,6 @@ void MD5::Update(const byte* data, word32 len)
}
-#ifdef DO_MD5_ASM
/*
diff --git a/extra/yassl/taocrypt/src/misc.cpp b/extra/yassl/taocrypt/src/misc.cpp
index 084a263a4ae..7ab05582e95 100644
--- a/extra/yassl/taocrypt/src/misc.cpp
+++ b/extra/yassl/taocrypt/src/misc.cpp
@@ -30,6 +30,20 @@
#include "misc.hpp"
+#ifdef __GNUC__
+ #include <signal.h>
+ #include <setjmp.h>
+#endif
+
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
+
+namespace STL = STL_NAMESPACE;
+
+
#ifdef YASSL_PURE_C
void* operator new(size_t sz, TaoCrypt::new_t)
@@ -156,5 +170,129 @@ unsigned long Crop(unsigned long value, unsigned int size)
}
+
+#ifdef TAOCRYPT_X86ASM_AVAILABLE
+
+#ifndef _MSC_VER
+ static jmp_buf s_env;
+ static void SigIllHandler(int)
+ {
+ longjmp(s_env, 1);
+ }
+#endif
+
+
+bool HaveCpuId()
+{
+#ifdef _MSC_VER
+ __try
+ {
+ __asm
+ {
+ mov eax, 0
+ cpuid
+ }
+ }
+ __except (1)
+ {
+ return false;
+ }
+ return true;
+#else
+ typedef void (*SigHandler)(int);
+
+ SigHandler oldHandler = signal(SIGILL, SigIllHandler);
+ if (oldHandler == SIG_ERR)
+ return false;
+
+ bool result = true;
+ if (setjmp(s_env))
+ result = false;
+ else
+ __asm__ __volatile
+ (
+ // save ebx in case -fPIC is being used
+ "push %%ebx; mov $0, %%eax; cpuid; pop %%ebx"
+ :
+ :
+ : "%eax", "%ecx", "%edx"
+ );
+
+ signal(SIGILL, oldHandler);
+ return result;
+#endif
+}
+
+
+void CpuId(word32 input, word32 *output)
+{
+#ifdef __GNUC__
+ __asm__
+ (
+ // save ebx in case -fPIC is being used
+ "push %%ebx; cpuid; mov %%ebx, %%edi; pop %%ebx"
+ : "=a" (output[0]), "=D" (output[1]), "=c" (output[2]), "=d"(output[3])
+ : "a" (input)
+ );
+#else
+ __asm
+ {
+ mov eax, input
+ cpuid
+ mov edi, output
+ mov [edi], eax
+ mov [edi+4], ebx
+ mov [edi+8], ecx
+ mov [edi+12], edx
+ }
+#endif
+}
+
+
+bool IsPentium()
+{
+ if (!HaveCpuId())
+ return false;
+
+ word32 cpuid[4];
+
+ CpuId(0, cpuid);
+ STL::swap(cpuid[2], cpuid[3]);
+ if (memcmp(cpuid+1, "GenuineIntel", 12) != 0)
+ return false;
+
+ CpuId(1, cpuid);
+ byte family = ((cpuid[0] >> 8) & 0xf);
+ if (family < 5)
+ return false;
+
+ return true;
+}
+
+
+
+static bool IsMmx()
+{
+ if (!IsPentium())
+ return false;
+
+ word32 cpuid[4];
+
+ CpuId(1, cpuid);
+ if ((cpuid[3] & (1 << 23)) == 0)
+ return false;
+
+ return true;
+}
+
+
+bool isMMX = IsMmx();
+
+
+#endif // TAOCRYPT_X86ASM_AVAILABLE
+
+
+
+
} // namespace
diff --git a/extra/yassl/taocrypt/src/random.cpp b/extra/yassl/taocrypt/src/random.cpp
index c7bb6ae9549..3fab1ddba23 100644
--- a/extra/yassl/taocrypt/src/random.cpp
+++ b/extra/yassl/taocrypt/src/random.cpp
@@ -50,8 +50,11 @@ namespace TaoCrypt {
RandomNumberGenerator::RandomNumberGenerator()
{
byte key[32];
+ byte junk[256];
+
seed_.GenerateSeed(key, sizeof(key));
cipher_.SetKey(key, sizeof(key));
+ GenerateBlock(junk, sizeof(junk)); // rid initial state
}
diff --git a/extra/yassl/taocrypt/src/ripemd.cpp b/extra/yassl/taocrypt/src/ripemd.cpp
index 03c09edde84..98bfe4b2645 100644
--- a/extra/yassl/taocrypt/src/ripemd.cpp
+++ b/extra/yassl/taocrypt/src/ripemd.cpp
@@ -28,15 +28,16 @@
#include "runtime.hpp"
#include "ripemd.hpp"
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_RIPEMD_ASM
-#endif
namespace TaoCrypt {
@@ -86,10 +87,17 @@ void RIPEMD160::Swap(RIPEMD160& other)
}
-// Update digest with data of size len, do in blocks
+#ifdef DO_RIPEMD_ASM
+
+// Update digest with data of size len
void RIPEMD160::Update(const byte* data, word32 len)
{
- byte* local = (byte*)buffer_;
+ if (!isMMX) {
+ HASHwithTransform::Update(data, len);
+ return;
+ }
+
+ byte* local = reinterpret_cast<byte*>(buffer_);
// remove buffered data if possible
if (buffLen_) {
@@ -101,27 +109,14 @@ void RIPEMD160::Update(const byte* data, word32 len)
len -= add;
if (buffLen_ == BLOCK_SIZE) {
- ByteReverseIf(local, local, BLOCK_SIZE, LittleEndianOrder);
Transform();
AddLength(BLOCK_SIZE);
buffLen_ = 0;
}
}
- // do block size transforms or all at once for asm
+ // all at once for asm
if (buffLen_ == 0) {
- #ifndef DO_RIPEMD_ASM
- while (len >= BLOCK_SIZE) {
- memcpy(&local[0], data, BLOCK_SIZE);
-
- data += BLOCK_SIZE;
- len -= BLOCK_SIZE;
-
- ByteReverseIf(local, local, BLOCK_SIZE, LittleEndianOrder);
- Transform();
- AddLength(BLOCK_SIZE);
- }
- #else
word32 times = len / BLOCK_SIZE;
if (times) {
AsmTransform(data, times);
@@ -130,7 +125,6 @@ void RIPEMD160::Update(const byte* data, word32 len)
len -= add;
data += add;
}
- #endif
}
// cache any data left
@@ -140,6 +134,8 @@ void RIPEMD160::Update(const byte* data, word32 len)
}
}
+#endif // DO_RIPEMD_ASM
+
// for all
#define F(x, y, z) (x ^ y ^ z)
diff --git a/extra/yassl/taocrypt/src/sha.cpp b/extra/yassl/taocrypt/src/sha.cpp
index 280d42fb3d4..b1273d9da8f 100644
--- a/extra/yassl/taocrypt/src/sha.cpp
+++ b/extra/yassl/taocrypt/src/sha.cpp
@@ -28,16 +28,16 @@
#include "runtime.hpp"
#include <string.h>
#include "sha.hpp"
-#include STL_ALGORITHM_FILE
+#ifdef USE_SYS_STL
+ #include <algorithm>
+#else
+ #include "algorithm.hpp"
+#endif
namespace STL = STL_NAMESPACE;
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_SHA_ASM
-#endif
-
namespace TaoCrypt {
@@ -108,10 +108,18 @@ void SHA::Swap(SHA& other)
}
-// Update digest with data of size len, do in blocks
+
+#ifdef DO_SHA_ASM
+
+// Update digest with data of size len
void SHA::Update(const byte* data, word32 len)
{
- byte* local = (byte*)buffer_;
+ if (!isMMX) {
+ HASHwithTransform::Update(data, len);
+ return;
+ }
+
+ byte* local = reinterpret_cast<byte*>(buffer_);
// remove buffered data if possible
if (buffLen_) {
@@ -123,27 +131,15 @@ void SHA::Update(const byte* data, word32 len)
len -= add;
if (buffLen_ == BLOCK_SIZE) {
- ByteReverseIf(local, local, BLOCK_SIZE, BigEndianOrder);
+ ByteReverse(local, local, BLOCK_SIZE);
Transform();
AddLength(BLOCK_SIZE);
buffLen_ = 0;
}
}
- // do block size transforms or all at once for asm
+ // all at once for asm
if (buffLen_ == 0) {
- #ifndef DO_SHA_ASM
- while (len >= BLOCK_SIZE) {
- memcpy(&local[0], data, BLOCK_SIZE);
-
- data += BLOCK_SIZE;
- len -= BLOCK_SIZE;
-
- ByteReverseIf(local, local, BLOCK_SIZE, BigEndianOrder);
- Transform();
- AddLength(BLOCK_SIZE);
- }
- #else
word32 times = len / BLOCK_SIZE;
if (times) {
AsmTransform(data, times);
@@ -152,7 +148,6 @@ void SHA::Update(const byte* data, word32 len)
len -= add;
data += add;
}
- #endif
}
// cache any data left
@@ -162,6 +157,8 @@ void SHA::Update(const byte* data, word32 len)
}
}
+#endif // DO_SHA_ASM
+
void SHA::Transform()
{
diff --git a/extra/yassl/taocrypt/src/twofish.cpp b/extra/yassl/taocrypt/src/twofish.cpp
index a16a8f0d169..bb385331519 100644
--- a/extra/yassl/taocrypt/src/twofish.cpp
+++ b/extra/yassl/taocrypt/src/twofish.cpp
@@ -35,33 +35,20 @@
#include "twofish.hpp"
-#if defined(TAOCRYPT_X86ASM_AVAILABLE) && defined(TAO_ASM)
- #define DO_TWOFISH_ASM
-#endif
-
namespace TaoCrypt {
-#if !defined(DO_TWOFISH_ASM)
-
-// Generic Version
-void Twofish::Process(byte* out, const byte* in, word32 sz)
-{
- if (mode_ == ECB)
- ECB_Process(out, in, sz);
- else if (mode_ == CBC)
- if (dir_ == ENCRYPTION)
- CBC_Encrypt(out, in, sz);
- else
- CBC_Decrypt(out, in, sz);
-}
-
-#else
+#if defined(DO_TWOFISH_ASM)
// ia32 optimized version
void Twofish::Process(byte* out, const byte* in, word32 sz)
{
+ if (!isMMX) {
+ Mode_BASE::Process(out, in, sz);
+ return;
+ }
+
word32 blocks = sz / BLOCK_SIZE;
if (mode_ == ECB)
diff --git a/extra/yassl/taocrypt/test/Makefile.am b/extra/yassl/taocrypt/test/Makefile.am
index 25e1a98fc94..6344efa4fb7 100644
--- a/extra/yassl/taocrypt/test/Makefile.am
+++ b/extra/yassl/taocrypt/test/Makefile.am
@@ -4,3 +4,6 @@ test_SOURCES = test.cpp
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
test_CXXFLAGS = -DYASSL_PURE_C
EXTRA_DIST = make.bat
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/extra/yassl/taocrypt/test/make.bat b/extra/yassl/taocrypt/test/make.bat
index 5f01db68d0d..04a0c25e4de 100644
--- a/extra/yassl/taocrypt/test/make.bat
+++ b/extra/yassl/taocrypt/test/make.bat
@@ -1,7 +1,25 @@
REM quick and dirty build file for testing different MSDEVs
+
+@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+@echo on
+
setlocal
-set myFLAGS= /I../include /I../../mySTL /c /W3 /G6 /O2
+set myFLAGS= /I../include /I../mySTL /c /W3 /G6 /O2
cl %myFLAGS% test.cpp
diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp
index 28ef73dfac8..9e3ef709a78 100644
--- a/extra/yassl/taocrypt/test/test.cpp
+++ b/extra/yassl/taocrypt/test/test.cpp
@@ -247,6 +247,8 @@ void taocrypt_test(void* args)
args.argv = argv;
taocrypt_test(&args);
+ TaoCrypt::CleanUp();
+
return args.return_code;
}
diff --git a/extra/yassl/testsuite/make.bat b/extra/yassl/testsuite/make.bat
index 1bc7ce0513d..e4942f66b3f 100644
--- a/extra/yassl/testsuite/make.bat
+++ b/extra/yassl/testsuite/make.bat
@@ -1,7 +1,25 @@
REM quick and dirty build file for testing different MSDEVs
+
+@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+@echo on
+
setlocal
-set myFLAGS= /I../include /I../taocrypt/include /I../mySTL /c /W3 /G6 /O2 /MT /D"WIN32" /D"NO_MAIN_DRIVER"
+set myFLAGS= /I../include /I../taocrypt/include /I../taocrypt/mySTL /c /W3 /G6 /O2 /MT /D"WIN32" /D"NO_MAIN_DRIVER"
cl %myFLAGS% testsuite.cpp
cl %myFLAGS% ../examples/client/client.cpp
diff --git a/extra/yassl/testsuite/test.hpp b/extra/yassl/testsuite/test.hpp
index b23b36f0ba2..b2fed37f4e5 100644
--- a/extra/yassl/testsuite/test.hpp
+++ b/extra/yassl/testsuite/test.hpp
@@ -9,6 +9,8 @@
#include <stdlib.h>
#include <assert.h>
+//#define NON_BLOCKING // test server and client example (not echos)
+
#ifdef _WIN32
#include <winsock2.h>
#include <process.h>
@@ -23,16 +25,17 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <pthread.h>
+#ifdef NON_BLOCKING
+ #include <fcntl.h>
+#endif
#define SOCKET_T int
#endif /* _WIN32 */
-#if !defined(_SOCKLEN_T) && defined(_WIN32)
+#if !defined(_SOCKLEN_T) && \
+ (defined(_WIN32) || defined(__NETWARE__) || defined(__APPLE__))
typedef int socklen_t;
#endif
-#if !defined(_SOCKLEN_T) && defined(__NETWARE__)
- typedef size_t socklen_t;
-#endif
// Check type of third arg to accept
@@ -262,6 +265,20 @@ inline void set_args(int& argc, char**& argv, func_args& args)
}
+inline void tcp_set_nonblocking(SOCKET_T& sockfd)
+{
+#ifdef NON_BLOCKING
+ #ifdef _WIN32
+ unsigned long blocking = 1;
+ int ret = ioctlsocket(sockfd, FIONBIO, &blocking);
+ #else
+ int flags = fcntl(sockfd, F_GETFL, 0);
+ int ret = fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
+ #endif
+#endif
+}
+
+
inline void tcp_socket(SOCKET_T& sockfd, sockaddr_in& addr)
{
sockfd = socket(AF_INET, SOCK_STREAM, 0);
@@ -289,8 +306,7 @@ inline void tcp_connect(SOCKET_T& sockfd)
sockaddr_in addr;
tcp_socket(sockfd, addr);
- if (connect(sockfd, (const sockaddr*)&addr, sizeof(addr)) != 0)
- {
+ if (connect(sockfd, (const sockaddr*)&addr, sizeof(addr)) != 0) {
tcp_close(sockfd);
err_sys("tcp connect failed");
}
@@ -302,19 +318,18 @@ inline void tcp_listen(SOCKET_T& sockfd)
sockaddr_in addr;
tcp_socket(sockfd, addr);
- if (bind(sockfd, (const sockaddr*)&addr, sizeof(addr)) != 0)
- {
+ if (bind(sockfd, (const sockaddr*)&addr, sizeof(addr)) != 0) {
tcp_close(sockfd);
err_sys("tcp bind failed");
}
- if (listen(sockfd, 3) != 0)
- {
+ if (listen(sockfd, 3) != 0) {
tcp_close(sockfd);
err_sys("tcp listen failed");
}
}
+
inline void tcp_accept(SOCKET_T& sockfd, SOCKET_T& clientfd, func_args& args)
{
tcp_listen(sockfd);
@@ -333,11 +348,14 @@ inline void tcp_accept(SOCKET_T& sockfd, SOCKET_T& clientfd, func_args& args)
clientfd = accept(sockfd, (sockaddr*)&client, (ACCEPT_THIRD_T)&client_len);
- if (clientfd == -1)
- {
+ if (clientfd == -1) {
tcp_close(sockfd);
err_sys("tcp accept failed");
}
+
+#ifdef NON_BLOCKING
+ tcp_set_nonblocking(clientfd);
+#endif
}
@@ -363,25 +381,30 @@ inline void showPeer(SSL* ssl)
inline DH* set_tmpDH(SSL_CTX* ctx)
{
- static unsigned char dh512_p[] =
+ static unsigned char dh1024_p[] =
{
- 0xDA,0x58,0x3C,0x16,0xD9,0x85,0x22,0x89,0xD0,0xE4,0xAF,0x75,
- 0x6F,0x4C,0xCA,0x92,0xDD,0x4B,0xE5,0x33,0xB8,0x04,0xFB,0x0F,
- 0xED,0x94,0xEF,0x9C,0x8A,0x44,0x03,0xED,0x57,0x46,0x50,0xD3,
- 0x69,0x99,0xDB,0x29,0xD7,0x76,0x27,0x6B,0xA2,0xD3,0xD4,0x12,
- 0xE2,0x18,0xF4,0xDD,0x1E,0x08,0x4C,0xF6,0xD8,0x00,0x3E,0x7C,
- 0x47,0x74,0xE8,0x33,
+ 0xE6, 0x96, 0x9D, 0x3D, 0x49, 0x5B, 0xE3, 0x2C, 0x7C, 0xF1, 0x80, 0xC3,
+ 0xBD, 0xD4, 0x79, 0x8E, 0x91, 0xB7, 0x81, 0x82, 0x51, 0xBB, 0x05, 0x5E,
+ 0x2A, 0x20, 0x64, 0x90, 0x4A, 0x79, 0xA7, 0x70, 0xFA, 0x15, 0xA2, 0x59,
+ 0xCB, 0xD5, 0x23, 0xA6, 0xA6, 0xEF, 0x09, 0xC4, 0x30, 0x48, 0xD5, 0xA2,
+ 0x2F, 0x97, 0x1F, 0x3C, 0x20, 0x12, 0x9B, 0x48, 0x00, 0x0E, 0x6E, 0xDD,
+ 0x06, 0x1C, 0xBC, 0x05, 0x3E, 0x37, 0x1D, 0x79, 0x4E, 0x53, 0x27, 0xDF,
+ 0x61, 0x1E, 0xBB, 0xBE, 0x1B, 0xAC, 0x9B, 0x5C, 0x60, 0x44, 0xCF, 0x02,
+ 0x3D, 0x76, 0xE0, 0x5E, 0xEA, 0x9B, 0xAD, 0x99, 0x1B, 0x13, 0xA6, 0x3C,
+ 0x97, 0x4E, 0x9E, 0xF1, 0x83, 0x9E, 0xB5, 0xDB, 0x12, 0x51, 0x36, 0xF7,
+ 0x26, 0x2E, 0x56, 0xA8, 0x87, 0x15, 0x38, 0xDF, 0xD8, 0x23, 0xC6, 0x50,
+ 0x50, 0x85, 0xE2, 0x1F, 0x0D, 0xD5, 0xC8, 0x6B,
};
- static unsigned char dh512_g[] =
+ static unsigned char dh1024_g[] =
{
0x02,
};
DH* dh;
if ( (dh = DH_new()) ) {
- dh->p = BN_bin2bn(dh512_p, sizeof(dh512_p), 0);
- dh->g = BN_bin2bn(dh512_g, sizeof(dh512_g), 0);
+ dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), 0);
+ dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), 0);
}
if (!dh->p || !dh->g) {
DH_free(dh);
diff --git a/heap/CMakeLists.txt b/heap/CMakeLists.txt
index db5fb8b2981..e17da293c30 100755
--- a/heap/CMakeLists.txt
+++ b/heap/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/heap/Makefile.am b/heap/Makefile.am
index a89c8a4a878..b80db2e68ed 100644
--- a/heap/Makefile.am
+++ b/heap/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2002, 2005-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/_check.c b/heap/_check.c
index c861fdb582f..05f12dade0d 100644
--- a/heap/_check.c
+++ b/heap/_check.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/_rectest.c b/heap/_rectest.c
index eb350263cec..2fd2d39bed7 100644
--- a/heap/_rectest.c
+++ b/heap/_rectest.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/heapdef.h b/heap/heapdef.h
index 68d9405138f..016c83db8e0 100644
--- a/heap/heapdef.h
+++ b/heap/heapdef.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_block.c b/heap/hp_block.c
index f26b208b521..85219380287 100644
--- a/heap/hp_block.c
+++ b/heap/hp_block.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -76,7 +75,7 @@ int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length)
and my_default_record_cache_size we get about 1/128 unused memory.
*/
*alloc_length=sizeof(HP_PTRS)*i+block->records_in_block* block->recbuffer;
- if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(0))))
+ if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(MY_WME))))
return 1;
if (i == 0)
diff --git a/heap/hp_clear.c b/heap/hp_clear.c
index 596d71ebe9c..2d8b8b394d5 100644
--- a/heap/hp_clear.c
+++ b/heap/hp_clear.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -36,7 +35,8 @@ void hp_clear(HP_SHARE *info)
(byte*) 0));
info->block.levels=0;
hp_clear_keys(info);
- info->records=info->deleted=info->data_length=0;
+ info->records= info->deleted= 0;
+ info->data_length= 0;
info->blength=1;
info->changed=0;
info->del_link=0;
diff --git a/heap/hp_close.c b/heap/hp_close.c
index 3e0c9003ac8..5f6fc3249b5 100644
--- a/heap/hp_close.c
+++ b/heap/hp_close.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_create.c b/heap/hp_create.c
index eb7a068c78b..d5b0068beae 100644
--- a/heap/hp_create.c
+++ b/heap/hp_create.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_delete.c b/heap/hp_delete.c
index 2ef57624e77..637e5f1a497 100644
--- a/heap/hp_delete.c
+++ b/heap/hp_delete.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004-200 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_extra.c b/heap/hp_extra.c
index dd41d6c5f19..2f12d35ecaf 100644
--- a/heap/hp_extra.c
+++ b/heap/hp_extra.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_hash.c b/heap/hp_hash.c
index 6a537906929..c5a30a3ef65 100644
--- a/heap/hp_hash.c
+++ b/heap/hp_hash.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_info.c b/heap/hp_info.c
index 2e56d030234..2c58604eed1 100644
--- a/heap/hp_info.c
+++ b/heap/hp_info.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_open.c b/heap/hp_open.c
index f50478c8b3d..02a8d4f95ca 100644
--- a/heap/hp_open.c
+++ b/heap/hp_open.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_panic.c b/heap/hp_panic.c
index 2b659cbfbb3..7be4e96ee5a 100644
--- a/heap/hp_panic.c
+++ b/heap/hp_panic.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rename.c b/heap/hp_rename.c
index 93906a66c37..c2350450e2b 100644
--- a/heap/hp_rename.c
+++ b/heap/hp_rename.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rfirst.c b/heap/hp_rfirst.c
index 85548fea212..d1842949421 100644
--- a/heap/hp_rfirst.c
+++ b/heap/hp_rfirst.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rkey.c b/heap/hp_rkey.c
index f02d44cc456..a095336d295 100644
--- a/heap/hp_rkey.c
+++ b/heap/hp_rkey.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rlast.c b/heap/hp_rlast.c
index b1a49739108..b72e815147f 100644
--- a/heap/hp_rlast.c
+++ b/heap/hp_rlast.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rnext.c b/heap/hp_rnext.c
index a1bc480333e..3b436fe87aa 100644
--- a/heap/hp_rnext.c
+++ b/heap/hp_rnext.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rprev.c b/heap/hp_rprev.c
index d8f5c01dcea..bfdd2f9d47a 100644
--- a/heap/hp_rprev.c
+++ b/heap/hp_rprev.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rrnd.c b/heap/hp_rrnd.c
index 2f8556484a4..ad0190cc00c 100644
--- a/heap/hp_rrnd.c
+++ b/heap/hp_rrnd.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_rsame.c b/heap/hp_rsame.c
index 6a375753b1a..10513f91726 100644
--- a/heap/hp_rsame.c
+++ b/heap/hp_rsame.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_scan.c b/heap/hp_scan.c
index 59e544ca590..4249ac4148a 100644
--- a/heap/hp_scan.c
+++ b/heap/hp_scan.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_static.c b/heap/hp_static.c
index a458b742b9c..a501ba7e359 100644
--- a/heap/hp_static.c
+++ b/heap/hp_static.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_test1.c b/heap/hp_test1.c
index 703b39b1e2d..3459fdf58f4 100644
--- a/heap/hp_test1.c
+++ b/heap/hp_test1.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_test2.c b/heap/hp_test2.c
index ff07b402f4d..7b756ae10a4 100644
--- a/heap/hp_test2.c
+++ b/heap/hp_test2.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_update.c b/heap/hp_update.c
index 63ada225f06..e7314e3d38c 100644
--- a/heap/hp_update.c
+++ b/heap/hp_update.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/heap/hp_write.c b/heap/hp_write.c
index 16f02999c93..8a392d54c51 100644
--- a/heap/hp_write.c
+++ b/heap/hp_write.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -68,11 +67,17 @@ int heap_write(HP_INFO *info, const byte *record)
DBUG_RETURN(0);
err:
- DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef));
+ if (my_errno == HA_ERR_FOUND_DUPP_KEY)
+ DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef));
info->errkey= keydef - share->keydef;
- if (keydef->algorithm == HA_KEY_ALG_BTREE)
+ /*
+ We don't need to delete non-inserted key from rb-tree. Also, if
+ we got ENOMEM, the key wasn't inserted, so don't try to delete it
+ either. Otherwise for HASH index on HA_ERR_FOUND_DUPP_KEY the key
+ was inserted and we have to delete it.
+ */
+ if (keydef->algorithm == HA_KEY_ALG_BTREE || my_errno == ENOMEM)
{
- /* we don't need to delete non-inserted key from rb-tree */
keydef--;
}
while (keydef >= share->keydef)
diff --git a/include/Makefile.am b/include/Makefile.am
index 3500503207c..7b71ef62489 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,14 +15,17 @@
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
-BUILT_SOURCES = mysql_version.h my_config.h
-pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
- mysql.h mysql_com.h mysql_embed.h \
- my_semaphore.h my_pthread.h my_no_pthread.h raid.h \
- errmsg.h my_global.h my_net.h my_alloc.h \
- my_getopt.h sslopt-longopts.h my_dir.h typelib.h \
+BUILT_SOURCES = $(HEADERS_GEN) abi_check
+HEADERS_GEN = mysql_version.h my_config.h
+HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
+ my_list.h my_alloc.h typelib.h
+pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
+ my_xml.h mysql_embed.h \
+ my_semaphore.h my_pthread.h my_no_pthread.h raid.h \
+ errmsg.h my_global.h my_net.h \
+ my_getopt.h sslopt-longopts.h my_dir.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
- mysql_time.h m_ctype.h $(BUILT_SOURCES)
+ m_ctype.h $(HEADERS_GEN)
noinst_HEADERS = config-win.h config-os2.h config-netware.h \
heap.h my_bitmap.h\
myisam.h myisampack.h myisammrg.h ft_global.h\
@@ -59,17 +62,14 @@ dist-hook:
#
# Create a icheck file and compare it to the reference
-abi_check: mysql.h mysql_version.h mysql_com.h mysql_time.h my_list.h \
- my_alloc.h typelib.h mysql_h.ic
+abi_check: $(HEADERS_ABI) mysql_version.h mysql_h.ic
@set -ex; \
if [ @ICHECK@ != no ] ; then \
@ICHECK@ --canonify --skip-from-re /usr/ -o $@.ic mysql.h; \
@ICHECK@ --compare mysql_h.ic $@.ic; \
+ $(RM) -f $@.ic; \
fi; \
touch abi_check;
-all: abi_check
-
-
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/include/abi_check.ic b/include/abi_check.ic
deleted file mode 100644
index 30ef44a1ccb..00000000000
--- a/include/abi_check.ic
+++ /dev/null
@@ -1,914 +0,0 @@
-struct rand_struct;
-struct st_list;
-struct st_mem_root;
-struct st_mysql;
-struct st_mysql_bind;
-struct st_mysql_data;
-struct st_mysql_field;
-struct st_mysql_manager;
-struct st_mysql_methods;
-struct st_mysql_options;
-struct st_mysql_parameters;
-struct st_mysql_res;
-struct st_mysql_rows;
-struct st_mysql_stmt;
-struct st_mysql_time;
-struct st_net;
-struct st_typelib;
-struct st_udf_args;
-struct st_udf_init;
-struct st_used_mem;
-enum Item_result;
-enum enum_field_types;
-enum enum_mysql_set_option;
-enum enum_mysql_stmt_state;
-enum enum_mysql_timestamp_type;
-enum enum_server_command;
-enum enum_stmt_attr_type;
-enum mysql_enum_shutdown_level;
-enum mysql_option;
-enum mysql_protocol_type;
-enum mysql_rpl_type;
-enum mysql_status;
-# 131 "mysql.h"
-typedef struct st_mysql_rows MYSQL_ROWS;
-# 24 "my_list.h"
-typedef struct st_list LIST;
-# 232 "mysql.h"
-typedef struct st_mysql MYSQL;
-# 571 "mysql.h"
-typedef struct st_mysql_bind MYSQL_BIND;
-# 93 "mysql.h"
-typedef struct st_mysql_field MYSQL_FIELD;
-# 117 "mysql.h"
-typedef unsigned int MYSQL_FIELD_OFFSET;
-# 323 "mysql.h"
-typedef struct st_mysql_manager MYSQL_MANAGER;
-# 337 "mysql.h"
-typedef struct st_mysql_parameters MYSQL_PARAMETERS;
-# 292 "mysql.h"
-typedef struct st_mysql_res MYSQL_RES;
-# 116 "mysql.h"
-typedef char * * MYSQL_ROW;
-# 137 "mysql.h"
-typedef MYSQL_ROWS * MYSQL_ROW_OFFSET;
-# 596 "mysql.h"
-typedef struct st_mysql_stmt MYSQL_STMT;
-# 151 "mysql_com.h"
-typedef struct st_net NET;
-# 21 "typelib.h"
-typedef struct st_typelib TYPELIB;
-# 141 "mysql_com.h"
-typedef struct st_vio Vio;
-# 57 "mysql.h"
-typedef char * gptr;
-# 29 "my_list.h"
-typedef int (* list_walk_action)(void *, void *);
-# 48 "mysql.h"
-typedef char my_bool;
-# 63 "mysql.h"
-typedef int my_socket;
-# 125 "mysql.h"
-typedef unsigned long long int my_ulonglong;
-# 35 "my_alloc.h"
-typedef struct st_mem_root MEM_ROOT;
-# 141 "mysql.h"
-typedef struct st_mysql_data MYSQL_DATA;
-# 648 "mysql.h"
-typedef struct st_mysql_methods MYSQL_METHODS;
-# 48 "mysql_time.h"
-typedef struct st_mysql_time MYSQL_TIME;
-# 315 "mysql_com.h"
-typedef struct st_udf_args UDF_ARGS;
-# 326 "mysql_com.h"
-typedef struct st_udf_init UDF_INIT;
-# 27 "my_alloc.h"
-typedef struct st_used_mem USED_MEM;
-# 302 "mysql_com.h"
-struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct
- {
- unsigned long int seed1;
- unsigned long int seed2;
- unsigned long int max_value;
- double max_value_dbl;
- };
-# 24 "my_list.h"
-struct __attribute__((aligned(__alignof__(void *)))) st_list
- {
- struct st_list * prev;
- struct st_list * next;
- void * data;
- };
-# 35 "my_alloc.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_mem_root
- {
- USED_MEM * free;
- USED_MEM * used;
- USED_MEM * pre_alloc;
- unsigned int min_malloc;
- unsigned int block_size;
- unsigned int block_num;
- unsigned int first_block_usage;
- void (* error_handler)(void);
- };
-# 232 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql
- {
- NET net;
- gptr connector_fd;
- char * host;
- char * user;
- char * passwd;
- char * unix_socket;
- char * server_version;
- char * host_info;
- char * info;
- char * db;
- struct charset_info_st * charset;
- MYSQL_FIELD * fields;
- MEM_ROOT field_alloc;
- my_ulonglong affected_rows;
- my_ulonglong insert_id;
- my_ulonglong extra_info;
- unsigned long int thread_id;
- unsigned long int packet_length;
- unsigned int port;
- unsigned long int client_flag;
- unsigned long int server_capabilities;
- unsigned int protocol_version;
- unsigned int field_count;
- unsigned int server_status;
- unsigned int server_language;
- unsigned int warning_count;
- struct st_mysql_options options;
- enum mysql_status status;
- my_bool free_me;
- my_bool reconnect;
- char scramble[(20 + 1)];
- my_bool rpl_pivot;
- struct st_mysql * master;
- struct st_mysql * next_slave;
- struct st_mysql * last_used_slave;
- struct st_mysql * last_used_con;
- LIST * stmts;
- struct st_mysql_methods const * methods;
- void * thd;
- my_bool * unbuffered_fetch_owner;
- struct st_mysql_stmt * current_stmt;
- };
-# 571 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_bind
- {
- unsigned long int * length;
- my_bool * is_null;
- void * buffer;
- enum enum_field_types buffer_type;
- unsigned long int buffer_length;
- unsigned char * inter_buffer;
- unsigned long int offset;
- unsigned long int internal_length;
- unsigned int param_number;
- unsigned int pack_length;
- my_bool is_unsigned;
- my_bool long_data_used;
- my_bool internal_is_null;
- void (* store_param_func)(NET * net, struct st_mysql_bind * param);
- void (* fetch_result)(struct st_mysql_bind *, unsigned char * * row);
- void (* skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, unsigned char * * row);
- };
-# 141 "mysql.h"
-struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_data
- {
- my_ulonglong rows;
- unsigned int fields;
- MYSQL_ROWS * data;
- MEM_ROOT alloc;
- MYSQL_ROWS * * prev_ptr;
- };
-# 93 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_field
- {
- char * name;
- char * org_name;
- char * table;
- char * org_table;
- char * db;
- char * catalog;
- char * def;
- unsigned long int length;
- unsigned long int max_length;
- unsigned int name_length;
- unsigned int org_name_length;
- unsigned int table_length;
- unsigned int org_table_length;
- unsigned int db_length;
- unsigned int catalog_length;
- unsigned int def_length;
- unsigned int flags;
- unsigned int decimals;
- unsigned int charsetnr;
- enum enum_field_types type;
- };
-# 323 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_manager
- {
- NET net;
- char * host;
- char * user;
- char * passwd;
- unsigned int port;
- my_bool free_me;
- my_bool eof;
- int cmd_status;
- int last_errno;
- char * net_buf;
- char * net_buf_pos;
- char * net_data_end;
- int net_buf_size;
- char last_error[256];
- };
-# 648 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)))) st_mysql_methods
- {
- my_bool (* read_query_result)(MYSQL * mysql);
- my_bool (* advanced_command)(MYSQL * mysql, enum enum_server_command, char const * header, unsigned long int, char const * arg, unsigned long int, my_bool, MYSQL_STMT * stmt);
- MYSQL_DATA * (* read_rows)(MYSQL * mysql, MYSQL_FIELD * mysql_fields, unsigned int);
- MYSQL_RES * (* use_result)(MYSQL * mysql);
- void (* fetch_lengths)(unsigned long int * to, MYSQL_ROW, unsigned int);
- void (* flush_use_result)(MYSQL * mysql);
- MYSQL_FIELD * (* list_fields)(MYSQL * mysql);
- my_bool (* read_prepare_result)(MYSQL * mysql, MYSQL_STMT * stmt);
- int (* stmt_execute)(MYSQL_STMT * stmt);
- int (* read_binary_rows)(MYSQL_STMT * stmt);
- int (* unbuffered_fetch)(MYSQL * mysql, char * * row);
- void (* free_embedded_thd)(MYSQL * mysql);
- char const * (* read_statistics)(MYSQL * mysql);
- my_bool (* next_result)(MYSQL * mysql);
- int (* read_change_user_result)(MYSQL * mysql, char * buff, char const * passwd);
- };
-# 162 "mysql.h"
-struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_mysql_options
- {
- unsigned int connect_timeout;
- unsigned int read_timeout;
- unsigned int write_timeout;
- unsigned int port;
- unsigned int protocol;
- unsigned long int client_flag;
- char * host;
- char * user;
- char * password;
- char * unix_socket;
- char * db;
- struct st_dynamic_array * init_commands;
- char * my_cnf_file;
- char * my_cnf_group;
- char * charset_dir;
- char * charset_name;
- char * ssl_key;
- char * ssl_cert;
- char * ssl_ca;
- char * ssl_capath;
- char * ssl_cipher;
- char * shared_memory_base_name;
- unsigned long int max_allowed_packet;
- my_bool use_ssl;
- my_bool compress;
- my_bool named_pipe;
- my_bool rpl_probe;
- my_bool rpl_parse;
- my_bool no_master_reads;
- my_bool separate_thread;
- enum mysql_option methods_to_use;
- char * client_ip;
- my_bool secure_auth;
- int (* local_infile_init)(void * *, char const *, void *);
- int (* local_infile_read)(void *, char *, unsigned int);
- void (* local_infile_end)(void);
- int (* local_infile_error)(void *, char *, unsigned int);
- void * local_infile_userdata;
- };
-# 337 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)))) st_mysql_parameters
- {
- unsigned long int * p_max_allowed_packet;
- unsigned long int * p_net_buffer_length;
- };
-# 292 "mysql.h"
-struct __attribute__((aligned(__alignof__(unsigned long long int)), aligned(__alignof__(void *)))) st_mysql_res
- {
- my_ulonglong row_count;
- MYSQL_FIELD * fields;
- MYSQL_DATA * data;
- MYSQL_ROWS * data_cursor;
- unsigned long int * lengths;
- MYSQL * handle;
- MEM_ROOT field_alloc;
- unsigned int field_count;
- unsigned int current_field;
- MYSQL_ROW row;
- MYSQL_ROW current_row;
- my_bool eof;
- my_bool unbuffered_fetch_cancelled;
- struct st_mysql_methods const * methods;
- };
-# 131 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_rows
- {
- struct st_mysql_rows * next;
- MYSQL_ROW data;
- unsigned long int length;
- };
-# 596 "mysql.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long long int)))) st_mysql_stmt
- {
- MEM_ROOT mem_root;
- LIST list;
- MYSQL * mysql;
- MYSQL_BIND * params;
- MYSQL_BIND * bind;
- MYSQL_FIELD * fields;
- MYSQL_DATA result;
- MYSQL_ROWS * data_cursor;
- my_ulonglong affected_rows;
- my_ulonglong insert_id;
- int (* read_row_func)(struct st_mysql_stmt * stmt, unsigned char * * row);
- unsigned long int stmt_id;
- unsigned int last_errno;
- unsigned int param_count;
- unsigned int field_count;
- enum enum_mysql_stmt_state state;
- char last_error[512];
- char sqlstate[(5 + 1)];
- my_bool send_types_to_server;
- my_bool bind_param_done;
- my_bool bind_result_done;
- my_bool unbuffered_fetch_cancelled;
- my_bool update_max_length;
- };
-# 48 "mysql_time.h"
-struct __attribute__((aligned(__alignof__(unsigned long int)))) st_mysql_time
- {
- unsigned int year;
- unsigned int month;
- unsigned int day;
- unsigned int hour;
- unsigned int minute;
- unsigned int second;
- unsigned long int second_part;
- my_bool neg;
- enum enum_mysql_timestamp_type time_type;
- };
-# 151 "mysql_com.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_net
- {
- Vio * vio;
- unsigned char * buff;
- unsigned char * buff_end;
- unsigned char * write_pos;
- unsigned char * read_pos;
- my_socket fd;
- unsigned long int max_packet;
- unsigned long int max_packet_size;
- unsigned int pkt_nr;
- unsigned int compress_pkt_nr;
- unsigned int write_timeout;
- unsigned int read_timeout;
- unsigned int retry_count;
- int fcntl;
- my_bool compress;
- unsigned long int remain_in_buf;
- unsigned long int length;
- unsigned long int buf_length;
- unsigned long int where_b;
- unsigned int * return_status;
- unsigned char reading_or_writing;
- char save_char;
- my_bool no_send_ok;
- char last_error[512];
- char sqlstate[(5 + 1)];
- unsigned int last_errno;
- unsigned char error;
- gptr query_cache_query;
- my_bool report_error;
- my_bool return_errno;
- };
-# 21 "typelib.h"
-struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib
- {
- unsigned int count;
- char const * name;
- char const * * type_names;
- unsigned int * type_lengths;
- };
-# 315 "mysql_com.h"
-struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args
- {
- unsigned int arg_count;
- enum Item_result * arg_type;
- char * * args;
- unsigned long int * lengths;
- char * maybe_null;
- };
-# 326 "mysql_com.h"
-struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init
- {
- my_bool maybe_null;
- unsigned int decimals;
- unsigned long int max_length;
- char * ptr;
- my_bool const_item;
- };
-# 27 "my_alloc.h"
-struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned int)))) st_used_mem
- {
- struct st_used_mem * next;
- unsigned int left;
- unsigned int size;
- };
-# 313 "mysql_com.h"
-enum Item_result
- {
- STRING_RESULT = 0,
- REAL_RESULT = 1,
- INT_RESULT = 2,
- ROW_RESULT = 3,
- };
-# 186 "mysql_com.h"
-enum enum_field_types
- {
- MYSQL_TYPE_DECIMAL = 0,
- MYSQL_TYPE_TINY = 1,
- MYSQL_TYPE_SHORT = 2,
- MYSQL_TYPE_LONG = 3,
- MYSQL_TYPE_FLOAT = 4,
- MYSQL_TYPE_DOUBLE = 5,
- MYSQL_TYPE_NULL = 6,
- MYSQL_TYPE_TIMESTAMP = 7,
- MYSQL_TYPE_LONGLONG = 8,
- MYSQL_TYPE_INT24 = 9,
- MYSQL_TYPE_DATE = 10,
- MYSQL_TYPE_TIME = 11,
- MYSQL_TYPE_DATETIME = 12,
- MYSQL_TYPE_YEAR = 13,
- MYSQL_TYPE_NEWDATE = 14,
- MYSQL_TYPE_ENUM = 247,
- MYSQL_TYPE_SET = 248,
- MYSQL_TYPE_TINY_BLOB = 249,
- MYSQL_TYPE_MEDIUM_BLOB = 250,
- MYSQL_TYPE_LONG_BLOB = 251,
- MYSQL_TYPE_BLOB = 252,
- MYSQL_TYPE_VAR_STRING = 253,
- MYSQL_TYPE_STRING = 254,
- MYSQL_TYPE_GEOMETRY = 255,
- };
-# 269 "mysql_com.h"
-enum enum_mysql_set_option
- {
- MYSQL_OPTION_MULTI_STATEMENTS_ON = 0,
- MYSQL_OPTION_MULTI_STATEMENTS_OFF = 1,
- };
-# 563 "mysql.h"
-enum enum_mysql_stmt_state
- {
- MYSQL_STMT_INIT_DONE = 1,
- MYSQL_STMT_PREPARE_DONE = 2,
- MYSQL_STMT_EXECUTE_DONE = 3,
- MYSQL_STMT_FETCH_DONE = 4,
- };
-# 29 "mysql_time.h"
-enum enum_mysql_timestamp_type
- {
- MYSQL_TIMESTAMP_NONE = -(2),
- MYSQL_TIMESTAMP_ERROR = -(1),
- MYSQL_TIMESTAMP_DATE = 0,
- MYSQL_TIMESTAMP_DATETIME = 1,
- MYSQL_TIMESTAMP_TIME = 2,
- };
-# 39 "mysql_com.h"
-enum enum_server_command
- {
- COM_SLEEP = 0,
- COM_QUIT = 1,
- COM_INIT_DB = 2,
- COM_QUERY = 3,
- COM_FIELD_LIST = 4,
- COM_CREATE_DB = 5,
- COM_DROP_DB = 6,
- COM_REFRESH = 7,
- COM_SHUTDOWN = 8,
- COM_STATISTICS = 9,
- COM_PROCESS_INFO = 10,
- COM_CONNECT = 11,
- COM_PROCESS_KILL = 12,
- COM_DEBUG = 13,
- COM_PING = 14,
- COM_TIME = 15,
- COM_DELAYED_INSERT = 16,
- COM_CHANGE_USER = 17,
- COM_BINLOG_DUMP = 18,
- COM_TABLE_DUMP = 19,
- COM_CONNECT_OUT = 20,
- COM_REGISTER_SLAVE = 21,
- COM_PREPARE = 22,
- COM_EXECUTE = 23,
- COM_LONG_DATA = 24,
- COM_CLOSE_STMT = 25,
- COM_RESET_STMT = 26,
- COM_SET_OPTION = 27,
- COM_END = 28,
- };
-# 635 "mysql.h"
-enum enum_stmt_attr_type
- {
- STMT_ATTR_UPDATE_MAX_LENGTH = 0,
- };
-# 244 "mysql_com.h"
-enum mysql_enum_shutdown_level
- {
- SHUTDOWN_DEFAULT = 0,
- SHUTDOWN_WAIT_CONNECTIONS = (unsigned char)((1 << 0)),
- SHUTDOWN_WAIT_TRANSACTIONS = (unsigned char)((1 << 1)),
- SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)),
- SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1),
- SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1),
- KILL_CONNECTION = 255,
- };
-# 151 "mysql.h"
-enum mysql_option
- {
- MYSQL_OPT_CONNECT_TIMEOUT = 0,
- MYSQL_OPT_COMPRESS = 1,
- MYSQL_OPT_NAMED_PIPE = 2,
- MYSQL_INIT_COMMAND = 3,
- MYSQL_READ_DEFAULT_FILE = 4,
- MYSQL_READ_DEFAULT_GROUP = 5,
- MYSQL_SET_CHARSET_DIR = 6,
- MYSQL_SET_CHARSET_NAME = 7,
- MYSQL_OPT_LOCAL_INFILE = 8,
- MYSQL_OPT_PROTOCOL = 9,
- MYSQL_SHARED_MEMORY_BASE_NAME = 10,
- MYSQL_OPT_READ_TIMEOUT = 11,
- MYSQL_OPT_WRITE_TIMEOUT = 12,
- MYSQL_OPT_USE_RESULT = 13,
- MYSQL_OPT_USE_REMOTE_CONNECTION = 14,
- MYSQL_OPT_USE_EMBEDDED_CONNECTION = 15,
- MYSQL_OPT_GUESS_CONNECTION = 16,
- MYSQL_SET_CLIENT_IP = 17,
- MYSQL_SECURE_AUTH = 18,
- };
-# 214 "mysql.h"
-enum mysql_protocol_type
- {
- MYSQL_PROTOCOL_DEFAULT = 0,
- MYSQL_PROTOCOL_TCP = 1,
- MYSQL_PROTOCOL_SOCKET = 2,
- MYSQL_PROTOCOL_PIPE = 3,
- MYSQL_PROTOCOL_MEMORY = 4,
- };
-# 224 "mysql.h"
-enum mysql_rpl_type
- {
- MYSQL_RPL_MASTER = 0,
- MYSQL_RPL_SLAVE = 1,
- MYSQL_RPL_ADMIN = 2,
- };
-# 209 "mysql.h"
-enum mysql_status
- {
- MYSQL_STATUS_READY = 0,
- MYSQL_STATUS_GET_RESULT = 1,
- MYSQL_STATUS_USE_RESULT = 2,
- };
-# 365 "mysql_com.h"
-extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
-# 358 "mysql_com.h"
-extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
-# 353 "mysql_com.h"
-extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st);
-# 28 "typelib.h"
-extern int find_type(char * x, TYPELIB * typelib, unsigned int);
-# 367 "mysql_com.h"
-extern void get_salt_from_password(unsigned char * res, char const * password);
-# 360 "mysql_com.h"
-extern void get_salt_from_password_323(unsigned long int * res, char const * password);
-# 372 "mysql_com.h"
-extern char * get_tty_password(char * opt_message);
-# 30 "typelib.h"
-extern char const * get_type(TYPELIB * typelib, unsigned int);
-# 355 "mysql_com.h"
-extern void hash_password(unsigned long int * to, char const * password, unsigned int);
-# 31 "my_list.h"
-extern LIST * list_add(LIST * root, LIST * element);
-# 33 "my_list.h"
-extern LIST * list_cons(void * data, LIST * root);
-# 32 "my_list.h"
-extern LIST * list_delete(LIST * root, LIST * element);
-# 35 "my_list.h"
-extern void list_free(LIST * root, unsigned int);
-# 36 "my_list.h"
-extern unsigned int list_length(LIST *);
-# 34 "my_list.h"
-extern LIST * list_reverse(LIST * root);
-# 37 "my_list.h"
-extern int list_walk(LIST *, list_walk_action, gptr);
-# 378 "mysql_com.h"
-extern int load_defaults(char const * conf_file, char const * * groups, int * argc, char * * * argv);
-# 368 "mysql_com.h"
-extern void make_password_from_salt(char * to, unsigned char const * hash_stage2);
-# 361 "mysql_com.h"
-extern void make_password_from_salt_323(char * to, unsigned long int const * salt);
-# 363 "mysql_com.h"
-extern void make_scrambled_password(char * to, char const * password);
-# 356 "mysql_com.h"
-extern void make_scrambled_password_323(char * to, char const * password);
-# 29 "typelib.h"
-extern void make_type(char * to, unsigned int, TYPELIB * typelib);
-# 299 "mysql_com.h"
-extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int);
-# 377 "mysql_com.h"
-extern my_bool my_init(void);
-# 281 "mysql_com.h"
-extern my_bool my_net_init(NET * net, Vio * vio);
-# 282 "mysql_com.h"
-extern void my_net_local_init(NET * net);
-# 292 "mysql_com.h"
-extern unsigned long int my_net_read(NET * net);
-# 287 "mysql_com.h"
-extern my_bool my_net_write(NET * net, char const * packet, unsigned long int);
-# 352 "mysql_com.h"
-extern double my_rnd(struct rand_struct *);
-# 381 "mysql_com.h"
-extern void my_thread_end(void);
-# 380 "mysql_com.h"
-extern my_bool my_thread_init(void);
-# 539 "mysql.h"
-extern void myodbc_remove_escape(MYSQL * mysql, char * name);
-# 481 "mysql.h"
-extern int mysql_add_slave(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
-# 393 "mysql.h"
-extern my_ulonglong mysql_affected_rows(MYSQL * mysql);
-# 720 "mysql.h"
-extern my_bool mysql_autocommit(MYSQL * mysql, my_bool);
-# 408 "mysql.h"
-extern my_bool mysql_change_user(MYSQL * mysql, char const * user, char const * passwd, char const * db);
-# 401 "mysql.h"
-extern char const * mysql_character_set_name(MYSQL * mysql);
-# 723 "mysql.h"
-extern void mysql_close(MYSQL * sock);
-# 718 "mysql.h"
-extern my_bool mysql_commit(MYSQL * mysql);
-# 510 "mysql.h"
-extern void mysql_data_seek(MYSQL_RES * result, my_ulonglong);
-# 528 "mysql.h"
-extern void mysql_debug(char const * debug);
-# 467 "mysql.h"
-extern void mysql_disable_reads_from_master(MYSQL * mysql);
-# 461 "mysql.h"
-extern void mysql_disable_rpl_parse(MYSQL * mysql);
-# 489 "mysql.h"
-extern int mysql_dump_debug_info(MYSQL * mysql);
-# 541 "mysql.h"
-extern my_bool mysql_embedded(void);
-# 466 "mysql.h"
-extern void mysql_enable_reads_from_master(MYSQL * mysql);
-# 460 "mysql.h"
-extern void mysql_enable_rpl_parse(MYSQL * mysql);
-# 385 "mysql.h"
-extern my_bool mysql_eof(MYSQL_RES * res);
-# 395 "mysql.h"
-extern unsigned int mysql_errno(MYSQL * mysql);
-# 373 "mysql_com.h"
-extern char const * mysql_errno_to_sqlstate(unsigned int);
-# 396 "mysql.h"
-extern char const * mysql_error(MYSQL * mysql);
-# 521 "mysql.h"
-extern unsigned long int mysql_escape_string(char * to, char const * from, unsigned long int);
-# 518 "mysql.h"
-extern MYSQL_FIELD * mysql_fetch_field(MYSQL_RES * result);
-# 386 "mysql.h"
-extern MYSQL_FIELD * mysql_fetch_field_direct(MYSQL_RES * res, unsigned int);
-# 388 "mysql.h"
-extern MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES * res);
-# 517 "mysql.h"
-extern unsigned long int * mysql_fetch_lengths(MYSQL_RES * result);
-# 516 "mysql.h"
-extern MYSQL_ROW mysql_fetch_row(MYSQL_RES * result);
-# 392 "mysql.h"
-extern unsigned int mysql_field_count(MYSQL * mysql);
-# 514 "mysql.h"
-extern MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES * result, MYSQL_FIELD_OFFSET);
-# 390 "mysql.h"
-extern MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES * res);
-# 509 "mysql.h"
-extern void mysql_free_result(MYSQL_RES * result);
-# 499 "mysql.h"
-extern char const * mysql_get_client_info(void);
-# 500 "mysql.h"
-extern unsigned long int mysql_get_client_version(void);
-# 501 "mysql.h"
-extern char const * mysql_get_host_info(MYSQL * mysql);
-# 367 "mysql.h"
-extern MYSQL_PARAMETERS * mysql_get_parameters(void);
-# 503 "mysql.h"
-extern unsigned int mysql_get_proto_info(MYSQL * mysql);
-# 498 "mysql.h"
-extern char const * mysql_get_server_info(MYSQL * mysql);
-# 502 "mysql.h"
-extern unsigned long int mysql_get_server_version(MYSQL * mysql);
-# 523 "mysql.h"
-extern unsigned long int mysql_hex_string(char * to, char const * from, unsigned long int);
-# 399 "mysql.h"
-extern char const * mysql_info(MYSQL * mysql);
-# 404 "mysql.h"
-extern MYSQL * mysql_init(MYSQL * mysql);
-# 394 "mysql.h"
-extern my_ulonglong mysql_insert_id(MYSQL * mysql);
-# 492 "mysql.h"
-extern int mysql_kill(MYSQL * mysql, unsigned long int);
-# 504 "mysql.h"
-extern MYSQL_RES * mysql_list_dbs(MYSQL * mysql, char const * wild);
-# 519 "mysql.h"
-extern MYSQL_RES * mysql_list_fields(MYSQL * mysql, char const * table, char const * wild);
-# 506 "mysql.h"
-extern MYSQL_RES * mysql_list_processes(MYSQL * mysql);
-# 505 "mysql.h"
-extern MYSQL_RES * mysql_list_tables(MYSQL * mysql, char const * wild);
-# 548 "mysql.h"
-extern void mysql_manager_close(MYSQL_MANAGER * con);
-# 549 "mysql.h"
-extern int mysql_manager_command(MYSQL_MANAGER * con, char const * cmd, int);
-# 543 "mysql.h"
-extern MYSQL_MANAGER * mysql_manager_connect(MYSQL_MANAGER * con, char const * host, char const * user, char const * passwd, unsigned int);
-# 551 "mysql.h"
-extern int mysql_manager_fetch_line(MYSQL_MANAGER * con, char * res_buf, int);
-# 542 "mysql.h"
-extern MYSQL_MANAGER * mysql_manager_init(MYSQL_MANAGER * con);
-# 427 "mysql.h"
-extern my_bool mysql_master_query(MYSQL * mysql, char const * q, unsigned long int);
-# 429 "mysql.h"
-extern my_bool mysql_master_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 721 "mysql.h"
-extern my_bool mysql_more_results(MYSQL * mysql);
-# 722 "mysql.h"
-extern int mysql_next_result(MYSQL * mysql);
-# 384 "mysql.h"
-extern unsigned int mysql_num_fields(MYSQL_RES * res);
-# 383 "mysql.h"
-extern my_ulonglong mysql_num_rows(MYSQL_RES * res);
-# 529 "mysql.h"
-extern char * mysql_odbc_escape_string(MYSQL * mysql, char * to, unsigned long int, char const * from, unsigned long int, void * param, char * (* extend_buffer)(void *, char * to, unsigned long int * length));
-# 507 "mysql.h"
-extern int mysql_options(MYSQL * mysql, enum mysql_option, char const * arg);
-# 496 "mysql.h"
-extern int mysql_ping(MYSQL * mysql);
-# 75 "mysql.h"
-extern unsigned int mysql_port;
-# 418 "mysql.h"
-extern int mysql_query(MYSQL * mysql, char const * q);
-# 554 "mysql.h"
-extern my_bool mysql_read_query_result(MYSQL * mysql);
-# 469 "mysql.h"
-extern my_bool mysql_reads_from_master_enabled(MYSQL * mysql);
-# 410 "mysql.h"
-extern MYSQL * mysql_real_connect(MYSQL * mysql, char const * host, char const * user, char const * passwd, char const * db, unsigned int, char const * unix_socket, unsigned long int);
-# 525 "mysql.h"
-extern unsigned long int mysql_real_escape_string(MYSQL * mysql, char * to, char const * from, unsigned long int);
-# 421 "mysql.h"
-extern int mysql_real_query(MYSQL * mysql, char const * q, unsigned long int);
-# 490 "mysql.h"
-extern int mysql_refresh(MYSQL * mysql, unsigned int);
-# 719 "mysql.h"
-extern my_bool mysql_rollback(MYSQL * mysql);
-# 512 "mysql.h"
-extern MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES * result, MYSQL_ROW_OFFSET);
-# 389 "mysql.h"
-extern MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES * res);
-# 463 "mysql.h"
-extern int mysql_rpl_parse_enabled(MYSQL * mysql);
-# 474 "mysql.h"
-extern my_bool mysql_rpl_probe(MYSQL * mysql);
-# 471 "mysql.h"
-extern enum mysql_rpl_type mysql_rpl_query_type(char const * q, int);
-# 417 "mysql.h"
-extern int mysql_select_db(MYSQL * mysql, char const * db);
-# 419 "mysql.h"
-extern int mysql_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 354 "mysql.h"
-extern void mysql_server_end(void);
-# 353 "mysql.h"
-extern int mysql_server_init(int, char * * argv, char * * groups);
-# 402 "mysql.h"
-extern int mysql_set_character_set(MYSQL * mysql, char const * csname);
-# 452 "mysql.h"
-extern void mysql_set_local_infile_default(MYSQL * mysql);
-# 441 "mysql.h"
-extern void mysql_set_local_infile_handler(MYSQL * mysql, int (* local_infile_init)(void * *, char const *, void *), int (* local_infile_read)(void *, char *, unsigned int), void (* local_infile_end)(void), int (* local_infile_error)(void *, char *, unsigned int), void *);
-# 477 "mysql.h"
-extern int mysql_set_master(MYSQL * mysql, char const * host, unsigned int, char const * user, char const * passwd);
-# 493 "mysql.h"
-extern int mysql_set_server_option(MYSQL * mysql, enum enum_mysql_set_option);
-# 486 "mysql.h"
-extern int mysql_shutdown(MYSQL * mysql, enum mysql_enum_shutdown_level);
-# 432 "mysql.h"
-extern my_bool mysql_slave_query(MYSQL * mysql, char const * q, unsigned long int);
-# 434 "mysql.h"
-extern my_bool mysql_slave_send_query(MYSQL * mysql, char const * q, unsigned long int);
-# 397 "mysql.h"
-extern char const * mysql_sqlstate(MYSQL * mysql);
-# 405 "mysql.h"
-extern my_bool mysql_ssl_set(MYSQL * mysql, char const * key, char const * cert, char const * ca, char const * capath, char const * cipher);
-# 497 "mysql.h"
-extern char const * mysql_stat(MYSQL * mysql);
-# 714 "mysql.h"
-extern my_ulonglong mysql_stmt_affected_rows(MYSQL_STMT * stmt);
-# 692 "mysql.h"
-extern my_bool mysql_stmt_attr_get(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void * attr);
-# 689 "mysql.h"
-extern my_bool mysql_stmt_attr_set(MYSQL_STMT * stmt, enum enum_stmt_attr_type, void const * attr);
-# 695 "mysql.h"
-extern my_bool mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 696 "mysql.h"
-extern my_bool mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-# 697 "mysql.h"
-extern my_bool mysql_stmt_close(MYSQL_STMT * stmt);
-# 712 "mysql.h"
-extern void mysql_stmt_data_seek(MYSQL_STMT * stmt, my_ulonglong);
-# 706 "mysql.h"
-extern unsigned int mysql_stmt_errno(MYSQL_STMT * stmt);
-# 707 "mysql.h"
-extern char const * mysql_stmt_error(MYSQL_STMT * stmt);
-# 682 "mysql.h"
-extern int mysql_stmt_execute(MYSQL_STMT * stmt);
-# 683 "mysql.h"
-extern int mysql_stmt_fetch(MYSQL_STMT * stmt);
-# 684 "mysql.h"
-extern int mysql_stmt_fetch_column(MYSQL_STMT * stmt, MYSQL_BIND * bind, unsigned int, unsigned long int);
-# 716 "mysql.h"
-extern unsigned int mysql_stmt_field_count(MYSQL_STMT * stmt);
-# 699 "mysql.h"
-extern my_bool mysql_stmt_free_result(MYSQL_STMT * stmt);
-# 679 "mysql.h"
-extern MYSQL_STMT * mysql_stmt_init(MYSQL * mysql);
-# 715 "mysql.h"
-extern my_ulonglong mysql_stmt_insert_id(MYSQL_STMT * stmt);
-# 713 "mysql.h"
-extern my_ulonglong mysql_stmt_num_rows(MYSQL_STMT * stmt);
-# 688 "mysql.h"
-extern unsigned long int mysql_stmt_param_count(MYSQL_STMT * stmt);
-# 705 "mysql.h"
-extern MYSQL_RES * mysql_stmt_param_metadata(MYSQL_STMT * stmt);
-# 680 "mysql.h"
-extern int mysql_stmt_prepare(MYSQL_STMT * stmt, char const * query, unsigned long int);
-# 698 "mysql.h"
-extern my_bool mysql_stmt_reset(MYSQL_STMT * stmt);
-# 704 "mysql.h"
-extern MYSQL_RES * mysql_stmt_result_metadata(MYSQL_STMT * stmt);
-# 709 "mysql.h"
-extern MYSQL_ROW_OFFSET mysql_stmt_row_seek(MYSQL_STMT * stmt, MYSQL_ROW_OFFSET);
-# 711 "mysql.h"
-extern MYSQL_ROW_OFFSET mysql_stmt_row_tell(MYSQL_STMT * stmt);
-# 700 "mysql.h"
-extern my_bool mysql_stmt_send_long_data(MYSQL_STMT * stmt, unsigned int, char const * data, unsigned long int);
-# 708 "mysql.h"
-extern char const * mysql_stmt_sqlstate(MYSQL_STMT * stmt);
-# 687 "mysql.h"
-extern int mysql_stmt_store_result(MYSQL_STMT * stmt);
-# 423 "mysql.h"
-extern MYSQL_RES * mysql_store_result(MYSQL * mysql);
-# 376 "mysql.h"
-extern void mysql_thread_end(void);
-# 400 "mysql.h"
-extern unsigned long int mysql_thread_id(MYSQL * mysql);
-# 375 "mysql.h"
-extern my_bool mysql_thread_init(void);
-# 540 "mysql.h"
-extern unsigned int mysql_thread_safe(void);
-# 76 "mysql.h"
-extern char * mysql_unix_port;
-# 424 "mysql.h"
-extern MYSQL_RES * mysql_use_result(MYSQL * mysql);
-# 398 "mysql.h"
-extern unsigned int mysql_warning_count(MYSQL * mysql);
-# 284 "mysql_com.h"
-extern void net_clear(NET * net);
-# 283 "mysql_com.h"
-extern void net_end(NET * net);
-# 286 "mysql_com.h"
-extern my_bool net_flush(NET * net);
-# 291 "mysql_com.h"
-extern int net_real_write(NET * net, char const * packet, unsigned long int);
-# 285 "mysql_com.h"
-extern my_bool net_realloc(NET * net, unsigned long int);
-# 751 "mysql.h"
-extern unsigned long int net_safe_read(MYSQL * mysql);
-# 288 "mysql_com.h"
-extern my_bool net_write_command(NET * net, unsigned char, char const * header, unsigned long int, char const * packet, unsigned long int);
-# 350 "mysql_com.h"
-extern void randominit(struct rand_struct *, unsigned long int, unsigned long int);
-# 364 "mysql_com.h"
-extern void scramble(char * to, char const * message, char const * password);
-# 357 "mysql_com.h"
-extern void scramble_323(char * to, char const * message, char const * password);
-# 32 "typelib.h"
-extern TYPELIB sql_protocol_typelib;
diff --git a/include/base64.h b/include/base64.h
index fcc2f8b40dc..78ebc9caf47 100644
--- a/include/base64.h
+++ b/include/base64.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/config-netware.h b/include/config-netware.h
index a3cd6635bae..9c99305789a 100644
--- a/include/config-netware.h
+++ b/include/config-netware.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/config-os2.h b/include/config-os2.h
index 0402074acc0..8e2d0e2e836 100644
--- a/include/config-os2.h
+++ b/include/config-os2.h
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/config-win.h b/include/config-win.h
index 75133ddc837..34e828e01e8 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -249,7 +248,6 @@ inline double ulonglong2double(ulonglong value)
#define tell(A) _telli64(A)
#endif
-#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time((time_t*)0) + (time_t) (SEC); (ABSTIME).tv_nsec=0; }
#define STACK_DIRECTION -1
diff --git a/include/decimal.h b/include/decimal.h
index 2648e04c1cf..56962009025 100644
--- a/include/decimal.h
+++ b/include/decimal.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/errmsg.h b/include/errmsg.h
index aca7c4b6a1f..8b20b36eed7 100644
--- a/include/errmsg.h
+++ b/include/errmsg.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/ft_global.h b/include/ft_global.h
index c3f60d13a7a..baf055922bc 100644
--- a/include/ft_global.h
+++ b/include/ft_global.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/hash.h b/include/hash.h
index 4d6ee77fa0c..97e947d7c6a 100644
--- a/include/hash.h
+++ b/include/hash.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/heap.h b/include/heap.h
index cfbb6113f86..1a02fef5483 100644
--- a/include/heap.h
+++ b/include/heap.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -46,8 +45,8 @@ typedef struct st_heapinfo /* Struct from heap_info */
ulong records; /* Records in database */
ulong deleted; /* Deleted records in database */
ulong max_records;
- ulong data_length;
- ulong index_length;
+ ulonglong data_length;
+ ulonglong index_length;
uint reclength; /* Length of one record */
int errkey;
ulonglong auto_increment;
@@ -135,7 +134,7 @@ typedef struct st_heap_share
HP_BLOCK block;
HP_KEYDEF *keydef;
ulong min_records,max_records; /* Params to open */
- ulong data_length,index_length,max_table_size;
+ ulonglong data_length,index_length,max_table_size;
uint key_stat_version; /* version to indicate insert/delete */
uint records; /* records */
uint blength; /* records rounded up to 2^n */
@@ -187,7 +186,7 @@ typedef struct st_heap_create_info
{
uint auto_key; /* keynr [1 - maxkey] for auto key */
uint auto_key_type;
- ulong max_table_size;
+ ulonglong max_table_size;
ulonglong auto_increment;
my_bool with_auto_increment;
} HP_CREATE_INFO;
diff --git a/include/help_end.h b/include/help_end.h
index 3bd16c09e3b..4426cb80bce 100644
--- a/include/help_end.h
+++ b/include/help_end.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifdef __NETWARE__
#undef printf
#undef puts
diff --git a/include/help_start.h b/include/help_start.h
index 7ffde1ab803..3ae20eea7d7 100644
--- a/include/help_start.h
+++ b/include/help_start.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
/* Divert all help information on NetWare to logger screen. */
#ifdef __NETWARE__
diff --git a/include/keycache.h b/include/keycache.h
index 9fe1cce5da5..dc763b8cc08 100644
--- a/include/keycache.h
+++ b/include/keycache.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/m_ctype.h b/include/m_ctype.h
index ffecadd9836..a8a395a3207 100644
--- a/include/m_ctype.h
+++ b/include/m_ctype.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/m_string.h b/include/m_string.h
index 8a526d70d1d..349084ab21e 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/md5.h b/include/md5.h
index aa4116ff17f..f92976b3beb 100644
--- a/include/md5.h
+++ b/include/md5.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_aes.h b/include/my_aes.h
index 5852baa5892..1bbdf5663ea 100644
--- a/include/my_aes.h
+++ b/include/my_aes.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_alarm.h b/include/my_alarm.h
index fdfce9c65c9..750135d64ed 100644
--- a/include/my_alarm.h
+++ b/include/my_alarm.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_alloc.h b/include/my_alloc.h
index 1641b3acf3e..657394a363b 100644
--- a/include/my_alloc.h
+++ b/include/my_alloc.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_base.h b/include/my_base.h
index dda64db2ef9..f832d9aea70 100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_bitmap.h b/include/my_bitmap.h
index f4fe28266e4..8fb4327622c 100644
--- a/include/my_bitmap.h
+++ b/include/my_bitmap.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_dbug.h b/include/my_dbug.h
index 8a8d622e2a3..a3591f0151a 100644
--- a/include/my_dbug.h
+++ b/include/my_dbug.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_dir.h b/include/my_dir.h
index 851b6d8d7e9..06509a3af19 100644
--- a/include/my_dir.h
+++ b/include/my_dir.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_getopt.h b/include/my_getopt.h
index e6ca1130f85..dcd6ad9d79b 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_global.h b/include/my_global.h
index f94cedbc91a..b91ff8a9e5b 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -94,6 +93,42 @@
#endif
/*
+ The macros below are used to allow build of Universal/fat binaries of
+ MySQL and MySQL applications under darwin.
+*/
+#ifdef TARGET_FAT_BINARY
+# undef SIZEOF_CHARP
+# undef SIZEOF_INT
+# undef SIZEOF_LONG
+# undef SIZEOF_LONG_LONG
+# undef SIZEOF_OFF_T
+# undef SIZEOF_SHORT
+
+#if defined(__i386__)
+# undef WORDS_BIGENDIAN
+# define SIZEOF_CHARP 4
+# define SIZEOF_INT 4
+# define SIZEOF_LONG 4
+# define SIZEOF_LONG_LONG 8
+# define SIZEOF_OFF_T 8
+# define SIZEOF_SHORT 2
+
+#elif defined(__ppc__)
+# define WORDS_BIGENDIAN
+# define SIZEOF_CHARP 4
+# define SIZEOF_INT 4
+# define SIZEOF_LONG 4
+# define SIZEOF_LONG_LONG 8
+# define SIZEOF_OFF_T 8
+# define SIZEOF_SHORT 2
+
+#else
+# error Building FAT binary for an unknown architecture.
+#endif
+#endif /* TARGET_FAT_BINARY */
+
+
+/*
The macros below are borrowed from include/linux/compiler.h in the
Linux kernel. Use them to indicate the likelyhood of the truthfulness
of a condition. This serves two purposes - newer versions of gcc will be
@@ -1010,41 +1045,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
-#ifdef HAVE_TIMESPEC_TS_SEC
-#ifndef set_timespec
-#define set_timespec(ABSTIME,SEC) \
-{ \
- (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
- (ABSTIME).ts_nsec=0; \
-}
-#endif /* !set_timespec */
-#ifndef set_timespec_nsec
-#define set_timespec_nsec(ABSTIME,NSEC) \
-{ \
- ulonglong now= my_getsystime() + (NSEC/100); \
- (ABSTIME).ts_sec= (now / ULL(10000000)); \
- (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
-}
-#endif /* !set_timespec_nsec */
-#else
-#ifndef set_timespec
-#define set_timespec(ABSTIME,SEC) \
-{\
- struct timeval tv;\
- gettimeofday(&tv,0);\
- (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
- (ABSTIME).tv_nsec=tv.tv_usec*1000;\
-}
-#endif /* !set_timespec */
-#ifndef set_timespec_nsec
-#define set_timespec_nsec(ABSTIME,NSEC) \
-{\
- ulonglong now= my_getsystime() + (NSEC/100); \
- (ABSTIME).tv_sec= (now / ULL(10000000)); \
- (ABSTIME).tv_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
-}
-#endif /* !set_timespec_nsec */
-#endif /* HAVE_TIMESPEC_TS_SEC */
+
/*
Define-funktions for reading and storing in machine independent format
diff --git a/include/my_handler.h b/include/my_handler.h
index 61665090853..d7cd0567f9c 100644
--- a/include/my_handler.h
+++ b/include/my_handler.h
@@ -1,9 +1,9 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2006 MySQL AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_libwrap.h b/include/my_libwrap.h
index 6437cbaed84..9a8579475fb 100644
--- a/include/my_libwrap.h
+++ b/include/my_libwrap.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_list.h b/include/my_list.h
index 92598696fc4..4a1737d4c53 100644
--- a/include/my_list.h
+++ b/include/my_list.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_net.h b/include/my_net.h
index 43360b6153c..47f31a6c3df 100644
--- a/include/my_net.h
+++ b/include/my_net.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_no_pthread.h b/include/my_no_pthread.h
index 5691de08783..e4ec23b66b8 100644
--- a/include/my_no_pthread.h
+++ b/include/my_no_pthread.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_nosys.h b/include/my_nosys.h
index 605906f0e07..7e8c2aa8381 100644
--- a/include/my_nosys.h
+++ b/include/my_nosys.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 3e4388413e0..52e900b5803 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -31,6 +30,26 @@ extern "C" {
#define EXTERNC
#endif /* __cplusplus */
+/*
+ BUG#24507: Race conditions inside current NPTL pthread_exit() implementation.
+
+ If macro NPTL_PTHREAD_EXIT_HACK is defined then a hack described in the bug
+ report will be implemented inside my_thread_global_init() in my_thr_init.c.
+
+ This amounts to spawning a dummy thread which does nothing but executes
+ pthread_exit(0).
+
+ This bug is fixed in version 2.5 of glibc library.
+
+ TODO: Remove this code when fixed versions of glibc6 are in common use.
+ */
+
+#if defined(TARGET_OS_LINUX) && defined(HAVE_NPTL) && \
+ defined(__GLIBC__) && ( __GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ < 5 )
+#define NPTL_PTHREAD_EXIT_BUG 1
+#endif
+
+
#if defined(__WIN__) || defined(OS2)
#ifdef OS2
@@ -69,14 +88,6 @@ typedef struct {
#endif
} pthread_cond_t;
-
-#ifndef OS2
-struct timespec { /* For pthread_cond_timedwait() */
- time_t tv_sec;
- long tv_nsec;
-};
-#endif
-
typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
#ifdef OS2
@@ -87,6 +98,36 @@ typedef void * (_Optlink *pthread_handler)(void *);
typedef void * (__cdecl *pthread_handler)(void *);
#endif
+/*
+ Struct and macros to be used in combination with the
+ windows implementation of pthread_cond_timedwait
+*/
+
+/*
+ Declare a union to make sure FILETIME is properly aligned
+ so it can be used directly as a 64 bit value. The value
+ stored is in 100ns units.
+ */
+ union ft64 {
+ FILETIME ft;
+ __int64 i64;
+ };
+struct timespec {
+ union ft64 tv;
+ /* The max timeout value in millisecond for pthread_cond_timedwait */
+ long max_timeout_msec;
+};
+#define set_timespec(ABSTIME,SEC) { \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(SEC)*10000000; \
+ (ABSTIME).max_timeout_msec= (long)((SEC)*1000); \
+}
+#define set_timespec_nsec(ABSTIME,NSEC) { \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \
+ (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
+}
+
void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);
int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
@@ -164,8 +205,6 @@ extern int pthread_mutex_destroy (pthread_mutex_t *);
#define pthread_condattr_init(A)
#define pthread_condattr_destroy(A)
-/*Irena: compiler does not like this: */
-/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) */
#define my_pthread_getprio(thread_id) pthread_dummy(0)
#elif defined(HAVE_UNIXWARE7_THREADS)
@@ -473,6 +512,47 @@ void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size);
int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
#endif
+/*
+ The defines set_timespec and set_timespec_nsec should be used
+ for calculating an absolute time at which
+ pthread_cond_timedwait should timeout
+*/
+#ifdef HAVE_TIMESPEC_TS_SEC
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{ \
+ (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
+ (ABSTIME).ts_nsec=0; \
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{ \
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).ts_sec= (now / ULL(10000000)); \
+ (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#else
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{\
+ struct timeval tv;\
+ gettimeofday(&tv,0);\
+ (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
+ (ABSTIME).tv_nsec=tv.tv_usec*1000;\
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{\
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).tv_sec= (time_t) (now / ULL(10000000)); \
+ (ABSTIME).tv_nsec= (long) (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#endif /* HAVE_TIMESPEC_TS_SEC */
+
/* safe_mutex adds checking to mutex for easier debugging */
#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
@@ -677,14 +757,13 @@ struct st_my_thread_var
};
extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
+extern uint my_thread_end_wait_time;
#define my_thread_var (_my_thread_var())
#define my_errno my_thread_var->thr_errno
/*
Keep track of shutdown,signal, and main threads so that my_end() will not
report errors with them
*/
-extern pthread_t shutdown_th, main_th, signal_th;
-
/* statistics_xxx functions are for not essential statistic */
#ifndef thread_safe_increment
diff --git a/include/my_sys.h b/include/my_sys.h
index 65bfb0b7e6a..c7c15e1606d 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -781,6 +780,8 @@ extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
uint length);
+extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
+ ...);
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
extern void dynstr_free(DYNAMIC_STRING *str);
@@ -842,12 +843,6 @@ my_bool my_gethwaddr(uchar *to);
#endif
#define my_mmap(a,b,c,d,e,f) mmap(a,b,c,d,e,f)
-#ifdef HAVE_GETPAGESIZE
-#define my_getpagesize() getpagesize()
-#else
-/* qnx ? */
-#define my_getpagesize() 8192
-#endif
#define my_munmap(a,b) munmap((a),(b))
#else
@@ -863,16 +858,17 @@ my_bool my_gethwaddr(uchar *to);
#define HAVE_MMAP
#endif
-#ifndef __NETWARE__
-int my_getpagesize(void);
-#else
-#define my_getpagesize() 8192
-#endif
-
void *my_mmap(void *, size_t, int, int, int, my_off_t);
int my_munmap(void *, size_t);
#endif
+/* my_getpagesize */
+#ifdef HAVE_GETPAGESIZE
+#define my_getpagesize() getpagesize()
+#else
+int my_getpagesize(void);
+#endif
+
int my_msync(int, void *, size_t, int);
/* character sets */
diff --git a/include/my_time.h b/include/my_time.h
index 5361c47d57f..14726d3a01d 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_tree.h b/include/my_tree.h
index 03dc9d5c829..be55cc4231e 100644
--- a/include/my_tree.h
+++ b/include/my_tree.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -59,7 +58,8 @@ typedef struct st_tree_element {
typedef struct st_tree {
TREE_ELEMENT *root,null_element;
TREE_ELEMENT **parents[MAX_TREE_HEIGHT];
- uint offset_to_key,elements_in_tree,size_of_element,memory_limit,allocated;
+ uint offset_to_key,elements_in_tree,size_of_element;
+ ulong memory_limit, allocated;
qsort_cmp2 compare;
void *custom_arg;
MEM_ROOT mem_root;
@@ -69,7 +69,7 @@ typedef struct st_tree {
} TREE;
/* Functions on whole tree */
-void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
+void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit,
int size, qsort_cmp2 compare, my_bool with_delete,
tree_element_free free_element, void *custom_arg);
void delete_tree(TREE*);
diff --git a/include/my_user.h b/include/my_user.h
index 2bd4208a34c..0c86d0f90f6 100644
--- a/include/my_user.h
+++ b/include/my_user.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/my_xml.h b/include/my_xml.h
index 82de995e700..0bec16ad3e8 100644
--- a/include/my_xml.h
+++ b/include/my_xml.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/myisam.h b/include/myisam.h
index 95852366251..61b9f39e63b 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/myisammrg.h b/include/myisammrg.h
index de8a36c2d0a..e18d4aef126 100644
--- a/include/myisammrg.h
+++ b/include/myisammrg.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/myisampack.h b/include/myisampack.h
index c92429e4c01..7d4871bd1cb 100644
--- a/include/myisampack.h
+++ b/include/myisampack.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/mysql.h b/include/mysql.h
index f2a82c99fc3..c612bdf175a 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -65,9 +64,9 @@ typedef int my_socket;
#endif /* my_socket_defined */
#endif /* _global_h */
+#include "mysql_version.h"
#include "mysql_com.h"
#include "mysql_time.h"
-#include "mysql_version.h"
#include "typelib.h"
#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 1bbb3cf1737..93409b2ea1d 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/mysql_embed.h b/include/mysql_embed.h
index 311d95eda73..7416283d83d 100644
--- a/include/mysql_embed.h
+++ b/include/mysql_embed.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/mysql_h.ic b/include/mysql_h.ic
index 0e546acef92..5a9daee6f9f 100644
--- a/include/mysql_h.ic
+++ b/include/mysql_h.ic
@@ -36,6 +36,8 @@ enum mysql_status;
typedef struct st_mysql_rows MYSQL_ROWS;
# 24 "my_list.h"
typedef struct st_list LIST;
+# 35 "my_alloc.h"
+typedef struct st_mem_root MEM_ROOT;
# 251 "mysql.h"
typedef struct st_mysql MYSQL;
# 653 "mysql.h"
@@ -60,7 +62,7 @@ typedef struct st_mysql_stmt MYSQL_STMT;
typedef struct character_set MY_CHARSET_INFO;
# 180 "mysql_com.h"
typedef struct st_net NET;
-# 21 "typelib.h"
+# 23 "typelib.h"
typedef struct st_typelib TYPELIB;
# 170 "mysql_com.h"
typedef struct st_vio Vio;
@@ -76,8 +78,6 @@ typedef int my_socket;
typedef unsigned long long int my_ulonglong;
# 144 "mysql.h"
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
-# 35 "my_alloc.h"
-typedef struct st_mem_root MEM_ROOT;
# 145 "mysql.h"
typedef struct st_mysql_data MYSQL_DATA;
# 750 "mysql.h"
@@ -419,7 +419,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
my_bool report_error;
my_bool return_errno;
};
-# 21 "typelib.h"
+# 23 "typelib.h"
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib
{
unsigned int count;
@@ -575,6 +575,7 @@ enum mysql_enum_shutdown_level
SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)),
SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1),
SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1),
+ KILL_QUERY = 254,
KILL_CONNECTION = 255,
};
# 154 "mysql.h"
@@ -630,9 +631,11 @@ enum mysql_status
extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
# 416 "mysql_com.h"
extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
+# 33 "typelib.h"
+extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from);
# 411 "mysql_com.h"
extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st);
-# 28 "typelib.h"
+# 30 "typelib.h"
extern int find_type(char * x, TYPELIB * typelib, unsigned int);
# 425 "mysql_com.h"
extern void get_salt_from_password(unsigned char * res, char const * password);
@@ -640,7 +643,7 @@ extern void get_salt_from_password(unsigned char * res, char const * password);
extern void get_salt_from_password_323(unsigned long int * res, char const * password);
# 431 "mysql_com.h"
extern char * get_tty_password(char * opt_message);
-# 30 "typelib.h"
+# 32 "typelib.h"
extern char const * get_type(TYPELIB * typelib, unsigned int);
# 413 "mysql_com.h"
extern void hash_password(unsigned long int * to, char const * password, unsigned int);
@@ -668,7 +671,7 @@ extern void make_password_from_salt_323(char * to, unsigned long int const * sal
extern void make_scrambled_password(char * to, char const * password);
# 414 "mysql_com.h"
extern void make_scrambled_password_323(char * to, char const * password);
-# 29 "typelib.h"
+# 31 "typelib.h"
extern void make_type(char * to, unsigned int, TYPELIB * typelib);
# 437 "mysql_com.h"
extern int modify_defaults_file(char const * file_location, char const * option, char const * option_value, char const * section_name, int);
@@ -962,5 +965,5 @@ extern void randominit(struct rand_struct *, unsigned long int, unsigned long in
extern void scramble(char * to, char const * message, char const * password);
# 415 "mysql_com.h"
extern void scramble_323(char * to, char const * message, char const * password);
-# 32 "typelib.h"
+# 35 "typelib.h"
extern TYPELIB sql_protocol_typelib;
diff --git a/include/mysql_time.h b/include/mysql_time.h
index 5f4fc12c005..0a3f17a81fb 100644
--- a/include/mysql_time.h
+++ b/include/mysql_time.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/mysys_err.h b/include/mysys_err.h
index 341e6950792..877b9c41856 100644
--- a/include/mysys_err.h
+++ b/include/mysys_err.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/queues.h b/include/queues.h
index 02ab768198e..14f0922e19c 100644
--- a/include/queues.h
+++ b/include/queues.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/raid.h b/include/raid.h
index c840afcbaab..8f0dc47d465 100644
--- a/include/raid.h
+++ b/include/raid.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/rijndael.h b/include/rijndael.h
index e286c89cbdc..89963a85c99 100644
--- a/include/rijndael.h
+++ b/include/rijndael.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/sha1.h b/include/sha1.h
index e67acbf96b8..e476456a9bd 100644
--- a/include/sha1.h
+++ b/include/sha1.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/sql_common.h b/include/sql_common.h
index 29a9cbd4b08..a549fe6aeb5 100644
--- a/include/sql_common.h
+++ b/include/sql_common.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/sslopt-case.h b/include/sslopt-case.h
index ea23c31aa82..adb9a28503b 100644
--- a/include/sslopt-case.h
+++ b/include/sslopt-case.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/sslopt-longopts.h b/include/sslopt-longopts.h
index 0435ddb815a..d4aaf50992d 100644
--- a/include/sslopt-longopts.h
+++ b/include/sslopt-longopts.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/sslopt-vars.h b/include/sslopt-vars.h
index 7204145fc28..3369f870db2 100644
--- a/include/sslopt-vars.h
+++ b/include/sslopt-vars.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/t_ctype.h b/include/t_ctype.h
index 3e190977e6c..15600019cd6 100644
--- a/include/t_ctype.h
+++ b/include/t_ctype.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/thr_alarm.h b/include/thr_alarm.h
index 7a10d6886ce..db3091fb8d0 100644
--- a/include/thr_alarm.h
+++ b/include/thr_alarm.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/include/thr_lock.h b/include/thr_lock.h
index 251d8e7c9cf..966522fe3e3 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -122,6 +121,7 @@ typedef struct st_thr_lock {
void (*get_status)(void*, int); /* When one gets a lock */
void (*copy_status)(void*,void*);
void (*update_status)(void*); /* Before release of write */
+ void (*restore_status)(void*); /* Before release of read */
my_bool (*check_status)(void *);
} THR_LOCK;
diff --git a/include/typelib.h b/include/typelib.h
index 4d6a90ad51e..75d170e59d3 100644
--- a/include/typelib.h
+++ b/include/typelib.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,6 +17,8 @@
#ifndef _typelib_h
#define _typelib_h
+#include "my_alloc.h"
+
typedef struct st_typelib { /* Different types saved here */
unsigned int count; /* How many types */
const char *name; /* Name of typelib */
@@ -28,6 +29,7 @@ typedef struct st_typelib { /* Different types saved here */
extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
extern TYPELIB sql_protocol_typelib;
diff --git a/include/violite.h b/include/violite.h
index a9651120002..4122e581a0f 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/innobase/CMakeLists.txt b/innobase/CMakeLists.txt
index c244364a800..21b9210a73e 100755
--- a/innobase/CMakeLists.txt
+++ b/innobase/CMakeLists.txt
@@ -1,41 +1,26 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
#SET(CMAKE_CXX_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX")
#SET(CMAKE_C_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS(-DMYSQL_SERVER -D_WIN32 -DWIN32 -D_LIB)
# Bug#19424 - InnoDB: Possibly a memory overrun of the buffer being freed (64-bit Visual C)
-# Removing Win64 compiler optimizations for all innodb files.
+# Removing Win64 compiler optimizations for all innodb/mem/* files.
IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
- SET_SOURCE_FILES_PROPERTIES(btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
- buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
- data/data0data.c data/data0type.c
- dict/dict0boot.c dict/dict0crea.c dict/dict0dict.c dict/dict0load.c dict/dict0mem.c
- dyn/dyn0dyn.c
- eval/eval0eval.c eval/eval0proc.c
- fil/fil0fil.c
- fsp/fsp0fsp.c
- fut/fut0fut.c fut/fut0lst.c
- ha/ha0ha.c ha/hash0hash.c
- ibuf/ibuf0ibuf.c
- pars/lexyy.c pars/pars0grm.c pars/pars0opt.c pars/pars0pars.c pars/pars0sym.c
- lock/lock0lock.c
- log/log0log.c log/log0recv.c
- mach/mach0data.c
- mem/mem0mem.c mem/mem0pool.c
- mtr/mtr0log.c mtr/mtr0mtr.c
- os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c
- page/page0cur.c page/page0page.c
- que/que0que.c
- read/read0read.c
- rem/rem0cmp.c rem/rem0rec.c
- row/row0ins.c row/row0mysql.c row/row0purge.c row/row0row.c row/row0sel.c row/row0uins.c
- row/row0umod.c row/row0undo.c row/row0upd.c row/row0vers.c
- srv/srv0que.c srv/srv0srv.c srv/srv0start.c
- sync/sync0arr.c sync/sync0rw.c sync/sync0sync.c
- thr/thr0loc.c
- trx/trx0purge.c trx/trx0rec.c trx/trx0roll.c trx/trx0rseg.c
- trx/trx0sys.c trx/trx0trx.c trx/trx0undo.c
- usr/usr0sess.c
- ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c
+ SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c
PROPERTIES COMPILE_FLAGS -Od)
ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
@@ -71,7 +56,3 @@ ADD_LIBRARY(innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
usr/usr0sess.c
ut/ut0byte.c ut/ut0dbg.c ut/ut0mem.c ut/ut0rnd.c ut/ut0ut.c )
-# (Bug#19424) Removing Win64 compiler optimizations innobase project.
-IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
- SET_TARGET_PROPERTIES(innobase PROPERTIES COMPILE_FLAGS "/Od")
-ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
diff --git a/innobase/Makefile.am b/innobase/Makefile.am
index 10e793396d8..82bd44ba207 100644
--- a/innobase/Makefile.am
+++ b/innobase/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2004, 2006 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/innobase/btr/Makefile.am b/innobase/btr/Makefile.am
index ed61facb695..6b09b289cdc 100644
--- a/innobase/btr/Makefile.am
+++ b/innobase/btr/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libbtr.a
libbtr_a_SOURCES = btr0btr.c btr0cur.c btr0pcur.c btr0sea.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/buf/Makefile.am b/innobase/buf/Makefile.am
index 3f56c8b02d7..946d5a2e5c2 100644
--- a/innobase/buf/Makefile.am
+++ b/innobase/buf/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libbuf.a
libbuf_a_SOURCES = buf0buf.c buf0flu.c buf0lru.c buf0rea.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/data/Makefile.am b/innobase/data/Makefile.am
index eeb6f129de0..6f9407d40e5 100644
--- a/innobase/data/Makefile.am
+++ b/innobase/data/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libdata.a
libdata_a_SOURCES = data0data.c data0type.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/dict/Makefile.am b/innobase/dict/Makefile.am
index 0034d2f8f1e..15cacca6f58 100644
--- a/innobase/dict/Makefile.am
+++ b/innobase/dict/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,3 +21,6 @@ libdict_a_SOURCES = dict0boot.c dict0crea.c dict0dict.c dict0load.c\
dict0mem.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index fffe851bc52..ba03e1f5e41 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -27,6 +27,9 @@ Created 1/8/1996 Heikki Tuuri
#include "que0que.h"
#include "rem0cmp.h"
+/* Implement isspace() in a locale-independent way. (Bug #24299) */
+#define ib_isspace(c) strchr(" \v\f\t\r\n", c)
+
dict_sys_t* dict_sys = NULL; /* the dictionary system */
rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve
@@ -2406,7 +2409,7 @@ dict_accept(
*success = FALSE;
- while (isspace(*ptr)) {
+ while (ib_isspace(*ptr)) {
ptr++;
}
@@ -2451,7 +2454,7 @@ dict_scan_id(
*id = NULL;
- while (isspace(*ptr)) {
+ while (ib_isspace(*ptr)) {
ptr++;
}
@@ -2482,7 +2485,7 @@ dict_scan_id(
len++;
}
} else {
- while (!isspace(*ptr) && *ptr != '(' && *ptr != ')'
+ while (!ib_isspace(*ptr) && *ptr != '(' && *ptr != ')'
&& (accept_also_dot || *ptr != '.')
&& *ptr != ',' && *ptr != '\0') {
@@ -2512,12 +2515,12 @@ dict_scan_id(
if (heap && !quote) {
/* EMS MySQL Manager sometimes adds characters 0xA0 (in
latin1, a 'non-breakable space') to the end of a table name.
- But isspace(0xA0) is not true, which confuses our foreign key
- parser. After the UTF-8 conversion in ha_innodb.cc, bytes 0xC2
- and 0xA0 are at the end of the string.
+ After the UTF-8 conversion in ha_innodb.cc, bytes 0xC2
+ and 0xA0 are at the end of the string, and ib_isspace()
+ does not work for multi-byte UTF-8 characters.
- TODO: we should lex the string using thd->charset_info, and
- my_isspace(). Only after that, convert id names to UTF-8. */
+ In MySQL 5.1 we lex the string using thd->charset_info, and
+ my_isspace(). This workaround is not needed there. */
b = (byte*)(*id);
id_len = strlen((char*) b);
@@ -3006,11 +3009,11 @@ loop:
ut_a(success);
- if (!isspace(*ptr) && *ptr != '"' && *ptr != '`') {
+ if (!ib_isspace(*ptr) && *ptr != '"' && *ptr != '`') {
goto loop;
}
- while (isspace(*ptr)) {
+ while (ib_isspace(*ptr)) {
ptr++;
}
@@ -3052,7 +3055,7 @@ loop:
goto loop;
}
- if (!isspace(*ptr)) {
+ if (!ib_isspace(*ptr)) {
goto loop;
}
@@ -3140,7 +3143,7 @@ col_loop1:
}
ptr = dict_accept(ptr, "REFERENCES", &success);
- if (!success || !isspace(*ptr)) {
+ if (!success || !ib_isspace(*ptr)) {
dict_foreign_report_syntax_err(name, start_of_latest_foreign,
ptr);
return(DB_CANNOT_ADD_CONSTRAINT);
@@ -3527,7 +3530,7 @@ loop:
ptr = dict_accept(ptr, "DROP", &success);
- if (!isspace(*ptr)) {
+ if (!ib_isspace(*ptr)) {
goto loop;
}
diff --git a/innobase/dyn/Makefile.am b/innobase/dyn/Makefile.am
index ec33a3c18a9..57d9a25e481 100644
--- a/innobase/dyn/Makefile.am
+++ b/innobase/dyn/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libdyn.a
libdyn_a_SOURCES = dyn0dyn.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/eval/Makefile.am b/innobase/eval/Makefile.am
index aebffb91be3..6c2b05d8b7a 100644
--- a/innobase/eval/Makefile.am
+++ b/innobase/eval/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libeval.a
libeval_a_SOURCES = eval0eval.c eval0proc.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/fil/Makefile.am b/innobase/fil/Makefile.am
index dc0baff7d1a..0a85ceb5b86 100644
--- a/innobase/fil/Makefile.am
+++ b/innobase/fil/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libfil.a
libfil_a_SOURCES = fil0fil.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/fsp/Makefile.am b/innobase/fsp/Makefile.am
index edf06bda0d6..7818cdafc1b 100644
--- a/innobase/fsp/Makefile.am
+++ b/innobase/fsp/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,3 +21,6 @@ noinst_LIBRARIES = libfsp.a
libfsp_a_SOURCES = fsp0fsp.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/fut/Makefile.am b/innobase/fut/Makefile.am
index 839fdb1580e..ffe9835a023 100644
--- a/innobase/fut/Makefile.am
+++ b/innobase/fut/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libfut.a
libfut_a_SOURCES = fut0fut.c fut0lst.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/ha/Makefile.am b/innobase/ha/Makefile.am
index 121bafe167d..696cad0b203 100644
--- a/innobase/ha/Makefile.am
+++ b/innobase/ha/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libha.a
libha_a_SOURCES = ha0ha.c hash0hash.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/ibuf/Makefile.am b/innobase/ibuf/Makefile.am
index fb813d38ee5..42adda9a4ef 100644
--- a/innobase/ibuf/Makefile.am
+++ b/innobase/ibuf/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/innobase/include/Makefile.am b/innobase/include/Makefile.am
index b83aee06680..8a7efad64f9 100644
--- a/innobase/include/Makefile.am
+++ b/innobase/include/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2004-2005 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/innobase/include/hash0hash.h b/innobase/include/hash0hash.h
index 51315e40875..13f46760698 100644
--- a/innobase/include/hash0hash.h
+++ b/innobase/include/hash0hash.h
@@ -18,6 +18,9 @@ typedef struct hash_cell_struct hash_cell_t;
typedef void* hash_node_t;
+/* Fix Bug #13859: symbol collision between imap/mysql */
+#define hash_create hash0_create
+
/*****************************************************************
Creates a hash table with >= n array cells. The actual number
of cells is chosen to be a prime number slightly bigger than n. */
diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h
index 7d8740db044..9e28fabe491 100644
--- a/innobase/include/row0mysql.h
+++ b/innobase/include/row0mysql.h
@@ -19,6 +19,8 @@ Created 9/17/2000 Heikki Tuuri
#include "btr0pcur.h"
#include "trx0types.h"
+extern ibool row_rollback_on_timeout;
+
typedef struct row_prebuilt_struct row_prebuilt_t;
/***********************************************************************
diff --git a/innobase/include/sync0rw.h b/innobase/include/sync0rw.h
index 741f9500612..4cd26ba1921 100644
--- a/innobase/include/sync0rw.h
+++ b/innobase/include/sync0rw.h
@@ -61,8 +61,12 @@ Creates, or rather, initializes an rw-lock object in a specified memory
location (which must be appropriately aligned). The rw-lock is initialized
to the non-locked state. Explicit freeing of the rw-lock with rw_lock_free
is necessary only if the memory block containing it is freed. */
-#define rw_lock_create(L) rw_lock_create_func((L), __FILE__, __LINE__, #L)
-
+#ifdef UNIV_DEBUG
+# define rw_lock_create(L) rw_lock_create_func((L), #L, __FILE__, __LINE__)
+#else /* UNIV_DEBUG */
+# define rw_lock_create(L) rw_lock_create_func((L), __FILE__, __LINE__)
+#endif /* UNIV_DEBUG */
+
/*=====================*/
/**********************************************************************
Creates, or rather, initializes an rw-lock object in a specified memory
@@ -74,9 +78,11 @@ void
rw_lock_create_func(
/*================*/
rw_lock_t* lock, /* in: pointer to memory */
+#ifdef UNIV_DEBUG
+ const char* cmutex_name, /* in: mutex name */
+#endif /* UNIV_DEBUG */
const char* cfile_name, /* in: file name where created */
- ulint cline, /* in: file line where created */
- const char* cmutex_name); /* in: mutex name */
+ ulint cline); /* in: file line where created */
/**********************************************************************
Calling this function is obligatory only if the memory buffer containing
the rw-lock is freed. Removes an rw-lock object from the global list. The
diff --git a/innobase/include/sync0sync.h b/innobase/include/sync0sync.h
index 9893921c5d2..769c2a98244 100644
--- a/innobase/include/sync0sync.h
+++ b/innobase/include/sync0sync.h
@@ -39,7 +39,11 @@ location (which must be appropriately aligned). The mutex is initialized
in the reset state. Explicit freeing of the mutex with mutex_free is
necessary only if the memory block containing it is freed. */
-#define mutex_create(M) mutex_create_func((M), __FILE__, __LINE__, #M)
+#ifdef UNIV_DEBUG
+# define mutex_create(M) mutex_create_func((M), #M, __FILE__, __LINE__)
+#else
+# define mutex_create(M) mutex_create_func((M), __FILE__, __LINE__)
+#endif
/*===================*/
/**********************************************************************
Creates, or rather, initializes a mutex object in a specified memory
@@ -51,9 +55,11 @@ void
mutex_create_func(
/*==============*/
mutex_t* mutex, /* in: pointer to memory */
+#ifdef UNIV_DEBUG
+ const char* cmutex_name, /* in: mutex name */
+#endif /* UNIV_DEBUG */
const char* cfile_name, /* in: file name where created */
- ulint cline, /* in: file line where created */
- const char* cmutex_name); /* in: mutex name */
+ ulint cline); /* in: file line where created */
/**********************************************************************
Calling this function is obligatory only if the memory buffer containing
the mutex is freed. Removes a mutex object from the mutex list. The mutex
@@ -479,15 +485,17 @@ struct mutex_struct {
ulint cline; /* Line where created */
ulint magic_n;
#ifndef UNIV_HOTBACKUP
- ulong count_using; /* count of times mutex used */
- ulong count_spin_loop; /* count of spin loops */
- ulong count_spin_rounds; /* count of spin rounds */
- ulong count_os_wait; /* count of os_wait */
- ulong count_os_yield; /* count of os_wait */
- ulonglong lspent_time; /* mutex os_wait timer msec */
- ulonglong lmax_spent_time; /* mutex os_wait timer msec */
- const char* cmutex_name;/* mutex name */
- ulint mutex_type;/* 0 - usual mutex 1 - rw_lock mutex */
+ ulong count_os_wait; /* count of os_wait */
+# ifdef UNIV_DEBUG
+ ulong count_using; /* count of times mutex used */
+ ulong count_spin_loop; /* count of spin loops */
+ ulong count_spin_rounds; /* count of spin rounds */
+ ulong count_os_yield; /* count of os_wait */
+ ulonglong lspent_time; /* mutex os_wait timer msec */
+ ulonglong lmax_spent_time; /* mutex os_wait timer msec */
+ const char* cmutex_name;/* mutex name */
+ ulint mutex_type;/* 0 - usual mutex 1 - rw_lock mutex */
+# endif /* UNIV_DEBUG */
#endif /* !UNIV_HOTBACKUP */
};
diff --git a/innobase/include/sync0sync.ic b/innobase/include/sync0sync.ic
index b3fde61db5e..a32a82d6e8b 100644
--- a/innobase/include/sync0sync.ic
+++ b/innobase/include/sync0sync.ic
@@ -250,9 +250,9 @@ mutex_enter_func(
/* Note that we do not peek at the value of lock_word before trying
the atomic test_and_set; we could peek, and possibly save time. */
-#ifndef UNIV_HOTBACKUP
+#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
mutex->count_using++;
-#endif /* UNIV_HOTBACKUP */
+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
if (!mutex_test_and_set(mutex))
{
diff --git a/innobase/lock/Makefile.am b/innobase/lock/Makefile.am
index 549eb2604e3..4c6caa49853 100644
--- a/innobase/lock/Makefile.am
+++ b/innobase/lock/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = liblock.a
liblock_a_SOURCES = lock0lock.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/log/Makefile.am b/innobase/log/Makefile.am
index 2dbaf93e6d9..a40572a64da 100644
--- a/innobase/log/Makefile.am
+++ b/innobase/log/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = liblog.a
liblog_a_SOURCES = log0log.c log0recv.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c
index 113d237b535..c1ceb9791f2 100644
--- a/innobase/log/log0recv.c
+++ b/innobase/log/log0recv.c
@@ -33,6 +33,7 @@ Created 9/20/1997 Heikki Tuuri
#include "btr0cur.h"
#include "dict0boot.h"
#include "fil0fil.h"
+#include "sync0sync.h"
#ifdef UNIV_HOTBACKUP
/* This is set to FALSE if the backup was originally taken with the
@@ -2969,6 +2970,15 @@ recv_recovery_from_checkpoint_finish(void)
#ifndef UNIV_LOG_DEBUG
recv_sys_free();
#endif
+
+#ifdef UNIV_SYNC_DEBUG
+ /* Wait for a while so that created threads have time to suspend
+ themselves before we switch the latching order checks on */
+ os_thread_sleep(1000000);
+
+ /* Switch latching order checks on in sync0sync.c */
+ sync_order_checks_on = TRUE;
+#endif
if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO) {
/* Rollback the uncommitted transactions which have no user
session */
diff --git a/innobase/mach/Makefile.am b/innobase/mach/Makefile.am
index ce827c8033f..1a59cb3e4d7 100644
--- a/innobase/mach/Makefile.am
+++ b/innobase/mach/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libmach.a
libmach_a_SOURCES = mach0data.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/mem/Makefile.am b/innobase/mem/Makefile.am
index 10b7771b580..598dbb96124 100644
--- a/innobase/mem/Makefile.am
+++ b/innobase/mem/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,3 +22,6 @@ libmem_a_SOURCES = mem0mem.c mem0pool.c
EXTRA_DIST = mem0dbg.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/mtr/Makefile.am b/innobase/mtr/Makefile.am
index 1e93a34ce23..80eb7c907be 100644
--- a/innobase/mtr/Makefile.am
+++ b/innobase/mtr/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libmtr.a
libmtr_a_SOURCES = mtr0mtr.c mtr0log.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/os/Makefile.am b/innobase/os/Makefile.am
index 3b09a10efb5..d5c45eba54e 100644
--- a/innobase/os/Makefile.am
+++ b/innobase/os/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003-2004 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index 075005c3611..5e5c4b19eb0 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -1718,7 +1718,7 @@ os_file_set_size(
}
/* Print about progress for each 100 MB written */
- if ((current_size + n_bytes) / (ib_longlong)(100 * 1024 * 1024)
+ if ((ib_longlong) (current_size + n_bytes) / (ib_longlong)(100 * 1024 * 1024)
!= current_size / (ib_longlong)(100 * 1024 * 1024)) {
fprintf(stderr, " %lu00",
diff --git a/innobase/page/Makefile.am b/innobase/page/Makefile.am
index 2e260787438..1a5b202a2c9 100644
--- a/innobase/page/Makefile.am
+++ b/innobase/page/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libpage.a
libpage_a_SOURCES = page0page.c page0cur.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/pars/Makefile.am b/innobase/pars/Makefile.am
index 2356f330486..b10796c3d5e 100644
--- a/innobase/pars/Makefile.am
+++ b/innobase/pars/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,3 +22,6 @@ noinst_HEADERS = pars0grm.h
libpars_a_SOURCES = pars0grm.c lexyy.c pars0opt.c pars0pars.c pars0sym.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/que/Makefile.am b/innobase/que/Makefile.am
index d9c046b4f4c..73f3fb07af4 100644
--- a/innobase/que/Makefile.am
+++ b/innobase/que/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libque.a
libque_a_SOURCES = que0que.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/read/Makefile.am b/innobase/read/Makefile.am
index 7edf2a5a2e1..1e56a9716c3 100644
--- a/innobase/read/Makefile.am
+++ b/innobase/read/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libread.a
libread_a_SOURCES = read0read.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/rem/Makefile.am b/innobase/rem/Makefile.am
index e2b2fdaf669..1026172b815 100644
--- a/innobase/rem/Makefile.am
+++ b/innobase/rem/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = librem.a
librem_a_SOURCES = rem0rec.c rem0cmp.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/row/Makefile.am b/innobase/row/Makefile.am
index bd09f9a237d..6c1f960055d 100644
--- a/innobase/row/Makefile.am
+++ b/innobase/row/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,3 +21,6 @@ librow_a_SOURCES = row0ins.c row0mysql.c row0purge.c row0row.c row0sel.c\
row0uins.c row0umod.c row0undo.c row0upd.c row0vers.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index efbb93ba9f5..4bc5f39359c 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -35,6 +35,9 @@ Created 9/17/2000 Heikki Tuuri
/* A dummy variable used to fool the compiler */
ibool row_mysql_identically_false = FALSE;
+/* Provide optional 4.x backwards compatibility for 5.0 and above */
+ibool row_rollback_on_timeout = FALSE;
+
/* List of tables we should drop in background. ALTER TABLE in MySQL requires
that the table handler can drop the table in background when there are no
queries to it any more. Protected by the kernel mutex. */
@@ -514,7 +517,9 @@ handle_new_error:
return(TRUE);
} else if (err == DB_DEADLOCK
- || err == DB_LOCK_TABLE_FULL) {
+ || err == DB_LOCK_TABLE_FULL
+ || (err == DB_LOCK_WAIT_TIMEOUT
+ && row_rollback_on_timeout)) {
/* Roll back the whole transaction; this resolution was added
to version 3.23.43 */
@@ -522,6 +527,10 @@ handle_new_error:
} else if (err == DB_OUT_OF_FILE_SPACE
|| err == DB_LOCK_WAIT_TIMEOUT) {
+
+ ut_ad(!(err == DB_LOCK_WAIT_TIMEOUT
+ && row_rollback_on_timeout));
+
if (savept) {
/* Roll back the latest, possibly incomplete
insertion or update */
diff --git a/innobase/srv/Makefile.am b/innobase/srv/Makefile.am
index 752683b82b8..e0b5b911b04 100644
--- a/innobase/srv/Makefile.am
+++ b/innobase/srv/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003-2004 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libsrv.a
libsrv_a_SOURCES = srv0srv.c srv0que.c srv0start.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
index b41dcbe44cd..5f8707a661c 100644
--- a/innobase/srv/srv0start.c
+++ b/innobase/srv/srv0start.c
@@ -1554,17 +1554,6 @@ innobase_start_or_create_for_mysql(void)
srv_was_started = TRUE;
srv_is_being_started = FALSE;
-#ifdef UNIV_DEBUG
- /* Wait a while so that the created threads have time to suspend
- themselves before we switch sync debugging on; otherwise a thread may
- execute mutex_enter() before the checks are on, and mutex_exit() after
- the checks are on, which will cause an assertion failure in sync
- debug. */
-
- os_thread_sleep(3000000);
-#endif
- sync_order_checks_on = TRUE;
-
if (trx_doublewrite == NULL) {
/* Create the doublewrite buffer to a new tablespace */
diff --git a/innobase/sync/Makefile.am b/innobase/sync/Makefile.am
index c95955a733b..7cf274b64e8 100644
--- a/innobase/sync/Makefile.am
+++ b/innobase/sync/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003-2004 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libsync.a
libsync_a_SOURCES = sync0arr.c sync0rw.c sync0sync.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/sync/sync0rw.c b/innobase/sync/sync0rw.c
index 050de73db9e..629331d6049 100644
--- a/innobase/sync/sync0rw.c
+++ b/innobase/sync/sync0rw.c
@@ -89,9 +89,11 @@ void
rw_lock_create_func(
/*================*/
rw_lock_t* lock, /* in: pointer to memory */
+#ifdef UNIV_DEBUG
+ const char* cmutex_name, /* in: mutex name */
+#endif /* UNIV_DEBUG */
const char* cfile_name, /* in: file name where created */
- ulint cline, /* in: file line where created */
- const char* cmutex_name) /* in: mutex name */
+ ulint cline) /* in: file line where created */
{
/* If this is the very first time a synchronization
object is created, then the following call initializes
@@ -102,10 +104,10 @@ rw_lock_create_func(
lock->mutex.cfile_name = cfile_name;
lock->mutex.cline = cline;
-#ifndef UNIV_HOTBACKUP
- lock->mutex.cmutex_name = cmutex_name;
- lock->mutex.mutex_type = 1;
-#endif /* !UNIV_HOTBACKUP */
+#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
+ lock->mutex.cmutex_name = cmutex_name;
+ lock->mutex.mutex_type = 1;
+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
rw_lock_set_waiters(lock, 0);
rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED);
diff --git a/innobase/sync/sync0sync.c b/innobase/sync/sync0sync.c
index 95bf83dce79..25b7a5588d9 100644
--- a/innobase/sync/sync0sync.c
+++ b/innobase/sync/sync0sync.c
@@ -202,9 +202,11 @@ void
mutex_create_func(
/*==============*/
mutex_t* mutex, /* in: pointer to memory */
+#ifdef UNIV_DEBUG
+ const char* cmutex_name, /* in: mutex name */
+#endif /* UNIV_DEBUG */
const char* cfile_name, /* in: file name where created */
- ulint cline, /* in: file line where created */
- const char* cmutex_name) /* in: mutex name */
+ ulint cline) /* in: file line where created */
{
#if defined(_WIN32) && defined(UNIV_CAN_USE_X86_ASSEMBLER)
mutex_reset_lock_word(mutex);
@@ -223,6 +225,8 @@ mutex_create_func(
mutex->cfile_name = cfile_name;
mutex->cline = cline;
#ifndef UNIV_HOTBACKUP
+ mutex->count_os_wait = 0;
+# ifdef UNIV_DEBUG
mutex->cmutex_name= cmutex_name;
mutex->count_using= 0;
mutex->mutex_type= 0;
@@ -230,8 +234,8 @@ mutex_create_func(
mutex->lmax_spent_time= 0;
mutex->count_spin_loop= 0;
mutex->count_spin_rounds= 0;
- mutex->count_os_wait= 0;
mutex->count_os_yield= 0;
+# endif /* UNIV_DEBUG */
#endif /* !UNIV_HOTBACKUP */
/* Check that lock_word is aligned; this is important on Intel */
@@ -378,13 +382,13 @@ mutex_spin_wait(
{
ulint index; /* index of the reserved wait cell */
ulint i; /* spin round count */
-#ifndef UNIV_HOTBACKUP
+#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
ib_longlong lstart_time = 0, lfinish_time; /* for timing os_wait */
ulint ltime_diff;
ulint sec;
ulint ms;
uint timer_started = 0;
-#endif /* !UNIV_HOTBACKUP */
+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
ut_ad(mutex);
mutex_loop:
@@ -398,10 +402,10 @@ mutex_loop:
memory word. */
spin_loop:
-#ifndef UNIV_HOTBACKUP
+#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
mutex_spin_wait_count++;
mutex->count_spin_loop++;
-#endif /* !UNIV_HOTBACKUP */
+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
while (mutex_get_lock_word(mutex) != 0 && i < SYNC_SPIN_ROUNDS)
{
@@ -415,7 +419,7 @@ spin_loop:
if (i == SYNC_SPIN_ROUNDS)
{
-#ifndef UNIV_HOTBACKUP
+#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
mutex->count_os_yield++;
if (timed_mutexes == 1 && timer_started==0)
{
@@ -423,7 +427,7 @@ spin_loop:
lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1;
}
-#endif /* !UNIV_HOTBACKUP */
+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
os_thread_yield();
}
@@ -436,9 +440,9 @@ spin_loop:
mutex_spin_round_count += i;
-#ifndef UNIV_HOTBACKUP
+#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
mutex->count_spin_rounds += i;
-#endif /* !UNIV_HOTBACKUP */
+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
if (mutex_test_and_set(mutex) == 0)
{
@@ -522,6 +526,7 @@ Now there is no risk of infinite wait on the event. */
#ifndef UNIV_HOTBACKUP
mutex->count_os_wait++;
+# ifdef UNIV_DEBUG
/*
!!!!! Sometimes os_wait can be called without os_thread_yield
*/
@@ -532,13 +537,14 @@ Now there is no risk of infinite wait on the event. */
lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1;
}
+# endif /* UNIV_DEBUG */
#endif /* !UNIV_HOTBACKUP */
sync_array_wait_event(sync_primary_wait_array, index);
goto mutex_loop;
finish_timing:
-#ifndef UNIV_HOTBACKUP
+#if defined UNIV_DEBUG && !defined UNIV_HOTBACKUP
if (timed_mutexes == 1 && timer_started==1)
{
ut_usectime(&sec, &ms);
@@ -551,7 +557,7 @@ finish_timing:
mutex->lmax_spent_time= ltime_diff;
}
}
-#endif /* !UNIV_HOTBACKUP */
+#endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */
return;
}
diff --git a/innobase/thr/Makefile.am b/innobase/thr/Makefile.am
index 62c39492c07..febcdf3e1a3 100644
--- a/innobase/thr/Makefile.am
+++ b/innobase/thr/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libthr.a
libthr_a_SOURCES = thr0loc.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/trx/Makefile.am b/innobase/trx/Makefile.am
index 9e2b3c398e3..f9722454ef5 100644
--- a/innobase/trx/Makefile.am
+++ b/innobase/trx/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,3 +21,6 @@ libtrx_a_SOURCES = trx0purge.c trx0rec.c trx0roll.c trx0rseg.c\
trx0sys.c trx0trx.c trx0undo.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/trx/trx0roll.c b/innobase/trx/trx0roll.c
index fdfb7428129..bf8b9fd1939 100644
--- a/innobase/trx/trx0roll.c
+++ b/innobase/trx/trx0roll.c
@@ -129,9 +129,27 @@ trx_rollback_for_mysql(
}
trx->op_info = "rollback";
+
+ /* If we are doing the XA recovery of prepared transactions, then
+ the transaction object does not have an InnoDB session object, and we
+ set a dummy session that we use for all MySQL transactions. */
- err = trx_general_rollback_for_mysql(trx, FALSE, NULL);
+ mutex_enter(&kernel_mutex);
+
+ if (trx->sess == NULL) {
+ /* Open a dummy session */
+
+ if (!trx_dummy_sess) {
+ trx_dummy_sess = sess_open();
+ }
+ trx->sess = trx_dummy_sess;
+ }
+
+ mutex_exit(&kernel_mutex);
+
+ err = trx_general_rollback_for_mysql(trx, FALSE, NULL);
+
trx->op_info = "";
return(err);
diff --git a/innobase/trx/trx0trx.c b/innobase/trx/trx0trx.c
index 2637b28ef90..4dc826e5947 100644
--- a/innobase/trx/trx0trx.c
+++ b/innobase/trx/trx0trx.c
@@ -1601,7 +1601,25 @@ trx_commit_for_mysql(
ut_a(trx);
trx->op_info = "committing";
+
+ /* If we are doing the XA recovery of prepared transactions, then
+ the transaction object does not have an InnoDB session object, and we
+ set the dummy session that we use for all MySQL transactions. */
+
+ mutex_enter(&kernel_mutex);
+
+ if (trx->sess == NULL) {
+ /* Open a dummy session */
+
+ if (!trx_dummy_sess) {
+ trx_dummy_sess = sess_open();
+ }
+
+ trx->sess = trx_dummy_sess;
+ }
+ mutex_exit(&kernel_mutex);
+
trx_start_if_not_started(trx);
mutex_enter(&kernel_mutex);
diff --git a/innobase/usr/Makefile.am b/innobase/usr/Makefile.am
index bdcc832a76e..ea485022f71 100644
--- a/innobase/usr/Makefile.am
+++ b/innobase/usr/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libusr.a
libusr_a_SOURCES = usr0sess.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/innobase/ut/Makefile.am b/innobase/ut/Makefile.am
index 2fdbb99e0f3..41ba85f5836 100644
--- a/innobase/ut/Makefile.am
+++ b/innobase/ut/Makefile.am
@@ -1,10 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-# & Innobase Oy
+# Copyright (C) 2001, 2003 MySQL AB & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,3 +20,6 @@ noinst_LIBRARIES = libut.a
libut_a_SOURCES = ut0byte.c ut0dbg.c ut0mem.c ut0rnd.c ut0ut.c
EXTRA_PROGRAMS =
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt
index d12b6ca6c10..db4368a3534 100755
--- a/libmysql/CMakeLists.txt
+++ b/libmysql/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# Need to set USE_TLS, since __declspec(thread) approach to thread local
# storage does not work properly in DLLs.
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_TLS")
diff --git a/libmysql/Makefile.am b/libmysql/Makefile.am
index 5e6c60a007b..38680c98d53 100644
--- a/libmysql/Makefile.am
+++ b/libmysql/Makefile.am
@@ -111,3 +111,6 @@ do-lib-dist:
echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \
gtar cvzf $$dir.tar.gz $$dir; \
cd $$dir; gmake
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/libmysql/client_settings.h b/libmysql/client_settings.h
index e0f093aa7c9..b67fbbc03af 100644
--- a/libmysql/client_settings.h
+++ b/libmysql/client_settings.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 5af172603ad..7e1ff92bce5 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -175,6 +175,9 @@ void STDCALL mysql_server_end()
#ifdef EMBEDDED_LIBRARY
end_embedded_server();
#endif
+ finish_client_errs();
+ vio_end();
+
/* If library called my_init(), free memory allocated by it */
if (!org_my_init_done)
{
@@ -185,10 +188,11 @@ void STDCALL mysql_server_end()
#endif
}
else
+ {
+ free_charsets();
mysql_thread_end();
- finish_client_errs();
- free_charsets();
- vio_end();
+ }
+
mysql_client_init= org_my_init_done= 0;
#ifdef EMBEDDED_SERVER
if (stderror_file)
@@ -2038,6 +2042,13 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
DBUG_RETURN(1);
}
+ /*
+ Reset the last error in any case: that would clear the statement
+ if the previous prepare failed.
+ */
+ stmt->last_errno= 0;
+ stmt->last_error[0]= '\0';
+
if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE)
{
/* This is second prepare with another statement */
@@ -2051,23 +2062,24 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
*/
stmt->bind_param_done= stmt->bind_result_done= FALSE;
stmt->param_count= stmt->field_count= 0;
- stmt->last_errno= 0;
- stmt->last_error[0]= '\0';
free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC));
int4store(buff, stmt->stmt_id);
+
/*
+ Close statement in server
+
If there was a 'use' result from another statement, or from
mysql_use_result it won't be freed in mysql_stmt_free_result and
we should get 'Commands out of sync' here.
*/
+ stmt->state= MYSQL_STMT_INIT_DONE;
if (stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))
{
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
mysql->net.sqlstate);
DBUG_RETURN(1);
}
- stmt->state= MYSQL_STMT_INIT_DONE;
}
if (stmt_command(mysql, COM_STMT_PREPARE, query, length, stmt))
diff --git a/libmysql_r/Makefile.am b/libmysql_r/Makefile.am
index 062acccda07..a8014b37bed 100644
--- a/libmysql_r/Makefile.am
+++ b/libmysql_r/Makefile.am
@@ -42,3 +42,6 @@ link_sources:
@LN_CP_F@ $$d/$$f $$f; \
done; \
done
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am
index cdd71724166..330e72e5507 100644
--- a/libmysqld/Makefile.am
+++ b/libmysqld/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2001-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc
index 078243a6d5e..e6f35aa33a0 100644
--- a/libmysqld/emb_qcache.cc
+++ b/libmysqld/emb_qcache.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libmysqld/emb_qcache.h b/libmysqld/emb_qcache.h
index 6201058ce56..5c5209902a1 100644
--- a/libmysqld/emb_qcache.h
+++ b/libmysqld/emb_qcache.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libmysqld/embedded_priv.h b/libmysqld/embedded_priv.h
index 5ba6f34a2eb..369b344d4bd 100644
--- a/libmysqld/embedded_priv.h
+++ b/libmysqld/embedded_priv.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libmysqld/examples/Makefile.am b/libmysqld/examples/Makefile.am
index 01429378dfb..f30951a5d81 100644
--- a/libmysqld/examples/Makefile.am
+++ b/libmysqld/examples/Makefile.am
@@ -2,8 +2,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/libmysqld/examples/test-run b/libmysqld/examples/test-run
index c7434488259..aea5b13eaba 100755
--- a/libmysqld/examples/test-run
+++ b/libmysqld/examples/test-run
@@ -10,7 +10,7 @@
top_builddir=../..
mysql_test_dir=$top_builddir/mysql-test
examples=$top_builddir/libmysqld/examples
-mysqltest=$examples/mysqltest
+mysqltest=$examples/mysqltest_embedded
datadir=$mysql_test_dir/var/master-data
test_data_dir=test
gdb=0
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 97bcb9d87ca..2eea24e364c 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -198,6 +198,7 @@ static my_bool emb_read_prepare_result(MYSQL *mysql, MYSQL_STMT *stmt)
stmt->stmt_id= thd->client_stmt_id;
stmt->param_count= thd->client_param_count;
stmt->field_count= 0;
+ mysql->warning_count= thd->total_warn_count;
if (thd->first_data)
{
@@ -306,7 +307,11 @@ int emb_read_binary_rows(MYSQL_STMT *stmt)
{
MYSQL_DATA *data;
if (!(data= emb_read_rows(stmt->mysql, 0, 0)))
+ {
+ set_stmt_errmsg(stmt, stmt->mysql->net.last_error,
+ stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate);
return 1;
+ }
stmt->result= *data;
my_free((char *) data, MYF(0));
set_stmt_errmsg(stmt, stmt->mysql->net.last_error,
@@ -585,6 +590,7 @@ void *create_embedded_thd(int client_flag)
thd->set_time();
thd->init_for_queries();
thd->client_capabilities= client_flag;
+ thd->real_id= (pthread_t) thd;
thd->db= NULL;
thd->db_length= 0;
@@ -770,6 +776,8 @@ MYSQL_DATA *THD::alloc_new_dataset()
static void write_eof_packet(THD *thd)
{
+ if (!thd->mysql) // bootstrap file handling
+ return;
/*
The following test should never be true, but it's better to do it
because if 'is_fatal_error' is set the server is not going to execute
@@ -1029,6 +1037,9 @@ void Protocol_simple::prepare_for_resend()
MYSQL_DATA *data= thd->cur_data;
DBUG_ENTER("send_data");
+ if (!thd->mysql) // bootstrap file handling
+ DBUG_VOID_RETURN;
+
data->rows++;
if (!(cur= (MYSQL_ROWS *)alloc_root(alloc, sizeof(MYSQL_ROWS)+(field_count + 1) * sizeof(char *))))
{
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c
index 58a22686199..eb47a045669 100644
--- a/libmysqld/libmysqld.c
+++ b/libmysqld/libmysqld.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/man/Makefile.am b/man/Makefile.am
index 5753259fd3d..2d47a1ad9ba 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/CMakeLists.txt b/myisam/CMakeLists.txt
index 3ba7aba4555..28d06254e8a 100755
--- a/myisam/CMakeLists.txt
+++ b/myisam/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/myisam/Makefile.am b/myisam/Makefile.am
index 081d7facf3a..c8a87bc207b 100644
--- a/myisam/Makefile.am
+++ b/myisam/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c
index 19f0ef77136..cdf16d9181c 100644
--- a/myisam/ft_boolean_search.c
+++ b/myisam/ft_boolean_search.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_eval.c b/myisam/ft_eval.c
index 34248c69f20..0e554395c84 100644
--- a/myisam/ft_eval.c
+++ b/myisam/ft_eval.c
@@ -1,8 +1,7 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
diff --git a/myisam/ft_eval.h b/myisam/ft_eval.h
index 5501fe9d34b..9acc1a60d09 100644
--- a/myisam/ft_eval.h
+++ b/myisam/ft_eval.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_nlq_search.c b/myisam/ft_nlq_search.c
index 8460db61a36..f63735b7e68 100644
--- a/myisam/ft_nlq_search.c
+++ b/myisam/ft_nlq_search.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_parser.c b/myisam/ft_parser.c
index 6e79696bd6e..6c79f9249cf 100644
--- a/myisam/ft_parser.c
+++ b/myisam/ft_parser.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_static.c b/myisam/ft_static.c
index e221950f445..85a51ee6382 100644
--- a/myisam/ft_static.c
+++ b/myisam/ft_static.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_stem.c b/myisam/ft_stem.c
index 846d5d2247f..dfc132fcfa9 100644
--- a/myisam/ft_stem.c
+++ b/myisam/ft_stem.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_stopwords.c b/myisam/ft_stopwords.c
index ab51afb0e82..1b7933e85ca 100644
--- a/myisam/ft_stopwords.c
+++ b/myisam/ft_stopwords.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_test1.c b/myisam/ft_test1.c
index 14be9aa1e8c..4810c8a37aa 100644
--- a/myisam/ft_test1.c
+++ b/myisam/ft_test1.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_test1.h b/myisam/ft_test1.h
index e360244057b..4b466818460 100644
--- a/myisam/ft_test1.h
+++ b/myisam/ft_test1.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ft_update.c b/myisam/ft_update.c
index 7fa86094144..ece3f722d58 100644
--- a/myisam/ft_update.c
+++ b/myisam/ft_update.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/ftdefs.h b/myisam/ftdefs.h
index 91c679a1e58..0cd5d20892b 100644
--- a/myisam/ftdefs.h
+++ b/myisam/ftdefs.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/fulltext.h b/myisam/fulltext.h
index d8c74d4e94b..bea2fa96969 100644
--- a/myisam/fulltext.h
+++ b/myisam/fulltext.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_cache.c b/myisam/mi_cache.c
index 8dee068c50e..59c9b2c8812 100644
--- a/myisam/mi_cache.c
+++ b/myisam/mi_cache.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_changed.c b/myisam/mi_changed.c
index c2ab5568eba..7422f995dd0 100644
--- a/myisam/mi_changed.c
+++ b/myisam/mi_changed.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_check.c b/myisam/mi_check.c
index 06fdd3bff4c..444dc2a1da9 100644
--- a/myisam/mi_check.c
+++ b/myisam/mi_check.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -251,11 +250,12 @@ static int check_k_link(MI_CHECK *param, register MI_INFO *info, uint nr)
my_off_t next_link;
uint block_size=(nr+1)*MI_MIN_KEY_BLOCK_LENGTH;
ha_rows records;
- char llbuff[21],*buff;
+ char llbuff[21], llbuff2[21], *buff;
DBUG_ENTER("check_k_link");
+ DBUG_PRINT("enter", ("block_size: %u", block_size));
if (param->testflag & T_VERBOSE)
- printf("block_size %4d:",block_size);
+ printf("block_size %4u:", block_size); /* purecov: tested */
next_link=info->s->state.key_del[nr];
records= (ha_rows) (info->state->key_file_length / block_size);
@@ -265,14 +265,46 @@ static int check_k_link(MI_CHECK *param, register MI_INFO *info, uint nr)
DBUG_RETURN(1);
if (param->testflag & T_VERBOSE)
printf("%16s",llstr(next_link,llbuff));
- if (next_link > info->state->key_file_length ||
- next_link & (info->s->blocksize-1))
+
+ /* Key blocks must lay within the key file length entirely. */
+ if (next_link + block_size > info->state->key_file_length)
+ {
+ /* purecov: begin tested */
+ mi_check_print_error(param, "Invalid key block position: %s "
+ "key block size: %u file_length: %s",
+ llstr(next_link, llbuff), block_size,
+ llstr(info->state->key_file_length, llbuff2));
DBUG_RETURN(1);
+ /* purecov: end */
+ }
+
+ /* Key blocks must be aligned at MI_MIN_KEY_BLOCK_LENGTH. */
+ if (next_link & (MI_MIN_KEY_BLOCK_LENGTH - 1))
+ {
+ /* purecov: begin tested */
+ mi_check_print_error(param, "Mis-aligned key block: %s "
+ "minimum key block length: %u",
+ llstr(next_link, llbuff), MI_MIN_KEY_BLOCK_LENGTH);
+ DBUG_RETURN(1);
+ /* purecov: end */
+ }
+
+ /*
+ Read the key block with MI_MIN_KEY_BLOCK_LENGTH to find next link.
+ If the key cache block size is smaller than block_size, we can so
+ avoid unecessary eviction of cache block.
+ */
if (!(buff=key_cache_read(info->s->key_cache,
info->s->kfile, next_link, DFLT_INIT_HITS,
- (byte*) info->buff,
- myisam_block_size, block_size, 1)))
+ (byte*) info->buff, MI_MIN_KEY_BLOCK_LENGTH,
+ MI_MIN_KEY_BLOCK_LENGTH, 1)))
+ {
+ /* purecov: begin tested */
+ mi_check_print_error(param, "key cache read error for block: %s",
+ llstr(next_link,llbuff));
DBUG_RETURN(1);
+ /* purecov: end */
+ }
next_link=mi_sizekorr(buff);
records--;
param->key_file_blocks+=block_size;
@@ -556,17 +588,37 @@ static int chk_index_down(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
ha_checksum *key_checksum, uint level)
{
char llbuff[22],llbuff2[22];
- if (page > info->state->key_file_length || (page & (info->s->blocksize -1)))
- {
- my_off_t max_length=my_seek(info->s->kfile,0L,MY_SEEK_END,MYF(0));
- mi_check_print_error(param,"Wrong pagepointer: %s at page: %s",
- llstr(page,llbuff),llstr(page,llbuff2));
-
- if (page+info->s->blocksize > max_length)
+ DBUG_ENTER("chk_index_down");
+
+ /* Key blocks must lay within the key file length entirely. */
+ if (page + keyinfo->block_length > info->state->key_file_length)
+ {
+ /* purecov: begin tested */
+ /* Give it a chance to fit in the real file size. */
+ my_off_t max_length= my_seek(info->s->kfile, 0L, MY_SEEK_END, MYF(0));
+ mi_check_print_error(param, "Invalid key block position: %s "
+ "key block size: %u file_length: %s",
+ llstr(page, llbuff), keyinfo->block_length,
+ llstr(info->state->key_file_length, llbuff2));
+ if (page + keyinfo->block_length > max_length)
goto err;
- info->state->key_file_length=(max_length &
- ~ (my_off_t) (info->s->blocksize-1));
+ /* Fix the remebered key file length. */
+ info->state->key_file_length= (max_length &
+ ~ (my_off_t) (keyinfo->block_length - 1));
+ /* purecov: end */
}
+
+ /* Key blocks must be aligned at MI_MIN_KEY_BLOCK_LENGTH. */
+ if (page & (MI_MIN_KEY_BLOCK_LENGTH - 1))
+ {
+ /* purecov: begin tested */
+ mi_check_print_error(param, "Mis-aligned key block: %s "
+ "minimum key block length: %u",
+ llstr(page, llbuff), MI_MIN_KEY_BLOCK_LENGTH);
+ goto err;
+ /* purecov: end */
+ }
+
if (!_mi_fetch_keypage(info,keyinfo,page, DFLT_INIT_HITS,buff,0))
{
mi_check_print_error(param,"Can't read key from filepos: %s",
@@ -577,9 +629,12 @@ static int chk_index_down(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
if (chk_index(param,info,keyinfo,page,buff,keys,key_checksum,level))
goto err;
- return 0;
+ DBUG_RETURN(0);
+
+ /* purecov: begin tested */
err:
- return 1;
+ DBUG_RETURN(1);
+ /* purecov: end */
}
@@ -1758,6 +1813,12 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
MI_STATE_INFO old_state;
DBUG_ENTER("mi_sort_index");
+ /* cannot sort index files with R-tree indexes */
+ for (key= 0,keyinfo= &share->keyinfo[0]; key < share->base.keys ;
+ key++,keyinfo++)
+ if (keyinfo->key_alg == HA_KEY_ALG_RTREE)
+ return 0;
+
if (!(param->testflag & T_SILENT))
printf("- Sorting index for MyISAM-table '%s'\n",name);
@@ -1850,6 +1911,8 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
char llbuff[22];
DBUG_ENTER("sort_one_index");
+ /* cannot walk over R-tree indices */
+ DBUG_ASSERT(keyinfo->key_alg != HA_KEY_ALG_RTREE);
new_page_pos=param->new_file_pos;
param->new_file_pos+=keyinfo->block_length;
diff --git a/myisam/mi_checksum.c b/myisam/mi_checksum.c
index 33a51068fb0..711e87c1547 100644
--- a/myisam/mi_checksum.c
+++ b/myisam/mi_checksum.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_close.c b/myisam/mi_close.c
index 8a4f6ee7f5d..81d32be468a 100644
--- a/myisam/mi_close.c
+++ b/myisam/mi_close.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index c6e9da03adf..d46672444e0 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -428,8 +427,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
key_segs)
share.state.rec_per_key_part[key_segs-1]=1L;
length+=key_length;
- keydef->block_length= MI_BLOCK_SIZE(length-real_length_diff,
- pointer,MI_MAX_KEYPTR_SIZE);
+ keydef->block_length= (uint16) MI_BLOCK_SIZE(length-real_length_diff,
+ pointer,MI_MAX_KEYPTR_SIZE);
if (keydef->block_length > MI_MAX_KEY_BLOCK_LENGTH ||
length >= MI_MAX_KEY_BUFF)
{
@@ -816,18 +815,19 @@ uint mi_get_pointer_length(ulonglong file_length, uint def)
if (file_length) /* If not default */
{
#ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS
- if (file_length >= (longlong) 1 << 56)
+ if (file_length >= ULL(1) << 56)
def=8;
+ else
#endif
- if (file_length >= (longlong) 1 << 48)
+ if (file_length >= ULL(1) << 48)
def=7;
- if (file_length >= (longlong) 1 << 40)
+ else if (file_length >= ULL(1) << 40)
def=6;
- else if (file_length >= (longlong) 1 << 32)
+ else if (file_length >= ULL(1) << 32)
def=5;
- else if (file_length >= (1L << 24))
+ else if (file_length >= ULL(1) << 24)
def=4;
- else if (file_length >= (1L << 16))
+ else if (file_length >= ULL(1) << 16)
def=3;
else
def=2;
diff --git a/myisam/mi_dbug.c b/myisam/mi_dbug.c
index ddc8a403a33..07c314c43e6 100644
--- a/myisam/mi_dbug.c
+++ b/myisam/mi_dbug.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_delete.c b/myisam/mi_delete.c
index 471420d99c0..409930ff7fb 100644
--- a/myisam/mi_delete.c
+++ b/myisam/mi_delete.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_delete_all.c b/myisam/mi_delete_all.c
index a30abb95070..0769415fbdf 100644
--- a/myisam/mi_delete_all.c
+++ b/myisam/mi_delete_all.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_delete_table.c b/myisam/mi_delete_table.c
index 2fba31cf8be..dcd32d8f1f0 100644
--- a/myisam/mi_delete_table.c
+++ b/myisam/mi_delete_table.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c
index 6590e6bd92b..11f51f08d23 100644
--- a/myisam/mi_dynrec.c
+++ b/myisam/mi_dynrec.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -81,7 +80,7 @@ int _mi_write_blob_record(MI_INFO *info, const byte *record)
#endif
if (!(rec_buff=(byte*) my_alloca(reclength)))
{
- my_errno=ENOMEM;
+ my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(-1);
}
reclength2= _mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
@@ -115,7 +114,7 @@ int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const byte *record)
#endif
if (!(rec_buff=(byte*) my_alloca(reclength)))
{
- my_errno=ENOMEM;
+ my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */
return(-1);
}
reclength=_mi_rec_pack(info,rec_buff+ALIGN_SIZE(MI_MAX_DYN_BLOCK_HEADER),
@@ -1029,9 +1028,11 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
{
uint size_length=rec_length- mi_portable_sizeof_char_ptr;
ulong blob_length=_mi_calc_blob_length(size_length,from);
- if ((ulong) (from_end-from) - size_length < blob_length ||
- min_pack_length > (uint) (from_end -(from+size_length+blob_length)))
- goto err;
+ ulong from_left= (ulong) (from_end - from);
+ if (from_left < size_length ||
+ from_left - size_length < blob_length ||
+ from_left - size_length - blob_length < min_pack_length)
+ goto err;
memcpy((byte*) to,(byte*) from,(size_t) size_length);
from+=size_length;
memcpy_fixed((byte*) to+size_length,(byte*) &from,sizeof(char*));
diff --git a/myisam/mi_extra.c b/myisam/mi_extra.c
index 7c0dd13b870..5eb5010ad8c 100644
--- a/myisam/mi_extra.c
+++ b/myisam/mi_extra.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_info.c b/myisam/mi_info.c
index bdece9c2ee3..0435269ed6d 100644
--- a/myisam/mi_info.c
+++ b/myisam/mi_info.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_key.c b/myisam/mi_key.c
index c6f9799bd67..b203286d544 100644
--- a/myisam/mi_key.c
+++ b/myisam/mi_key.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_keycache.c b/myisam/mi_keycache.c
index d595be3a684..bb465dbecce 100644
--- a/myisam/mi_keycache.c
+++ b/myisam/mi_keycache.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_locking.c b/myisam/mi_locking.c
index 36b793363c5..42c21b915a5 100644
--- a/myisam/mi_locking.c
+++ b/myisam/mi_locking.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -326,6 +325,15 @@ void mi_update_status(void* param)
}
}
+
+void mi_restore_status(void *param)
+{
+ MI_INFO *info= (MI_INFO*) param;
+ info->state= &info->s->state.state;
+ info->append_insert_at_end= 0;
+}
+
+
void mi_copy_status(void* to,void *from)
{
((MI_INFO*) to)->state= &((MI_INFO*) from)->save_state;
diff --git a/myisam/mi_log.c b/myisam/mi_log.c
index 13842c56828..2672a9dacd6 100644
--- a/myisam/mi_log.c
+++ b/myisam/mi_log.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_open.c b/myisam/mi_open.c
index bf20eb3f270..7d66f27cae5 100644
--- a/myisam/mi_open.c
+++ b/myisam/mi_open.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -323,7 +322,13 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
for (j=0 ; j < share->keyinfo[i].keysegs; j++,pos++)
{
disk_pos=mi_keyseg_read(disk_pos, pos);
-
+ if (pos->flag & HA_BLOB_PART &&
+ ! (share->options & (HA_OPTION_COMPRESS_RECORD |
+ HA_OPTION_PACK_RECORD)))
+ {
+ my_errno= HA_ERR_CRASHED;
+ goto err;
+ }
if (pos->type == HA_KEYTYPE_TEXT ||
pos->type == HA_KEYTYPE_VARTEXT1 ||
pos->type == HA_KEYTYPE_VARTEXT2)
@@ -441,6 +446,13 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
offset+=share->rec[i].length;
}
share->rec[i].type=(int) FIELD_LAST; /* End marker */
+ if (offset > share->base.reclength)
+ {
+ /* purecov: begin inspected */
+ my_errno= HA_ERR_CRASHED;
+ goto err;
+ /* purecov: end */
+ }
if (! lock_error)
{
@@ -505,6 +517,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags)
share->lock.get_status=mi_get_status;
share->lock.copy_status=mi_copy_status;
share->lock.update_status=mi_update_status;
+ share->lock.restore_status= mi_restore_status;
share->lock.check_status=mi_check_status;
}
}
@@ -1264,13 +1277,30 @@ int mi_enable_indexes(MI_INFO *info)
RETURN
0 indexes are not disabled
1 all indexes are disabled
- [2 non-unique indexes are disabled - NOT YET IMPLEMENTED]
+ 2 non-unique indexes are disabled
*/
int mi_indexes_are_disabled(MI_INFO *info)
{
MYISAM_SHARE *share= info->s;
- return (! mi_is_any_key_active(share->state.key_map) && share->base.keys);
+ /*
+ No keys or all are enabled. keys is the number of keys. Left shifted
+ gives us only one bit set. When decreased by one, gives us all all bits
+ up to this one set and it gets unset.
+ */
+ if (!share->base.keys ||
+ (mi_is_all_keys_active(share->state.key_map, share->base.keys)))
+ return 0;
+
+ /* All are disabled */
+ if (mi_is_any_key_active(share->state.key_map))
+ return 1;
+
+ /*
+ We have keys. Some enabled, some disabled.
+ Don't check for any non-unique disabled but return directly 2
+ */
+ return 2;
}
diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c
index 13898df0466..6df64ae2cd4 100644
--- a/myisam/mi_packrec.c
+++ b/myisam/mi_packrec.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,7 +19,10 @@
#define IS_CHAR ((uint) 32768) /* Bit if char (not offset) in tree */
-#if INT_MAX > 65536L
+/* Some definitions to keep in sync with myisampack.c */
+#define HEAD_LENGTH 32 /* Length of fixed header */
+
+#if INT_MAX > 32767
#define BITS_SAVED 32
#define MAX_QUICK_TABLE_BITS 9 /* Because we may shift in 24 bits */
#else
@@ -42,6 +44,7 @@
{ bits-=(bit+1); break; } \
pos+= *pos
+/* Size in uint16 of a Huffman tree for byte compression of 256 byte values. */
#define OFFSET_TABLE_SIZE 512
static uint read_huff_table(MI_BIT_BUFF *bit_buff,MI_DECODE_TREE *decode_tree,
@@ -134,7 +137,7 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
uint16 *decode_table,*tmp_buff;
ulong elements,intervall_length;
char *disk_cache,*intervall_buff;
- uchar header[32];
+ uchar header[HEAD_LENGTH];
MYISAM_SHARE *share=info->s;
MI_BIT_BUFF bit_buff;
DBUG_ENTER("_mi_read_pack_info");
@@ -152,12 +155,13 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
my_errno=HA_ERR_END_OF_FILE;
goto err0;
}
+ /* Only the first three bytes of magic number are independent of version. */
if (memcmp((byte*) header, (byte*) myisam_pack_file_magic, 3))
{
my_errno=HA_ERR_WRONG_IN_RECORD;
goto err0;
}
- share->pack.version= header[3];
+ share->pack.version= header[3]; /* fourth byte of magic number */
share->pack.header_length= uint4korr(header+4);
share->min_pack_length=(uint) uint4korr(header+8);
share->max_pack_length=(uint) uint4korr(header+12);
@@ -173,7 +177,22 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
share->base.min_block_length=share->min_pack_length+1;
if (share->min_pack_length > 254)
share->base.min_block_length+=2;
-
+ DBUG_PRINT("info", ("fixed header length: %u", HEAD_LENGTH));
+ DBUG_PRINT("info", ("total header length: %lu", share->pack.header_length));
+ DBUG_PRINT("info", ("pack file version: %u", share->pack.version));
+ DBUG_PRINT("info", ("min pack length: %lu", share->min_pack_length));
+ DBUG_PRINT("info", ("max pack length: %lu", share->max_pack_length));
+ DBUG_PRINT("info", ("elements of all trees: %lu", elements));
+ DBUG_PRINT("info", ("distinct values bytes: %lu", intervall_length));
+ DBUG_PRINT("info", ("number of code trees: %u", trees));
+ DBUG_PRINT("info", ("bytes for record lgt: %u", share->pack.ref_length));
+ DBUG_PRINT("info", ("record pointer length: %u", rec_reflength));
+
+ /*
+ Memory segment #1:
+ - Decode tree heads
+ - Distinct column values
+ */
if (!(share->decode_trees=(MI_DECODE_TREE*)
my_malloc((uint) (trees*sizeof(MI_DECODE_TREE)+
intervall_length*sizeof(byte)),
@@ -181,11 +200,19 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
goto err0;
intervall_buff=(byte*) (share->decode_trees+trees);
+ /*
+ Memory segment #2:
+ - Decode tables
+ - Quick decode tables
+ - Temporary decode table
+ - Compressed data file header cache
+ This segment will be reallocated after construction of the tables.
+ */
length=(uint) (elements*2+trees*(1 << myisam_quick_table_bits));
if (!(share->decode_tables=(uint16*)
- my_malloc((length+OFFSET_TABLE_SIZE)*sizeof(uint16)+
- (uint) (share->pack.header_length+7),
- MYF(MY_WME | MY_ZEROFILL))))
+ my_malloc((length + OFFSET_TABLE_SIZE) * sizeof(uint16) +
+ (uint) (share->pack.header_length - sizeof(header)),
+ MYF(MY_WME | MY_ZEROFILL))))
goto err1;
tmp_buff=share->decode_tables+length;
disk_cache=(byte*) (tmp_buff+OFFSET_TABLE_SIZE);
@@ -198,7 +225,7 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
huff_tree_bits=max_bit(trees ? trees-1 : 0);
init_bit_buffer(&bit_buff, (uchar*) disk_cache,
(uint) (share->pack.header_length-sizeof(header)));
- /* Read new info for each field */
+ /* Read new info for each field */
for (i=0 ; i < share->base.fields ; i++)
{
share->rec[i].base_type=(enum en_fieldtype) get_bits(&bit_buff,5);
@@ -207,17 +234,26 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
share->rec[i].huff_tree=share->decode_trees+(uint) get_bits(&bit_buff,
huff_tree_bits);
share->rec[i].unpack=get_unpack_function(share->rec+i);
+ DBUG_PRINT("info", ("col: %2u type: %2u pack: %u slbits: %2u",
+ i, share->rec[i].base_type, share->rec[i].pack_type,
+ share->rec[i].space_length_bits));
}
skip_to_next_byte(&bit_buff);
+ /*
+ Construct the decoding tables from the file header. Keep track of
+ the used memory.
+ */
decode_table=share->decode_tables;
for (i=0 ; i < trees ; i++)
if (read_huff_table(&bit_buff,share->decode_trees+i,&decode_table,
&intervall_buff,tmp_buff))
goto err3;
+ /* Reallocate the decoding tables to the used size. */
decode_table=(uint16*)
my_realloc((gptr) share->decode_tables,
(uint) ((byte*) decode_table - (byte*) share->decode_tables),
MYF(MY_HOLD_ON_ERROR));
+ /* Fix the table addresses in the tree heads. */
{
long diff=PTR_BYTE_DIFF(decode_table,share->decode_tables);
share->decode_tables=decode_table;
@@ -226,7 +262,7 @@ my_bool _mi_read_pack_info(MI_INFO *info, pbool fix_keys)
diff, uint16*);
}
- /* Fix record-ref-length for keys */
+ /* Fix record-ref-length for keys */
if (fix_keys)
{
for (i=0 ; i < share->base.keys ; i++)
@@ -263,7 +299,23 @@ err0:
}
- /* Read on huff-code-table from datafile */
+/*
+ Read a huff-code-table from datafile.
+
+ SYNOPSIS
+ read_huff_table()
+ bit_buff Bit buffer pointing at start of the
+ decoding table in the file header cache.
+ decode_tree Pointer to the decode tree head.
+ decode_table IN/OUT Address of a pointer to the next free space.
+ intervall_buff IN/OUT Address of a pointer to the next unused values.
+ tmp_buff Buffer for temporary extraction of a full
+ decoding table as read from bit_buff.
+
+ RETURN
+ 0 OK.
+ 1 Error.
+*/
static uint read_huff_table(MI_BIT_BUFF *bit_buff, MI_DECODE_TREE *decode_tree,
uint16 **decode_table, byte **intervall_buff,
@@ -272,19 +324,32 @@ static uint read_huff_table(MI_BIT_BUFF *bit_buff, MI_DECODE_TREE *decode_tree,
uint min_chr,elements,char_bits,offset_bits,size,intervall_length,table_bits,
next_free_offset;
uint16 *ptr,*end;
+ DBUG_ENTER("read_huff_table");
- LINT_INIT(ptr);
if (!get_bits(bit_buff,1))
{
+ /* Byte value compression. */
min_chr=get_bits(bit_buff,8);
elements=get_bits(bit_buff,9);
char_bits=get_bits(bit_buff,5);
offset_bits=get_bits(bit_buff,5);
intervall_length=0;
ptr=tmp_buff;
+ DBUG_PRINT("info", ("byte value compression"));
+ DBUG_PRINT("info", ("minimum byte value: %u", min_chr));
+ DBUG_PRINT("info", ("number of tree nodes: %u", elements));
+ DBUG_PRINT("info", ("bits for values: %u", char_bits));
+ DBUG_PRINT("info", ("bits for tree offsets: %u", offset_bits));
+ if (elements > 256)
+ {
+ DBUG_PRINT("error", ("ERROR: illegal number of tree elements: %u",
+ elements));
+ DBUG_RETURN(1);
+ }
}
else
{
+ /* Distinct column value compression. */
min_chr=0;
elements=get_bits(bit_buff,15);
intervall_length=get_bits(bit_buff,16);
@@ -292,13 +357,28 @@ static uint read_huff_table(MI_BIT_BUFF *bit_buff, MI_DECODE_TREE *decode_tree,
offset_bits=get_bits(bit_buff,5);
decode_tree->quick_table_bits=0;
ptr= *decode_table;
+ DBUG_PRINT("info", ("distinct column value compression"));
+ DBUG_PRINT("info", ("number of tree nodes: %u", elements));
+ DBUG_PRINT("info", ("value buffer length: %u", intervall_length));
+ DBUG_PRINT("info", ("bits for value index: %u", char_bits));
+ DBUG_PRINT("info", ("bits for tree offsets: %u", offset_bits));
}
size=elements*2-2;
+ DBUG_PRINT("info", ("tree size in uint16: %u", size));
+ DBUG_PRINT("info", ("tree size in bytes: %u",
+ size * (uint) sizeof(uint16)));
for (end=ptr+size ; ptr < end ; ptr++)
{
if (get_bit(bit_buff))
+ {
*ptr= (uint16) get_bits(bit_buff,offset_bits);
+ if ((ptr + *ptr >= end) || !*ptr)
+ {
+ DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
+ DBUG_RETURN(1);
+ }
+ }
else
*ptr= (uint16) (IS_CHAR + (get_bits(bit_buff,char_bits) + min_chr));
}
@@ -308,11 +388,15 @@ static uint read_huff_table(MI_BIT_BUFF *bit_buff, MI_DECODE_TREE *decode_tree,
decode_tree->intervalls= *intervall_buff;
if (! intervall_length)
{
- table_bits=find_longest_bitstream(tmp_buff, tmp_buff+OFFSET_TABLE_SIZE);
- if (table_bits == (uint) ~0)
- return 1;
+ /* Byte value compression. ptr started from tmp_buff. */
+ /* Find longest Huffman code from begin to end of tree in bits. */
+ table_bits= find_longest_bitstream(tmp_buff, ptr);
+ if (table_bits >= OFFSET_TABLE_SIZE)
+ DBUG_RETURN(1);
if (table_bits > myisam_quick_table_bits)
table_bits=myisam_quick_table_bits;
+ DBUG_PRINT("info", ("table bits: %u", table_bits));
+
next_free_offset= (1 << table_bits);
make_quick_table(*decode_table,tmp_buff,&next_free_offset,0,table_bits,
table_bits);
@@ -321,105 +405,278 @@ static uint read_huff_table(MI_BIT_BUFF *bit_buff, MI_DECODE_TREE *decode_tree,
}
else
{
+ /* Distinct column value compression. ptr started from *decode_table */
(*decode_table)=end;
+ /*
+ get_bits() moves some bytes to a cache buffer in advance. May need
+ to step back.
+ */
bit_buff->pos-= bit_buff->bits/8;
+ /* Copy the distinct column values from the buffer. */
memcpy(*intervall_buff,bit_buff->pos,(size_t) intervall_length);
(*intervall_buff)+=intervall_length;
bit_buff->pos+=intervall_length;
bit_buff->bits=0;
}
- return 0;
+ DBUG_RETURN(0);
}
+/*
+ Make a quick_table for faster decoding.
+
+ SYNOPSIS
+ make_quick_table()
+ to_table Target quick_table and remaining decode table.
+ decode_table Source Huffman (sub-)tree within tmp_buff.
+ next_free_offset IN/OUT Next free offset from to_table.
+ Starts behind quick_table on the top-level.
+ value Huffman bits found so far.
+ bits Remaining bits to be collected.
+ max_bits Total number of bits to collect (table_bits).
+
+ DESCRIPTION
+
+ The quick table is an array of 16-bit values. There exists one value
+ for each possible code representable by max_bits (table_bits) bits.
+ In most cases table_bits is 9. So there are 512 16-bit values.
+
+ If the high-order bit (16) is set (IS_CHAR) then the array slot for
+ this value is a valid Huffman code for a resulting byte value.
+
+ The low-order 8 bits (1..8) are the resulting byte value.
+
+ Bits 9..14 are the length of the Huffman code for this byte value.
+ This means so many bits from the input stream were needed to
+ represent this byte value. The remaining bits belong to later
+ Huffman codes. This also means that for every Huffman code shorter
+ than table_bits there are multiple entires in the array, which
+ differ just in the unused bits.
+
+ If the high-order bit (16) is clear (0) then the remaining bits are
+ the position of the remaining Huffman decode tree segment behind the
+ quick table.
+
+ RETURN
+ void
+*/
+
static void make_quick_table(uint16 *to_table, uint16 *decode_table,
uint *next_free_offset, uint value, uint bits,
uint max_bits)
{
+ DBUG_ENTER("make_quick_table");
+
+ /*
+ When down the table to the requested maximum, copy the rest of the
+ Huffman table.
+ */
if (!bits--)
{
+ /*
+ Remaining left Huffman tree segment starts behind quick table.
+ Remaining right Huffman tree segment starts behind left segment.
+ */
to_table[value]= (uint16) *next_free_offset;
- *next_free_offset=copy_decode_table(to_table, *next_free_offset,
- decode_table);
- return;
+ /*
+ Re-construct the remaining Huffman tree segment at
+ next_free_offset in to_table.
+ */
+ *next_free_offset= copy_decode_table(to_table, *next_free_offset,
+ decode_table);
+ DBUG_VOID_RETURN;
}
+
+ /* Descent on the left side. Left side bits are clear (0). */
if (!(*decode_table & IS_CHAR))
{
- make_quick_table(to_table,decode_table+ *decode_table,
- next_free_offset,value,bits,max_bits);
+ /* Not a leaf. Follow the pointer. */
+ make_quick_table(to_table, decode_table + *decode_table,
+ next_free_offset, value, bits, max_bits);
}
else
- fill_quick_table(to_table+value,bits,max_bits,(uint) *decode_table);
+ {
+ /*
+ A leaf. A Huffman code is complete. Fill the quick_table
+ array for all possible bit strings starting with this Huffman
+ code.
+ */
+ fill_quick_table(to_table + value, bits, max_bits, (uint) *decode_table);
+ }
+
+ /* Descent on the right side. Right side bits are set (1). */
decode_table++;
value|= (1 << bits);
if (!(*decode_table & IS_CHAR))
{
- make_quick_table(to_table,decode_table+ *decode_table,
- next_free_offset,value,bits,max_bits);
+ /* Not a leaf. Follow the pointer. */
+ make_quick_table(to_table, decode_table + *decode_table,
+ next_free_offset, value, bits, max_bits);
}
else
- fill_quick_table(to_table+value,bits,max_bits,(uint) *decode_table);
- return;
+ {
+ /*
+ A leaf. A Huffman code is complete. Fill the quick_table
+ array for all possible bit strings starting with this Huffman
+ code.
+ */
+ fill_quick_table(to_table + value, bits, max_bits, (uint) *decode_table);
+ }
+
+ DBUG_VOID_RETURN;
}
+/*
+ Fill quick_table for all possible values starting with this Huffman code.
+
+ SYNOPSIS
+ fill_quick_table()
+ table Target quick_table position.
+ bits Unused bits from max_bits.
+ max_bits Total number of bits to collect (table_bits).
+ value The byte encoded by the found Huffman code.
+
+ DESCRIPTION
+
+ Fill the segment (all slots) of the quick_table array with the
+ resulting value for the found Huffman code. There are as many slots
+ as there are combinations representable by the unused bits.
+
+ In most cases we use 9 table bits. Assume a 3-bit Huffman code. Then
+ there are 6 unused bits. Hence we fill 2**6 = 64 slots with the
+ value.
+
+ RETURN
+ void
+*/
+
static void fill_quick_table(uint16 *table, uint bits, uint max_bits,
uint value)
{
uint16 *end;
- value|=(max_bits-bits) << 8;
- for (end=table+ (1 << bits) ;
- table < end ;
- *table++ = (uint16) value | IS_CHAR) ;
+ DBUG_ENTER("fill_quick_table");
+
+ /*
+ Bits 1..8 of value represent the decoded byte value.
+ Bits 9..14 become the length of the Huffman code for this byte value.
+ Bit 16 flags a valid code (IS_CHAR).
+ */
+ value|= (max_bits - bits) << 8 | IS_CHAR;
+
+ for (end= table + (1 << bits); table < end; table++)
+ {
+ *table= (uint16) value;
+ }
+ DBUG_VOID_RETURN;
}
+/*
+ Reconstruct a decode subtree at the target position.
+
+ SYNOPSIS
+ copy_decode_table()
+ to_pos Target quick_table and remaining decode table.
+ offset Next free offset from to_pos.
+ decode_table Source Huffman subtree within tmp_buff.
+
+ NOTE
+ Pointers in the decode tree are relative to the pointers position.
+
+ RETURN
+ next free offset from to_pos.
+*/
+
static uint copy_decode_table(uint16 *to_pos, uint offset,
uint16 *decode_table)
{
- uint prev_offset;
- prev_offset= offset;
+ uint prev_offset= offset;
+ DBUG_ENTER("copy_decode_table");
+ /* Descent on the left side. */
if (!(*decode_table & IS_CHAR))
{
+ /* Set a pointer to the next target node. */
to_pos[offset]=2;
+ /* Copy the left hand subtree there. */
offset=copy_decode_table(to_pos,offset+2,decode_table+ *decode_table);
}
else
{
+ /* Copy the byte value. */
to_pos[offset]= *decode_table;
+ /* Step behind this node. */
offset+=2;
}
- decode_table++;
+ /* Descent on the right side. */
+ decode_table++;
if (!(*decode_table & IS_CHAR))
{
+ /* Set a pointer to the next free target node. */
to_pos[prev_offset+1]=(uint16) (offset-prev_offset-1);
+ /* Copy the right hand subtree to the entry of that node. */
offset=copy_decode_table(to_pos,offset,decode_table+ *decode_table);
}
else
+ {
+ /* Copy the byte value. */
to_pos[prev_offset+1]= *decode_table;
- return offset;
+ }
+ DBUG_RETURN(offset);
}
+/*
+ Find the length of the longest Huffman code in this table in bits.
+
+ SYNOPSIS
+ find_longest_bitstream()
+ table Code (sub-)table start.
+ end End of code table.
+
+ IMPLEMENTATION
+
+ Recursively follow the branch(es) of the code pair on every level of
+ the tree until two byte values (and no branch) are found. Add one to
+ each level when returning back from each recursion stage.
+
+ 'end' is used for error checking only. A clean tree terminates
+ before reaching 'end'. Hence the exact value of 'end' is not too
+ important. However having it higher than necessary could lead to
+ misbehaviour should 'next' jump into the dirty area.
+
+ RETURN
+ length Length of longest Huffman code in bits.
+ >= OFFSET_TABLE_SIZE Error, broken tree. It does not end before 'end'.
+*/
+
static uint find_longest_bitstream(uint16 *table, uint16 *end)
{
- uint length=1,length2;
+ uint length= 1;
+ uint length2;
+
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
- return ~0;
- length=find_longest_bitstream(next, end)+1;
+ {
+ DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
+ return OFFSET_TABLE_SIZE;
+ }
+ length= find_longest_bitstream(next, end) + 1;
}
table++;
if (!(*table & IS_CHAR))
{
uint16 *next= table + *table;
if (next > end || next == table)
- return ~0;
- length2=find_longest_bitstream(table+ *table, end)+1;
+ {
+ DBUG_PRINT("error", ("ERROR: illegal pointer in decode tree"));
+ return OFFSET_TABLE_SIZE;
+ }
+ length2= find_longest_bitstream(next, end) + 1;
length=max(length,length2);
}
return length;
@@ -855,18 +1112,46 @@ static void decode_bytes(MI_COLUMNDEF *rec,MI_BIT_BUFF *bit_buff,uchar *to,
bit_buff->pos+=4;
bits+=32;
}
- /* First use info in quick_table */
+ /*
+ First use info in quick_table.
+
+ The quick table is an array of 16-bit values. There exists one
+ value for each possible code representable by table_bits bits.
+ In most cases table_bits is 9. So there are 512 16-bit values.
+
+ If the high-order bit (16) is set (IS_CHAR) then the array slot
+ for this value is a valid Huffman code for a resulting byte value.
+
+ The low-order 8 bits (1..8) are the resulting byte value.
+
+ Bits 9..14 are the length of the Huffman code for this byte value.
+ This means so many bits from the input stream were needed to
+ represent this byte value. The remaining bits belong to later
+ Huffman codes. This also means that for every Huffman code shorter
+ than table_bits there are multiple entires in the array, which
+ differ just in the unused bits.
+
+ If the high-order bit (16) is clear (0) then the remaining bits are
+ the position of the remaining Huffman decode tree segment behind the
+ quick table.
+ */
low_byte=(uint) (bit_buff->current_byte >> (bits - table_bits)) & table_and;
low_byte=decode_tree->table[low_byte];
if (low_byte & IS_CHAR)
{
+ /*
+ All Huffman codes of less or equal table_bits length are in the
+ quick table. This is one of them.
+ */
*to++ = (low_byte & 255); /* Found char in quick table */
bits-= ((low_byte >> 8) & 31); /* Remove bits used */
}
else
{ /* Map through rest of decode-table */
+ /* This means that the Huffman code must be longer than table_bits. */
pos=decode_tree->table+low_byte;
bits-=table_bits;
+ /* NOTE: decode_bytes_test_bit() is a macro wich contains a break !!! */
for (;;)
{
low_byte=(uint) (bit_buff->current_byte >> (bits-8));
@@ -1092,6 +1377,11 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff,
{
head_length+= read_pack_length((uint) myisam->s->pack.version,
header + head_length, &info->blob_len);
+ /*
+ Ensure that the record buffer is big enough for the compressed
+ record plus all expanded blobs. [We do not have an extra buffer
+ for the resulting blobs. Sigh.]
+ */
if (!(mi_alloc_rec_buff(myisam,info->rec_len + info->blob_len,
rec_buff_p)))
return BLOCK_FATAL_ERROR; /* not enough memory */
diff --git a/myisam/mi_page.c b/myisam/mi_page.c
index d18a10c3cde..eb26cf52ed2 100644
--- a/myisam/mi_page.c
+++ b/myisam/mi_page.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_panic.c b/myisam/mi_panic.c
index 78698d88c54..74c93761b61 100644
--- a/myisam/mi_panic.c
+++ b/myisam/mi_panic.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_preload.c b/myisam/mi_preload.c
index d63399b519d..78729f18424 100644
--- a/myisam/mi_preload.c
+++ b/myisam/mi_preload.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_range.c b/myisam/mi_range.c
index a28aed81aec..6655f5a7de6 100644
--- a/myisam/mi_range.c
+++ b/myisam/mi_range.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -171,6 +170,7 @@ static double _mi_search_pos(register MI_INFO *info,
uchar *keypos,*buff;
double offset;
DBUG_ENTER("_mi_search_pos");
+ LINT_INIT(max_keynr);
if (pos == HA_OFFSET_ERROR)
DBUG_RETURN(0.5);
diff --git a/myisam/mi_rename.c b/myisam/mi_rename.c
index 8380ee1bfad..453808a1c0a 100644
--- a/myisam/mi_rename.c
+++ b/myisam/mi_rename.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rfirst.c b/myisam/mi_rfirst.c
index e30f61801a0..d23bda46b1a 100644
--- a/myisam/mi_rfirst.c
+++ b/myisam/mi_rfirst.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c
index 43be34f6ebb..6323c95ffd7 100644
--- a/myisam/mi_rkey.c
+++ b/myisam/mi_rkey.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rlast.c b/myisam/mi_rlast.c
index 61c3ff58fd5..7805755ab70 100644
--- a/myisam/mi_rlast.c
+++ b/myisam/mi_rlast.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rnext.c b/myisam/mi_rnext.c
index 69bf5c8deae..f6a0a47413e 100644
--- a/myisam/mi_rnext.c
+++ b/myisam/mi_rnext.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rnext_same.c b/myisam/mi_rnext_same.c
index 64d8d9b0baa..3a7004bf47c 100644
--- a/myisam/mi_rnext_same.c
+++ b/myisam/mi_rnext_same.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rprev.c b/myisam/mi_rprev.c
index b787210e037..09802627185 100644
--- a/myisam/mi_rprev.c
+++ b/myisam/mi_rprev.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rrnd.c b/myisam/mi_rrnd.c
index f6a2f021662..d31e6c24a37 100644
--- a/myisam/mi_rrnd.c
+++ b/myisam/mi_rrnd.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rsame.c b/myisam/mi_rsame.c
index 321097744b9..4831ebb3d7c 100644
--- a/myisam/mi_rsame.c
+++ b/myisam/mi_rsame.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_rsamepos.c b/myisam/mi_rsamepos.c
index 35cdd41e297..f78d690f39e 100644
--- a/myisam/mi_rsamepos.c
+++ b/myisam/mi_rsamepos.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_scan.c b/myisam/mi_scan.c
index 90bc3430ba7..87debb67b37 100644
--- a/myisam/mi_scan.c
+++ b/myisam/mi_scan.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_search.c b/myisam/mi_search.c
index 05f8459a4b4..fce720fd904 100644
--- a/myisam/mi_search.c
+++ b/myisam/mi_search.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_static.c b/myisam/mi_static.c
index fc585eb5543..21a25f66b7c 100644
--- a/myisam/mi_static.c
+++ b/myisam/mi_static.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_statrec.c b/myisam/mi_statrec.c
index 5e6ea939eca..f88e5b02bcf 100644
--- a/myisam/mi_statrec.c
+++ b/myisam/mi_statrec.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_test1.c b/myisam/mi_test1.c
index 60225ccc7f3..3540ac0f580 100644
--- a/myisam/mi_test1.c
+++ b/myisam/mi_test1.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -583,7 +582,7 @@ static struct my_option my_long_options[] =
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
- char *argument)
+ char *argument __attribute__((unused)))
{
switch(optid) {
case 'a':
diff --git a/myisam/mi_test2.c b/myisam/mi_test2.c
index 0959769992c..5aa9250cf18 100644
--- a/myisam/mi_test2.c
+++ b/myisam/mi_test2.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_test3.c b/myisam/mi_test3.c
index be4277cc65c..dd798f1a161 100644
--- a/myisam/mi_test3.c
+++ b/myisam/mi_test3.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_unique.c b/myisam/mi_unique.c
index b698968127b..cd47e207d2f 100644
--- a/myisam/mi_unique.c
+++ b/myisam/mi_unique.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/mi_update.c b/myisam/mi_update.c
index 9ddda3f5ea9..bea457d2e9a 100644
--- a/myisam/mi_update.c
+++ b/myisam/mi_update.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -197,7 +196,8 @@ err:
save_errno=my_errno;
if (changed)
key_changed|= HA_STATE_CHANGED;
- if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_RECORD_FILE_FULL)
+ if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_OUT_OF_MEM ||
+ my_errno == HA_ERR_RECORD_FILE_FULL)
{
info->errkey= (int) i;
flag=0;
diff --git a/myisam/mi_write.c b/myisam/mi_write.c
index fb64ec2bb8b..cc17d4c6165 100644
--- a/myisam/mi_write.c
+++ b/myisam/mi_write.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -169,7 +168,7 @@ int mi_write(MI_INFO *info, byte *record)
err:
save_errno=my_errno;
if (my_errno == HA_ERR_FOUND_DUPP_KEY || my_errno == HA_ERR_RECORD_FILE_FULL ||
- my_errno == HA_ERR_NULL_IN_SPATIAL)
+ my_errno == HA_ERR_NULL_IN_SPATIAL || my_errno == HA_ERR_OUT_OF_MEM)
{
if (info->bulk_insert)
{
@@ -583,6 +582,7 @@ int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_off_t new_pos;
MI_KEY_PARAM s_temp;
DBUG_ENTER("mi_split_page");
+ LINT_INIT(after_key);
DBUG_DUMP("buff",(byte*) buff,mi_getint(buff));
if (info->s->keyinfo+info->lastinx == keyinfo)
diff --git a/myisam/myisam_ftdump.c b/myisam/myisam_ftdump.c
index 2be95d11714..914a47a0c73 100644
--- a/myisam/myisam_ftdump.c
+++ b/myisam/myisam_ftdump.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/myisamchk.c b/myisam/myisamchk.c
index e2c8b446322..eab06525cd4 100644
--- a/myisam/myisamchk.c
+++ b/myisam/myisamchk.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/myisamdef.h b/myisam/myisamdef.h
index 12e2c8e4bec..0733073a7ea 100644
--- a/myisam/myisamdef.h
+++ b/myisam/myisamdef.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -732,6 +731,7 @@ int mi_unique_comp(MI_UNIQUEDEF *def, const byte *a, const byte *b,
my_bool null_are_equal);
void mi_get_status(void* param, int concurrent_insert);
void mi_update_status(void* param);
+void mi_restore_status(void* param);
void mi_copy_status(void* to,void *from);
my_bool mi_check_status(void* param);
void mi_disable_non_unique_index(MI_INFO *info, ha_rows rows);
diff --git a/myisam/myisamlog.c b/myisam/myisamlog.c
index 17af4ab34a2..0bcf74d87a4 100644
--- a/myisam/myisamlog.c
+++ b/myisam/myisamlog.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/myisampack.c b/myisam/myisampack.c
index 79359e29a5d..65d35651efa 100644
--- a/myisam/myisampack.c
+++ b/myisam/myisampack.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1105,18 +1104,18 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts)
my_off_t total_count;
char llbuf[32];
- DBUG_PRINT("info", ("column: %3u", count - huff_counts + 1));
+ DBUG_PRINT("info", ("column: %3u", (uint) (count - huff_counts + 1)));
if (verbose >= 2)
- VOID(printf("column: %3u\n", count - huff_counts + 1));
+ VOID(printf("column: %3u\n", (uint) (count - huff_counts + 1)));
if (count->tree_buff)
{
DBUG_PRINT("info", ("number of distinct values: %u",
- (count->tree_pos - count->tree_buff) /
- count->field_length));
+ (uint) ((count->tree_pos - count->tree_buff) /
+ count->field_length)));
if (verbose >= 2)
VOID(printf("number of distinct values: %u\n",
- (count->tree_pos - count->tree_buff) /
- count->field_length));
+ (uint) ((count->tree_pos - count->tree_buff) /
+ count->field_length)));
}
total_count= 0;
for (idx= 0; idx < 256; idx++)
@@ -1965,7 +1964,7 @@ static char *bindigits(ulonglong value, uint bits)
DBUG_ASSERT(idx < sizeof(digits));
while (idx)
- *(ptr++)= '0' + ((value >> (--idx)) & 1);
+ *(ptr++)= '0' + ((char) (value >> (--idx)) & (char) 1);
*ptr= '\0';
return digits;
}
@@ -1995,7 +1994,7 @@ static char *hexdigits(ulonglong value)
DBUG_ASSERT(idx < sizeof(digits));
while (idx)
{
- if ((*(ptr++)= '0' + ((value >> (4 * (--idx))) & 0xf)) > '9')
+ if ((*(ptr++)= '0' + ((char) (value >> (4 * (--idx))) & (char) 0xf)) > '9')
*(ptr - 1)+= 'a' - '9' - 1;
}
*ptr= '\0';
@@ -2280,11 +2279,11 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
{
VOID(fflush(stdout));
VOID(fprintf(stderr, "error: Huffman code too long: %u/%u\n",
- bits, 8 * sizeof(code)));
+ bits, (uint) (8 * sizeof(code))));
errors++;
break;
}
- idx+= code & 1;
+ idx+= (uint) code & 1;
if (idx >= length)
{
VOID(fflush(stdout));
@@ -2923,6 +2922,8 @@ static void flush_bits(void)
bits-= 8;
*file_buffer.pos++= (uchar) (bit_buffer >> bits);
}
+ if (file_buffer.pos >= file_buffer.end)
+ VOID(flush_buffer(~ (ulong) 0));
file_buffer.bits= BITS_SAVED;
file_buffer.bitbucket= 0;
}
diff --git a/myisam/rt_index.c b/myisam/rt_index.c
index 1806476dc39..99080c22644 100644
--- a/myisam/rt_index.c
+++ b/myisam/rt_index.c
@@ -1,10 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin & MySQL Finland AB
- & TCX DataKonsult AB
+/* Copyright (C) 2002-2006 MySQL AB & Ramil Kalimullin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/rt_index.h b/myisam/rt_index.h
index d3fcd934719..20193a1725d 100644
--- a/myisam/rt_index.h
+++ b/myisam/rt_index.h
@@ -1,10 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin & MySQL Finland AB
- & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/rt_key.c b/myisam/rt_key.c
index e2a402fbefd..cb6a82c51f6 100644
--- a/myisam/rt_key.c
+++ b/myisam/rt_key.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/rt_key.h b/myisam/rt_key.h
index df4f8aa03a2..4b129aa18f8 100644
--- a/myisam/rt_key.h
+++ b/myisam/rt_key.h
@@ -1,10 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin & MySQL Finland AB
- & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/rt_mbr.c b/myisam/rt_mbr.c
index 897862c1c9a..1855e24feb0 100644
--- a/myisam/rt_mbr.c
+++ b/myisam/rt_mbr.c
@@ -1,10 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin & MySQL Finland AB
- & TCX DataKonsult AB
+/* Copyright (C) 2002-2004, 2006 MySQL AB & Ramil Kalimullin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/rt_mbr.h b/myisam/rt_mbr.h
index 2153faad2b4..d7ff9548e0d 100644
--- a/myisam/rt_mbr.h
+++ b/myisam/rt_mbr.h
@@ -1,10 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin & MySQL Finland AB
- & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/rt_split.c b/myisam/rt_split.c
index 31a7d09ab4f..9f25ee608d8 100644
--- a/myisam/rt_split.c
+++ b/myisam/rt_split.c
@@ -1,10 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & Alexey Botchkov & MySQL Finland AB
- & TCX DataKonsult AB
+/* Copyright (C) 2002-2005 MySQL AB & Alexey Botchkov
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -188,6 +186,10 @@ static int split_rtree_node(SplitStruct *node, int n_entries,
int next_node;
int i;
SplitStruct *end = node + n_entries;
+ LINT_INIT(a);
+ LINT_INIT(b);
+ LINT_INIT(next);
+ LINT_INIT(next_node);
if (all_size < min_size * 2)
{
diff --git a/myisam/rt_test.c b/myisam/rt_test.c
index 4f04aa11fce..1126266d2f9 100644
--- a/myisam/rt_test.c
+++ b/myisam/rt_test.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/sort.c b/myisam/sort.c
index eebef888e4a..a6b87141b06 100644
--- a/myisam/sort.c
+++ b/myisam/sort.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/sp_defs.h b/myisam/sp_defs.h
index 4cc2267a1bd..11254d16c97 100644
--- a/myisam/sp_defs.h
+++ b/myisam/sp_defs.h
@@ -1,10 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & Ramil Kalimullin & MySQL Finland AB
- & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB & Ramil Kalimullin
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/sp_key.c b/myisam/sp_key.c
index 77cecdc0931..34c96a219c7 100644
--- a/myisam/sp_key.c
+++ b/myisam/sp_key.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisam/sp_test.c b/myisam/sp_test.c
index f0b48dbd5d8..c7226589811 100644
--- a/myisam/sp_test.c
+++ b/myisam/sp_test.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/CMakeLists.txt b/myisammrg/CMakeLists.txt
index 83168f6c60c..03f9230fc30 100755
--- a/myisammrg/CMakeLists.txt
+++ b/myisammrg/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/myisammrg/Makefile.am b/myisammrg/Makefile.am
index 19543927fd2..e1209498167 100644
--- a/myisammrg/Makefile.am
+++ b/myisammrg/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2002, 2005-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_close.c b/myisammrg/myrg_close.c
index 897020c6865..971a83928b1 100644
--- a/myisammrg/myrg_close.c
+++ b/myisammrg/myrg_close.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_create.c b/myisammrg/myrg_create.c
index 7ddb7ecb3b9..db3453e4c74 100644
--- a/myisammrg/myrg_create.c
+++ b/myisammrg/myrg_create.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_def.h b/myisammrg/myrg_def.h
index 00e7950bccf..344bd4edd3c 100644
--- a/myisammrg/myrg_def.h
+++ b/myisammrg/myrg_def.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_delete.c b/myisammrg/myrg_delete.c
index 8b89ed62ac1..f9604f66885 100644
--- a/myisammrg/myrg_delete.c
+++ b/myisammrg/myrg_delete.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_extra.c b/myisammrg/myrg_extra.c
index 30bb46d27d4..1fa3f3178de 100644
--- a/myisammrg/myrg_extra.c
+++ b/myisammrg/myrg_extra.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_info.c b/myisammrg/myrg_info.c
index ba840ac444b..7ea2dbf58e3 100644
--- a/myisammrg/myrg_info.c
+++ b/myisammrg/myrg_info.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_locking.c b/myisammrg/myrg_locking.c
index 98e8305b9ce..a07833bc829 100644
--- a/myisammrg/myrg_locking.c
+++ b/myisammrg/myrg_locking.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c
index af10f0da90b..afab21dfa3d 100644
--- a/myisammrg/myrg_open.c
+++ b/myisammrg/myrg_open.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_panic.c b/myisammrg/myrg_panic.c
index ab08b8082c3..0b1b7476873 100644
--- a/myisammrg/myrg_panic.c
+++ b/myisammrg/myrg_panic.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_queue.c b/myisammrg/myrg_queue.c
index 74fdddc7748..1d252207db1 100644
--- a/myisammrg/myrg_queue.c
+++ b/myisammrg/myrg_queue.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_range.c b/myisammrg/myrg_range.c
index aafdf70525c..26aa465e7d1 100644
--- a/myisammrg/myrg_range.c
+++ b/myisammrg/myrg_range.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_rfirst.c b/myisammrg/myrg_rfirst.c
index 9ba07686c47..80736537d02 100644
--- a/myisammrg/myrg_rfirst.c
+++ b/myisammrg/myrg_rfirst.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_rkey.c b/myisammrg/myrg_rkey.c
index f87b264081e..f7b7f082019 100644
--- a/myisammrg/myrg_rkey.c
+++ b/myisammrg/myrg_rkey.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -88,7 +87,7 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key,
mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table;
mi->once_flags|= RRND_PRESERVE_LASTINX;
DBUG_PRINT("info", ("using table no: %d",
- info->current_table - info->open_tables + 1));
+ (int) (info->current_table - info->open_tables + 1)));
DBUG_DUMP("result key", (byte*) mi->lastkey, mi->lastkey_length);
DBUG_RETURN(_myrg_mi_read_record(mi,buf));
}
diff --git a/myisammrg/myrg_rlast.c b/myisammrg/myrg_rlast.c
index 96bb798bd4f..f364bf9b32f 100644
--- a/myisammrg/myrg_rlast.c
+++ b/myisammrg/myrg_rlast.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_rnext.c b/myisammrg/myrg_rnext.c
index 0929c63fc1d..de1aa4df4b6 100644
--- a/myisammrg/myrg_rnext.c
+++ b/myisammrg/myrg_rnext.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_rnext_same.c b/myisammrg/myrg_rnext_same.c
index 997e4100acd..9c6b522ee8a 100644
--- a/myisammrg/myrg_rnext_same.c
+++ b/myisammrg/myrg_rnext_same.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_rprev.c b/myisammrg/myrg_rprev.c
index 797993e903d..b1b86a93fad 100644
--- a/myisammrg/myrg_rprev.c
+++ b/myisammrg/myrg_rprev.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_rrnd.c b/myisammrg/myrg_rrnd.c
index d623ea8ea9c..55e72b2170d 100644
--- a/myisammrg/myrg_rrnd.c
+++ b/myisammrg/myrg_rrnd.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_rsame.c b/myisammrg/myrg_rsame.c
index f6b2164dc21..56b16c0aa3c 100644
--- a/myisammrg/myrg_rsame.c
+++ b/myisammrg/myrg_rsame.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_static.c b/myisammrg/myrg_static.c
index 9e76cbae07b..c20d2be4396 100644
--- a/myisammrg/myrg_static.c
+++ b/myisammrg/myrg_static.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_update.c b/myisammrg/myrg_update.c
index 7b9f614b965..ba667d69f12 100644
--- a/myisammrg/myrg_update.c
+++ b/myisammrg/myrg_update.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/myisammrg/myrg_write.c b/myisammrg/myrg_write.c
index 532709e361d..ed0a4a7996a 100644
--- a/myisammrg/myrg_write.c
+++ b/myisammrg/myrg_write.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2001 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index 74f8f478a33..cd668950459 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -32,20 +32,21 @@ endif
benchdir_root= $(prefix)
testdir = $(benchdir_root)/mysql-test
-EXTRA_SCRIPTS = mysql-test-run.sh install_test_db.sh valgrind.supp $(PRESCRIPTS)
-EXTRA_DIST = $(EXTRA_SCRIPTS)
-GENSCRIPTS = mysql-test-run install_test_db mtr
+EXTRA_SCRIPTS = mysql-test-run-shell.sh install_test_db.sh valgrind.supp $(PRESCRIPTS)
+EXTRA_DIST = $(EXTRA_SCRIPTS)
+GENSCRIPTS = mysql-test-run-shell mysql-test-run install_test_db mtr
PRESCRIPTS = mysql-test-run.pl
test_SCRIPTS = $(GENSCRIPTS) $(PRESCRIPTS)
-test_DATA = std_data/client-key.pem std_data/client-cert.pem std_data/cacert.pem \
- std_data/server-cert.pem std_data/server-key.pem
+test_DATA = std_data/client-key.pem \
+ std_data/client-cert.pem \
+ std_data/cacert.pem \
+ std_data/server-cert.pem \
+ std_data/server-key.pem
CLEANFILES = $(GENSCRIPTS) $(test_DATA)
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I..
-EXTRA_PROGRAMS = mysql_test_run_new
-noinst_HEADERS = my_manage.h
-mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c
+noinst_HEADERS = my_manage.h
dist-hook:
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
@@ -65,6 +66,7 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
+ $(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
@@ -96,6 +98,7 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
+ $(INSTALL_DATA) $(srcdir)/std_data/*.MY* $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
@@ -119,6 +122,11 @@ mtr:
$(RM) -f mtr
$(LN_S) mysql-test-run.pl mtr
+# mysql-test-run - a shortcut for executing mysql-test-run.pl
+mysql-test-run:
+ $(RM) -f mysql-test-run
+ $(LN_S) mysql-test-run.pl mysql-test-run
+
SUFFIXES = .sh
.sh:
diff --git a/mysql-test/include/federated.inc b/mysql-test/include/federated.inc
index 15230f47ed8..c8e8ededa11 100644
--- a/mysql-test/include/federated.inc
+++ b/mysql-test/include/federated.inc
@@ -1,3 +1,4 @@
+--source include/not_embedded.inc
--source ./include/have_federated_db.inc
source ./include/master-slave.inc;
diff --git a/mysql-test/include/innodb_rollback_on_timeout.inc b/mysql-test/include/innodb_rollback_on_timeout.inc
new file mode 100644
index 00000000000..73c7374c79e
--- /dev/null
+++ b/mysql-test/include/innodb_rollback_on_timeout.inc
@@ -0,0 +1,37 @@
+#
+# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
+# transaction timeout"
+#
+show variables like 'innodb_rollback_on_timeout';
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+connection con2;
+begin work;
+insert into t1 values (2);
+select * from t1;
+
+connection con1;
+begin work;
+insert into t1 values (5);
+select * from t1;
+# Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this
+# statement will time out; in 5.0.13+, it will not roll back transaction.
+--error ER_LOCK_WAIT_TIMEOUT
+insert into t1 values (2);
+# On 5.0.13+, this should give ==> 1, 5
+select * from t1;
+commit;
+
+connection con2;
+select * from t1;
+commit;
+
+connection default;
+select * from t1;
+drop table t1;
+disconnect con1;
+disconnect con2;
diff --git a/mysql-test/include/wait_show_pattern.inc b/mysql-test/include/wait_show_pattern.inc
new file mode 100644
index 00000000000..c9f84ce7f08
--- /dev/null
+++ b/mysql-test/include/wait_show_pattern.inc
@@ -0,0 +1,51 @@
+# include/wait_show_pattern.inc
+#
+# SUMMARY
+#
+# Waits until output produced by SHOW statement which particular type is
+# specified as parameter matches certain pattern or maximum time reached.
+#
+# NOTES
+#
+# Only the first row produced by the parameter statement is checked.
+#
+# USAGE
+#
+# let $show_type= <Tail of SHOW statement>;
+# let $show_pattern= 'Pattern to be used for LIKE matching';
+# --source wait_show_pattern.inc
+#
+# EXAMPLES
+#
+# alter_table-big.test, wait_slave_status.inc
+#
+# SEE ALSO
+#
+# wait_slave_status.inc, wait_condition.inc (>=5.1)
+#
+###############################################################################
+
+--disable_query_log
+
+# We accept to wait maximum 30 seconds (0.2 sec/loop).
+let $wait_counter= 150;
+while ($wait_counter)
+{
+ let $result= `SHOW $show_type`;
+ let $success= `SELECT '$result' LIKE $show_pattern`;
+ if ($success)
+ {
+ let $wait_counter= 0;
+ }
+ if (!$success)
+ {
+ real_sleep 0.2;
+ dec $wait_counter;
+ }
+}
+if (!$success)
+{
+ echo Timeout in wait_show_pattern.inc \$show_type= $show_type \$show_pattern= $show_pattern (\$result= '$result');
+}
+
+--enable_query_log
diff --git a/mysql-test/include/wait_slave_status.inc b/mysql-test/include/wait_slave_status.inc
index 7d3636e673c..d8d048527cf 100644
--- a/mysql-test/include/wait_slave_status.inc
+++ b/mysql-test/include/wait_slave_status.inc
@@ -104,50 +104,21 @@
eval SELECT "let \$result_pattern= $result_pattern ;" AS "";
SELECT '--source include/wait_slave_status.inc' AS "";
-# We accept to wait maximum 30 seconds (0.2 sec/loop).
-let $max_wait= 150;
-while ($max_wait)
-{
- let $my_val= `SHOW SLAVE STATUS`;
- # Now we have the first record of the SHOW result set as one fat string
- # within the variable $my_val.
-
- eval SET @my_val = '$my_val';
- # DEBUG eval SELECT @my_val AS "response to SHOW SLAVE STATUS";
+let $show_type= SLAVE STATUS;
+let $show_pattern= $result_pattern;
+--enable_query_log
- eval SELECT @my_val LIKE $result_pattern INTO @success;
- # @success is '1' if we have a match
- # '0' if we have no match
- # DEBUG SELECT @success;
+--source include/wait_show_pattern.inc
- let $success= `SELECT @success`;
- let $no_success= `SELECT @success = 0`;
- if ($success)
- {
- # We reached the expected result and want to jump out of the loop
- # without unneeded sleeps.
- # Attention: Do not set $max_wait to 0, because "while" with negative value
- # does not work.
- let $max_wait= 1;
- }
- if ($no_success)
- {
- # We did not reach the expected result and will have to sleep again
- # or jump out of the loop, when max_wait is exhausted.
- real_sleep 0.2;
- }
- dec $max_wait;
-}
---enable_query_log
-if ($no_success)
+if (!$success)
{
let $message= ! Attention: Timeout in wait_slave_status.inc.
| Possible reasons with decreasing probability:
- | - The LIKE pattern ($result_pattern) is wrong, because the
+ | - The LIKE pattern is wrong, because the
| testcase was altered or the layout of the
| SHOW SLAVE STATUS result set changed.
| - There is a new bug within the replication.
- | - We met an extreme testing environment and $max_wait is
+ | - We met an extreme testing environment and timeout is
| too small.;
--source include/show_msg80.inc
--echo DEBUG INFO START (wait_slave_status.inc):
diff --git a/mysql-test/install_test_db.sh b/mysql-test/install_test_db.sh
index c30583503dc..75388769808 100644
--- a/mysql-test/install_test_db.sh
+++ b/mysql-test/install_test_db.sh
@@ -1,6 +1,18 @@
#!/bin/sh
# Copyright (C) 1997-2006 MySQL AB
-# For a more info consult the file COPYRIGHT distributed with this file
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This scripts creates the privilege tables db, host, user, tables_priv,
# columns_priv in the mysql database, as well as the func table.
@@ -55,14 +67,17 @@ fi
mdata=$data/mysql
EXTRA_ARG=""
-if test ! -x $execdir/mysqld
+mysqld=
+if test -x $execdir/mysqld
then
+ mysqld=$execdir/mysqld
+else
if test ! -x $libexecdir/mysqld
then
echo "mysqld is missing - looked in $execdir and in $libexecdir"
exit 1
else
- execdir=$libexecdir
+ mysqld=$libexecdir/mysqld
fi
fi
@@ -88,8 +103,11 @@ basedir=.
EXTRA_ARG="--language=../sql/share/english/ --character-sets-dir=../sql/share/charsets/"
fi
-mysqld_boot=" $execdir/mysqld --no-defaults --bootstrap --skip-grant-tables \
- --basedir=$basedir --datadir=$ldata --skip-innodb --skip-ndbcluster --skip-bdb \
+mysqld_boot="${MYSQLD_BOOTSTRAP-$mysqld}"
+
+mysqld_boot="$mysqld_boot --no-defaults --bootstrap --skip-grant-tables \
+ --basedir=$basedir --datadir=$ldata \
+ --skip-innodb --skip-ndbcluster --skip-bdb \
$EXTRA_ARG"
echo "running $mysqld_boot"
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index d270d72d526..22290a88d39 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2005-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
@@ -288,6 +302,7 @@ sub collect_one_test_case($$$$$$$) {
$tinfo->{'timezone'}= "GMT-3"; # for UNIX_TIMESTAMP tests to work
$tinfo->{'slave_num'}= 0; # Default, no slave
+ $tinfo->{'master_num'}= 1; # Default, 1 master
if ( defined mtr_match_prefix($tname,"rpl") )
{
if ( $::opt_skip_rpl )
@@ -297,13 +312,8 @@ sub collect_one_test_case($$$$$$$) {
return;
}
-
$tinfo->{'slave_num'}= 1; # Default for rpl* tests, use one slave
- if ( $tname eq 'rpl_failsafe' or $tname eq 'rpl_chain_temp_table' )
- {
- # $tinfo->{'slave_num'}= 3; # Not 3 ? Check old code, strange
- }
}
if ( defined mtr_match_prefix($tname,"federated") )
@@ -541,6 +551,8 @@ sub collect_one_test_case($$$$$$$) {
$tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
return;
}
+ # Ndb tests run with two mysqld masters
+ $tinfo->{'master_num'}= 2;
}
else
{
@@ -556,7 +568,7 @@ sub collect_one_test_case($$$$$$$) {
if ( $tinfo->{'innodb_test'} )
{
- # This is a test that need inndob
+ # This is a test that need innodb
if ( $::mysqld_variables{'innodb'} eq "FALSE" )
{
# innodb is not supported, skip it
@@ -593,6 +605,10 @@ sub mtr_options_from_test_file($$) {
while ( my $line= <$F> )
{
+
+ # Skip line if it start's with #
+ next if ( $line =~ /^#/ );
+
# Match this line against tag in "tags" array
foreach my $tag (@tags)
{
diff --git a/mysql-test/lib/mtr_diff.pl b/mysql-test/lib/mtr_diff.pl
index 4e927ff4e37..26e556de5e8 100644
--- a/mysql-test/lib/mtr_diff.pl
+++ b/mysql-test/lib/mtr_diff.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
diff --git a/mysql-test/lib/mtr_gcov.pl b/mysql-test/lib/mtr_gcov.pl
index 71d3d6a2a43..a2de1fcbdff 100644
--- a/mysql-test/lib/mtr_gcov.pl
+++ b/mysql-test/lib/mtr_gcov.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2004, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
diff --git a/mysql-test/lib/mtr_gprof.pl b/mysql-test/lib/mtr_gprof.pl
index cc874eebfe5..f6615301dd7 100644
--- a/mysql-test/lib/mtr_gprof.pl
+++ b/mysql-test/lib/mtr_gprof.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
diff --git a/mysql-test/lib/mtr_im.pl b/mysql-test/lib/mtr_im.pl
index 967e92dfcdd..c8e332498d7 100644
--- a/mysql-test/lib/mtr_im.pl
+++ b/mysql-test/lib/mtr_im.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
diff --git a/mysql-test/lib/mtr_io.pl b/mysql-test/lib/mtr_io.pl
index 5be1d2ffddb..570a58875c2 100644
--- a/mysql-test/lib/mtr_io.pl
+++ b/mysql-test/lib/mtr_io.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
@@ -13,6 +27,8 @@ sub mtr_tofile ($@);
sub mtr_tonewfile($@);
sub mtr_lastlinefromfile($);
sub mtr_appendfile_to_file ($$);
+sub mtr_grab_file($);
+
##############################################################################
#
@@ -129,6 +145,7 @@ sub unspace {
return "$quote$string$quote";
}
+# Read a whole file, stripping leading and trailing whitespace.
sub mtr_fromfile ($) {
my $file= shift;
@@ -182,5 +199,16 @@ sub mtr_appendfile_to_file ($$) {
close TOFILE;
}
+# Read a whole file verbatim.
+sub mtr_grab_file($) {
+ my $file= shift;
+ open(FILE, '<', $file)
+ or return undef;
+ local $/= undef;
+ my $data= scalar(<FILE>);
+ close FILE;
+ return $data;
+}
+
1;
diff --git a/mysql-test/lib/mtr_match.pl b/mysql-test/lib/mtr_match.pl
index 66b639c7f8e..96aa43f4fa2 100644
--- a/mysql-test/lib/mtr_match.pl
+++ b/mysql-test/lib/mtr_match.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index 846ca25b725..97b0a6fc131 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
@@ -134,6 +148,7 @@ sub mtr_exe_maybe_exists (@) {
my @path= @_;
map {$_.= ".exe"} @path if $::glob_win32;
+ map {$_.= ".nlm"} @path if $::glob_netware;
foreach my $path ( @path )
{
if($::glob_win32)
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 79285de88a7..f63009cd24c 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
@@ -220,7 +234,8 @@ sub spawn_parent_impl {
my $ret_pid= waitpid($pid,0);
if ( $ret_pid != $pid )
{
- mtr_error("$path ($pid) got lost somehow");
+ mtr_error("waitpid($pid, 0) returned $ret_pid " .
+ "when waiting for '$path'");
}
return mtr_process_exit_status($?);
@@ -708,7 +723,7 @@ sub mtr_wait_blocking($) {
}
}
-# Start "mysqladmin shutdown" for a specific mysqld
+# Start "mysqladmin <command>" for a specific mysqld
sub mtr_mysqladmin_start($$$) {
my $srv= shift;
my $command= shift;
@@ -738,9 +753,8 @@ sub mtr_mysqladmin_start($$$) {
# Shutdown time must be high as slave may be in reconnect
mtr_add_arg($args, "--shutdown_timeout=$adm_shutdown_tmo");
mtr_add_arg($args, "$command");
- my $path_mysqladmin_log= "$::opt_vardir/log/mysqladmin.log";
my $pid= mtr_spawn($::exe_mysqladmin, $args,
- "", $path_mysqladmin_log, $path_mysqladmin_log, "",
+ "", "", "", "",
{ append_log_file => 1 });
mtr_verbose("mtr_mysqladmin_start, pid: $pid");
return $pid;
@@ -1059,7 +1073,7 @@ sub sleep_until_file_created ($$$) {
# Print extra message every 60 seconds
my $seconds= ($loop * $sleeptime) / 1000;
- if ( $seconds > 1 and int($seconds) % 60 == 0 )
+ if ( $seconds > 1 and int($seconds * 10) % 600 == 0 )
{
my $left= $timeout - $seconds;
mtr_warning("Waited $seconds seconds for $pidfile to be created, " .
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index d0e836c1a90..e3eebc25091 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
@@ -34,7 +48,12 @@ sub mtr_verbose (@);
# We can't use diff -u or diff -a as these are not portable
sub mtr_show_failed_diff ($) {
- my $tname= shift;
+ my $result_file_name= shift;
+
+ # The reject and log files have been dumped to
+ # to filenames based on the result_file's name
+ my $tname= basename($result_file_name);
+ $tname=~ s/\..*$//;
my $reject_file= "r/$tname.reject";
my $result_file= "r/$tname.result";
diff --git a/mysql-test/lib/mtr_stress.pl b/mysql-test/lib/mtr_stress.pl
index 1371eaa44c6..93b06b32c5f 100644
--- a/mysql-test/lib/mtr_stress.pl
+++ b/mysql-test/lib/mtr_stress.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
diff --git a/mysql-test/lib/mtr_timer.pl b/mysql-test/lib/mtr_timer.pl
index 06374716c62..523799f7cf5 100644
--- a/mysql-test/lib/mtr_timer.pl
+++ b/mysql-test/lib/mtr_timer.pl
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2005-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
diff --git a/mysql-test/lib/mtr_unique.pl b/mysql-test/lib/mtr_unique.pl
index a8fb320c773..a668fc097c7 100644
--- a/mysql-test/lib/mtr_unique.pl
+++ b/mysql-test/lib/mtr_unique.pl
@@ -1,3 +1,19 @@
+# -*- cperl -*-
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
#
# This file is used from mysql-test-run.pl when choosing
# port numbers and directories to use for running mysqld.
@@ -10,10 +26,16 @@ use Fcntl ':flock';
# Requested IDs are stored in a hash and released upon END.
#
my %mtr_unique_assigned_ids = ();
+my $mtr_unique_pid;
+BEGIN {
+ $mtr_unique_pid = $$ unless defined $mtr_unique_pid;
+}
END {
- while(my ($id,$file) = each(%mtr_unique_assigned_ids)) {
- print "Autoreleasing $file:$id\n";
- mtr_release_unique_id($file, $id);
+ if($mtr_unique_pid == $$) {
+ while(my ($id,$file) = each(%mtr_unique_assigned_ids)) {
+ print "Autoreleasing $file:$id\n";
+ mtr_release_unique_id($file, $id);
+ }
}
}
diff --git a/mysql-test/my_create_tables.c b/mysql-test/my_create_tables.c
index 06a6fabf022..0f6691b91b7 100644
--- a/mysql-test/my_create_tables.c
+++ b/mysql-test/my_create_tables.c
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <stdio.h>
#include <errno.h>
#ifndef __WIN__
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run-shell.sh
index a81a3b8b607..a81a3b8b607 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run-shell.sh
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index a28bd651ab6..e6e613d073c 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -58,6 +58,7 @@ $Devel::Trace::TRACE= 0; # Don't trace boring init stuff
use File::Path;
use File::Basename;
use File::Copy;
+use File::Temp qw / tempdir /;
use Cwd;
use Getopt::Long;
use Sys::Hostname;
@@ -103,7 +104,6 @@ our $glob_mysql_bench_dir= undef;
our $glob_hostname= undef;
our $glob_scriptname= undef;
our $glob_timers= undef;
-our $glob_use_running_server= 0;
our $glob_use_running_ndbcluster= 0;
our $glob_use_running_ndbcluster_slave= 0;
our $glob_use_embedded_server= 0;
@@ -141,6 +141,7 @@ our $opt_verbose= 0; # Verbose output, enable with --verbose
our $exe_master_mysqld;
our $exe_mysql;
our $exe_mysqladmin;
+our $exe_mysql_upgrade;
our $exe_mysqlbinlog;
our $exe_mysql_client_test;
our $exe_mysqld;
@@ -150,6 +151,7 @@ our $exe_mysqlslap;
our $exe_mysqlimport;
our $exe_mysqlshow;
our $exe_mysql_fix_system_tables;
+our $file_mysql_fix_privilege_tables;
our $exe_mysqltest;
our $exe_ndbd;
our $exe_ndb_mgmd;
@@ -162,7 +164,7 @@ our $exe_libtool;
our $opt_bench= 0;
our $opt_small_bench= 0;
-our $opt_big_test= 0; # Send --big-test to mysqltest
+our $opt_big_test= 0;
our @opt_extra_mysqld_opt;
@@ -179,7 +181,10 @@ our $opt_debug;
our $opt_do_test;
our @opt_cases; # The test cases names in argv
our $opt_embedded_server;
-our $opt_extern;
+
+our $opt_extern= 0;
+our $opt_socket;
+
our $opt_fast;
our $opt_force;
our $opt_reorder= 0;
@@ -224,29 +229,25 @@ our $opt_ndbcluster_port_slave;
our $opt_ndbconnectstring_slave;
our $opt_record;
+my $opt_report_features;
our $opt_check_testcases;
-my $opt_report_features;
+our $opt_mark_progress;
our $opt_skip;
our $opt_skip_rpl;
our $max_slave_num= 0;
+our $max_master_num= 1;
our $use_innodb;
our $opt_skip_test;
our $opt_skip_im;
our $opt_sleep;
-our $opt_sleep_time_after_restart= 1;
-our $opt_sleep_time_for_delete= 10;
our $opt_testcase_timeout;
our $opt_suite_timeout;
my $default_testcase_timeout= 15; # 15 min max
my $default_suite_timeout= 180; # 3 hours max
-our $opt_socket;
-
-our $opt_source_dist;
-
our $opt_start_and_exit;
our $opt_start_dirty;
our $opt_start_from;
@@ -256,7 +257,6 @@ our $opt_strace_client;
our $opt_timer= 1;
our $opt_user;
-our $opt_user_test;
our $opt_valgrind= 0;
our $opt_valgrind_mysqld= 0;
@@ -278,7 +278,6 @@ our $opt_stress_test_file= "";
our $opt_wait_for_master;
our $opt_wait_for_slave;
-our $opt_wait_timeout= 10;
our $opt_warnings;
@@ -308,6 +307,8 @@ our $glob_tot_real_time= 0;
our %mysqld_variables;
+my $source_dist= 0;
+
######################################################################
#
@@ -319,11 +320,12 @@ sub main ();
sub initial_setup ();
sub command_line_setup ();
sub set_mtr_build_thread_ports($);
-sub datadir_setup ();
+sub datadir_list_setup ();
sub executable_setup ();
sub environment_setup ();
sub kill_running_servers ();
-sub cleanup_stale_files ();
+sub remove_stale_vardir ();
+sub setup_vardir ();
sub check_ssl_support ($);
sub check_running_as_root();
sub check_ndbcluster_support ($);
@@ -413,6 +415,15 @@ sub main () {
$max_slave_num= $test->{slave_num};
mtr_error("Too many slaves") if $max_slave_num > 3;
}
+
+ # Count max number of masters used by a test case
+ if ( $test->{master_num} > $max_master_num)
+ {
+ $max_master_num= $test->{master_num};
+ mtr_error("Too many masters") if $max_master_num > 2;
+ mtr_error("Too few masters") if $max_master_num < 1;
+ }
+
$use_innodb||= $test->{'innodb_test'};
}
@@ -467,6 +478,15 @@ sub command_line_setup () {
$im_port= 9312;
$im_mysqld1_port= 9313;
$im_mysqld2_port= 9314;
+
+ # If so requested, we try to avail ourselves of a unique build thread number.
+ if ( $ENV{'MTR_BUILD_THREAD'} ) {
+ if ( lc($ENV{'MTR_BUILD_THREAD'}) eq 'auto' ) {
+ print "Requesting build thread... ";
+ $ENV{'MTR_BUILD_THREAD'} = mtr_require_unique_id_and_wait("/tmp/mysql-test-ports", 200, 299);
+ print "got ".$ENV{'MTR_BUILD_THREAD'}."\n";
+ }
+ }
if ( $ENV{'MTR_BUILD_THREAD'} )
{
@@ -527,6 +547,7 @@ sub command_line_setup () {
# Test case authoring
'record' => \$opt_record,
'check-testcases' => \$opt_check_testcases,
+ 'mark-progress' => \$opt_mark_progress,
# Extra options used when starting mysqld
'mysqld=s' => \@opt_extra_mysqld_opt,
@@ -574,7 +595,7 @@ sub command_line_setup () {
'tmpdir=s' => \$opt_tmpdir,
'vardir=s' => \$opt_vardir,
'benchdir=s' => \$glob_mysql_bench_dir,
- 'mem:s' => \$opt_mem,
+ 'mem' => \$opt_mem,
# Misc
'report-features' => \$opt_report_features,
@@ -591,9 +612,7 @@ sub command_line_setup () {
'start-and-exit' => \$opt_start_and_exit,
'timer!' => \$opt_timer,
'unified-diff|udiff' => \$opt_udiff,
- 'user-test=s' => \$opt_user_test,
'user=s' => \$opt_user,
- 'wait-timeout=i' => \$opt_wait_timeout,
'testcase-timeout=i' => \$opt_testcase_timeout,
'suite-timeout=i' => \$opt_suite_timeout,
'warnings|log-warnings' => \$opt_warnings,
@@ -625,7 +644,7 @@ sub command_line_setup () {
if ( -d "../sql" )
{
- $opt_source_dist= 1;
+ $source_dist= 1;
}
$glob_hostname= mtr_short_hostname();
@@ -649,7 +668,7 @@ sub command_line_setup () {
# directory. And we install "/usr/share/mysql-test". Moving up one
# more directory relative to "mysql-test" gives us a usable base
# directory for RPM installs.
- if ( ! $opt_source_dist and ! -d "$glob_basedir/bin" )
+ if ( ! $source_dist and ! -d "$glob_basedir/bin" )
{
$glob_basedir= dirname($glob_basedir);
}
@@ -661,7 +680,7 @@ sub command_line_setup () {
unless -d $glob_mysql_bench_dir;
$path_my_basedir=
- $opt_source_dist ? $glob_mysql_test_dir : $glob_basedir;
+ $source_dist ? $glob_mysql_test_dir : $glob_basedir;
$glob_timers= mtr_init_timers();
@@ -670,10 +689,10 @@ sub command_line_setup () {
# number as early as possible
#
- # Look for the client binaries
- $path_client_bindir= mtr_path_exists(vs_config_dirs('client', ''),
- "$glob_basedir/client_release",
+ # Look for the client binaries directory
+ $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
"$glob_basedir/client_debug",
+ vs_config_dirs('client', ''),
"$glob_basedir/client",
"$glob_basedir/bin");
@@ -804,13 +823,6 @@ sub command_line_setup () {
$opt_vardir= "$glob_mysql_test_dir/$opt_vardir";
}
- # Ensure a proper error message
- mkpath("$opt_vardir");
- unless ( -d $opt_vardir and -w $opt_vardir )
- {
- mtr_error("Writable 'var' directory is needed, use the '--vardir' option");
- }
-
# --------------------------------------------------------------------------
# Set tmpdir
# --------------------------------------------------------------------------
@@ -818,14 +830,6 @@ sub command_line_setup () {
$opt_tmpdir =~ s,/+$,,; # Remove ending slash if any
# --------------------------------------------------------------------------
- # Set socket
- # --------------------------------------------------------------------------
- if (!$opt_socket)
- {
- $opt_socket= $mysqld_variables{'socket'};
- }
-
- # --------------------------------------------------------------------------
# Check im suport
# --------------------------------------------------------------------------
if ( $mysql_version_id < 50000 )
@@ -922,17 +926,17 @@ sub command_line_setup () {
}
# --------------------------------------------------------------------------
- # Sleep flag
+ # Big test flags
# --------------------------------------------------------------------------
- if ( $opt_sleep )
- {
- $opt_sleep_time_after_restart= $opt_sleep;
- }
+ if ( $opt_big_test )
+ {
+ $ENV{'BIG_TEST'}= 1;
+ }
# --------------------------------------------------------------------------
# Gcov flag
# --------------------------------------------------------------------------
- if ( $opt_gcov and ! $opt_source_dist )
+ if ( $opt_gcov and ! $source_dist )
{
mtr_error("Coverage test needs the source - please use source dist");
}
@@ -946,8 +950,6 @@ sub command_line_setup () {
{
# Indicate that we are using debugger
$glob_debugger= 1;
- # Increase timeouts
- $opt_wait_timeout= 300;
if ( $opt_extern )
{
mtr_error("Can't use --extern when using debugger");
@@ -1013,16 +1015,9 @@ sub command_line_setup () {
$opt_suite_timeout*= 6 if $opt_valgrind;
}
- # Increase times to wait for executables to start if using valgrind
- if ( $opt_valgrind )
- {
- $opt_sleep_time_after_restart= 10;
- $opt_sleep_time_for_delete= 60;
- }
-
if ( ! $opt_user )
{
- if ( $glob_use_running_server )
+ if ( $opt_extern )
{
$opt_user= "test";
}
@@ -1038,6 +1033,11 @@ sub command_line_setup () {
my $sockdir = $opt_tmpdir;
$sockdir =~ s|/+$||;
+ # On some operating systems, there is a limit to the length of a
+ # UNIX domain socket's path far below PATH_MAX, so try to avoid long
+ # socket path names.
+ $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 );
+
# Put this into a hash, will be a C struct
$master->[0]=
@@ -1204,9 +1204,17 @@ sub command_line_setup () {
if ( $opt_extern )
{
- $glob_use_running_server= 1;
- $opt_skip_rpl= 1; # We don't run rpl test cases
- $master->[0]->{'path_sock'}= $opt_socket;
+ # Turn off features not supported when running with extern server
+ $opt_skip_rpl= 1;
+
+ # Setup master->[0] with the settings for the extern server
+ $master->[0]->{'path_sock'}= $opt_socket if $opt_socket;
+ mtr_report("Using extern server at '$master->[0]->{path_sock}'");
+ }
+ else
+ {
+ mtr_error("--socket can only be used in combination with --extern")
+ if $opt_socket;
}
$path_timefile= "$opt_vardir/log/mysqltest-time";
@@ -1215,6 +1223,19 @@ sub command_line_setup () {
$path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
+
+ if ( $opt_valgrind and $opt_debug )
+ {
+ # When both --valgrind and --debug is selected, send
+ # all output to the trace file, making it possible to
+ # see the exact location where valgrind complains
+ foreach my $mysqld (@{$master}, @{$slave})
+ {
+ my $sidx= $mysqld->{idx} ? "$mysqld->{idx}" : "";
+ $mysqld->{path_myerr}=
+ "$opt_vardir/log/" . $mysqld->{type} . "$sidx.trace";
+ }
+ }
}
#
@@ -1233,9 +1254,15 @@ sub command_line_setup () {
# But a fairly safe range seems to be 5001 - 32767
#
-sub set_mtr_build_thread_ports() {
+sub set_mtr_build_thread_ports($) {
my $mtr_build_thread= shift;
+ if ( lc($mtr_build_thread) eq 'auto' ) {
+ print "Requesting build thread... ";
+ $ENV{'MTR_BUILD_THREAD'} = $mtr_build_thread = mtr_require_unique_id_and_wait("/tmp/mysql-test-ports", 200, 299);
+ print "got ".$mtr_build_thread."\n";
+ }
+
# Up to two masters, up to three slaves
$opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1
$opt_slave_myport= $opt_master_myport + 2; # and 3 4
@@ -1254,12 +1281,13 @@ sub set_mtr_build_thread_ports() {
}
-sub datadir_setup () {
+sub datadir_list_setup () {
# Make a list of all data_dirs
- @data_dir_lst = (
- $master->[0]->{'path_myddir'},
- $master->[1]->{'path_myddir'});
+ for (my $idx= 0; $idx < $max_master_num; $idx++)
+ {
+ push(@data_dir_lst, $master->[$idx]->{'path_myddir'});
+ }
for (my $idx= 0; $idx < $max_slave_num; $idx++)
{
@@ -1284,26 +1312,15 @@ sub datadir_setup () {
sub collect_mysqld_features () {
- #
- # Execute "mysqld --no-defaults --help --verbose", that will
- # print out version and a list of all features and settings
- #
my $found_variable_list_start= 0;
- my $spec_file= "$glob_mysql_test_dir/mysqld.spec.$$";
- if ( mtr_run($exe_mysqld,
- ["--no-defaults",
- "--verbose",
- "--help"],
- "", "$spec_file", "$spec_file", "") != 0 )
- {
- mtr_error("Failed to get version and list of features from %s",
- $exe_mysqld);
- }
- my $F= IO::File->new($spec_file) or
- mtr_error("can't open file \"$spec_file\": $!");
+ #
+ # Execute "mysqld --no-defaults --help --verbose" to get a
+ # of all features and settings
+ #
+ my $list= `$exe_mysqld --no-defaults --verbose --help`;
- while ( my $line= <$F> )
+ foreach my $line (split('\n', $list))
{
# First look for version
if ( !$mysql_version_id )
@@ -1356,7 +1373,7 @@ sub collect_mysqld_features () {
}
}
}
- unlink($spec_file);
+
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
mtr_error("Could not find variabes list") unless $found_variable_list_start;
@@ -1459,7 +1476,15 @@ sub executable_setup () {
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
if ( $mysql_version_id >= 50100 )
{
- $exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
+ $exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
+ }
+ if ( $mysql_version_id >= 50000 and !$glob_use_embedded_server )
+ {
+ $exe_mysql_upgrade= mtr_exe_exists("$path_client_bindir/mysql_upgrade")
+ }
+ else
+ {
+ $exe_mysql_upgrade= "";
}
if ( ! $glob_win32 )
@@ -1470,6 +1495,10 @@ sub executable_setup () {
"$path_client_bindir/mysql_fix_privilege_tables");
}
+ # Look for mysql_fix_privilege_tables.sql script
+ $file_mysql_fix_privilege_tables=
+ mtr_file_exists("$glob_basedir/scripts/mysql_fix_privilege_tables.sql",
+ "$glob_basedir/share/mysql_fix_privilege_tables.sql");
if ( ! $opt_skip_ndbcluster and executable_setup_ndb())
{
@@ -1500,13 +1529,13 @@ sub executable_setup () {
if ( $glob_use_embedded_server )
{
$exe_mysqltest=
- mtr_exe_exists(vs_config_dirs('libmysqld/examples', 'mysqltest_embedded'),
- "$glob_basedir/libmysqld/examples/mysqltest_embedded",
+ mtr_exe_exists(vs_config_dirs('libmysqld/examples','mysqltest_embedded'),
+ "$glob_basedir/libmysqld/examples/mysqltest_embedded",
"$path_client_bindir/mysqltest_embedded");
}
else
{
- $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
+ $exe_mysqltest= mtr_exe_exists("$path_client_bindir/mysqltest");
}
# Look for mysql_client_test executable which may _not_ exist in
@@ -1585,6 +1614,33 @@ sub mysql_client_test_arguments()
return join(" ", $exe, @$args);
}
+sub mysql_upgrade_arguments()
+{
+ my $exe= $exe_mysql_upgrade;
+
+ my $args;
+ mtr_init_args(\$args);
+# if ( $opt_valgrind_mysql_ugrade )
+# {
+# valgrind_arguments($args, \$exe);
+# }
+
+ mtr_add_arg($args, "--no-defaults");
+ mtr_add_arg($args, "--user=root");
+ mtr_add_arg($args, "--port=$master->[0]->{'port'}");
+ mtr_add_arg($args, "--socket=$master->[0]->{'path_sock'}");
+ mtr_add_arg($args, "--datadir=$master->[0]->{'path_myddir'}");
+ mtr_add_arg($args, "--basedir=$glob_basedir");
+
+ if ( $opt_debug )
+ {
+ mtr_add_arg($args,
+ "--debug=d:t:A,$path_vardir_trace/log/mysql_upgrade.trace");
+ }
+
+ return join(" ", $exe, @$args);
+}
+
# Note that some env is setup in spawn/run, in "mtr_process.pl"
sub environment_setup () {
@@ -1597,7 +1653,7 @@ sub environment_setup () {
# Setup LD_LIBRARY_PATH so the libraries from this distro/clone
# are used in favor of the system installed ones
# --------------------------------------------------------------------------
- if ( $opt_source_dist )
+ if ( $source_dist )
{
push(@ld_library_paths, "$glob_basedir/libmysql/.libs/",
"$glob_basedir/libmysql_r/.libs/",
@@ -1629,9 +1685,17 @@ sub environment_setup () {
# impossible to add correct supressions, that means if "/usr/lib/debug"
# is available, it should be added to
# LD_LIBRARY_PATH
+ #
+ # But pthread is broken in libc6-dbg on Debian <= 3.1 (see Debian
+ # bug 399035, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=399035),
+ # so don't change LD_LIBRARY_PATH on that platform.
# --------------------------------------------------------------------------
my $debug_libraries_path= "/usr/lib/debug";
- if ( $opt_valgrind and -d $debug_libraries_path )
+ my $deb_version;
+ if ( $opt_valgrind and -d $debug_libraries_path and
+ (! -e '/etc/debian_version' or
+ ($deb_version= mtr_grab_file('/etc/debian_version')) == 0 or
+ $deb_version > 3.1 ) )
{
push(@ld_library_paths, $debug_libraries_path);
}
@@ -1655,7 +1719,7 @@ sub environment_setup () {
$ENV{'UMASK'}= "0660"; # The octal *string*
$ENV{'UMASK_DIR'}= "0770"; # The octal *string*
$ENV{'LC_COLLATE'}= "C";
- $ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server;
+ $ENV{'USE_RUNNING_SERVER'}= $opt_extern;
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
@@ -1668,6 +1732,7 @@ sub environment_setup () {
$ENV{'SLAVE_MYPORT1'}= $slave->[1]->{'port'};
$ENV{'SLAVE_MYPORT2'}= $slave->[2]->{'port'};
$ENV{'MYSQL_TCP_PORT'}= $mysqld_variables{'port'};
+ $ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'master-port'};
$ENV{'IM_PATH_SOCK'}= $instance_manager->{path_sock};
$ENV{'IM_USERNAME'}= $instance_manager->{admin_login};
@@ -1846,6 +1911,14 @@ sub environment_setup () {
$ENV{'MYSQL_CLIENT_TEST'}= mysql_client_test_arguments();
# ----------------------------------------------------
+ # Setup env so childs can execute mysql_upgrade
+ # ----------------------------------------------------
+ if ( $mysql_version_id >= 50000 )
+ {
+ $ENV{'MYSQL_UPGRADE'}= mysql_upgrade_arguments();
+ }
+
+ # ----------------------------------------------------
# Setup env so childs can execute mysql_fix_system_tables
# ----------------------------------------------------
if ( ! $glob_win32 )
@@ -1858,12 +1931,17 @@ sub environment_setup () {
"--socket=$master->[0]->{'path_sock'}";
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
}
+ $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
# ----------------------------------------------------
# Setup env so childs can execute my_print_defaults
# ----------------------------------------------------
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
+ # ----------------------------------------------------
+ # Setup env so childs can execute mysqladmin
+ # ----------------------------------------------------
+ $ENV{'MYSQLADMIN'}= $exe_mysqladmin;
# ----------------------------------------------------
# Setup env so childs can execute perror
@@ -1958,29 +2036,23 @@ sub kill_running_servers () {
# This is different from terminating processes we have
# started from this run of the script, this is terminating
# leftovers from previous runs.
-
- if ( ! -d $opt_vardir )
- {
- if ( -l $opt_vardir and ! -d readlink($opt_vardir) )
- {
- mtr_report("Removing $opt_vardir symlink without destination");
- unlink($opt_vardir);
- }
- # The "var" dir does not exist already
- # the processes that mtr_kill_leftovers start will write
- # their log files to var/log so it should be created
- mkpath("$opt_vardir/log");
- }
mtr_kill_leftovers();
}
}
-sub cleanup_stale_files () {
-
- my $created_by_mem_file= "$glob_mysql_test_dir/var/created_by_mem";
+#
+# Remove var and any directories in var/ created by previous
+# tests
+#
+sub remove_stale_vardir () {
mtr_report("Removing Stale Files");
+ # Safety!
+ mtr_error("No, don't remove the vardir when running with --extern")
+ if $opt_extern;
+
+ mtr_verbose("opt_vardir: $opt_vardir");
if ( $opt_vardir eq $default_vardir )
{
#
@@ -1989,29 +2061,47 @@ sub cleanup_stale_files () {
if ( -l $opt_vardir)
{
# var is a symlink
- if (-f $created_by_mem_file)
+
+ if ( $opt_mem and readlink($opt_vardir) eq $opt_mem )
{
# Remove the directory which the link points at
+ mtr_verbose("Removing " . readlink($opt_vardir));
rmtree(readlink($opt_vardir));
- # Remove the entire "var" dir
- rmtree("$opt_vardir/");
+
# Remove the "var" symlink
+ mtr_verbose("unlink($opt_vardir)");
+ unlink($opt_vardir);
+ }
+ elsif ( $opt_mem )
+ {
+ # Just remove the "var" symlink
+ mtr_report("WARNING: Removing '$opt_vardir' symlink it's wrong");
+
+ mtr_verbose("unlink($opt_vardir)");
unlink($opt_vardir);
}
else
{
# Some users creates a soft link in mysql-test/var to another area
- # - allow it
+ # - allow it, but remove all files in it
+
mtr_report("WARNING: Using the 'mysql-test/var' symlink");
- rmtree("$opt_vardir/log");
- rmtree("$opt_vardir/ndbcluster-$opt_ndbcluster_port");
- rmtree("$opt_vardir/run");
- rmtree("$opt_vardir/tmp");
+
+ # Make sure the directory where it points exist
+ mtr_error("The destination for symlink $opt_vardir does not exist")
+ if ! -d readlink($opt_vardir);
+
+ foreach my $bin ( glob("$opt_vardir/*") )
+ {
+ mtr_verbose("Removing bin $bin");
+ rmtree($bin);
+ }
}
}
else
{
# Remove the entire "var" dir
+ mtr_verbose("Removing $opt_vardir/");
rmtree("$opt_vardir/");
}
}
@@ -2023,21 +2113,56 @@ sub cleanup_stale_files () {
# Remove the var/ dir in mysql-test dir if any
# this could be an old symlink that shouldn't be there
+ mtr_verbose("Removing $default_vardir");
rmtree($default_vardir);
# Remove the "var" dir
+ mtr_verbose("Removing $opt_vardir/");
rmtree("$opt_vardir/");
}
+}
+
+#
+# Create var and the directories needed in var
+#
+sub setup_vardir() {
+ mtr_report("Creating Directories");
- if ( $opt_mem )
+ if ( $opt_vardir eq $default_vardir )
{
- # Runinng with var as a link to some "memory" location, normally tmpfs
- rmtree($opt_mem);
- mkpath($opt_mem);
- mtr_report("Creating symlink from $opt_vardir to $opt_mem");
- symlink($opt_mem, $opt_vardir);
- # Put a small file to recognize this dir was created by --mem
- mtr_tofile($created_by_mem_file, $opt_mem);
+ #
+ # Running with "var" in mysql-test dir
+ #
+ if ( -l $opt_vardir )
+ {
+ # it's a symlink
+
+ # Make sure the directory where it points exist
+ mtr_error("The destination for symlink $opt_vardir does not exist")
+ if ! -d readlink($opt_vardir);
+ }
+ elsif ( $opt_mem )
+ {
+ # Runinng with "var" as a link to some "memory" location, normally tmpfs
+ mtr_verbose("Creating $opt_mem");
+ mkpath($opt_mem);
+
+ mtr_report("Symlinking 'var' to '$opt_mem'");
+ symlink($opt_mem, $opt_vardir);
+ }
+ }
+
+ if ( ! -d $opt_vardir )
+ {
+ mtr_verbose("Creating $opt_vardir");
+ mkpath($opt_vardir);
+ }
+
+ # Ensure a proper error message if vardir couldn't be created
+ unless ( -d $opt_vardir and -w $opt_vardir )
+ {
+ mtr_error("Writable 'var' directory is needed, use the " .
+ "'--vardir=<path>' option");
}
mkpath("$opt_vardir/log");
@@ -2045,10 +2170,9 @@ sub cleanup_stale_files () {
mkpath("$opt_vardir/tmp");
mkpath($opt_tmpdir) if $opt_tmpdir ne "$opt_vardir/tmp";
- # Remove old and create new data dirs
+ # Create new data dirs
foreach my $data_dir (@data_dir_lst)
{
- rmtree("$data_dir");
mkpath("$data_dir/mysql");
mkpath("$data_dir/test");
}
@@ -2562,7 +2686,7 @@ sub run_suite () {
mtr_print_line();
if ( ! $glob_debugger and
- ! $glob_use_running_server and
+ ! $opt_extern and
! $glob_use_embedded_server )
{
stop_all_servers();
@@ -2591,31 +2715,51 @@ sub run_suite () {
sub initialize_servers () {
- datadir_setup();
+ datadir_list_setup();
- if ( ! $glob_use_running_server )
+ if ( $opt_extern )
+ {
+ # Running against an already started server, if the specified
+ # vardir does not already exist it should be created
+ if ( ! -d $opt_vardir )
+ {
+ mtr_report("Creating '$opt_vardir'");
+ setup_vardir();
+ }
+ else
+ {
+ mtr_report("No need to create '$opt_vardir' it already exists");
+ }
+ }
+ else
{
kill_running_servers();
if ( ! $opt_start_dirty )
{
- cleanup_stale_files();
+ remove_stale_vardir();
+ setup_vardir();
+
mysql_install_db();
if ( $opt_force )
{
+ # Save a snapshot of the freshly installed db
+ # to make it possible to restore to a known point in time
save_installed_db();
}
}
- check_running_as_root();
}
+ check_running_as_root();
}
sub mysql_install_db () {
install_db('master', $master->[0]->{'path_myddir'});
- # FIXME check if testcase really is using second master
- copy_install_db('master', $master->[1]->{'path_myddir'});
+ if ($max_master_num)
+ {
+ copy_install_db('master', $master->[1]->{'path_myddir'});
+ }
# Install the number of slave databses needed
for (my $idx= 0; $idx < $max_slave_num; $idx++)
@@ -2757,12 +2901,19 @@ sub install_db ($$) {
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
}
+ # If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
+ # configure --disable-grant-options), mysqld will not recognize the
+ # --bootstrap or --skip-grant-tables options. The user can set
+ # MYSQLD_BOOTSTRAP to the full path to a mysqld which does accept
+ # --bootstrap, to accommodate this.
+ my $exe_mysqld_bootstrap = $ENV{'MYSQLD_BOOTSTRAP'} || $exe_mysqld;
+
# Log bootstrap command
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
mtr_tofile($path_bootstrap_log,
- "$exe_mysqld " . join(" ", @$args) . "\n");
+ "$exe_mysqld_bootstrap " . join(" ", @$args) . "\n");
- if ( mtr_run($exe_mysqld, $args, $init_db_sql_tmp,
+ if ( mtr_run($exe_mysqld_bootstrap, $args, $init_db_sql_tmp,
$path_bootstrap_log, $path_bootstrap_log,
"", { append_log_file => 1 }) != 0 )
@@ -2974,26 +3125,15 @@ sub do_before_run_mysqltest($)
unlink("$result_dir/$tname.log");
unlink("$result_dir/$tname.warnings");
- mtr_tonewfile($path_current_test_log,"$tname\n"); # Always tell where we are
-
- # output current test to ndbcluster log file to enable diagnostics
- mtr_tofile($path_ndb_testrun_log,"CURRENT TEST $tname\n");
-
- mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
- if ( $master->[1]->{'pid'} )
- {
- mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
- }
-
if ( $mysql_version_id < 50000 )
{
- # Set envirnoment variable NDB_STATUS_OK to 1
+ # Set environment variable NDB_STATUS_OK to 1
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "1";
}
elsif ( $mysql_version_id < 50100 )
{
- # Set envirnoment variable NDB_STATUS_OK to YES
+ # Set environment variable NDB_STATUS_OK to YES
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "YES";
}
@@ -3004,9 +3144,9 @@ sub do_after_run_mysqltest($)
my $tinfo= shift;
my $tname= $tinfo->{'name'};
- mtr_tofile($path_mysqltest_log,"CURRENT TEST $tname\n");
-
# Save info from this testcase run to mysqltest.log
+ mtr_appendfile_to_file($path_current_test_log, $path_mysqltest_log)
+ if -f $path_current_test_log;
mtr_appendfile_to_file($path_timefile, $path_mysqltest_log)
if -f $path_timefile;
@@ -3016,6 +3156,26 @@ sub do_after_run_mysqltest($)
}
+sub run_testcase_mark_logs($)
+{
+ my ($log_msg)= @_;
+
+ # Write a marker to all log files
+
+ # The file indicating current test name
+ mtr_tonewfile($path_current_test_log, $log_msg);
+
+ # each mysqld's .err file
+ foreach my $mysqld (@{$master}, @{$slave})
+ {
+ mtr_tofile($mysqld->{path_myerr}, $log_msg);
+ }
+
+ # ndbcluster log file
+ mtr_tofile($path_ndb_testrun_log, $log_msg);
+
+}
+
sub find_testcase_skipped_reason($)
{
my ($tinfo)= @_;
@@ -3117,7 +3277,7 @@ sub run_testcase ($) {
# -------------------------------------------------------
$ENV{'TZ'}= $tinfo->{'timezone'};
- mtr_verbose("Starting server with timezone: $tinfo->{'timezone'}");
+ mtr_verbose("Setting timezone: $tinfo->{'timezone'}");
my $master_restart= run_testcase_need_master_restart($tinfo);
my $slave_restart= run_testcase_need_slave_restart($tinfo);
@@ -3125,7 +3285,7 @@ sub run_testcase ($) {
if ($master_restart or $slave_restart)
{
# Can't restart a running server that may be in use
- if ( $glob_use_running_server )
+ if ( $opt_extern )
{
mtr_report_test_name($tinfo);
$tinfo->{comment}= "Can't restart a running server";
@@ -3135,6 +3295,10 @@ sub run_testcase ($) {
run_testcase_stop_servers($tinfo, $master_restart, $slave_restart);
}
+
+ # Write to all log files to indicate start of testcase
+ run_testcase_mark_logs("CURRENT_TEST: $tinfo->{name}\n");
+
my $died= mtr_record_dead_children();
if ($died or $master_restart or $slave_restart)
{
@@ -3287,7 +3451,7 @@ sub report_failure_and_restart ($) {
my $tinfo= shift;
mtr_report_test_failed($tinfo);
- mtr_show_failed_diff($tinfo->{'name'});
+ mtr_show_failed_diff($tinfo->{'result_file'});
print "\n";
if ( $opt_force )
{
@@ -3304,7 +3468,7 @@ sub report_failure_and_restart ($) {
print "Aborting: $tinfo->{'name'} failed in $test_mode mode. ";
print "To continue, re-run with '--force'.\n";
if ( ! $glob_debugger and
- ! $glob_use_running_server and
+ ! $opt_extern and
! $glob_use_embedded_server )
{
stop_all_servers();
@@ -3404,11 +3568,10 @@ sub mysqld_arguments ($$$$$) {
if ( $glob_use_embedded_server )
{
$prefix= "--server-arg=";
- } else {
- # We can't pass embedded server --no-defaults
- mtr_add_arg($args, "--no-defaults");
}
+ mtr_add_arg($args, "%s--no-defaults", $prefix);
+
mtr_add_arg($args, "%s--console", $prefix);
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
@@ -3476,6 +3639,17 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
}
+
+ if ( $mysql_version_id <= 50106 )
+ {
+ # Force mysqld to use log files up until 5.1.6
+ mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
+ }
+ else
+ {
+ # Turn on logging, will be sent to tables
+ mtr_add_arg($args, "%s--log=", $prefix);
+ }
}
if ( $type eq 'slave' )
@@ -3493,8 +3667,6 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--log-slave-updates", $prefix);
}
- mtr_add_arg($args, "%s--log=%s", $prefix,
- $slave->[$idx]->{'path_mylog'});
mtr_add_arg($args, "%s--master-retry-count=10", $prefix);
mtr_add_arg($args, "%s--pid-file=%s", $prefix,
$slave->[$idx]->{'path_pid'});
@@ -3555,6 +3727,18 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--ndb-extra-logging", $prefix);
}
}
+
+ if ( $mysql_version_id <= 50106 )
+ {
+ # Force mysqld to use log files up until 5.1.6
+ mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
+ }
+ else
+ {
+ # Turn on logging, will be sent to tables
+ mtr_add_arg($args, "%s--log=", $prefix);
+ }
+
} # end slave
if ( $opt_debug )
@@ -3631,7 +3815,6 @@ sub mysqld_arguments ($$$$$) {
elsif ( $type eq 'master' )
{
mtr_add_arg($args, "%s--open-files-limit=1024", $prefix);
- mtr_add_arg($args, "%s--log=%s", $prefix, $master->[0]->{'path_mylog'});
}
return $args;
@@ -3880,10 +4063,17 @@ sub run_testcase_need_master_restart($)
}
elsif( ! $master->[0]->{'pid'} )
{
- $do_restart= 1;
- mtr_verbose("Restart master: master is not started");
+ if ( $opt_extern )
+ {
+ $do_restart= 0;
+ mtr_verbose("No restart: using extern master");
+ }
+ else
+ {
+ $do_restart= 1;
+ mtr_verbose("Restart master: master is not started");
+ }
}
-
return $do_restart;
}
@@ -4110,7 +4300,8 @@ sub run_testcase_start_servers($) {
}
- if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} )
+ if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} and
+ $tinfo->{'master_num'} > 1 )
{
# Test needs cluster, start an extra mysqld connected to cluster
@@ -4129,8 +4320,6 @@ sub run_testcase_start_servers($) {
return 1;
}
}
- mtr_tofile($master->[1]->{'path_myerr'},"CURRENT_TEST: $tname\n");
-
mysqld_start($master->[1],$tinfo->{'master_opt'},[]);
}
@@ -4158,8 +4347,6 @@ sub run_testcase_start_servers($) {
# ----------------------------------------------------------------------
if ( $tinfo->{'slave_num'} )
{
- mtr_tofile($slave->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
-
restore_slave_databases($tinfo->{'slave_num'});
do_before_start_slave($tinfo);
@@ -4325,6 +4512,10 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
+ # Log line number and time for each line in .test file
+ mtr_add_arg($args, "--mark-progress")
+ if $opt_mark_progress;
+
if ($tinfo->{'component_id'} eq 'im')
{
mtr_add_arg($args, "--socket=%s", $instance_manager->{'path_sock'});
@@ -4374,11 +4565,6 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--timer-file=%s/log/timer", $opt_vardir);
}
- if ( $opt_big_test )
- {
- mtr_add_arg($args, "--big-test");
- }
-
if ( $opt_compress )
{
mtr_add_arg($args, "--compress");
@@ -4749,9 +4935,9 @@ Options to control directories to use
vardir=DIR The directory where files generated from the test run
is stored (default: ./var). Specifying a ramdisk or
tmpfs will speed up tests.
- mem[=DIR] Run testsuite in "memory" using tmpfs or ramdisk
- Attempts to use DIR first if specified else
- uses as builtin list of standard locations
+ mem Run testsuite in "memory" using tmpfs or ramdisk
+ Attempts to find a suitable location
+ using a builtin list of standard locations
for tmpfs (/dev/shm)
The option can also be set using environment
variable MTR_MEM=[DIR]
@@ -4769,9 +4955,8 @@ Options to control what test suites or cases to run
skip-rpl Skip the replication test cases.
skip-im Don't start IM, and skip the IM test cases
skip-test=PREFIX Skip test cases which name are prefixed with PREFIX
- big-test Pass "--big-test" to mysqltest which will set the
- environment variable BIG_TEST, which can be checked
- from test cases.
+ big-test Set the environment variable BIG_TEST, which can be
+ checked from test cases.
Options that specify ports
@@ -4786,6 +4971,7 @@ Options for test case authoring
record TESTNAME (Re)genereate the result file for TESTNAME
check-testcases Check testcases for sideeffects
+ mark-progress Log line number and elapsed time to <testname>.progress
Options that pass on options
@@ -4793,10 +4979,11 @@ Options that pass on options
Options to run test on running server
- extern Use running server for tests FIXME DANGEROUS
+ extern Use running server for tests
ndb-connectstring=STR Use running cluster, and connect using STR
ndb-connectstring-slave=STR Use running slave cluster, and connect using STR
- user=USER User for connect to server
+ user=USER User for connection to extern server
+ socket=PATH Socket for connection to extern server
Options for debugging the product
@@ -4845,23 +5032,15 @@ Misc options
unified-diff | udiff When presenting differences, use unified diff
testcase-timeout=MINUTES Max test case run time (default $default_testcase_timeout)
- suite-timeout=MINUTES Max test suite run time (default $default_suite_timeout)
+ suite-timeout=MINUTES Max test suite run time (default $default_suite_timeout)
+ warnings | log-warnings Pass --log-warnings to mysqld
+ sleep=SECONDS Passed to mysqltest, will be used as fixed sleep time
Deprecated options
with-openssl Deprecated option for ssl
-Options not yet described, or that I want to look into more
- local
- netware
- sleep=SECONDS
- socket=PATH
- user-test=s
- wait-timeout=SECONDS
- warnings
- log-warnings
-
HERE
mtr_exit(1);
diff --git a/mysql-test/mysql_test_run_new.c b/mysql-test/mysql_test_run_new.c
index 79db71fa274..f9c0045472d 100644
--- a/mysql-test/mysql_test_run_new.c
+++ b/mysql-test/mysql_test_run_new.c
@@ -292,6 +292,14 @@ void install_db(char *datadir)
die("Unable to create init_db.sql.");
/* args */
init_args(&al);
+ /*
+ XXX: If mysqld is compiled with DISABLE_GRANT_OPTIONS defined, it
+ will not recognize the --bootstrap, --init-file or --skip-grant-
+ tables options. If this is needed here, please check
+ MYSQLD_BOOTSTRAP in the environment, and use its value instead of
+ mysqld_file if it is set. See mysql-test-run.pl and
+ mysql_install_db.
+ */
add_arg(&al, mysqld_file);
add_arg(&al, "--no-defaults");
add_arg(&al, "--bootstrap");
diff --git a/mysql-test/ndb/ndbcluster.sh b/mysql-test/ndb/ndbcluster.sh
index 3710da71e10..c53bf1306e6 100644
--- a/mysql-test/ndb/ndbcluster.sh
+++ b/mysql-test/ndb/ndbcluster.sh
@@ -1,6 +1,18 @@
#!/bin/sh
# Copyright (C) 2004 MySQL AB
-# For a more info consult the file COPYRIGHT distributed with this file
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This scripts starts the table handler ndbcluster
diff --git a/mysql-test/r/alter_table-big.result b/mysql-test/r/alter_table-big.result
new file mode 100644
index 00000000000..873978c60de
--- /dev/null
+++ b/mysql-test/r/alter_table-big.result
@@ -0,0 +1,18 @@
+drop table if exists t1, t2;
+create table t1 (n1 int, n2 int, n3 int,
+key (n1, n2, n3),
+key (n2, n3, n1),
+key (n3, n1, n2));
+create table t2 (i int);
+alter table t1 disable keys;
+reset master;
+alter table t1 enable keys;;
+insert into t2 values (1);
+insert into t1 values (1, 1, 1);
+show binlog events in 'master-bin.000001' from 98;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Query 1 # use `test`; insert into t2 values (1)
+master-bin.000001 # Query 1 # use `test`; alter table t1 enable keys
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (1, 1, 1)
+drop tables t1, t2;
+End of 5.0 tests
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index 5c50b3cd79d..d8de2655c6c 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -541,6 +541,127 @@ create table t1 ( a timestamp );
alter table t1 add unique ( a(1) );
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
drop table t1;
+drop table if exists t1;
+create table t1 (a int, key(a));
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE
+"this used not to disable the index"
+alter table t1 modify a int, disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
+alter table t1 enable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE
+alter table t1 modify a bigint, disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
+alter table t1 enable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE
+alter table t1 add b char(10), disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
+alter table t1 add c decimal(10,2), enable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE
+"this however did"
+alter table t1 disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
+desc t1;
+Field Type Null Key Default Extra
+a bigint(20) YES MUL NULL
+b char(10) YES NULL
+c decimal(10,2) YES NULL
+alter table t1 add d decimal(15,5);
+"The key should still be disabled"
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 1 a 1 a A NULL NULL NULL YES BTREE disabled
+drop table t1;
+"Now will test with one unique index"
+create table t1(a int, b char(10), unique(a));
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+alter table t1 disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+alter table t1 enable keys;
+"If no copy on noop change, this won't touch the data file"
+"Unique index, no change"
+alter table t1 modify a int, disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+"Change the type implying data copy"
+"Unique index, no change"
+alter table t1 modify a bigint, disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+alter table t1 modify a bigint;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+alter table t1 modify a int;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+drop table t1;
+"Now will test with one unique and one non-unique index"
+create table t1(a int, b char(10), unique(a), key(b));
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 1 b 1 b A NULL NULL NULL YES BTREE
+alter table t1 disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 1 b 1 b A NULL NULL NULL YES BTREE disabled
+alter table t1 enable keys;
+"If no copy on noop change, this won't touch the data file"
+"The non-unique index will be disabled"
+alter table t1 modify a int, disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 1 b 1 b A NULL NULL NULL YES BTREE disabled
+alter table t1 enable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 1 b 1 b A NULL NULL NULL YES BTREE
+"Change the type implying data copy"
+"The non-unique index will be disabled"
+alter table t1 modify a bigint, disable keys;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 1 b 1 b A NULL NULL NULL YES BTREE disabled
+"Change again the type, but leave the indexes as_is"
+alter table t1 modify a int;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 1 b 1 b A NULL NULL NULL YES BTREE disabled
+"Try the same. When data is no copied on similar tables, this is noop"
+alter table t1 modify a int;
+show indexes from t1;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+t1 0 a 1 a A NULL NULL NULL YES BTREE
+t1 1 b 1 b A NULL NULL NULL YES BTREE disabled
+drop table t1;
create database mysqltest;
create table t1 (c1 int);
alter table t1 rename mysqltest.t1;
@@ -556,6 +677,145 @@ ERROR 3D000: No database selected
alter table test.t1 rename test.t1;
use test;
drop table t1;
+CREATE TABLE t1(a INT) ROW_FORMAT=FIXED;
+CREATE INDEX i1 ON t1(a);
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) default NULL,
+ KEY `i1` (`a`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
+DROP INDEX i1 ON t1;
+SHOW CREATE TABLE t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
+DROP TABLE t1;
+DROP TABLE IF EXISTS bug24219;
+DROP TABLE IF EXISTS bug24219_2;
+CREATE TABLE bug24219 (a INT, INDEX(a));
+SHOW INDEX FROM bug24219;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+bug24219 1 a 1 a A NULL NULL NULL YES BTREE
+ALTER TABLE bug24219 RENAME TO bug24219_2, DISABLE KEYS;
+SHOW INDEX FROM bug24219_2;
+Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
+bug24219_2 1 a 1 a A NULL NULL NULL YES BTREE disabled
+DROP TABLE bug24219_2;
+drop table if exists table_24562;
+create table table_24562(
+section int,
+subsection int,
+title varchar(50));
+insert into table_24562 values
+(1, 0, "Introduction"),
+(1, 1, "Authors"),
+(1, 2, "Acknowledgements"),
+(2, 0, "Basics"),
+(2, 1, "Syntax"),
+(2, 2, "Client"),
+(2, 3, "Server"),
+(3, 0, "Intermediate"),
+(3, 1, "Complex queries"),
+(3, 2, "Stored Procedures"),
+(3, 3, "Stored Functions"),
+(4, 0, "Advanced"),
+(4, 1, "Replication"),
+(4, 2, "Load balancing"),
+(4, 3, "High availability"),
+(5, 0, "Conclusion");
+select * from table_24562;
+section subsection title
+1 0 Introduction
+1 1 Authors
+1 2 Acknowledgements
+2 0 Basics
+2 1 Syntax
+2 2 Client
+2 3 Server
+3 0 Intermediate
+3 1 Complex queries
+3 2 Stored Procedures
+3 3 Stored Functions
+4 0 Advanced
+4 1 Replication
+4 2 Load balancing
+4 3 High availability
+5 0 Conclusion
+alter table table_24562 add column reviewer varchar(20),
+order by title;
+select * from table_24562;
+section subsection title reviewer
+1 2 Acknowledgements NULL
+4 0 Advanced NULL
+1 1 Authors NULL
+2 0 Basics NULL
+2 2 Client NULL
+3 1 Complex queries NULL
+5 0 Conclusion NULL
+4 3 High availability NULL
+3 0 Intermediate NULL
+1 0 Introduction NULL
+4 2 Load balancing NULL
+4 1 Replication NULL
+2 3 Server NULL
+3 3 Stored Functions NULL
+3 2 Stored Procedures NULL
+2 1 Syntax NULL
+update table_24562 set reviewer="Me" where section=2;
+update table_24562 set reviewer="You" where section=3;
+alter table table_24562
+order by section ASC, subsection DESC;
+select * from table_24562;
+section subsection title reviewer
+1 2 Acknowledgements NULL
+1 1 Authors NULL
+1 0 Introduction NULL
+2 3 Server Me
+2 2 Client Me
+2 1 Syntax Me
+2 0 Basics Me
+3 3 Stored Functions You
+3 2 Stored Procedures You
+3 1 Complex queries You
+3 0 Intermediate You
+4 3 High availability NULL
+4 2 Load balancing NULL
+4 1 Replication NULL
+4 0 Advanced NULL
+5 0 Conclusion NULL
+alter table table_24562
+order by table_24562.subsection ASC, table_24562.section DESC;
+select * from table_24562;
+section subsection title reviewer
+5 0 Conclusion NULL
+4 0 Advanced NULL
+3 0 Intermediate You
+2 0 Basics Me
+1 0 Introduction NULL
+4 1 Replication NULL
+3 1 Complex queries You
+2 1 Syntax Me
+1 1 Authors NULL
+4 2 Load balancing NULL
+3 2 Stored Procedures You
+2 2 Client Me
+1 2 Acknowledgements NULL
+4 3 High availability NULL
+3 3 Stored Functions You
+2 3 Server Me
+alter table table_24562 order by 12;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '12' at line 1
+alter table table_24562 order by (section + 12);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(section + 12)' at line 1
+alter table table_24562 order by length(title);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'length(title)' at line 1
+alter table table_24562 order by (select 12 from dual);
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select 12 from dual)' at line 1
+alter table table_24562 order by no_such_col;
+ERROR 42S22: Unknown column 'no_such_col' in 'order clause'
+drop table table_24562;
create table t1 (mycol int(10) not null);
alter table t1 alter column mycol set default 0;
desc t1;
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index 3be1cdcf15a..f73a80dde65 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -11120,7 +11120,13 @@ auto fld1 companynr fld3 fld4 fld5 fld6
2 011401 37 breaking dreaded Steinberg W
3 011402 37 Romans scholastics jarring
4 011403 37 intercepted audiology tinily
+SELECT COUNT(auto) FROM t2;
+COUNT(auto)
+1213
INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
+SELECT COUNT(auto) FROM t2;
+COUNT(auto)
+1214
ALTER TABLE t2 DROP COLUMN fld6;
SHOW CREATE TABLE t2;
Table Create Table
diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result
index c5b3b1f86e7..33398d1ddd7 100644
--- a/mysql-test/r/bdb.result
+++ b/mysql-test/r/bdb.result
@@ -1928,38 +1928,4 @@ create table t1 (a int) engine=bdb;
commit;
alter table t1 add primary key(a);
drop table t1;
-set autocommit=1;
-reset master;
-create table bug16206 (a int);
-insert into bug16206 values(1);
-start transaction;
-insert into bug16206 values(2);
-commit;
-show binlog events;
-Log_name Pos Event_type Server_id End_log_pos Info
-f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
-f n Query 1 n use `test`; create table bug16206 (a int)
-f n Query 1 n use `test`; insert into bug16206 values(1)
-f n Query 1 n use `test`; insert into bug16206 values(2)
-drop table bug16206;
-reset master;
-create table bug16206 (a int) engine= bdb;
-insert into bug16206 values(0);
-insert into bug16206 values(1);
-start transaction;
-insert into bug16206 values(2);
-commit;
-insert into bug16206 values(3);
-show binlog events;
-Log_name Pos Event_type Server_id End_log_pos Info
-f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
-f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
-f n Query 1 n use `test`; insert into bug16206 values(0)
-f n Query 1 n use `test`; insert into bug16206 values(1)
-f n Query 1 n use `test`; BEGIN
-f n Query 1 n use `test`; insert into bug16206 values(2)
-f n Query 1 n use `test`; COMMIT
-f n Query 1 n use `test`; insert into bug16206 values(3)
-drop table bug16206;
-set autocommit=0;
End of 5.0 tests
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index edc18319603..541a15561e2 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -341,3 +341,14 @@ select * from t1 where bigint_col='17666000000000000000';
bigint_col
17666000000000000000
drop table t1;
+
+bug 19955 -- mod is signed with bigint
+select cast(10000002383263201056 as unsigned) mod 50 as result;
+result
+6
+create table t1 (c1 bigint unsigned);
+insert into t1 values (10000002383263201056);
+select c1 mod 50 as result from t1;
+result
+6
+drop table t1;
diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result
index da0ca8ddba1..c141b255716 100644
--- a/mysql-test/r/compare.result
+++ b/mysql-test/r/compare.result
@@ -46,6 +46,10 @@ create table t1 (a tinyint(1),b binary(1));
insert into t1 values (0x01,0x01);
select * from t1 where a=b;
a b
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
select * from t1 where a=b and b=0x01;
a b
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: ''
drop table if exists t1;
diff --git a/mysql-test/r/ctype_cp932_binlog.result b/mysql-test/r/ctype_cp932_binlog.result
index 6d742f3d464..d3d800b7bf0 100644
--- a/mysql-test/r/ctype_cp932_binlog.result
+++ b/mysql-test/r/ctype_cp932_binlog.result
@@ -41,6 +41,6 @@ IN ind DECIMAL(10,2))
BEGIN
INSERT INTO t4 VALUES (ins1, ins2, ind);
END
-master-bin.000001 801 Query 1 1006 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1'Foo\'s a Bar'), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
-master-bin.000001 1006 Query 1 1092 use `test`; DROP PROCEDURE bug18293
-master-bin.000001 1092 Query 1 1168 use `test`; DROP TABLE t4
+master-bin.000001 801 Query 1 1017 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
+master-bin.000001 1017 Query 1 1103 use `test`; DROP PROCEDURE bug18293
+master-bin.000001 1103 Query 1 1179 use `test`; DROP TABLE t4
diff --git a/mysql-test/r/ctype_hebrew.result b/mysql-test/r/ctype_hebrew.result
new file mode 100644
index 00000000000..d938b2e47f3
--- /dev/null
+++ b/mysql-test/r/ctype_hebrew.result
@@ -0,0 +1,11 @@
+DROP TABLE IF EXISTS t1;
+SET NAMES hebrew;
+CREATE TABLE t1 (a char(1)) DEFAULT CHARSET=hebrew;
+INSERT INTO t1 VALUES (0xFD),(0xFE);
+ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+SELECT HEX(a) FROM t1;
+HEX(a)
+E2808E
+E2808F
+DROP TABLE t1;
+End of 4.1 tests
diff --git a/mysql-test/r/ctype_ucs_binlog.result b/mysql-test/r/ctype_ucs_binlog.result
index 88912f98252..2657bf60c04 100644
--- a/mysql-test/r/ctype_ucs_binlog.result
+++ b/mysql-test/r/ctype_ucs_binlog.result
@@ -9,15 +9,17 @@ master-bin.000001 98 User var 1 138 @`v`=_ucs2 0x006100620063 COLLATE ucs2_gener
master-bin.000001 138 Query 1 227 use `test`; insert into t2 values (@v)
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`;
-use test;
-SET TIMESTAMP=10000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t2 values (@v);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/;
+use test/*!*/;
+SET TIMESTAMP=10000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t2 values (@v)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 4eb74510c93..be1e1742ba6 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -124,12 +124,34 @@ create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d");
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) default NULL
+ `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varchar(10) character set utf8 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
date_format("2004-01-19 10:10:10", "%Y-%m-%d")
2004-01-19
drop table t1;
+set names utf8;
+set LC_TIME_NAMES='fr_FR';
+create table t1 (s1 char(20) character set latin1);
+insert into t1 values (date_format('2004-02-02','%M'));
+select hex(s1) from t1;
+hex(s1)
+66E97672696572
+drop table t1;
+create table t1 (s1 char(20) character set koi8r);
+set LC_TIME_NAMES='ru_RU';
+insert into t1 values (date_format('2004-02-02','%M'));
+insert into t1 values (date_format('2004-02-02','%b'));
+insert into t1 values (date_format('2004-02-02','%W'));
+insert into t1 values (date_format('2004-02-02','%a'));
+select hex(s1), s1 from t1;
+hex(s1) s1
+E6C5D7D2C1CCD1 ФевралÑ
+E6C5D7 Фев
+F0CFCEC5C4C5CCD8CEC9CB Понедельник
+F0CEC4 Пнд
+drop table t1;
+set LC_TIME_NAMES='en_US';
set names koi8r;
create table t1 (s1 char(1) character set utf8);
insert into t1 values (_koi8r'ÁÂ');
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result
index bbe3aee1fb0..8c3631c2707 100644
--- a/mysql-test/r/date_formats.result
+++ b/mysql-test/r/date_formats.result
@@ -186,12 +186,12 @@ date format datetime
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12
-10:20:10 %H:%i:%s 0000-00-00 10:20:10
-10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10
-10:20:10 %T 0000-00-00 10:20:10
-10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10
-10:20:10AM %r 0000-00-00 10:20:10
-10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000
+10:20:10 %H:%i:%s 0000-00-00 00:00:00
+10:20:10 %h:%i:%s.%f 0000-00-00 00:00:00
+10:20:10 %T 0000-00-00 00:00:00
+10:20:10AM %h:%i:%s%p 0000-00-00 00:00:00
+10:20:10AM %r 0000-00-00 00:00:00
+10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 00:00:00
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
15 September 2001 %d %M %Y 2001-09-15 00:00:00
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
@@ -208,6 +208,13 @@ Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00
15-01-20 %d-%m-%y 2020-01-15 00:00:00
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10.440000'
select date,format,DATE(str_to_date(date, format)) as date2 from t1;
date format date2
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02
@@ -248,12 +255,12 @@ date format time
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12
-10:20:10 %H:%i:%s 10:20:10
-10:20:10 %h:%i:%s.%f 10:20:10
-10:20:10 %T 10:20:10
-10:20:10AM %h:%i:%s%p 10:20:10
-10:20:10AM %r 10:20:10
-10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58
15 September 2001 %d %M %Y 00:00:00
15 SEPTEMB 2001 %d %M %Y 00:00:00
@@ -270,6 +277,13 @@ Tuesday 52 2001 %W %V %X 00:00:00
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00
15-01-20 %d-%m-%y 00:00:00
15-2001-1 %d-%Y-%c 00:00:00
+Warnings:
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000'
select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1;
date format time2
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12
@@ -279,12 +293,12 @@ date format time2
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12
-10:20:10 %H:%i:%s 10:20:10
-10:20:10 %h:%i:%s.%f 10:20:10
-10:20:10 %T 10:20:10
-10:20:10AM %h:%i:%s%p 10:20:10
-10:20:10AM %r 10:20:10
-10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58
15 September 2001 %d %M %Y 00:00:00
15 SEPTEMB 2001 %d %M %Y 00:00:00
@@ -301,6 +315,13 @@ Tuesday 52 2001 %W %V %X 00:00:00
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00
15-01-20 %d-%m-%y 00:00:00
15-2001-1 %d-%Y-%c 00:00:00
+Warnings:
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10'
+Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000'
select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d'));
concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d'))
2003-01-02 08:11:02.123456
@@ -571,4 +592,13 @@ DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896)
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '%Y-%m-%d %H:%i:%s'
+select str_to_date('04 /30/2004', '%m /%d/%Y');
+str_to_date('04 /30/2004', '%m /%d/%Y')
+2004-04-30
+select str_to_date('04/30 /2004', '%m /%d /%Y');
+str_to_date('04/30 /2004', '%m /%d /%Y')
+2004-04-30
+select str_to_date('04/30/2004 ', '%m/%d/%Y ');
+str_to_date('04/30/2004 ', '%m/%d/%Y ')
+2004-04-30
"End of 4.1 tests"
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result
index aef49af6c62..e2aa3b4a3cc 100644
--- a/mysql-test/r/default.result
+++ b/mysql-test/r/default.result
@@ -104,3 +104,95 @@ a b c d e f g h i j k l m n o p q r s t u v w x y z a1 b1
1 0000 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
drop table t1;
drop table t2;
+create table bug20691 (i int, d datetime NOT NULL, dn datetime not null default '0000-00-00 00:00:00');
+insert into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT);
+Warnings:
+Warning 1364 Field 'd' doesn't have a default value
+Warning 1364 Field 'd' doesn't have a default value
+insert into bug20691 (i) values (2);
+Warnings:
+Warning 1364 Field 'd' doesn't have a default value
+desc bug20691;
+Field Type Null Key Default Extra
+i int(11) YES NULL
+d datetime NO
+dn datetime NO 0000-00-00 00:00:00
+insert into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT);
+Warnings:
+Warning 1364 Field 'd' doesn't have a default value
+Warning 1364 Field 'd' doesn't have a default value
+insert into bug20691 (i) values (4);
+Warnings:
+Warning 1364 Field 'd' doesn't have a default value
+insert into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT);
+Warnings:
+Warning 1364 Field 'd' doesn't have a default value
+Warning 1364 Field 'd' doesn't have a default value
+SET sql_mode = 'ALLOW_INVALID_DATES';
+insert into bug20691 values (6, DEFAULT, DEFAULT), (6, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (6, DEFAULT, DEFAULT);
+Warnings:
+Warning 1364 Field 'd' doesn't have a default value
+Warning 1364 Field 'd' doesn't have a default value
+SET sql_mode = 'STRICT_ALL_TABLES';
+insert into bug20691 values (7, DEFAULT, DEFAULT), (7, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (7, DEFAULT, DEFAULT);
+ERROR HY000: Field 'd' doesn't have a default value
+select * from bug20691 order by i asc;
+i d dn
+1 0000-00-00 00:00:00 0000-00-00 00:00:00
+1 1975-07-10 07:10:03 1978-01-13 14:08:51
+1 0000-00-00 00:00:00 0000-00-00 00:00:00
+2 0000-00-00 00:00:00 0000-00-00 00:00:00
+3 0000-00-00 00:00:00 0000-00-00 00:00:00
+3 1975-07-10 07:10:03 1978-01-13 14:08:51
+3 0000-00-00 00:00:00 0000-00-00 00:00:00
+4 0000-00-00 00:00:00 0000-00-00 00:00:00
+5 0000-00-00 00:00:00 0000-00-00 00:00:00
+5 1975-07-10 07:10:03 1978-01-13 14:08:51
+5 0000-00-00 00:00:00 0000-00-00 00:00:00
+6 0000-00-00 00:00:00 0000-00-00 00:00:00
+6 1975-07-10 07:10:03 1978-01-13 14:08:51
+6 0000-00-00 00:00:00 0000-00-00 00:00:00
+drop table bug20691;
+SET sql_mode = '';
+create table bug20691 (
+a set('one', 'two', 'three') not null,
+b enum('small', 'medium', 'large', 'enormous', 'ellisonego') not null,
+c time not null,
+d date not null,
+e int not null,
+f long not null,
+g blob not null,
+h datetime not null,
+i decimal not null,
+x int);
+insert into bug20691 values (2, 3, 5, '0007-01-01', 11, 13, 17, '0019-01-01 00:00:00', 23, 1);
+insert into bug20691 (x) values (2);
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+Warning 1364 Field 'c' doesn't have a default value
+Warning 1364 Field 'd' doesn't have a default value
+Warning 1364 Field 'e' doesn't have a default value
+Warning 1364 Field 'f' doesn't have a default value
+Warning 1364 Field 'g' doesn't have a default value
+Warning 1364 Field 'h' doesn't have a default value
+Warning 1364 Field 'i' doesn't have a default value
+insert into bug20691 values (2, 3, 5, '0007-01-01', 11, 13, 17, '0019-01-01 00:00:00', 23, 3);
+insert into bug20691 values (DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, 4);
+Warnings:
+Warning 1364 Field 'a' doesn't have a default value
+Warning 1364 Field 'b' doesn't have a default value
+Warning 1364 Field 'c' doesn't have a default value
+Warning 1364 Field 'd' doesn't have a default value
+Warning 1364 Field 'e' doesn't have a default value
+Warning 1364 Field 'f' doesn't have a default value
+Warning 1364 Field 'g' doesn't have a default value
+Warning 1364 Field 'h' doesn't have a default value
+Warning 1364 Field 'i' doesn't have a default value
+select * from bug20691 order by x asc;
+a b c d e f g h i x
+two large 00:00:05 0007-01-01 11 13 17 0019-01-01 00:00:00 23 1
+ small 00:00:00 0000-00-00 0 0000-00-00 00:00:00 0 2
+two large 00:00:05 0007-01-01 11 13 17 0019-01-01 00:00:00 23 3
+ small 00:00:00 0000-00-00 0 0000-00-00 00:00:00 0 4
+drop table bug20691;
+End of 5.0 tests.
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index 86ab2141e2d..32151305698 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -607,3 +607,40 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a;
a a
DROP TABLE t1;
+CREATE TABLE t1 (a CHAR(1));
+INSERT INTO t1 VALUES('A'), (0);
+SELECT a FROM t1 WHERE a=0;
+a
+A
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'A'
+SELECT DISTINCT a FROM t1 WHERE a=0;
+a
+A
+0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'A'
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('1972-07-29'), ('1972-02-06');
+EXPLAIN SELECT (SELECT DISTINCT a FROM t1 WHERE a = '2002-08-03');
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
+2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where
+EXPLAIN SELECT (SELECT DISTINCT ADDDATE(a,1) FROM t1
+WHERE ADDDATE(a,1) = '2002-08-03');
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
+2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using where; Using temporary
+CREATE TABLE t2 (a CHAR(5) CHARACTER SET latin1 COLLATE latin1_general_ci);
+INSERT INTO t2 VALUES (0xf6);
+INSERT INTO t2 VALUES ('oe');
+SELECT COUNT(*) FROM (SELECT DISTINCT a FROM t2) dt;
+COUNT(*)
+2
+SELECT COUNT(*) FROM
+(SELECT DISTINCT a FROM t2 WHERE a='oe' COLLATE latin1_german2_ci) dt;
+COUNT(*)
+2
+DROP TABLE t1, t2;
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result
index 2b44fc8bd7e..cecffbb1471 100644
--- a/mysql-test/r/federated.result
+++ b/mysql-test/r/federated.result
@@ -1815,6 +1815,34 @@ engine = federated
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
drop table federated.test1, federated.test2;
drop table federated.test;
+set names utf8;
+create table federated.t1 (a varchar(64)) DEFAULT CHARSET=utf8;
+insert into federated.t1 values (0x6DC3A56E6164);
+select hex(a) from federated.t1;
+hex(a)
+6DC3A56E6164
+create table federated.t1 (a varchar(64))
+ENGINE=FEDERATED
+connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'
+DEFAULT CHARSET=utf8;
+set names utf8;
+select hex(a) from federated.t1;
+hex(a)
+6DC3A56E6164
+insert into federated.t1 values (0xC3A4C3B6C3BCC39F);
+insert into federated.t1 values (0xD18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E);
+select hex(a) from federated.t1;
+hex(a)
+6DC3A56E6164
+C3A4C3B6C3BCC39F
+D18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E
+select hex(a) from federated.t1;
+hex(a)
+6DC3A56E6164
+C3A4C3B6C3BCC39F
+D18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E
+drop table federated.t1;
+drop table federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
diff --git a/mysql-test/r/fix_priv_tables.result b/mysql-test/r/fix_priv_tables.result
new file mode 100644
index 00000000000..e54330a5520
--- /dev/null
+++ b/mysql-test/r/fix_priv_tables.result
@@ -0,0 +1,36 @@
+drop table if exists t1,t1aa,t2aa;
+DROP DATABASE IF EXISTS testdb;
+CREATE DATABASE testdb;
+CREATE TABLE testdb.t1 (
+c1 INT,
+c3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
+CREATE VIEW testdb.v1 AS
+SELECT * FROM testdb.t1;
+GRANT CREATE VIEW, SHOW VIEW ON testdb.v1 TO 'show_view_tbl'@'localhost';
+SHOW GRANTS FOR 'show_view_tbl'@'localhost';
+Grants for show_view_tbl@localhost
+GRANT USAGE ON *.* TO 'show_view_tbl'@'localhost'
+GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO 'show_view_tbl'@'localhost'
+
+GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost;
+SHOW GRANTS FOR 'select_only_c1'@'localhost';
+Grants for select_only_c1@localhost
+GRANT USAGE ON *.* TO 'select_only_c1'@'localhost'
+GRANT SELECT (c1) ON `testdb`.`v1` TO 'select_only_c1'@'localhost'
+
+"after fix privs"
+SHOW GRANTS FOR 'show_view_tbl'@'localhost';
+Grants for show_view_tbl@localhost
+GRANT USAGE ON *.* TO 'show_view_tbl'@'localhost'
+GRANT CREATE VIEW, SHOW VIEW ON `testdb`.`v1` TO 'show_view_tbl'@'localhost'
+
+SHOW GRANTS FOR 'select_only_c1'@'localhost';
+Grants for select_only_c1@localhost
+GRANT USAGE ON *.* TO 'select_only_c1'@'localhost'
+GRANT SELECT (c1) ON `testdb`.`v1` TO 'select_only_c1'@'localhost'
+
+DROP USER 'show_view_tbl'@'localhost';
+DROP USER 'select_only_c1'@'localhost';
+DROP VIEW testdb.v1;
+DROP TABLE testdb.t1;
+DROP DATABASE testdb;
diff --git a/mysql-test/r/fix_priv_tabs.result b/mysql-test/r/fix_priv_tabs.result
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mysql-test/r/fix_priv_tabs.result
diff --git a/mysql-test/r/flush2.result b/mysql-test/r/flush2.result
new file mode 100644
index 00000000000..7c94219fd71
--- /dev/null
+++ b/mysql-test/r/flush2.result
@@ -0,0 +1,24 @@
+flush logs;
+set global expire_logs_days = 3;
+show variables like 'log%';
+Variable_name Value
+log ON
+log_bin OFF
+log_bin_trust_function_creators ON
+log_error
+log_queries_not_using_indexes OFF
+log_slave_updates OFF
+log_slow_queries OFF
+log_warnings 1
+flush logs;
+show variables like 'log%';
+Variable_name Value
+log ON
+log_bin OFF
+log_bin_trust_function_creators ON
+log_error
+log_queries_not_using_indexes OFF
+log_slave_updates OFF
+log_slow_queries OFF
+log_warnings 1
+set global expire_logs_days = 0;
diff --git a/mysql-test/r/flush_block_commit.result b/mysql-test/r/flush_block_commit.result
index 9e9085d2fc8..d5b10868358 100644
--- a/mysql-test/r/flush_block_commit.result
+++ b/mysql-test/r/flush_block_commit.result
@@ -37,18 +37,3 @@ show create database test;
Database Create Database
test CREATE DATABASE `test` /*!40100 DEFAULT CHARACTER SET latin1 */
drop table t1;
-create table t1 (a int) engine=innodb;
-reset master;
-set autocommit=0;
-insert t1 values (1);
-flush tables with read lock;
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 98
-commit;
-show master status;
-File Position Binlog_Do_DB Binlog_Ignore_DB
-master-bin.000001 98
-unlock tables;
-drop table t1;
-set autocommit=1;
diff --git a/mysql-test/r/flush_block_commit_notembedded.result b/mysql-test/r/flush_block_commit_notembedded.result
new file mode 100644
index 00000000000..599efeb3e2d
--- /dev/null
+++ b/mysql-test/r/flush_block_commit_notembedded.result
@@ -0,0 +1,15 @@
+create table t1 (a int) engine=innodb;
+reset master;
+set autocommit=0;
+insert t1 values (1);
+flush tables with read lock;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 98
+commit;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 98
+unlock tables;
+drop table t1;
+set autocommit=1;
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 23517f7b603..d18837aed41 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1029,6 +1029,273 @@ t1 CREATE TABLE `t1` (
`stddev(0)` double(8,4) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+create table bug22555 (i smallint primary key auto_increment, s1 smallint, s2 smallint, e decimal(30,10), o double);
+insert into bug22555 (s1, s2, e, o) values (53, 78, 11.4276528, 6.828112), (17, 78, 5.916793, 1.8502951), (18, 76, 2.679231, 9.17975591), (31, 62, 6.07831, 0.1), (19, 41, 5.37463, 15.1), (83, 73, 14.567426, 7.959222), (92, 53, 6.10151, 13.1856852), (7, 12, 13.92272, 3.442007), (92, 35, 11.95358909, 6.01376678), (38, 84, 2.572, 7.904571);
+select std(s1/s2) from bug22555 group by i;
+std(s1/s2)
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+select std(e) from bug22555 group by i;
+std(e)
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+select std(o) from bug22555 group by i;
+std(o)
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+drop table bug22555;
+create table bug22555 (i smallint, s1 smallint, s2 smallint, o1 double, o2 double, e1 decimal, e2 decimal);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+select i, count(*) from bug22555 group by i;
+i count(*)
+1 1
+2 1
+3 1
+select std(s1/s2) from bug22555 where i=1;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=2;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=3;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=1 group by i;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=2 group by i;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=3 group by i;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 group by i order by i;
+std(s1/s2)
+0.00000000
+0.00000000
+0.00000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 1 0.00000000
+2 1 0.00000000
+3 1 0.00000000
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+i count(*) variance(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+i count(*) variance(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+i count(*) variance(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+set div_precision_increment=20;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+i count(*) variance(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+i count(*) variance(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+i count(*) variance(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+set @@div_precision_increment=@saved_div_precision_increment;
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 4 0.00000000
+2 4 0.00000000
+3 4 0.00000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 4 0
+2 4 0
+3 4 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 4 0.00000000
+2 4 0.00000000
+3 4 0.00000000
+select std(s1/s2) from bug22555;
+std(s1/s2)
+0.21325764
+select std(o1/o2) from bug22555;
+std(o1/o2)
+0.21325763586649
+select std(e1/e2) from bug22555;
+std(e1/e2)
+0.21325764
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 4 0
+2 4 0
+3 4 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select round(std(s1/s2), 17) from bug22555;
+round(std(s1/s2), 17)
+0.21325763586649341
+select std(o1/o2) from bug22555;
+std(o1/o2)
+0.21325763586649
+select round(std(e1/e2), 17) from bug22555;
+round(std(e1/e2), 17)
+0.21325763586649341
+set div_precision_increment=20;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 4 0
+2 4 0
+3 4 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select round(std(s1/s2), 17) from bug22555;
+round(std(s1/s2), 17)
+0.21325763586649341
+select std(o1/o2) from bug22555;
+std(o1/o2)
+0.21325763586649
+select round(std(e1/e2), 17) from bug22555;
+round(std(e1/e2), 17)
+0.21325763586649341
+set @@div_precision_increment=@saved_div_precision_increment;
+drop table bug22555;
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (1,1,1),(2,2,2),(3,3,3),(6,6,6),(7,7,7);
+select var_samp(s), var_pop(s) from bug22555;
+var_samp(s) var_pop(s)
+6.7000 5.3600
+select var_samp(o), var_pop(o) from bug22555;
+var_samp(o) var_pop(o)
+6.7 5.36
+select var_samp(e), var_pop(e) from bug22555;
+var_samp(e) var_pop(e)
+6.7000 5.3600
+drop table bug22555;
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (null,null,null),(null,null,null);
+select var_samp(s) as 'null', var_pop(s) as 'null' from bug22555;
+null null
+NULL NULL
+select var_samp(o) as 'null', var_pop(o) as 'null' from bug22555;
+null null
+NULL NULL
+select var_samp(e) as 'null', var_pop(e) as 'null' from bug22555;
+null null
+NULL NULL
+insert into bug22555 values (1,1,1);
+select var_samp(s) as 'null', var_pop(s) as '0' from bug22555;
+null 0
+NULL 0.0000
+select var_samp(o) as 'null', var_pop(o) as '0' from bug22555;
+null 0
+NULL 0
+select var_samp(e) as 'null', var_pop(e) as '0' from bug22555;
+null 0
+NULL 0.0000
+insert into bug22555 values (2,2,2);
+select var_samp(s) as '0.5', var_pop(s) as '0.25' from bug22555;
+0.5 0.25
+0.5000 0.2500
+select var_samp(o) as '0.5', var_pop(o) as '0.25' from bug22555;
+0.5 0.25
+0.5 0.25
+select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555;
+0.5 0.25
+0.5000 0.2500
+drop table bug22555;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8);
INSERT INTO t1 SELECT a, b+8 FROM t1;
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index a172d04d880..38250173dd1 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -350,5 +350,9 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
some_id
1
2
+select some_id from t1 where some_id not in('-1', '0');
+some_id
+1
+2
drop table t1;
End of 5.0 tests
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index c1ac3e191d3..5c6162b7c28 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -134,4 +134,11 @@ timediff(b, a) >= '00:00:03'
drop table t2;
drop table t1;
set global query_cache_size=default;
+create table t1 select INET_ATON('255.255.0.1') as `a`;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` bigint(21) unsigned default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
End of 5.0 tests
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 14c61a2dd93..b5a9d4de105 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -1916,4 +1916,16 @@ CHAR(0xff,0x8f USING utf8) IS NULL
Warnings:
Error 1300 Invalid utf8 character string: 'FF8F'
SET SQL_MODE=@orig_sql_mode;
+select substring('abc', cast(2 as unsigned int));
+substring('abc', cast(2 as unsigned int))
+bc
+select repeat('a', cast(2 as unsigned int));
+repeat('a', cast(2 as unsigned int))
+aa
+select rpad('abc', cast(5 as unsigned integer), 'x');
+rpad('abc', cast(5 as unsigned integer), 'x')
+abcxx
+select lpad('abc', cast(5 as unsigned integer), 'x');
+lpad('abc', cast(5 as unsigned integer), 'x')
+xxabc
End of 5.0 tests
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index e8fd7a4e4c9..45c05f0b5b5 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1047,6 +1047,9 @@ union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
H
5
+select last_day('0000-00-00');
+last_day('0000-00-00')
+NULL
End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
@@ -1201,3 +1204,6 @@ fmtddate field2
Sep-4 12:00AM abcd
DROP TABLE testBug8868;
SET NAMES DEFAULT;
+select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
+str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
+NULL
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result
index e8134a50496..05d0d5634e6 100644
--- a/mysql-test/r/gis-rtree.result
+++ b/mysql-test/r/gis-rtree.result
@@ -881,3 +881,14 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
INSERT INTO t1(foo) VALUES ('');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
DROP TABLE t1;
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b POINT NOT NULL, KEY (a), SPATIAL KEY (b));
+INSERT INTO t1 (b) VALUES (GeomFromText('POINT(1 2)'));
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+DROP TABLE t1;
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 46aecde2cc5..870e160e563 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -673,6 +673,22 @@ POINT(10 10)
select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
(asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))))
POINT(10 10)
+create table t1 (g GEOMETRY);
+select * from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def test t1 t1 g g 255 4294967295 0 Y 144 0 63
+g
+select asbinary(g) from t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def asbinary(g) 252 8192 0 Y 128 0 63
+asbinary(g)
+drop table t1;
+create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
+alter table t1 disable keys;
+load data infile '../std_data_ln/bad_gis_data.dat' into table t1;
+ERROR 22004: Column was set to data type implicit default; NULL supplied for NOT NULL column 'b' at row 1
+alter table t1 enable keys;
+drop table t1;
create table t1 (s1 geometry not null,s2 char(100));
create trigger t1_bu before update on t1 for each row set new.s1 = null;
insert into t1 values (null,null);
@@ -696,16 +712,6 @@ alter table t1 add primary key pti(pt);
ERROR 42000: BLOB/TEXT column 'pt' used in key specification without a key length
alter table t1 add primary key pti(pt(20));
drop table t1;
-create table t1 (g GEOMETRY);
-select * from t1;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 g g 255 4294967295 0 Y 144 0 63
-g
-select asbinary(g) from t1;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def asbinary(g) 252 8192 0 Y 128 0 63
-asbinary(g)
-drop table t1;
create table t1 select GeomFromText('point(1 1)');
desc t1;
Field Type Null Key Default Extra
diff --git a/mysql-test/r/group_min_max.result b/mysql-test/r/group_min_max.result
index 0304919baf6..7583aa14db8 100644
--- a/mysql-test/r/group_min_max.result
+++ b/mysql-test/r/group_min_max.result
@@ -2162,3 +2162,127 @@ SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
MIN(c)
2
DROP TABLE t1,t2;
+CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
+INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
+(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by
+FLUSH STATUS;
+SELECT max(b), a FROM t1 GROUP BY a;
+max(b) a
+5 1
+3 2
+1 3
+6 4
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 8
+Handler_read_next 0
+EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by
+FLUSH STATUS;
+CREATE TABLE t2 SELECT max(b), a FROM t1 GROUP BY a;
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 8
+Handler_read_next 0
+FLUSH STATUS;
+SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b;
+max(b) a
+5 1
+3 2
+1 3
+6 4
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 8
+Handler_read_next 0
+FLUSH STATUS;
+(SELECT max(b), a FROM t1 GROUP BY a) UNION
+(SELECT max(b), a FROM t1 GROUP BY a);
+max(b) a
+5 1
+3 2
+1 3
+6 4
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 16
+Handler_read_next 0
+EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
+(SELECT max(b), a FROM t1 GROUP BY a);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 range NULL a 5 NULL 8 Using index for group-by
+2 UNION t1 range NULL a 5 NULL 8 Using index for group-by
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
+EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
+FROM t1 AS t1_outer;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
+(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1 index NULL a 10 NULL 8 Using index
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
+(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
+a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using where; Using index
+2 DEPENDENT SUBQUERY t1 index NULL a 10 NULL 8 Using index
+EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
+a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_outer range NULL a 5 NULL 8 Using index for group-by
+2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
+ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
+AND t1_outer1.b = t1_outer2.b;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index
+1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index
+2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
+FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using index
+2 SUBQUERY t1_outer index NULL a 10 NULL 15 Using index
+3 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
+CREATE TABLE t3 LIKE t1;
+FLUSH STATUS;
+INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 8
+Handler_read_next 0
+DELETE FROM t3;
+FLUSH STATUS;
+INSERT INTO t3 SELECT 1, (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2)
+FROM t1 LIMIT 1;
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 8
+Handler_read_next 0
+FLUSH STATUS;
+DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000;
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 8
+Handler_read_next 0
+FLUSH STATUS;
+DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
+FROM t1) > 10000;
+Warnings:
+Error 1242 Subquery returns more than 1 row
+SHOW STATUS LIKE 'handler_read__e%';
+Variable_name Value
+Handler_read_key 8
+Handler_read_next 1
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/r/have_mysql_upgrade.result b/mysql-test/r/have_mysql_upgrade.result
new file mode 100644
index 00000000000..952bea420f9
--- /dev/null
+++ b/mysql-test/r/have_mysql_upgrade.result
@@ -0,0 +1,2 @@
+have_mysql_upgrade
+1
diff --git a/mysql-test/r/index_merge.result b/mysql-test/r/index_merge.result
index 3f3360e2da0..9456b4ec978 100644
--- a/mysql-test/r/index_merge.result
+++ b/mysql-test/r/index_merge.result
@@ -284,7 +284,7 @@ NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
explain select * from (select * from t1 where key1 = 3 or key2 =3) as Z where key8 >5;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
-2 DERIVED t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where
+2 DERIVED t1 index_merge i1,i2 i1,i2 4,4 NULL 2 Using union(i1,i2); Using where; Using index
create table t3 like t0;
insert into t3 select * from t0;
alter table t3 add key9 int not null, add index i9(key9);
diff --git a/mysql-test/r/index_merge_ror.result b/mysql-test/r/index_merge_ror.result
index 69cd11d1dbf..5d08125be53 100644
--- a/mysql-test/r/index_merge_ror.result
+++ b/mysql-test/r/index_merge_ror.result
@@ -194,3 +194,14 @@ explain select a from t2 where a='ab';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref a a 6 const 1 Using where
drop table t2;
+CREATE TABLE t1(c1 INT, c2 INT DEFAULT 0, c3 CHAR(255) DEFAULT '',
+KEY(c1), KEY(c2), KEY(c3));
+INSERT INTO t1(c1) VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),
+(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0);
+INSERT INTO t1 VALUES(0,0,0);
+CREATE TABLE t2(c1 int);
+INSERT INTO t2 VALUES(1);
+DELETE t1 FROM t1,t2 WHERE t1.c1=0 AND t1.c2=0;
+SELECT * FROM t1;
+c1 c2 c3
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index 43eedc19f12..21d7bfb1b21 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -1027,7 +1027,7 @@ CREATE PROCEDURE p1 ()
BEGIN
SELECT 'foo' FROM DUAL;
END |
-ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema'
+ERROR 42000: Unknown database 'information_schema'
select ROUTINE_NAME from routines;
ROUTINE_NAME
grant all on information_schema.* to 'user1'@'localhost';
diff --git a/mysql-test/r/init_connect.result b/mysql-test/r/init_connect.result
index f90ee5913a1..f5ec0bdc932 100644
--- a/mysql-test/r/init_connect.result
+++ b/mysql-test/r/init_connect.result
@@ -132,7 +132,7 @@ x
17
19
drop trigger trg1;
-set global init_connect=default;
+set global init_connect="set @a='a\\0c'";
revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost;
drop table t1, t2;
diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result
index 012f9492d8d..f150af4b6c2 100644
--- a/mysql-test/r/innodb_mysql.result
+++ b/mysql-test/r/innodb_mysql.result
@@ -383,4 +383,40 @@ EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 128 Using filesort
DROP TABLE t1;
+show variables like 'innodb_rollback_on_timeout';
+Variable_name Value
+innodb_rollback_on_timeout OFF
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+5
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+5
+drop table t1;
End of 5.0 tests
diff --git a/mysql-test/r/innodb_timeout_rollback.result b/mysql-test/r/innodb_timeout_rollback.result
new file mode 100644
index 00000000000..b25a2bbd815
--- /dev/null
+++ b/mysql-test/r/innodb_timeout_rollback.result
@@ -0,0 +1,35 @@
+show variables like 'innodb_rollback_on_timeout';
+Variable_name Value
+innodb_rollback_on_timeout ON
+create table t1 (a int unsigned not null primary key) engine = innodb;
+insert into t1 values (1);
+commit;
+begin work;
+insert into t1 values (2);
+select * from t1;
+a
+1
+2
+begin work;
+insert into t1 values (5);
+select * from t1;
+a
+1
+5
+insert into t1 values (2);
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+select * from t1;
+a
+1
+commit;
+select * from t1;
+a
+1
+2
+commit;
+select * from t1;
+a
+1
+2
+drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 80723d68b5a..78ef6fbccba 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -299,12 +299,6 @@ select count(*) from t2;
count(*)
25500
drop table t1,t2,t3;
-create table t1 (n int);
-create view v1 as select * from t1;
-insert delayed into v1 values (1);
-ERROR HY000: 'test.v1' is not BASE TABLE
-drop table t1;
-drop view v1;
create table t1 (id int primary key, data int);
insert into t1 values (1, 1), (2, 2), (3, 3);
select row_count();
diff --git a/mysql-test/r/insert_notembedded.result b/mysql-test/r/insert_notembedded.result
new file mode 100644
index 00000000000..816060b7ec9
--- /dev/null
+++ b/mysql-test/r/insert_notembedded.result
@@ -0,0 +1,107 @@
+drop table if exists t1;
+create table t1 (n int);
+create view v1 as select * from t1;
+insert delayed into v1 values (1);
+ERROR HY000: 'test.v1' is not BASE TABLE
+drop table t1;
+drop view v1;
+CREATE DATABASE meow;
+CREATE TABLE table_target ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
+CREATE TABLE table_target2 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
+CREATE TABLE table_target3 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
+CREATE VIEW view_target2 AS SELECT mexs_id,messzeit FROM table_target2;
+CREATE SQL SECURITY INVOKER VIEW view_target3 AS SELECT mexs_id,messzeit FROM table_target3;
+CREATE TABLE table_stations ( mexs_id VARCHAR(8), icao VARCHAR(4), country CHAR(2), PRIMARY KEY (mexs_id), UNIQUE KEY icao (icao), KEY country (country), CONSTRAINT stations_ibfk_8 FOREIGN KEY (country) REFERENCES countries (country) ON UPDATE CASCADE);
+INSERT INTO table_stations VALUES ('87654321','XXXX','YY');
+CREATE TABLE table_countries ( country CHAR(2), iso_short_en VARCHAR(64), PRIMARY KEY (country));
+INSERT INTO table_countries VALUES ('YY','Entenhausen');
+CREATE ALGORITHM=MERGE SQL SECURITY INVOKER VIEW view_stations AS select table_stations.mexs_id AS mexs_id, table_stations.icao AS icao, table_stations.country AS landescode from (table_stations join table_countries on((table_stations.country = table_countries.country)));
+CREATE TABLE table_source ( id varchar(4), datetime TIMESTAMP, PRIMARY KEY (id));
+INSERT INTO table_source VALUES ('XXXX','2006-07-12 07:50:00');
+GRANT SELECT ON table_source TO user20989@localhost;
+GRANT SELECT ON table_countries TO user20989@localhost;
+GRANT SELECT ON table_stations TO user20989@localhost;
+GRANT SELECT ON view_stations TO user20989@localhost;
+GRANT SELECT ON table_target TO user20989@localhost;
+GRANT SELECT ON table_target2 TO user20989@localhost;
+GRANT INSERT,DELETE,SELECT ON view_target3 TO user20989@localhost;
+REPLACE INTO table_target
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN table_target AS old
+USING (mexs_id);
+ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target'
+REPLACE INTO view_target2
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target2 AS old
+USING (mexs_id);
+ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'view_target2'
+REPLACE INTO view_target3
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target3 AS old
+USING (mexs_id);
+ERROR HY000: View 'meow.view_target3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+GRANT INSERT,DELETE ON table_target TO user20989@localhost;
+GRANT INSERT,DELETE,SELECT ON view_target2 TO user20989@localhost;
+GRANT INSERT,DELETE,SELECT ON table_target3 TO user20989@localhost;
+REPLACE INTO table_target
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN table_target AS old
+USING (mexs_id);
+REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00');
+ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target2'
+REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00');
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target2 AS old
+USING (mexs_id);
+mexs_id messzeit
+87654321 2006-07-12 07:50:00
+REPLACE INTO view_target2
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target2 AS old
+USING (mexs_id);
+REPLACE INTO view_target3
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target3 AS old
+USING (mexs_id);
+SELECT * FROM table_target;
+mexs_id messzeit
+87654321 2006-07-12 07:50:00
+SELECT * FROM view_target2;
+mexs_id messzeit
+12X45Y78 2006-07-12 07:50:00
+87654321 2006-07-12 07:50:00
+SELECT * FROM view_target3;
+mexs_id messzeit
+87654321 2006-07-12 07:50:00
+DROP VIEW view_stations;
+DROP TABLE table_source;
+DROP TABLE table_countries;
+DROP TABLE table_stations;
+DROP TABLE table_target;
+DROP TABLE table_target2;
+DROP TABLE table_target3;
+DROP VIEW view_target2;
+DROP VIEW view_target3;
+DROP USER user20989@localhost;
+DROP DATABASE meow;
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 0af48d27cd5..1453d25ac75 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -705,103 +705,3 @@ use bug21774_1;
INSERT INTO bug21774_2.t1 SELECT t1.* FROM t1;
DROP DATABASE bug21774_1;
DROP DATABASE bug21774_2;
-CREATE DATABASE meow;
-CREATE TABLE table_target ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE TABLE table_target2 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE TABLE table_target3 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE VIEW view_target2 AS SELECT mexs_id,messzeit FROM table_target2;
-CREATE SQL SECURITY INVOKER VIEW view_target3 AS SELECT mexs_id,messzeit FROM table_target3;
-CREATE TABLE table_stations ( mexs_id VARCHAR(8), icao VARCHAR(4), country CHAR(2), PRIMARY KEY (mexs_id), UNIQUE KEY icao (icao), KEY country (country), CONSTRAINT stations_ibfk_8 FOREIGN KEY (country) REFERENCES countries (country) ON UPDATE CASCADE);
-INSERT INTO table_stations VALUES ('87654321','XXXX','YY');
-CREATE TABLE table_countries ( country CHAR(2), iso_short_en VARCHAR(64), PRIMARY KEY (country));
-INSERT INTO table_countries VALUES ('YY','Entenhausen');
-CREATE ALGORITHM=MERGE SQL SECURITY INVOKER VIEW view_stations AS select table_stations.mexs_id AS mexs_id, table_stations.icao AS icao, table_stations.country AS landescode from (table_stations join table_countries on((table_stations.country = table_countries.country)));
-CREATE TABLE table_source ( id varchar(4), datetime TIMESTAMP, PRIMARY KEY (id));
-INSERT INTO table_source VALUES ('XXXX','2006-07-12 07:50:00');
-GRANT SELECT ON table_source TO user20989@localhost;
-GRANT SELECT ON table_countries TO user20989@localhost;
-GRANT SELECT ON table_stations TO user20989@localhost;
-GRANT SELECT ON view_stations TO user20989@localhost;
-GRANT SELECT ON table_target TO user20989@localhost;
-GRANT SELECT ON table_target2 TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON view_target3 TO user20989@localhost;
-REPLACE INTO table_target
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN table_target AS old
-USING (mexs_id);
-ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target'
-REPLACE INTO view_target2
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'view_target2'
-REPLACE INTO view_target3
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target3 AS old
-USING (mexs_id);
-ERROR HY000: View 'meow.view_target3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
-GRANT INSERT,DELETE ON table_target TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON view_target2 TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON table_target3 TO user20989@localhost;
-REPLACE INTO table_target
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN table_target AS old
-USING (mexs_id);
-REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00');
-ERROR 42000: INSERT,DELETE command denied to user 'user20989'@'localhost' for table 'table_target2'
-REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00');
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-mexs_id messzeit
-87654321 2006-07-12 07:50:00
-REPLACE INTO view_target2
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-REPLACE INTO view_target3
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target3 AS old
-USING (mexs_id);
-SELECT * FROM table_target;
-mexs_id messzeit
-87654321 2006-07-12 07:50:00
-SELECT * FROM view_target2;
-mexs_id messzeit
-12X45Y78 2006-07-12 07:50:00
-87654321 2006-07-12 07:50:00
-SELECT * FROM view_target3;
-mexs_id messzeit
-87654321 2006-07-12 07:50:00
-DROP VIEW view_stations;
-DROP TABLE table_source;
-DROP TABLE table_countries;
-DROP TABLE table_stations;
-DROP TABLE table_target;
-DROP TABLE table_target2;
-DROP TABLE table_target3;
-DROP VIEW view_target2;
-DROP VIEW view_target3;
-DROP USER user20989@localhost;
-DROP DATABASE meow;
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index 48b7730481f..f3114dc55dd 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -700,8 +700,8 @@ ERROR 42S22: Unknown column 't1.b' in 'on clause'
select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
-user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references
-user User NULL mysql 0 mysql PRIMARY 2 A 5 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
+user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
+user User NULL mysql 0 mysql PRIMARY 2 A 5 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
drop table t1;
drop table t2;
drop table t3;
@@ -764,3 +764,19 @@ natural join t5;
y c b a z
1 3 2 1 4
drop table t1, t2, t3, t4, t5;
+CREATE TABLE t1 (ID INTEGER, Name VARCHAR(50));
+CREATE TABLE t2 (Test_ID INTEGER);
+CREATE VIEW v1 (Test_ID, Description) AS SELECT ID, Name FROM t1;
+CREATE TABLE tv1 SELECT Description AS Name FROM v1 JOIN t2
+USING (Test_ID);
+DESCRIBE tv1;
+Field Type Null Key Default Extra
+Name varchar(50) YES NULL
+CREATE TABLE tv2 SELECT Description AS Name FROM v1 JOIN t2
+ON v1.Test_ID = t2.Test_ID;
+DESCRIBE tv2;
+Field Type Null Key Default Extra
+Name varchar(50) YES NULL
+DROP VIEW v1;
+DROP TABLE t1,t2,tv1,tv2;
+End of 5.0 tests.
diff --git a/mysql-test/r/join_nested.result b/mysql-test/r/join_nested.result
index 0747418111b..f5c98f383b7 100644
--- a/mysql-test/r/join_nested.result
+++ b/mysql-test/r/join_nested.result
@@ -1562,3 +1562,46 @@ id ngroupbynsa
2 1
2 1
DROP TABLE t1,t2,t3,t4,t5;
+CREATE TABLE t1 (
+id int NOT NULL PRIMARY KEY,
+ct int DEFAULT NULL,
+pc int DEFAULT NULL,
+INDEX idx_ct (ct),
+INDEX idx_pc (pc)
+);
+INSERT INTO t1 VALUES
+(1,NULL,NULL),(2,NULL,NULL),(3,NULL,NULL),(4,NULL,NULL),(5,NULL,NULL);
+CREATE TABLE t2 (
+id int NOT NULL PRIMARY KEY,
+sr int NOT NULL,
+nm varchar(255) NOT NULL,
+INDEX idx_sr (sr)
+);
+INSERT INTO t2 VALUES
+(2441905,4308,'LesAbymes'),(2441906,4308,'Anse-Bertrand');
+CREATE TABLE t3 (
+id int NOT NULL PRIMARY KEY,
+ct int NOT NULL,
+ln int NOT NULL,
+INDEX idx_ct (ct),
+INDEX idx_ln (ln)
+);
+CREATE TABLE t4 (
+id int NOT NULL PRIMARY KEY,
+nm varchar(255) NOT NULL
+);
+INSERT INTO t4 VALUES (4308,'Guadeloupe'),(4309,'Martinique');
+SELECT t1.*
+FROM t1 LEFT JOIN
+(t2 LEFT JOIN t3 ON t3.ct=t2.id AND t3.ln='5') ON t1.ct=t2.id
+WHERE t1.id='5';
+id ct pc
+5 NULL NULL
+SELECT t1.*, t4.nm
+FROM t1 LEFT JOIN
+(t2 LEFT JOIN t3 ON t3.ct=t2.id AND t3.ln='5') ON t1.ct=t2.id
+LEFT JOIN t4 ON t2.sr=t4.id
+WHERE t1.id='5';
+id ct pc nm
+5 NULL NULL NULL
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result
index 406a92b9a08..a1bf3d0e128 100644
--- a/mysql-test/r/key_cache.result
+++ b/mysql-test/r/key_cache.result
@@ -284,12 +284,15 @@ insert t1 values ('aaabbb');
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
+set @my_key_cache_block_size= @@global.key_cache_block_size;
set GLOBAL key_cache_block_size=2048;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
+set global key_cache_block_size= @my_key_cache_block_size;
CREATE TABLE t1(a int NOT NULL AUTO_INCREMENT PRIMARY KEY);
+SET @my_key_cache_block_size= @@global.key_cache_block_size;
SET GLOBAL key_cache_block_size=1536;
INSERT INTO t1 VALUES (1);
SELECT @@key_cache_block_size;
@@ -331,6 +334,7 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1,t2;
+set global key_cache_block_size= @my_key_cache_block_size;
set @@global.key_buffer_size=0;
Warnings:
Warning 1438 Cannot drop default keycache
diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result
index be2776ef533..ac96ac8ff17 100644
--- a/mysql-test/r/limit.result
+++ b/mysql-test/r/limit.result
@@ -90,3 +90,4 @@ id select_type table type possible_keys key key_len ref rows Extra
select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
c
28
+drop table t1;
diff --git a/mysql-test/r/lowercase_fs_off.result b/mysql-test/r/lowercase_fs_off.result
index f610b959a47..ecb21261987 100644
--- a/mysql-test/r/lowercase_fs_off.result
+++ b/mysql-test/r/lowercase_fs_off.result
@@ -8,4 +8,5 @@ create database d2;
ERROR 42000: Access denied for user 'sample'@'localhost' to database 'd2'
create database D1;
ERROR 42000: Access denied for user 'sample'@'localhost' to database 'D1'
+drop user 'sample'@'localhost';
drop database if exists d1;
diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result
index 6c19c429296..a8b132ae927 100644
--- a/mysql-test/r/mix_innodb_myisam_binlog.result
+++ b/mysql-test/r/mix_innodb_myisam_binlog.result
@@ -275,8 +275,8 @@ is not null;
is not null
1
select
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
@a not like "%#%error_code=%error_code=%";
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
1 1
drop table t1, t2;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 2ea317754ec..0f6e0ad537a 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -922,6 +922,28 @@ SET @@myisam_repair_threads=1;
SHOW VARIABLES LIKE 'myisam_repair%';
Variable_name Value
myisam_repair_threads 1
+CREATE TABLE t1(a VARCHAR(16));
+INSERT INTO t1 VALUES('aaaaaaaa'),(NULL);
+UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa';
+SELECT * FROM t1;
+a
+aaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaa
+DROP TABLE t1;
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(1),(2);
+UPDATE t1,t1 AS t2 SET t1.a=t1.a+2 WHERE t1.a=t2.a-1;
+SELECT * FROM t1 ORDER BY a;
+a
+2
+3
+DROP TABLE t1;
+CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100;
+SHOW TABLE STATUS LIKE 't1';
+Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
+t1 MyISAM 10 Dynamic X X X 72057594037927935 X X X X X X latin1_swedish_ci X max_rows=4100100100 avg_row_length=70100
+DROP TABLE t1;
+End of 4.1 tests
set storage_engine=MyISAM;
drop table if exists t1,t2,t3;
--- Testing varchar ---
@@ -1608,16 +1630,4 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1
drop table t1, t2, t3;
-show create table t1;
-show create table t1;
-create table t1 (a int) engine=myisam select 42 a;
-select * from t1;
-a
-9
-select * from t1;
-a
-99
-select * from t1;
-a
-42
-drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result
index 14267afc27e..3bba1944c52 100644
--- a/mysql-test/r/mysql.result
+++ b/mysql-test/r/mysql.result
@@ -36,6 +36,8 @@ Tables_in_test
t1
t2
t3
+Tables_in_test
+t1
_
Test delimiter : from command line
a
@@ -178,4 +180,8 @@ Too long dbname
ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
Too long hostname
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
+1
+1
+ERROR at line 1: DELIMITER cannot contain a backslash character
+ERROR at line 1: DELIMITER cannot contain a backslash character
End of 5.0 tests
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result
new file mode 100644
index 00000000000..1f93d727561
--- /dev/null
+++ b/mysql-test/r/mysql_upgrade.result
@@ -0,0 +1,127 @@
+Run mysql_upgrade once
+mysql.columns_priv OK
+mysql.db OK
+mysql.func OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+@hadGrantPriv:=1
+1
+1
+1
+1
+1
+@hadShowDbPriv:=1
+1
+1
+1
+1
+1
+@hadCreateViewPriv:=1
+1
+1
+1
+1
+1
+@hadCreateRoutinePriv:=1
+1
+1
+1
+1
+1
+@hadCreateUserPriv:=1
+1
+1
+1
+1
+1
+Run it again - should say already completed
+@hadGrantPriv:=1
+1
+1
+1
+1
+1
+@hadShowDbPriv:=1
+1
+1
+1
+1
+1
+@hadCreateViewPriv:=1
+1
+1
+1
+1
+1
+@hadCreateRoutinePriv:=1
+1
+1
+1
+1
+1
+@hadCreateUserPriv:=1
+1
+1
+1
+1
+1
+Force should run it regardless of wheter it's been run before
+mysql.columns_priv OK
+mysql.db OK
+mysql.func OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+@hadGrantPriv:=1
+1
+1
+1
+1
+1
+@hadShowDbPriv:=1
+1
+1
+1
+1
+1
+@hadCreateViewPriv:=1
+1
+1
+1
+1
+1
+@hadCreateRoutinePriv:=1
+1
+1
+1
+1
+1
+@hadCreateUserPriv:=1
+1
+1
+1
+1
+1
diff --git a/mysql-test/r/mysqladmin.result b/mysql-test/r/mysqladmin.result
new file mode 100644
index 00000000000..57927f8aa67
--- /dev/null
+++ b/mysql-test/r/mysqladmin.result
@@ -0,0 +1,4 @@
+mysqld is alive
+mysqladmin: unknown variable 'database=db1'
+Warning: mysqladmin: unknown variable 'loose-database=db2'
+mysqld is alive
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index c3be791b523..b2571ec5d12 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -15,31 +15,33 @@ flush logs;
--- Local --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-drop table if exists t1,t2;
-SET TIMESTAMP=1000000000;
-create table t1 (word varchar(20));
-SET TIMESTAMP=1000000000;
-create table t2 (id int auto_increment not null primary key);
-SET TIMESTAMP=1000000000;
-insert into t1 values ("abirvalg");
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-insert into t2 values ();
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+drop table if exists t1,t2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t1 (word varchar(20))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t2 (id int auto_increment not null primary key)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 values ("abirvalg")/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t2 values ()/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -47,13 +49,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- Broken LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -61,8 +65,10 @@ ROLLBACK /* added by mysqlbinlog */;
--- --database --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -70,13 +76,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- --position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -84,31 +92,33 @@ ROLLBACK /* added by mysqlbinlog */;
--- Remote --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-drop table if exists t1,t2;
-SET TIMESTAMP=1000000000;
-create table t1 (word varchar(20));
-SET TIMESTAMP=1000000000;
-create table t2 (id int auto_increment not null primary key);
-SET TIMESTAMP=1000000000;
-insert into t1 values ("abirvalg");
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-insert into t2 values ();
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+drop table if exists t1,t2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t1 (word varchar(20))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t2 (id int auto_increment not null primary key)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 values ("abirvalg")/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t2 values ()/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -116,13 +126,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- Broken LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -130,8 +142,10 @@ ROLLBACK /* added by mysqlbinlog */;
--- --database --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -139,13 +153,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- --position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -153,22 +169,26 @@ ROLLBACK /* added by mysqlbinlog */;
--- reading stdin --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1108844556;
-BEGIN;
-SET TIMESTAMP=1108844555;
-insert t1 values (1);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1108844556/*!*/;
+BEGIN/*!*/;
+SET TIMESTAMP=1108844555/*!*/;
+insert t1 values (1)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1108844556;
-BEGIN;
-SET TIMESTAMP=1108844555;
-insert t1 values (1);
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1108844556/*!*/;
+BEGIN/*!*/;
+SET TIMESTAMP=1108844555/*!*/;
+insert t1 values (1)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -194,4 +214,59 @@ select * from t5 /* must be (1),(1) */;
a
1
1
+flush logs;
+drop table if exists t5;
+create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
+insert into t5 values (1, date_format('2001-01-01','%W'));
+set lc_time_names=de_DE;
+insert into t5 values (2, date_format('2001-01-01','%W'));
+set lc_time_names=en_US;
+insert into t5 values (3, date_format('2001-01-01','%W'));
+select * from t5 order by c1;
+c1 c2
+1 Monday
+2 Montag
+3 Monday
+flush logs;
+drop table t5;
+select * from t5 order by c1;
+c1 c2
+1 Monday
+2 Montag
+3 Monday
+drop procedure if exists p1;
+flush logs;
+create procedure p1()
+begin
+select 1;
+end;
+//
+flush logs;
+call p1();
+1
+1
+drop procedure p1;
+call p1();
+ERROR 42000: PROCEDURE test.p1 does not exist
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+CREATE DEFINER=`root`@`localhost` procedure p1()
+begin
+select 1;
+end/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+call p1();
+1
+1
+drop procedure p1;
drop table t1, t2, t03, t04, t3, t4, t5;
diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result
index 4d6be811037..51ca19654c7 100644
--- a/mysql-test/r/mysqlbinlog2.result
+++ b/mysql-test/r/mysqlbinlog2.result
@@ -17,29 +17,31 @@ insert into t1 values(null, "f");
--- Local --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -47,27 +49,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -75,17 +79,19 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -93,23 +99,25 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -117,21 +125,23 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -139,20 +149,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -160,37 +172,41 @@ ROLLBACK /* added by mysqlbinlog */;
--- Local with 2 binlogs on command line --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -198,35 +214,39 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -234,25 +254,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -260,30 +284,34 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -291,29 +319,33 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -321,20 +353,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -342,29 +376,31 @@ ROLLBACK /* added by mysqlbinlog */;
--- Remote --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -372,27 +408,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -400,17 +438,19 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -418,23 +458,25 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -442,21 +484,23 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -464,20 +508,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -485,37 +531,41 @@ ROLLBACK /* added by mysqlbinlog */;
--- Remote with 2 binlogs on command line --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -523,35 +573,39 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -559,25 +613,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -585,30 +643,34 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -616,29 +678,33 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -646,20 +712,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -667,32 +735,34 @@ ROLLBACK /* added by mysqlbinlog */;
--- to-last-log --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-SET TIMESTAMP=1579609943;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+SET INSERT_ID=6/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 54583febbc8..2d32984e4ef 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -1786,6 +1786,78 @@ CREATE TABLE `t1` (
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
drop table t1;
+#
+# BUG#13926: --order-by-primary fails if PKEY contains quote character
+#
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+`a b` INT,
+`c"d` INT,
+`e``f` INT,
+PRIMARY KEY (`a b`, `c"d`, `e``f`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+insert into t1 values (0815, 4711, 2006);
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS "t1";
+CREATE TABLE "t1" (
+ "a b" int(11) NOT NULL default '0',
+ "c""d" int(11) NOT NULL default '0',
+ "e`f" int(11) NOT NULL default '0',
+ PRIMARY KEY ("a b","c""d","e`f")
+);
+
+LOCK TABLES "t1" WRITE;
+/*!40000 ALTER TABLE "t1" DISABLE KEYS */;
+INSERT INTO "t1" VALUES (815,4711,2006);
+/*!40000 ALTER TABLE "t1" ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+ `a b` int(11) NOT NULL default '0',
+ `c"d` int(11) NOT NULL default '0',
+ `e``f` int(11) NOT NULL default '0',
+ PRIMARY KEY (`a b`,`c"d`,`e``f`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+LOCK TABLES `t1` WRITE;
+/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
+INSERT INTO `t1` VALUES (815,4711,2006);
+/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+DROP TABLE `t1`;
End of 4.1 tests
#
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
@@ -3089,7 +3161,7 @@ drop user mysqltest_1@localhost;
#
create database mysqldump_myDB;
use mysqldump_myDB;
-create user myDB_User;
+create user myDB_User@localhost;
grant create, create view, select, insert on mysqldump_myDB.* to myDB_User@localhost;
create table t1 (c1 int);
insert into t1 values (3);
@@ -3102,7 +3174,7 @@ drop view v1;
drop table t1;
drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
-drop user myDB_User;
+drop user myDB_User@localhost;
drop database mysqldump_myDB;
flush privileges;
# Bug #21424 continues from here.
@@ -3120,82 +3192,10 @@ drop view v1;
drop table t1;
drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
-drop user myDB_User;
+drop user myDB_User@localhost;
drop database mysqldump_myDB;
use test;
#
-# BUG#13926: --order-by-primary fails if PKEY contains quote character
-#
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
-`a b` INT,
-`c"d` INT,
-`e``f` INT,
-PRIMARY KEY (`a b`, `c"d`, `e``f`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-insert into t1 values (0815, 4711, 2006);
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS "t1";
-CREATE TABLE "t1" (
- "a b" int(11) NOT NULL default '0',
- "c""d" int(11) NOT NULL default '0',
- "e`f" int(11) NOT NULL default '0',
- PRIMARY KEY ("a b","c""d","e`f")
-);
-
-LOCK TABLES "t1" WRITE;
-/*!40000 ALTER TABLE "t1" DISABLE KEYS */;
-INSERT INTO "t1" VALUES (815,4711,2006);
-/*!40000 ALTER TABLE "t1" ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
- `a b` int(11) NOT NULL default '0',
- `c"d` int(11) NOT NULL default '0',
- `e``f` int(11) NOT NULL default '0',
- PRIMARY KEY (`a b`,`c"d`,`e``f`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-LOCK TABLES `t1` WRITE;
-/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (815,4711,2006);
-/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-DROP TABLE `t1`;
-#
# Bug #19745: mysqldump --xml produces invalid xml
#
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index 1cfc482416e..12a35fcf48b 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -512,6 +512,12 @@ mysqltest: At line 1: End of line junk detected: "write_file filename ";
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
+mysqltest: At line 1: Missing required argument 'mode' to command 'chmod'
+mysqltest: At line 1: You must write a 4 digit octal number for mode
+mysqltest: At line 1: You must write a 4 digit octal number for mode
+mysqltest: At line 1: Missing required argument 'file' to command 'chmod'
+mysqltest: At line 1: You must write a 4 digit octal number for mode
+mysqltest: At line 1: You must write a 4 digit octal number for mode
hello
hello
hello
diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result
index d2111db24fe..fab10867acd 100644
--- a/mysql-test/r/ndb_basic.result
+++ b/mysql-test/r/ndb_basic.result
@@ -749,3 +749,19 @@ f1 f2 f3
222222 bbbbbb 2
drop table t1;
Illegal ndb error code: 1186
+CREATE TABLE t1 (
+a VARBINARY(40) NOT NULL,
+b VARCHAR (256) CHARACTER SET UTF8 NOT NULL,
+c VARCHAR(256) CHARACTER SET UTF8 NOT NULL,
+PRIMARY KEY (b,c)) ENGINE=ndbcluster;
+INSERT INTO t1 VALUES
+("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc");
+SELECT * FROM t1 ORDER BY a;
+a b c
+a ab abc
+b abc abcd
+c abc ab
+d ab ab
+e abc abc
+DROP TABLE t1;
+End of 5.0 tests
diff --git a/mysql-test/r/ndb_index_ordered.result b/mysql-test/r/ndb_index_ordered.result
index 36bac7b0f9d..b3e55a23073 100644
--- a/mysql-test/r/ndb_index_ordered.result
+++ b/mysql-test/r/ndb_index_ordered.result
@@ -658,3 +658,11 @@ insert into t1 (a, c) values (1,'aaa'),(3,'bbb');
select count(*) from t1 where c<'bbb';
count(*)
1
+create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
+CountryCode char(3) NOT NULL,
+DishTitle varchar(64) NOT NULL,
+calories smallint(5) unsigned DEFAULT NULL,
+PRIMARY KEY (DishID),
+INDEX i USING HASH (countrycode,calories)
+) ENGINE=ndbcluster;
+ERROR HY000: Can't create table './test/nationaldish.frm' (errno: 138)
diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result
index ce4759ad553..670fbe5b4e0 100644
--- a/mysql-test/r/ndb_index_unique.result
+++ b/mysql-test/r/ndb_index_unique.result
@@ -133,6 +133,21 @@ a b c
6 7 2
7 8 3
8 2 3
+create unique index bi using hash on t2(b);
+insert into t2 values(9, 3, 1);
+ERROR 23000: Duplicate entry '' for key 0
+alter table t2 drop index bi;
+insert into t2 values(9, 3, 1);
+select * from t2 order by a;
+a b c
+2 3 5
+3 4 6
+4 5 8
+5 6 2
+6 7 2
+7 8 3
+8 2 3
+9 3 1
drop table t2;
CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
@@ -140,7 +155,40 @@ b int unsigned not null,
c int unsigned,
UNIQUE USING HASH (b, c)
) engine=ndbcluster;
-ERROR 42000: Column 'c' is used with UNIQUE or INDEX but is not defined as NOT NULL
+Warnings:
+Warning 1121 Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan
+insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL);
+select * from t2 where c IS NULL order by a;
+a b c
+1 1 NULL
+3 3 NULL
+5 5 NULL
+7 7 NULL
+8 3 NULL
+9 3 NULL
+select * from t2 where b = 3 AND c IS NULL order by a;
+a b c
+3 3 NULL
+8 3 NULL
+9 3 NULL
+select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a;
+a b c
+3 3 NULL
+5 5 NULL
+8 3 NULL
+9 3 NULL
+set @old_ecpd = @@session.engine_condition_pushdown;
+set engine_condition_pushdown = true;
+explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 range PRIMARY,b PRIMARY 4 NULL 1 Using where with pushed condition
+select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
+a b c
+3 3 NULL
+5 5 NULL
+8 3 NULL
+set engine_condition_pushdown = @old_ecpd;
+drop table t2;
CREATE TABLE t3 (
a int unsigned NOT NULL,
b int unsigned not null,
diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result
index 2c212b9cfef..d5875cb4d47 100644
--- a/mysql-test/r/ndb_lock.result
+++ b/mysql-test/r/ndb_lock.result
@@ -87,11 +87,27 @@ x y z
rollback;
commit;
begin;
+select * from t1 where y = 'one' or y = 'three' for update;
+x y z
+# # #
+# # #
+begin;
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
+select * from t1 where x = 1 for update;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+commit;
+begin;
select * from t1 where y = 'one' or y = 'three' order by x for update;
x y z
1 one 1
3 three 3
begin;
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
@@ -124,6 +140,22 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
commit;
begin;
+select * from t1 where y = 'one' or y = 'three' lock in share mode;
+x y z
+# # #
+# # #
+begin;
+select * from t1 where y = 'one' lock in share mode;
+x y z
+1 one 1
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
+select * from t1 where x = 1 for update;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+commit;
+begin;
select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
x y z
1 one 1
@@ -132,6 +164,9 @@ begin;
select * from t1 where y = 'one' lock in share mode;
x y z
1 one 1
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
diff --git a/mysql-test/r/ndb_read_multi_range.result b/mysql-test/r/ndb_read_multi_range.result
index 9941d2b28a3..e2a076ef99f 100644
--- a/mysql-test/r/ndb_read_multi_range.result
+++ b/mysql-test/r/ndb_read_multi_range.result
@@ -367,3 +367,17 @@ a b c
406994 67 2006-02-27 11:26:46
406995 67 2006-02-28 11:55:00
DROP TABLE t1, t11, t12, t21, t22;
+CREATE TABLE t1 (id varchar(255) NOT NULL,
+tag int(11) NOT NULL,
+doc text NOT NULL,
+type varchar(150) NOT NULL,
+modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+PRIMARY KEY (id)
+) ENGINE=ndbcluster;
+INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP);
+SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka');
+id tag doc type
+SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila');
+id tag doc type
+sakila 1 Some text goes here text
+DROP TABLE t1;
diff --git a/mysql-test/r/ndb_types.result b/mysql-test/r/ndb_types.result
index 6938277f01d..ec2858d818a 100644
--- a/mysql-test/r/ndb_types.result
+++ b/mysql-test/r/ndb_types.result
@@ -73,3 +73,4 @@ select time_stamp>@now from t1;
time_stamp>@now
1
drop table t1;
+End of 4.1 tests
diff --git a/mysql-test/r/ndb_update.result b/mysql-test/r/ndb_update.result
index 164d1bd700c..d75f82172ae 100644
--- a/mysql-test/r/ndb_update.result
+++ b/mysql-test/r/ndb_update.result
@@ -17,8 +17,17 @@ pk1 b c
0 0 0
2 2 2
4 1 1
+UPDATE t1 set pk1 = 4 where pk1 = 2;
+ERROR 23000: Duplicate entry '4' for key 1
+UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
+select * from t1 order by pk1;
+pk1 b c
+0 0 0
+2 2 2
+4 1 1
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
ERROR 23000: Duplicate entry '' for key 0
+UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
pk1 b c
0 0 0
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index 7b04c1acdc0..e81d46c9199 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -29,14 +29,14 @@ INSERT INTO t2 VALUES (7,'Liste des t2','t2_liste_form.phtml',51060,'link.gif');
INSERT INTO t2 VALUES (8,'Consulter les soumissions','consulter_soumissions.phtml',200,'link.gif');
INSERT INTO t2 VALUES (9,'Ajouter un type de materiel','typeMateriel_ajoute_form.phtml',51000,'link.gif');
INSERT INTO t2 VALUES (10,'Lister/modifier un type de materiel','typeMateriel_liste_form.phtml',51010,'link.gif');
-INSERT INTO t2 VALUES (3,'Créer une fiche de client','clients_ajoute_form.phtml',40000,'link.gif');
+INSERT INTO t2 VALUES (3,'Créer une fiche de client','clients_ajoute_form.phtml',40000,'link.gif');
INSERT INTO t2 VALUES (4,'Modifier des clients','en_construction.html',40010,'link.gif');
INSERT INTO t2 VALUES (5,'Effacer des clients','en_construction.html',40020,'link.gif');
INSERT INTO t2 VALUES (6,'Ajouter un service','t2_ajoute_form.phtml',51050,'link.gif');
select t1.id,t1.idservice,t2.ordre,t2.description from t1, t2 where t1.id = 2 and t1.idservice = t2.id order by t2.ordre;
id idservice ordre description
2 1 10 Emettre un appel d'offres
-2 3 40000 Créer une fiche de client
+2 3 40000 Créer une fiche de client
2 4 40010 Modifier des clients
2 5 40020 Effacer des clients
2 6 51050 Ajouter un service
@@ -874,6 +874,14 @@ num (select num + 2 FROM t1 LIMIT 1)
SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a;
ERROR 42S22: Unknown column 'num' in 'on clause'
DROP TABLE t1;
+CREATE TABLE t1 (a int);
+SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
+val val1
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val;
+ERROR 23000: Column 'val' in order clause is ambiguous
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1;
+ERROR 23000: Column 'val' in order clause is ambiguous
+DROP TABLE t1;
create table t1 (a int not null, b int not null, c int not null);
insert t1 values (1,1,1),(1,1,2),(1,2,1);
select a, b from t1 group by a, b order by sum(c);
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index eb07bb8e672..20bff6bda1c 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -1055,6 +1055,65 @@ EXECUTE stmt USING @a;
0 0
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
+DROP TABLE IF EXISTS t1, t2;
+CREATE TABLE t1 (i INT);
+PREPARE st_19182
+FROM "CREATE TABLE t2 (i INT, j INT, KEY (i), KEY(j)) SELECT i FROM t1";
+EXECUTE st_19182;
+DESC t2;
+Field Type Null Key Default Extra
+j int(11) YES MUL NULL
+i int(11) YES MUL NULL
+DROP TABLE t2;
+EXECUTE st_19182;
+DESC t2;
+Field Type Null Key Default Extra
+j int(11) YES MUL NULL
+i int(11) YES MUL NULL
+DEALLOCATE PREPARE st_19182;
+DROP TABLE t2, t1;
+drop database if exists mysqltest;
+drop table if exists t1, t2;
+create database mysqltest character set utf8;
+prepare stmt1 from "create table mysqltest.t1 (c char(10))";
+prepare stmt2 from "create table mysqltest.t2 select 'test'";
+execute stmt1;
+execute stmt2;
+show create table mysqltest.t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` char(10) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8
+show create table mysqltest.t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `test` varchar(4) character set latin1 NOT NULL default ''
+) ENGINE=MyISAM DEFAULT CHARSET=utf8
+drop table mysqltest.t1;
+drop table mysqltest.t2;
+alter database mysqltest character set latin1;
+execute stmt1;
+execute stmt2;
+show create table mysqltest.t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `c` char(10) character set utf8 default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+show create table mysqltest.t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `test` varchar(4) NOT NULL default ''
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop database mysqltest;
+deallocate prepare stmt1;
+deallocate prepare stmt2;
+execute stmt;
+show create table t1;
+drop table t1;
+execute stmt;
+show create table t1;
+drop table t1;
+deallocate prepare stmt;
End of 4.1 tests.
create table t1 (a varchar(20));
insert into t1 values ('foo');
@@ -1478,6 +1537,24 @@ i
1
DEALLOCATE PREPARE stmt;
DROP TABLE t1, t2;
+CREATE TABLE t1 (i INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+INSERT INTO t1 VALUES (1), (2);
+SELECT t1.i FROM t1 JOIN v1 ON t1.i = v1.i
+WHERE EXISTS (SELECT * FROM t1 WHERE v1.i = 1);
+i
+1
+PREPARE stmt FROM "SELECT t1.i FROM t1 JOIN v1 ON t1.i = v1.i
+WHERE EXISTS (SELECT * FROM t1 WHERE v1.i = 1)";
+EXECUTE stmt;
+i
+1
+EXECUTE stmt;
+i
+1
+DEALLOCATE PREPARE stmt;
+DROP VIEW v1;
+DROP TABLE t1;
DROP PROCEDURE IF EXISTS p1;
flush status;
prepare sq from 'show status like "slow_queries"';
@@ -1496,4 +1573,92 @@ Variable_name Value
Slow_queries 1
deallocate prepare no_index;
deallocate prepare sq;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2 (b int);
+INSERT INTO t2 VALUES (NULL);
+SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL;
+a
+1
+2
+PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL';
+EXECUTE stmt;
+a
+1
+2
+DEALLOCATE PREPARE stmt;
+PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2 limit ?) IS NULL';
+SET @arg=1;
+EXECUTE stmt USING @arg;
+a
+1
+2
+DEALLOCATE PREPARE stmt;
+DROP TABLE t1,t2;
+drop table if exists t1;
+create table t1 (s1 char(20));
+prepare stmt from "alter table t1 modify s1 int";
+execute stmt;
+execute stmt;
+drop table t1;
+deallocate prepare stmt;
+drop table if exists t1;
+create table t1 (a int, b int);
+prepare s_6895 from "alter table t1 drop column b";
+execute s_6895;
+show columns from t1;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+drop table t1;
+create table t1 (a int, b int);
+execute s_6895;
+show columns from t1;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+drop table t1;
+create table t1 (a int, b int);
+execute s_6895;
+show columns from t1;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+deallocate prepare s_6895;
+drop table t1;
+create table t1 (i int primary key auto_increment) comment='comment for table t1';
+create table t2 (i int, j int, k int);
+prepare stmt from "alter table t1 auto_increment=100";
+execute stmt;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) NOT NULL auto_increment,
+ PRIMARY KEY (`i`)
+) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1'
+flush tables;
+select * from t2;
+i j k
+execute stmt;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `i` int(11) NOT NULL auto_increment,
+ PRIMARY KEY (`i`)
+) ENGINE=MyISAM AUTO_INCREMENT=100 DEFAULT CHARSET=latin1 COMMENT='comment for table t1'
+deallocate prepare stmt;
+drop table t1, t2;
+drop tables if exists t1;
+create table t1 (id int primary key auto_increment, value varchar(10));
+insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD');
+prepare stmt from "insert into t1 (id, value) select * from (select 4 as i, 'FOURTH' as v) as y on duplicate key update v = 'DUP'";
+execute stmt;
+ERROR 42S22: Unknown column 'v' in 'field list'
+execute stmt;
+ERROR 42S22: Unknown column 'v' in 'field list'
+deallocate prepare stmt;
+prepare stmt from "insert into t1 (id, value) select * from (select 4 as id, 'FOURTH' as value) as y on duplicate key update y.value = 'DUP'";
+execute stmt;
+ERROR 42S22: Unknown column 'y.value' in 'field list'
+execute stmt;
+ERROR 42S22: Unknown column 'y.value' in 'field list'
+deallocate prepare stmt;
+drop tables t1;
End of 5.0 tests.
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index c96173e74cc..9d2da82813f 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -521,8 +521,8 @@ select count(*) from t1 where x = 18446744073709551601;
count(*)
1
create table t2 (x bigint not null);
-insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed));
-insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed));
+insert into t2(x) values (-16);
+insert into t2(x) values (-15);
select * from t2;
x
-16
diff --git a/mysql-test/r/read_only.result b/mysql-test/r/read_only.result
index 1a1991a6255..69d25fbef6f 100644
--- a/mysql-test/r/read_only.result
+++ b/mysql-test/r/read_only.result
@@ -39,6 +39,11 @@ delete t1 from t1,t3 where t1.a=t3.a;
drop table t1;
insert into t1 values(1);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+drop temporary table ttt;
+ERROR 42S02: Unknown table 'ttt'
+drop temporary table if exists ttt;
+Warnings:
+Note 1051 Unknown table 'ttt'
drop table t1,t2;
drop user test@localhost;
set global read_only=0;
diff --git a/mysql-test/r/rpl000015.result b/mysql-test/r/rpl000015.result
index e33201ced93..080ef436a2e 100644
--- a/mysql-test/r/rpl000015.result
+++ b/mysql-test/r/rpl000015.result
@@ -8,7 +8,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
change master to master_host='127.0.0.1';
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 test MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No #
+# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No #
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
show slave status;
diff --git a/mysql-test/r/rpl_charset.result b/mysql-test/r/rpl_charset.result
index e3e677ad0da..4b6d9f44a2b 100644
--- a/mysql-test/r/rpl_charset.result
+++ b/mysql-test/r/rpl_charset.result
@@ -176,84 +176,86 @@ hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-drop database if exists mysqltest2;
-SET TIMESTAMP=1000000000;
-drop database if exists mysqltest3;
-SET TIMESTAMP=1000000000;
-create database mysqltest2 character set latin2;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30;
-create database mysqltest3;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64;
-drop database mysqltest3;
-SET TIMESTAMP=1000000000;
-create database mysqltest3;
-use mysqltest2;
-SET TIMESTAMP=1000000000;
-create table t1 (a int auto_increment primary key, b varchar(100));
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-/*!\C cp850 */;
-SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64;
-insert into t1 (b) values(@@character_set_server);
-SET INSERT_ID=2;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@collation_server);
-SET INSERT_ID=3;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@character_set_client);
-SET INSERT_ID=4;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@character_set_connection);
-SET INSERT_ID=5;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@collation_connection);
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64;
-truncate table t1;
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@collation_connection);
-SET INSERT_ID=2;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(LEAST("Müller","Muffler"));
-SET INSERT_ID=3;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64;
-insert into t1 (b) values(@@collation_connection);
-SET INSERT_ID=4;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(LEAST("Müller","Muffler"));
-SET TIMESTAMP=1000000000;
-truncate table t1;
-SET INSERT_ID=1;
-SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(collation(@a));
-SET TIMESTAMP=1000000000;
-drop database mysqltest2;
-SET TIMESTAMP=1000000000;
-drop database mysqltest3;
-use test;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30;
-CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
-SET TIMESTAMP=1000000000;
-/*!\C koi8r */;
-SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30;
-INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ');
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+drop database if exists mysqltest2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+drop database if exists mysqltest3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create database mysqltest2 character set latin2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/;
+create database mysqltest3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64/*!*/;
+drop database mysqltest3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create database mysqltest3/*!*/;
+use mysqltest2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t1 (a int auto_increment primary key, b varchar(100))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C cp850 *//*!*/;
+SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64/*!*/;
+insert into t1 (b) values(@@character_set_server)/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@collation_server)/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@character_set_client)/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@character_set_connection)/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@collation_connection)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64/*!*/;
+truncate table t1/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@collation_connection)/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64/*!*/;
+insert into t1 (b) values(@@collation_connection)/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+truncate table t1/*!*/;
+SET INSERT_ID=1/*!*/;
+SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(collation(@a))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+drop database mysqltest2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+drop database mysqltest3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/;
+CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C koi8r *//*!*/;
+SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30/*!*/;
+INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/rpl_charset_sjis.result b/mysql-test/r/rpl_charset_sjis.result
new file mode 100644
index 00000000000..770ad0588d1
--- /dev/null
+++ b/mysql-test/r/rpl_charset_sjis.result
@@ -0,0 +1,26 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+drop table if exists t1;
+drop procedure if exists p1;
+create table t1 (a varchar(255) character set sjis);
+create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a);
+SET NAMES binary;
+CALL p1 ('–\\');
+select "--- on master ---";
+--- on master ---
+--- on master ---
+select hex(a) from t1 ;
+hex(a)
+965C
+select "--- on slave ---";
+--- on slave ---
+--- on slave ---
+select hex(a) from t1;
+hex(a)
+965C
+drop table t1;
+drop procedure p1;
diff --git a/mysql-test/r/rpl_deadlock.result b/mysql-test/r/rpl_deadlock.result
index bea7fd81616..116c34a4d96 100644
--- a/mysql-test/r/rpl_deadlock.result
+++ b/mysql-test/r/rpl_deadlock.result
@@ -130,6 +130,7 @@ Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
+set @my_max_relay_log_size= @@global.max_relay_log_size;
set global max_relay_log_size=0;
stop slave;
delete from t3;
@@ -186,3 +187,4 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
drop table t1,t2,t3,t4;
+set global max_relay_log_size= @my_max_relay_log_size;
diff --git a/mysql-test/r/rpl_do_grant.result b/mysql-test/r/rpl_do_grant.result
index ff3e059503c..fe6ef3c26bc 100644
--- a/mysql-test/r/rpl_do_grant.result
+++ b/mysql-test/r/rpl_do_grant.result
@@ -20,6 +20,17 @@ set password for rpl_do_grant@localhost=password("does it work?");
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
password<>_binary''
1
+update mysql.user set password='' where user='rpl_do_grant';
+flush privileges;
+select password<>'' from mysql.user where user='rpl_do_grant';
+password<>''
+0
+set sql_mode='ANSI_QUOTES';
+set password for rpl_do_grant@localhost=password('does it work?');
+set sql_mode='';
+select password<>'' from mysql.user where user='rpl_do_grant';
+password<>''
+1
delete from mysql.user where user=_binary'rpl_do_grant';
delete from mysql.db where user=_binary'rpl_do_grant';
flush privileges;
diff --git a/mysql-test/r/rpl_drop_db.result b/mysql-test/r/rpl_drop_db.result
index ce9d39e87f6..97a24d980b6 100644
--- a/mysql-test/r/rpl_drop_db.result
+++ b/mysql-test/r/rpl_drop_db.result
@@ -33,3 +33,5 @@ n
1234
drop table t1;
stop slave;
+drop database mysqltest1;
+drop database mysqltest1;
diff --git a/mysql-test/r/rpl_ignore_revoke.result b/mysql-test/r/rpl_ignore_revoke.result
index 42625119f28..b1ccd2f0442 100644
--- a/mysql-test/r/rpl_ignore_revoke.result
+++ b/mysql-test/r/rpl_ignore_revoke.result
@@ -27,3 +27,4 @@ select_priv
Y
revoke select on *.* FROM 'user_foo';
delete from mysql.user where user="user_foo";
+delete from mysql.user where user="user_foo";
diff --git a/mysql-test/r/rpl_init_slave.result b/mysql-test/r/rpl_init_slave.result
index 83d0a3289a2..f92fb9b4c1d 100644
--- a/mysql-test/r/rpl_init_slave.result
+++ b/mysql-test/r/rpl_init_slave.result
@@ -17,8 +17,11 @@ init_slave
show variables like 'max_connections';
Variable_name Value
max_connections 100
+set @my_global_init_connect= @@global.init_connect;
set global init_connect="set @c=1";
show variables like 'init_connect';
Variable_name Value
init_connect set @c=1
stop slave;
+set global init_connect= @my_global_init_connect;
+set global max_connections= default;
diff --git a/mysql-test/r/rpl_locale.result b/mysql-test/r/rpl_locale.result
new file mode 100644
index 00000000000..b7396084663
--- /dev/null
+++ b/mysql-test/r/rpl_locale.result
@@ -0,0 +1,20 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+create table t1 (s1 char(10));
+set lc_time_names= 'de_DE';
+insert into t1 values (date_format('2001-01-01','%W'));
+set lc_time_names= 'en_US';
+insert into t1 values (date_format('2001-01-01','%W'));
+select * from t1;
+s1
+Montag
+Monday
+select * from t1;
+s1
+Montag
+Monday
+drop table t1;
diff --git a/mysql-test/r/rpl_max_relay_size.result b/mysql-test/r/rpl_max_relay_size.result
index 1fa49db6013..95c9ae79d05 100644
--- a/mysql-test/r/rpl_max_relay_size.result
+++ b/mysql-test/r/rpl_max_relay_size.result
@@ -14,6 +14,7 @@ reset slave;
#
# Test 1
#
+set @my_max_binlog_size= @@global.max_binlog_size;
set global max_binlog_size=8192;
set global max_relay_log_size=8192-1;
select @@global.max_relay_log_size;
@@ -266,6 +267,7 @@ File master-bin.000002
Position 98
Binlog_Do_DB
Binlog_Ignore_DB
+set global max_binlog_size= @my_max_binlog_size;
#
# End of 4.1 tests
#
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result
index 7b096b27733..0fe1b4b908e 100644
--- a/mysql-test/r/rpl_sp.result
+++ b/mysql-test/r/rpl_sp.result
@@ -269,6 +269,118 @@ insert into t1 values (1);
select * from t1;
a
1
+select * from t1;
+a
+1
+create procedure foo()
+not deterministic
+reads sql data
+select * from t1;
+call foo();
+a
+1
+drop procedure foo;
+drop function fn1;
+drop database mysqltest1;
+drop user "zedjzlcsjhd"@127.0.0.1;
+use test;
+use test;
+drop function if exists f1;
+create function f1() returns int reads sql data
+begin
+declare var integer;
+declare c cursor for select a from v1;
+open c;
+fetch c into var;
+close c;
+return var;
+end|
+create view v1 as select 1 as a;
+create table t1 (a int);
+insert into t1 (a) values (f1());
+select * from t1;
+a
+1
+drop view v1;
+drop function f1;
+select * from t1;
+a
+1
+DROP PROCEDURE IF EXISTS p1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(col VARCHAR(10));
+CREATE PROCEDURE p1(arg VARCHAR(10))
+INSERT INTO t1 VALUES(arg);
+CALL p1('test');
+SELECT * FROM t1;
+col
+test
+SELECT * FROM t1;
+col
+test
+DROP PROCEDURE p1;
+
+---> Test for BUG#20438
+
+---> Preparing environment...
+---> connection: master
+DROP PROCEDURE IF EXISTS p1;
+DROP FUNCTION IF EXISTS f1;
+
+---> Synchronizing slave with master...
+
+---> connection: master
+
+---> Creating procedure...
+/*!50003 CREATE PROCEDURE p1() SET @a = 1 */;
+/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */;
+
+---> Checking on master...
+SHOW CREATE PROCEDURE p1;
+Procedure sql_mode Create Procedure
+p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+SET @a = 1
+SHOW CREATE FUNCTION f1;
+Function sql_mode Create Function
+f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+RETURN 0
+
+---> Synchronizing slave with master...
+---> connection: master
+
+---> Checking on slave...
+SHOW CREATE PROCEDURE p1;
+Procedure sql_mode Create Procedure
+p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+SET @a = 1
+SHOW CREATE FUNCTION f1;
+Function sql_mode Create Function
+f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+RETURN 0
+
+---> connection: master
+
+---> Cleaning up...
+DROP PROCEDURE p1;
+DROP FUNCTION f1;
+drop table t1;
+drop database if exists mysqltest;
+drop database if exists mysqltest2;
+create database mysqltest;
+create database mysqltest2;
+use mysqltest2;
+create table t ( t integer );
+create procedure mysqltest.test() begin end;
+insert into t values ( 1 );
+create procedure `\\`.test() begin end;
+ERROR 42000: Incorrect database name '\\'
+create function f1 () returns int
+begin
+insert into t values (1);
+return 0;
+end|
+use mysqltest;
+set @a:= mysqltest2.f1();
show binlog events in 'master-bin.000001' from 98;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # drop database if exists mysqltest1
@@ -329,7 +441,7 @@ insert into t1 values (x);
return x+2;
end
master-bin.000001 # Query 1 # use `mysqltest1`; delete t1,t2 from t1,t2
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(20)
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(fn1(21))
master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1()
@@ -362,32 +474,23 @@ begin
insert into t2 values(x),(x);
return 10;
end
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(100)
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(20)
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100)
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1)
master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop trigger trg
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1)
-select * from t1;
-a
-1
-create procedure foo()
+master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo()
not deterministic
reads sql data
-select * from t1;
-call foo();
-a
-1
-drop procedure foo;
-drop function fn1;
-drop database mysqltest1;
-drop user "zedjzlcsjhd"@127.0.0.1;
-use test;
-use test;
-drop function if exists f1;
-create function f1() returns int reads sql data
+select * from t1
+master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo
+master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1
+master-bin.000001 # Query 1 # drop database mysqltest1
+master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` function f1() returns int reads sql data
begin
declare var integer;
declare c cursor for select a from v1;
@@ -395,73 +498,37 @@ open c;
fetch c into var;
close c;
return var;
-end|
-create view v1 as select 1 as a;
-create table t1 (a int);
-insert into t1 (a) values (f1());
-select * from t1;
-a
-1
-drop view v1;
-drop function f1;
-select * from t1;
-a
-1
-DROP PROCEDURE IF EXISTS p1;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1(col VARCHAR(10));
-CREATE PROCEDURE p1(arg VARCHAR(10))
-INSERT INTO t1 VALUES(arg);
-CALL p1('test');
-SELECT * FROM t1;
-col
-test
-SELECT * FROM t1;
-col
-test
-DROP PROCEDURE p1;
-
----> Test for BUG#20438
-
----> Preparing environment...
----> connection: master
-DROP PROCEDURE IF EXISTS p1;
-DROP FUNCTION IF EXISTS f1;
-
----> Synchronizing slave with master...
-
----> connection: master
-
----> Creating procedure...
-/*!50003 CREATE PROCEDURE p1() SET @a = 1 */;
-/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */;
-
----> Checking on master...
-SHOW CREATE PROCEDURE p1;
-Procedure sql_mode Create Procedure
-p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
-SET @a = 1
-SHOW CREATE FUNCTION f1;
-Function sql_mode Create Function
-f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
-RETURN 0
-
----> Synchronizing slave with master...
----> connection: master
-
----> Checking on slave...
-SHOW CREATE PROCEDURE p1;
-Procedure sql_mode Create Procedure
-p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
-SET @a = 1
-SHOW CREATE FUNCTION f1;
-Function sql_mode Create Function
-f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
-RETURN 0
-
----> connection: master
-
----> Cleaning up...
-DROP PROCEDURE p1;
-DROP FUNCTION f1;
-drop table t1;
+end
+master-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a
+master-bin.000001 # Query 1 # use `test`; create table t1 (a int)
+master-bin.000001 # Query 1 # use `test`; insert into t1 (a) values (f1())
+master-bin.000001 # Query 1 # use `test`; drop view v1
+master-bin.000001 # Query 1 # use `test`; drop function f1
+master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1
+master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10))
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1(arg VARCHAR(10))
+INSERT INTO t1 VALUES(arg)
+master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test'))
+master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1() SET @a = 1
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION f1() RETURNS INT RETURN 0
+master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1
+master-bin.000001 # Query 1 # use `test`; DROP FUNCTION f1
+master-bin.000001 # Query 1 # use `test`; drop table t1
+master-bin.000001 # Query 1 # drop database if exists mysqltest
+master-bin.000001 # Query 1 # drop database if exists mysqltest2
+master-bin.000001 # Query 1 # create database mysqltest
+master-bin.000001 # Query 1 # create database mysqltest2
+master-bin.000001 # Query 1 # use `mysqltest2`; create table t ( t integer )
+master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end
+master-bin.000001 # Query 1 # use `mysqltest2`; insert into t values ( 1 )
+master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` function f1 () returns int
+begin
+insert into t values (1);
+return 0;
+end
+master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`()
+set global log_bin_trust_function_creators=0;
+set global log_bin_trust_function_creators=0;
+drop database mysqltest;
+drop database mysqltest2;
diff --git a/mysql-test/r/rpl_timezone.result b/mysql-test/r/rpl_timezone.result
index 96a892f00fc..10dc8eb7e3c 100644
--- a/mysql-test/r/rpl_timezone.result
+++ b/mysql-test/r/rpl_timezone.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+set @my_time_zone= @@global.time_zone;
set timestamp=100000000;
create table t1 (t timestamp);
create table t2 (t char(32));
@@ -43,27 +44,29 @@ t
2004-06-11 09:39:02
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=100000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (t timestamp);
-SET TIMESTAMP=100000000;
-create table t2 (t char(32));
-SET TIMESTAMP=100000000;
-SET @@session.time_zone='Europe/Moscow';
-insert into t1 values ('20050101000000'), ('20050611093902');
-SET TIMESTAMP=100000000;
-SET @@session.time_zone='UTC';
-insert into t1 values ('20040101000000'), ('20040611093902');
-SET TIMESTAMP=100000000;
-delete from t1;
-SET TIMESTAMP=100000000;
-SET @@session.time_zone='Europe/Moscow';
-insert into t1 values ('20040101000000'), ('20040611093902');
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=100000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (t timestamp)/*!*/;
+SET TIMESTAMP=100000000/*!*/;
+create table t2 (t char(32))/*!*/;
+SET TIMESTAMP=100000000/*!*/;
+SET @@session.time_zone='Europe/Moscow'/*!*/;
+insert into t1 values ('20050101000000'), ('20050611093902')/*!*/;
+SET TIMESTAMP=100000000/*!*/;
+SET @@session.time_zone='UTC'/*!*/;
+insert into t1 values ('20040101000000'), ('20040611093902')/*!*/;
+SET TIMESTAMP=100000000/*!*/;
+delete from t1/*!*/;
+SET TIMESTAMP=100000000/*!*/;
+SET @@session.time_zone='Europe/Moscow'/*!*/;
+insert into t1 values ('20040101000000'), ('20040611093902')/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -126,3 +129,4 @@ t
2003-12-31 23:00:00
2005-01-01 08:00:00
drop table t1, t2;
+set global time_zone= @my_time_zone;
diff --git a/mysql-test/r/rpl_variables.result b/mysql-test/r/rpl_variables.result
index 25b5ca13f77..6c532e33983 100644
--- a/mysql-test/r/rpl_variables.result
+++ b/mysql-test/r/rpl_variables.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+set @my_slave_net_timeout =@@global.slave_net_timeout;
set global slave_net_timeout=100;
set global sql_slave_skip_counter=100;
show variables like 'slave_compressed_protocol';
@@ -15,3 +16,4 @@ slave_load_tmpdir SLAVE_LOAD_TMPDIR
show variables like 'slave_skip_errors';
Variable_name Value
slave_skip_errors 3,100,137,643,1752
+set global slave_net_timeout =@my_slave_net_timeout;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 44063c1e890..d31be4390f7 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2811,6 +2811,23 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
min(key1)
0.37619999051094
DROP TABLE t1,t2;
+create table t1(a bigint unsigned, b bigint);
+insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+(0x10000000000000000, 0x10000000000000000),
+(0x8fffffffffffffff, 0x8fffffffffffffff);
+Warnings:
+Warning 1264 Out of range value adjusted for column 'a' at row 1
+Warning 1264 Out of range value adjusted for column 'b' at row 1
+Warning 1264 Out of range value adjusted for column 'a' at row 2
+Warning 1264 Out of range value adjusted for column 'b' at row 2
+Warning 1264 Out of range value adjusted for column 'b' at row 3
+select hex(a), hex(b) from t1;
+hex(a) hex(b)
+FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
+8FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
+drop table t1;
+End of 4.1 tests
CREATE TABLE t1 (
K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '',
K4N4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '0000',
@@ -3611,3 +3628,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range si,ai si 5 NULL 2 Using where
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
DROP TABLE t1,t2,t3;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a int);
+INSERT into t1 values (1), (2), (3);
+SELECT * FROM t1 LIMIT 2, -1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
+DROP TABLE t1;
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 28cbdb16919..0dfb7c95f9a 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -296,7 +296,7 @@ SET sql_quote_show_create= @old_sql_quote_show_create;
SET sql_mode= @old_sql_mode;
select @@max_heap_table_size;
@@max_heap_table_size
-1047552
+1048576
CREATE TABLE t1 (
a int(11) default NULL,
KEY a USING BTREE (a)
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 63fd1bfff6d..e7e387f4348 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -1250,3 +1250,22 @@ ERROR HY000: View's SELECT contains a variable or parameter
PREPARE stmt FROM "CREATE VIEW v AS SELECT ?";
ERROR HY000: View's SELECT contains a variable or parameter
DROP TABLE t1;
+drop tables if exists t1;
+drop procedure if exists bug24491;
+create table t1 (id int primary key auto_increment, value varchar(10));
+insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD');
+create procedure bug24491()
+insert into t1 (id, value) select * from (select 4 as i, 'FOURTH' as v) as y on duplicate key update v = 'DUP';
+call bug24491();
+ERROR 42S22: Unknown column 'v' in 'field list'
+call bug24491();
+ERROR 42S22: Unknown column 'v' in 'field list'
+drop procedure bug24491;
+create procedure bug24491()
+insert into t1 (id, value) select * from (select 4 as id, 'FOURTH' as value) as y on duplicate key update y.value = 'DUP';
+call bug24491();
+ERROR 42S22: Unknown column 'y.value' in 'field list'
+call bug24491();
+ERROR 42S22: Unknown column 'y.value' in 'field list'
+drop procedure bug24491;
+drop tables t1;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 1bb4b3a405b..8e3c057cc62 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -2705,11 +2705,11 @@ row_count()
call bug4905()|
select row_count()|
row_count()
-0
+-1
call bug4905()|
select row_count()|
row_count()
-0
+-1
select * from t3|
s1
1
@@ -5626,5 +5626,119 @@ Called B
Called B
drop procedure proc_21462_a|
drop procedure proc_21462_b|
+drop table if exists t3|
+drop procedure if exists proc_bug19733|
+create table t3 (s1 int)|
+create procedure proc_bug19733()
+begin
+declare v int default 0;
+while v < 100 do
+create index i on t3 (s1);
+drop index i on t3;
+set v = v + 1;
+end while;
+end|
+call proc_bug19733()|
+call proc_bug19733()|
+call proc_bug19733()|
+drop procedure proc_bug19733|
+drop table t3|
End of 5.0 tests
+DROP TABLE IF EXISTS bug23760|
+DROP TABLE IF EXISTS bug23760_log|
+DROP PROCEDURE IF EXISTS bug23760_update_log|
+DROP PROCEDURE IF EXISTS bug23760_test_row_count|
+DROP FUNCTION IF EXISTS bug23760_rc_test|
+CREATE TABLE bug23760 (
+id INT NOT NULL AUTO_INCREMENT ,
+num INT NOT NULL ,
+PRIMARY KEY ( id )
+)|
+CREATE TABLE bug23760_log (
+id INT NOT NULL AUTO_INCREMENT ,
+reason VARCHAR(50)NULL ,
+ammount INT NOT NULL ,
+PRIMARY KEY ( id )
+)|
+CREATE PROCEDURE bug23760_update_log(r Varchar(50), a INT)
+BEGIN
+INSERT INTO bug23760_log (reason, ammount) VALUES(r, a);
+END|
+CREATE PROCEDURE bug23760_test_row_count()
+BEGIN
+UPDATE bug23760 SET num = num + 1;
+CALL bug23760_update_log('Test is working', ROW_COUNT());
+UPDATE bug23760 SET num = num - 1;
+END|
+CREATE PROCEDURE bug23760_test_row_count2(level INT)
+BEGIN
+IF level THEN
+UPDATE bug23760 SET num = num + 1;
+CALL bug23760_update_log('Test2 is working', ROW_COUNT());
+CALL bug23760_test_row_count2(level - 1);
+END IF;
+END|
+CREATE FUNCTION bug23760_rc_test(in_var INT) RETURNS INT RETURN in_var|
+INSERT INTO bug23760 (num) VALUES (0), (1), (1), (2), (3), (5), (8)|
+SELECT ROW_COUNT()|
+ROW_COUNT()
+7
+CALL bug23760_test_row_count()|
+SELECT * FROM bug23760_log ORDER BY id|
+id reason ammount
+1 Test is working 7
+SET @save_max_sp_recursion= @@max_sp_recursion_depth|
+SELECT @save_max_sp_recursion|
+@save_max_sp_recursion
+0
+SET max_sp_recursion_depth= 5|
+SELECT @@max_sp_recursion_depth|
+@@max_sp_recursion_depth
+5
+CALL bug23760_test_row_count2(2)|
+SELECT ROW_COUNT()|
+ROW_COUNT()
+1
+SELECT * FROM bug23760_log ORDER BY id|
+id reason ammount
+1 Test is working 7
+2 Test2 is working 7
+3 Test2 is working 7
+SELECT * FROM bug23760 ORDER by ID|
+id num
+1 2
+2 3
+3 3
+4 4
+5 5
+6 7
+7 10
+SET max_sp_recursion_depth= @save_max_sp_recursion|
+SELECT bug23760_rc_test(123)|
+bug23760_rc_test(123)
+123
+INSERT INTO bug23760 (num) VALUES (13), (21), (34), (55)|
+SELECT bug23760_rc_test(ROW_COUNT())|
+bug23760_rc_test(ROW_COUNT())
+4
+DROP TABLE bug23760, bug23760_log|
+DROP PROCEDURE bug23760_update_log|
+DROP PROCEDURE bug23760_test_row_count|
+DROP FUNCTION bug23760_rc_test|
+DROP PROCEDURE IF EXISTS bug24117|
+DROP TABLE IF EXISTS t3|
+CREATE TABLE t3(c1 ENUM('abc'))|
+INSERT INTO t3 VALUES('abc')|
+CREATE PROCEDURE bug24117()
+BEGIN
+DECLARE t3c1 ENUM('abc');
+DECLARE mycursor CURSOR FOR SELECT c1 FROM t3;
+OPEN mycursor;
+FLUSH TABLES;
+FETCH mycursor INTO t3c1;
+CLOSE mycursor;
+END|
+CALL bug24117()|
+DROP PROCEDURE bug24117|
+DROP TABLE t3|
drop table t1,t2;
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index b22912e0a93..c3f4a7c7f6b 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -3033,6 +3033,19 @@ t3 CREATE TABLE `t3` (
`a` datetime default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2,t3;
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1), (2);
+SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) > 0;
+a
+SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) IS NULL;
+a
+1
+2
+EXPLAIN SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) IS NULL;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2
+2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+DROP TABLE t1;
create table t1 (df decimal(5,1));
insert into t1 values(1.1);
insert into t1 values(2.2);
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index 272836c450a..4725bcc0ac9 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -111,3 +111,26 @@ t1 CREATE TABLE `t1` (
`i` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `a` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `a` int(11) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
+create table t1 (a int) engine=myisam select 42 a;
+select * from t1;
+a
+9
+select * from t1;
+a
+99
+select * from t1;
+a
+42
+drop table t1;
+End of 4.1 tests
+End of 5.0 tests
diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result
index 597defb7a9b..debf4ff8fb8 100644
--- a/mysql-test/r/type_binary.result
+++ b/mysql-test/r/type_binary.result
@@ -136,4 +136,13 @@ insert into t1 values(NULL, 0x412020);
ERROR 22001: Data too long for column 'vb' at row 1
drop table t1;
set @@sql_mode= @old_sql_mode;
+create table t1(f1 int, f2 binary(2) not null, f3 char(2) not null);
+insert into t1 set f1=1;
+Warnings:
+Warning 1364 Field 'f2' doesn't have a default value
+Warning 1364 Field 'f3' doesn't have a default value
+select hex(f2), hex(f3) from t1;
+hex(f2) hex(f3)
+0000
+drop table t1;
End of 5.0 tests
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index bd58e83bb3f..fad0e1f7974 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -568,7 +568,7 @@ create table t1 (a bit(7));
insert into t1 values (0x60);
select * from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 a a 16 7 1 Y 0 0 63
+def test t1 t1 a a 16 7 1 Y 32 0 63
a
`
drop table t1;
@@ -610,4 +610,12 @@ select hex(a), b from t1;
hex(a) b
1 2
drop table t1;
+create table t1(bit_field bit(2), int_field int, key a(bit_field));
+insert into t1 values (1,2);
+handler t1 open as t1;
+handler t1 read a=(1);
+bit_field int_field
+ 2
+handler t1 close;
+drop table t1;
End of 5.0 tests
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index 1f6857277bd..c4506231f27 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -406,7 +406,7 @@ create table t1 (a bit(7)) engine=innodb;
insert into t1 values (0x60);
select * from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 a a 16 7 1 Y 0 0 63
+def test t1 t1 a a 16 7 1 Y 32 0 63
a
`
drop table t1;
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 6790ae2c67d..2c794fe8f58 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -264,7 +264,7 @@ a decimal(21,2) NO 0.00
drop table t1,t2,t3;
select 1e-308, 1.00000001e-300, 100000000e-300;
1e-308 1.00000001e-300 100000000e-300
-0 1.00000001e-300 1e-292
+1e-308 1.00000001e-300 1e-292
select 10e307;
10e307
1e+308
diff --git a/mysql-test/r/type_varchar.result b/mysql-test/r/type_varchar.result
index 1d707b83a4d..f6c2f4d01a6 100644
--- a/mysql-test/r/type_varchar.result
+++ b/mysql-test/r/type_varchar.result
@@ -453,3 +453,39 @@ id name_id id en cz
2 3 2 en string 2 cz string 2
3 3 3 en string 3 cz string 3
drop table t1, t2, t3;
+CREATE TABLE t1 (a CHAR(2));
+INSERT INTO t1 VALUES (10), (50), (30), ('1a'), (60), ('t');
+SELECT a,(a + 0) FROM t1 ORDER BY a;
+a (a + 0)
+10 10
+1a 1
+30 30
+50 50
+60 60
+t 0
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: '1a'
+Warning 1292 Truncated incorrect DOUBLE value: 't '
+SELECT a,(a DIV 2) FROM t1 ORDER BY a;
+a (a DIV 2)
+10 5
+1a 0
+30 15
+50 25
+60 30
+t 0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '1a'
+Warning 1292 Truncated incorrect INTEGER value: 't '
+SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
+a CAST(a AS SIGNED)
+10 10
+1a 1
+30 30
+50 50
+60 60
+t 0
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: '1a'
+Warning 1292 Truncated incorrect INTEGER value: 't'
+DROP TABLE t1;
diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result
index 396f1efa1b7..64b7111bbc8 100644
--- a/mysql-test/r/udf.result
+++ b/mysql-test/r/udf.result
@@ -194,3 +194,49 @@ DROP FUNCTION sequence;
DROP FUNCTION lookup;
DROP FUNCTION reverse_lookup;
DROP FUNCTION avgcost;
+select * from mysql.func;
+name ret dl type
+CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
+select IS_const(3);
+IS_const(3)
+const
+drop function IS_const;
+select * from mysql.func;
+name ret dl type
+select is_const(3);
+ERROR 42000: FUNCTION test.is_const does not exist
+CREATE FUNCTION is_const RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
+select
+is_const(3) as const,
+is_const(3.14) as const,
+is_const('fnord') as const,
+is_const(2+3) as const,
+is_const(rand()) as 'nc rand()',
+is_const(sin(3.14)) as const,
+is_const(upper('test')) as const;
+const const const const nc rand() const const
+const const const const not const const const
+create table bug18761 (n int);
+insert into bug18761 values (null),(2);
+select
+is_const(3) as const,
+is_const(3.14) as const,
+is_const('fnord') as const,
+is_const(2+3) as const,
+is_const(2+n) as 'nc 2+n ',
+is_const(sin(n)) as 'nc sin(n)',
+is_const(sin(3.14)) as const,
+is_const(upper('test')) as const,
+is_const(rand()) as 'nc rand()',
+is_const(n) as 'nc n ',
+is_const(is_const(n)) as 'nc ic?(n)',
+is_const(is_const('c')) as const
+from
+bug18761;
+const const const const nc 2+n nc sin(n) const const nc rand() nc n nc ic?(n) const
+const const const const not const not const const const not const not const not const const
+const const const const not const not const const const not const not const not const const
+drop table bug18761;
+select is_const((1,2,3));
+ERROR 21000: Operand should contain 1 column(s)
+drop function if exists is_const;
diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result
index d1555bb793f..2b37a4b1d9a 100644
--- a/mysql-test/r/user_var-binlog.result
+++ b/mysql-test/r/user_var-binlog.result
@@ -15,19 +15,21 @@ master-bin.000001 273 User var 1 311 @`var2`=_binary 0x61 COLLATE binary
master-bin.000001 311 Query 1 411 use `test`; insert into t1 values (@var1),(@var2)
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`;
-use test;
-SET TIMESTAMP=10000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-INSERT INTO t1 VALUES(@`a b`);
-SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`;
-SET @`var2`:=_binary 0x61 COLLATE `binary`;
-SET TIMESTAMP=10000;
-insert into t1 values (@var1),(@var2);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/;
+use test/*!*/;
+SET TIMESTAMP=10000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+INSERT INTO t1 VALUES(@`a b`)/*!*/;
+SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`/*!*/;
+SET @`var2`:=_binary 0x61 COLLATE `binary`/*!*/;
+SET TIMESTAMP=10000/*!*/;
+insert into t1 values (@var1),(@var2)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result
index 90954fc1ede..753c982155c 100644
--- a/mysql-test/r/user_var.result
+++ b/mysql-test/r/user_var.result
@@ -301,7 +301,14 @@ select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
select @var;
@var
3
-drop table t1;
+create table t2 as select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
+select * from t2;
+@var:=f2
+3
+select @var;
+@var
+3
+drop table t1,t2;
insert into city 'blah';
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''blah'' at line 1
SHOW COUNT(*) WARNINGS;
diff --git a/mysql-test/r/varbinary.result b/mysql-test/r/varbinary.result
index e62051df5cd..2b8a9c625a5 100644
--- a/mysql-test/r/varbinary.result
+++ b/mysql-test/r/varbinary.result
@@ -26,3 +26,55 @@ select x,xx from t1;
x xx
1 2
drop table t1;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) default NULL,
+ `b` varchar(255) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select length(a), length(b) from t1;
+length(a) length(b)
+255 3
+255 3
+CHECK TABLE t1 FOR UPGRADE;
+Table Op Msg_type Msg_text
+test.t1 check error Table upgrade required. Please do "REPAIR TABLE `t1`" to fix it!
+REPAIR TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` varbinary(255) default NULL,
+ `b` varchar(255) default NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+select length(a), length(b) from t1;
+length(a) length(b)
+3 3
+3 3
+insert into t1 values("ccc", "ddd");
+select length(a), length(b) from t1;
+length(a) length(b)
+3 3
+3 3
+3 3
+select hex(a), hex(b) from t1;
+hex(a) hex(b)
+616161 636363
+626262 646464
+636363 646464
+select concat("'", a, "'"), concat("'", b, "'") from t1;
+concat("'", a, "'") concat("'", b, "'")
+'aaa' 'ccc'
+'bbb' 'ddd'
+'ccc' 'ddd'
+drop table t1;
+create table t1(a varbinary(255));
+insert into t1 values("aaa ");
+select length(a) from t1;
+length(a)
+6
+alter table t1 modify a varchar(255);
+select length(a) from t1;
+length(a)
+6
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index cd834a789bd..c3d7d5ac4eb 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -580,6 +580,63 @@ set names latin1;
select @@have_innodb;
@@have_innodb
#
+*** Various tests with LC_TIME_NAMES
+*** LC_TIME_NAMES: testing case insensitivity
+set @@lc_time_names='ru_ru';
+select @@lc_time_names;
+@@lc_time_names
+ru_RU
+*** LC_TIME_NAMES: testing with a user variable
+set @lc='JA_JP';
+set @@lc_time_names=@lc;
+select @@lc_time_names;
+@@lc_time_names
+ja_JP
+*** LC_TIME_NAMES: testing with string expressions
+set lc_time_names=concat('de','_','DE');
+select @@lc_time_names;
+@@lc_time_names
+de_DE
+set lc_time_names=concat('de','+','DE');
+ERROR HY000: Unknown locale: 'de+DE'
+select @@lc_time_names;
+@@lc_time_names
+de_DE
+LC_TIME_NAMES: testing with numeric expressions
+set @@lc_time_names=1+2;
+select @@lc_time_names;
+@@lc_time_names
+sv_SE
+set @@lc_time_names=1/0;
+ERROR 42000: Incorrect argument type to variable 'lc_time_names'
+select @@lc_time_names;
+@@lc_time_names
+sv_SE
+set lc_time_names=en_US;
+LC_TIME_NAMES: testing NULL and a negative number:
+set lc_time_names=NULL;
+ERROR 42000: Variable 'lc_time_names' can't be set to the value of 'NULL'
+set lc_time_names=-1;
+ERROR HY000: Unknown locale: '-1'
+select @@lc_time_names;
+@@lc_time_names
+en_US
+LC_TIME_NAMES: testing locale with the last ID:
+set lc_time_names=108;
+select @@lc_time_names;
+@@lc_time_names
+zh_HK
+LC_TIME_NAMES: testing a number beyond the valid ID range:
+set lc_time_names=109;
+ERROR HY000: Unknown locale: '109'
+select @@lc_time_names;
+@@lc_time_names
+zh_HK
+LC_TIME_NAMES: testing that 0 is en_US:
+set lc_time_names=0;
+select @@lc_time_names;
+@@lc_time_names
+en_US
set @test = @@query_prealloc_size;
set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index caa494c26b3..f8584275a5a 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2686,12 +2686,12 @@ View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
Age
-42
-38
+43
+39
SELECT * FROM v1;
Age
-42
-38
+43
+39
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx');
diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result
index 35e7afc0a7b..45cf5076fe1 100644
--- a/mysql-test/r/view_grant.result
+++ b/mysql-test/r/view_grant.result
@@ -544,13 +544,13 @@ CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tu AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tus AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_td AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tds AS SELECT * FROM mysqltest1.t1;
-GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly;
-GRANT SELECT ON mysqltest1.v_ts TO readonly;
-GRANT INSERT ON mysqltest1.v_ti TO readonly;
-GRANT UPDATE ON mysqltest1.v_tu TO readonly;
-GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly;
-GRANT DELETE ON mysqltest1.v_td TO readonly;
-GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly;
+GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly@localhost;
+GRANT SELECT ON mysqltest1.v_ts TO readonly@localhost;
+GRANT INSERT ON mysqltest1.v_ti TO readonly@localhost;
+GRANT UPDATE ON mysqltest1.v_tu TO readonly@localhost;
+GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly@localhost;
+GRANT DELETE ON mysqltest1.v_td TO readonly@localhost;
+GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly@localhost;
SELECT * FROM mysqltest1.v_t1;
ERROR HY000: View 'mysqltest1.v_t1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
INSERT INTO mysqltest1.v_t1 VALUES(4);
@@ -712,3 +712,65 @@ DROP FUNCTION f1;
DROP VIEW v2;
DROP VIEW v1;
DROP USER mysqltest_u1@localhost;
+CREATE DATABASE db17254;
+USE db17254;
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (10),(20);
+CREATE USER def_17254@localhost;
+GRANT SELECT ON db17254.* TO def_17254@localhost;
+CREATE USER inv_17254@localhost;
+GRANT SELECT ON db17254.t1 TO inv_17254@localhost;
+GRANT CREATE VIEW ON db17254.* TO def_17254@localhost;
+CREATE VIEW v1 AS SELECT * FROM t1;
+DROP USER def_17254@localhost;
+for a user
+SELECT * FROM v1;
+ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1'
+for a superuser
+SELECT * FROM v1;
+ERROR HY000: There is no 'def_17254'@'localhost' registered
+DROP USER inv_17254@localhost;
+DROP DATABASE db17254;
+DROP DATABASE IF EXISTS mysqltest_db1;
+DROP DATABASE IF EXISTS mysqltest_db2;
+DROP USER mysqltest_u1;
+DROP USER mysqltest_u2;
+CREATE USER mysqltest_u1@localhost;
+CREATE USER mysqltest_u2@localhost;
+CREATE DATABASE mysqltest_db1;
+CREATE DATABASE mysqltest_db2;
+GRANT ALL ON mysqltest_db1.* TO mysqltest_u1@localhost WITH GRANT OPTION;
+GRANT ALL ON mysqltest_db2.* TO mysqltest_u2@localhost;
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1);
+CREATE VIEW v1 AS SELECT i FROM t1 WHERE 1 IN (SELECT * FROM t1);
+CREATE TABLE t2 (s CHAR(7));
+INSERT INTO t2 VALUES ('public');
+GRANT SELECT ON v1 TO mysqltest_u2@localhost;
+GRANT SELECT ON t2 TO mysqltest_u2@localhost;
+SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2;
+i s
+1 public
+PREPARE stmt1 FROM "SELECT * FROM mysqltest_db1.t2";
+EXECUTE stmt1;
+s
+public
+PREPARE stmt2 FROM "SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2";
+EXECUTE stmt2;
+i s
+1 public
+REVOKE SELECT ON t2 FROM mysqltest_u2@localhost;
+UPDATE t2 SET s = 'private' WHERE s = 'public';
+SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2;
+ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2'
+EXECUTE stmt1;
+ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2'
+EXECUTE stmt2;
+ERROR 42000: SELECT command denied to user 'mysqltest_u2'@'localhost' for table 't2'
+REVOKE ALL ON mysqltest_db1.* FROM mysqltest_u1@localhost;
+REVOKE ALL ON mysqltest_db2.* FROM mysqltest_u2@localhost;
+DROP DATABASE mysqltest_db1;
+DROP DATABASE mysqltest_db2;
+DROP USER mysqltest_u1@localhost;
+DROP USER mysqltest_u2@localhost;
+End of 5.0 tests.
diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result
index 039c5b1476e..1702fd28c18 100644
--- a/mysql-test/r/windows.result
+++ b/mysql-test/r/windows.result
@@ -6,3 +6,9 @@ use prn;
ERROR 42000: Unknown database 'prn'
create table nu (a int);
drop table nu;
+drop table if exists t1;
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
+Warning 0 INDEX DIRECTORY option ignored
+drop table t1;
diff --git a/mysql-test/std_data/bad_gis_data.dat b/mysql-test/std_data/bad_gis_data.dat
new file mode 100644
index 00000000000..257cc5642cb
--- /dev/null
+++ b/mysql-test/std_data/bad_gis_data.dat
@@ -0,0 +1 @@
+foo
diff --git a/mysql-test/std_data/bug19371.MYD b/mysql-test/std_data/bug19371.MYD
new file mode 100644
index 00000000000..1b58a70832f
--- /dev/null
+++ b/mysql-test/std_data/bug19371.MYD
Binary files differ
diff --git a/mysql-test/std_data/bug19371.MYI b/mysql-test/std_data/bug19371.MYI
new file mode 100644
index 00000000000..06ee5b2d766
--- /dev/null
+++ b/mysql-test/std_data/bug19371.MYI
Binary files differ
diff --git a/mysql-test/std_data/bug19371.frm b/mysql-test/std_data/bug19371.frm
new file mode 100644
index 00000000000..7be45d6f8da
--- /dev/null
+++ b/mysql-test/std_data/bug19371.frm
Binary files differ
diff --git a/mysql-test/t/alter_table-big.test b/mysql-test/t/alter_table-big.test
new file mode 100644
index 00000000000..9a773f48a9c
--- /dev/null
+++ b/mysql-test/t/alter_table-big.test
@@ -0,0 +1,62 @@
+# In order to be more or less robust test for bug#25044 has to take
+# significant time (e.g. about 9 seconds on my (Dmitri's) computer)
+# so we probably want execute it only in --big-test mode.
+# Also in 5.1 this test will require statement-based binlog.
+--source include/big_test.inc
+
+
+#
+# Test for bug #25044 "ALTER TABLE ... ENABLE KEYS acquires global
+# 'opening tables' lock".
+#
+# ALTER TABLE ... ENABLE KEYS should not acquire LOCK_open mutex for
+# the whole its duration as it prevents other queries from execution.
+--disable_warnings
+drop table if exists t1, t2;
+--enable_warnings
+connect (addconroot, localhost, root,,);
+connection default;
+create table t1 (n1 int, n2 int, n3 int,
+ key (n1, n2, n3),
+ key (n2, n3, n1),
+ key (n3, n1, n2));
+create table t2 (i int);
+
+# Populating 't1' table with keys disabled, so ALTER TABLE .. ENABLE KEYS
+# will run for some time
+alter table t1 disable keys;
+--disable_query_log
+insert into t1 values (RAND()*1000,RAND()*1000,RAND()*1000);
+let $1=19;
+while ($1)
+{
+ eval insert into t1 select RAND()*1000,RAND()*1000,RAND()*1000 from t1;
+ dec $1;
+}
+--enable_query_log
+
+# Later we use binlog to check the order in which statements are
+# executed so let us reset it first.
+reset master;
+--send alter table t1 enable keys;
+connection addconroot;
+let $show_type= PROCESSLIST;
+let $show_pattern= '%Repair by sorting%alter table t1 enable keys%';
+--source include/wait_show_pattern.inc
+# This statement should not be blocked by in-flight ALTER and therefore
+# should be executed and written to binlog before ALTER TABLE ... ENABLE KEYS
+# finishes.
+insert into t2 values (1);
+# And this should wait until the end of ALTER TABLE ... ENABLE KEYS.
+insert into t1 values (1, 1, 1);
+connection default;
+--reap
+# Check that statements were executed/binlogged in correct order.
+--replace_column 2 # 5 #
+show binlog events in 'master-bin.000001' from 98;
+
+# Clean up
+drop tables t1, t2;
+
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test
index cfa6182543b..01f55931ca4 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -372,6 +372,103 @@ alter table t1 add unique ( a(1) );
drop table t1;
#
+# Bug #24395: ALTER TABLE DISABLE KEYS doesn't work when modifying the table
+#
+# This problem happens if the data change is compatible.
+# Changing to the same type is compatible for example.
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int, key(a));
+show indexes from t1;
+--echo "this used not to disable the index"
+alter table t1 modify a int, disable keys;
+show indexes from t1;
+
+alter table t1 enable keys;
+show indexes from t1;
+
+alter table t1 modify a bigint, disable keys;
+show indexes from t1;
+
+alter table t1 enable keys;
+show indexes from t1;
+
+alter table t1 add b char(10), disable keys;
+show indexes from t1;
+
+alter table t1 add c decimal(10,2), enable keys;
+show indexes from t1;
+
+--echo "this however did"
+alter table t1 disable keys;
+show indexes from t1;
+
+desc t1;
+
+alter table t1 add d decimal(15,5);
+--echo "The key should still be disabled"
+show indexes from t1;
+
+drop table t1;
+
+--echo "Now will test with one unique index"
+create table t1(a int, b char(10), unique(a));
+show indexes from t1;
+alter table t1 disable keys;
+show indexes from t1;
+alter table t1 enable keys;
+
+--echo "If no copy on noop change, this won't touch the data file"
+--echo "Unique index, no change"
+alter table t1 modify a int, disable keys;
+show indexes from t1;
+
+--echo "Change the type implying data copy"
+--echo "Unique index, no change"
+alter table t1 modify a bigint, disable keys;
+show indexes from t1;
+
+alter table t1 modify a bigint;
+show indexes from t1;
+
+alter table t1 modify a int;
+show indexes from t1;
+
+drop table t1;
+
+--echo "Now will test with one unique and one non-unique index"
+create table t1(a int, b char(10), unique(a), key(b));
+show indexes from t1;
+alter table t1 disable keys;
+show indexes from t1;
+alter table t1 enable keys;
+
+
+--echo "If no copy on noop change, this won't touch the data file"
+--echo "The non-unique index will be disabled"
+alter table t1 modify a int, disable keys;
+show indexes from t1;
+alter table t1 enable keys;
+show indexes from t1;
+
+--echo "Change the type implying data copy"
+--echo "The non-unique index will be disabled"
+alter table t1 modify a bigint, disable keys;
+show indexes from t1;
+
+--echo "Change again the type, but leave the indexes as_is"
+alter table t1 modify a int;
+show indexes from t1;
+--echo "Try the same. When data is no copied on similar tables, this is noop"
+alter table t1 modify a int;
+show indexes from t1;
+
+drop table t1;
+
+
+#
# Bug#11493 - Alter table rename to default database does not work without
# db name qualifying
#
@@ -402,6 +499,100 @@ alter table test.t1 rename test.t1;
use test;
drop table t1;
+#
+# BUG#23404 - ROW_FORMAT=FIXED option is lost is an index is added to the
+# table
+#
+CREATE TABLE t1(a INT) ROW_FORMAT=FIXED;
+CREATE INDEX i1 ON t1(a);
+SHOW CREATE TABLE t1;
+DROP INDEX i1 ON t1;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
+#
+# Bug#24219 - ALTER TABLE ... RENAME TO ... , DISABLE KEYS leads to crash
+#
+--disable_warnings
+DROP TABLE IF EXISTS bug24219;
+DROP TABLE IF EXISTS bug24219_2;
+--enable_warnings
+
+CREATE TABLE bug24219 (a INT, INDEX(a));
+
+SHOW INDEX FROM bug24219;
+
+ALTER TABLE bug24219 RENAME TO bug24219_2, DISABLE KEYS;
+
+SHOW INDEX FROM bug24219_2;
+
+DROP TABLE bug24219_2;
+
+#
+# Bug#24562 (ALTER TABLE ... ORDER BY ... with complex expression asserts)
+#
+
+--disable_warnings
+drop table if exists table_24562;
+--enable_warnings
+
+create table table_24562(
+ section int,
+ subsection int,
+ title varchar(50));
+
+insert into table_24562 values
+(1, 0, "Introduction"),
+(1, 1, "Authors"),
+(1, 2, "Acknowledgements"),
+(2, 0, "Basics"),
+(2, 1, "Syntax"),
+(2, 2, "Client"),
+(2, 3, "Server"),
+(3, 0, "Intermediate"),
+(3, 1, "Complex queries"),
+(3, 2, "Stored Procedures"),
+(3, 3, "Stored Functions"),
+(4, 0, "Advanced"),
+(4, 1, "Replication"),
+(4, 2, "Load balancing"),
+(4, 3, "High availability"),
+(5, 0, "Conclusion");
+
+select * from table_24562;
+
+alter table table_24562 add column reviewer varchar(20),
+order by title;
+
+select * from table_24562;
+
+update table_24562 set reviewer="Me" where section=2;
+update table_24562 set reviewer="You" where section=3;
+
+alter table table_24562
+order by section ASC, subsection DESC;
+
+select * from table_24562;
+
+alter table table_24562
+order by table_24562.subsection ASC, table_24562.section DESC;
+
+select * from table_24562;
+
+--error ER_PARSE_ERROR
+alter table table_24562 order by 12;
+--error ER_PARSE_ERROR
+alter table table_24562 order by (section + 12);
+--error ER_PARSE_ERROR
+alter table table_24562 order by length(title);
+--error ER_PARSE_ERROR
+alter table table_24562 order by (select 12 from dual);
+
+--error ER_BAD_FIELD_ERROR
+alter table table_24562 order by no_such_col;
+
+drop table table_24562;
+
# End of 4.1 tests
#
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index f712a770712..80533f21311 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1345,10 +1345,14 @@ SELECT * FROM t2;
CHECK TABLE t2;
SELECT * FROM t2;
-
-# Just test syntax, we will never know if the output is right or wrong
-# Must be the last test
+# Test INSERT DELAYED and wait until the table has one more record
+SELECT COUNT(auto) FROM t2;
INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
+while (`SELECT COUNT(auto)!=1214 FROM t2`)
+{
+ sleep 0.1;
+}
+SELECT COUNT(auto) FROM t2;
# Adding test for alter table
ALTER TABLE t2 DROP COLUMN fld6;
diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test
index 053e83528e0..a3339ecce69 100644
--- a/mysql-test/t/backup.test
+++ b/mysql-test/t/backup.test
@@ -1,6 +1,3 @@
-# This test should work in embedded server after we fix mysqltest
--- source include/not_embedded.inc
-
#
# This test is a bit tricky as we can't use backup table to overwrite an old
# table
diff --git a/mysql-test/t/bdb.test b/mysql-test/t/bdb.test
index ec05eeb3c34..d017d91bfb1 100644
--- a/mysql-test/t/bdb.test
+++ b/mysql-test/t/bdb.test
@@ -1019,39 +1019,4 @@ commit;
alter table t1 add primary key(a);
drop table t1;
-
-#
-# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
-#
-set autocommit=1;
-
-let $VERSION=`select version()`;
-
-reset master;
-create table bug16206 (a int);
-insert into bug16206 values(1);
-start transaction;
-insert into bug16206 values(2);
-commit;
---replace_result $VERSION VERSION
---replace_column 1 f 2 n 5 n
-show binlog events;
-drop table bug16206;
-
-reset master;
-create table bug16206 (a int) engine= bdb;
-insert into bug16206 values(0);
-insert into bug16206 values(1);
-start transaction;
-insert into bug16206 values(2);
-commit;
-insert into bug16206 values(3);
---replace_result $VERSION VERSION
---replace_column 1 f 2 n 5 n
-show binlog events;
-drop table bug16206;
-
-set autocommit=0;
-
-
--echo End of 5.0 tests
diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test
index 35cda11646a..6c1229db83f 100644
--- a/mysql-test/t/bigint.test
+++ b/mysql-test/t/bigint.test
@@ -278,4 +278,13 @@ select * from t1 where bigint_col=17666000000000000000;
select * from t1 where bigint_col='17666000000000000000';
drop table t1;
+--echo
+--echo bug 19955 -- mod is signed with bigint
+
+select cast(10000002383263201056 as unsigned) mod 50 as result;
+
+create table t1 (c1 bigint unsigned);
+insert into t1 values (10000002383263201056);
+select c1 mod 50 as result from t1;
+drop table t1;
diff --git a/mysql-test/t/ctype_hebrew.test b/mysql-test/t/ctype_hebrew.test
new file mode 100644
index 00000000000..f786d05141d
--- /dev/null
+++ b/mysql-test/t/ctype_hebrew.test
@@ -0,0 +1,16 @@
+#
+# BUG #24037: Lossy Hebrew to Unicode conversion
+#
+# Test if LRM and RLM characters are correctly converted to UTF-8
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+SET NAMES hebrew;
+CREATE TABLE t1 (a char(1)) DEFAULT CHARSET=hebrew;
+INSERT INTO t1 VALUES (0xFD),(0xFE);
+ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+SELECT HEX(a) FROM t1;
+DROP TABLE t1;
+
+--echo End of 4.1 tests
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 71259dab0c9..04b7ec78842 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -94,6 +94,26 @@ select * from t1;
drop table t1;
#
+# Bug#22646 LC_TIME_NAMES: Assignment to non-UTF8 target fails
+#
+set names utf8;
+set LC_TIME_NAMES='fr_FR';
+create table t1 (s1 char(20) character set latin1);
+insert into t1 values (date_format('2004-02-02','%M'));
+select hex(s1) from t1;
+drop table t1;
+create table t1 (s1 char(20) character set koi8r);
+set LC_TIME_NAMES='ru_RU';
+insert into t1 values (date_format('2004-02-02','%M'));
+insert into t1 values (date_format('2004-02-02','%b'));
+insert into t1 values (date_format('2004-02-02','%W'));
+insert into t1 values (date_format('2004-02-02','%a'));
+select hex(s1), s1 from t1;
+drop table t1;
+set LC_TIME_NAMES='en_US';
+
+
+#
# Bug #2366 Wrong utf8 behaviour when data is truncated
#
set names koi8r;
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index a81487d273d..3054ec53faa 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -326,4 +326,12 @@ SELECT TIME_FORMAT("25:00:00", '%l %p');
#
SELECT DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896);
+#
+# Bug #22029: str_to_date returning NULL
+#
+
+select str_to_date('04 /30/2004', '%m /%d/%Y');
+select str_to_date('04/30 /2004', '%m /%d /%Y');
+select str_to_date('04/30/2004 ', '%m/%d/%Y ');
+
--echo "End of 4.1 tests"
diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test
index b5522394d2d..225ddbc3ee2 100644
--- a/mysql-test/t/default.test
+++ b/mysql-test/t/default.test
@@ -82,3 +82,61 @@ SELECT * from t2;
drop table t1;
drop table t2;
+
+#
+# Bug#20691: DATETIME col (NOT NULL, NO DEFAULT) may insert garbage when specifying DEFAULT
+#
+# From the docs:
+# If the column can take NULL as a value, the column is defined with an
+# explicit DEFAULT NULL clause. This is the same as before 5.0.2.
+#
+# If the column cannot take NULL as the value, MySQL defines the column with
+# no explicit DEFAULT clause. For data entry, if an INSERT or REPLACE
+# statement includes no value for the column, MySQL handles the column
+# according to the SQL mode in effect at the time:
+#
+# * If strict SQL mode is not enabled, MySQL sets the column to the
+# implicit default value for the column data type.
+#
+# * If strict mode is enabled, an error occurs for transactional tables and
+# the statement is rolled back. For non-transactional tables, an error
+# occurs, but if this happens for the second or subsequent row of a
+# multiple-row statement, the preceding rows will have been inserted.
+#
+create table bug20691 (i int, d datetime NOT NULL, dn datetime not null default '0000-00-00 00:00:00');
+insert into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT);
+insert into bug20691 (i) values (2);
+desc bug20691;
+insert into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT);
+insert into bug20691 (i) values (4);
+insert into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT);
+SET sql_mode = 'ALLOW_INVALID_DATES';
+insert into bug20691 values (6, DEFAULT, DEFAULT), (6, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (6, DEFAULT, DEFAULT);
+SET sql_mode = 'STRICT_ALL_TABLES';
+--error 1364
+insert into bug20691 values (7, DEFAULT, DEFAULT), (7, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (7, DEFAULT, DEFAULT);
+select * from bug20691 order by i asc;
+drop table bug20691;
+
+SET sql_mode = '';
+create table bug20691 (
+ a set('one', 'two', 'three') not null,
+ b enum('small', 'medium', 'large', 'enormous', 'ellisonego') not null,
+ c time not null,
+ d date not null,
+ e int not null,
+ f long not null,
+ g blob not null,
+ h datetime not null,
+ i decimal not null,
+ x int);
+insert into bug20691 values (2, 3, 5, '0007-01-01', 11, 13, 17, '0019-01-01 00:00:00', 23, 1);
+insert into bug20691 (x) values (2);
+insert into bug20691 values (2, 3, 5, '0007-01-01', 11, 13, 17, '0019-01-01 00:00:00', 23, 3);
+insert into bug20691 values (DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, 4);
+select * from bug20691 order by x asc;
+drop table bug20691;
+
+###
+--echo End of 5.0 tests.
+
diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test
index 03d8e20dd8f..fe8bc167e0f 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -1,11 +1,10 @@
+# delayed works differently in embedded server
+--source include/not_embedded.inc
#
# test of DELAYED insert and timestamps
# (Can't be tested with purify :( )
#
-# This tests not performed with embedded server
--- source include/not_embedded.inc
-
--disable_warnings
drop table if exists t1;
--enable_warnings
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index df56165950f..3213bd4eb5b 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -10,5 +10,8 @@
#
##############################################################################
+im_daemon_life_cycle : Bug#24415 see note: [19 Dec 23:17] Trudy Pelzer
ndb_load : Bug#17233
user_limits : Bug#23921 random failure of user_limits.test
+flush2 : Bug#24805 Pushbuild can't handle test with --disable-log-bin
+
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index e517380ba9b..8734b940241 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -437,3 +437,91 @@ EXPLAIN SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a;
SELECT DISTINCT a,a FROM t1 WHERE b < 12 ORDER BY a;
DROP TABLE t1;
+# The test case for bug#20836 should be re-enabled when bug#16861 is resolved
+# The results for the test should be the same as in 4.1.
+#
+#Bug #20836: Selecting into variables results in wrong results being returned
+#
+#--disable_warnings
+#DROP TABLE IF EXISTS t1;
+#--enable_warnings
+#
+#CREATE TABLE t1 (id INT NOT NULL, fruit_id INT NOT NULL, fruit_name varchar(20)
+#default NULL);
+#
+#INSERT INTO t1 VALUES (1,1,'ORANGE');
+#INSERT INTO t1 VALUES (2,2,'APPLE');
+#INSERT INTO t1 VALUES (3,2,'APPLE');
+#INSERT INTO t1 VALUES (4,3,'PEAR');
+#
+#SELECT DISTINCT fruit_id, fruit_name INTO @v1, @v2 FROM t1 WHERE fruit_name =
+#'APPLE';
+#SELECT @v1, @v2;
+#
+#SELECT DISTINCT fruit_id, fruit_name INTO @v3, @v4 FROM t1 GROUP BY fruit_id,
+#fruit_name HAVING fruit_name = 'APPLE';
+#SELECT @v3, @v4;
+#
+#SELECT DISTINCT @v5:= fruit_id, @v6:= fruit_name INTO @v7, @v8 FROM t1 WHERE
+#fruit_name = 'APPLE';
+#SELECT @v5, @v6, @v7, @v8;
+#
+#SELECT DISTINCT @v5 + fruit_id, CONCAT(@v6, fruit_name) INTO @v9, @v10 FROM t1
+#WHERE fruit_name = 'APPLE';
+#SELECT @v5, @v6, @v7, @v8, @v9, @v10;
+#
+#SELECT DISTINCT @v11:= @v5 + fruit_id, @v12:= CONCAT(@v6, fruit_name) INTO
+#@v13, @v14 FROM t1 WHERE fruit_name = 'APPLE';
+#SELECT @v11, @v12, @v13, @v14;
+#
+#SELECT DISTINCT @v13, @v14 INTO @v15, @v16 FROM t1 WHERE fruit_name = 'APPLE';
+#SELECT @v15, @v16;
+#
+#SELECT DISTINCT 2 + 2, 'Bob' INTO @v17, @v18 FROM t1 WHERE fruit_name =
+#'APPLE';
+#SELECT @v17, @v18;
+#
+#--disable_warnings
+#DROP TABLE IF EXISTS t2;
+#--enable_warnings
+#
+#CREATE TABLE t2 (fruit_id INT NOT NULL, fruit_name varchar(20)
+#default NULL);
+#
+#SELECT DISTINCT fruit_id, fruit_name INTO OUTFILE
+#'../tmp/data1.tmp' FROM t1 WHERE fruit_name = 'APPLE';
+#LOAD DATA INFILE '../tmp/data1.tmp' INTO TABLE t2;
+#--exec rm $MYSQL_TEST_DIR/var/tmp/data1.tmp
+#
+#SELECT DISTINCT @v19:= fruit_id, @v20:= fruit_name INTO OUTFILE
+#'../tmp/data2.tmp' FROM t1 WHERE fruit_name = 'APPLE';
+#LOAD DATA INFILE '../tmp/data2.tmp' INTO TABLE t2;
+#--exec rm $MYSQL_TEST_DIR/var/tmp/data2.tmp
+#
+#SELECT @v19, @v20;
+#SELECT * FROM t2;
+#
+#DROP TABLE t1;
+#DROP TABLE t2;
+
+#
+# Bug #15881: cast problems
+#
+CREATE TABLE t1 (a CHAR(1)); INSERT INTO t1 VALUES('A'), (0);
+SELECT a FROM t1 WHERE a=0;
+SELECT DISTINCT a FROM t1 WHERE a=0;
+DROP TABLE t1;
+CREATE TABLE t1 (a DATE);
+INSERT INTO t1 VALUES ('1972-07-29'), ('1972-02-06');
+EXPLAIN SELECT (SELECT DISTINCT a FROM t1 WHERE a = '2002-08-03');
+EXPLAIN SELECT (SELECT DISTINCT ADDDATE(a,1) FROM t1
+ WHERE ADDDATE(a,1) = '2002-08-03');
+CREATE TABLE t2 (a CHAR(5) CHARACTER SET latin1 COLLATE latin1_general_ci);
+INSERT INTO t2 VALUES (0xf6);
+INSERT INTO t2 VALUES ('oe');
+
+SELECT COUNT(*) FROM (SELECT DISTINCT a FROM t2) dt;
+SELECT COUNT(*) FROM
+ (SELECT DISTINCT a FROM t2 WHERE a='oe' COLLATE latin1_german2_ci) dt;
+
+DROP TABLE t1, t2;
diff --git a/mysql-test/t/execution_constants.test b/mysql-test/t/execution_constants.test
index 00967b2eeba..4930164d3fa 100644
--- a/mysql-test/t/execution_constants.test
+++ b/mysql-test/t/execution_constants.test
@@ -1,3 +1,6 @@
+# In embedded server we don't really have a control over stack usage
+-- source include/not_embedded.inc
+
#
# Bug#21476: Lost Database Connection During Query
#
diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test
index c2218b3451b..894cd513914 100644
--- a/mysql-test/t/federated.test
+++ b/mysql-test/t/federated.test
@@ -1544,4 +1544,36 @@ drop table federated.test1, federated.test2;
connection slave;
drop table federated.test;
+#
+# BUG# 17044 Federated Storage Engine not UTF8 clean
+#
+connection slave;
+set names utf8;
+create table federated.t1 (a varchar(64)) DEFAULT CHARSET=utf8;
+
+insert into federated.t1 values (0x6DC3A56E6164);
+select hex(a) from federated.t1;
+
+connection master;
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table federated.t1 (a varchar(64))
+ENGINE=FEDERATED
+connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'
+DEFAULT CHARSET=utf8;
+set names utf8;
+select hex(a) from federated.t1;
+insert into federated.t1 values (0xC3A4C3B6C3BCC39F);
+insert into federated.t1 values (0xD18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E);
+select hex(a) from federated.t1;
+
+connection slave;
+select hex(a) from federated.t1;
+
+connection master;
+drop table federated.t1;
+
+connection slave;
+drop table federated.t1;
+
+
source include/federated_cleanup.inc;
diff --git a/mysql-test/t/fix_priv_tables.test b/mysql-test/t/fix_priv_tables.test
new file mode 100644
index 00000000000..3a91f41dfcc
--- /dev/null
+++ b/mysql-test/t/fix_priv_tables.test
@@ -0,0 +1,66 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
+
+#
+# This is the test for mysql_fix_privilege_tables
+# It checks that a system tables from mysql 4.1.23
+# can be upgraded to current system table format
+#
+# Note: If this test fails, don't be confused about the errors reported
+# by mysql-test-run This shows warnings generated by
+# mysql_fix_system_tables which should be ignored.
+# Instead, concentrate on the errors in r/system_mysql_db.reject
+
+--disable_warnings
+drop table if exists t1,t1aa,t2aa;
+--enable_warnings
+
+#
+# Bug #20589 Missing some table level privileges after upgrade
+#
+# Add some grants that should survive the "upgrade"
+
+--disable_warnings
+DROP DATABASE IF EXISTS testdb;
+--enable_warnings
+CREATE DATABASE testdb;
+CREATE TABLE testdb.t1 (
+ c1 INT,
+ c3 INT NOT NULL AUTO_INCREMENT PRIMARY KEY);
+
+CREATE VIEW testdb.v1 AS
+ SELECT * FROM testdb.t1;
+
+GRANT CREATE VIEW, SHOW VIEW ON testdb.v1 TO 'show_view_tbl'@'localhost';
+SHOW GRANTS FOR 'show_view_tbl'@'localhost';
+echo;
+
+# Some extra GRANTS for more complete test
+GRANT SELECT(c1) on testdb.v1 to 'select_only_c1'@localhost;
+SHOW GRANTS FOR 'select_only_c1'@'localhost';
+echo;
+
+-- disable_result_log
+-- disable_query_log
+
+# Run the mysql_fix_privilege_tables.sql using "mysql --force"
+--exec $MYSQL --force mysql < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/log/fix_priv_tables.log 2>&1
+
+-- enable_query_log
+-- enable_result_log
+
+echo "after fix privs";
+
+SHOW GRANTS FOR 'show_view_tbl'@'localhost';
+echo;
+SHOW GRANTS FOR 'select_only_c1'@'localhost';
+echo;
+
+DROP USER 'show_view_tbl'@'localhost';
+DROP USER 'select_only_c1'@'localhost';
+
+DROP VIEW testdb.v1;
+DROP TABLE testdb.t1;
+DROP DATABASE testdb;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/flush2-master.opt b/mysql-test/t/flush2-master.opt
new file mode 100644
index 00000000000..ccbd01c91d3
--- /dev/null
+++ b/mysql-test/t/flush2-master.opt
@@ -0,0 +1 @@
+--disable-log-bin
diff --git a/mysql-test/t/flush2.test b/mysql-test/t/flush2.test
new file mode 100644
index 00000000000..fc9e88e3141
--- /dev/null
+++ b/mysql-test/t/flush2.test
@@ -0,0 +1,9 @@
+#
+# Bug#17733 Flushing logs causes daily server crash
+#
+flush logs;
+set global expire_logs_days = 3;
+show variables like 'log%';
+flush logs;
+show variables like 'log%';
+set global expire_logs_days = 0;
diff --git a/mysql-test/t/flush_block_commit.test b/mysql-test/t/flush_block_commit.test
index 4412b2c357c..0c1d2b82df6 100644
--- a/mysql-test/t/flush_block_commit.test
+++ b/mysql-test/t/flush_block_commit.test
@@ -75,24 +75,3 @@ show create database test;
drop table t1;
# End of 4.1 tests
-
-# FLUSH TABLES WITH READ LOCK should block writes to binlog too
-connection con1;
-create table t1 (a int) engine=innodb;
-reset master;
-set autocommit=0;
-insert t1 values (1);
-connection con2;
-flush tables with read lock;
-show master status;
-connection con1;
-send commit;
-connection con2;
-sleep 1;
-show master status;
-unlock tables;
-connection con1;
-reap;
-drop table t1;
-set autocommit=1;
-
diff --git a/mysql-test/t/flush_block_commit_notembedded.test b/mysql-test/t/flush_block_commit_notembedded.test
new file mode 100644
index 00000000000..4650a5a15a8
--- /dev/null
+++ b/mysql-test/t/flush_block_commit_notembedded.test
@@ -0,0 +1,32 @@
+# Let's see if FLUSH TABLES WITH READ LOCK blocks COMMIT of existing
+# transactions.
+# We verify that we did not introduce a deadlock.
+# This is intended to mimick how mysqldump and innobackup work.
+
+# And it requires InnoDB
+-- source include/not_embedded.inc
+-- source include/have_innodb.inc
+
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+
+# FLUSH TABLES WITH READ LOCK should block writes to binlog too
+connection con1;
+create table t1 (a int) engine=innodb;
+reset master;
+set autocommit=0;
+insert t1 values (1);
+connection con2;
+flush tables with read lock;
+show master status;
+connection con1;
+send commit;
+connection con2;
+sleep 1;
+show master status;
+unlock tables;
+connection con1;
+reap;
+drop table t1;
+set autocommit=1;
+
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 610c93dfb0f..3ff4b35873b 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -29,8 +29,10 @@ select grp,group_concat(c order by c) from t1 group by grp;
select grp,group_concat(c order by c desc) from t1 group by grp;
select grp,group_concat(d order by a) from t1 group by grp;
select grp,group_concat(d order by a desc) from t1 group by grp;
+--disable_warnings
select grp,group_concat(a order by a,d+c-ascii(c)-a) from t1 group by grp;
select grp,group_concat(a order by d+c-ascii(c),a) from t1 group by grp;
+--enable_warnings
select grp,group_concat(c order by 1) from t1 group by grp;
select grp,group_concat(distinct c order by c) from t1 group by grp;
select grp,group_concat(distinct c order by c desc) from t1 group by grp;
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index 089f5ed9911..a3b3fceaec5 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -29,7 +29,9 @@ select count(distinct a),count(distinct grp) from t1;
select sum(all a),count(all a),avg(all a),std(all a),variance(all a),bit_or(all a),bit_and(all a),min(all a),max(all a),min(all c),max(all c) from t1;
select grp, sum(a),count(a),avg(a),std(a),variance(a),bit_or(a),bit_and(a),min(a),max(a),min(c),max(c) from t1 group by grp;
+--disable_warnings
select grp, sum(a)+count(a)+avg(a)+std(a)+variance(a)+bit_or(a)+bit_and(a)+min(a)+max(a)+min(c)+max(c) as sum from t1 group by grp;
+--enable_warnings
create table t2 (grp int, a bigint unsigned, c char(10));
insert into t2 select grp,max(a)+max(grp),max(c) from t1 group by grp;
@@ -700,6 +702,97 @@ create table t1 select stddev(0);
show create table t1;
drop table t1;
+
+#
+# Bug#22555: STDDEV yields positive result for groups with only one row
+#
+
+create table bug22555 (i smallint primary key auto_increment, s1 smallint, s2 smallint, e decimal(30,10), o double);
+insert into bug22555 (s1, s2, e, o) values (53, 78, 11.4276528, 6.828112), (17, 78, 5.916793, 1.8502951), (18, 76, 2.679231, 9.17975591), (31, 62, 6.07831, 0.1), (19, 41, 5.37463, 15.1), (83, 73, 14.567426, 7.959222), (92, 53, 6.10151, 13.1856852), (7, 12, 13.92272, 3.442007), (92, 35, 11.95358909, 6.01376678), (38, 84, 2.572, 7.904571);
+select std(s1/s2) from bug22555 group by i;
+select std(e) from bug22555 group by i;
+select std(o) from bug22555 group by i;
+drop table bug22555;
+
+create table bug22555 (i smallint, s1 smallint, s2 smallint, o1 double, o2 double, e1 decimal, e2 decimal);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+select i, count(*) from bug22555 group by i;
+select std(s1/s2) from bug22555 where i=1;
+select std(s1/s2) from bug22555 where i=2;
+select std(s1/s2) from bug22555 where i=3;
+select std(s1/s2) from bug22555 where i=1 group by i;
+select std(s1/s2) from bug22555 where i=2 group by i;
+select std(s1/s2) from bug22555 where i=3 group by i;
+select std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+set div_precision_increment=20;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+set @@div_precision_increment=@saved_div_precision_increment;
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+select std(s1/s2) from bug22555;
+select std(o1/o2) from bug22555;
+select std(e1/e2) from bug22555;
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+select round(std(s1/s2), 17) from bug22555;
+select std(o1/o2) from bug22555;
+select round(std(e1/e2), 17) from bug22555;
+set div_precision_increment=20;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+select round(std(s1/s2), 17) from bug22555;
+select std(o1/o2) from bug22555;
+select round(std(e1/e2), 17) from bug22555;
+set @@div_precision_increment=@saved_div_precision_increment;
+drop table bug22555;
+
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (1,1,1),(2,2,2),(3,3,3),(6,6,6),(7,7,7);
+select var_samp(s), var_pop(s) from bug22555;
+select var_samp(o), var_pop(o) from bug22555;
+select var_samp(e), var_pop(e) from bug22555;
+drop table bug22555;
+
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (null,null,null),(null,null,null);
+select var_samp(s) as 'null', var_pop(s) as 'null' from bug22555;
+select var_samp(o) as 'null', var_pop(o) as 'null' from bug22555;
+select var_samp(e) as 'null', var_pop(e) as 'null' from bug22555;
+insert into bug22555 values (1,1,1);
+select var_samp(s) as 'null', var_pop(s) as '0' from bug22555;
+select var_samp(o) as 'null', var_pop(o) as '0' from bug22555;
+select var_samp(e) as 'null', var_pop(e) as '0' from bug22555;
+insert into bug22555 values (2,2,2);
+select var_samp(s) as '0.5', var_pop(s) as '0.25' from bug22555;
+select var_samp(o) as '0.5', var_pop(o) as '0.25' from bug22555;
+select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555;
+drop table bug22555;
+
+
#
# Bug #23184: SELECT causes server crash
#
@@ -724,4 +817,5 @@ SELECT a,AVG(DISTINCT b) AS average FROM t1 GROUP BY a HAVING average > 50;
DROP TABLE t1;
+###
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index d48606ac6e6..86b0268f008 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -252,6 +252,13 @@ insert into t1 values (1),(2);
select some_id from t1 where some_id not in(2,-1);
select some_id from t1 where some_id not in(-4,-1,-4);
select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
+
+#
+# BUG#24261: crash when WHERE contains NOT IN ('<negative value>') for unsigned column type
+#
+
+select some_id from t1 where some_id not in('-1', '0');
+
drop table t1;
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 52a5512d070..5cac6c45f65 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -125,4 +125,11 @@ drop table t2;
drop table t1;
set global query_cache_size=default;
+#
+# Bug #21466: INET_ATON() returns signed, not unsigned
+#
+
+create table t1 select INET_ATON('255.255.0.1') as `a`;
+show create table t1;
+drop table t1;
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index af4f8b9a9d2..a55b633b91e 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -991,5 +991,13 @@ SELECT CHAR(0xff,0x8f USING utf8) IS NULL;
SET SQL_MODE=@orig_sql_mode;
+#
+# Bug #24947: problem with some string function with unsigned int parameters
+#
+
+select substring('abc', cast(2 as unsigned int));
+select repeat('a', cast(2 as unsigned int));
+select rpad('abc', cast(5 as unsigned integer), 'x');
+select lpad('abc', cast(5 as unsigned integer), 'x');
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index a3985998b13..a69cbb67c5b 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -564,6 +564,12 @@ union
union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 HOUR)),'%k') As H);
+#
+# Bug #23653: crash if last_day('0000-00-00')
+#
+
+select last_day('0000-00-00');
+
--echo End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
@@ -701,3 +707,9 @@ SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
DROP TABLE testBug8868;
SET NAMES DEFAULT;
+
+#
+# Bug #22229: bug in DATE_ADD()
+#
+
+select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test
index e34dd14dbfc..1704fe7dc80 100644
--- a/mysql-test/t/gis-rtree.test
+++ b/mysql-test/t/gis-rtree.test
@@ -254,3 +254,20 @@ INSERT INTO t1() VALUES ();
--error 1416
INSERT INTO t1(foo) VALUES ('');
DROP TABLE t1;
+
+#
+# Bug #23578: Corruption prevents Optimize table from working properly with a
+# spatial index
+#
+
+CREATE TABLE t1 (a INT AUTO_INCREMENT, b POINT NOT NULL, KEY (a), SPATIAL KEY (b));
+
+INSERT INTO t1 (b) VALUES (GeomFromText('POINT(1 2)'));
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+INSERT INTO t1 (b) SELECT b FROM t1;
+
+OPTIMIZE TABLE t1;
+DROP TABLE t1;
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 7bba34be3ff..95fdf642b94 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -375,6 +375,20 @@ drop table t1;
select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
select (asWKT(geomfromwkb((0x010100000000000000000024400000000000002440))));
+--enable_metadata
+create table t1 (g GEOMETRY);
+select * from t1;
+select asbinary(g) from t1;
+--disable_metadata
+drop table t1;
+
+create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b));
+alter table t1 disable keys;
+--error 1263
+load data infile '../std_data_ln/bad_gis_data.dat' into table t1;
+alter table t1 enable keys;
+drop table t1;
+
# End of 4.1 tests
#
@@ -410,15 +424,7 @@ alter table t1 add primary key pti(pt);
alter table t1 add primary key pti(pt(20));
drop table t1;
---enable_metadata
-create table t1 (g GEOMETRY);
-select * from t1;
-select asbinary(g) from t1;
---disable_metadata
-drop table t1;
-
create table t1 select GeomFromText('point(1 1)');
desc t1;
drop table t1;
-
diff --git a/mysql-test/t/group_min_max.test b/mysql-test/t/group_min_max.test
index 8f88c98caa7..b3049498f90 100644
--- a/mysql-test/t/group_min_max.test
+++ b/mysql-test/t/group_min_max.test
@@ -810,3 +810,63 @@ explain SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
SELECT MIN(c) FROM t2 WHERE b = 2 and a = 1 and c > 1 GROUP BY a;
DROP TABLE t1,t2;
+
+#
+# Bug#24156: Loose index scan not used with CREATE TABLE ...SELECT and similar statements
+#
+
+CREATE TABLE t1 (a INT, b INT, INDEX (a,b));
+INSERT INTO t1 (a, b) VALUES (1,1), (1,2), (1,3), (1,4), (1,5),
+ (2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
+EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
+FLUSH STATUS;
+SELECT max(b), a FROM t1 GROUP BY a;
+SHOW STATUS LIKE 'handler_read__e%';
+EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
+FLUSH STATUS;
+CREATE TABLE t2 SELECT max(b), a FROM t1 GROUP BY a;
+SHOW STATUS LIKE 'handler_read__e%';
+FLUSH STATUS;
+SELECT * FROM (SELECT max(b), a FROM t1 GROUP BY a) b;
+SHOW STATUS LIKE 'handler_read__e%';
+FLUSH STATUS;
+(SELECT max(b), a FROM t1 GROUP BY a) UNION
+ (SELECT max(b), a FROM t1 GROUP BY a);
+SHOW STATUS LIKE 'handler_read__e%';
+EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
+ (SELECT max(b), a FROM t1 GROUP BY a);
+
+EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
+ FROM t1 AS t1_outer;
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
+ (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
+ (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
+EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
+ a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
+EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
+ a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
+EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
+ ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
+ AND t1_outer1.b = t1_outer2.b;
+EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
+ FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
+
+CREATE TABLE t3 LIKE t1;
+FLUSH STATUS;
+INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;
+SHOW STATUS LIKE 'handler_read__e%';
+DELETE FROM t3;
+FLUSH STATUS;
+INSERT INTO t3 SELECT 1, (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2)
+ FROM t1 LIMIT 1;
+SHOW STATUS LIKE 'handler_read__e%';
+FLUSH STATUS;
+DELETE FROM t3 WHERE (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) > 10000;
+SHOW STATUS LIKE 'handler_read__e%';
+FLUSH STATUS;
+DELETE FROM t3 WHERE (SELECT (SELECT MAX(b) FROM t1 GROUP BY a HAVING a < 2) x
+ FROM t1) > 10000;
+SHOW STATUS LIKE 'handler_read__e%';
+
+DROP TABLE t1,t2,t3;
diff --git a/mysql-test/t/index_merge_ror.test b/mysql-test/t/index_merge_ror.test
index 48fe5526f11..a9de2f955ee 100644
--- a/mysql-test/t/index_merge_ror.test
+++ b/mysql-test/t/index_merge_ror.test
@@ -250,3 +250,18 @@ select count(a) from t2 ignore index(a,b) where a='AAAAAAAA' and b='AAAAAAAA';
insert into t2 values ('ab', 'ab', 'uh', 'oh');
explain select a from t2 where a='ab';
drop table t2;
+
+#
+# BUG#25048 - ERROR 126 : Incorrect key file for table '.XXXX.MYI'; try to
+# repair it
+#
+CREATE TABLE t1(c1 INT, c2 INT DEFAULT 0, c3 CHAR(255) DEFAULT '',
+KEY(c1), KEY(c2), KEY(c3));
+INSERT INTO t1(c1) VALUES(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),
+(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0),(0);
+INSERT INTO t1 VALUES(0,0,0);
+CREATE TABLE t2(c1 int);
+INSERT INTO t2 VALUES(1);
+DELETE t1 FROM t1,t2 WHERE t1.c1=0 AND t1.c2=0;
+SELECT * FROM t1;
+DROP TABLE t1,t2;
diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
index dd203add344..623ccee49e4 100644
--- a/mysql-test/t/information_schema.test
+++ b/mysql-test/t/information_schema.test
@@ -715,7 +715,7 @@ create temporary table schemata(f1 char(10));
# Bug #10708 SP's can use INFORMATION_SCHEMA as ROUTINE_SCHEMA
#
delimiter |;
---error 1044
+--error ER_BAD_DB_ERROR
CREATE PROCEDURE p1 ()
BEGIN
SELECT 'foo' FROM DUAL;
diff --git a/mysql-test/t/information_schema_chmod.test b/mysql-test/t/information_schema_chmod.test
index c7ea2b03890..38586ab8b67 100644
--- a/mysql-test/t/information_schema_chmod.test
+++ b/mysql-test/t/information_schema_chmod.test
@@ -17,7 +17,7 @@
#
create database mysqltest;
create table mysqltest.t1(a int);
---exec chmod -r $MYSQLTEST_VARDIR/master-data/mysqltest
+chmod 0000 $MYSQLTEST_VARDIR/master-data/mysqltest;
select table_schema from information_schema.tables where table_schema='mysqltest';
---exec chmod +r $MYSQLTEST_VARDIR/master-data/mysqltest
+exec chmod 0777 $MYSQLTEST_VARDIR/master-data/mysqltest;
drop database mysqltest;
diff --git a/mysql-test/t/information_schema_db.test b/mysql-test/t/information_schema_db.test
index 4dfe1ad56b5..e15e50e8766 100644
--- a/mysql-test/t/information_schema_db.test
+++ b/mysql-test/t/information_schema_db.test
@@ -1,3 +1,7 @@
+# this test mostly test privilege control (what doesn't work
+# in the embedded server by default). So disabled in embedded-server mode
+-- source include/not_embedded.inc
+
-- source include/testdb_only.inc
--disable_warnings
diff --git a/mysql-test/t/init_connect.test b/mysql-test/t/init_connect.test
index 31a98df33df..cf98f608982 100644
--- a/mysql-test/t/init_connect.test
+++ b/mysql-test/t/init_connect.test
@@ -232,7 +232,9 @@ connection con0;
disconnect con1;
drop trigger trg1;
-set global init_connect=default;
+# Set init connect back to the value provided in init_connect-master.opt
+# doesn't matter as server will be restarted
+set global init_connect="set @a='a\\0c'";
revoke all privileges, grant option from mysqltest1@localhost;
drop user mysqltest1@localhost;
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 4a1efc9e566..20f07ccdde0 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -2154,6 +2154,7 @@ select * from t1, t2
drop table t1, t2;
# bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID"
+--replace_result \\ / $MYSQL_TEST_DIR . /var/master-data/ /
--error 1005
CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
diff --git a/mysql-test/t/innodb_mysql-master.opt b/mysql-test/t/innodb_mysql-master.opt
new file mode 100644
index 00000000000..205c733455d
--- /dev/null
+++ b/mysql-test/t/innodb_mysql-master.opt
@@ -0,0 +1 @@
+--innodb-lock-wait-timeout=2
diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test
index 06cfe71ef11..45a2ede091b 100644
--- a/mysql-test/t/innodb_mysql.test
+++ b/mysql-test/t/innodb_mysql.test
@@ -384,4 +384,6 @@ EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
DROP TABLE t1;
+--source include/innodb_rollback_on_timeout.inc
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/innodb_timeout_rollback-master.opt b/mysql-test/t/innodb_timeout_rollback-master.opt
new file mode 100644
index 00000000000..50921bb4df0
--- /dev/null
+++ b/mysql-test/t/innodb_timeout_rollback-master.opt
@@ -0,0 +1 @@
+--innodb_lock_wait_timeout=2 --innodb_rollback_on_timeout
diff --git a/mysql-test/t/innodb_timeout_rollback.test b/mysql-test/t/innodb_timeout_rollback.test
new file mode 100644
index 00000000000..99890971064
--- /dev/null
+++ b/mysql-test/t/innodb_timeout_rollback.test
@@ -0,0 +1,5 @@
+-- source include/have_innodb.inc
+
+--source include/innodb_rollback_on_timeout.inc
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index ac43d0bc818..029c4d19e63 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -177,18 +177,6 @@ select count(*) from t2;
drop table t1,t2,t3;
#
-# Test for INSERT DELAYED INTO a <view>
-# BUG#13683: INSERT DELAYED into a view creates an infinite loop
-#
-
-create table t1 (n int);
-create view v1 as select * from t1;
---error 1347
-insert delayed into v1 values (1);
-drop table t1;
-drop view v1;
-
-#
# Test for values returned by ROW_COUNT() function
# (and thus for values returned by mysql_affected_rows())
# for various forms of INSERT
diff --git a/mysql-test/t/insert_notembedded.test b/mysql-test/t/insert_notembedded.test
new file mode 100644
index 00000000000..bdea72e9eca
--- /dev/null
+++ b/mysql-test/t/insert_notembedded.test
@@ -0,0 +1,154 @@
+-- source include/not_embedded.inc
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+# Test for INSERT DELAYED INTO a <view>
+# BUG#13683: INSERT DELAYED into a view creates an infinite loop
+#
+
+create table t1 (n int);
+create view v1 as select * from t1;
+--error 1347
+insert delayed into v1 values (1);
+drop table t1;
+drop view v1;
+
+#
+# Bug #20989: View '(null).(null)' references invalid table(s)... on
+# SQL SECURITY INVOKER
+#
+# this is really the fact that REPLACE ... SELECT required additional
+# INSERT privs (on tables that are part of a view) over the related
+# REPLACE, SELECT
+#
+
+CREATE DATABASE meow;
+
+connect (root,localhost,root,,meow);
+connection root;
+
+CREATE TABLE table_target ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
+CREATE TABLE table_target2 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
+CREATE TABLE table_target3 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
+CREATE VIEW view_target2 AS SELECT mexs_id,messzeit FROM table_target2;
+CREATE SQL SECURITY INVOKER VIEW view_target3 AS SELECT mexs_id,messzeit FROM table_target3;
+
+CREATE TABLE table_stations ( mexs_id VARCHAR(8), icao VARCHAR(4), country CHAR(2), PRIMARY KEY (mexs_id), UNIQUE KEY icao (icao), KEY country (country), CONSTRAINT stations_ibfk_8 FOREIGN KEY (country) REFERENCES countries (country) ON UPDATE CASCADE);
+INSERT INTO table_stations VALUES ('87654321','XXXX','YY');
+
+CREATE TABLE table_countries ( country CHAR(2), iso_short_en VARCHAR(64), PRIMARY KEY (country));
+INSERT INTO table_countries VALUES ('YY','Entenhausen');
+
+CREATE ALGORITHM=MERGE SQL SECURITY INVOKER VIEW view_stations AS select table_stations.mexs_id AS mexs_id, table_stations.icao AS icao, table_stations.country AS landescode from (table_stations join table_countries on((table_stations.country = table_countries.country)));
+
+CREATE TABLE table_source ( id varchar(4), datetime TIMESTAMP, PRIMARY KEY (id));
+INSERT INTO table_source VALUES ('XXXX','2006-07-12 07:50:00');
+
+GRANT SELECT ON table_source TO user20989@localhost;
+GRANT SELECT ON table_countries TO user20989@localhost;
+GRANT SELECT ON table_stations TO user20989@localhost;
+GRANT SELECT ON view_stations TO user20989@localhost;
+GRANT SELECT ON table_target TO user20989@localhost;
+GRANT SELECT ON table_target2 TO user20989@localhost;
+GRANT INSERT,DELETE,SELECT ON view_target3 TO user20989@localhost;
+
+connect (user20989,localhost,user20989,,meow);
+connection user20989;
+
+--error 1142
+REPLACE INTO table_target
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN table_target AS old
+USING (mexs_id);
+
+--error 1142
+REPLACE INTO view_target2
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target2 AS old
+USING (mexs_id);
+
+--error 1356
+REPLACE INTO view_target3
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target3 AS old
+USING (mexs_id);
+
+connection root;
+disconnect user20989;
+
+GRANT INSERT,DELETE ON table_target TO user20989@localhost;
+GRANT INSERT,DELETE,SELECT ON view_target2 TO user20989@localhost;
+GRANT INSERT,DELETE,SELECT ON table_target3 TO user20989@localhost;
+
+connect (user20989,localhost,user20989,,meow);
+connection user20989;
+
+REPLACE INTO table_target
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN table_target AS old
+USING (mexs_id);
+
+--error 1142
+REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00');
+REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00');
+
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target2 AS old
+USING (mexs_id);
+
+REPLACE INTO view_target2
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target2 AS old
+USING (mexs_id);
+
+REPLACE INTO view_target3
+SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
+FROM table_source
+INNER JOIN view_stations AS stations
+ON table_source.id = stations.icao
+LEFT JOIN view_target3 AS old
+USING (mexs_id);
+
+connection root;
+disconnect user20989;
+
+SELECT * FROM table_target;
+SELECT * FROM view_target2;
+SELECT * FROM view_target3;
+
+DROP VIEW view_stations;
+DROP TABLE table_source;
+DROP TABLE table_countries;
+DROP TABLE table_stations;
+DROP TABLE table_target;
+DROP TABLE table_target2;
+DROP TABLE table_target3;
+DROP VIEW view_target2;
+DROP VIEW view_target3;
+DROP USER user20989@localhost;
+
+disconnect root;
+
+connection default;
+
+DROP DATABASE meow;
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index 6f86ed897ac..404d67390ab 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -266,140 +266,3 @@ INSERT INTO bug21774_2.t1 SELECT t1.* FROM t1;
DROP DATABASE bug21774_1;
DROP DATABASE bug21774_2;
-#
-# Bug #20989: View '(null).(null)' references invalid table(s)... on
-# SQL SECURITY INVOKER
-#
-# this is really the fact that REPLACE ... SELECT required additional
-# INSERT privs (on tables that are part of a view) over the related
-# REPLACE, SELECT
-#
-
-CREATE DATABASE meow;
-
-connect (root,localhost,root,,meow);
-connection root;
-
-CREATE TABLE table_target ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE TABLE table_target2 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE TABLE table_target3 ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
-CREATE VIEW view_target2 AS SELECT mexs_id,messzeit FROM table_target2;
-CREATE SQL SECURITY INVOKER VIEW view_target3 AS SELECT mexs_id,messzeit FROM table_target3;
-
-CREATE TABLE table_stations ( mexs_id VARCHAR(8), icao VARCHAR(4), country CHAR(2), PRIMARY KEY (mexs_id), UNIQUE KEY icao (icao), KEY country (country), CONSTRAINT stations_ibfk_8 FOREIGN KEY (country) REFERENCES countries (country) ON UPDATE CASCADE);
-INSERT INTO table_stations VALUES ('87654321','XXXX','YY');
-
-CREATE TABLE table_countries ( country CHAR(2), iso_short_en VARCHAR(64), PRIMARY KEY (country));
-INSERT INTO table_countries VALUES ('YY','Entenhausen');
-
-CREATE ALGORITHM=MERGE SQL SECURITY INVOKER VIEW view_stations AS select table_stations.mexs_id AS mexs_id, table_stations.icao AS icao, table_stations.country AS landescode from (table_stations join table_countries on((table_stations.country = table_countries.country)));
-
-CREATE TABLE table_source ( id varchar(4), datetime TIMESTAMP, PRIMARY KEY (id));
-INSERT INTO table_source VALUES ('XXXX','2006-07-12 07:50:00');
-
-GRANT SELECT ON table_source TO user20989@localhost;
-GRANT SELECT ON table_countries TO user20989@localhost;
-GRANT SELECT ON table_stations TO user20989@localhost;
-GRANT SELECT ON view_stations TO user20989@localhost;
-GRANT SELECT ON table_target TO user20989@localhost;
-GRANT SELECT ON table_target2 TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON view_target3 TO user20989@localhost;
-
-connect (user20989,localhost,user20989,,meow);
-connection user20989;
-
---error 1142
-REPLACE INTO table_target
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN table_target AS old
-USING (mexs_id);
-
---error 1142
-REPLACE INTO view_target2
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-
---error 1356
-REPLACE INTO view_target3
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target3 AS old
-USING (mexs_id);
-
-connection root;
-disconnect user20989;
-
-GRANT INSERT,DELETE ON table_target TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON view_target2 TO user20989@localhost;
-GRANT INSERT,DELETE,SELECT ON table_target3 TO user20989@localhost;
-
-connect (user20989,localhost,user20989,,meow);
-connection user20989;
-
-REPLACE INTO table_target
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN table_target AS old
-USING (mexs_id);
-
---error 1142
-REPLACE INTO table_target2 VALUES ('00X45Y78','2006-07-12 07:50:00');
-REPLACE INTO view_target2 VALUES ('12X45Y78','2006-07-12 07:50:00');
-
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-
-REPLACE INTO view_target2
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target2 AS old
-USING (mexs_id);
-
-REPLACE INTO view_target3
-SELECT stations.mexs_id AS mexs_id, datetime AS messzeit
-FROM table_source
-INNER JOIN view_stations AS stations
-ON table_source.id = stations.icao
-LEFT JOIN view_target3 AS old
-USING (mexs_id);
-
-connection root;
-disconnect user20989;
-
-SELECT * FROM table_target;
-SELECT * FROM view_target2;
-SELECT * FROM view_target3;
-
-DROP VIEW view_stations;
-DROP TABLE table_source;
-DROP TABLE table_countries;
-DROP TABLE table_stations;
-DROP TABLE table_target;
-DROP TABLE table_target2;
-DROP TABLE table_target3;
-DROP VIEW view_target2;
-DROP VIEW view_target3;
-DROP USER user20989@localhost;
-
-disconnect root;
-
-connection default;
-
-DROP DATABASE meow;
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index 4a07f495a55..99dd21e8ee2 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -520,6 +520,8 @@ select * from v1a join v1b on t1.b = t2.b;
#
# Bug #17523 natural join and information_schema
#
+# We mask out the Privileges column because it differs with embedded server
+--replace_column 31 #
select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
@@ -589,3 +591,23 @@ select * from ((t3 natural join (t1 natural join t2)) natural join t4)
drop table t1, t2, t3, t4, t5;
# End of tests for WL#2486 - natural/using join
+
+#
+# BUG#25106: A USING clause in combination with a VIEW results in column
+# aliases ignored
+#
+CREATE TABLE t1 (ID INTEGER, Name VARCHAR(50));
+CREATE TABLE t2 (Test_ID INTEGER);
+CREATE VIEW v1 (Test_ID, Description) AS SELECT ID, Name FROM t1;
+
+CREATE TABLE tv1 SELECT Description AS Name FROM v1 JOIN t2
+ USING (Test_ID);
+DESCRIBE tv1;
+CREATE TABLE tv2 SELECT Description AS Name FROM v1 JOIN t2
+ ON v1.Test_ID = t2.Test_ID;
+DESCRIBE tv2;
+
+DROP VIEW v1;
+DROP TABLE t1,t2,tv1,tv2;
+
+--echo End of 5.0 tests.
diff --git a/mysql-test/t/join_nested.test b/mysql-test/t/join_nested.test
index 69886d035bf..e7405418be7 100644
--- a/mysql-test/t/join_nested.test
+++ b/mysql-test/t/join_nested.test
@@ -994,3 +994,54 @@ SELECT t1.id1 AS id, t5.id1 AS ngroupbynsa
DROP TABLE t1,t2,t3,t4,t5;
+#
+# Test for bug #24345: crash with nested left outer join when outer table is substituted
+# for a row that happens to have a null value for the join attribute.
+#
+
+CREATE TABLE t1 (
+ id int NOT NULL PRIMARY KEY,
+ ct int DEFAULT NULL,
+ pc int DEFAULT NULL,
+ INDEX idx_ct (ct),
+ INDEX idx_pc (pc)
+);
+INSERT INTO t1 VALUES
+ (1,NULL,NULL),(2,NULL,NULL),(3,NULL,NULL),(4,NULL,NULL),(5,NULL,NULL);
+
+CREATE TABLE t2 (
+ id int NOT NULL PRIMARY KEY,
+ sr int NOT NULL,
+ nm varchar(255) NOT NULL,
+ INDEX idx_sr (sr)
+);
+INSERT INTO t2 VALUES
+ (2441905,4308,'LesAbymes'),(2441906,4308,'Anse-Bertrand');
+
+CREATE TABLE t3 (
+ id int NOT NULL PRIMARY KEY,
+ ct int NOT NULL,
+ ln int NOT NULL,
+ INDEX idx_ct (ct),
+ INDEX idx_ln (ln)
+);
+
+CREATE TABLE t4 (
+ id int NOT NULL PRIMARY KEY,
+ nm varchar(255) NOT NULL
+);
+
+INSERT INTO t4 VALUES (4308,'Guadeloupe'),(4309,'Martinique');
+
+SELECT t1.*
+ FROM t1 LEFT JOIN
+ (t2 LEFT JOIN t3 ON t3.ct=t2.id AND t3.ln='5') ON t1.ct=t2.id
+ WHERE t1.id='5';
+
+SELECT t1.*, t4.nm
+ FROM t1 LEFT JOIN
+ (t2 LEFT JOIN t3 ON t3.ct=t2.id AND t3.ln='5') ON t1.ct=t2.id
+ LEFT JOIN t4 ON t2.sr=t4.id
+ WHERE t1.id='5';
+
+DROP TABLE t1,t2,t3,t4;
diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test
index 4001e0df4af..3044964ebc3 100644
--- a/mysql-test/t/key_cache.test
+++ b/mysql-test/t/key_cache.test
@@ -164,16 +164,19 @@ create table t1 (mytext text, FULLTEXT (mytext));
insert t1 values ('aaabbb');
check table t1;
+set @my_key_cache_block_size= @@global.key_cache_block_size;
set GLOBAL key_cache_block_size=2048;
check table t1;
-
drop table t1;
+# Restore the changed variable value
+set global key_cache_block_size= @my_key_cache_block_size;
#
# Bug #19079: corrupted index when key_cache_block_size is not multiple of
# myisam_block_size
CREATE TABLE t1(a int NOT NULL AUTO_INCREMENT PRIMARY KEY);
+SET @my_key_cache_block_size= @@global.key_cache_block_size;
SET GLOBAL key_cache_block_size=1536;
INSERT INTO t1 VALUES (1);
SELECT @@key_cache_block_size;
@@ -206,6 +209,8 @@ SELECT COUNT(*) FROM t1;
SELECT @@key_cache_block_size;
CHECK TABLE t1;
DROP TABLE t1,t2;
+# Restore changed variables
+set global key_cache_block_size= @my_key_cache_block_size;
#
# Bug#10473 - Can't set 'key_buffer_size' system variable to ZERO
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index f8ba649b3eb..1e99911a7e3 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -76,11 +76,14 @@ insert into t2 select id from t1;
create table t3 (kill_id int);
insert into t3 values(connection_id());
+connect (conn2, localhost, root,,);
+connection conn2;
+
+connection conn1;
-- disable_result_log
send select id from t1 where id in (select distinct id from t2);
-- enable_result_log
-connect (conn2, localhost, root,,);
connection conn2;
select ((@id := kill_id) - kill_id) from t3;
-- sleep 1
diff --git a/mysql-test/t/limit.test b/mysql-test/t/limit.test
index 2eb4e6cbbb2..bc599b20d36 100644
--- a/mysql-test/t/limit.test
+++ b/mysql-test/t/limit.test
@@ -69,5 +69,5 @@ explain select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
select count(*) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
explain select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
select sum(a) c FROM t1 WHERE a > 0 ORDER BY c LIMIT 3;
-
+drop table t1;
# End of 4.1 tests
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index d3eeee3b41c..a279b715003 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -1,3 +1,4 @@
+-- source include/not_embedded.inc
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
diff --git a/mysql-test/t/lowercase_fs_off.test b/mysql-test/t/lowercase_fs_off.test
index 883315994fe..414027cb485 100644
--- a/mysql-test/t/lowercase_fs_off.test
+++ b/mysql-test/t/lowercase_fs_off.test
@@ -21,6 +21,7 @@ create database D1;
disconnect sample;
connection master;
+drop user 'sample'@'localhost';
drop database if exists d1;
disconnect master;
connection default;
diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test
index 66440f1236e..8bced9f069c 100644
--- a/mysql-test/t/mix_innodb_myisam_binlog.test
+++ b/mysql-test/t/mix_innodb_myisam_binlog.test
@@ -29,7 +29,7 @@ insert into t2 select * from t1;
commit;
--replace_column 5 #
---replace_result "xid=15" "xid=8"
+--replace_result "xid=14" "xid=8"
show binlog events from 98;
delete from t1;
@@ -58,7 +58,7 @@ rollback to savepoint my_savepoint;
commit;
--replace_column 5 #
---replace_result "xid=48" "xid=25"
+--replace_result "xid=47" "xid=25"
show binlog events from 98;
delete from t1;
@@ -76,7 +76,7 @@ commit;
select a from t1 order by a; # check that savepoints work :)
--replace_column 5 #
---replace_result "xid=70" "xid=37"
+--replace_result "xid=69" "xid=37"
show binlog events from 98;
# and when ROLLBACK is not explicit?
@@ -109,7 +109,7 @@ insert into t1 values(9);
insert into t2 select * from t1;
--replace_column 5 #
---replace_result "xid=119" "xid=60"
+--replace_result "xid=117" "xid=60"
show binlog events from 98;
# Check that when the query updat1ng the MyISAM table is the first in the
@@ -122,13 +122,13 @@ insert into t1 values(10); # first make t1 non-empty
begin;
insert into t2 select * from t1;
--replace_column 5 #
---replace_result "xid=133" "xid=66"
+--replace_result "xid=131" "xid=66"
show binlog events from 98;
insert into t1 values(11);
commit;
--replace_column 5 #
---replace_result "xid=133" "xid=66" "xid=136" "xid=68"
+--replace_result "xid=131" "xid=66" "xid=134" "xid=68"
show binlog events from 98;
@@ -147,7 +147,7 @@ insert into t2 select * from t1;
commit;
--replace_column 5 #
---replace_result "xid=155" "xid=78"
+--replace_result "xid=153" "xid=78"
show binlog events from 98;
delete from t1;
@@ -175,7 +175,7 @@ rollback to savepoint my_savepoint;
commit;
--replace_column 5 #
---replace_result "xid=187" "xid=94"
+--replace_result "xid=185" "xid=94"
show binlog events from 98;
delete from t1;
@@ -193,7 +193,7 @@ commit;
select a from t1 order by a; # check that savepoints work :)
--replace_column 5 #
---replace_result "xid=208" "xid=105"
+--replace_result "xid=206" "xid=105"
show binlog events from 98;
# Test for BUG#5714, where a MyISAM update in the transaction used to
@@ -254,7 +254,7 @@ disconnect con2;
connection con3;
select get_lock("lock1",60);
--replace_column 5 #
---replace_result "xid=208" "xid=105" "xid=227" "xid=114" "xid=230" "xid=115" "xid=234" "xid=117" "xid=261" "xid=132"
+--replace_result "xid=206" "xid=105" "xid=224" "xid=114" "xid=227" "xid=115" "xid=231" "xid=117" "xid=258" "xid=132"
show binlog events from 98;
do release_lock("lock1");
drop table t0,t2;
@@ -290,6 +290,6 @@ eval select
is not null;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval select
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
@a not like "%#%error_code=%error_code=%";
drop table t1, t2;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index d785002abdd..59e3206d1c3 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -498,7 +498,7 @@ insert into t1 values (1),(2),(3),(4),(5),(6);
insert into t2 values (1,1),(2,1);
lock tables t1 read local, t2 read local;
select straight_join * from t1,t2 force index (primary) where t1.a=t2.a;
-connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock);
+connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
insert into t2 values(2,0);
disconnect root;
connection default;
@@ -846,6 +846,37 @@ DROP TABLE t1;
#
SET @@myisam_repair_threads=1;
SHOW VARIABLES LIKE 'myisam_repair%';
+
+#
+# BUG#21310 - Trees in SQL causing a "crashed" table with MyISAM storage
+# engine
+#
+
+# A simplified test case that reflect crashed table issue.
+CREATE TABLE t1(a VARCHAR(16));
+INSERT INTO t1 VALUES('aaaaaaaa'),(NULL);
+UPDATE t1 AS ta1, t1 AS ta2 SET ta1.a='aaaaaaaaaaaaaaaa';
+SELECT * FROM t1;
+DROP TABLE t1;
+
+# A test case that reflect wrong result set.
+CREATE TABLE t1(a INT);
+INSERT INTO t1 VALUES(1),(2);
+UPDATE t1,t1 AS t2 SET t1.a=t1.a+2 WHERE t1.a=t2.a-1;
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+#
+# Bug#24607 - MyISAM pointer size determined incorrectly
+#
+CREATE TABLE t1 (c1 TEXT) AVG_ROW_LENGTH=70100 MAX_ROWS=4100100100;
+--replace_column 5 X 6 X 7 X 9 X 10 X 11 X 12 X 13 X 14 X 16 X
+SHOW TABLE STATUS LIKE 't1';
+DROP TABLE t1;
+
+--echo End of 4.1 tests
+
+
# Test varchar
#
@@ -969,39 +1000,5 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
--error 1064
create table t4 (c1 int) engine=myisam pack_keys=2;
drop table t1, t2, t3;
-#
-# Bug#8706 - temporary table with data directory option fails
-#
-connect (session1,localhost,root,,);
-connect (session2,localhost,root,,);
-
-connection session1;
-disable_query_log;
-eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" select 9 a;
-enable_query_log;
-disable_result_log;
-show create table t1;
-enable_result_log;
-
-connection session2;
-disable_query_log;
-eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" select 99 a;
-enable_query_log;
-disable_result_log;
-show create table t1;
-enable_result_log;
-
-connection default;
-create table t1 (a int) engine=myisam select 42 a;
-
-connection session1;
-select * from t1;
-disconnect session1;
-connection session2;
-select * from t1;
-disconnect session2;
-connection default;
-select * from t1;
-drop table t1;
-# End of 4.1 tests
+--echo End of 5.0 tests
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index cb4a5593de7..829be665e09 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -145,21 +145,24 @@ drop table t1;
#
# Bug #19216: Client crashes on long SELECT
#
---exec echo "select" > $MYSQLTEST_VARDIR/tmp/b19216.tmp
-# 3400 * 20 makes 68000 columns that is more than the max number that can fit
-# in a 16 bit number.
-let $i= 3400;
-while ($i)
-{
- --exec echo "'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a'," >> $MYSQLTEST_VARDIR/tmp/b19216.tmp
- dec $i;
-}
-
---exec echo "'b';" >> $MYSQLTEST_VARDIR/tmp/b19216.tmp
+# Create large SELECT
+# - 3400 * 20 makes 68000 columns that is more than the
+# max number that can fit in a 16 bit number.
+
+--perl
+open(FILE,">","$ENV{'MYSQLTEST_VARDIR'}/tmp/b19216.tmp") or die;
+print FILE "select\n";
+print FILE "'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',\n" x 3400;
+print FILE "'b';\n";
+close FILE;
+EOF
+
--disable_query_log
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/b19216.tmp >/dev/null
--enable_query_log
+--remove_file $MYSQLTEST_VARDIR/tmp/b19216.tmp
+
#
# Bug #20103: Escaping with backslash does not work
#
@@ -241,4 +244,22 @@ drop table t17583;
--error 1
--exec $MYSQL test -e "\r test cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" 2>&1
+#
+# Bug #21412: mysql cmdline client allows backslash(es)
+# as delimiter but can't recognize them
+#
+
+# This should work just fine...
+--exec echo "DELIMITER /" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec echo "SELECT 1/" >> $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
+
+# This should give an error...
+--exec echo "DELIMITER \\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
+
+# As should this...
+--exec echo "DELIMITER \\\\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/mysql_delimiter.sql b/mysql-test/t/mysql_delimiter.sql
index fa80c980b29..db679c3b06b 100644
--- a/mysql-test/t/mysql_delimiter.sql
+++ b/mysql-test/t/mysql_delimiter.sql
@@ -49,3 +49,13 @@ delimiter ; # Reset delimiter
# Bug #11523: \d works differently than delimiter
#
source t/mysql_delimiter_source.sql
+delimiter ; # Reset delimiter
+
+#
+# Bug #19799: delimiter command not working correctly when sourcing a sql file
+# with Windows style line endings.
+#
+source t/mysql_delimiter_19799.sql
+use test//
+show tables//
+delimiter ; # Reset delimiter
diff --git a/mysql-test/t/mysql_delimiter_19799.sql b/mysql-test/t/mysql_delimiter_19799.sql
new file mode 100755
index 00000000000..2a3d4378492
--- /dev/null
+++ b/mysql-test/t/mysql_delimiter_19799.sql
@@ -0,0 +1 @@
+delimiter //
diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test
new file mode 100644
index 00000000000..c6133f8e85f
--- /dev/null
+++ b/mysql-test/t/mysql_upgrade.test
@@ -0,0 +1,23 @@
+# Can't run test of external client with embedded server
+-- source include/not_embedded.inc
+
+# Only run test if "mysql_upgrade" is found
+--require r/have_mysql_upgrade.result
+--disable_query_log
+select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
+--enable_query_log
+
+#
+# Basic test thta we can run mysql_upgrde and that it finds the
+# expected binaries it uses.
+#
+--echo Run mysql_upgrade once
+--exec $MYSQL_UPGRADE 2> $MYSQLTEST_VARDIR/log/mysql_upgrade.err
+
+--echo Run it again - should say already completed
+--exec $MYSQL_UPGRADE 2> $MYSQLTEST_VARDIR/log/mysql_upgrade.err
+
+--echo Force should run it regardless of wheter it's been run before
+--exec $MYSQL_UPGRADE --force 2> $MYSQLTEST_VARDIR/log/mysql_upgrade.err
+
+
diff --git a/mysql-test/t/mysqladmin.test b/mysql-test/t/mysqladmin.test
new file mode 100644
index 00000000000..3fa03fa910e
--- /dev/null
+++ b/mysql-test/t/mysqladmin.test
@@ -0,0 +1,34 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
+#
+# Test "mysqladmin ping"
+#
+
+--exec $MYSQLADMIN --no-defaults -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1
+
+
+#
+# Bug#10608 mysqladmin breaks on "database" variable in my.cnf
+#
+
+# When mysqladmin finds database in .cnf file it shall fail
+--write_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf
+[client]
+database=db1
+EOF
+
+--replace_regex /.*mysqladmin.*: unknown/mysqladmin: unknown/
+--error 7
+--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1
+
+
+# When mysqladmin finds "loose-database" in .cnf file it shall print
+# a warning and continue
+--write_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf
+[client]
+loose-database=db2
+EOF
+
+--replace_regex /Warning: .*mysqladmin.*: unknown/Warning: mysqladmin: unknown/
+--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1
+
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 0691cb7c76b..b2bda247cd7 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -134,6 +134,48 @@ flush logs;
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL
select * from t5 /* must be (1),(1) */;
+#
+# Bug#22645 LC_TIME_NAMES: Statement not replicated
+# Check that a dump created by mysqlbinlog reproduces
+# lc_time_names dependent values correctly
+#
+flush logs;
+drop table if exists t5;
+create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
+insert into t5 values (1, date_format('2001-01-01','%W'));
+set lc_time_names=de_DE;
+insert into t5 values (2, date_format('2001-01-01','%W'));
+set lc_time_names=en_US;
+insert into t5 values (3, date_format('2001-01-01','%W'));
+select * from t5 order by c1;
+flush logs;
+drop table t5;
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 | $MYSQL
+select * from t5 order by c1;
+#
+# Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
+#
+--disable_warnings
+drop procedure if exists p1;
+--enable_warnings
+flush logs;
+delimiter //;
+create procedure p1()
+begin
+select 1;
+end;
+//
+delimiter ;//
+flush logs;
+call p1();
+drop procedure p1;
+--error 1305
+call p1();
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000009
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000009 | $MYSQL
+call p1();
+drop procedure p1;
+
# clean up
drop table t1, t2, t03, t04, t3, t4, t5;
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 72aad395ec0..ea85d7f4f55 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -713,6 +713,25 @@ create table t1 (a int);
--exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1
drop table t1;
+--echo #
+--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+ `a b` INT,
+ `c"d` INT,
+ `e``f` INT,
+ PRIMARY KEY (`a b`, `c"d`, `e``f`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+insert into t1 values (0815, 4711, 2006);
+
+--exec $MYSQL_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
+--exec $MYSQL_DUMP --skip-comments --order-by-primary test t1
+DROP TABLE `t1`;
+--enable_warnings
+
--echo End of 4.1 tests
--echo #
@@ -1341,7 +1360,7 @@ connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root;
create database mysqldump_myDB;
use mysqldump_myDB;
-create user myDB_User;
+create user myDB_User@localhost;
grant create, create view, select, insert on mysqldump_myDB.* to myDB_User@localhost;
create table t1 (c1 int);
insert into t1 values (3);
@@ -1364,7 +1383,7 @@ drop view v1;
drop table t1;
drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
-drop user myDB_User;
+drop user myDB_User@localhost;
drop database mysqldump_myDB;
flush privileges;
@@ -1389,30 +1408,11 @@ drop view v1;
drop table t1;
drop table u1;
revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
-drop user myDB_User;
+drop user myDB_User@localhost;
drop database mysqldump_myDB;
use test;
--echo #
---echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
---echo #
-
---disable_warnings
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
- `a b` INT,
- `c"d` INT,
- `e``f` INT,
- PRIMARY KEY (`a b`, `c"d`, `e``f`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-insert into t1 values (0815, 4711, 2006);
-
---exec $MYSQL_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
---exec $MYSQL_DUMP --skip-comments --order-by-primary test t1
-DROP TABLE `t1`;
---enable_warnings
-
---echo #
--echo # Bug #19745: mysqldump --xml produces invalid xml
--echo #
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 3c20b38722f..7da84543e6d 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1,6 +1,9 @@
# This test should work in embedded server after mysqltest is fixed
-- source include/not_embedded.inc
+# This test uses chmod, can't be run with root permissions
+-- source include/not_as_root.inc
+
# ============================================================================
#
# Test of mysqltest itself
@@ -1522,6 +1525,46 @@ remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
--exec echo "copy_file from_file;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
+# test for chmod
+# ----------------------------------------------------------------------------
+--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
+file1
+EOF
+
+chmod 0000 $MYSQLTEST_VARDIR/tmp/file1.tmp;
+# The below write fails, but --error is not implemented
+# for write_file
+#--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
+#test should fail
+#EOF
+
+chmod 0777 $MYSQLTEST_VARDIR/tmp/file1.tmp;
+--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
+test2
+EOF
+
+remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
+
+--error 1
+--exec echo "chmod ;" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "chmod 0 from_file;" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "chmod 08 from_file;" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "chmod from_file;" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "chmod ABZD from_file;" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "chmod 06789 from_file;" | $MYSQL_TEST 2>&1
+
+
+# ----------------------------------------------------------------------------
# test for perl
# ----------------------------------------------------------------------------
--perl
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test
index 6c1a4e44f4b..a1ceddcd183 100644
--- a/mysql-test/t/ndb_basic.test
+++ b/mysql-test/t/ndb_basic.test
@@ -710,3 +710,22 @@ drop table t1;
--error 1
--exec $MY_PERROR --ndb 1186 2>&1
+#
+# Bug #25746 - VARCHAR UTF8 PK issue
+# - prior to bugfix 4209, illegal length parameter would be
+# returned in SELECT *
+
+CREATE TABLE t1 (
+a VARBINARY(40) NOT NULL,
+b VARCHAR (256) CHARACTER SET UTF8 NOT NULL,
+c VARCHAR(256) CHARACTER SET UTF8 NOT NULL,
+PRIMARY KEY (b,c)) ENGINE=ndbcluster;
+INSERT INTO t1 VALUES
+("a","ab","abc"),("b","abc","abcd"),("c","abc","ab"),("d","ab","ab"),("e","abc","abc");
+SELECT * FROM t1 ORDER BY a;
+DROP TABLE t1;
+
+# End of 5.0 tests
+--echo End of 5.0 tests
+
+
diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test
index e6827bdbe12..5867140fabb 100644
--- a/mysql-test/t/ndb_index_ordered.test
+++ b/mysql-test/t/ndb_index_ordered.test
@@ -356,3 +356,15 @@ insert into t1 (a, c) values (1,'aaa'),(3,'bbb');
select count(*) from t1 where c<'bbb';
# End of 4.1 tests
+
+# bug#24820 CREATE INDEX ....USING HASH on NDB table creates ordered index, not HASH index
+
+--error ER_CANT_CREATE_TABLE
+create table nationaldish (DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
+ CountryCode char(3) NOT NULL,
+ DishTitle varchar(64) NOT NULL,
+ calories smallint(5) unsigned DEFAULT NULL,
+ PRIMARY KEY (DishID),
+ INDEX i USING HASH (countrycode,calories)
+ ) ENGINE=ndbcluster;
+
diff --git a/mysql-test/t/ndb_index_unique.test b/mysql-test/t/ndb_index_unique.test
index 8561b3794c4..18eec046074 100644
--- a/mysql-test/t/ndb_index_unique.test
+++ b/mysql-test/t/ndb_index_unique.test
@@ -83,9 +83,16 @@ delete from t2 where a = 1;
insert into t2 values(8, 2, 3);
select * from t2 order by a;
+# Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld
+create unique index bi using hash on t2(b);
+-- error 1062
+insert into t2 values(9, 3, 1);
+alter table t2 drop index bi;
+insert into t2 values(9, 3, 1);
+select * from t2 order by a;
+
drop table t2;
--- error 1121
CREATE TABLE t2 (
a int unsigned NOT NULL PRIMARY KEY,
b int unsigned not null,
@@ -93,6 +100,20 @@ CREATE TABLE t2 (
UNIQUE USING HASH (b, c)
) engine=ndbcluster;
+
+insert t2 values(1,1,NULL),(2,2,2),(3,3,NULL),(4,4,4),(5,5,NULL),(6,6,6),(7,7,NULL),(8,3,NULL),(9,3,NULL);
+
+select * from t2 where c IS NULL order by a;
+select * from t2 where b = 3 AND c IS NULL order by a;
+select * from t2 where (b = 3 OR b = 5) AND c IS NULL order by a;
+set @old_ecpd = @@session.engine_condition_pushdown;
+set engine_condition_pushdown = true;
+explain select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
+select * from t2 where (b = 3 OR b = 5) AND c IS NULL AND a < 9 order by a;
+set engine_condition_pushdown = @old_ecpd;
+
+drop table t2;
+
#
# Show use of PRIMARY KEY USING HASH indexes
#
diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test
index 48a8b77dcd7..8dc02dc20cb 100644
--- a/mysql-test/t/ndb_lock.test
+++ b/mysql-test/t/ndb_lock.test
@@ -102,16 +102,36 @@ connection con1;
commit;
# table scan
+#
+# Note that there are two distinct execution paths in which we unlock
+# non-matching rows inspected during table scan - one that is used in
+# case of filesort and one that used in rest of cases. Below we cover
+# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of
+# untouched rows in full table scans").
connection con1;
begin;
-select * from t1 where y = 'one' or y = 'three' order by x for update;
+# We can't use "order by x" here as it will cause filesort
+--replace_column 1 # 2 # 3 #
+select * from t1 where y = 'one' or y = 'three' for update;
connection con2;
begin;
# Have to check with pk access here since scans take locks on
# all rows and then release them in chunks
-# Bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans
-#select * from t1 where x = 2 for update;
+select * from t1 where x = 2 for update;
+--error 1205
+select * from t1 where x = 1 for update;
+rollback;
+
+connection con1;
+commit;
+
+# And now the test for case with filesort
+begin;
+select * from t1 where y = 'one' or y = 'three' order by x for update;
+connection con2;
+begin;
+select * from t1 where x = 2 for update;
--error 1205
select * from t1 where x = 1 for update;
rollback;
@@ -157,15 +177,32 @@ commit;
# table scan
connection con1;
begin;
-select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
+# We can't use "order by x" here as it will cause filesort
+--replace_column 1 # 2 # 3 #
+select * from t1 where y = 'one' or y = 'three' lock in share mode;
connection con2;
begin;
select * from t1 where y = 'one' lock in share mode;
# Have to check with pk access here since scans take locks on
# all rows and then release them in chunks
-# Bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans
-#select * from t1 where x = 2 for update;
+select * from t1 where x = 2 for update;
+--error 1205
+select * from t1 where x = 1 for update;
+rollback;
+
+connection con1;
+commit;
+
+# And the same test for case with filesort
+connection con1;
+begin;
+select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
+
+connection con2;
+begin;
+select * from t1 where y = 'one' lock in share mode;
+select * from t1 where x = 2 for update;
--error 1205
select * from t1 where x = 1 for update;
rollback;
diff --git a/mysql-test/t/ndb_read_multi_range.test b/mysql-test/t/ndb_read_multi_range.test
index 855f7789032..99edab5d23c 100644
--- a/mysql-test/t/ndb_read_multi_range.test
+++ b/mysql-test/t/ndb_read_multi_range.test
@@ -238,3 +238,18 @@ select * from t12 order by 1,2,3;
select * from t21 order by 1,2,3;
select * from t22 order by 1,2,3;
DROP TABLE t1, t11, t12, t21, t22;
+
+# bug#19956
+CREATE TABLE t1 (id varchar(255) NOT NULL,
+ tag int(11) NOT NULL,
+ doc text NOT NULL,
+ type varchar(150) NOT NULL,
+ modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ PRIMARY KEY (id)
+ ) ENGINE=ndbcluster;
+
+INSERT INTO t1 VALUES ('sakila',1,'Some text goes here','text',CURRENT_TIMESTAMP);
+SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka');
+SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila');
+
+DROP TABLE t1;
diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test
index 10b8eb87e2c..ab18817132e 100644
--- a/mysql-test/t/ndb_types.test
+++ b/mysql-test/t/ndb_types.test
@@ -1,5 +1,5 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
+--source include/have_ndb.inc
+--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
@@ -50,7 +50,7 @@ CREATE TABLE t1 (
);
set @now = now();
-sleep 1;
+--sleep 1.5
insert into t1
(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong,
@@ -66,7 +66,7 @@ from t1;
select time_stamp>@now from t1;
set @now = now();
-sleep 1;
+--sleep 1.5
update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB,
tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2,
real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2,
@@ -82,4 +82,4 @@ select time_stamp>@now from t1;
drop table t1;
-# End of 4.1 tests
+--echo End of 4.1 tests
diff --git a/mysql-test/t/ndb_update.test b/mysql-test/t/ndb_update.test
index 45e3add4639..ebcc6995d74 100644
--- a/mysql-test/t/ndb_update.test
+++ b/mysql-test/t/ndb_update.test
@@ -23,8 +23,13 @@ UPDATE t1 set b = c;
select * from t1 order by pk1;
UPDATE t1 set pk1 = 4 where pk1 = 1;
select * from t1 order by pk1;
+--error 1062
+UPDATE t1 set pk1 = 4 where pk1 = 2;
+UPDATE IGNORE t1 set pk1 = 4 where pk1 = 2;
+select * from t1 order by pk1;
-- error 1062
UPDATE t1 set pk1 = 1, c = 2 where pk1 = 4;
+UPDATE IGNORE t1 set pk1 = 1, c = 2 where pk1 = 4;
select * from t1 order by pk1;
UPDATE t1 set pk1 = pk1 + 10;
select * from t1 order by pk1;
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index d7cf0e2a375..012b38ff8b7 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -44,7 +44,7 @@ INSERT INTO t2 VALUES (7,'Liste des t2','t2_liste_form.phtml',51060,'link.gif');
INSERT INTO t2 VALUES (8,'Consulter les soumissions','consulter_soumissions.phtml',200,'link.gif');
INSERT INTO t2 VALUES (9,'Ajouter un type de materiel','typeMateriel_ajoute_form.phtml',51000,'link.gif');
INSERT INTO t2 VALUES (10,'Lister/modifier un type de materiel','typeMateriel_liste_form.phtml',51010,'link.gif');
-INSERT INTO t2 VALUES (3,'Créer une fiche de client','clients_ajoute_form.phtml',40000,'link.gif');
+INSERT INTO t2 VALUES (3,'Créer une fiche de client','clients_ajoute_form.phtml',40000,'link.gif');
INSERT INTO t2 VALUES (4,'Modifier des clients','en_construction.html',40010,'link.gif');
INSERT INTO t2 VALUES (5,'Effacer des clients','en_construction.html',40020,'link.gif');
INSERT INTO t2 VALUES (6,'Ajouter un service','t2_ajoute_form.phtml',51050,'link.gif');
@@ -588,6 +588,21 @@ SELECT a + 1 AS num, (select num + 2 FROM t1 LIMIT 1) FROM t1;
SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a;
DROP TABLE t1;
+#
+# Bug #25427: crash when order by expression contains a name
+# that cannot be resolved unambiguously
+#
+
+CREATE TABLE t1 (a int);
+
+SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
+--error 1052
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val;
+--error 1052
+SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1;
+
+DROP TABLE t1;
+
# End of 4.1 tests
create table t1 (a int not null, b int not null, c int not null);
insert t1 values (1,1,1),(1,1,2),(1,2,1);
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index 1c8d7b419a3..3fbcf84a1f9 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -1106,10 +1106,96 @@ EXECUTE stmt USING @a;
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
+#
+# Bug#19182: CREATE TABLE bar (m INT) SELECT n FROM foo; doesn't work
+# from stored procedure.
+#
+# The cause of a bug was that cached LEX::create_list was modified,
+# and then together with LEX::key_list was reset.
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1, t2;
+--enable_warnings
---echo End of 4.1 tests.
+CREATE TABLE t1 (i INT);
+PREPARE st_19182
+FROM "CREATE TABLE t2 (i INT, j INT, KEY (i), KEY(j)) SELECT i FROM t1";
+
+EXECUTE st_19182;
+DESC t2;
+
+DROP TABLE t2;
+
+# Check that on second execution we don't loose 'j' column and the keys
+# on 'i' and 'j' columns.
+EXECUTE st_19182;
+DESC t2;
+
+DEALLOCATE PREPARE st_19182;
+DROP TABLE t2, t1;
+
+#
+# Bug #22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
+#
+# Code which implemented CREATE/ALTER TABLE and CREATE DATABASE
+# statement modified HA_CREATE_INFO structure in LEX, making these
+# statements PS/SP-unsafe (their re-execution might have resulted
+# in incorrect results).
+#
+--disable_warnings
+drop database if exists mysqltest;
+drop table if exists t1, t2;
+--enable_warnings
+# CREATE TABLE and CREATE TABLE ... SELECT
+create database mysqltest character set utf8;
+prepare stmt1 from "create table mysqltest.t1 (c char(10))";
+prepare stmt2 from "create table mysqltest.t2 select 'test'";
+execute stmt1;
+execute stmt2;
+show create table mysqltest.t1;
+show create table mysqltest.t2;
+drop table mysqltest.t1;
+drop table mysqltest.t2;
+alter database mysqltest character set latin1;
+execute stmt1;
+execute stmt2;
+show create table mysqltest.t1;
+show create table mysqltest.t2;
+drop database mysqltest;
+deallocate prepare stmt1;
+deallocate prepare stmt2;
+#
+# CREATE TABLE with DATA DIRECTORY option
+#
+# Protect ourselves from data left in tmp/ by a previos possibly failed
+# test
+--system rm -f $MYSQLTEST_VARDIR/tmp/t1.*
+--disable_warnings
+--disable_query_log
+eval prepare stmt from "create table t1 (c char(10)) data directory='$MYSQLTEST_VARDIR/tmp'";
+--enable_query_log
+execute stmt;
+#
+# DATA DIRECTORY option does not always work: if the operating
+# system does not support symlinks, have_symlinks option is automatically
+# disabled.
+# In this case DATA DIRECTORY is silently ignored when
+# creating a table, and is not output by SHOW CREATE TABLE.
+#
+--disable_result_log
+show create table t1;
+--enable_result_log
+drop table t1;
+execute stmt;
+--disable_result_log
+show create table t1;
+--enable_result_log
+--enable_warnings
+drop table t1;
+deallocate prepare stmt;
+--echo End of 4.1 tests.
############################# 5.0 tests start ################################
#
@@ -1508,6 +1594,29 @@ DROP TABLE t1, t2;
#
+# BUG#20327: Marking of a wrong field leads to a wrong result on select with
+# view, prepared statement and subquery.
+#
+CREATE TABLE t1 (i INT);
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+INSERT INTO t1 VALUES (1), (2);
+
+let $query = SELECT t1.i FROM t1 JOIN v1 ON t1.i = v1.i
+ WHERE EXISTS (SELECT * FROM t1 WHERE v1.i = 1);
+eval $query;
+eval PREPARE stmt FROM "$query";
+# Statement execution should return '1'.
+EXECUTE stmt;
+# Check re-execution.
+EXECUTE stmt;
+
+DEALLOCATE PREPARE stmt;
+DROP VIEW v1;
+DROP TABLE t1;
+
+
+#
# BUG#21856: Prepared Statments: crash if bad create
#
--disable_warnings
@@ -1540,4 +1649,129 @@ execute sq;
deallocate prepare no_index;
deallocate prepare sq;
+
+#
+# Bug 25027: query with a single-row non-correlated subquery
+# and IS NULL predicate
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1), (2);
+CREATE TABLE t2 (b int);
+INSERT INTO t2 VALUES (NULL);
+
+SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL;
+PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2) IS NULL';
+
+EXECUTE stmt;
+DEALLOCATE PREPARE stmt;
+
+PREPARE stmt FROM 'SELECT a FROM t1 WHERE (SELECT b FROM t2 limit ?) IS NULL';
+SET @arg=1;
+EXECUTE stmt USING @arg;
+DEALLOCATE PREPARE stmt;
+
+DROP TABLE t1,t2;
+#
+# Bug#4968 "Stored procedure crash if cursor opened on altered table"
+# The bug is not repeatable any more after the fix for
+# Bug#15217 "Bug #15217 Using a SP cursor on a table created with PREPARE
+# fails with weird error", however ALTER TABLE is not re-execution friendly
+# and that caused a valgrind warning. Check that the warning is gone.
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (s1 char(20));
+prepare stmt from "alter table t1 modify s1 int";
+execute stmt;
+execute stmt;
+drop table t1;
+deallocate prepare stmt;
+
+#
+# Bug#6895 "Prepared Statements: ALTER TABLE DROP COLUMN does nothing"
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int, b int);
+prepare s_6895 from "alter table t1 drop column b";
+execute s_6895;
+show columns from t1;
+drop table t1;
+create table t1 (a int, b int);
+execute s_6895;
+show columns from t1;
+drop table t1;
+create table t1 (a int, b int);
+execute s_6895;
+show columns from t1;
+deallocate prepare s_6895;
+drop table t1;
+
+#
+# Bug #22060 "ALTER TABLE x AUTO_INCREMENT=y in SP crashes server"
+#
+# 5.0 part of the test.
+#
+
+# ALTER TABLE
+create table t1 (i int primary key auto_increment) comment='comment for table t1';
+create table t2 (i int, j int, k int);
+prepare stmt from "alter table t1 auto_increment=100";
+execute stmt;
+show create table t1;
+# Let us trash table-cache's memory
+flush tables;
+select * from t2;
+execute stmt;
+show create table t1;
+deallocate prepare stmt;
+drop table t1, t2;
+# 5.1 part of the test.
+# CREATE DATABASE
+#set @old_character_set_server= @@character_set_server;
+#set @@character_set_server= latin1;
+#prepare stmt from "create database mysqltest";
+#execute stmt;
+#show create database mysqltest;
+#drop database mysqltest;
+#set @@character_set_server= utf8;
+#execute stmt;
+#show create database mysqltest;
+#drop database mysqltest;
+#deallocate prepare stmt;
+#set @@character_set_server= @old_character_set_server;
+
+
+#
+# BUG#24491 "using alias from source table in insert ... on duplicate key"
+#
+--disable_warnings
+drop tables if exists t1;
+--enable_warnings
+create table t1 (id int primary key auto_increment, value varchar(10));
+insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD');
+# Let us prepare INSERT ... SELECT ... ON DUPLICATE KEY UPDATE statement
+# which in its ON DUPLICATE KEY clause erroneously tries to assign value
+# to a column which is mentioned only in SELECT part.
+prepare stmt from "insert into t1 (id, value) select * from (select 4 as i, 'FOURTH' as v) as y on duplicate key update v = 'DUP'";
+# Both first and second attempts to execute it should fail
+--error ER_BAD_FIELD_ERROR
+execute stmt;
+--error ER_BAD_FIELD_ERROR
+execute stmt;
+deallocate prepare stmt;
+# And now the same test for more complex case which is more close
+# to the one that was reported originally.
+prepare stmt from "insert into t1 (id, value) select * from (select 4 as id, 'FOURTH' as value) as y on duplicate key update y.value = 'DUP'";
+--error ER_BAD_FIELD_ERROR
+execute stmt;
+--error ER_BAD_FIELD_ERROR
+execute stmt;
+deallocate prepare stmt;
+drop tables t1;
+
+
--echo End of 5.0 tests.
diff --git a/mysql-test/t/query_cache_notembedded.test b/mysql-test/t/query_cache_notembedded.test
index 97be9f9f7ca..a4f4144d9c6 100644
--- a/mysql-test/t/query_cache_notembedded.test
+++ b/mysql-test/t/query_cache_notembedded.test
@@ -81,12 +81,12 @@ drop table t1, t2, t3, t11, t21;
#
# do not use QC if tables locked (BUG#12385)
#
-connect (root,localhost,root,,test,$MASTER_MYPORT,master.sock);
+connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root;
CREATE TABLE t1 ( a INT NOT NULL PRIMARY KEY AUTO_INCREMENT ) ENGINE =
MyISAM;
LOCK TABLE t1 READ LOCAL;
-connect (root2,localhost,root,,test,$MASTER_MYPORT,master.sock);
+connect (root2,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection root2;
INSERT INTO t1 VALUES (), (), ();
connection root;
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 5a146bbcf86..c7f27d7ca08 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -406,8 +406,8 @@ select count(*) from t1 where x = 18446744073709551601;
create table t2 (x bigint not null);
-insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed));
-insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed));
+insert into t2(x) values (-16);
+insert into t2(x) values (-15);
select * from t2;
select count(*) from t2 where x>0;
select count(*) from t2 where x=0;
diff --git a/mysql-test/t/read_only.test b/mysql-test/t/read_only.test
index 175a5bba6fa..8e14b310f4c 100644
--- a/mysql-test/t/read_only.test
+++ b/mysql-test/t/read_only.test
@@ -101,6 +101,18 @@ drop table t1;
--error 1290
insert into t1 values(1);
+#
+# BUG #22077 "DROP TEMPORARY TABLE fails with wrong error if read_only is set"
+#
+# check if DROP TEMPORARY on a non-existing temporary table returns the right
+# error
+
+--error ER_BAD_TABLE_ERROR
+drop temporary table ttt;
+
+# check if DROP TEMPORARY TABLE IF EXISTS produces a warning with read_only set
+drop temporary table if exists ttt;
+
connection default;
drop table t1,t2;
drop user test@localhost;
diff --git a/mysql-test/t/rpl000015.test b/mysql-test/t/rpl000015.test
index df4bf6f977b..d05e4df66b1 100644
--- a/mysql-test/t/rpl000015.test
+++ b/mysql-test/t/rpl000015.test
@@ -1,5 +1,5 @@
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
+connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
connection master;
reset master;
show master status;
@@ -12,7 +12,7 @@ show slave status;
change master to master_host='127.0.0.1';
# The following needs to be cleaned up when change master is fixed
---replace_result $MYSQL_TCP_PORT MASTER_PORT
+--replace_result $DEFAULT_MASTER_PORT DEFAULT_MASTER_PORT
--replace_column 1 # 8 # 9 # 23 # 33 #
show slave status;
--replace_result $MASTER_MYPORT MASTER_PORT
diff --git a/mysql-test/t/rpl000017.test b/mysql-test/t/rpl000017.test
index 866b7fd1c25..c1d36d53501 100644
--- a/mysql-test/t/rpl000017.test
+++ b/mysql-test/t/rpl000017.test
@@ -1,5 +1,5 @@
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
-connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
+connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
connection master;
reset master;
grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
diff --git a/mysql-test/t/rpl_charset_sjis.test b/mysql-test/t/rpl_charset_sjis.test
new file mode 100644
index 00000000000..2469b0db8a2
--- /dev/null
+++ b/mysql-test/t/rpl_charset_sjis.test
@@ -0,0 +1,25 @@
+source include/have_sjis.inc;
+source include/master-slave.inc;
+
+--disable_warnings
+drop table if exists t1;
+drop procedure if exists p1;
+--enable_warnings
+create table t1 (a varchar(255) character set sjis);
+create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a);
+
+SET NAMES binary;
+CALL p1 ('–\\');
+select "--- on master ---";
+select hex(a) from t1 ;
+sync_slave_with_master;
+connection slave;
+select "--- on slave ---";
+select hex(a) from t1;
+connection master;
+drop table t1;
+drop procedure p1;
+sync_slave_with_master;
+connection master;
+
+# End of 5.0 tests
diff --git a/mysql-test/t/rpl_deadlock.test b/mysql-test/t/rpl_deadlock.test
index 6c5f942cec9..db2a7ec3a8d 100644
--- a/mysql-test/t/rpl_deadlock.test
+++ b/mysql-test/t/rpl_deadlock.test
@@ -94,7 +94,7 @@ show slave status;
# Now we repeat 2), but with BEGIN in the same relay log as
# COMMIT (to see if seeking into hot log is ok).
-
+set @my_max_relay_log_size= @@global.max_relay_log_size;
set global max_relay_log_size=0;
# This is really copy-paste of 2) of above
@@ -119,5 +119,6 @@ show slave status;
connection master;
drop table t1,t2,t3,t4;
sync_slave_with_master;
+set global max_relay_log_size= @my_max_relay_log_size;
# End of 4.1 tests
diff --git a/mysql-test/t/rpl_do_grant.test b/mysql-test/t/rpl_do_grant.test
index 54287a67657..4a9c1554630 100644
--- a/mysql-test/t/rpl_do_grant.test
+++ b/mysql-test/t/rpl_do_grant.test
@@ -33,6 +33,22 @@ connection slave;
sync_with_master;
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
+#
+# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
+#
+connection master;
+update mysql.user set password='' where user='rpl_do_grant';
+flush privileges;
+select password<>'' from mysql.user where user='rpl_do_grant';
+set sql_mode='ANSI_QUOTES';
+set password for rpl_do_grant@localhost=password('does it work?');
+set sql_mode='';
+save_master_pos;
+connection slave;
+sync_with_master;
+select password<>'' from mysql.user where user='rpl_do_grant';
+
+
# clear what we have done, to not influence other tests.
connection master;
delete from mysql.user where user=_binary'rpl_do_grant';
diff --git a/mysql-test/t/rpl_drop_db.test b/mysql-test/t/rpl_drop_db.test
index 3ac0d593fee..f14c9bc0164 100644
--- a/mysql-test/t/rpl_drop_db.test
+++ b/mysql-test/t/rpl_drop_db.test
@@ -53,5 +53,10 @@ sync_slave_with_master;
#cleanup
connection slave;
stop slave;
-system rm -rf $MYSQLTEST_VARDIR/master-data/mysqltest1;
+drop database mysqltest1;
+
+connection master;
+# Remove the "extra" file created above
+--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest1/f1.txt
+drop database mysqltest1;
diff --git a/mysql-test/t/rpl_ignore_revoke.test b/mysql-test/t/rpl_ignore_revoke.test
index cdeb40df069..00171605a92 100644
--- a/mysql-test/t/rpl_ignore_revoke.test
+++ b/mysql-test/t/rpl_ignore_revoke.test
@@ -45,3 +45,7 @@ revoke select on *.* FROM 'user_foo';
connection master;
delete from mysql.user where user="user_foo";
sync_slave_with_master;
+
+# Since changes to mysql.* are ignored, the revoke need to
+# be done on slave as well
+delete from mysql.user where user="user_foo";
diff --git a/mysql-test/t/rpl_init_slave.test b/mysql-test/t/rpl_init_slave.test
index cefb04a7b75..139b4902e12 100644
--- a/mysql-test/t/rpl_init_slave.test
+++ b/mysql-test/t/rpl_init_slave.test
@@ -17,6 +17,8 @@ show variables like 'max_connections';
save_master_pos;
connection slave;
sync_with_master;
+# Save variable value
+set @my_global_init_connect= @@global.init_connect;
set global init_connect="set @c=1";
show variables like 'init_connect';
connection master;
@@ -25,4 +27,8 @@ connection slave;
sync_with_master;
stop slave;
+# Restore changed global variable
+set global init_connect= @my_global_init_connect;
+set global max_connections= default;
+
# End of 4.1 tests
diff --git a/mysql-test/t/rpl_locale.test b/mysql-test/t/rpl_locale.test
new file mode 100644
index 00000000000..2f2d637e1b4
--- /dev/null
+++ b/mysql-test/t/rpl_locale.test
@@ -0,0 +1,24 @@
+# Replication of locale variables
+
+source include/master-slave.inc;
+
+#
+# Bug#22645 LC_TIME_NAMES: Statement not replicated
+#
+connection master;
+create table t1 (s1 char(10));
+set lc_time_names= 'de_DE';
+insert into t1 values (date_format('2001-01-01','%W'));
+set lc_time_names= 'en_US';
+insert into t1 values (date_format('2001-01-01','%W'));
+select * from t1;
+sync_slave_with_master;
+connection slave;
+select * from t1;
+connection master;
+drop table t1;
+sync_slave_with_master;
+
+# End of 4.1 tests
+
+
diff --git a/mysql-test/t/rpl_max_relay_size.test b/mysql-test/t/rpl_max_relay_size.test
index be1fbf172fc..e5278ff5727 100644
--- a/mysql-test/t/rpl_max_relay_size.test
+++ b/mysql-test/t/rpl_max_relay_size.test
@@ -32,6 +32,7 @@ reset slave;
--echo # Test 1
--echo #
+set @my_max_binlog_size= @@global.max_binlog_size;
set global max_binlog_size=8192;
set global max_relay_log_size=8192-1; # mapped to 4096
select @@global.max_relay_log_size;
@@ -127,6 +128,10 @@ connection master;
flush logs;
show master status;
+# Restore max_binlog_size
+connection slave;
+set global max_binlog_size= @my_max_binlog_size;
+
--echo #
--echo # End of 4.1 tests
--echo #
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index ee49f92910a..5d9f1c29fe2 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -16,9 +16,11 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--disable_warnings
drop table if exists t1, t2, t3, t4;
--enable_warnings
-connect (slave,localhost,root,,test,$SLAVE_MYPORT,slave.sock);
-system cat /dev/null > $MYSQLTEST_VARDIR/slave-data/master.info;
-system chmod 000 $MYSQLTEST_VARDIR/slave-data/master.info;
+connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
+# Create empty file
+write_file $MYSQLTEST_VARDIR/slave-data/master.info;
+EOF
+chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info;
connection slave;
--disable_warnings
drop table if exists t1, t2, t3, t4;
@@ -29,7 +31,7 @@ drop table if exists t1, t2, t3, t4;
--replace_result $MYSQL_TEST_DIR TESTDIR
--error 1105,1105,29
start slave;
-system chmod 600 $MYSQLTEST_VARDIR/slave-data/master.info;
+chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info;
# It will fail again because the file is empty so the slave cannot get valuable
# info about how to connect to the master from it (failure in
# init_strvar_from_file() in init_master_info()).
diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test
index 7479794eded..fc17c5615ef 100644
--- a/mysql-test/t/rpl_sp.test
+++ b/mysql-test/t/rpl_sp.test
@@ -338,12 +338,13 @@ delete from t1;
drop trigger trg;
insert into t1 values (1);
select * from t1;
---replace_column 2 # 5 #
-show binlog events in 'master-bin.000001' from 98;
sync_slave_with_master;
select * from t1;
+# ********************** PART 4 : RELATED FIXED BUGS ***************
+
+
#
# Test for bug #13969 "Routines which are replicated from master can't be
# executed on slave".
@@ -519,3 +520,60 @@ DROP FUNCTION f1;
connection master;
drop table t1;
sync_slave_with_master;
+
+#
+# Bug22043: MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS"
+#
+
+connection master;
+--disable_warnings
+drop database if exists mysqltest;
+drop database if exists mysqltest2;
+--enable_warnings
+create database mysqltest;
+create database mysqltest2;
+use mysqltest2;
+create table t ( t integer );
+create procedure mysqltest.test() begin end;
+insert into t values ( 1 );
+--error ER_WRONG_DB_NAME
+create procedure `\\`.test() begin end;
+
+#
+# BUG#19725: Calls to stored function in other database are not
+# replicated correctly in some cases
+#
+
+connection master;
+delimiter |;
+create function f1 () returns int
+begin
+ insert into t values (1);
+ return 0;
+end|
+delimiter ;|
+sync_slave_with_master;
+# Let us test if we don't forget to binlog the function's database
+connection master;
+use mysqltest;
+set @a:= mysqltest2.f1();
+sync_slave_with_master;
+connection master;
+
+
+# Final inspection which verifies how all statements of this test file
+# were written to the binary log.
+--replace_column 2 # 5 #
+show binlog events in 'master-bin.000001' from 98;
+
+
+# Restore log_bin_trust_function_creators to its original value.
+# This is a cleanup for all parts above where we tested stored
+# functions and triggers.
+set global log_bin_trust_function_creators=0;
+connection master;
+set global log_bin_trust_function_creators=0;
+
+# Clean up
+drop database mysqltest;
+drop database mysqltest2;
diff --git a/mysql-test/t/rpl_timezone.test b/mysql-test/t/rpl_timezone.test
index 0f35c9dc0b6..6ed5b21ace0 100644
--- a/mysql-test/t/rpl_timezone.test
+++ b/mysql-test/t/rpl_timezone.test
@@ -12,6 +12,9 @@
source include/master-slave.inc;
+# Save original timezone
+set @my_time_zone= @@global.time_zone;
+
# Some preparations
let $VERSION=`select version()`;
set timestamp=100000000; # for fixed output of mysqlbinlog
@@ -124,3 +127,7 @@ drop table t1, t2;
sync_slave_with_master;
# End of 4.1 tests
+
+# Restore original timezone
+connection master;
+set global time_zone= @my_time_zone;
diff --git a/mysql-test/t/rpl_variables.test b/mysql-test/t/rpl_variables.test
index 57ae2b9c3c4..d0801e524e4 100644
--- a/mysql-test/t/rpl_variables.test
+++ b/mysql-test/t/rpl_variables.test
@@ -1,5 +1,8 @@
source include/master-slave.inc;
+# Init for rstore of variable values
+set @my_slave_net_timeout =@@global.slave_net_timeout;
+
set global slave_net_timeout=100;
set global sql_slave_skip_counter=100;
@@ -12,3 +15,6 @@ show variables like 'slave_load_tmpdir';
# We just set some arbitrary values in variables-master.opt so we can test
# that a list of values works correctly
show variables like 'slave_skip_errors';
+
+# Restore touched values
+set global slave_net_timeout =@my_slave_net_timeout;
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 0c82cef867f..e8d864b81f9 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2349,7 +2349,18 @@ select min(key1) from t1 where key1 >= 0.3762 and rand() + 0.5 >= 0.5;
DROP TABLE t1,t2;
--enable_ps_protocol
-# End of 4.1 tests
+#
+# Bug #22533: storing large hex strings
+#
+
+create table t1(a bigint unsigned, b bigint);
+insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+ (0x10000000000000000, 0x10000000000000000),
+ (0x8fffffffffffffff, 0x8fffffffffffffff);
+select hex(a), hex(b) from t1;
+drop table t1;
+
+--echo End of 4.1 tests
#
# Test for bug #6474
@@ -3092,3 +3103,23 @@ SELECT t3.a FROM t1,t2,t3
t3.c IN ('bb','ee');
DROP TABLE t1,t2,t3;
+
+#
+# Bug#6298: LIMIT #, -1 no longer works to set start with no end limit
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a int);
+INSERT into t1 values (1), (2), (3);
+
+# LIMIT N, -1 was accepted by accident in 4.0, but was not intended.
+# This test verifies that this illegal construct is now properly detected.
+
+--error ER_PARSE_ERROR
+SELECT * FROM t1 LIMIT 2, -1;
+
+DROP TABLE t1;
+
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index 77bd5259eb5..e77e3df8301 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -1809,6 +1809,38 @@ DROP TABLE t1;
#
+# BUG#24491 "using alias from source table in insert ... on duplicate key"
+#
+--disable_warnings
+drop tables if exists t1;
+drop procedure if exists bug24491;
+--enable_warnings
+create table t1 (id int primary key auto_increment, value varchar(10));
+insert into t1 (id, value) values (1, 'FIRST'), (2, 'SECOND'), (3, 'THIRD');
+# Let us create routine with INSERT ... SELECT ... ON DUPLICATE KEY UPDATE
+# statement which in its ON DUPLICATE KEY clause erroneously tries to assign
+# value to a column which is mentioned only in SELECT part.
+create procedure bug24491()
+ insert into t1 (id, value) select * from (select 4 as i, 'FOURTH' as v) as y on duplicate key update v = 'DUP';
+# Both first and second calls to it should fail
+--error ER_BAD_FIELD_ERROR
+call bug24491();
+--error ER_BAD_FIELD_ERROR
+call bug24491();
+drop procedure bug24491;
+# And now the same test for more complex case which is more close
+# to the one that was reported originally.
+create procedure bug24491()
+ insert into t1 (id, value) select * from (select 4 as id, 'FOURTH' as value) as y on duplicate key update y.value = 'DUP';
+--error ER_BAD_FIELD_ERROR
+call bug24491();
+--error ER_BAD_FIELD_ERROR
+call bug24491();
+drop procedure bug24491;
+drop tables t1;
+
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index fc6e8714a65..cfa4937e050 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -6587,10 +6587,139 @@ call proc_21462_b(1)|
drop procedure proc_21462_a|
drop procedure proc_21462_b|
+
+#
+# Bug#19733 "Repeated alter, or repeated create/drop, fails"
+# Check that CREATE/DROP INDEX is re-execution friendly.
+#
+--disable_warnings
+drop table if exists t3|
+drop procedure if exists proc_bug19733|
+--enable_warnings
+create table t3 (s1 int)|
+
+create procedure proc_bug19733()
+begin
+ declare v int default 0;
+ while v < 100 do
+ create index i on t3 (s1);
+ drop index i on t3;
+ set v = v + 1;
+ end while;
+end|
+
+call proc_bug19733()|
+call proc_bug19733()|
+call proc_bug19733()|
+
+drop procedure proc_bug19733|
+drop table t3|
+
--echo End of 5.0 tests
#
+# BUG#23760: ROW_COUNT() and store procedure not owrking together
+#
+--disable_warnings
+DROP TABLE IF EXISTS bug23760|
+DROP TABLE IF EXISTS bug23760_log|
+DROP PROCEDURE IF EXISTS bug23760_update_log|
+DROP PROCEDURE IF EXISTS bug23760_test_row_count|
+DROP FUNCTION IF EXISTS bug23760_rc_test|
+--enable_warnings
+CREATE TABLE bug23760 (
+ id INT NOT NULL AUTO_INCREMENT ,
+ num INT NOT NULL ,
+ PRIMARY KEY ( id )
+)|
+
+CREATE TABLE bug23760_log (
+ id INT NOT NULL AUTO_INCREMENT ,
+ reason VARCHAR(50)NULL ,
+ ammount INT NOT NULL ,
+ PRIMARY KEY ( id )
+)|
+
+CREATE PROCEDURE bug23760_update_log(r Varchar(50), a INT)
+BEGIN
+ INSERT INTO bug23760_log (reason, ammount) VALUES(r, a);
+END|
+
+CREATE PROCEDURE bug23760_test_row_count()
+BEGIN
+ UPDATE bug23760 SET num = num + 1;
+ CALL bug23760_update_log('Test is working', ROW_COUNT());
+ UPDATE bug23760 SET num = num - 1;
+END|
+
+
+CREATE PROCEDURE bug23760_test_row_count2(level INT)
+BEGIN
+ IF level THEN
+ UPDATE bug23760 SET num = num + 1;
+ CALL bug23760_update_log('Test2 is working', ROW_COUNT());
+ CALL bug23760_test_row_count2(level - 1);
+ END IF;
+END|
+
+CREATE FUNCTION bug23760_rc_test(in_var INT) RETURNS INT RETURN in_var|
+
+INSERT INTO bug23760 (num) VALUES (0), (1), (1), (2), (3), (5), (8)|
+SELECT ROW_COUNT()|
+
+CALL bug23760_test_row_count()|
+SELECT * FROM bug23760_log ORDER BY id|
+
+SET @save_max_sp_recursion= @@max_sp_recursion_depth|
+SELECT @save_max_sp_recursion|
+SET max_sp_recursion_depth= 5|
+SELECT @@max_sp_recursion_depth|
+CALL bug23760_test_row_count2(2)|
+SELECT ROW_COUNT()|
+SELECT * FROM bug23760_log ORDER BY id|
+SELECT * FROM bug23760 ORDER by ID|
+SET max_sp_recursion_depth= @save_max_sp_recursion|
+
+SELECT bug23760_rc_test(123)|
+INSERT INTO bug23760 (num) VALUES (13), (21), (34), (55)|
+SELECT bug23760_rc_test(ROW_COUNT())|
+
+DROP TABLE bug23760, bug23760_log|
+DROP PROCEDURE bug23760_update_log|
+DROP PROCEDURE bug23760_test_row_count|
+DROP FUNCTION bug23760_rc_test|
+
+#
+# BUG#24117: server crash on a FETCH with a cursor on a table which is not in
+# the table cache
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS bug24117|
+DROP TABLE IF EXISTS t3|
+--enable_warnings
+CREATE TABLE t3(c1 ENUM('abc'))|
+INSERT INTO t3 VALUES('abc')|
+CREATE PROCEDURE bug24117()
+BEGIN
+ DECLARE t3c1 ENUM('abc');
+ DECLARE mycursor CURSOR FOR SELECT c1 FROM t3;
+ OPEN mycursor;
+ FLUSH TABLES;
+ FETCH mycursor INTO t3c1;
+ CLOSE mycursor;
+END|
+CALL bug24117()|
+DROP PROCEDURE bug24117|
+DROP TABLE t3|
+
+#
+# NOTE: The delimiter is `|`, and not `;`. It is changed to `;`
+# at the end of the file!
+#
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test
index 9d5adf57f81..3f7671b18d4 100644
--- a/mysql-test/t/status.test
+++ b/mysql-test/t/status.test
@@ -1,3 +1,6 @@
+# embedded server causes different stat
+-- source include/not_embedded.inc
+
# PS causes different statistics
--disable_ps_protocol
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index eac2331dc0b..712b0693c32 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -1988,6 +1988,18 @@ SHOW CREATE TABLE t3;
DROP TABLE t1,t2,t3;
+#
+# Bug 24670: subquery witout tables but with a WHERE clause
+#
+
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (1), (2);
+
+SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) > 0;
+SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) IS NULL;
+EXPLAIN SELECT a FROM t1 WHERE (SELECT 1 FROM DUAL WHERE 1=0) IS NULL;
+
+DROP TABLE t1;
# End of 4.1 tests
#
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index 19a720a4fb8..d79b6905224 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -139,4 +139,43 @@ enable_query_log;
show create table t1;
drop table t1;
-# End of 4.1 tests
+#
+# Bug#8706 - temporary table with data directory option fails
+#
+connect (session1,localhost,root,,);
+connect (session2,localhost,root,,);
+
+connection session1;
+disable_query_log;
+eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 9 a;
+enable_query_log;
+# If running test suite with a non standard tmp dir, the "show create table"
+# will print "DATA_DIRECTORY=". Use replace_result to mask it out
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show create table t1;
+
+connection session2;
+disable_query_log;
+eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 99 a;
+enable_query_log;
+# If running test suite with a non standard tmp dir, the "show create table"
+# will print "DATA_DIRECTORY=". Use replace_result to mask it out
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show create table t1;
+
+connection default;
+create table t1 (a int) engine=myisam select 42 a;
+
+connection session1;
+select * from t1;
+disconnect session1;
+connection session2;
+select * from t1;
+disconnect session2;
+connection default;
+select * from t1;
+drop table t1;
+
+--echo End of 4.1 tests
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/system_mysql_db_fix-master.opt b/mysql-test/t/system_mysql_db_fix30020-master.opt
index 7e4fa9a3ee8..7e4fa9a3ee8 100644
--- a/mysql-test/t/system_mysql_db_fix-master.opt
+++ b/mysql-test/t/system_mysql_db_fix30020-master.opt
diff --git a/mysql-test/t/system_mysql_db_fix.test b/mysql-test/t/system_mysql_db_fix30020.test
index c50b641b7e2..b71ae6c2204 100644
--- a/mysql-test/t/system_mysql_db_fix.test
+++ b/mysql-test/t/system_mysql_db_fix30020.test
@@ -6,9 +6,11 @@
#
# This is the test for mysql_fix_privilege_tables
+# It checks that a system tables from mysql 3.20
+# can be upgraded to current system table format
#
# Note: If this test fails, don't be confused about the errors reported
-# by mysql-test-run; This shows warnings from generated by
+# by mysql-test-run This shows warnings generated by
# mysql_fix_system_tables which should be ignored.
# Instead, concentrate on the errors in r/system_mysql_db.reject
@@ -81,7 +83,7 @@ INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','
INSERT INTO user VALUES ('localhost','', '','N','N','N','N','N','N','N','N','N');
# Call the "shell script" $MYSQL_FIX_SYSTEM_TABLES using system
--- system $MYSQL_FIX_SYSTEM_TABLES --database=test > /dev/null
+-- system $MYSQL_FIX_SYSTEM_TABLES --database=test > $MYSQLTEST_VARDIR/log/system_mysql_db_fix30020.log 2>&1
-- enable_query_log
-- enable_result_log
diff --git a/mysql-test/t/system_mysql_db_fix40123-master.opt b/mysql-test/t/system_mysql_db_fix40123-master.opt
new file mode 100644
index 00000000000..7e4fa9a3ee8
--- /dev/null
+++ b/mysql-test/t/system_mysql_db_fix40123-master.opt
@@ -0,0 +1 @@
+--result-file=system_mysql_db
diff --git a/mysql-test/t/system_mysql_db_fix40123.test b/mysql-test/t/system_mysql_db_fix40123.test
new file mode 100644
index 00000000000..471598625d4
--- /dev/null
+++ b/mysql-test/t/system_mysql_db_fix40123.test
@@ -0,0 +1,79 @@
+# Embedded server doesn't support external clients
+--source include/not_embedded.inc
+
+#
+# This is the test for mysql_fix_privilege_tables
+# It checks that a system tables from mysql 4.1.23
+# can be upgraded to current system table format
+#
+# Note: If this test fails, don't be confused about the errors reported
+# by mysql-test-run This shows warnings generated by
+# mysql_fix_system_tables which should be ignored.
+# Instead, concentrate on the errors in r/system_mysql_db.reject
+
+--disable_warnings
+drop table if exists t1,t1aa,t2aa;
+--enable_warnings
+
+-- disable_result_log
+-- disable_query_log
+
+use test;
+
+# create system tables as in mysql-4.1.23
+# created by executing "./mysql_create_system_tables real ."
+
+set table_type=myisam;
+CREATE TABLE db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
+INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
+
+CREATE TABLE host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+
+
+CREATE TABLE user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
+ INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);
+
+CREATE TABLE func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+
+
+CREATE TABLE tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp(14), Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+CREATE TABLE columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp(14), Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+
+CREATE TABLE help_topic ( help_topic_id int unsigned not null, name varchar(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url varchar(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+CREATE TABLE help_category ( help_category_id smallint unsigned not null, name varchar(64) not null, parent_category_id smallint unsigned null, url varchar(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+CREATE TABLE help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+CREATE TABLE help_keyword ( help_keyword_id int unsigned not null, name varchar(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+
+CREATE TABLE time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+
+CREATE TABLE time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+
+CREATE TABLE time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+
+CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+
+CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+
+
+# Run the mysql_fix_privilege_tables.sql using "mysql --force"
+--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES > $MYSQLTEST_VARDIR/log/system_mysql_db_fix40123.log 2>&1
+
+-- enable_query_log
+-- enable_result_log
+
+# Dump the tables that should be compared
+-- source include/system_db_struct.inc
+
+-- disable_query_log
+
+# Drop all tables created by this test
+DROP TABLE db, host, user, func, tables_priv, columns_priv, procs_priv, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type;
+
+-- enable_query_log
+
+# check that we dropped all system tables
+show tables;
+
+# End of 4.1 tests
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index a9395c12a63..63cef614b77 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -1,3 +1,7 @@
+# This test uses chmod, can't be run with root permissions
+-- source include/not_as_root.inc
+
+
#
# Basic triggers test
#
@@ -1138,8 +1142,11 @@ select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test';
# Trick which makes update of second .TRN file impossible
-system echo dummy >$MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
-system chmod 000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+write_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+dummy
+EOF
+chmod 0000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+--replace_result $MYSQLTEST_VARDIR . master-data/ ''
--error 1
rename table t1 to t2;
# 't1' should be still there and triggers should work correctly
@@ -1148,8 +1155,8 @@ select @a, @b;
select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test';
-system chmod 600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
-system rm $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+chmod 0600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+remove_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
# Let us check that updates to .TRN files were rolled back too
drop trigger t1_bi;
drop trigger t1_ai;
diff --git a/mysql-test/t/type_binary.test b/mysql-test/t/type_binary.test
index 1639aff4711..91eba9b328e 100644
--- a/mysql-test/t/type_binary.test
+++ b/mysql-test/t/type_binary.test
@@ -91,4 +91,12 @@ insert into t1 values(NULL, 0x412020);
drop table t1;
set @@sql_mode= @old_sql_mode;
+#
+# Bug#14171: Wrong default value for a BINARY field
+#
+create table t1(f1 int, f2 binary(2) not null, f3 char(2) not null);
+insert into t1 set f1=1;
+select hex(f2), hex(f3) from t1;
+drop table t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index d46ba667665..48ad24ff6b7 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -261,4 +261,15 @@ insert into t1 (b, a) values ('2', '1');
select hex(a), b from t1;
drop table t1;
+#
+# type was not properly initalized, which caused key_copy to fail
+#
+
+create table t1(bit_field bit(2), int_field int, key a(bit_field));
+insert into t1 values (1,2);
+handler t1 open as t1;
+handler t1 read a=(1);
+handler t1 close;
+drop table t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test
index 439e98471b2..7b87a388c56 100644
--- a/mysql-test/t/type_varchar.test
+++ b/mysql-test/t/type_varchar.test
@@ -187,3 +187,13 @@ left join t3 on t1.id=t3.id order by t3.id;
--disable_metadata
--enable_ps_protocol
drop table t1, t2, t3;
+
+#
+# Bug #11927: Warnings shown for CAST( chr as signed) but not (chr + 0)
+#
+CREATE TABLE t1 (a CHAR(2));
+INSERT INTO t1 VALUES (10), (50), (30), ('1a'), (60), ('t');
+SELECT a,(a + 0) FROM t1 ORDER BY a;
+SELECT a,(a DIV 2) FROM t1 ORDER BY a;
+SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
+DROP TABLE t1;
diff --git a/mysql-test/t/udf.test b/mysql-test/t/udf.test
index 37358a292be..65cbc7ae3ae 100644
--- a/mysql-test/t/udf.test
+++ b/mysql-test/t/udf.test
@@ -187,4 +187,58 @@ DROP FUNCTION lookup;
DROP FUNCTION reverse_lookup;
DROP FUNCTION avgcost;
+#
+# Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
+# the UDF
+#
+select * from mysql.func;
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+
+select IS_const(3);
+
+drop function IS_const;
+
+select * from mysql.func;
+--error 1305
+select is_const(3);
+
+#
+# Bug#18761: constant expression as UDF parameters not passed in as constant
+#
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+
+select
+ is_const(3) as const,
+ is_const(3.14) as const,
+ is_const('fnord') as const,
+ is_const(2+3) as const,
+ is_const(rand()) as 'nc rand()',
+ is_const(sin(3.14)) as const,
+ is_const(upper('test')) as const;
+
+create table bug18761 (n int);
+insert into bug18761 values (null),(2);
+select
+ is_const(3) as const,
+ is_const(3.14) as const,
+ is_const('fnord') as const,
+ is_const(2+3) as const,
+ is_const(2+n) as 'nc 2+n ',
+ is_const(sin(n)) as 'nc sin(n)',
+ is_const(sin(3.14)) as const,
+ is_const(upper('test')) as const,
+ is_const(rand()) as 'nc rand()',
+ is_const(n) as 'nc n ',
+ is_const(is_const(n)) as 'nc ic?(n)',
+ is_const(is_const('c')) as const
+from
+ bug18761;
+drop table bug18761;
+
+--error 1241
+select is_const((1,2,3));
+
+drop function if exists is_const;
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index 65ca1b2c1b7..70f57fdf283 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -210,7 +210,10 @@ create table t1(f1 int, f2 int);
insert into t1 values (1,2),(2,3),(3,1);
select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
select @var;
-drop table t1;
+create table t2 as select @var:=f2 from t1 group by f1 order by f2 desc limit 1;
+select * from t2;
+select @var;
+drop table t1,t2;
#
# Bug#19024 - SHOW COUNT(*) WARNINGS not return Errors
diff --git a/mysql-test/t/varbinary.test b/mysql-test/t/varbinary.test
index 5fbd116d7b8..2f0c1c83e84 100644
--- a/mysql-test/t/varbinary.test
+++ b/mysql-test/t/varbinary.test
@@ -1,3 +1,7 @@
+# This test uses chmod, can't be run with root permissions
+-- source include/not_as_root.inc
+
+
# Initialise
--disable_warnings
drop table if exists t1;
@@ -37,3 +41,46 @@ select x,xx from t1;
drop table t1;
# End of 4.1 tests
+
+#
+# Bug #19371 VARBINARY() have trailing zeros after upgrade from 4.1
+#
+
+# Test with a saved table from 4.1
+copy_file std_data/bug19371.frm $MYSQLTEST_VARDIR/master-data/test/t1.frm;
+chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.frm;
+copy_file std_data/bug19371.MYD $MYSQLTEST_VARDIR/master-data/test/t1.MYD;
+chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.MYD;
+copy_file std_data/bug19371.MYI $MYSQLTEST_VARDIR/master-data/test/t1.MYI;
+chmod 0777 $MYSQLTEST_VARDIR/master-data/test/t1.MYI;
+
+# Everything _looks_ fine
+show create table t1;
+
+# But the length of the varbinary columns are too long
+select length(a), length(b) from t1;
+
+# Run CHECK TABLE, it should indicate table need a REPAIR TABLE
+CHECK TABLE t1 FOR UPGRADE;
+
+# Run REPAIR TABLE to alter the table and repair
+# the varbinary fields
+REPAIR TABLE t1;
+
+# Now check it's back to normal
+show create table t1;
+select length(a), length(b) from t1;
+insert into t1 values("ccc", "ddd");
+select length(a), length(b) from t1;
+select hex(a), hex(b) from t1;
+select concat("'", a, "'"), concat("'", b, "'") from t1;
+
+drop table t1;
+
+# Check that the fix does not affect table created with current version
+create table t1(a varbinary(255));
+insert into t1 values("aaa ");
+select length(a) from t1;
+alter table t1 modify a varchar(255);
+select length(a) from t1;
+
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index d855b4d8266..5edb8fb754b 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -461,6 +461,50 @@ set names latin1;
select @@have_innodb;
#
+# Tests for lc_time_names
+# Note, when adding new locales, please fix ID accordingly:
+# - to test the last ID (currently 108)
+# - and the next after the last (currently 109)
+#
+--echo *** Various tests with LC_TIME_NAMES
+--echo *** LC_TIME_NAMES: testing case insensitivity
+set @@lc_time_names='ru_ru';
+select @@lc_time_names;
+--echo *** LC_TIME_NAMES: testing with a user variable
+set @lc='JA_JP';
+set @@lc_time_names=@lc;
+select @@lc_time_names;
+--echo *** LC_TIME_NAMES: testing with string expressions
+set lc_time_names=concat('de','_','DE');
+select @@lc_time_names;
+--error 1105
+set lc_time_names=concat('de','+','DE');
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing with numeric expressions
+set @@lc_time_names=1+2;
+select @@lc_time_names;
+--error 1232
+set @@lc_time_names=1/0;
+select @@lc_time_names;
+set lc_time_names=en_US;
+--echo LC_TIME_NAMES: testing NULL and a negative number:
+--error 1231
+set lc_time_names=NULL;
+--error 1105
+set lc_time_names=-1;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing locale with the last ID:
+set lc_time_names=108;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
+--error 1105
+set lc_time_names=109;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing that 0 is en_US:
+set lc_time_names=0;
+select @@lc_time_names;
+
+#
# Bug #13334: query_prealloc_size default less than minimum
#
set @test = @@query_prealloc_size;
diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test
index 4a3a29e3afe..0785b74dd47 100644
--- a/mysql-test/t/view_grant.test
+++ b/mysql-test/t/view_grant.test
@@ -727,13 +727,13 @@ CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tu AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tus AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_td AS SELECT * FROM mysqltest1.t1;
CREATE SQL SECURITY DEFINER VIEW mysqltest1.v_tds AS SELECT * FROM mysqltest1.t1;
-GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly;
-GRANT SELECT ON mysqltest1.v_ts TO readonly;
-GRANT INSERT ON mysqltest1.v_ti TO readonly;
-GRANT UPDATE ON mysqltest1.v_tu TO readonly;
-GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly;
-GRANT DELETE ON mysqltest1.v_td TO readonly;
-GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly;
+GRANT SELECT, INSERT, UPDATE, DELETE ON mysqltest1.v_t1 TO readonly@localhost;
+GRANT SELECT ON mysqltest1.v_ts TO readonly@localhost;
+GRANT INSERT ON mysqltest1.v_ti TO readonly@localhost;
+GRANT UPDATE ON mysqltest1.v_tu TO readonly@localhost;
+GRANT UPDATE,SELECT ON mysqltest1.v_tus TO readonly@localhost;
+GRANT DELETE ON mysqltest1.v_td TO readonly@localhost;
+GRANT DELETE,SELECT ON mysqltest1.v_tds TO readonly@localhost;
CONNECT (n1,localhost,readonly,,);
CONNECTION n1;
@@ -791,7 +791,7 @@ DROP VIEW mysqltest1.v_ti;
DROP VIEW mysqltest1.v_ts;
DROP VIEW mysqltest1.v_t1;
DROP TABLE mysqltest1.t1;
-DROP USER readonly@localhost;
+DROP USER readonly@localhost;
DROP DATABASE mysqltest1;
#
@@ -927,4 +927,112 @@ DROP VIEW v2;
DROP VIEW v1;
DROP USER mysqltest_u1@localhost;
-# End of 5.0 tests.
+
+#
+# Bug#17254: Error for DEFINER security on VIEW provides too much info
+#
+connect (root,localhost,root,,);
+connection root;
+CREATE DATABASE db17254;
+USE db17254;
+CREATE TABLE t1 (f1 INT);
+INSERT INTO t1 VALUES (10),(20);
+CREATE USER def_17254@localhost;
+GRANT SELECT ON db17254.* TO def_17254@localhost;
+CREATE USER inv_17254@localhost;
+GRANT SELECT ON db17254.t1 TO inv_17254@localhost;
+GRANT CREATE VIEW ON db17254.* TO def_17254@localhost;
+
+connect (def,localhost,def_17254,,db17254);
+connection def;
+CREATE VIEW v1 AS SELECT * FROM t1;
+
+connection root;
+DROP USER def_17254@localhost;
+
+connect (inv,localhost,inv_17254,,db17254);
+connection inv;
+--echo for a user
+--error 1142
+SELECT * FROM v1;
+
+connection root;
+--echo for a superuser
+--error 1449
+SELECT * FROM v1;
+DROP USER inv_17254@localhost;
+DROP DATABASE db17254;
+disconnect def;
+disconnect inv;
+
+
+#
+# BUG#24404: strange bug with view+permission+prepared statement
+#
+--disable_warnings
+DROP DATABASE IF EXISTS mysqltest_db1;
+DROP DATABASE IF EXISTS mysqltest_db2;
+--enable_warnings
+--error 0,ER_CANNOT_USER
+DROP USER mysqltest_u1;
+--error 0,ER_CANNOT_USER
+DROP USER mysqltest_u2;
+
+CREATE USER mysqltest_u1@localhost;
+CREATE USER mysqltest_u2@localhost;
+
+CREATE DATABASE mysqltest_db1;
+CREATE DATABASE mysqltest_db2;
+
+GRANT ALL ON mysqltest_db1.* TO mysqltest_u1@localhost WITH GRANT OPTION;
+GRANT ALL ON mysqltest_db2.* TO mysqltest_u2@localhost;
+
+connect (conn1, localhost, mysqltest_u1, , mysqltest_db1);
+
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (1);
+
+# Use view with subquery for better coverage.
+CREATE VIEW v1 AS SELECT i FROM t1 WHERE 1 IN (SELECT * FROM t1);
+
+CREATE TABLE t2 (s CHAR(7));
+INSERT INTO t2 VALUES ('public');
+
+GRANT SELECT ON v1 TO mysqltest_u2@localhost;
+GRANT SELECT ON t2 TO mysqltest_u2@localhost;
+
+connect (conn2, localhost, mysqltest_u2, , mysqltest_db2);
+
+SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2;
+PREPARE stmt1 FROM "SELECT * FROM mysqltest_db1.t2";
+EXECUTE stmt1;
+PREPARE stmt2 FROM "SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2";
+EXECUTE stmt2;
+
+connection conn1;
+# Make table 't2' private.
+REVOKE SELECT ON t2 FROM mysqltest_u2@localhost;
+UPDATE t2 SET s = 'private' WHERE s = 'public';
+
+connection conn2;
+--error ER_TABLEACCESS_DENIED_ERROR
+SELECT * FROM mysqltest_db1.v1, mysqltest_db1.t2;
+--error ER_TABLEACCESS_DENIED_ERROR
+EXECUTE stmt1;
+# Original bug was here: the statement didn't fail.
+--error ER_TABLEACCESS_DENIED_ERROR
+EXECUTE stmt2;
+
+# Cleanup.
+disconnect conn2;
+disconnect conn1;
+connection default;
+REVOKE ALL ON mysqltest_db1.* FROM mysqltest_u1@localhost;
+REVOKE ALL ON mysqltest_db2.* FROM mysqltest_u2@localhost;
+DROP DATABASE mysqltest_db1;
+DROP DATABASE mysqltest_db2;
+DROP USER mysqltest_u1@localhost;
+DROP USER mysqltest_u2@localhost;
+
+
+--echo End of 5.0 tests.
diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test
index d6bcfeb8cb3..b5377a9b9b0 100644
--- a/mysql-test/t/windows.test
+++ b/mysql-test/t/windows.test
@@ -17,4 +17,13 @@ use prn;
create table nu (a int);
drop table nu;
+#
+# Bug17489: ailed to put data file in custom directory use "data directory" option
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+drop table t1;
+
# End of 4.1 tests
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 7926cb916c1..77933d57d21 100755
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
@@ -26,4 +41,5 @@ ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_m
my_static.c my_symlink.c my_symlink2.c my_sync.c my_thr_init.c my_wincond.c
my_windac.c my_winsem.c my_winthread.c my_write.c ptr_cmp.c queues.c
rijndael.c safemalloc.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c
- thr_rwlock.c tree.c typelib.c base64.c my_memmem.c)
+ thr_rwlock.c tree.c typelib.c base64.c my_memmem.c
+ my_getpagesize.c)
diff --git a/mysys/Makefile.am b/mysys/Makefile.am
index 041130fdf5c..8f810598a47 100644
--- a/mysys/Makefile.am
+++ b/mysys/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -29,7 +28,7 @@ noinst_HEADERS = mysys_priv.h my_static.h \
libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
mf_path.c mf_loadpath.c my_file.c \
my_open.c my_create.c my_dup.c my_seek.c my_read.c \
- my_pread.c my_write.c \
+ my_pread.c my_write.c my_getpagesize.c \
mf_keycache.c mf_keycaches.c my_crc32.c \
mf_iocache.c mf_iocache2.c mf_cache.c mf_tempfile.c \
mf_tempdir.c my_lock.c mf_brkhant.c my_alarm.c \
diff --git a/mysys/array.c b/mysys/array.c
index 6d00585f24d..e3ebe8ddb42 100644
--- a/mysys/array.c
+++ b/mysys/array.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/base64.c b/mysys/base64.c
index b29c8ff8360..6a6b7eae359 100644
--- a/mysys/base64.c
+++ b/mysys/base64.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -40,7 +39,7 @@ base64_needed_encoded_length(int length_of_data)
int
base64_needed_decoded_length(int length_of_encoded_data)
{
- return ceil(length_of_encoded_data * 3 / 4);
+ return (int) ceil(length_of_encoded_data * 3 / 4);
}
diff --git a/mysys/charset-def.c b/mysys/charset-def.c
index 0559fe59d06..394fe6de1f3 100644
--- a/mysys/charset-def.c
+++ b/mysys/charset-def.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/charset.c b/mysys/charset.c
index d10a580ae4e..9fb02f1a39f 100644
--- a/mysys/charset.c
+++ b/mysys/charset.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/checksum.c b/mysys/checksum.c
index 92ec3d550f1..09e9c5b3730 100644
--- a/mysys/checksum.c
+++ b/mysys/checksum.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/default.c b/mysys/default.c
index d93f4135e73..12cd1713c31 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -979,10 +978,11 @@ static uint my_get_system_windows_directory(char *buffer, uint size)
Everywhere else, this is:
1. /etc/
- 2. getenv(DEFAULT_HOME_ENV)
- 3. ""
- 4. "~/"
- 5. --sysconfdir=<path>
+ 2. /etc/mysql/
+ 3. getenv(DEFAULT_HOME_ENV)
+ 4. ""
+ 5. "~/"
+ 6. --sysconfdir=<path>
*/
@@ -1008,6 +1008,7 @@ static void init_default_directories()
*ptr++= env;
#endif
*ptr++= "/etc/";
+ *ptr++= "/etc/mysql/";
#endif
if ((env= getenv(STRINGIFY_ARG(DEFAULT_HOME_ENV))))
*ptr++= env;
diff --git a/mysys/default_modify.c b/mysys/default_modify.c
index 0f58b8a930c..be40d3b3660 100644
--- a/mysys/default_modify.c
+++ b/mysys/default_modify.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/errors.c b/mysys/errors.c
index 4472b7173fa..857de1325d4 100644
--- a/mysys/errors.c
+++ b/mysys/errors.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/hash.c b/mysys/hash.c
index 9a268a7e218..0c949b3a0d8 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/list.c b/mysys/list.c
index c4ce5b5e36f..ccc3f495093 100644
--- a/mysys/list.c
+++ b/mysys/list.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/make-conf.c b/mysys/make-conf.c
index 404299e1726..0dacde4dee0 100644
--- a/mysys/make-conf.c
+++ b/mysys/make-conf.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/md5.c b/mysys/md5.c
index 5de95288141..a88fb279a0b 100644
--- a/mysys/md5.c
+++ b/mysys/md5.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_brkhant.c b/mysys/mf_brkhant.c
index 4180bd6df66..3573b9973b2 100644
--- a/mysys/mf_brkhant.c
+++ b/mysys/mf_brkhant.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_cache.c b/mysys/mf_cache.c
index 2c5d8658625..a3abb3bc974 100644
--- a/mysys/mf_cache.c
+++ b/mysys/mf_cache.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_dirname.c b/mysys/mf_dirname.c
index 4d78f039799..d1672e55b65 100644
--- a/mysys/mf_dirname.c
+++ b/mysys/mf_dirname.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_fn_ext.c b/mysys/mf_fn_ext.c
index d7b1f8c1d61..20e835fe641 100644
--- a/mysys/mf_fn_ext.c
+++ b/mysys/mf_fn_ext.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_format.c b/mysys/mf_format.c
index 50f354df1cd..7a861c9f1e6 100644
--- a/mysys/mf_format.c
+++ b/mysys/mf_format.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_getdate.c b/mysys/mf_getdate.c
index 8998da8aefa..1ced312848e 100644
--- a/mysys/mf_getdate.c
+++ b/mysys/mf_getdate.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index e0962999015..fc81f0bad03 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -201,11 +200,11 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
if (type != READ_NET && type != WRITE_NET)
{
/* Retry allocating memory in smaller blocks until we get one */
+ cachesize=(uint) ((ulong) (cachesize + min_cache-1) &
+ (ulong) ~(min_cache-1));
for (;;)
{
uint buffer_block;
- cachesize=(uint) ((ulong) (cachesize + min_cache-1) &
- (ulong) ~(min_cache-1));
if (cachesize < min_cache)
cachesize = min_cache;
buffer_block = cachesize;
@@ -224,7 +223,8 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
}
if (cachesize == min_cache)
DBUG_RETURN(2); /* Can't alloc cache */
- cachesize= (uint) ((long) cachesize*3/4); /* Try with less memory */
+ /* Try with less memory */
+ cachesize= (uint) ((ulong) cachesize*3/4 & (ulong)~(min_cache-1));
}
}
diff --git a/mysys/mf_iocache2.c b/mysys/mf_iocache2.c
index f1ea21c2a47..429954a9162 100644
--- a/mysys/mf_iocache2.c
+++ b/mysys/mf_iocache2.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c
index d658e6fe055..3c4197f847e 100644
--- a/mysys/mf_keycache.c
+++ b/mysys/mf_keycache.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_keycaches.c b/mysys/mf_keycaches.c
index e5086014a27..51ad54159e5 100644
--- a/mysys/mf_keycaches.c
+++ b/mysys/mf_keycaches.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_loadpath.c b/mysys/mf_loadpath.c
index a46b43c34d4..ffa83cb20ec 100644
--- a/mysys/mf_loadpath.c
+++ b/mysys/mf_loadpath.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_pack.c b/mysys/mf_pack.c
index 049aa59a578..d14c24f35d7 100644
--- a/mysys/mf_pack.c
+++ b/mysys/mf_pack.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_path.c b/mysys/mf_path.c
index 1ecd5fbb2b1..9af6173b417 100644
--- a/mysys/mf_path.c
+++ b/mysys/mf_path.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_qsort.c b/mysys/mf_qsort.c
index 9cc937f6e8b..3d52d56c952 100644
--- a/mysys/mf_qsort.c
+++ b/mysys/mf_qsort.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_qsort2.c b/mysys/mf_qsort2.c
index 160bb6df817..ca2bd1a4952 100644
--- a/mysys/mf_qsort2.c
+++ b/mysys/mf_qsort2.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_radix.c b/mysys/mf_radix.c
index 7ee96b966b9..6b750181558 100644
--- a/mysys/mf_radix.c
+++ b/mysys/mf_radix.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_same.c b/mysys/mf_same.c
index efd6e7b2ca4..e7cdb012c9f 100644
--- a/mysys/mf_same.c
+++ b/mysys/mf_same.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_sort.c b/mysys/mf_sort.c
index 0dc6c78a589..e7fd6873eee 100644
--- a/mysys/mf_sort.c
+++ b/mysys/mf_sort.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_soundex.c b/mysys/mf_soundex.c
index c0c6105a6eb..fa393d1a94a 100644
--- a/mysys/mf_soundex.c
+++ b/mysys/mf_soundex.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_strip.c b/mysys/mf_strip.c
index ef2aab2c0a3..712b0e1d28a 100644
--- a/mysys/mf_strip.c
+++ b/mysys/mf_strip.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_tempdir.c b/mysys/mf_tempdir.c
index 4d244aa7d74..c24e2a0101b 100644
--- a/mysys/mf_tempdir.c
+++ b/mysys/mf_tempdir.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c
index a15bda4da6d..431674c5d61 100644
--- a/mysys/mf_tempfile.c
+++ b/mysys/mf_tempfile.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_unixpath.c b/mysys/mf_unixpath.c
index 9efc3e5d9b8..11292e231ba 100644
--- a/mysys/mf_unixpath.c
+++ b/mysys/mf_unixpath.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_util.c b/mysys/mf_util.c
index 132c83b4623..248b72b8748 100644
--- a/mysys/mf_util.c
+++ b/mysys/mf_util.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_wcomp.c b/mysys/mf_wcomp.c
index 1a01388a3db..4786537d1a5 100644
--- a/mysys/mf_wcomp.c
+++ b/mysys/mf_wcomp.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mf_wfile.c b/mysys/mf_wfile.c
index 7d537eaa06a..b574d158b9e 100644
--- a/mysys/mf_wfile.c
+++ b/mysys/mf_wfile.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mulalloc.c b/mysys/mulalloc.c
index e1eb1c00602..bada0a55a6a 100644
--- a/mysys/mulalloc.c
+++ b/mysys/mulalloc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_access.c b/mysys/my_access.c
index 99e7a28914d..9ee20cc942b 100644
--- a/mysys/my_access.c
+++ b/mysys/my_access.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_aes.c b/mysys/my_aes.c
index 16d326d7d1f..575d4702dee 100644
--- a/mysys/my_aes.c
+++ b/mysys/my_aes.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_alarm.c b/mysys/my_alarm.c
index 70daf4a9dd0..d6a0da1bd13 100644
--- a/mysys/my_alarm.c
+++ b/mysys/my_alarm.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index c97ae83f6bc..cfa2dd6216d 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_append.c b/mysys/my_append.c
index c3549c670c3..274f2110575 100644
--- a/mysys/my_append.c
+++ b/mysys/my_append.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_bit.c b/mysys/my_bit.c
index 01c9b5ea68d..81d63246e7a 100644
--- a/mysys/my_bit.c
+++ b/mysys/my_bit.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c
index 25ff2651e90..2cf16111f67 100644
--- a/mysys/my_bitmap.c
+++ b/mysys/my_bitmap.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_chsize.c b/mysys/my_chsize.c
index 4b26085c870..a5dd1564692 100644
--- a/mysys/my_chsize.c
+++ b/mysys/my_chsize.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_clock.c b/mysys/my_clock.c
index a192bde056d..c5fa516a622 100644
--- a/mysys/my_clock.c
+++ b/mysys/my_clock.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_compress.c b/mysys/my_compress.c
index 0e37d2fef9b..c054bf155b1 100644
--- a/mysys/my_compress.c
+++ b/mysys/my_compress.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_conio.c b/mysys/my_conio.c
index e381f9f23ef..23b0c55e7a9 100644
--- a/mysys/my_conio.c
+++ b/mysys/my_conio.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_copy.c b/mysys/my_copy.c
index 2fb022a25f2..6143700befc 100644
--- a/mysys/my_copy.c
+++ b/mysys/my_copy.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_crc32.c b/mysys/my_crc32.c
index db1beb58263..51c553da5ea 100644
--- a/mysys/my_crc32.c
+++ b/mysys/my_crc32.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_create.c b/mysys/my_create.c
index a85417c7701..d612926c1a5 100644
--- a/mysys/my_create.c
+++ b/mysys/my_create.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_delete.c b/mysys/my_delete.c
index de2a9814a56..bac3e2513e1 100644
--- a/mysys/my_delete.c
+++ b/mysys/my_delete.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_div.c b/mysys/my_div.c
index 9141ff4fcc5..656c6cfde91 100644
--- a/mysys/my_div.c
+++ b/mysys/my_div.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_dup.c b/mysys/my_dup.c
index cdc15b3ebce..2c6a42726e4 100644
--- a/mysys/my_dup.c
+++ b/mysys/my_dup.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_error.c b/mysys/my_error.c
index d7177e7a047..836f851322b 100644
--- a/mysys/my_error.c
+++ b/mysys/my_error.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_file.c b/mysys/my_file.c
index 6a9d39cf944..c97a512f8a1 100644
--- a/mysys/my_file.c
+++ b/mysys/my_file.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c
index 6e81d40a2d6..b56be263ba4 100644
--- a/mysys/my_fopen.c
+++ b/mysys/my_fopen.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_fstream.c b/mysys/my_fstream.c
index 0f7f4cc888f..ea30509ca8c 100644
--- a/mysys/my_fstream.c
+++ b/mysys/my_fstream.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_gethostbyname.c b/mysys/my_gethostbyname.c
index 27281f3489d..434a00bab11 100644
--- a/mysys/my_gethostbyname.c
+++ b/mysys/my_gethostbyname.c
@@ -1,9 +1,9 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_gethwaddr.c b/mysys/my_gethwaddr.c
index 222abe81933..01abc02058b 100644
--- a/mysys/my_gethwaddr.c
+++ b/mysys/my_gethwaddr.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 95dc5afeae9..250c10e8479 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -59,13 +58,18 @@ char *disabled_my_option= (char*) "0";
my_bool my_getopt_print_errors= 1;
-static void default_reporter(enum loglevel level __attribute__((unused)),
+static void default_reporter(enum loglevel level,
const char *format, ...)
{
va_list args;
va_start(args, format);
+ if (level == WARNING_LEVEL)
+ fprintf(stderr, "%s", "Warning: ");
+ else if (level == INFORMATION_LEVEL)
+ fprintf(stderr, "%s", "Info: ");
vfprintf(stderr, format, args);
va_end(args);
+ fflush(stderr);
}
/*
diff --git a/mysys/my_getpagesize.c b/mysys/my_getpagesize.c
new file mode 100644
index 00000000000..b0560cede35
--- /dev/null
+++ b/mysys/my_getpagesize.c
@@ -0,0 +1,40 @@
+/* Copyright (C) 2000-2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+#include "mysys_priv.h"
+
+#ifndef HAVE_GETPAGESIZE
+
+#if defined __WIN__
+
+int my_getpagesize(void)
+{
+ SYSTEM_INFO si;
+ GetSystemInfo(&si);
+ return si.dwPageSize;
+}
+
+#else
+
+/* Default implementation */
+int my_getpagesize(void)
+{
+ return (int)8192;
+}
+
+#endif
+
+#endif
+
diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c
index 91c977f0b5a..2fd7eed7778 100644
--- a/mysys/my_getsystime.c
+++ b/mysys/my_getsystime.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index b6b6ee610a5..3870a5d61b0 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_handler.c b/mysys/my_handler.c
index 46144c0dff2..afc44cc2838 100644
--- a/mysys/my_handler.c
+++ b/mysys/my_handler.c
@@ -1,9 +1,9 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2006 MySQL AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_init.c b/mysys/my_init.c
index 8346fab95da..cc4bef10e8d 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_largepage.c b/mysys/my_largepage.c
index 0639c360b46..9714c582acb 100644
--- a/mysys/my_largepage.c
+++ b/mysys/my_largepage.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index ae7b0baafbd..75e31c4d555 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_libwrap.c b/mysys/my_libwrap.c
index 80fca127716..e72334ba806 100644
--- a/mysys/my_libwrap.c
+++ b/mysys/my_libwrap.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_lock.c b/mysys/my_lock.c
index b8307f366c0..a07f0c072a0 100644
--- a/mysys/my_lock.c
+++ b/mysys/my_lock.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_lockmem.c b/mysys/my_lockmem.c
index 6712c387a71..a58a5a340b1 100644
--- a/mysys/my_lockmem.c
+++ b/mysys/my_lockmem.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_lread.c b/mysys/my_lread.c
index ccf795631b8..1399b197119 100644
--- a/mysys/my_lread.c
+++ b/mysys/my_lread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_lwrite.c b/mysys/my_lwrite.c
index 85f4677932e..d26825397e3 100644
--- a/mysys/my_lwrite.c
+++ b/mysys/my_lwrite.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c
index c6d51e29f18..3baf55d4c57 100644
--- a/mysys/my_malloc.c
+++ b/mysys/my_malloc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_messnc.c b/mysys/my_messnc.c
index 1f9df3c7c2c..e2431959b7a 100644
--- a/mysys/my_messnc.c
+++ b/mysys/my_messnc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_mkdir.c b/mysys/my_mkdir.c
index ba1f4c1f2d8..25176e4b823 100644
--- a/mysys/my_mkdir.c
+++ b/mysys/my_mkdir.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_mmap.c b/mysys/my_mmap.c
index 21bfddae46c..147bdfdcbf2 100644
--- a/mysys/my_mmap.c
+++ b/mysys/my_mmap.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -33,13 +32,6 @@ int my_msync(int fd, void *addr, size_t len, int flags)
static SECURITY_ATTRIBUTES mmap_security_attributes=
{sizeof(SECURITY_ATTRIBUTES), 0, TRUE};
-int my_getpagesize(void)
-{
- SYSTEM_INFO si;
- GetSystemInfo(&si);
- return si.dwPageSize;
-}
-
void *my_mmap(void *addr, size_t len, int prot,
int flags, int fd, my_off_t offset)
{
diff --git a/mysys/my_net.c b/mysys/my_net.c
index be92adae353..136d987f500 100644
--- a/mysys/my_net.c
+++ b/mysys/my_net.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_netware.c b/mysys/my_netware.c
index 9c604778c2d..5b5c39c0ac0 100644
--- a/mysys/my_netware.c
+++ b/mysys/my_netware.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_new.cc b/mysys/my_new.cc
index 66f3a14eeb4..babfe04d695 100644
--- a/mysys/my_new.cc
+++ b/mysys/my_new.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_once.c b/mysys/my_once.c
index ab5fcc51c0e..d83eba95b9d 100644
--- a/mysys/my_once.c
+++ b/mysys/my_once.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_open.c b/mysys/my_open.c
index a0168b23b16..2ba84f92ac2 100644
--- a/mysys/my_open.c
+++ b/mysys/my_open.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2cond.c b/mysys/my_os2cond.c
index bf3e85c26a9..f0cf91404d2 100644
--- a/mysys/my_os2cond.c
+++ b/mysys/my_os2cond.c
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2dirsrch.c b/mysys/my_os2dirsrch.c
index 8d1f6ddd947..27e774c8e04 100644
--- a/mysys/my_os2dirsrch.c
+++ b/mysys/my_os2dirsrch.c
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2dirsrch.h b/mysys/my_os2dirsrch.h
index 3889f628bad..e3af6740769 100644
--- a/mysys/my_os2dirsrch.h
+++ b/mysys/my_os2dirsrch.h
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2dlfcn.c b/mysys/my_os2dlfcn.c
index 9c9a6061e8d..74be940d0d4 100644
--- a/mysys/my_os2dlfcn.c
+++ b/mysys/my_os2dlfcn.c
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2dlfcn.h0 b/mysys/my_os2dlfcn.h0
index 7f84d430230..ec05eebc47b 100644
--- a/mysys/my_os2dlfcn.h0
+++ b/mysys/my_os2dlfcn.h0
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2file64.c b/mysys/my_os2file64.c
index 786e083adc4..52156903b80 100644
--- a/mysys/my_os2file64.c
+++ b/mysys/my_os2file64.c
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2thread.c b/mysys/my_os2thread.c
index 785ff07954d..e34fd18d596 100644
--- a/mysys/my_os2thread.c
+++ b/mysys/my_os2thread.c
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_os2tls.c b/mysys/my_os2tls.c
index f7cf3b09283..49100c65516 100644
--- a/mysys/my_os2tls.c
+++ b/mysys/my_os2tls.c
@@ -5,8 +5,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_port.c b/mysys/my_port.c
index bf5dbcbace1..9ad333421ca 100644
--- a/mysys/my_port.c
+++ b/mysys/my_port.c
@@ -1,9 +1,9 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002 MySQL AB
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index b1b9d9da950..2d42a6ebbc4 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c
index 315e966bf43..fe3480ea10f 100644
--- a/mysys/my_pthread.c
+++ b/mysys/my_pthread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_quick.c b/mysys/my_quick.c
index ffc8160c371..15549dfb751 100644
--- a/mysys/my_quick.c
+++ b/mysys/my_quick.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_read.c b/mysys/my_read.c
index 33eb3ddf334..a6c45340b0c 100644
--- a/mysys/my_read.c
+++ b/mysys/my_read.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c
index b521ae36b94..43fbb0c1eee 100644
--- a/mysys/my_realloc.c
+++ b/mysys/my_realloc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_redel.c b/mysys/my_redel.c
index 9af360424b0..1e3cfceb495 100644
--- a/mysys/my_redel.c
+++ b/mysys/my_redel.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_rename.c b/mysys/my_rename.c
index b5d813ad787..c4aeb95b2c0 100644
--- a/mysys/my_rename.c
+++ b/mysys/my_rename.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_seek.c b/mysys/my_seek.c
index e8c109acacd..fd2344e0d36 100644
--- a/mysys/my_seek.c
+++ b/mysys/my_seek.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_semaphore.c b/mysys/my_semaphore.c
index aa216cbc289..efabd4b42d9 100644
--- a/mysys/my_semaphore.c
+++ b/mysys/my_semaphore.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_sleep.c b/mysys/my_sleep.c
index 31eaf7eeb96..50e6fae17fc 100644
--- a/mysys/my_sleep.c
+++ b/mysys/my_sleep.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_static.c b/mysys/my_static.c
index 8448afdc158..694e5058bb0 100644
--- a/mysys/my_static.c
+++ b/mysys/my_static.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_static.h b/mysys/my_static.h
index 51f9fbc922f..cbd293a0431 100644
--- a/mysys/my_static.h
+++ b/mysys/my_static.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c
index 7be3fcd36f0..810c0c72632 100644
--- a/mysys/my_symlink.c
+++ b/mysys/my_symlink.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c
index 603248e186b..2ad08ef67de 100644
--- a/mysys/my_symlink2.c
+++ b/mysys/my_symlink2.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_sync.c b/mysys/my_sync.c
index c557324b52c..64fce3aac21 100644
--- a/mysys/my_sync.c
+++ b/mysys/my_sync.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index 4d23d01cd82..c5105dc4e1e 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -30,7 +29,10 @@ pthread_key(struct st_my_thread_var, THR_KEY_mysys);
#endif /* USE_TLS */
pthread_mutex_t THR_LOCK_malloc,THR_LOCK_open,
THR_LOCK_lock,THR_LOCK_isam,THR_LOCK_myisam,THR_LOCK_heap,
- THR_LOCK_net, THR_LOCK_charset;
+ THR_LOCK_net, THR_LOCK_charset, THR_LOCK_threads;
+pthread_cond_t THR_COND_threads;
+uint THR_thread_count= 0;
+uint my_thread_end_wait_time= 5;
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
pthread_mutex_t LOCK_localtime_r;
#endif
@@ -44,6 +46,23 @@ pthread_mutexattr_t my_fast_mutexattr;
pthread_mutexattr_t my_errorcheck_mutexattr;
#endif
+#ifdef NPTL_PTHREAD_EXIT_BUG /* see my_pthread.h */
+
+/*
+ Dummy thread spawned in my_thread_global_init() below to avoid
+ race conditions in NPTL pthread_exit code.
+*/
+
+static
+pthread_handler_t nptl_pthread_exit_hack_handler(void *arg)
+{
+ /* Do nothing! */
+ pthread_exit(0);
+ return 0;
+}
+
+#endif
+
/*
initialize thread environment
@@ -62,6 +81,28 @@ my_bool my_thread_global_init(void)
fprintf(stderr,"Can't initialize threads: error %d\n",errno);
return 1;
}
+
+#ifdef NPTL_PTHREAD_EXIT_BUG
+
+/*
+ BUG#24507: Race conditions inside current NPTL pthread_exit() implementation.
+
+ To avoid a possible segmentation fault during concurrent executions of
+ pthread_exit(), a dummy thread is spawned which initializes internal variables
+ of pthread lib. See bug description for thoroughfull explanation.
+
+ TODO: Remove this code when fixed versions of glibc6 are in common use.
+*/
+
+ pthread_t dummy_thread;
+ pthread_attr_t dummy_thread_attr;
+
+ pthread_attr_init(&dummy_thread_attr);
+ pthread_attr_setdetachstate(&dummy_thread_attr,PTHREAD_CREATE_DETACHED);
+
+ pthread_create(&dummy_thread,&dummy_thread_attr,nptl_pthread_exit_hack_handler,NULL);
+
+#endif
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
/*
@@ -79,7 +120,7 @@ my_bool my_thread_global_init(void)
#endif
#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
/*
- Set mutex type to "errorcheck" a.k.a "adaptive"
+ Set mutex type to "errorcheck"
*/
pthread_mutexattr_init(&my_errorcheck_mutexattr);
pthread_mutexattr_settype(&my_errorcheck_mutexattr,
@@ -94,6 +135,8 @@ my_bool my_thread_global_init(void)
pthread_mutex_init(&THR_LOCK_heap,MY_MUTEX_INIT_FAST);
pthread_mutex_init(&THR_LOCK_net,MY_MUTEX_INIT_FAST);
pthread_mutex_init(&THR_LOCK_charset,MY_MUTEX_INIT_FAST);
+ pthread_mutex_init(&THR_LOCK_threads,MY_MUTEX_INIT_FAST);
+ pthread_cond_init(&THR_COND_threads, NULL);
#if defined( __WIN__) || defined(OS2)
win_pthread_init();
#endif
@@ -114,6 +157,27 @@ my_bool my_thread_global_init(void)
void my_thread_global_end(void)
{
+ struct timespec abstime;
+ my_bool all_threads_killed= 1;
+
+ set_timespec(abstime, my_thread_end_wait_time);
+ pthread_mutex_lock(&THR_LOCK_threads);
+ while (THR_thread_count > 0)
+ {
+ int error= pthread_cond_timedwait(&THR_COND_threads, &THR_LOCK_threads,
+ &abstime);
+ if (error == ETIMEDOUT || error == ETIME)
+ {
+ if (THR_thread_count)
+ fprintf(stderr,
+ "Error in my_thread_global_end(): %d threads didn't exit\n",
+ THR_thread_count);
+ all_threads_killed= 0;
+ break;
+ }
+ }
+ pthread_mutex_unlock(&THR_LOCK_threads);
+
pthread_key_delete(THR_KEY_mysys);
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
pthread_mutexattr_destroy(&my_fast_mutexattr);
@@ -129,6 +193,11 @@ void my_thread_global_end(void)
pthread_mutex_destroy(&THR_LOCK_heap);
pthread_mutex_destroy(&THR_LOCK_net);
pthread_mutex_destroy(&THR_LOCK_charset);
+ if (all_threads_killed)
+ {
+ pthread_mutex_destroy(&THR_LOCK_threads);
+ pthread_cond_destroy (&THR_COND_threads);
+ }
#if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R)
pthread_mutex_destroy(&LOCK_localtime_r);
#endif
@@ -140,10 +209,23 @@ void my_thread_global_end(void)
static long thread_id=0;
/*
- We can't use mutex_locks here if we are using windows as
- we may have compiled the program with SAFE_MUTEX, in which
- case the checking of mutex_locks will not work until
- the pthread_self thread specific variable is initialized.
+ Allocate thread specific memory for the thread, used by mysys and dbug
+
+ SYNOPSIS
+ my_thread_init()
+
+ NOTES
+ We can't use mutex_locks here if we are using windows as
+ we may have compiled the program with SAFE_MUTEX, in which
+ case the checking of mutex_locks will not work until
+ the pthread_self thread specific variable is initialized.
+
+ This function may called multiple times for a thread, for example
+ if one uses my_init() followed by mysql_server_init().
+
+ RETURN
+ 0 ok
+ 1 Fatal error; mysys/dbug functions can't be used
*/
my_bool my_thread_init(void)
@@ -154,9 +236,6 @@ my_bool my_thread_init(void)
#ifdef EXTRA_DEBUG_THREADS
fprintf(stderr,"my_thread_init(): thread_id=%ld\n",pthread_self());
#endif
-#if !defined(__WIN__) || defined(USE_TLS) || ! defined(SAFE_MUTEX)
- pthread_mutex_lock(&THR_LOCK_lock);
-#endif
#if !defined(__WIN__) || defined(USE_TLS)
if (my_pthread_getspecific(struct st_my_thread_var *,THR_KEY_mysys))
@@ -174,7 +253,7 @@ my_bool my_thread_init(void)
}
pthread_setspecific(THR_KEY_mysys,tmp);
-#else
+#else /* defined(__WIN__) && !(defined(USE_TLS) */
/*
Skip initialization if the thread specific variable is already initialized
*/
@@ -182,7 +261,6 @@ my_bool my_thread_init(void)
goto end;
tmp= &THR_KEY_mysys;
#endif
- tmp->id= ++thread_id;
#if defined(__WIN__) && defined(EMBEDDED_LIBRARY)
tmp->thread_self= (pthread_t)getpid();
#endif
@@ -190,22 +268,35 @@ my_bool my_thread_init(void)
pthread_cond_init(&tmp->suspend, NULL);
tmp->init= 1;
+ pthread_mutex_lock(&THR_LOCK_threads);
+ tmp->id= ++thread_id;
+ ++THR_thread_count;
+ pthread_mutex_unlock(&THR_LOCK_threads);
end:
-#if !defined(__WIN__) || defined(USE_TLS) || ! defined(SAFE_MUTEX)
- pthread_mutex_unlock(&THR_LOCK_lock);
-#endif
return error;
}
+/*
+ Deallocate memory used by the thread for book-keeping
+
+ SYNOPSIS
+ my_thread_end()
+
+ NOTE
+ This may be called multiple times for a thread.
+ This happens for example when one calls 'mysql_server_init()'
+ mysql_server_end() and then ends with a mysql_end().
+*/
+
void my_thread_end(void)
{
struct st_my_thread_var *tmp;
tmp= my_pthread_getspecific(struct st_my_thread_var*,THR_KEY_mysys);
#ifdef EXTRA_DEBUG_THREADS
- fprintf(stderr,"my_thread_end(): tmp=%p,thread_id=%ld\n",
- tmp,pthread_self());
+ fprintf(stderr,"my_thread_end(): tmp: 0x%lx thread_id=%ld\n",
+ (long) tmp, pthread_self());
#endif
if (tmp && tmp->init)
{
@@ -227,6 +318,18 @@ void my_thread_end(void)
#else
tmp->init= 0;
#endif
+
+ /*
+ Decrement counter for number of running threads. We are using this
+ in my_thread_global_end() to wait until all threads have called
+ my_thread_end and thus freed all memory they have allocated in
+ my_thread_init() and DBUG_xxxx
+ */
+ pthread_mutex_lock(&THR_LOCK_threads);
+ DBUG_ASSERT(THR_thread_count != 0);
+ if (--THR_thread_count == 0)
+ pthread_cond_signal(&THR_COND_threads);
+ pthread_mutex_unlock(&THR_LOCK_threads);
}
/* The following free has to be done, even if my_thread_var() is 0 */
#if (!defined(__WIN__) && !defined(OS2)) || defined(USE_TLS)
diff --git a/mysys/my_wincond.c b/mysys/my_wincond.c
index 8c497e8f250..ed8b715cb85 100644
--- a/mysys/my_wincond.c
+++ b/mysys/my_wincond.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +36,7 @@ int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
int pthread_cond_destroy(pthread_cond_t *cond)
{
- return CloseHandle(cond->semaphore) ? 0 : EINVAL;
+ return CloseHandle(cond->semaphore) ? 0 : EINVAL;
}
@@ -51,20 +50,37 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
return 0 ;
}
+
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime)
{
- struct _timeb curtime;
int result;
- long timeout;
- _ftime(&curtime);
- timeout= ((long) (abstime->tv_sec - curtime.time)*1000L +
- (long)((abstime->tv_nsec/1000) - curtime.millitm)/1000L);
- if (timeout < 0) /* Some safety */
- timeout = 0L;
+ long timeout;
+ union ft64 now;
+
+ GetSystemTimeAsFileTime(&now.ft);
+
+ /*
+ Calculate time left to abstime
+ - subtract start time from current time(values are in 100ns units)
+ - convert to millisec by dividing with 10000
+ */
+ timeout= (long)((abstime->tv.i64 - now.i64) / 10000);
+
+ /* Don't allow the timeout to be negative */
+ if (timeout < 0)
+ timeout= 0L;
+
+ /*
+ Make sure the calucated timeout does not exceed original timeout
+ value which could cause "wait for ever" if system time changes
+ */
+ if (timeout > abstime->max_timeout_msec)
+ timeout= abstime->max_timeout_msec;
+
InterlockedIncrement(&cond->waiting);
LeaveCriticalSection(mutex);
- result=WaitForSingleObject(cond->semaphore,timeout);
+ result= WaitForSingleObject(cond->semaphore,timeout);
InterlockedDecrement(&cond->waiting);
EnterCriticalSection(mutex);
diff --git a/mysys/my_windac.c b/mysys/my_windac.c
index 2c1027e4aa6..c711093b48f 100644
--- a/mysys/my_windac.c
+++ b/mysys/my_windac.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c
index 8aaf3b1e31c..27ccaef4f23 100644
--- a/mysys/my_winthread.c
+++ b/mysys/my_winthread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/my_write.c b/mysys/my_write.c
index 26b9a4f2444..4c3d187e4e8 100644
--- a/mysys/my_write.c
+++ b/mysys/my_write.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/mysys_priv.h b/mysys/mysys_priv.h
index 89a6d8aa2a7..8a636e94626 100644
--- a/mysys/mysys_priv.h
+++ b/mysys/mysys_priv.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/ptr_cmp.c b/mysys/ptr_cmp.c
index 57778574bb6..a3bc3702c34 100644
--- a/mysys/ptr_cmp.c
+++ b/mysys/ptr_cmp.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/queues.c b/mysys/queues.c
index 6a285ce7417..7809c97131c 100644
--- a/mysys/queues.c
+++ b/mysys/queues.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/raid.cc b/mysys/raid.cc
index 29819a878c4..c70c01fde4b 100644
--- a/mysys/raid.cc
+++ b/mysys/raid.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/raid2.c b/mysys/raid2.c
index 94b085b0074..4feace7410f 100644
--- a/mysys/raid2.c
+++ b/mysys/raid2.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/rijndael.c b/mysys/rijndael.c
index 43cd14101ca..2b12753c4e5 100644
--- a/mysys/rijndael.c
+++ b/mysys/rijndael.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c
index b3466e36197..f43c860adb0 100644
--- a/mysys/safemalloc.c
+++ b/mysys/safemalloc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/sha1.c b/mysys/sha1.c
index 110d24f8bfc..6328ed285d6 100644
--- a/mysys/sha1.c
+++ b/mysys/sha1.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002, 2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/string.c b/mysys/string.c
index dfd42d137dd..df78f2b98b5 100644
--- a/mysys/string.c
+++ b/mysys/string.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -116,6 +115,56 @@ my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
}
+/** Concatenates any number of strings, escapes any OS quote in the result then
+ * surround the whole affair in another set of quotes which is finally appended
+ * to specified DYNAMIC_STRING. This function is especially useful when
+ * building strings to be executed with the system() function.
+ * @param str Dynamic String which will have addtional strings appended.
+ * @param append String to be appended.
+ * @param ... Optional. Additional string(s) to be appended.
+ *
+ * @note The final argument in the list must be NullS even if no additional
+ * options are passed.
+ *
+ * @return True = Success.
+ */
+my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, ...)
+{
+#ifdef __WIN__
+ const char *quote_str= "\"";
+ const uint quote_len= 1;
+#else
+ const char *quote_str= "\'";
+ const uint quote_len= 1;
+#endif /* __WIN__ */
+ my_bool ret= TRUE;
+ va_list dirty_text;
+
+ ret&= dynstr_append_mem(str, quote_str, quote_len); /* Leading quote */
+ va_start(dirty_text, append);
+ while (append != NullS)
+ {
+ const char *cur_pos= append;
+ const char *next_pos= cur_pos;
+
+ /* Search for quote in each string and replace with escaped quote */
+ while(*(next_pos= strcend(cur_pos, quote_str[0])) != '\0')
+ {
+ ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos);
+ ret&= dynstr_append_mem(str ,"\\", 1);
+ ret&= dynstr_append_mem(str, quote_str, quote_len);
+ cur_pos= next_pos + 1;
+ }
+ ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos);
+ append= va_arg(dirty_text, char *);
+ }
+ va_end(dirty_text);
+ ret&= dynstr_append_mem(str, quote_str, quote_len); /* Trailing quote */
+
+ return ret;
+}
+
+
void dynstr_free(DYNAMIC_STRING *str)
{
if (str->str)
diff --git a/mysys/test_charset.c b/mysys/test_charset.c
index 419332cb997..08154e67863 100644
--- a/mysys/test_charset.c
+++ b/mysys/test_charset.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/test_dir.c b/mysys/test_dir.c
index f3d220e942f..f1e4987371b 100644
--- a/mysys/test_dir.c
+++ b/mysys/test_dir.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/test_fn.c b/mysys/test_fn.c
index d0fb9f59fd6..249cc878390 100644
--- a/mysys/test_fn.c
+++ b/mysys/test_fn.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/test_xml.c b/mysys/test_xml.c
index 2a679906cbf..0cb10e1c8d9 100644
--- a/mysys/test_xml.c
+++ b/mysys/test_xml.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/testhash.c b/mysys/testhash.c
index d15016113cd..fd2bc73b2ae 100644
--- a/mysys/testhash.c
+++ b/mysys/testhash.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c
index 41914080a9d..acb4ac5dbf9 100644
--- a/mysys/thr_alarm.c
+++ b/mysys/thr_alarm.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index 66848b94651..3d29379a9fc 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -758,8 +757,16 @@ void thr_unlock(THR_LOCK_DATA *data)
}
else
lock->write.last=data->prev;
- if (lock_type >= TL_WRITE_CONCURRENT_INSERT && lock->update_status)
- (*lock->update_status)(data->status_param);
+ if (lock_type >= TL_WRITE_CONCURRENT_INSERT)
+ {
+ if (lock->update_status)
+ (*lock->update_status)(data->status_param);
+ }
+ else
+ {
+ if (lock->restore_status)
+ (*lock->restore_status)(data->status_param);
+ }
if (lock_type == TL_READ_NO_INSERT)
lock->read_no_write_count--;
data->type=TL_UNLOCK; /* Mark unlocked */
diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c
index 1791bb6e4c4..425e5fce459 100644
--- a/mysys/thr_mutex.c
+++ b/mysys/thr_mutex.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/thr_rwlock.c b/mysys/thr_rwlock.c
index 29db2b997a0..0aa4d3fc3c4 100644
--- a/mysys/thr_rwlock.c
+++ b/mysys/thr_rwlock.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/mysys/tree.c b/mysys/tree.c
index abbc99b2445..2e6868e0777 100644
--- a/mysys/tree.c
+++ b/mysys/tree.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -84,7 +83,7 @@ static void rb_delete_fixup(TREE *tree,TREE_ELEMENT ***parent);
static int test_rb_tree(TREE_ELEMENT *element);
#endif
-void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
+void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit,
int size, qsort_cmp2 compare, my_bool with_delete,
tree_element_free free_element, void *custom_arg)
{
@@ -128,7 +127,7 @@ void init_tree(TREE *tree, uint default_alloc_size, uint memory_limit,
}
if (!(tree->with_delete=with_delete))
{
- init_alloc_root(&tree->mem_root, default_alloc_size,0);
+ init_alloc_root(&tree->mem_root, (uint) default_alloc_size, 0);
tree->mem_root.min_malloc=(sizeof(TREE_ELEMENT)+tree->size_of_element);
}
DBUG_VOID_RETURN;
diff --git a/mysys/typelib.c b/mysys/typelib.c
index d329b687668..4fab6f20493 100644
--- a/mysys/typelib.c
+++ b/mysys/typelib.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -119,3 +118,54 @@ const char *get_type(TYPELIB *typelib, uint nr)
return(typelib->type_names[nr]);
return "?";
}
+
+
+/*
+ Create a copy of a specified TYPELIB structure.
+
+ SYNOPSIS
+ copy_typelib()
+ root pointer to a MEM_ROOT object for allocations
+ from pointer to a source TYPELIB structure
+
+ RETURN
+ pointer to the new TYPELIB structure on successful copy, or
+ NULL otherwise
+*/
+
+TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from)
+{
+ TYPELIB *to;
+ uint i;
+
+ if (!from)
+ return NULL;
+
+ if (!(to= (TYPELIB*) alloc_root(root, sizeof(TYPELIB))))
+ return NULL;
+
+ if (!(to->type_names= (const char **)
+ alloc_root(root, (sizeof(char *) + sizeof(int)) * (from->count + 1))))
+ return NULL;
+ to->type_lengths= (unsigned int *)(to->type_names + from->count + 1);
+ to->count= from->count;
+ if (from->name)
+ {
+ if (!(to->name= strdup_root(root, from->name)))
+ return NULL;
+ }
+ else
+ to->name= NULL;
+
+ for (i= 0; i < from->count; i++)
+ {
+ if (!(to->type_names[i]= strmake_root(root, from->type_names[i],
+ from->type_lengths[i])))
+ return NULL;
+ to->type_lengths[i]= from->type_lengths[i];
+ }
+ to->type_names[to->count]= NULL;
+ to->type_lengths[to->count]= 0;
+
+ return to;
+}
diff --git a/ndb/Makefile.am b/ndb/Makefile.am
index ead70766e97..a652fc5b6a9 100644
--- a/ndb/Makefile.am
+++ b/ndb/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = src tools . include @ndb_opt_subdirs@
DIST_SUBDIRS = src tools include test docs
EXTRA_DIST = config ndbapi-examples
@@ -29,3 +44,6 @@ all-windoze-dsp: windoze
find . -name '*.dsp' | grep -v SCCS | xargs unix2dos
$(top_srcdir)/ndb/config/make-win-dsw.sh | unix2dos > ndb.dsw
tar cvfz ndb-win-dsp.tar.gz ndb.dsw `find . -name '*.dsp' | grep -v SCCS`
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/config/common.mk.am b/ndb/config/common.mk.am
index 6fda12d33b0..749046066cb 100644
--- a/ndb/config/common.mk.am
+++ b/ndb/config/common.mk.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
ndbbindir = "$(libexecdir)"
ndbtoolsdir = "$(bindir)"
ndbtestdir = "$(bindir)"
diff --git a/ndb/config/type_kernel.mk.am b/ndb/config/type_kernel.mk.am
index ccb01709dfb..7a641f1b533 100644
--- a/ndb/config/type_kernel.mk.am
+++ b/ndb/config/type_kernel.mk.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDES += \
-I$(srcdir) \
diff --git a/ndb/config/type_mgmapiclient.mk.am b/ndb/config/type_mgmapiclient.mk.am
index 1ef4a81d67e..ad935e5f2b6 100644
--- a/ndb/config/type_mgmapiclient.mk.am
+++ b/ndb/config/type_mgmapiclient.mk.am
@@ -1,2 +1,16 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDES += -I$(top_srcdir)/ndb/include/mgmapi
diff --git a/ndb/config/type_ndbapi.mk.am b/ndb/config/type_ndbapi.mk.am
index 18bc536fdee..1e8b5d86e44 100644
--- a/ndb/config/type_ndbapi.mk.am
+++ b/ndb/config/type_ndbapi.mk.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDES += \
-I$(srcdir) \
diff --git a/ndb/config/type_ndbapiclient.mk.am b/ndb/config/type_ndbapiclient.mk.am
index 88b57e49e19..159c6e4456a 100644
--- a/ndb/config/type_ndbapiclient.mk.am
+++ b/ndb/config/type_ndbapiclient.mk.am
@@ -1,2 +1,16 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDES += -I$(top_srcdir)/ndb/include/ndbapi
diff --git a/ndb/config/type_ndbapitest.mk.am b/ndb/config/type_ndbapitest.mk.am
index e9a383eaad7..2859b1eb2ee 100644
--- a/ndb/config/type_ndbapitest.mk.am
+++ b/ndb/config/type_ndbapitest.mk.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \
$(top_builddir)/ndb/src/libndbclient.la \
diff --git a/ndb/config/type_ndbapitools.mk.am b/ndb/config/type_ndbapitools.mk.am
index 3c5510880d4..49163ad9874 100644
--- a/ndb/config/type_ndbapitools.mk.am
+++ b/ndb/config/type_ndbapitools.mk.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
LDADD += \
$(top_builddir)/ndb/src/libndbclient.la \
diff --git a/ndb/config/type_util.mk.am b/ndb/config/type_util.mk.am
index de250ae1f43..fb64d7859a3 100644
--- a/ndb/config/type_util.mk.am
+++ b/ndb/config/type_util.mk.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
INCLUDES += -I$(srcdir) \
-I$(top_builddir)/include \
diff --git a/ndb/docs/Makefile.am b/ndb/docs/Makefile.am
index 78fced4b2e4..4c7343661f2 100644
--- a/ndb/docs/Makefile.am
+++ b/ndb/docs/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
DOXYDIR = doxygen
noinst_HEADERS = $(DOXYDIR)/predoxy.pl $(DOXYDIR)/postdoxy.pl $(DOXYDIR)/Doxyfile.ndbapi $(DOXYDIR)/Doxyfile.mgmapi $(DOXYDIR)/header.ndbapi.tex $(DOXYDIR)/header.mgmapi.tex
@@ -112,3 +127,6 @@ testdoc: DUMMY
cd $(top_srcdir)/ndb ; $(DOXYGEN) $(DOXYDIR)/Doxyfile.test
windoze-dsp:
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/include/Makefile.am b/ndb/include/Makefile.am
index 842f4daabee..7c3e8a26171 100644
--- a/ndb/include/Makefile.am
+++ b/ndb/include/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
include $(top_srcdir)/ndb/config/common.mk.am
diff --git a/ndb/include/debugger/DebuggerNames.hpp b/ndb/include/debugger/DebuggerNames.hpp
index cf9b1b57226..86d76ae070c 100644
--- a/ndb/include/debugger/DebuggerNames.hpp
+++ b/ndb/include/debugger/DebuggerNames.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/debugger/EventLogger.hpp b/ndb/include/debugger/EventLogger.hpp
index 6308cf25465..11df3f513fc 100644
--- a/ndb/include/debugger/EventLogger.hpp
+++ b/ndb/include/debugger/EventLogger.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/debugger/GrepError.hpp b/ndb/include/debugger/GrepError.hpp
index beedbd95c80..5a12a132f18 100644
--- a/ndb/include/debugger/GrepError.hpp
+++ b/ndb/include/debugger/GrepError.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/debugger/SignalLoggerManager.hpp b/ndb/include/debugger/SignalLoggerManager.hpp
index d212329bf78..578085ca1b8 100644
--- a/ndb/include/debugger/SignalLoggerManager.hpp
+++ b/ndb/include/debugger/SignalLoggerManager.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/editline/editline.h b/ndb/include/editline/editline.h
index 2757e385968..c0befc788e2 100644
--- a/ndb/include/editline/editline.h
+++ b/ndb/include/editline/editline.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/AttributeDescriptor.hpp b/ndb/include/kernel/AttributeDescriptor.hpp
index 2fe7c9f0973..d5c535893dd 100644
--- a/ndb/include/kernel/AttributeDescriptor.hpp
+++ b/ndb/include/kernel/AttributeDescriptor.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/AttributeHeader.hpp b/ndb/include/kernel/AttributeHeader.hpp
index 3cb432067eb..448952a0780 100644
--- a/ndb/include/kernel/AttributeHeader.hpp
+++ b/ndb/include/kernel/AttributeHeader.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/AttributeList.hpp b/ndb/include/kernel/AttributeList.hpp
index 70b178c6c79..272332141a5 100644
--- a/ndb/include/kernel/AttributeList.hpp
+++ b/ndb/include/kernel/AttributeList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/BlockNumbers.h b/ndb/include/kernel/BlockNumbers.h
index 49b5842ac4e..31b4361fbe8 100644
--- a/ndb/include/kernel/BlockNumbers.h
+++ b/ndb/include/kernel/BlockNumbers.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/GlobalSignalNumbers.h b/ndb/include/kernel/GlobalSignalNumbers.h
index 76b7d30059e..08d35a0b0cb 100644
--- a/ndb/include/kernel/GlobalSignalNumbers.h
+++ b/ndb/include/kernel/GlobalSignalNumbers.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/GrepEvent.hpp b/ndb/include/kernel/GrepEvent.hpp
index 2073a7072c9..dd1034e6e91 100644
--- a/ndb/include/kernel/GrepEvent.hpp
+++ b/ndb/include/kernel/GrepEvent.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/Interpreter.hpp b/ndb/include/kernel/Interpreter.hpp
index 69c952ea7c3..356d32599ac 100644
--- a/ndb/include/kernel/Interpreter.hpp
+++ b/ndb/include/kernel/Interpreter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/LogLevel.hpp b/ndb/include/kernel/LogLevel.hpp
index 60dcd36ab56..d58ac67083c 100644
--- a/ndb/include/kernel/LogLevel.hpp
+++ b/ndb/include/kernel/LogLevel.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/NodeBitmask.hpp b/ndb/include/kernel/NodeBitmask.hpp
index 423c01cd841..7d48cd9f689 100644
--- a/ndb/include/kernel/NodeBitmask.hpp
+++ b/ndb/include/kernel/NodeBitmask.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/NodeInfo.hpp b/ndb/include/kernel/NodeInfo.hpp
index 622185323a3..dba4b098d85 100644
--- a/ndb/include/kernel/NodeInfo.hpp
+++ b/ndb/include/kernel/NodeInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/NodeState.hpp b/ndb/include/kernel/NodeState.hpp
index 16784ecde79..61fa25fb237 100644
--- a/ndb/include/kernel/NodeState.hpp
+++ b/ndb/include/kernel/NodeState.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/RefConvert.hpp b/ndb/include/kernel/RefConvert.hpp
index 7604b1cf224..c15681e1504 100644
--- a/ndb/include/kernel/RefConvert.hpp
+++ b/ndb/include/kernel/RefConvert.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/kernel_config_parameters.h b/ndb/include/kernel/kernel_config_parameters.h
index bb7c6ebd42c..b715a1129d3 100644
--- a/ndb/include/kernel/kernel_config_parameters.h
+++ b/ndb/include/kernel/kernel_config_parameters.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef DB_CONFIG_PARAMTERS_H
#define DB_CONFIG_PARAMTERS_H
diff --git a/ndb/include/kernel/kernel_types.h b/ndb/include/kernel/kernel_types.h
index e16e61471e7..251f1307a57 100644
--- a/ndb/include/kernel/kernel_types.h
+++ b/ndb/include/kernel/kernel_types.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/ndb_limits.h b/ndb/include/kernel/ndb_limits.h
index 8822cb8976e..c82288c762a 100644
--- a/ndb/include/kernel/ndb_limits.h
+++ b/ndb/include/kernel/ndb_limits.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AbortAll.hpp b/ndb/include/kernel/signaldata/AbortAll.hpp
index a3d7f483953..2d7d3bd7c29 100644
--- a/ndb/include/kernel/signaldata/AbortAll.hpp
+++ b/ndb/include/kernel/signaldata/AbortAll.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AccFrag.hpp b/ndb/include/kernel/signaldata/AccFrag.hpp
index e28ab0d1ee6..c44e157485c 100644
--- a/ndb/include/kernel/signaldata/AccFrag.hpp
+++ b/ndb/include/kernel/signaldata/AccFrag.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AccLock.hpp b/ndb/include/kernel/signaldata/AccLock.hpp
index 1a41b4c9334..a0d540820be 100644
--- a/ndb/include/kernel/signaldata/AccLock.hpp
+++ b/ndb/include/kernel/signaldata/AccLock.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AccScan.hpp b/ndb/include/kernel/signaldata/AccScan.hpp
index d94d4da8cca..e821e6f8fcd 100644
--- a/ndb/include/kernel/signaldata/AccScan.hpp
+++ b/ndb/include/kernel/signaldata/AccScan.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AccSizeAltReq.hpp b/ndb/include/kernel/signaldata/AccSizeAltReq.hpp
index ac348444826..b3b239640ae 100644
--- a/ndb/include/kernel/signaldata/AccSizeAltReq.hpp
+++ b/ndb/include/kernel/signaldata/AccSizeAltReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AlterIndx.hpp b/ndb/include/kernel/signaldata/AlterIndx.hpp
index f5ad835b6f3..bd9bf9a1293 100644
--- a/ndb/include/kernel/signaldata/AlterIndx.hpp
+++ b/ndb/include/kernel/signaldata/AlterIndx.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AlterTab.hpp b/ndb/include/kernel/signaldata/AlterTab.hpp
index 02d4eb95d2e..465d6f2a093 100644
--- a/ndb/include/kernel/signaldata/AlterTab.hpp
+++ b/ndb/include/kernel/signaldata/AlterTab.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AlterTable.hpp b/ndb/include/kernel/signaldata/AlterTable.hpp
index f5006c27fdb..6042b7233f6 100644
--- a/ndb/include/kernel/signaldata/AlterTable.hpp
+++ b/ndb/include/kernel/signaldata/AlterTable.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AlterTrig.hpp b/ndb/include/kernel/signaldata/AlterTrig.hpp
index a97c1fd0196..5ecda1c470c 100644
--- a/ndb/include/kernel/signaldata/AlterTrig.hpp
+++ b/ndb/include/kernel/signaldata/AlterTrig.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ApiBroadcast.hpp b/ndb/include/kernel/signaldata/ApiBroadcast.hpp
index 8050326ce78..8d71d335103 100644
--- a/ndb/include/kernel/signaldata/ApiBroadcast.hpp
+++ b/ndb/include/kernel/signaldata/ApiBroadcast.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ApiRegSignalData.hpp b/ndb/include/kernel/signaldata/ApiRegSignalData.hpp
index 84dca8fb260..ca38564ddd1 100644
--- a/ndb/include/kernel/signaldata/ApiRegSignalData.hpp
+++ b/ndb/include/kernel/signaldata/ApiRegSignalData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ApiVersion.hpp b/ndb/include/kernel/signaldata/ApiVersion.hpp
index a3774c9fba6..c895d881f61 100644
--- a/ndb/include/kernel/signaldata/ApiVersion.hpp
+++ b/ndb/include/kernel/signaldata/ApiVersion.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ArbitSignalData.hpp b/ndb/include/kernel/signaldata/ArbitSignalData.hpp
index 34b73644a13..0cb29ebe4ae 100644
--- a/ndb/include/kernel/signaldata/ArbitSignalData.hpp
+++ b/ndb/include/kernel/signaldata/ArbitSignalData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/AttrInfo.hpp b/ndb/include/kernel/signaldata/AttrInfo.hpp
index c87470db8b0..45533178ab7 100644
--- a/ndb/include/kernel/signaldata/AttrInfo.hpp
+++ b/ndb/include/kernel/signaldata/AttrInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/BackupContinueB.hpp b/ndb/include/kernel/signaldata/BackupContinueB.hpp
index fe3f48444ec..eb2cedd1a2b 100644
--- a/ndb/include/kernel/signaldata/BackupContinueB.hpp
+++ b/ndb/include/kernel/signaldata/BackupContinueB.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/BackupImpl.hpp b/ndb/include/kernel/signaldata/BackupImpl.hpp
index 07ab5bc543b..65cc0efa889 100644
--- a/ndb/include/kernel/signaldata/BackupImpl.hpp
+++ b/ndb/include/kernel/signaldata/BackupImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/BackupSignalData.hpp b/ndb/include/kernel/signaldata/BackupSignalData.hpp
index 9e34ea3a211..21e24fcf5bc 100644
--- a/ndb/include/kernel/signaldata/BackupSignalData.hpp
+++ b/ndb/include/kernel/signaldata/BackupSignalData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/BlockCommitOrd.hpp b/ndb/include/kernel/signaldata/BlockCommitOrd.hpp
index 3b33dceb758..924045926f9 100644
--- a/ndb/include/kernel/signaldata/BlockCommitOrd.hpp
+++ b/ndb/include/kernel/signaldata/BlockCommitOrd.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/BuildIndx.hpp b/ndb/include/kernel/signaldata/BuildIndx.hpp
index a6ea84c5ea0..d52dee648b8 100644
--- a/ndb/include/kernel/signaldata/BuildIndx.hpp
+++ b/ndb/include/kernel/signaldata/BuildIndx.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CheckNodeGroups.hpp b/ndb/include/kernel/signaldata/CheckNodeGroups.hpp
index b3e79949c68..6fc04a31709 100644
--- a/ndb/include/kernel/signaldata/CheckNodeGroups.hpp
+++ b/ndb/include/kernel/signaldata/CheckNodeGroups.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CloseComReqConf.hpp b/ndb/include/kernel/signaldata/CloseComReqConf.hpp
index 3d3dc54ba64..fbc92acfb2f 100644
--- a/ndb/include/kernel/signaldata/CloseComReqConf.hpp
+++ b/ndb/include/kernel/signaldata/CloseComReqConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CmInit.hpp b/ndb/include/kernel/signaldata/CmInit.hpp
index b59547b767b..a61c58abb51 100644
--- a/ndb/include/kernel/signaldata/CmInit.hpp
+++ b/ndb/include/kernel/signaldata/CmInit.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CmRegSignalData.hpp b/ndb/include/kernel/signaldata/CmRegSignalData.hpp
index e076534da9e..e2e35cc9f93 100644
--- a/ndb/include/kernel/signaldata/CmRegSignalData.hpp
+++ b/ndb/include/kernel/signaldata/CmRegSignalData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp b/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp
index 12b785723d9..dc2eaee786b 100644
--- a/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp
+++ b/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CntrMasterConf.hpp b/ndb/include/kernel/signaldata/CntrMasterConf.hpp
index e6bf363ea68..f2948a8835e 100644
--- a/ndb/include/kernel/signaldata/CntrMasterConf.hpp
+++ b/ndb/include/kernel/signaldata/CntrMasterConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CntrMasterReq.hpp b/ndb/include/kernel/signaldata/CntrMasterReq.hpp
index caf9efb1243..50ff9b95e6c 100644
--- a/ndb/include/kernel/signaldata/CntrMasterReq.hpp
+++ b/ndb/include/kernel/signaldata/CntrMasterReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CntrStart.hpp b/ndb/include/kernel/signaldata/CntrStart.hpp
index abdd1003c0f..9fc25a3fc4b 100644
--- a/ndb/include/kernel/signaldata/CntrStart.hpp
+++ b/ndb/include/kernel/signaldata/CntrStart.hpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef CNTR_START_HPP
#define CNTR_START_HPP
diff --git a/ndb/include/kernel/signaldata/ConfigParamId.hpp b/ndb/include/kernel/signaldata/ConfigParamId.hpp
index 9d9e04957ab..90d604fd024 100644
--- a/ndb/include/kernel/signaldata/ConfigParamId.hpp
+++ b/ndb/include/kernel/signaldata/ConfigParamId.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ContinueFragmented.hpp b/ndb/include/kernel/signaldata/ContinueFragmented.hpp
index 3d12b9e51eb..31f47392a8b 100644
--- a/ndb/include/kernel/signaldata/ContinueFragmented.hpp
+++ b/ndb/include/kernel/signaldata/ContinueFragmented.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CopyActive.hpp b/ndb/include/kernel/signaldata/CopyActive.hpp
index 19b05bda072..2107d63ca5d 100644
--- a/ndb/include/kernel/signaldata/CopyActive.hpp
+++ b/ndb/include/kernel/signaldata/CopyActive.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CopyFrag.hpp b/ndb/include/kernel/signaldata/CopyFrag.hpp
index 3fd5d704727..c36206dea46 100644
--- a/ndb/include/kernel/signaldata/CopyFrag.hpp
+++ b/ndb/include/kernel/signaldata/CopyFrag.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CopyGCIReq.hpp b/ndb/include/kernel/signaldata/CopyGCIReq.hpp
index 4b401654de3..c669e5cabee 100644
--- a/ndb/include/kernel/signaldata/CopyGCIReq.hpp
+++ b/ndb/include/kernel/signaldata/CopyGCIReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CreateEvnt.hpp b/ndb/include/kernel/signaldata/CreateEvnt.hpp
index 8712ce8890c..ed052e3be04 100644
--- a/ndb/include/kernel/signaldata/CreateEvnt.hpp
+++ b/ndb/include/kernel/signaldata/CreateEvnt.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CreateFrag.hpp b/ndb/include/kernel/signaldata/CreateFrag.hpp
index a7b3f836353..dad2aa542ca 100644
--- a/ndb/include/kernel/signaldata/CreateFrag.hpp
+++ b/ndb/include/kernel/signaldata/CreateFrag.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CreateFragmentation.hpp b/ndb/include/kernel/signaldata/CreateFragmentation.hpp
index 7d53dd91154..b3e963a821c 100644
--- a/ndb/include/kernel/signaldata/CreateFragmentation.hpp
+++ b/ndb/include/kernel/signaldata/CreateFragmentation.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CreateIndx.hpp b/ndb/include/kernel/signaldata/CreateIndx.hpp
index 4163583dbd2..8a2054a1a42 100644
--- a/ndb/include/kernel/signaldata/CreateIndx.hpp
+++ b/ndb/include/kernel/signaldata/CreateIndx.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CreateTab.hpp b/ndb/include/kernel/signaldata/CreateTab.hpp
index b2ef52a6bf7..87702c401a2 100644
--- a/ndb/include/kernel/signaldata/CreateTab.hpp
+++ b/ndb/include/kernel/signaldata/CreateTab.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CreateTable.hpp b/ndb/include/kernel/signaldata/CreateTable.hpp
index 7d3189cc126..d29a06c751e 100644
--- a/ndb/include/kernel/signaldata/CreateTable.hpp
+++ b/ndb/include/kernel/signaldata/CreateTable.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/CreateTrig.hpp b/ndb/include/kernel/signaldata/CreateTrig.hpp
index 62627256dcf..7f5ff640cf6 100644
--- a/ndb/include/kernel/signaldata/CreateTrig.hpp
+++ b/ndb/include/kernel/signaldata/CreateTrig.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DiAddTab.hpp b/ndb/include/kernel/signaldata/DiAddTab.hpp
index 6b17515eb6f..96adcbedd6c 100644
--- a/ndb/include/kernel/signaldata/DiAddTab.hpp
+++ b/ndb/include/kernel/signaldata/DiAddTab.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DiGetNodes.hpp b/ndb/include/kernel/signaldata/DiGetNodes.hpp
index 05ab6bfebb3..5e22c64143e 100644
--- a/ndb/include/kernel/signaldata/DiGetNodes.hpp
+++ b/ndb/include/kernel/signaldata/DiGetNodes.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DictLock.hpp b/ndb/include/kernel/signaldata/DictLock.hpp
index 3e29d762962..9cf6199ae5c 100644
--- a/ndb/include/kernel/signaldata/DictLock.hpp
+++ b/ndb/include/kernel/signaldata/DictLock.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DictSchemaInfo.hpp b/ndb/include/kernel/signaldata/DictSchemaInfo.hpp
index c15dcf2fd7a..88919769b37 100644
--- a/ndb/include/kernel/signaldata/DictSchemaInfo.hpp
+++ b/ndb/include/kernel/signaldata/DictSchemaInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DictSizeAltReq.hpp b/ndb/include/kernel/signaldata/DictSizeAltReq.hpp
index b40f0c8c1af..a5b2584a374 100644
--- a/ndb/include/kernel/signaldata/DictSizeAltReq.hpp
+++ b/ndb/include/kernel/signaldata/DictSizeAltReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DictStart.hpp b/ndb/include/kernel/signaldata/DictStart.hpp
index 59310601f48..ec317149095 100644
--- a/ndb/include/kernel/signaldata/DictStart.hpp
+++ b/ndb/include/kernel/signaldata/DictStart.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DictTabInfo.hpp b/ndb/include/kernel/signaldata/DictTabInfo.hpp
index 0a7f6aa3fb3..81bc95e5128 100644
--- a/ndb/include/kernel/signaldata/DictTabInfo.hpp
+++ b/ndb/include/kernel/signaldata/DictTabInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DihAddFrag.hpp b/ndb/include/kernel/signaldata/DihAddFrag.hpp
index 6e5a24ee413..123b81c9480 100644
--- a/ndb/include/kernel/signaldata/DihAddFrag.hpp
+++ b/ndb/include/kernel/signaldata/DihAddFrag.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DihContinueB.hpp b/ndb/include/kernel/signaldata/DihContinueB.hpp
index 77ecf360601..0bc2141c4cc 100644
--- a/ndb/include/kernel/signaldata/DihContinueB.hpp
+++ b/ndb/include/kernel/signaldata/DihContinueB.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DihSizeAltReq.hpp b/ndb/include/kernel/signaldata/DihSizeAltReq.hpp
index 73279447859..9e901d5bf49 100644
--- a/ndb/include/kernel/signaldata/DihSizeAltReq.hpp
+++ b/ndb/include/kernel/signaldata/DihSizeAltReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DihStartTab.hpp b/ndb/include/kernel/signaldata/DihStartTab.hpp
index 75443e6070e..434712dbf47 100644
--- a/ndb/include/kernel/signaldata/DihStartTab.hpp
+++ b/ndb/include/kernel/signaldata/DihStartTab.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DihSwitchReplica.hpp b/ndb/include/kernel/signaldata/DihSwitchReplica.hpp
index d4212f510f3..cbeeb60af92 100644
--- a/ndb/include/kernel/signaldata/DihSwitchReplica.hpp
+++ b/ndb/include/kernel/signaldata/DihSwitchReplica.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DisconnectRep.hpp b/ndb/include/kernel/signaldata/DisconnectRep.hpp
index d7fcdc4fb35..26515fc0ef8 100644
--- a/ndb/include/kernel/signaldata/DisconnectRep.hpp
+++ b/ndb/include/kernel/signaldata/DisconnectRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DropIndx.hpp b/ndb/include/kernel/signaldata/DropIndx.hpp
index 41ee50082f7..01d500f2d84 100644
--- a/ndb/include/kernel/signaldata/DropIndx.hpp
+++ b/ndb/include/kernel/signaldata/DropIndx.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DropTab.hpp b/ndb/include/kernel/signaldata/DropTab.hpp
index dd3946d8cc0..2129f6297b0 100644
--- a/ndb/include/kernel/signaldata/DropTab.hpp
+++ b/ndb/include/kernel/signaldata/DropTab.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DropTabFile.hpp b/ndb/include/kernel/signaldata/DropTabFile.hpp
index 9ae4dae41c1..d9e6b96b5a9 100644
--- a/ndb/include/kernel/signaldata/DropTabFile.hpp
+++ b/ndb/include/kernel/signaldata/DropTabFile.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DropTable.hpp b/ndb/include/kernel/signaldata/DropTable.hpp
index e762446d2b8..36268b23be1 100644
--- a/ndb/include/kernel/signaldata/DropTable.hpp
+++ b/ndb/include/kernel/signaldata/DropTable.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DropTrig.hpp b/ndb/include/kernel/signaldata/DropTrig.hpp
index 7c5049f3de8..27e1a67801d 100644
--- a/ndb/include/kernel/signaldata/DropTrig.hpp
+++ b/ndb/include/kernel/signaldata/DropTrig.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/DumpStateOrd.hpp b/ndb/include/kernel/signaldata/DumpStateOrd.hpp
index a2993ad5d03..8d0961d1c27 100644
--- a/ndb/include/kernel/signaldata/DumpStateOrd.hpp
+++ b/ndb/include/kernel/signaldata/DumpStateOrd.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -68,6 +67,7 @@ public:
// 100-105 TUP and ACC
// 200-240 UTIL
// 300-305 TRIX
+ QmgrErr935 = 935,
NdbfsDumpFileStat = 400,
NdbfsDumpAllFiles = 401,
NdbfsDumpOpenFiles = 402,
diff --git a/ndb/include/kernel/signaldata/EmptyLcp.hpp b/ndb/include/kernel/signaldata/EmptyLcp.hpp
index 32ea6c13231..60fccd742b6 100644
--- a/ndb/include/kernel/signaldata/EmptyLcp.hpp
+++ b/ndb/include/kernel/signaldata/EmptyLcp.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/EndTo.hpp b/ndb/include/kernel/signaldata/EndTo.hpp
index 944cca3ca98..0885edff45b 100644
--- a/ndb/include/kernel/signaldata/EndTo.hpp
+++ b/ndb/include/kernel/signaldata/EndTo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/EventReport.hpp b/ndb/include/kernel/signaldata/EventReport.hpp
index e1cdbcfd753..e7b1fa3d79a 100644
--- a/ndb/include/kernel/signaldata/EventReport.hpp
+++ b/ndb/include/kernel/signaldata/EventReport.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/EventSubscribeReq.hpp b/ndb/include/kernel/signaldata/EventSubscribeReq.hpp
index 84a1717b1de..d72b6dec3e5 100644
--- a/ndb/include/kernel/signaldata/EventSubscribeReq.hpp
+++ b/ndb/include/kernel/signaldata/EventSubscribeReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ExecFragReq.hpp b/ndb/include/kernel/signaldata/ExecFragReq.hpp
index e40213d6e29..47155638b81 100644
--- a/ndb/include/kernel/signaldata/ExecFragReq.hpp
+++ b/ndb/include/kernel/signaldata/ExecFragReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FailRep.hpp b/ndb/include/kernel/signaldata/FailRep.hpp
index f2250f1af73..798ff3f5e47 100644
--- a/ndb/include/kernel/signaldata/FailRep.hpp
+++ b/ndb/include/kernel/signaldata/FailRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FireTrigOrd.hpp b/ndb/include/kernel/signaldata/FireTrigOrd.hpp
index 20a0a863094..20036edaf31 100644
--- a/ndb/include/kernel/signaldata/FireTrigOrd.hpp
+++ b/ndb/include/kernel/signaldata/FireTrigOrd.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FsAppendReq.hpp b/ndb/include/kernel/signaldata/FsAppendReq.hpp
index e2fd61f8a11..2ffe3ebbd7a 100644
--- a/ndb/include/kernel/signaldata/FsAppendReq.hpp
+++ b/ndb/include/kernel/signaldata/FsAppendReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FsCloseReq.hpp b/ndb/include/kernel/signaldata/FsCloseReq.hpp
index 10d094fb30b..245e7e5d24d 100644
--- a/ndb/include/kernel/signaldata/FsCloseReq.hpp
+++ b/ndb/include/kernel/signaldata/FsCloseReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FsConf.hpp b/ndb/include/kernel/signaldata/FsConf.hpp
index f66d9feea49..efb6cac3c9c 100644
--- a/ndb/include/kernel/signaldata/FsConf.hpp
+++ b/ndb/include/kernel/signaldata/FsConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FsOpenReq.hpp b/ndb/include/kernel/signaldata/FsOpenReq.hpp
index 906bb947128..cdc3241f24f 100644
--- a/ndb/include/kernel/signaldata/FsOpenReq.hpp
+++ b/ndb/include/kernel/signaldata/FsOpenReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FsReadWriteReq.hpp b/ndb/include/kernel/signaldata/FsReadWriteReq.hpp
index 6e4fa4d260e..d7929ac7924 100644
--- a/ndb/include/kernel/signaldata/FsReadWriteReq.hpp
+++ b/ndb/include/kernel/signaldata/FsReadWriteReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FsRef.hpp b/ndb/include/kernel/signaldata/FsRef.hpp
index a0e1dc55dae..e7a570ef0d8 100644
--- a/ndb/include/kernel/signaldata/FsRef.hpp
+++ b/ndb/include/kernel/signaldata/FsRef.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/FsRemoveReq.hpp b/ndb/include/kernel/signaldata/FsRemoveReq.hpp
index efb566d883a..24971a489e6 100644
--- a/ndb/include/kernel/signaldata/FsRemoveReq.hpp
+++ b/ndb/include/kernel/signaldata/FsRemoveReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/GCPSave.hpp b/ndb/include/kernel/signaldata/GCPSave.hpp
index 2b4a25e6bb2..61a0414c093 100644
--- a/ndb/include/kernel/signaldata/GCPSave.hpp
+++ b/ndb/include/kernel/signaldata/GCPSave.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/GetTabInfo.hpp b/ndb/include/kernel/signaldata/GetTabInfo.hpp
index 6b223cab119..50e63b6bb9f 100644
--- a/ndb/include/kernel/signaldata/GetTabInfo.hpp
+++ b/ndb/include/kernel/signaldata/GetTabInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/GetTableId.hpp b/ndb/include/kernel/signaldata/GetTableId.hpp
index fb91c2e10d7..8c785a911ab 100644
--- a/ndb/include/kernel/signaldata/GetTableId.hpp
+++ b/ndb/include/kernel/signaldata/GetTableId.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/GrepImpl.hpp b/ndb/include/kernel/signaldata/GrepImpl.hpp
index 95b93df0a58..335c78f58eb 100644
--- a/ndb/include/kernel/signaldata/GrepImpl.hpp
+++ b/ndb/include/kernel/signaldata/GrepImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/HotSpareRep.hpp b/ndb/include/kernel/signaldata/HotSpareRep.hpp
index fb9d338be1b..c3e2922f1d7 100644
--- a/ndb/include/kernel/signaldata/HotSpareRep.hpp
+++ b/ndb/include/kernel/signaldata/HotSpareRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/IndxAttrInfo.hpp b/ndb/include/kernel/signaldata/IndxAttrInfo.hpp
index ec5790d84f3..f42e9ff8657 100755
--- a/ndb/include/kernel/signaldata/IndxAttrInfo.hpp
+++ b/ndb/include/kernel/signaldata/IndxAttrInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/IndxKeyInfo.hpp b/ndb/include/kernel/signaldata/IndxKeyInfo.hpp
index 7cd7795ec71..82ba9ae6c3f 100755
--- a/ndb/include/kernel/signaldata/IndxKeyInfo.hpp
+++ b/ndb/include/kernel/signaldata/IndxKeyInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp b/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp
index 2497af354ce..49293a5d18b 100644
--- a/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp
+++ b/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp b/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp
index e55a58710b4..57f9870d019 100644
--- a/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp
+++ b/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/KeyInfo.hpp b/ndb/include/kernel/signaldata/KeyInfo.hpp
index 686f3ae053d..bc7f4b52a88 100644
--- a/ndb/include/kernel/signaldata/KeyInfo.hpp
+++ b/ndb/include/kernel/signaldata/KeyInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/LCP.hpp b/ndb/include/kernel/signaldata/LCP.hpp
index 7d3fb71ae7e..e631d694037 100644
--- a/ndb/include/kernel/signaldata/LCP.hpp
+++ b/ndb/include/kernel/signaldata/LCP.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ListTables.hpp b/ndb/include/kernel/signaldata/ListTables.hpp
index 7fbfab1294c..47b9c9b34d6 100644
--- a/ndb/include/kernel/signaldata/ListTables.hpp
+++ b/ndb/include/kernel/signaldata/ListTables.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/LqhFrag.hpp b/ndb/include/kernel/signaldata/LqhFrag.hpp
index 72c1537854c..ec8637c254c 100644
--- a/ndb/include/kernel/signaldata/LqhFrag.hpp
+++ b/ndb/include/kernel/signaldata/LqhFrag.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/LqhKey.hpp b/ndb/include/kernel/signaldata/LqhKey.hpp
index e937180e3f7..486639613fe 100644
--- a/ndb/include/kernel/signaldata/LqhKey.hpp
+++ b/ndb/include/kernel/signaldata/LqhKey.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp b/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp
index e47ce39897a..109f7343678 100644
--- a/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp
+++ b/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/LqhTransConf.hpp b/ndb/include/kernel/signaldata/LqhTransConf.hpp
index f62dfd07f51..4a72d344ad6 100644
--- a/ndb/include/kernel/signaldata/LqhTransConf.hpp
+++ b/ndb/include/kernel/signaldata/LqhTransConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ManagementServer.hpp b/ndb/include/kernel/signaldata/ManagementServer.hpp
index ce14e30c81d..c97a252d638 100644
--- a/ndb/include/kernel/signaldata/ManagementServer.hpp
+++ b/ndb/include/kernel/signaldata/ManagementServer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/MasterGCP.hpp b/ndb/include/kernel/signaldata/MasterGCP.hpp
index ebe6857a107..683a1ac869f 100644
--- a/ndb/include/kernel/signaldata/MasterGCP.hpp
+++ b/ndb/include/kernel/signaldata/MasterGCP.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/MasterLCP.hpp b/ndb/include/kernel/signaldata/MasterLCP.hpp
index bf84ac73309..b9fbff2313d 100644
--- a/ndb/include/kernel/signaldata/MasterLCP.hpp
+++ b/ndb/include/kernel/signaldata/MasterLCP.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/NFCompleteRep.hpp b/ndb/include/kernel/signaldata/NFCompleteRep.hpp
index 764da85b163..18b201021b5 100644
--- a/ndb/include/kernel/signaldata/NFCompleteRep.hpp
+++ b/ndb/include/kernel/signaldata/NFCompleteRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/NdbSttor.hpp b/ndb/include/kernel/signaldata/NdbSttor.hpp
index edd93ef96a8..e5e5dfb829c 100644
--- a/ndb/include/kernel/signaldata/NdbSttor.hpp
+++ b/ndb/include/kernel/signaldata/NdbSttor.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/NdbfsContinueB.hpp b/ndb/include/kernel/signaldata/NdbfsContinueB.hpp
index 6154e5c19b1..22e6e8e3e0b 100644
--- a/ndb/include/kernel/signaldata/NdbfsContinueB.hpp
+++ b/ndb/include/kernel/signaldata/NdbfsContinueB.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/NextScan.hpp b/ndb/include/kernel/signaldata/NextScan.hpp
index a502a89108c..277c827de93 100644
--- a/ndb/include/kernel/signaldata/NextScan.hpp
+++ b/ndb/include/kernel/signaldata/NextScan.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/NodeFailRep.hpp b/ndb/include/kernel/signaldata/NodeFailRep.hpp
index fe57ba1a712..a7c55e8fff1 100644
--- a/ndb/include/kernel/signaldata/NodeFailRep.hpp
+++ b/ndb/include/kernel/signaldata/NodeFailRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/NodeStateSignalData.hpp b/ndb/include/kernel/signaldata/NodeStateSignalData.hpp
index 391d8f89566..0c15f3f968b 100644
--- a/ndb/include/kernel/signaldata/NodeStateSignalData.hpp
+++ b/ndb/include/kernel/signaldata/NodeStateSignalData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/PackedSignal.hpp b/ndb/include/kernel/signaldata/PackedSignal.hpp
index ea0ff6db526..50f9517b1c8 100644
--- a/ndb/include/kernel/signaldata/PackedSignal.hpp
+++ b/ndb/include/kernel/signaldata/PackedSignal.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/PrepDropTab.hpp b/ndb/include/kernel/signaldata/PrepDropTab.hpp
index c54b2474aa3..9fed2f287d2 100644
--- a/ndb/include/kernel/signaldata/PrepDropTab.hpp
+++ b/ndb/include/kernel/signaldata/PrepDropTab.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/PrepFailReqRef.hpp b/ndb/include/kernel/signaldata/PrepFailReqRef.hpp
index 90b568237b8..e7b83f6b316 100644
--- a/ndb/include/kernel/signaldata/PrepFailReqRef.hpp
+++ b/ndb/include/kernel/signaldata/PrepFailReqRef.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ReadConfig.hpp b/ndb/include/kernel/signaldata/ReadConfig.hpp
index 0835b252a32..68a32ec4e68 100644
--- a/ndb/include/kernel/signaldata/ReadConfig.hpp
+++ b/ndb/include/kernel/signaldata/ReadConfig.hpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef READ_CONFIG_HPP
#define READ_CONFIG_HPP
diff --git a/ndb/include/kernel/signaldata/ReadNodesConf.hpp b/ndb/include/kernel/signaldata/ReadNodesConf.hpp
index 0507007f71a..f42c9249418 100644
--- a/ndb/include/kernel/signaldata/ReadNodesConf.hpp
+++ b/ndb/include/kernel/signaldata/ReadNodesConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/RelTabMem.hpp b/ndb/include/kernel/signaldata/RelTabMem.hpp
index 9cf1787bba4..372ef58d283 100644
--- a/ndb/include/kernel/signaldata/RelTabMem.hpp
+++ b/ndb/include/kernel/signaldata/RelTabMem.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/RepImpl.hpp b/ndb/include/kernel/signaldata/RepImpl.hpp
index 0de1389a4a9..a82ae979d4d 100644
--- a/ndb/include/kernel/signaldata/RepImpl.hpp
+++ b/ndb/include/kernel/signaldata/RepImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ResumeReq.hpp b/ndb/include/kernel/signaldata/ResumeReq.hpp
index a4880474ca8..5ef57a9b700 100644
--- a/ndb/include/kernel/signaldata/ResumeReq.hpp
+++ b/ndb/include/kernel/signaldata/ResumeReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ScanFrag.hpp b/ndb/include/kernel/signaldata/ScanFrag.hpp
index f21a3eef7ac..accd16503f4 100644
--- a/ndb/include/kernel/signaldata/ScanFrag.hpp
+++ b/ndb/include/kernel/signaldata/ScanFrag.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/ScanTab.hpp b/ndb/include/kernel/signaldata/ScanTab.hpp
index 8cb282270ff..70d12c96756 100644
--- a/ndb/include/kernel/signaldata/ScanTab.hpp
+++ b/ndb/include/kernel/signaldata/ScanTab.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp b/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp
index 2923029f8f6..942baf2a9ad 100644
--- a/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp
+++ b/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SetVarReq.hpp b/ndb/include/kernel/signaldata/SetVarReq.hpp
index 8cb3e78be8b..a4bf54d2a2a 100644
--- a/ndb/include/kernel/signaldata/SetVarReq.hpp
+++ b/ndb/include/kernel/signaldata/SetVarReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SignalData.hpp b/ndb/include/kernel/signaldata/SignalData.hpp
index 0591a85d6e6..812a0dda6f8 100644
--- a/ndb/include/kernel/signaldata/SignalData.hpp
+++ b/ndb/include/kernel/signaldata/SignalData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SignalDataPrint.hpp b/ndb/include/kernel/signaldata/SignalDataPrint.hpp
index 17ab07acd4e..1d0b3a17bfd 100644
--- a/ndb/include/kernel/signaldata/SignalDataPrint.hpp
+++ b/ndb/include/kernel/signaldata/SignalDataPrint.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SignalDroppedRep.hpp b/ndb/include/kernel/signaldata/SignalDroppedRep.hpp
index 20863524358..fd6d5afabce 100644
--- a/ndb/include/kernel/signaldata/SignalDroppedRep.hpp
+++ b/ndb/include/kernel/signaldata/SignalDroppedRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SrFragidConf.hpp b/ndb/include/kernel/signaldata/SrFragidConf.hpp
index 9a6088ad57f..e534378779e 100644
--- a/ndb/include/kernel/signaldata/SrFragidConf.hpp
+++ b/ndb/include/kernel/signaldata/SrFragidConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StartFragReq.hpp b/ndb/include/kernel/signaldata/StartFragReq.hpp
index ab17a147195..884bc904bcd 100644
--- a/ndb/include/kernel/signaldata/StartFragReq.hpp
+++ b/ndb/include/kernel/signaldata/StartFragReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StartInfo.hpp b/ndb/include/kernel/signaldata/StartInfo.hpp
index d0850b13ef4..733082cae1e 100644
--- a/ndb/include/kernel/signaldata/StartInfo.hpp
+++ b/ndb/include/kernel/signaldata/StartInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StartMe.hpp b/ndb/include/kernel/signaldata/StartMe.hpp
index 6593a9e9741..56b20efe951 100644
--- a/ndb/include/kernel/signaldata/StartMe.hpp
+++ b/ndb/include/kernel/signaldata/StartMe.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StartOrd.hpp b/ndb/include/kernel/signaldata/StartOrd.hpp
index 43a48f70ba9..03092719629 100644
--- a/ndb/include/kernel/signaldata/StartOrd.hpp
+++ b/ndb/include/kernel/signaldata/StartOrd.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StartPerm.hpp b/ndb/include/kernel/signaldata/StartPerm.hpp
index 63e01ed3868..ffb16bfec9d 100644
--- a/ndb/include/kernel/signaldata/StartPerm.hpp
+++ b/ndb/include/kernel/signaldata/StartPerm.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StartRec.hpp b/ndb/include/kernel/signaldata/StartRec.hpp
index f8a4e01a094..24367c541ab 100644
--- a/ndb/include/kernel/signaldata/StartRec.hpp
+++ b/ndb/include/kernel/signaldata/StartRec.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StartTo.hpp b/ndb/include/kernel/signaldata/StartTo.hpp
index 5aecef6275d..f8ac256e98f 100644
--- a/ndb/include/kernel/signaldata/StartTo.hpp
+++ b/ndb/include/kernel/signaldata/StartTo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StopMe.hpp b/ndb/include/kernel/signaldata/StopMe.hpp
index 51d944a3b96..98531bffa00 100644
--- a/ndb/include/kernel/signaldata/StopMe.hpp
+++ b/ndb/include/kernel/signaldata/StopMe.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StopPerm.hpp b/ndb/include/kernel/signaldata/StopPerm.hpp
index 95fb82c8cde..145a120646a 100644
--- a/ndb/include/kernel/signaldata/StopPerm.hpp
+++ b/ndb/include/kernel/signaldata/StopPerm.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/StopReq.hpp b/ndb/include/kernel/signaldata/StopReq.hpp
index 70e195961ce..a065f528735 100644
--- a/ndb/include/kernel/signaldata/StopReq.hpp
+++ b/ndb/include/kernel/signaldata/StopReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SumaImpl.hpp b/ndb/include/kernel/signaldata/SumaImpl.hpp
index 75fb65e1ad2..8420de02899 100644
--- a/ndb/include/kernel/signaldata/SumaImpl.hpp
+++ b/ndb/include/kernel/signaldata/SumaImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/SystemError.hpp b/ndb/include/kernel/signaldata/SystemError.hpp
index c2c51e88bf2..e12499f6c8d 100644
--- a/ndb/include/kernel/signaldata/SystemError.hpp
+++ b/ndb/include/kernel/signaldata/SystemError.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TamperOrd.hpp b/ndb/include/kernel/signaldata/TamperOrd.hpp
index eb6cd47b093..34831704166 100644
--- a/ndb/include/kernel/signaldata/TamperOrd.hpp
+++ b/ndb/include/kernel/signaldata/TamperOrd.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcCommit.hpp b/ndb/include/kernel/signaldata/TcCommit.hpp
index dcbca0cb6f2..f0234e22ccf 100644
--- a/ndb/include/kernel/signaldata/TcCommit.hpp
+++ b/ndb/include/kernel/signaldata/TcCommit.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcContinueB.hpp b/ndb/include/kernel/signaldata/TcContinueB.hpp
index b87b982e49b..b21b4bb4e46 100644
--- a/ndb/include/kernel/signaldata/TcContinueB.hpp
+++ b/ndb/include/kernel/signaldata/TcContinueB.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcHbRep.hpp b/ndb/include/kernel/signaldata/TcHbRep.hpp
index 7e701b510f9..da3b8d583d3 100644
--- a/ndb/include/kernel/signaldata/TcHbRep.hpp
+++ b/ndb/include/kernel/signaldata/TcHbRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcIndx.hpp b/ndb/include/kernel/signaldata/TcIndx.hpp
index c5e7d2489ba..4dc54e9b188 100644
--- a/ndb/include/kernel/signaldata/TcIndx.hpp
+++ b/ndb/include/kernel/signaldata/TcIndx.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcKeyConf.hpp b/ndb/include/kernel/signaldata/TcKeyConf.hpp
index c23e94951dc..b8562875ef5 100644
--- a/ndb/include/kernel/signaldata/TcKeyConf.hpp
+++ b/ndb/include/kernel/signaldata/TcKeyConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcKeyFailConf.hpp b/ndb/include/kernel/signaldata/TcKeyFailConf.hpp
index 7c0a766df40..076f4f22a51 100644
--- a/ndb/include/kernel/signaldata/TcKeyFailConf.hpp
+++ b/ndb/include/kernel/signaldata/TcKeyFailConf.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcKeyRef.hpp b/ndb/include/kernel/signaldata/TcKeyRef.hpp
index c773920713a..2846ce3854f 100644
--- a/ndb/include/kernel/signaldata/TcKeyRef.hpp
+++ b/ndb/include/kernel/signaldata/TcKeyRef.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcKeyReq.hpp b/ndb/include/kernel/signaldata/TcKeyReq.hpp
index f611d2c1567..bd2677549e4 100644
--- a/ndb/include/kernel/signaldata/TcKeyReq.hpp
+++ b/ndb/include/kernel/signaldata/TcKeyReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcRollbackRep.hpp b/ndb/include/kernel/signaldata/TcRollbackRep.hpp
index febbd4f86b1..3b5e2f3d3cb 100644
--- a/ndb/include/kernel/signaldata/TcRollbackRep.hpp
+++ b/ndb/include/kernel/signaldata/TcRollbackRep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TcSizeAltReq.hpp b/ndb/include/kernel/signaldata/TcSizeAltReq.hpp
index 34eacfe5a93..12bf9b3c72d 100644
--- a/ndb/include/kernel/signaldata/TcSizeAltReq.hpp
+++ b/ndb/include/kernel/signaldata/TcSizeAltReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TestOrd.hpp b/ndb/include/kernel/signaldata/TestOrd.hpp
index 1600df08884..44368a213fe 100644
--- a/ndb/include/kernel/signaldata/TestOrd.hpp
+++ b/ndb/include/kernel/signaldata/TestOrd.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TransIdAI.hpp b/ndb/include/kernel/signaldata/TransIdAI.hpp
index 5beaf6eba4b..a2af9ed89cc 100755
--- a/ndb/include/kernel/signaldata/TransIdAI.hpp
+++ b/ndb/include/kernel/signaldata/TransIdAI.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TrigAttrInfo.hpp b/ndb/include/kernel/signaldata/TrigAttrInfo.hpp
index e2c029b9033..79371258b3d 100644
--- a/ndb/include/kernel/signaldata/TrigAttrInfo.hpp
+++ b/ndb/include/kernel/signaldata/TrigAttrInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TupCommit.hpp b/ndb/include/kernel/signaldata/TupCommit.hpp
index 7c5a7931e6c..976aa590659 100644
--- a/ndb/include/kernel/signaldata/TupCommit.hpp
+++ b/ndb/include/kernel/signaldata/TupCommit.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TupFrag.hpp b/ndb/include/kernel/signaldata/TupFrag.hpp
index c9f2ad5382f..1bb50b86084 100644
--- a/ndb/include/kernel/signaldata/TupFrag.hpp
+++ b/ndb/include/kernel/signaldata/TupFrag.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TupKey.hpp b/ndb/include/kernel/signaldata/TupKey.hpp
index ffd57d81e64..c89f5e74b99 100644
--- a/ndb/include/kernel/signaldata/TupKey.hpp
+++ b/ndb/include/kernel/signaldata/TupKey.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TupSizeAltReq.hpp b/ndb/include/kernel/signaldata/TupSizeAltReq.hpp
index 215493bc188..1fb4eae8f51 100644
--- a/ndb/include/kernel/signaldata/TupSizeAltReq.hpp
+++ b/ndb/include/kernel/signaldata/TupSizeAltReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TuxBound.hpp b/ndb/include/kernel/signaldata/TuxBound.hpp
index 7e12897407b..c0f8fd82038 100644
--- a/ndb/include/kernel/signaldata/TuxBound.hpp
+++ b/ndb/include/kernel/signaldata/TuxBound.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TuxContinueB.hpp b/ndb/include/kernel/signaldata/TuxContinueB.hpp
index 385d85715e2..87ac4d89211 100644
--- a/ndb/include/kernel/signaldata/TuxContinueB.hpp
+++ b/ndb/include/kernel/signaldata/TuxContinueB.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TuxMaint.hpp b/ndb/include/kernel/signaldata/TuxMaint.hpp
index 4518f0531ea..3c758ebc8b6 100644
--- a/ndb/include/kernel/signaldata/TuxMaint.hpp
+++ b/ndb/include/kernel/signaldata/TuxMaint.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp b/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp
index 5d5a0e102ba..bf2314d7159 100644
--- a/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp
+++ b/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/UpdateTo.hpp b/ndb/include/kernel/signaldata/UpdateTo.hpp
index 0fa5f31b6b4..e46fe1c1556 100644
--- a/ndb/include/kernel/signaldata/UpdateTo.hpp
+++ b/ndb/include/kernel/signaldata/UpdateTo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/UpgradeStartup.hpp b/ndb/include/kernel/signaldata/UpgradeStartup.hpp
index 93fef323789..80f6a161e05 100644
--- a/ndb/include/kernel/signaldata/UpgradeStartup.hpp
+++ b/ndb/include/kernel/signaldata/UpgradeStartup.hpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef NDB_UPGRADE_STARTUP
#define NDB_UPGRADE_STARTUP
diff --git a/ndb/include/kernel/signaldata/UtilDelete.hpp b/ndb/include/kernel/signaldata/UtilDelete.hpp
index 67c13b8c2d5..fb5c0ece0fd 100644
--- a/ndb/include/kernel/signaldata/UtilDelete.hpp
+++ b/ndb/include/kernel/signaldata/UtilDelete.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/UtilExecute.hpp b/ndb/include/kernel/signaldata/UtilExecute.hpp
index 551fb172cac..172fe4302b3 100644
--- a/ndb/include/kernel/signaldata/UtilExecute.hpp
+++ b/ndb/include/kernel/signaldata/UtilExecute.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/UtilLock.hpp b/ndb/include/kernel/signaldata/UtilLock.hpp
index 318024fd706..75a697714f0 100644
--- a/ndb/include/kernel/signaldata/UtilLock.hpp
+++ b/ndb/include/kernel/signaldata/UtilLock.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/UtilPrepare.hpp b/ndb/include/kernel/signaldata/UtilPrepare.hpp
index 8508487ce15..4de9e61f699 100644
--- a/ndb/include/kernel/signaldata/UtilPrepare.hpp
+++ b/ndb/include/kernel/signaldata/UtilPrepare.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/UtilRelease.hpp b/ndb/include/kernel/signaldata/UtilRelease.hpp
index d2864f02f47..97623670399 100644
--- a/ndb/include/kernel/signaldata/UtilRelease.hpp
+++ b/ndb/include/kernel/signaldata/UtilRelease.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/UtilSequence.hpp b/ndb/include/kernel/signaldata/UtilSequence.hpp
index 50e5d673e99..b24a6f83b7d 100644
--- a/ndb/include/kernel/signaldata/UtilSequence.hpp
+++ b/ndb/include/kernel/signaldata/UtilSequence.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/signaldata/WaitGCP.hpp b/ndb/include/kernel/signaldata/WaitGCP.hpp
index be2a5b9d5f0..7e62debdf18 100644
--- a/ndb/include/kernel/signaldata/WaitGCP.hpp
+++ b/ndb/include/kernel/signaldata/WaitGCP.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/kernel/trigger_definitions.h b/ndb/include/kernel/trigger_definitions.h
index 11410654a15..05d0e871f76 100644
--- a/ndb/include/kernel/trigger_definitions.h
+++ b/ndb/include/kernel/trigger_definitions.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/logger/ConsoleLogHandler.hpp b/ndb/include/logger/ConsoleLogHandler.hpp
index ae77b13d3b7..cfcb598fb5e 100644
--- a/ndb/include/logger/ConsoleLogHandler.hpp
+++ b/ndb/include/logger/ConsoleLogHandler.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/logger/FileLogHandler.hpp b/ndb/include/logger/FileLogHandler.hpp
index 8fb25e72be7..36a35399ac8 100644
--- a/ndb/include/logger/FileLogHandler.hpp
+++ b/ndb/include/logger/FileLogHandler.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -102,7 +101,7 @@ private:
bool setMaxFiles(const BaseString &files);
int m_maxNoFiles;
- long m_maxFileSize;
+ off_t m_maxFileSize;
unsigned int m_maxLogEntries;
File_class* m_pLogFile;
};
diff --git a/ndb/include/logger/LogHandler.hpp b/ndb/include/logger/LogHandler.hpp
index efb87bb3104..98809280d0c 100644
--- a/ndb/include/logger/LogHandler.hpp
+++ b/ndb/include/logger/LogHandler.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/logger/Logger.hpp b/ndb/include/logger/Logger.hpp
index 3414468d42d..c4ce1870c6f 100644
--- a/ndb/include/logger/Logger.hpp
+++ b/ndb/include/logger/Logger.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/logger/SysLogHandler.hpp b/ndb/include/logger/SysLogHandler.hpp
index 0dfc1cb2d43..e2d4af54e7a 100644
--- a/ndb/include/logger/SysLogHandler.hpp
+++ b/ndb/include/logger/SysLogHandler.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h
index d80e923a16e..2423048f98f 100644
--- a/ndb/include/mgmapi/mgmapi.h
+++ b/ndb/include/mgmapi/mgmapi.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -542,6 +541,16 @@ extern "C" {
const char *ndb_mgm_get_connectstring(NdbMgmHandle handle, char *buf, int buf_sz);
/**
+ * Sets the number of seconds to wait for connect(2) during ndb_mgm_connect
+ * Default is no timeout
+ *
+ * @param handle NdbMgmHandle
+ * @param seconds number of seconds
+ * @return non-zero on success
+ */
+ int ndb_mgm_set_connect_timeout(NdbMgmHandle handle, unsigned int seconds);
+
+ /**
* Connects to a management server. Connectstring is set by
* ndb_mgm_set_connectstring().
*
diff --git a/ndb/include/mgmapi/mgmapi_config_parameters.h b/ndb/include/mgmapi/mgmapi_config_parameters.h
index 410c811213b..dc15dfba548 100644
--- a/ndb/include/mgmapi/mgmapi_config_parameters.h
+++ b/ndb/include/mgmapi/mgmapi_config_parameters.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004-2006 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef MGMAPI_CONFIG_PARAMTERS_H
#define MGMAPI_CONFIG_PARAMTERS_H
diff --git a/ndb/include/mgmapi/mgmapi_config_parameters_debug.h b/ndb/include/mgmapi/mgmapi_config_parameters_debug.h
index 0241dca90ef..20e10fb52db 100644
--- a/ndb/include/mgmapi/mgmapi_config_parameters_debug.h
+++ b/ndb/include/mgmapi/mgmapi_config_parameters_debug.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef MGMAPI_CONFIG_PARAMTERS_DEBUG_H
#define MGMAPI_CONFIG_PARAMTERS_DEBUG_H
diff --git a/ndb/include/mgmapi/mgmapi_debug.h b/ndb/include/mgmapi/mgmapi_debug.h
index e86d9d4b768..b881cf4ca98 100644
--- a/ndb/include/mgmapi/mgmapi_debug.h
+++ b/ndb/include/mgmapi/mgmapi_debug.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/mgmapi/ndb_logevent.h b/ndb/include/mgmapi/ndb_logevent.h
index d57646c14db..76e4c31baa2 100644
--- a/ndb/include/mgmapi/ndb_logevent.h
+++ b/ndb/include/mgmapi/ndb_logevent.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/mgmapi/ndbd_exit_codes.h b/ndb/include/mgmapi/ndbd_exit_codes.h
index 66c736181f0..874bf0aa253 100644
--- a/ndb/include/mgmapi/ndbd_exit_codes.h
+++ b/ndb/include/mgmapi/ndbd_exit_codes.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/mgmcommon/ConfigRetriever.hpp b/ndb/include/mgmcommon/ConfigRetriever.hpp
index 89a1eb976c8..221e24d0572 100644
--- a/ndb/include/mgmcommon/ConfigRetriever.hpp
+++ b/ndb/include/mgmcommon/ConfigRetriever.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/mgmcommon/IPCConfig.hpp b/ndb/include/mgmcommon/IPCConfig.hpp
index 1e23cdf9807..8e8b99eda73 100644
--- a/ndb/include/mgmcommon/IPCConfig.hpp
+++ b/ndb/include/mgmcommon/IPCConfig.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/mgmcommon/MgmtErrorReporter.hpp b/ndb/include/mgmcommon/MgmtErrorReporter.hpp
index 0d980aa7245..2b5f2c9a6fd 100644
--- a/ndb/include/mgmcommon/MgmtErrorReporter.hpp
+++ b/ndb/include/mgmcommon/MgmtErrorReporter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndb_constants.h b/ndb/include/ndb_constants.h
index c292880749b..e4f46926498 100644
--- a/ndb/include/ndb_constants.h
+++ b/ndb/include/ndb_constants.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndb_global.h.in b/ndb/include/ndb_global.h.in
index f1eed73f71a..4e400e75fa5 100644
--- a/ndb/include/ndb_global.h.in
+++ b/ndb/include/ndb_global.h.in
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndb_init.h b/ndb/include/ndb_init.h
index 0ff53e6a2af..02db89adac4 100644
--- a/ndb/include/ndb_init.h
+++ b/ndb/include/ndb_init.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndb_net.h b/ndb/include/ndb_net.h
index 279beb471a7..3bb63f7e432 100644
--- a/ndb/include/ndb_net.h
+++ b/ndb/include/ndb_net.h
@@ -1,3 +1,17 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef NDBNET_H
#define NDBNET_H
diff --git a/ndb/include/ndb_types.h.in b/ndb/include/ndb_types.h.in
index 2a5d576ffea..02db659e961 100644
--- a/ndb/include/ndb_types.h.in
+++ b/ndb/include/ndb_types.h.in
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndb_version.h.in b/ndb/include/ndb_version.h.in
index b60ea3bba68..ce07b03cd7f 100644
--- a/ndb/include/ndb_version.h.in
+++ b/ndb/include/ndb_version.h.in
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index e7c1e85c02a..516333d1834 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbApi.hpp b/ndb/include/ndbapi/NdbApi.hpp
index c8400ed78ce..c54df196d13 100644
--- a/ndb/include/ndbapi/NdbApi.hpp
+++ b/ndb/include/ndbapi/NdbApi.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbBlob.hpp b/ndb/include/ndbapi/NdbBlob.hpp
index 6d2c493d1ed..7d06e714d66 100644
--- a/ndb/include/ndbapi/NdbBlob.hpp
+++ b/ndb/include/ndbapi/NdbBlob.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp
index db84c3715a5..3e87c30d7b2 100644
--- a/ndb/include/ndbapi/NdbDictionary.hpp
+++ b/ndb/include/ndbapi/NdbDictionary.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbError.hpp b/ndb/include/ndbapi/NdbError.hpp
index f67b3c4ccaa..6b03714adb2 100644
--- a/ndb/include/ndbapi/NdbError.hpp
+++ b/ndb/include/ndbapi/NdbError.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbEventOperation.hpp b/ndb/include/ndbapi/NdbEventOperation.hpp
index 55ee96b3144..ce146eeede3 100644
--- a/ndb/include/ndbapi/NdbEventOperation.hpp
+++ b/ndb/include/ndbapi/NdbEventOperation.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbIndexOperation.hpp b/ndb/include/ndbapi/NdbIndexOperation.hpp
index d16cd071f77..0f06d8041ee 100644
--- a/ndb/include/ndbapi/NdbIndexOperation.hpp
+++ b/ndb/include/ndbapi/NdbIndexOperation.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbIndexScanOperation.hpp b/ndb/include/ndbapi/NdbIndexScanOperation.hpp
index 7ef66f9a30b..550f4201b71 100644
--- a/ndb/include/ndbapi/NdbIndexScanOperation.hpp
+++ b/ndb/include/ndbapi/NdbIndexScanOperation.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp
index dbc343d2238..5e9e6b9bde9 100644
--- a/ndb/include/ndbapi/NdbOperation.hpp
+++ b/ndb/include/ndbapi/NdbOperation.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbPool.hpp b/ndb/include/ndbapi/NdbPool.hpp
index 64cba5a008c..1963bf26448 100644
--- a/ndb/include/ndbapi/NdbPool.hpp
+++ b/ndb/include/ndbapi/NdbPool.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbRecAttr.hpp b/ndb/include/ndbapi/NdbRecAttr.hpp
index 3607a64f3b3..df7f22fef60 100644
--- a/ndb/include/ndbapi/NdbRecAttr.hpp
+++ b/ndb/include/ndbapi/NdbRecAttr.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbReceiver.hpp b/ndb/include/ndbapi/NdbReceiver.hpp
index ff6debc7fd3..73bf5c66863 100644
--- a/ndb/include/ndbapi/NdbReceiver.hpp
+++ b/ndb/include/ndbapi/NdbReceiver.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbScanFilter.hpp b/ndb/include/ndbapi/NdbScanFilter.hpp
index b5457bab99b..1ef62558560 100644
--- a/ndb/include/ndbapi/NdbScanFilter.hpp
+++ b/ndb/include/ndbapi/NdbScanFilter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbScanOperation.hpp b/ndb/include/ndbapi/NdbScanOperation.hpp
index beaf9402b77..749c91ab765 100644
--- a/ndb/include/ndbapi/NdbScanOperation.hpp
+++ b/ndb/include/ndbapi/NdbScanOperation.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/NdbTransaction.hpp b/ndb/include/ndbapi/NdbTransaction.hpp
index de4db785fb3..1a9c7158adf 100644
--- a/ndb/include/ndbapi/NdbTransaction.hpp
+++ b/ndb/include/ndbapi/NdbTransaction.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/ndb_cluster_connection.hpp b/ndb/include/ndbapi/ndb_cluster_connection.hpp
index fcce53c90a0..5c6818fad11 100644
--- a/ndb/include/ndbapi/ndb_cluster_connection.hpp
+++ b/ndb/include/ndbapi/ndb_cluster_connection.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/ndb_opt_defaults.h b/ndb/include/ndbapi/ndb_opt_defaults.h
index d03a9dcc36f..f29e2cb40d5 100644
--- a/ndb/include/ndbapi/ndb_opt_defaults.h
+++ b/ndb/include/ndbapi/ndb_opt_defaults.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/ndbapi_limits.h b/ndb/include/ndbapi/ndbapi_limits.h
index 5c4db71b747..63399e4bd0a 100644
--- a/ndb/include/ndbapi/ndbapi_limits.h
+++ b/ndb/include/ndbapi/ndbapi_limits.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/ndbapi/ndberror.h b/ndb/include/ndbapi/ndberror.h
index 2225f68f08d..cb5a2bc27dc 100644
--- a/ndb/include/ndbapi/ndberror.h
+++ b/ndb/include/ndbapi/ndberror.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -93,7 +92,7 @@ typedef ndberror_classification_enum ndberror_classification;
const char *ndberror_status_message(ndberror_status);
const char *ndberror_classification_message(ndberror_classification);
void ndberror_update(ndberror_struct *);
-int ndb_error_string(int err_no, char *str, unsigned int size);
+int ndb_error_string(int err_no, char *str, int size);
#endif /* doxygen skip internal*/
diff --git a/ndb/include/newtonapi/dba.h b/ndb/include/newtonapi/dba.h
index 4cfc0ec8eb9..b0231378a2b 100644
--- a/ndb/include/newtonapi/dba.h
+++ b/ndb/include/newtonapi/dba.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/newtonapi/defs/pcn_types.h b/ndb/include/newtonapi/defs/pcn_types.h
index eae6c67899d..9e8b2285023 100644
--- a/ndb/include/newtonapi/defs/pcn_types.h
+++ b/ndb/include/newtonapi/defs/pcn_types.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbCondition.h b/ndb/include/portlib/NdbCondition.h
index 3d959a0db41..dbc35b0b4ab 100644
--- a/ndb/include/portlib/NdbCondition.h
+++ b/ndb/include/portlib/NdbCondition.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbConfig.h b/ndb/include/portlib/NdbConfig.h
index 1bca825ab8d..2b6c931da72 100644
--- a/ndb/include/portlib/NdbConfig.h
+++ b/ndb/include/portlib/NdbConfig.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbDaemon.h b/ndb/include/portlib/NdbDaemon.h
index 74ea3f06419..b6e39321e38 100644
--- a/ndb/include/portlib/NdbDaemon.h
+++ b/ndb/include/portlib/NdbDaemon.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbEnv.h b/ndb/include/portlib/NdbEnv.h
index 1611bf3152e..c6590264e23 100644
--- a/ndb/include/portlib/NdbEnv.h
+++ b/ndb/include/portlib/NdbEnv.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbHost.h b/ndb/include/portlib/NdbHost.h
index 90e7b781137..5464a024a62 100644
--- a/ndb/include/portlib/NdbHost.h
+++ b/ndb/include/portlib/NdbHost.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbMain.h b/ndb/include/portlib/NdbMain.h
index 7cc7a877750..c0211c2ea43 100644
--- a/ndb/include/portlib/NdbMain.h
+++ b/ndb/include/portlib/NdbMain.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbMem.h b/ndb/include/portlib/NdbMem.h
index 0f2de80200e..d271c976862 100644
--- a/ndb/include/portlib/NdbMem.h
+++ b/ndb/include/portlib/NdbMem.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -66,7 +65,7 @@ void NdbMem_Free(void* ptr);
* NdbMem_MemLockAll
* Locks virtual memory in main memory
*/
-int NdbMem_MemLockAll(void);
+int NdbMem_MemLockAll(int);
/**
* NdbMem_MemUnlockAll
diff --git a/ndb/include/portlib/NdbMutex.h b/ndb/include/portlib/NdbMutex.h
index b0b985ecef5..8f3d768c6c8 100644
--- a/ndb/include/portlib/NdbMutex.h
+++ b/ndb/include/portlib/NdbMutex.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbSleep.h b/ndb/include/portlib/NdbSleep.h
index 3b26710154f..a17f3e6a8b0 100644
--- a/ndb/include/portlib/NdbSleep.h
+++ b/ndb/include/portlib/NdbSleep.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbTCP.h b/ndb/include/portlib/NdbTCP.h
index 9ed5b5e7f96..c81e3ec499c 100644
--- a/ndb/include/portlib/NdbTCP.h
+++ b/ndb/include/portlib/NdbTCP.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbThread.h b/ndb/include/portlib/NdbThread.h
index e86deee4354..144abaa87d7 100644
--- a/ndb/include/portlib/NdbThread.h
+++ b/ndb/include/portlib/NdbThread.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/NdbTick.h b/ndb/include/portlib/NdbTick.h
index 9bd8eca22bd..b1026a8672d 100644
--- a/ndb/include/portlib/NdbTick.h
+++ b/ndb/include/portlib/NdbTick.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/PortDefs.h b/ndb/include/portlib/PortDefs.h
index a115c60cfe1..87b87b497a2 100644
--- a/ndb/include/portlib/PortDefs.h
+++ b/ndb/include/portlib/PortDefs.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/portlib/prefetch.h b/ndb/include/portlib/prefetch.h
index 729c80bd93e..f098c2ba6c0 100644
--- a/ndb/include/portlib/prefetch.h
+++ b/ndb/include/portlib/prefetch.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/transporter/TransporterCallback.hpp b/ndb/include/transporter/TransporterCallback.hpp
index ef9be8c5a69..076d0de44c0 100644
--- a/ndb/include/transporter/TransporterCallback.hpp
+++ b/ndb/include/transporter/TransporterCallback.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/transporter/TransporterDefinitions.hpp b/ndb/include/transporter/TransporterDefinitions.hpp
index e9c5ffa2c80..c1fe7619fb9 100644
--- a/ndb/include/transporter/TransporterDefinitions.hpp
+++ b/ndb/include/transporter/TransporterDefinitions.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/transporter/TransporterRegistry.hpp b/ndb/include/transporter/TransporterRegistry.hpp
index 0bb9733e8c4..0070c49baaf 100644
--- a/ndb/include/transporter/TransporterRegistry.hpp
+++ b/ndb/include/transporter/TransporterRegistry.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/BaseString.hpp b/ndb/include/util/BaseString.hpp
index 02a6a3b3e66..44e1e4614be 100644
--- a/ndb/include/util/BaseString.hpp
+++ b/ndb/include/util/BaseString.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/Bitmask.hpp b/ndb/include/util/Bitmask.hpp
index 7957bf7a48d..3b3fe721cca 100644
--- a/ndb/include/util/Bitmask.hpp
+++ b/ndb/include/util/Bitmask.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/ConfigValues.hpp b/ndb/include/util/ConfigValues.hpp
index 8dfb3c83df3..af8e2d400cd 100644
--- a/ndb/include/util/ConfigValues.hpp
+++ b/ndb/include/util/ConfigValues.hpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004-2006 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef __CONFIG_VALUES_HPP
#define __CONFIG_VALUES_HPP
diff --git a/ndb/include/util/File.hpp b/ndb/include/util/File.hpp
index fc71394c8c5..b9d348683ec 100644
--- a/ndb/include/util/File.hpp
+++ b/ndb/include/util/File.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -50,7 +49,7 @@ public:
* @param f a pointer to a FILE descriptor.
* @return the size of the file.
*/
- static long size(FILE* f);
+ static off_t size(FILE* f);
/**
* Renames a file.
@@ -182,7 +181,7 @@ public:
*
* @return the file size.
*/
- long size() const;
+ off_t size() const;
/**
* Returns the filename.
diff --git a/ndb/include/util/InputStream.hpp b/ndb/include/util/InputStream.hpp
index 56c43686df1..41d58dfe1e9 100644
--- a/ndb/include/util/InputStream.hpp
+++ b/ndb/include/util/InputStream.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/NdbAutoPtr.hpp b/ndb/include/util/NdbAutoPtr.hpp
index ff747e3de68..5210fbc6dde 100644
--- a/ndb/include/util/NdbAutoPtr.hpp
+++ b/ndb/include/util/NdbAutoPtr.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/NdbOut.hpp b/ndb/include/util/NdbOut.hpp
index d85d5cc6305..29f15dac8d5 100644
--- a/ndb/include/util/NdbOut.hpp
+++ b/ndb/include/util/NdbOut.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp
index ff2d9766f81..8d063f1908b 100644
--- a/ndb/include/util/NdbSqlUtil.hpp
+++ b/ndb/include/util/NdbSqlUtil.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/OutputStream.hpp b/ndb/include/util/OutputStream.hpp
index a834b577bb3..460915e12e7 100644
--- a/ndb/include/util/OutputStream.hpp
+++ b/ndb/include/util/OutputStream.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/Parser.hpp b/ndb/include/util/Parser.hpp
index 3baf7601a6c..3188e447afd 100644
--- a/ndb/include/util/Parser.hpp
+++ b/ndb/include/util/Parser.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/Properties.hpp b/ndb/include/util/Properties.hpp
index e6668744211..3533d710662 100644
--- a/ndb/include/util/Properties.hpp
+++ b/ndb/include/util/Properties.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/SimpleProperties.hpp b/ndb/include/util/SimpleProperties.hpp
index b29e65e21da..0993c272b47 100644
--- a/ndb/include/util/SimpleProperties.hpp
+++ b/ndb/include/util/SimpleProperties.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/SocketAuthenticator.hpp b/ndb/include/util/SocketAuthenticator.hpp
index 1b82567feaa..a9ab1869ebc 100644
--- a/ndb/include/util/SocketAuthenticator.hpp
+++ b/ndb/include/util/SocketAuthenticator.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/SocketClient.hpp b/ndb/include/util/SocketClient.hpp
index 422560c8a78..bb8d9b9ac41 100644
--- a/ndb/include/util/SocketClient.hpp
+++ b/ndb/include/util/SocketClient.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,6 +23,7 @@ class SocketClient
{
NDB_SOCKET_TYPE m_sockfd;
struct sockaddr_in m_servaddr;
+ unsigned int m_connect_timeout_sec;
unsigned short m_port;
char *m_server_name;
SocketAuthenticator *m_auth;
@@ -35,6 +35,9 @@ public:
m_port = port;
m_servaddr.sin_port = htons(m_port);
};
+ void set_connect_timeout(unsigned int s) {
+ m_connect_timeout_sec= s;
+ }
unsigned short get_port() { return m_port; };
char *get_server_name() { return m_server_name; };
int bind(const char* toaddress, unsigned short toport);
diff --git a/ndb/include/util/SocketServer.hpp b/ndb/include/util/SocketServer.hpp
index ea709bfecae..eebfaec5831 100644
--- a/ndb/include/util/SocketServer.hpp
+++ b/ndb/include/util/SocketServer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/UtilBuffer.hpp b/ndb/include/util/UtilBuffer.hpp
index ba1f47b93d8..537d901d9bb 100644
--- a/ndb/include/util/UtilBuffer.hpp
+++ b/ndb/include/util/UtilBuffer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/Vector.hpp b/ndb/include/util/Vector.hpp
index 480dddf8243..aeddbbb22f0 100644
--- a/ndb/include/util/Vector.hpp
+++ b/ndb/include/util/Vector.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -94,6 +93,8 @@ void
Vector<T>::push_back(const T & t){
if(m_size == m_arraySize){
T * tmp = new T [m_arraySize + m_incSize];
+ if(!tmp)
+ abort();
for (unsigned k = 0; k < m_size; k++)
tmp[k] = m_items[k];
delete[] m_items;
diff --git a/ndb/include/util/basestring_vsnprintf.h b/ndb/include/util/basestring_vsnprintf.h
index 7c804f22841..ade90b3f678 100644
--- a/ndb/include/util/basestring_vsnprintf.h
+++ b/ndb/include/util/basestring_vsnprintf.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/md5_hash.hpp b/ndb/include/util/md5_hash.hpp
index b79dce3b5a9..932d71ee22e 100644
--- a/ndb/include/util/md5_hash.hpp
+++ b/ndb/include/util/md5_hash.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/ndb_opts.h b/ndb/include/util/ndb_opts.h
index 053cc8613f7..d4d07302967 100644
--- a/ndb/include/util/ndb_opts.h
+++ b/ndb/include/util/ndb_opts.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/random.h b/ndb/include/util/random.h
index 1b83e5fec93..b448e9c2b01 100644
--- a/ndb/include/util/random.h
+++ b/ndb/include/util/random.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/socket_io.h b/ndb/include/util/socket_io.h
index a0e6c4e369d..a748515031d 100644
--- a/ndb/include/util/socket_io.h
+++ b/ndb/include/util/socket_io.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/uucode.h b/ndb/include/util/uucode.h
index f5569d033a5..3c10888a395 100644
--- a/ndb/include/util/uucode.h
+++ b/ndb/include/util/uucode.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/include/util/version.h b/ndb/include/util/version.h
index 62dc07d905a..42513d00442 100644
--- a/ndb/include/util/version.h
+++ b/ndb/include/util/version.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/mgmapi_logevent_example/mgmapi_logevent.cpp b/ndb/ndbapi-examples/mgmapi_logevent_example/mgmapi_logevent.cpp
index 5ec1fba6314..592f7e3acc6 100644
--- a/ndb/ndbapi-examples/mgmapi_logevent_example/mgmapi_logevent.cpp
+++ b/ndb/ndbapi-examples/mgmapi_logevent_example/mgmapi_logevent.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/ndbapi_async_example/ndbapi_async.cpp b/ndb/ndbapi-examples/ndbapi_async_example/ndbapi_async.cpp
index aa745f4d28d..31377ae08e8 100644
--- a/ndb/ndbapi-examples/ndbapi_async_example/ndbapi_async.cpp
+++ b/ndb/ndbapi-examples/ndbapi_async_example/ndbapi_async.cpp
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/ndbapi_async_example1/ndbapi_async1.cpp b/ndb/ndbapi-examples/ndbapi_async_example1/ndbapi_async1.cpp
index e8bc19e267b..9a1c56a9808 100644
--- a/ndb/ndbapi-examples/ndbapi_async_example1/ndbapi_async1.cpp
+++ b/ndb/ndbapi-examples/ndbapi_async_example1/ndbapi_async1.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/ndbapi_event_example/ndbapi_event.cpp b/ndb/ndbapi-examples/ndbapi_event_example/ndbapi_event.cpp
index 286f6fafbab..1e1c3e9ea21 100644
--- a/ndb/ndbapi-examples/ndbapi_event_example/ndbapi_event.cpp
+++ b/ndb/ndbapi-examples/ndbapi_event_example/ndbapi_event.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/ndbapi_retries_example/ndbapi_retries.cpp b/ndb/ndbapi-examples/ndbapi_retries_example/ndbapi_retries.cpp
index 8c29fe31446..b76075a0cb7 100644
--- a/ndb/ndbapi-examples/ndbapi_retries_example/ndbapi_retries.cpp
+++ b/ndb/ndbapi-examples/ndbapi_retries_example/ndbapi_retries.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/ndbapi_scan_example/ndbapi_scan.cpp b/ndb/ndbapi-examples/ndbapi_scan_example/ndbapi_scan.cpp
index 69ffd99b8ca..1e3fa131d0e 100644
--- a/ndb/ndbapi-examples/ndbapi_scan_example/ndbapi_scan.cpp
+++ b/ndb/ndbapi-examples/ndbapi_scan_example/ndbapi_scan.cpp
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/ndbapi_simple_example/ndbapi_simple.cpp b/ndb/ndbapi-examples/ndbapi_simple_example/ndbapi_simple.cpp
index 152d4fa44af..08d6d7ff9ff 100644
--- a/ndb/ndbapi-examples/ndbapi_simple_example/ndbapi_simple.cpp
+++ b/ndb/ndbapi-examples/ndbapi_simple_example/ndbapi_simple.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/ndbapi-examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp b/ndb/ndbapi-examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
index 5afaf6078d1..8a45b5e6867 100644
--- a/ndb/ndbapi-examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
+++ b/ndb/ndbapi-examples/ndbapi_simple_index_example/ndbapi_simple_index.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/Makefile.am b/ndb/src/Makefile.am
index d35790a2e43..32bb98f5c83 100644
--- a/ndb/src/Makefile.am
+++ b/ndb/src/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = common mgmapi ndbapi . kernel mgmclient mgmsrv cw
include $(top_srcdir)/ndb/config/common.mk.am
@@ -31,3 +46,6 @@ libndbclient.dsp: Makefile \
@$(top_srcdir)/ndb/config/win-sources $@ dummy.cpp
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(libndbclient_la_LIBADD)
@touch dummy.cpp
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/src/common/Makefile.am b/ndb/src/common/Makefile.am
index 0059f3fb210..9d601c7a18a 100644
--- a/ndb/src/common/Makefile.am
+++ b/ndb/src/common/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = portlib debugger util logger transporter mgmcommon
noinst_LTLIBRARIES = libcommon.la
@@ -13,3 +28,6 @@ libcommon_la_LIBADD = \
util/libgeneral.la
windoze-dsp:
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/src/common/debugger/BlockNames.cpp b/ndb/src/common/debugger/BlockNames.cpp
index 0c61b6327ef..0f368ab222d 100644
--- a/ndb/src/common/debugger/BlockNames.cpp
+++ b/ndb/src/common/debugger/BlockNames.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/DebuggerNames.cpp b/ndb/src/common/debugger/DebuggerNames.cpp
index 8571b8ece86..ba32ac6e6b8 100644
--- a/ndb/src/common/debugger/DebuggerNames.cpp
+++ b/ndb/src/common/debugger/DebuggerNames.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp
index 8027a6bd347..3efd52808e2 100644
--- a/ndb/src/common/debugger/EventLogger.cpp
+++ b/ndb/src/common/debugger/EventLogger.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -116,7 +115,8 @@ void getTextNDBStopForced(QQQQ) {
int sphase = theData[4];
int extra = theData[5];
getRestartAction(theData[1],action_str);
- reason_str.appfmt(" Initiated by signal %d.", signum);
+ if (signum)
+ reason_str.appfmt(" Initiated by signal %d.", signum);
if (error)
{
ndbd_exit_classification cl;
diff --git a/ndb/src/common/debugger/GrepError.cpp b/ndb/src/common/debugger/GrepError.cpp
index 20aeaa6dd77..091c7da0978 100644
--- a/ndb/src/common/debugger/GrepError.cpp
+++ b/ndb/src/common/debugger/GrepError.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/Makefile.am b/ndb/src/common/debugger/Makefile.am
index e25a11c9bee..9b30e8bc278 100644
--- a/ndb/src/common/debugger/Makefile.am
+++ b/ndb/src/common/debugger/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = signaldata
noinst_LTLIBRARIES = libtrace.la
diff --git a/ndb/src/common/debugger/SignalLoggerManager.cpp b/ndb/src/common/debugger/SignalLoggerManager.cpp
index 67e13dc805a..471bea64f64 100644
--- a/ndb/src/common/debugger/SignalLoggerManager.cpp
+++ b/ndb/src/common/debugger/SignalLoggerManager.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/AccLock.cpp b/ndb/src/common/debugger/signaldata/AccLock.cpp
index affed431957..0b37e1bd0d7 100644
--- a/ndb/src/common/debugger/signaldata/AccLock.cpp
+++ b/ndb/src/common/debugger/signaldata/AccLock.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/AlterIndx.cpp b/ndb/src/common/debugger/signaldata/AlterIndx.cpp
index e1865136fc3..1ac5b7fb3e8 100644
--- a/ndb/src/common/debugger/signaldata/AlterIndx.cpp
+++ b/ndb/src/common/debugger/signaldata/AlterIndx.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/AlterTab.cpp b/ndb/src/common/debugger/signaldata/AlterTab.cpp
index f9521984095..f9b6df1f4c0 100644
--- a/ndb/src/common/debugger/signaldata/AlterTab.cpp
+++ b/ndb/src/common/debugger/signaldata/AlterTab.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/AlterTable.cpp b/ndb/src/common/debugger/signaldata/AlterTable.cpp
index 59909c8e490..8e23bd72db3 100644
--- a/ndb/src/common/debugger/signaldata/AlterTable.cpp
+++ b/ndb/src/common/debugger/signaldata/AlterTable.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/AlterTrig.cpp b/ndb/src/common/debugger/signaldata/AlterTrig.cpp
index d488fd6e348..cdd7ee2fbf2 100644
--- a/ndb/src/common/debugger/signaldata/AlterTrig.cpp
+++ b/ndb/src/common/debugger/signaldata/AlterTrig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/BackupImpl.cpp b/ndb/src/common/debugger/signaldata/BackupImpl.cpp
index 855db0834bc..c419bf2729f 100644
--- a/ndb/src/common/debugger/signaldata/BackupImpl.cpp
+++ b/ndb/src/common/debugger/signaldata/BackupImpl.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/BackupSignalData.cpp b/ndb/src/common/debugger/signaldata/BackupSignalData.cpp
index 7410db44aa3..6f6b21460a8 100644
--- a/ndb/src/common/debugger/signaldata/BackupSignalData.cpp
+++ b/ndb/src/common/debugger/signaldata/BackupSignalData.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp b/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp
index 84410a2b2db..76284517ac7 100644
--- a/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp
+++ b/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/CntrStart.cpp b/ndb/src/common/debugger/signaldata/CntrStart.cpp
index 154013f40b0..813bcef96d6 100644
--- a/ndb/src/common/debugger/signaldata/CntrStart.cpp
+++ b/ndb/src/common/debugger/signaldata/CntrStart.cpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <signaldata/CntrStart.hpp>
bool
diff --git a/ndb/src/common/debugger/signaldata/ContinueB.cpp b/ndb/src/common/debugger/signaldata/ContinueB.cpp
index c295041bc01..cd94abd6f2c 100644
--- a/ndb/src/common/debugger/signaldata/ContinueB.cpp
+++ b/ndb/src/common/debugger/signaldata/ContinueB.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/CopyGCI.cpp b/ndb/src/common/debugger/signaldata/CopyGCI.cpp
index 173b3f6708f..6ea5f422fda 100644
--- a/ndb/src/common/debugger/signaldata/CopyGCI.cpp
+++ b/ndb/src/common/debugger/signaldata/CopyGCI.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/CreateEvnt.cpp b/ndb/src/common/debugger/signaldata/CreateEvnt.cpp
index 7b497d6a974..d957b5039ca 100644
--- a/ndb/src/common/debugger/signaldata/CreateEvnt.cpp
+++ b/ndb/src/common/debugger/signaldata/CreateEvnt.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp b/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp
index 027f743b5ea..5da6fcc2508 100644
--- a/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp
+++ b/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/CreateIndx.cpp b/ndb/src/common/debugger/signaldata/CreateIndx.cpp
index 8fcbb9279ed..a72d51aa4e2 100644
--- a/ndb/src/common/debugger/signaldata/CreateIndx.cpp
+++ b/ndb/src/common/debugger/signaldata/CreateIndx.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/CreateTrig.cpp b/ndb/src/common/debugger/signaldata/CreateTrig.cpp
index db5344cfbe7..14a980ed5f7 100644
--- a/ndb/src/common/debugger/signaldata/CreateTrig.cpp
+++ b/ndb/src/common/debugger/signaldata/CreateTrig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/DictTabInfo.cpp b/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
index a1d8d82474d..66c9c978762 100644
--- a/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
+++ b/ndb/src/common/debugger/signaldata/DictTabInfo.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/DihContinueB.cpp b/ndb/src/common/debugger/signaldata/DihContinueB.cpp
index 9fece17315c..30b15fe7de1 100644
--- a/ndb/src/common/debugger/signaldata/DihContinueB.cpp
+++ b/ndb/src/common/debugger/signaldata/DihContinueB.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp b/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp
index 2e4318f4033..ce8c05b61e0 100644
--- a/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp
+++ b/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/DisconnectRep.cpp b/ndb/src/common/debugger/signaldata/DisconnectRep.cpp
index 3a73747a978..10efb20f393 100644
--- a/ndb/src/common/debugger/signaldata/DisconnectRep.cpp
+++ b/ndb/src/common/debugger/signaldata/DisconnectRep.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/DropIndx.cpp b/ndb/src/common/debugger/signaldata/DropIndx.cpp
index 0d59a981a18..39d0333399e 100644
--- a/ndb/src/common/debugger/signaldata/DropIndx.cpp
+++ b/ndb/src/common/debugger/signaldata/DropIndx.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/DropTab.cpp b/ndb/src/common/debugger/signaldata/DropTab.cpp
index 83c95b0e344..2715239119d 100644
--- a/ndb/src/common/debugger/signaldata/DropTab.cpp
+++ b/ndb/src/common/debugger/signaldata/DropTab.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/DropTrig.cpp b/ndb/src/common/debugger/signaldata/DropTrig.cpp
index 54e8734439f..6e4caae01ab 100644
--- a/ndb/src/common/debugger/signaldata/DropTrig.cpp
+++ b/ndb/src/common/debugger/signaldata/DropTrig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FailRep.cpp b/ndb/src/common/debugger/signaldata/FailRep.cpp
index d70912fe8c7..fa2a431e7c5 100644
--- a/ndb/src/common/debugger/signaldata/FailRep.cpp
+++ b/ndb/src/common/debugger/signaldata/FailRep.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp b/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp
index d86aa2e06de..b1bf52542b7 100644
--- a/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp
+++ b/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FsAppendReq.cpp b/ndb/src/common/debugger/signaldata/FsAppendReq.cpp
index 6e443ffe5fc..a574a83b7ab 100644
--- a/ndb/src/common/debugger/signaldata/FsAppendReq.cpp
+++ b/ndb/src/common/debugger/signaldata/FsAppendReq.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FsCloseReq.cpp b/ndb/src/common/debugger/signaldata/FsCloseReq.cpp
index df9f3cc9fbc..da1f37ddb42 100644
--- a/ndb/src/common/debugger/signaldata/FsCloseReq.cpp
+++ b/ndb/src/common/debugger/signaldata/FsCloseReq.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FsConf.cpp b/ndb/src/common/debugger/signaldata/FsConf.cpp
index f0ab57aadcf..ed9124fcfeb 100644
--- a/ndb/src/common/debugger/signaldata/FsConf.cpp
+++ b/ndb/src/common/debugger/signaldata/FsConf.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FsOpenReq.cpp b/ndb/src/common/debugger/signaldata/FsOpenReq.cpp
index 31d351a8a84..0029be79fdd 100644
--- a/ndb/src/common/debugger/signaldata/FsOpenReq.cpp
+++ b/ndb/src/common/debugger/signaldata/FsOpenReq.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp b/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp
index a9f240d3cb4..cc01fed2178 100644
--- a/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp
+++ b/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/FsRef.cpp b/ndb/src/common/debugger/signaldata/FsRef.cpp
index ff659208d20..3d9eccc9407 100644
--- a/ndb/src/common/debugger/signaldata/FsRef.cpp
+++ b/ndb/src/common/debugger/signaldata/FsRef.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/GCPSave.cpp b/ndb/src/common/debugger/signaldata/GCPSave.cpp
index 7566f004bfd..b1dbb5887dd 100644
--- a/ndb/src/common/debugger/signaldata/GCPSave.cpp
+++ b/ndb/src/common/debugger/signaldata/GCPSave.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp b/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp
index 2ef5feaada7..a4bc3f04c04 100755
--- a/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp
+++ b/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp b/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp
index 6fe5567188d..78e3a98f6ce 100755
--- a/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp
+++ b/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/LCP.cpp b/ndb/src/common/debugger/signaldata/LCP.cpp
index 6b4bb13e2cd..946c43c8d7e 100644
--- a/ndb/src/common/debugger/signaldata/LCP.cpp
+++ b/ndb/src/common/debugger/signaldata/LCP.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/LqhFrag.cpp b/ndb/src/common/debugger/signaldata/LqhFrag.cpp
index 3175582c3a2..0d7a2cf1e4d 100644
--- a/ndb/src/common/debugger/signaldata/LqhFrag.cpp
+++ b/ndb/src/common/debugger/signaldata/LqhFrag.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/LqhKey.cpp b/ndb/src/common/debugger/signaldata/LqhKey.cpp
index 2796437fd8b..235aa870ac7 100644
--- a/ndb/src/common/debugger/signaldata/LqhKey.cpp
+++ b/ndb/src/common/debugger/signaldata/LqhKey.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/LqhTrans.cpp b/ndb/src/common/debugger/signaldata/LqhTrans.cpp
index 8282530cae6..f413ccc6311 100644
--- a/ndb/src/common/debugger/signaldata/LqhTrans.cpp
+++ b/ndb/src/common/debugger/signaldata/LqhTrans.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/Makefile.am b/ndb/src/common/debugger/signaldata/Makefile.am
index 9146d552568..7d58399a66e 100644
--- a/ndb/src/common/debugger/signaldata/Makefile.am
+++ b/ndb/src/common/debugger/signaldata/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LTLIBRARIES = libsignaldataprint.la
diff --git a/ndb/src/common/debugger/signaldata/MasterLCP.cpp b/ndb/src/common/debugger/signaldata/MasterLCP.cpp
index 078b92f6f2e..620695a91a4 100644
--- a/ndb/src/common/debugger/signaldata/MasterLCP.cpp
+++ b/ndb/src/common/debugger/signaldata/MasterLCP.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp b/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp
index f2d6f2f104a..800dc074aa7 100644
--- a/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp
+++ b/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/NdbSttor.cpp b/ndb/src/common/debugger/signaldata/NdbSttor.cpp
index 9fd081313be..3a67e2e7806 100644
--- a/ndb/src/common/debugger/signaldata/NdbSttor.cpp
+++ b/ndb/src/common/debugger/signaldata/NdbSttor.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp b/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp
index 9f55efae017..cd592533638 100644
--- a/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp
+++ b/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/PackedSignal.cpp b/ndb/src/common/debugger/signaldata/PackedSignal.cpp
index f0f7aee74e4..54048bcbb35 100644
--- a/ndb/src/common/debugger/signaldata/PackedSignal.cpp
+++ b/ndb/src/common/debugger/signaldata/PackedSignal.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/PrepDropTab.cpp b/ndb/src/common/debugger/signaldata/PrepDropTab.cpp
index 59001bcd6f6..112b92f3fcc 100644
--- a/ndb/src/common/debugger/signaldata/PrepDropTab.cpp
+++ b/ndb/src/common/debugger/signaldata/PrepDropTab.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp b/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp
index 2e900de8f70..cea7c65485d 100644
--- a/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp
+++ b/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp b/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp
index 103f4a884f1..d8f8344ea95 100644
--- a/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp
+++ b/ndb/src/common/debugger/signaldata/ReadNodesConf.cpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <signaldata/ReadNodesConf.hpp>
bool
diff --git a/ndb/src/common/debugger/signaldata/ScanFrag.cpp b/ndb/src/common/debugger/signaldata/ScanFrag.cpp
index 4d19a325637..de05426d40b 100644
--- a/ndb/src/common/debugger/signaldata/ScanFrag.cpp
+++ b/ndb/src/common/debugger/signaldata/ScanFrag.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/ScanTab.cpp b/ndb/src/common/debugger/signaldata/ScanTab.cpp
index d78beb4740a..39589542800 100644
--- a/ndb/src/common/debugger/signaldata/ScanTab.cpp
+++ b/ndb/src/common/debugger/signaldata/ScanTab.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp b/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp
index 572d8f6e3ca..0194f15457f 100644
--- a/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp
+++ b/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp b/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp
index be31b4edb22..e812efc85a6 100644
--- a/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp
+++ b/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/SignalNames.cpp b/ndb/src/common/debugger/signaldata/SignalNames.cpp
index ecc9fc83153..9839fd32cf2 100644
--- a/ndb/src/common/debugger/signaldata/SignalNames.cpp
+++ b/ndb/src/common/debugger/signaldata/SignalNames.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/StartRec.cpp b/ndb/src/common/debugger/signaldata/StartRec.cpp
index 54830e533c5..69054528d95 100644
--- a/ndb/src/common/debugger/signaldata/StartRec.cpp
+++ b/ndb/src/common/debugger/signaldata/StartRec.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/SumaImpl.cpp b/ndb/src/common/debugger/signaldata/SumaImpl.cpp
index e50a3040fe3..3af825dbefb 100644
--- a/ndb/src/common/debugger/signaldata/SumaImpl.cpp
+++ b/ndb/src/common/debugger/signaldata/SumaImpl.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/SystemError.cpp b/ndb/src/common/debugger/signaldata/SystemError.cpp
index 549c34710a0..c1acde0b6ad 100644
--- a/ndb/src/common/debugger/signaldata/SystemError.cpp
+++ b/ndb/src/common/debugger/signaldata/SystemError.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TcIndx.cpp b/ndb/src/common/debugger/signaldata/TcIndx.cpp
index b0578f5b646..8efbf106534 100644
--- a/ndb/src/common/debugger/signaldata/TcIndx.cpp
+++ b/ndb/src/common/debugger/signaldata/TcIndx.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TcKeyConf.cpp b/ndb/src/common/debugger/signaldata/TcKeyConf.cpp
index 652c2b8a557..65589f8cd6e 100644
--- a/ndb/src/common/debugger/signaldata/TcKeyConf.cpp
+++ b/ndb/src/common/debugger/signaldata/TcKeyConf.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TcKeyRef.cpp b/ndb/src/common/debugger/signaldata/TcKeyRef.cpp
index 0dba9909caf..eb512de52e6 100644
--- a/ndb/src/common/debugger/signaldata/TcKeyRef.cpp
+++ b/ndb/src/common/debugger/signaldata/TcKeyRef.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TcKeyReq.cpp b/ndb/src/common/debugger/signaldata/TcKeyReq.cpp
index 3918bd5db26..0265ed823dd 100644
--- a/ndb/src/common/debugger/signaldata/TcKeyReq.cpp
+++ b/ndb/src/common/debugger/signaldata/TcKeyReq.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp b/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp
index 961f0c3619d..92191619982 100644
--- a/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp
+++ b/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp b/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp
index 7a8d176ec61..14329c66c2a 100644
--- a/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp
+++ b/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TupCommit.cpp b/ndb/src/common/debugger/signaldata/TupCommit.cpp
index d0391b2a8e6..a796d87bd91 100644
--- a/ndb/src/common/debugger/signaldata/TupCommit.cpp
+++ b/ndb/src/common/debugger/signaldata/TupCommit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TupKey.cpp b/ndb/src/common/debugger/signaldata/TupKey.cpp
index 134b5fde8bc..03811bfd7c9 100644
--- a/ndb/src/common/debugger/signaldata/TupKey.cpp
+++ b/ndb/src/common/debugger/signaldata/TupKey.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/TuxMaint.cpp b/ndb/src/common/debugger/signaldata/TuxMaint.cpp
index ba6a299b77d..52e223f261d 100644
--- a/ndb/src/common/debugger/signaldata/TuxMaint.cpp
+++ b/ndb/src/common/debugger/signaldata/TuxMaint.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/UtilDelete.cpp b/ndb/src/common/debugger/signaldata/UtilDelete.cpp
index b6ba53559ac..38f5b8a7c06 100644
--- a/ndb/src/common/debugger/signaldata/UtilDelete.cpp
+++ b/ndb/src/common/debugger/signaldata/UtilDelete.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/UtilExecute.cpp b/ndb/src/common/debugger/signaldata/UtilExecute.cpp
index 2c88fa174d4..6d92acf2e01 100644
--- a/ndb/src/common/debugger/signaldata/UtilExecute.cpp
+++ b/ndb/src/common/debugger/signaldata/UtilExecute.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/UtilLock.cpp b/ndb/src/common/debugger/signaldata/UtilLock.cpp
index 34e37c3e2d8..3004f9d0975 100644
--- a/ndb/src/common/debugger/signaldata/UtilLock.cpp
+++ b/ndb/src/common/debugger/signaldata/UtilLock.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/UtilPrepare.cpp b/ndb/src/common/debugger/signaldata/UtilPrepare.cpp
index adc2e299380..36591d18a54 100644
--- a/ndb/src/common/debugger/signaldata/UtilPrepare.cpp
+++ b/ndb/src/common/debugger/signaldata/UtilPrepare.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/UtilSequence.cpp b/ndb/src/common/debugger/signaldata/UtilSequence.cpp
index e91999d9abf..164987a9720 100644
--- a/ndb/src/common/debugger/signaldata/UtilSequence.cpp
+++ b/ndb/src/common/debugger/signaldata/UtilSequence.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/debugger/signaldata/print.awk b/ndb/src/common/debugger/signaldata/print.awk
index 9730fb4a236..3c289e59f63 100644
--- a/ndb/src/common/debugger/signaldata/print.awk
+++ b/ndb/src/common/debugger/signaldata/print.awk
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
BEGIN {
m_curr="";
m_count=0;
diff --git a/ndb/src/common/logger/ConsoleLogHandler.cpp b/ndb/src/common/logger/ConsoleLogHandler.cpp
index 94367d2fc45..d0cafcb3590 100644
--- a/ndb/src/common/logger/ConsoleLogHandler.cpp
+++ b/ndb/src/common/logger/ConsoleLogHandler.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/FileLogHandler.cpp b/ndb/src/common/logger/FileLogHandler.cpp
index b8859630406..a4f610777eb 100644
--- a/ndb/src/common/logger/FileLogHandler.cpp
+++ b/ndb/src/common/logger/FileLogHandler.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -125,8 +124,6 @@ FileLogHandler::writeFooter()
}
callCount++;
- // Needed on Cello since writes to the flash disk does not happen until
- // we flush and fsync.
m_pLogFile->flush();
}
diff --git a/ndb/src/common/logger/LogHandler.cpp b/ndb/src/common/logger/LogHandler.cpp
index 47333f81812..b746bcc3cd7 100644
--- a/ndb/src/common/logger/LogHandler.cpp
+++ b/ndb/src/common/logger/LogHandler.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/LogHandlerList.cpp b/ndb/src/common/logger/LogHandlerList.cpp
index 62495d7566b..376e96c3c8c 100644
--- a/ndb/src/common/logger/LogHandlerList.cpp
+++ b/ndb/src/common/logger/LogHandlerList.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/LogHandlerList.hpp b/ndb/src/common/logger/LogHandlerList.hpp
index 21344023560..ad87c0294cf 100644
--- a/ndb/src/common/logger/LogHandlerList.hpp
+++ b/ndb/src/common/logger/LogHandlerList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/Logger.cpp b/ndb/src/common/logger/Logger.cpp
index 48e084a782b..1bb7062474f 100644
--- a/ndb/src/common/logger/Logger.cpp
+++ b/ndb/src/common/logger/Logger.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/Makefile.am b/ndb/src/common/logger/Makefile.am
index 0af21f9fbde..b344b5bf833 100644
--- a/ndb/src/common/logger/Makefile.am
+++ b/ndb/src/common/logger/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LTLIBRARIES = liblogger.la
diff --git a/ndb/src/common/logger/SysLogHandler.cpp b/ndb/src/common/logger/SysLogHandler.cpp
index c7fcb102dd4..3178ef6e1c7 100644
--- a/ndb/src/common/logger/SysLogHandler.cpp
+++ b/ndb/src/common/logger/SysLogHandler.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp
index 7de9ee46479..e478573a094 100644
--- a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp
+++ b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp
index e98a2722b8d..ae7846af19e 100644
--- a/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp
+++ b/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp b/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp
index 990d2e0eada..9ee021f935b 100644
--- a/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp
+++ b/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp b/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp
index 79f560750d5..e7d25292aab 100644
--- a/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp
+++ b/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/mgmcommon/ConfigRetriever.cpp b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
index a0e3a4b74f3..414f995181e 100644
--- a/ndb/src/common/mgmcommon/ConfigRetriever.cpp
+++ b/ndb/src/common/mgmcommon/ConfigRetriever.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/mgmcommon/IPCConfig.cpp b/ndb/src/common/mgmcommon/IPCConfig.cpp
index bc442ffc3ef..9ac5931ae77 100644
--- a/ndb/src/common/mgmcommon/IPCConfig.cpp
+++ b/ndb/src/common/mgmcommon/IPCConfig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/mgmcommon/Makefile.am b/ndb/src/common/mgmcommon/Makefile.am
index 104bf0b29f2..cef2aedfc37 100644
--- a/ndb/src/common/mgmcommon/Makefile.am
+++ b/ndb/src/common/mgmcommon/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LTLIBRARIES = libmgmsrvcommon.la
libmgmsrvcommon_la_SOURCES = \
diff --git a/ndb/src/common/mgmcommon/printConfig/printConfig.cpp b/ndb/src/common/mgmcommon/printConfig/printConfig.cpp
index 7cedbb451e2..348075a6cd2 100644
--- a/ndb/src/common/mgmcommon/printConfig/printConfig.cpp
+++ b/ndb/src/common/mgmcommon/printConfig/printConfig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/Makefile.am b/ndb/src/common/portlib/Makefile.am
index 1e27d713495..10f10a059f4 100644
--- a/ndb/src/common/portlib/Makefile.am
+++ b/ndb/src/common/portlib/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LTLIBRARIES = libportlib.la
libportlib_la_SOURCES = \
@@ -39,3 +54,6 @@ libportlib.dsp: Makefile \
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ $(WIN_src)
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/src/common/portlib/NdbCondition.c b/ndb/src/common/portlib/NdbCondition.c
index df312c7cc24..da1d67e660e 100644
--- a/ndb/src/common/portlib/NdbCondition.c
+++ b/ndb/src/common/portlib/NdbCondition.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbConfig.c b/ndb/src/common/portlib/NdbConfig.c
index c3f37727024..193b3429a3d 100644
--- a/ndb/src/common/portlib/NdbConfig.c
+++ b/ndb/src/common/portlib/NdbConfig.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbDaemon.c b/ndb/src/common/portlib/NdbDaemon.c
index 3f1c1998501..d440b68290e 100644
--- a/ndb/src/common/portlib/NdbDaemon.c
+++ b/ndb/src/common/portlib/NdbDaemon.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbEnv.c b/ndb/src/common/portlib/NdbEnv.c
index d294e0b52ca..faa9a20a516 100644
--- a/ndb/src/common/portlib/NdbEnv.c
+++ b/ndb/src/common/portlib/NdbEnv.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbHost.c b/ndb/src/common/portlib/NdbHost.c
index 4749bb39ea7..26563a65d9c 100644
--- a/ndb/src/common/portlib/NdbHost.c
+++ b/ndb/src/common/portlib/NdbHost.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbMem.c b/ndb/src/common/portlib/NdbMem.c
index f964f4d9937..7c95e02cd0c 100644
--- a/ndb/src/common/portlib/NdbMem.c
+++ b/ndb/src/common/portlib/NdbMem.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -57,7 +56,15 @@ void NdbMem_Free(void* ptr)
}
-int NdbMem_MemLockAll(){
+int NdbMem_MemLockAll(int i){
+ if (i == 1)
+ {
+#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && defined (MCL_FUTURE)
+ return mlockall(MCL_CURRENT | MCL_FUTURE);
+#else
+ return -1;
+#endif
+ }
#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT)
return mlockall(MCL_CURRENT);
#else
diff --git a/ndb/src/common/portlib/NdbMutex.c b/ndb/src/common/portlib/NdbMutex.c
index f0a1614ba8e..c9184e5d1f2 100644
--- a/ndb/src/common/portlib/NdbMutex.c
+++ b/ndb/src/common/portlib/NdbMutex.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbPortLibTest.cpp b/ndb/src/common/portlib/NdbPortLibTest.cpp
index d7892411851..b1602578acd 100644
--- a/ndb/src/common/portlib/NdbPortLibTest.cpp
+++ b/ndb/src/common/portlib/NdbPortLibTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbSleep.c b/ndb/src/common/portlib/NdbSleep.c
index 44bafe98a37..b3251939938 100644
--- a/ndb/src/common/portlib/NdbSleep.c
+++ b/ndb/src/common/portlib/NdbSleep.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbTCP.cpp b/ndb/src/common/portlib/NdbTCP.cpp
index 41471548b7e..72892b93e62 100644
--- a/ndb/src/common/portlib/NdbTCP.cpp
+++ b/ndb/src/common/portlib/NdbTCP.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbThread.c b/ndb/src/common/portlib/NdbThread.c
index 67c8f6faf50..d5d0f462f4f 100644
--- a/ndb/src/common/portlib/NdbThread.c
+++ b/ndb/src/common/portlib/NdbThread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/NdbTick.c b/ndb/src/common/portlib/NdbTick.c
index d8f0b6ec27a..eff6b28b7eb 100644
--- a/ndb/src/common/portlib/NdbTick.c
+++ b/ndb/src/common/portlib/NdbTick.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/memtest.c b/ndb/src/common/portlib/memtest.c
index 673f23fa803..b9ad2cee315 100644
--- a/ndb/src/common/portlib/memtest.c
+++ b/ndb/src/common/portlib/memtest.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/mmslist.cpp b/ndb/src/common/portlib/mmslist.cpp
index 05538785293..ed453bd35cd 100644
--- a/ndb/src/common/portlib/mmslist.cpp
+++ b/ndb/src/common/portlib/mmslist.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/mmstest.cpp b/ndb/src/common/portlib/mmstest.cpp
index 9cc7d810985..3ffb2e1a5aa 100644
--- a/ndb/src/common/portlib/mmstest.cpp
+++ b/ndb/src/common/portlib/mmstest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/munmaptest.cpp b/ndb/src/common/portlib/munmaptest.cpp
index b1d84131810..57f1756f1ee 100644
--- a/ndb/src/common/portlib/munmaptest.cpp
+++ b/ndb/src/common/portlib/munmaptest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbCondition.c b/ndb/src/common/portlib/old_dirs/ose/NdbCondition.c
index 73a2dbc5d66..070f35e8dea 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbCondition.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbCondition.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbConditionOSE.h b/ndb/src/common/portlib/old_dirs/ose/NdbConditionOSE.h
index bd0306261cc..a285eed3fcc 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbConditionOSE.h
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbConditionOSE.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbEnv.c b/ndb/src/common/portlib/old_dirs/ose/NdbEnv.c
index e2ac4d879d2..1a8d9ac4897 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbEnv.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbEnv.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbHost.c b/ndb/src/common/portlib/old_dirs/ose/NdbHost.c
index f5e1e511c16..d3353ee57d4 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbHost.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbHost.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbMem.c b/ndb/src/common/portlib/old_dirs/ose/NdbMem.c
index 0e38024bbb4..5eb27b560fc 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbMem.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbMem.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbMem_SoftOse.cpp b/ndb/src/common/portlib/old_dirs/ose/NdbMem_SoftOse.cpp
index cad22c0474b..b3fa8d70619 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbMem_SoftOse.cpp
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbMem_SoftOse.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbMutex.c b/ndb/src/common/portlib/old_dirs/ose/NdbMutex.c
index 253c0e412ff..2202c090aff 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbMutex.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbMutex.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbOut.cpp b/ndb/src/common/portlib/old_dirs/ose/NdbOut.cpp
index eb81bc9d971..33ae1972cdc 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbOut.cpp
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbOut.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbSleep.c b/ndb/src/common/portlib/old_dirs/ose/NdbSleep.c
index 70fd83117ef..b1e494c505b 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbSleep.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbSleep.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbTCP.c b/ndb/src/common/portlib/old_dirs/ose/NdbTCP.c
index 9994697b3f8..78c57d815cf 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbTCP.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbTCP.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbThread.c b/ndb/src/common/portlib/old_dirs/ose/NdbThread.c
index e46903a5cce..630fd24bbbe 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbThread.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbThread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/ose/NdbTick.c b/ndb/src/common/portlib/old_dirs/ose/NdbTick.c
index c3deae2bec3..233b8469564 100644
--- a/ndb/src/common/portlib/old_dirs/ose/NdbTick.c
+++ b/ndb/src/common/portlib/old_dirs/ose/NdbTick.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbCondition.c b/ndb/src/common/portlib/old_dirs/win32/NdbCondition.c
index 77869b673de..81aa86a6123 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbCondition.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbCondition.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbDaemon.c b/ndb/src/common/portlib/old_dirs/win32/NdbDaemon.c
index 972fb1b88d8..7c1533aab70 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbDaemon.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbDaemon.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbEnv.c b/ndb/src/common/portlib/old_dirs/win32/NdbEnv.c
index 0df703a5e97..a4046503627 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbEnv.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbEnv.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbHost.c b/ndb/src/common/portlib/old_dirs/win32/NdbHost.c
index f91dd1a531c..6d18eb014f3 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbHost.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbHost.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbMem.c b/ndb/src/common/portlib/old_dirs/win32/NdbMem.c
index ab7123b0a29..434cf1837e5 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbMem.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbMem.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbMutex.c b/ndb/src/common/portlib/old_dirs/win32/NdbMutex.c
index e797024d5bb..e7d1b7512a3 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbMutex.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbMutex.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbSleep.c b/ndb/src/common/portlib/old_dirs/win32/NdbSleep.c
index ac0f44dd07f..cbdc959d56b 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbSleep.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbSleep.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbTCP.c b/ndb/src/common/portlib/old_dirs/win32/NdbTCP.c
index 483a53bd606..4970b0d5533 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbTCP.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbTCP.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbThread.c b/ndb/src/common/portlib/old_dirs/win32/NdbThread.c
index 1f052f034e8..20e70fb93f4 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbThread.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbThread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/old_dirs/win32/NdbTick.c b/ndb/src/common/portlib/old_dirs/win32/NdbTick.c
index e3a67d8437d..7e9300a89c9 100644
--- a/ndb/src/common/portlib/old_dirs/win32/NdbTick.c
+++ b/ndb/src/common/portlib/old_dirs/win32/NdbTick.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbCondition.c b/ndb/src/common/portlib/win32/NdbCondition.c
index 4046db1d60a..1a68572297c 100644
--- a/ndb/src/common/portlib/win32/NdbCondition.c
+++ b/ndb/src/common/portlib/win32/NdbCondition.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbDaemon.c b/ndb/src/common/portlib/win32/NdbDaemon.c
index b96d4c20260..6cfffbd8600 100644
--- a/ndb/src/common/portlib/win32/NdbDaemon.c
+++ b/ndb/src/common/portlib/win32/NdbDaemon.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbEnv.c b/ndb/src/common/portlib/win32/NdbEnv.c
index f42e685fe15..dedd9c9c1fe 100644
--- a/ndb/src/common/portlib/win32/NdbEnv.c
+++ b/ndb/src/common/portlib/win32/NdbEnv.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbHost.c b/ndb/src/common/portlib/win32/NdbHost.c
index 7df96c45991..34977942eb6 100644
--- a/ndb/src/common/portlib/win32/NdbHost.c
+++ b/ndb/src/common/portlib/win32/NdbHost.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbMem.c b/ndb/src/common/portlib/win32/NdbMem.c
index 313ca9dff66..39c84f4717a 100644
--- a/ndb/src/common/portlib/win32/NdbMem.c
+++ b/ndb/src/common/portlib/win32/NdbMem.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbMutex.c b/ndb/src/common/portlib/win32/NdbMutex.c
index e6d1f081e9a..af04531543e 100644
--- a/ndb/src/common/portlib/win32/NdbMutex.c
+++ b/ndb/src/common/portlib/win32/NdbMutex.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbSleep.c b/ndb/src/common/portlib/win32/NdbSleep.c
index 8f5bdc49acd..9c3df0ec0ca 100644
--- a/ndb/src/common/portlib/win32/NdbSleep.c
+++ b/ndb/src/common/portlib/win32/NdbSleep.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbTCP.c b/ndb/src/common/portlib/win32/NdbTCP.c
index 5d6c0ae5c7d..e1d9bf91009 100644
--- a/ndb/src/common/portlib/win32/NdbTCP.c
+++ b/ndb/src/common/portlib/win32/NdbTCP.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbThread.c b/ndb/src/common/portlib/win32/NdbThread.c
index 98db0d5c287..3cd57b40422 100644
--- a/ndb/src/common/portlib/win32/NdbThread.c
+++ b/ndb/src/common/portlib/win32/NdbThread.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/portlib/win32/NdbTick.c b/ndb/src/common/portlib/win32/NdbTick.c
index 4430cbf419b..3e9c6f47349 100644
--- a/ndb/src/common/portlib/win32/NdbTick.c
+++ b/ndb/src/common/portlib/win32/NdbTick.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/Makefile.am b/ndb/src/common/transporter/Makefile.am
index 4c277097a91..ad1db7526aa 100644
--- a/ndb/src/common/transporter/Makefile.am
+++ b/ndb/src/common/transporter/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LTLIBRARIES = libtransporter.la
diff --git a/ndb/src/common/transporter/OSE_Receiver.cpp b/ndb/src/common/transporter/OSE_Receiver.cpp
index 63a33fc8f24..697d9ceb049 100644
--- a/ndb/src/common/transporter/OSE_Receiver.cpp
+++ b/ndb/src/common/transporter/OSE_Receiver.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/OSE_Receiver.hpp b/ndb/src/common/transporter/OSE_Receiver.hpp
index 1812ab51065..68e0b7122bc 100644
--- a/ndb/src/common/transporter/OSE_Receiver.hpp
+++ b/ndb/src/common/transporter/OSE_Receiver.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/OSE_Signals.hpp b/ndb/src/common/transporter/OSE_Signals.hpp
index 3f6cc07b473..89bd1050ffd 100644
--- a/ndb/src/common/transporter/OSE_Signals.hpp
+++ b/ndb/src/common/transporter/OSE_Signals.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/OSE_Transporter.cpp b/ndb/src/common/transporter/OSE_Transporter.cpp
index ad67791fc0c..0abf480875f 100644
--- a/ndb/src/common/transporter/OSE_Transporter.cpp
+++ b/ndb/src/common/transporter/OSE_Transporter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/OSE_Transporter.hpp b/ndb/src/common/transporter/OSE_Transporter.hpp
index 898352366ba..d8b2bfa470f 100644
--- a/ndb/src/common/transporter/OSE_Transporter.hpp
+++ b/ndb/src/common/transporter/OSE_Transporter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/Packer.cpp b/ndb/src/common/transporter/Packer.cpp
index bcfac8417bb..66c00b0af89 100644
--- a/ndb/src/common/transporter/Packer.cpp
+++ b/ndb/src/common/transporter/Packer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/Packer.hpp b/ndb/src/common/transporter/Packer.hpp
index 5c191203201..8a1feb87ed7 100644
--- a/ndb/src/common/transporter/Packer.hpp
+++ b/ndb/src/common/transporter/Packer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SCI_Transporter.cpp b/ndb/src/common/transporter/SCI_Transporter.cpp
index 1fe276249e5..138b79acb51 100644
--- a/ndb/src/common/transporter/SCI_Transporter.cpp
+++ b/ndb/src/common/transporter/SCI_Transporter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SCI_Transporter.hpp b/ndb/src/common/transporter/SCI_Transporter.hpp
index cb42e437118..fbba2ac4516 100644
--- a/ndb/src/common/transporter/SCI_Transporter.hpp
+++ b/ndb/src/common/transporter/SCI_Transporter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SHM_Buffer.hpp b/ndb/src/common/transporter/SHM_Buffer.hpp
index 27321a3191f..aecadf23943 100644
--- a/ndb/src/common/transporter/SHM_Buffer.hpp
+++ b/ndb/src/common/transporter/SHM_Buffer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SHM_Transporter.cpp b/ndb/src/common/transporter/SHM_Transporter.cpp
index 93d718b8713..e0c2e726a92 100644
--- a/ndb/src/common/transporter/SHM_Transporter.cpp
+++ b/ndb/src/common/transporter/SHM_Transporter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SHM_Transporter.hpp b/ndb/src/common/transporter/SHM_Transporter.hpp
index b25f9e538db..bdb31298b8b 100644
--- a/ndb/src/common/transporter/SHM_Transporter.hpp
+++ b/ndb/src/common/transporter/SHM_Transporter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SHM_Transporter.unix.cpp b/ndb/src/common/transporter/SHM_Transporter.unix.cpp
index 7277f9e13ef..5cab98aa075 100644
--- a/ndb/src/common/transporter/SHM_Transporter.unix.cpp
+++ b/ndb/src/common/transporter/SHM_Transporter.unix.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SHM_Transporter.win32.cpp b/ndb/src/common/transporter/SHM_Transporter.win32.cpp
index 86029b17885..5a753179b59 100644
--- a/ndb/src/common/transporter/SHM_Transporter.win32.cpp
+++ b/ndb/src/common/transporter/SHM_Transporter.win32.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SendBuffer.cpp b/ndb/src/common/transporter/SendBuffer.cpp
index 8f69eb4bd40..c0cf81ba823 100644
--- a/ndb/src/common/transporter/SendBuffer.cpp
+++ b/ndb/src/common/transporter/SendBuffer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/SendBuffer.hpp b/ndb/src/common/transporter/SendBuffer.hpp
index 7ebeb6d890e..73dda433493 100644
--- a/ndb/src/common/transporter/SendBuffer.hpp
+++ b/ndb/src/common/transporter/SendBuffer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/TCP_Transporter.cpp b/ndb/src/common/transporter/TCP_Transporter.cpp
index 5db12d3985c..91a5fb50c57 100644
--- a/ndb/src/common/transporter/TCP_Transporter.cpp
+++ b/ndb/src/common/transporter/TCP_Transporter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/TCP_Transporter.hpp b/ndb/src/common/transporter/TCP_Transporter.hpp
index df4149531b4..8cba7a01532 100644
--- a/ndb/src/common/transporter/TCP_Transporter.hpp
+++ b/ndb/src/common/transporter/TCP_Transporter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/Transporter.cpp b/ndb/src/common/transporter/Transporter.cpp
index b2ee75e4754..20b6be8ce26 100644
--- a/ndb/src/common/transporter/Transporter.cpp
+++ b/ndb/src/common/transporter/Transporter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -80,9 +79,13 @@ Transporter::Transporter(TransporterRegistry &t_reg,
if (isServer)
m_socket_client= 0;
else
+ {
m_socket_client= new SocketClient(remoteHostName, s_port,
new SocketAuthSimple("ndbd",
"ndbd passwd"));
+
+ m_socket_client->set_connect_timeout((m_timeOutMillis+999)/1000);
+ }
DBUG_VOID_RETURN;
}
@@ -141,9 +144,9 @@ Transporter::connect_client() {
}
sockfd= m_socket_client->connect();
}
-
+
return connect_client(sockfd);
-}
+}
bool
Transporter::connect_client(NDB_SOCKET_TYPE sockfd) {
diff --git a/ndb/src/common/transporter/Transporter.hpp b/ndb/src/common/transporter/Transporter.hpp
index 9e8bbd687ee..1a979207b0c 100644
--- a/ndb/src/common/transporter/Transporter.hpp
+++ b/ndb/src/common/transporter/Transporter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/TransporterInternalDefinitions.hpp b/ndb/src/common/transporter/TransporterInternalDefinitions.hpp
index 624b495422f..b06a41724db 100644
--- a/ndb/src/common/transporter/TransporterInternalDefinitions.hpp
+++ b/ndb/src/common/transporter/TransporterInternalDefinitions.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp
index cd78bc52027..bd3136f023c 100644
--- a/ndb/src/common/transporter/TransporterRegistry.cpp
+++ b/ndb/src/common/transporter/TransporterRegistry.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/basictest/basicTransporterTest.cpp b/ndb/src/common/transporter/basictest/basicTransporterTest.cpp
index c0a437c4907..acac08155b8 100644
--- a/ndb/src/common/transporter/basictest/basicTransporterTest.cpp
+++ b/ndb/src/common/transporter/basictest/basicTransporterTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/buddy.cpp b/ndb/src/common/transporter/buddy.cpp
index dc25e2dc66c..3c33f5c8f55 100644
--- a/ndb/src/common/transporter/buddy.cpp
+++ b/ndb/src/common/transporter/buddy.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/buddy.hpp b/ndb/src/common/transporter/buddy.hpp
index f720e9e61a1..7bb7d626c6d 100644
--- a/ndb/src/common/transporter/buddy.hpp
+++ b/ndb/src/common/transporter/buddy.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp b/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp
index 803029ee565..b4eca4e6ddd 100644
--- a/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp
+++ b/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/perftest/perfTransporterTest.cpp b/ndb/src/common/transporter/perftest/perfTransporterTest.cpp
index 71df9f12a4c..e76f8dff559 100644
--- a/ndb/src/common/transporter/perftest/perfTransporterTest.cpp
+++ b/ndb/src/common/transporter/perftest/perfTransporterTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp b/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp
index 6218b764e09..ae0773eace4 100644
--- a/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp
+++ b/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp b/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp
index 4c1701a91e4..ecbd53067d3 100644
--- a/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp
+++ b/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp b/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp
index f993dd05ac8..ffbad231474 100644
--- a/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp
+++ b/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/priotest/prioTransporterTest.cpp b/ndb/src/common/transporter/priotest/prioTransporterTest.cpp
index 6c5623a49a6..bc860b31872 100644
--- a/ndb/src/common/transporter/priotest/prioTransporterTest.cpp
+++ b/ndb/src/common/transporter/priotest/prioTransporterTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/transporter/priotest/prioTransporterTest.hpp b/ndb/src/common/transporter/priotest/prioTransporterTest.hpp
index 787a9f46433..35bab63ef61 100644
--- a/ndb/src/common/transporter/priotest/prioTransporterTest.hpp
+++ b/ndb/src/common/transporter/priotest/prioTransporterTest.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/BaseString.cpp b/ndb/src/common/util/BaseString.cpp
index dbff44c377d..6f20ae6a002 100644
--- a/ndb/src/common/util/BaseString.cpp
+++ b/ndb/src/common/util/BaseString.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/Bitmask.cpp b/ndb/src/common/util/Bitmask.cpp
index 0aa39a37204..f5b822ff08e 100644
--- a/ndb/src/common/util/Bitmask.cpp
+++ b/ndb/src/common/util/Bitmask.cpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <Bitmask.hpp>
#include <NdbOut.hpp>
diff --git a/ndb/src/common/util/ConfigValues.cpp b/ndb/src/common/util/ConfigValues.cpp
index ae4fbfd2f71..cf6dcf904a6 100644
--- a/ndb/src/common/util/ConfigValues.cpp
+++ b/ndb/src/common/util/ConfigValues.cpp
@@ -1,3 +1,17 @@
+/* Copyright (C) 2004, 2006 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <ndb_global.h>
#include <ConfigValues.hpp>
@@ -34,7 +48,7 @@ static const char Magic[] = { 'N', 'D', 'B', 'C', 'O', 'N', 'F', 'V' };
//#define DEBUG_CV
#ifdef DEBUG_CV
-#define DEBUG
+#define DEBUG if(getenv("CV_DEBUG"))
#else
#define DEBUG if(0)
#endif
@@ -202,62 +216,60 @@ ConfigValues::Iterator::set(Uint32 key, const char * value){
static
bool
findKey(const Uint32 * values, Uint32 sz, Uint32 key, Uint32 * _pos){
- Uint32 pos = hash(key, sz);
- Uint32 count = 0;
- while((values[pos] & KP_MASK) != key && count < sz){
- pos = nextHash(key, sz, pos, ++count);
- }
+ Uint32 lo = 0;
+ Uint32 hi = sz;
+ Uint32 pos = (hi + lo) >> 1;
- if((values[pos] & KP_MASK)== key){
- *_pos = pos;
- return true;
+ DEBUG printf("findKey(H'%.8x %d)", key, sz);
+
+ if (sz == 0)
+ {
+ DEBUG ndbout_c(" -> false, 0");
+ * _pos = 0;
+ return false;
}
- return false;
-}
-static
-Uint32
-hash(Uint32 key, Uint32 size){
- Uint32 tmp = (key >> 16) ^ (key & 0xFFFF);
- return (((tmp << 16) | tmp) % size) << 1;
-}
+ Uint32 val = 0;
+ Uint32 oldpos = pos + 1;
+ while (pos != oldpos)
+ {
+ DEBUG printf(" [ %d %d %d ] ", lo, pos, hi);
+ assert(pos < hi);
+ assert(pos >= lo);
+ val = values[2*pos] & KP_MASK;
+ if (key > val)
+ {
+ lo = pos;
+ }
+ else if (key < val)
+ {
+ hi = pos;
+ }
+ else
+ {
+ * _pos = 2*pos;
+ DEBUG ndbout_c(" -> true, %d", pos);
+ return true;
+ }
+ oldpos = pos;
+ pos = (hi + lo) >> 1;
+ }
-static
-Uint32
-nextHash(Uint32 key, Uint32 size, Uint32 pos, Uint32 count){
- Uint32 p = (pos >> 1);
- if((key % size) != 0)
- p += key;
- else
- p += 1;
- return (p % size) << 1;
-}
+ DEBUG printf(" pos: %d (key %.8x val: %.8x values[pos]: %x) key>val: %d ",
+ pos, key, val, values[2*pos] & KP_MASK,
+ key > val);
-static
-Uint32
-directory(Uint32 sz){
- const Uint32 _input = sz;
- if((sz & 1) == 0)
- sz ++;
+ pos += (key > val) ? 1 : 0;
- bool prime = false;
- while(!prime){
- prime = true;
- for(Uint32 n = 3; n*n <= sz; n += 2){
- if((sz % n) == 0){
- prime = false;
- sz += 2;
- break;
- }
- }
- }
- DEBUG printf("directory %d -> %d\n", _input, sz);
- return sz;
+ * _pos = 2*pos;
+ DEBUG ndbout_c(" -> false, %d", pos);
+ return false;
}
+
ConfigValuesFactory::ConfigValuesFactory(Uint32 keys, Uint32 data){
m_sectionCounter = (1 << KP_SECTION_SHIFT);
- m_freeKeys = directory(keys);
+ m_freeKeys = keys;
m_freeData = (data + 7) & ~7;
m_currentSection = 0;
m_cfg = create(m_freeKeys, m_freeData);
@@ -316,11 +328,14 @@ ConfigValuesFactory::expand(Uint32 fk, Uint32 fs){
return ;
}
+ DEBUG printf("[ fk fd ] : [ %d %d ]", m_freeKeys, m_freeData);
+
m_freeKeys = (m_freeKeys >= fk ? m_cfg->m_size : fk + m_cfg->m_size);
m_freeData = (m_freeData >= fs ? m_cfg->m_dataSize : fs + m_cfg->m_dataSize);
- m_freeKeys = directory(m_freeKeys);
m_freeData = (m_freeData + 7) & ~7;
-
+
+ DEBUG ndbout_c(" [ %d %d ]", m_freeKeys, m_freeData);
+
ConfigValues * m_tmp = m_cfg;
m_cfg = create(m_freeKeys, m_freeData);
put(* m_tmp);
@@ -336,7 +351,6 @@ ConfigValuesFactory::shrink(){
m_freeKeys = m_cfg->m_size - m_freeKeys;
m_freeData = m_cfg->m_dataSize - m_freeData;
- m_freeKeys = directory(m_freeKeys);
m_freeData = (m_freeData + 7) & ~7;
ConfigValues * m_tmp = m_cfg;
@@ -415,52 +429,58 @@ ConfigValuesFactory::put(const ConfigValues::Entry & entry){
}
const Uint32 tmp = entry.m_key | m_currentSection;
- const Uint32 sz = m_cfg->m_size;
- Uint32 pos = hash(tmp, sz);
- Uint32 count = 0;
- Uint32 val = m_cfg->m_values[pos];
-
- while((val & KP_MASK) != tmp && val != CFV_KEY_FREE && count < sz){
- pos = nextHash(tmp, sz, pos, ++count);
- val = m_cfg->m_values[pos];
- }
+ const Uint32 sz = m_cfg->m_size - m_freeKeys;
- if((val & KP_MASK) == tmp){
+ Uint32 pos;
+ if (findKey(m_cfg->m_values, sz, tmp, &pos))
+ {
DEBUG ndbout_c("key %x already found at pos: %d", tmp, pos);
return false;
}
- if(count >= sz){
- pos = hash(tmp, sz);
- count = 0;
- Uint32 val = m_cfg->m_values[pos];
-
- printf("key: %d, (key %% size): %d\n", entry.m_key, (entry.m_key % sz));
- printf("pos: %d", pos);
- while((val & KP_MASK) != tmp && val != CFV_KEY_FREE && count < sz){
- pos = nextHash(tmp, sz, pos, ++count);
- val = m_cfg->m_values[pos];
- printf(" %d", pos);
+ DEBUG {
+ printf("H'before ");
+ Uint32 prev = 0;
+ for (Uint32 i = 0; i<sz; i++)
+ {
+ Uint32 val = m_cfg->m_values[2*i] & KP_MASK;
+ ndbout_c("%.8x", val);
+ assert(val >= prev);
+ prev = val;
}
- printf("\n");
-
- abort();
- printf("Full\n");
- return false;
+ }
+
+ if (pos != 2*sz)
+ {
+ DEBUG ndbout_c("pos: %d sz: %d", pos, sz);
+ memmove(m_cfg->m_values + pos + 2, m_cfg->m_values + pos,
+ 4 * (2*sz - pos));
}
- assert(pos < (sz << 1));
Uint32 key = tmp;
key |= (entry.m_type << KP_TYPE_SHIFT);
m_cfg->m_values[pos] = key;
+
+ DEBUG {
+ printf("H'after ");
+ Uint32 prev = 0;
+ for (Uint32 i = 0; i<=sz; i++)
+ {
+ Uint32 val = m_cfg->m_values[2*i] & KP_MASK;
+ ndbout_c("%.8x", val);
+ assert(val >= prev);
+ prev = val;
+ }
+ }
+
switch(entry.m_type){
case ConfigValues::IntType:
case ConfigValues::SectionType:
m_cfg->m_values[pos+1] = entry.m_int;
m_freeKeys--;
DEBUG printf("Putting at: %d(%d) (loop = %d) key: %d value: %d\n",
- pos, sz, count,
+ pos, sz, 0,
(key >> KP_KEYVAL_SHIFT) & KP_KEYVAL_MASK,
entry.m_int);
return true;
@@ -472,7 +492,7 @@ ConfigValuesFactory::put(const ConfigValues::Entry & entry){
m_freeKeys--;
m_freeData -= sizeof(char *);
DEBUG printf("Putting at: %d(%d) (loop = %d) key: %d value(%d): %s\n",
- pos, sz, count,
+ pos, sz, 0,
(key >> KP_KEYVAL_SHIFT) & KP_KEYVAL_MASK,
index,
entry.m_string);
@@ -485,7 +505,7 @@ ConfigValuesFactory::put(const ConfigValues::Entry & entry){
m_freeKeys--;
m_freeData -= 8;
DEBUG printf("Putting at: %d(%d) (loop = %d) key: %d value64(%d): %lld\n",
- pos, sz, count,
+ pos, sz, 0,
(key >> KP_KEYVAL_SHIFT) & KP_KEYVAL_MASK,
index,
entry.m_int64);
@@ -648,7 +668,9 @@ ConfigValuesFactory::unpack(const void * _src, Uint32 len){
}
const char * src = (const char *)_src;
-
+ const char * end = src + len - 4;
+ src += sizeof(Magic);
+
{
Uint32 len32 = (len >> 2);
const Uint32 * tmp = (const Uint32*)_src;
@@ -663,9 +685,37 @@ ConfigValuesFactory::unpack(const void * _src, Uint32 len){
}
}
- const char * end = src + len - 4;
- src += sizeof(Magic);
-
+ const char * save = src;
+
+ {
+ Uint32 keys = 0;
+ Uint32 data = 0;
+ while(end - src > 4){
+ Uint32 tmp = ntohl(* (const Uint32 *)src); src += 4;
+ keys++;
+ switch(::getTypeOf(tmp)){
+ case ConfigValues::IntType:
+ case ConfigValues::SectionType:
+ src += 4;
+ break;
+ case ConfigValues::Int64Type:
+ src += 8;
+ data += 8;
+ break;
+ case ConfigValues::StringType:{
+ Uint32 s_len = ntohl(* (const Uint32 *)src);
+ src += 4 + mod4(s_len);
+ data += sizeof(char*);
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ expand(keys, data);
+ }
+
+ src = save;
ConfigValues::Entry entry;
while(end - src > 4){
Uint32 tmp = ntohl(* (const Uint32 *)src); src += 4;
diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp
index 056b7ff199b..23bf3415df9 100644
--- a/ndb/src/common/util/File.cpp
+++ b/ndb/src/common/util/File.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -45,17 +44,16 @@ File_class::exists(const char* aFileName)
return (my_stat(aFileName, &stmp, MYF(0))!=NULL);
}
-long
+off_t
File_class::size(FILE* f)
{
- long cur_pos = 0, length = 0;
-
- cur_pos = ::ftell(f);
- ::fseek(f, 0, SEEK_END);
- length = ::ftell(f);
- ::fseek(f, cur_pos, SEEK_SET); // restore original position
+ MY_STAT s;
+
+ // Note that my_fstat behaves *differently* than my_stat. ARGGGHH!
+ if(my_fstat(::fileno(f), &s, MYF(0)))
+ return 0;
- return length;
+ return s.st_size;
}
bool
@@ -123,13 +121,25 @@ bool
File_class::close()
{
bool rc = true;
+ int retval = 0;
+
if (m_file != NULL)
{
::fflush(m_file);
- rc = (::fclose(m_file) == 0 ? true : false);
- m_file = NULL; // Try again?
+ retval = ::fclose(m_file);
+ while ( (retval != 0) && (errno == EINTR) ){
+ retval = ::fclose(m_file);
+ }
+ if( retval == 0){
+ rc = true;
+ }
+ else {
+ rc = false;
+ ndbout_c("ERROR: Close file error in File.cpp for %s",strerror(errno));
+ }
}
-
+ m_file = NULL;
+
return rc;
}
@@ -168,8 +178,8 @@ File_class::writeChar(const char* buf)
{
return writeChar(buf, 0, ::strlen(buf));
}
-
-long
+
+off_t
File_class::size() const
{
return File_class::size(m_file);
@@ -188,10 +198,6 @@ File_class::flush() const
::fflush(m_file);
return ::fsync(::fileno(m_file));
#else
- return 0;
+ return ::fflush(m_file);;
#endif
}
-
-//
-// PRIVATE
-//
diff --git a/ndb/src/common/util/InputStream.cpp b/ndb/src/common/util/InputStream.cpp
index 1b0e809a047..b74144dc135 100644
--- a/ndb/src/common/util/InputStream.cpp
+++ b/ndb/src/common/util/InputStream.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -65,6 +64,5 @@ SocketInputStream::gets(char * buf, int bufLen) {
if(res == -1)
return 0;
-
return buf;
}
diff --git a/ndb/src/common/util/Makefile.am b/ndb/src/common/util/Makefile.am
index 75a1d970f7a..4cc2e49f9ec 100644
--- a/ndb/src/common/util/Makefile.am
+++ b/ndb/src/common/util/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LTLIBRARIES = libgeneral.la
diff --git a/ndb/src/common/util/NdbErrHnd.cpp b/ndb/src/common/util/NdbErrHnd.cpp
index 38a67f29853..bfe163453ae 100644
--- a/ndb/src/common/util/NdbErrHnd.cpp
+++ b/ndb/src/common/util/NdbErrHnd.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/NdbOut.cpp b/ndb/src/common/util/NdbOut.cpp
index e20119a7987..7ca7c91e266 100644
--- a/ndb/src/common/util/NdbOut.cpp
+++ b/ndb/src/common/util/NdbOut.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/NdbSqlUtil.cpp b/ndb/src/common/util/NdbSqlUtil.cpp
index f3d70a5734a..1234e4ece6b 100644
--- a/ndb/src/common/util/NdbSqlUtil.cpp
+++ b/ndb/src/common/util/NdbSqlUtil.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -136,7 +135,7 @@ NdbSqlUtil::m_typeList[] = {
},
{ // 22
Type::Bit,
- NULL,
+ cmpBit,
NULL
},
{ // 23
@@ -679,6 +678,17 @@ NdbSqlUtil::cmpText(const void* info, const void* p1, unsigned n1, const void* p
}
int
+NdbSqlUtil::cmpBit(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
+{
+ Uint32 n = (n1 < n2) ? n1 : n2;
+ char* c1 = (char*)p1;
+ char* c2 = (char*)p2;
+ int ret = memcmp(p1, p2, n);
+ return ret;
+}
+
+
+int
NdbSqlUtil::cmpTime(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
{
if (n2 >= 3) {
@@ -698,12 +708,6 @@ NdbSqlUtil::cmpTime(const void* info, const void* p1, unsigned n1, const void* p
}
// not yet
-int
-NdbSqlUtil::cmpBit(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
-{
- assert(false);
- return 0;
-}
int
NdbSqlUtil::cmpLongvarchar(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
diff --git a/ndb/src/common/util/OutputStream.cpp b/ndb/src/common/util/OutputStream.cpp
index a41eef649dd..cccd76eac2c 100644
--- a/ndb/src/common/util/OutputStream.cpp
+++ b/ndb/src/common/util/OutputStream.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/Parser.cpp b/ndb/src/common/util/Parser.cpp
index 392c3e83825..499b4471751 100644
--- a/ndb/src/common/util/Parser.cpp
+++ b/ndb/src/common/util/Parser.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/Properties.cpp b/ndb/src/common/util/Properties.cpp
index 0edcda0e726..8d5c56affd3 100644
--- a/ndb/src/common/util/Properties.cpp
+++ b/ndb/src/common/util/Properties.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/SimpleProperties.cpp b/ndb/src/common/util/SimpleProperties.cpp
index a32762caad7..813b38dffd7 100644
--- a/ndb/src/common/util/SimpleProperties.cpp
+++ b/ndb/src/common/util/SimpleProperties.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/SocketAuthenticator.cpp b/ndb/src/common/util/SocketAuthenticator.cpp
index aed4db39231..2f939da6387 100644
--- a/ndb/src/common/util/SocketAuthenticator.cpp
+++ b/ndb/src/common/util/SocketAuthenticator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/SocketClient.cpp b/ndb/src/common/util/SocketClient.cpp
index f4f2babf312..c2825901929 100644
--- a/ndb/src/common/util/SocketClient.cpp
+++ b/ndb/src/common/util/SocketClient.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -27,6 +26,7 @@ SocketClient::SocketClient(const char *server_name, unsigned short port, SocketA
m_port= port;
m_server_name= server_name ? strdup(server_name) : 0;
m_sockfd= NDB_INVALID_SOCKET;
+ m_connect_timeout_sec= 0;
}
SocketClient::~SocketClient()
@@ -59,7 +59,7 @@ SocketClient::init()
if (m_sockfd == NDB_INVALID_SOCKET) {
return false;
}
-
+
DBUG_PRINT("info",("NDB_SOCKET: %d", m_sockfd));
return true;
@@ -105,6 +105,13 @@ SocketClient::bind(const char* bindaddress, unsigned short localport)
NDB_SOCKET_TYPE
SocketClient::connect(const char *toaddress, unsigned short toport)
{
+ fd_set rset, wset;
+ struct timeval tval;
+ int r;
+ bool use_timeout;
+ SOCKOPT_OPTLEN_TYPE len;
+ int flags;
+
if (m_sockfd == NDB_INVALID_SOCKET)
{
if (!init()) {
@@ -128,14 +135,58 @@ SocketClient::connect(const char *toaddress, unsigned short toport)
if (Ndb_getInAddr(&m_servaddr.sin_addr, m_server_name))
return NDB_INVALID_SOCKET;
}
-
- const int r = ::connect(m_sockfd, (struct sockaddr*) &m_servaddr, sizeof(m_servaddr));
- if (r == -1) {
+
+ flags= fcntl(m_sockfd, F_GETFL, 0);
+ fcntl(m_sockfd, F_SETFL, flags | O_NONBLOCK);
+
+ r= ::connect(m_sockfd, (struct sockaddr*) &m_servaddr, sizeof(m_servaddr));
+
+ if (r == 0)
+ goto done; // connected immediately.
+
+ if (r < 0 && (errno != EINPROGRESS)) {
+ NDB_CLOSE_SOCKET(m_sockfd);
+ m_sockfd= NDB_INVALID_SOCKET;
+ return NDB_INVALID_SOCKET;
+ }
+
+ FD_ZERO(&rset);
+ FD_SET(m_sockfd, &rset);
+ wset= rset;
+ tval.tv_sec= m_connect_timeout_sec;
+ tval.tv_usec= 0;
+ use_timeout= m_connect_timeout_sec;
+
+ if ((r= select(m_sockfd+1, &rset, &wset, NULL,
+ use_timeout? &tval : NULL)) == 0)
+ {
NDB_CLOSE_SOCKET(m_sockfd);
m_sockfd= NDB_INVALID_SOCKET;
return NDB_INVALID_SOCKET;
}
+ if (FD_ISSET(m_sockfd, &rset) || FD_ISSET(m_sockfd, &wset))
+ {
+ len= sizeof(r);
+ if (getsockopt(m_sockfd, SOL_SOCKET, SO_ERROR, &r, &len) < 0 || r)
+ {
+ // Solaris got an error... different than others
+ NDB_CLOSE_SOCKET(m_sockfd);
+ m_sockfd= NDB_INVALID_SOCKET;
+ return NDB_INVALID_SOCKET;
+ }
+ }
+ else
+ {
+ // select error, probably m_sockfd not set.
+ NDB_CLOSE_SOCKET(m_sockfd);
+ m_sockfd= NDB_INVALID_SOCKET;
+ return NDB_INVALID_SOCKET;
+ }
+
+done:
+ fcntl(m_sockfd, F_SETFL, flags);
+
if (m_auth) {
if (!m_auth->client_authenticate(m_sockfd))
{
diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp
index f9d2c7463be..ab05a988c14 100644
--- a/ndb/src/common/util/SocketServer.cpp
+++ b/ndb/src/common/util/SocketServer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/basestring_vsnprintf.c b/ndb/src/common/util/basestring_vsnprintf.c
index f5d01fb1532..07762a4e503 100644
--- a/ndb/src/common/util/basestring_vsnprintf.c
+++ b/ndb/src/common/util/basestring_vsnprintf.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/filetest/FileUnitTest.cpp b/ndb/src/common/util/filetest/FileUnitTest.cpp
index b6e7b7e8ec0..35b86623351 100644
--- a/ndb/src/common/util/filetest/FileUnitTest.cpp
+++ b/ndb/src/common/util/filetest/FileUnitTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/filetest/FileUnitTest.hpp b/ndb/src/common/util/filetest/FileUnitTest.hpp
index a589615e9b2..231c5919244 100644
--- a/ndb/src/common/util/filetest/FileUnitTest.hpp
+++ b/ndb/src/common/util/filetest/FileUnitTest.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/md5_hash.cpp b/ndb/src/common/util/md5_hash.cpp
index d4eedbc40fb..4b5c5623886 100644
--- a/ndb/src/common/util/md5_hash.cpp
+++ b/ndb/src/common/util/md5_hash.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/ndb_init.c b/ndb/src/common/util/ndb_init.c
index f3aa734d7f9..8b5bbf79bb2 100644
--- a/ndb/src/common/util/ndb_init.c
+++ b/ndb/src/common/util/ndb_init.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/new.cpp b/ndb/src/common/util/new.cpp
index 643800f1582..bc9db0d749f 100644
--- a/ndb/src/common/util/new.cpp
+++ b/ndb/src/common/util/new.cpp
@@ -1,3 +1,17 @@
+/* Copyright (C) 2004-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#include <ndb_global.h>
#include <NdbMem.h>
diff --git a/ndb/src/common/util/random.c b/ndb/src/common/util/random.c
index 21235763793..3d4a48e7ef0 100644
--- a/ndb/src/common/util/random.c
+++ b/ndb/src/common/util/random.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/socket_io.cpp b/ndb/src/common/util/socket_io.cpp
index ba2794e4374..9bc6b4d53fb 100644
--- a/ndb/src/common/util/socket_io.cpp
+++ b/ndb/src/common/util/socket_io.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -53,10 +52,6 @@ readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis,
if(buflen <= 1)
return 0;
- int sock_flags= fcntl(socket, F_GETFL);
- if(fcntl(socket, F_SETFL, sock_flags | O_NONBLOCK) == -1)
- return -1;
-
fd_set readset;
FD_ZERO(&readset);
FD_SET(socket, &readset);
@@ -71,43 +66,70 @@ readln_socket(NDB_SOCKET_TYPE socket, int timeout_millis,
}
if(selectRes == -1){
- fcntl(socket, F_SETFL, sock_flags);
return -1;
}
- const int t = recv(socket, buf, buflen, MSG_PEEK);
-
- if(t < 1)
+ char* ptr = buf;
+ int len = buflen;
+ do
{
- fcntl(socket, F_SETFL, sock_flags);
- return -1;
- }
+ int t;
+ while((t = recv(socket, ptr, len, MSG_PEEK)) == -1 && errno == EINTR);
+
+ if(t < 1)
+ {
+ return -1;
+ }
- for(int i=0; i< t;i++)
- {
- if(buf[i] == '\n'){
- int r= recv(socket, buf, i+1, 0);
- buf[i+1]= 0;
- if(r < 1) {
- fcntl(socket, F_SETFL, sock_flags);
- return -1;
+
+ for(int i = 0; i<t; i++)
+ {
+ if(ptr[i] == '\n')
+ {
+ /**
+ * Now consume
+ */
+ for (len = 1 + i; len; )
+ {
+ while ((t = recv(socket, ptr, len, 0)) == -1 && errno == EINTR);
+ if (t < 1)
+ return -1;
+ ptr += t;
+ len -= t;
+ }
+ if (i > 0 && buf[i-1] == '\r')
+ {
+ buf[i-1] = '\n';
+ ptr--;
+ }
+ ptr[0]= 0;
+ return ptr - buf;
}
-
- if(i > 0 && buf[i-1] == '\r'){
- buf[i-1] = '\n';
- buf[i]= '\0';
+ }
+
+ for (int tmp = t; tmp; )
+ {
+ while ((t = recv(socket, ptr, tmp, 0)) == -1 && errno == EINTR);
+ if (t < 1)
+ {
+ return -1;
}
-
- fcntl(socket, F_SETFL, sock_flags);
- return r;
+ ptr += t;
+ len -= t;
+ tmp -= t;
}
- }
- int r= recv(socket, buf, t, 0);
- if(r>=0)
- buf[r] = 0;
- fcntl(socket, F_SETFL, sock_flags);
- return r;
+ FD_ZERO(&readset);
+ FD_SET(socket, &readset);
+ timeout.tv_sec = (timeout_millis / 1000);
+ timeout.tv_usec = (timeout_millis % 1000) * 1000;
+ const int selectRes = select(socket + 1, &readset, 0, 0, &timeout);
+ if(selectRes != 1){
+ return -1;
+ }
+ } while (len > 0);
+
+ return -1;
}
extern "C"
diff --git a/ndb/src/common/util/strdup.c b/ndb/src/common/util/strdup.c
index d8f4d99bd28..d26b94fdb25 100644
--- a/ndb/src/common/util/strdup.c
+++ b/ndb/src/common/util/strdup.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/testConfigValues/testConfigValues.cpp b/ndb/src/common/util/testConfigValues/testConfigValues.cpp
index 362deb1ddad..b887808c62e 100644
--- a/ndb/src/common/util/testConfigValues/testConfigValues.cpp
+++ b/ndb/src/common/util/testConfigValues/testConfigValues.cpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <ConfigValues.hpp>
#include <NdbOut.hpp>
#include <stdlib.h>
diff --git a/ndb/src/common/util/testProperties/testProperties.cpp b/ndb/src/common/util/testProperties/testProperties.cpp
index e445f7ca3e4..c4120e92400 100644
--- a/ndb/src/common/util/testProperties/testProperties.cpp
+++ b/ndb/src/common/util/testProperties/testProperties.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/testSimpleProperties/sp_test.cpp b/ndb/src/common/util/testSimpleProperties/sp_test.cpp
index d4052b64132..ebc445a77ad 100644
--- a/ndb/src/common/util/testSimpleProperties/sp_test.cpp
+++ b/ndb/src/common/util/testSimpleProperties/sp_test.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/uucode.c b/ndb/src/common/util/uucode.c
index da34d565153..ad2db2fcbbe 100644
--- a/ndb/src/common/util/uucode.c
+++ b/ndb/src/common/util/uucode.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/common/util/version.c b/ndb/src/common/util/version.c
index 8076db576c2..e3c9f104efa 100644
--- a/ndb/src/common/util/version.c
+++ b/ndb/src/common/util/version.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/Makefile.am b/ndb/src/cw/Makefile.am
index 7348fc9eab6..d9a40002062 100644
--- a/ndb/src/cw/Makefile.am
+++ b/ndb/src/cw/Makefile.am
@@ -1,4 +1,21 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = cpcd
windoze-dsp:
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp b/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp
index 59ee3e90451..b1d599dda63 100644
--- a/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp
+++ b/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h b/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h
index cf7670948a7..692248cf9ea 100644
--- a/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h
+++ b/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp b/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp
index 6bbc9a9859b..8feadf9462c 100644
--- a/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp
+++ b/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp b/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp
index 8fcdb4ce158..2515c6f1b54 100644
--- a/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp
+++ b/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcc-win32/C++/StdAfx.h b/ndb/src/cw/cpcc-win32/C++/StdAfx.h
index 370d04fb466..830735d4c09 100644
--- a/ndb/src/cw/cpcc-win32/C++/StdAfx.h
+++ b/ndb/src/cw/cpcc-win32/C++/StdAfx.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcc-win32/C++/TreeView.cpp b/ndb/src/cw/cpcc-win32/C++/TreeView.cpp
index db5c62f14bb..28cd75550c8 100644
--- a/ndb/src/cw/cpcc-win32/C++/TreeView.cpp
+++ b/ndb/src/cw/cpcc-win32/C++/TreeView.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcc-win32/C++/TreeView.h b/ndb/src/cw/cpcc-win32/C++/TreeView.h
index 595f9bd6cdc..6e87f3819de 100644
--- a/ndb/src/cw/cpcc-win32/C++/TreeView.h
+++ b/ndb/src/cw/cpcc-win32/C++/TreeView.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcc-win32/C++/resource.h b/ndb/src/cw/cpcc-win32/C++/resource.h
index 0bec552edf6..9bcd7d53b6f 100644
--- a/ndb/src/cw/cpcc-win32/C++/resource.h
+++ b/ndb/src/cw/cpcc-win32/C++/resource.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/APIService.cpp b/ndb/src/cw/cpcd/APIService.cpp
index e7a2092c15d..5bbf2c86e23 100644
--- a/ndb/src/cw/cpcd/APIService.cpp
+++ b/ndb/src/cw/cpcd/APIService.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/APIService.hpp b/ndb/src/cw/cpcd/APIService.hpp
index 3586d64187e..c13d0d886b4 100644
--- a/ndb/src/cw/cpcd/APIService.hpp
+++ b/ndb/src/cw/cpcd/APIService.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/CPCD.cpp b/ndb/src/cw/cpcd/CPCD.cpp
index 69a7b840528..24afb0ea0b5 100644
--- a/ndb/src/cw/cpcd/CPCD.cpp
+++ b/ndb/src/cw/cpcd/CPCD.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/CPCD.hpp b/ndb/src/cw/cpcd/CPCD.hpp
index 3a69a03aa3f..2cada43b609 100644
--- a/ndb/src/cw/cpcd/CPCD.hpp
+++ b/ndb/src/cw/cpcd/CPCD.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/Makefile.am b/ndb/src/cw/cpcd/Makefile.am
index 75f557b2af7..a4fc65a8403 100644
--- a/ndb/src/cw/cpcd/Makefile.am
+++ b/ndb/src/cw/cpcd/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
ndbbin_PROGRAMS = ndb_cpcd
diff --git a/ndb/src/cw/cpcd/Monitor.cpp b/ndb/src/cw/cpcd/Monitor.cpp
index 141de926d4d..7afbb8d7959 100644
--- a/ndb/src/cw/cpcd/Monitor.cpp
+++ b/ndb/src/cw/cpcd/Monitor.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/Process.cpp b/ndb/src/cw/cpcd/Process.cpp
index 431c96e3320..de61e54888d 100644
--- a/ndb/src/cw/cpcd/Process.cpp
+++ b/ndb/src/cw/cpcd/Process.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/common.cpp b/ndb/src/cw/cpcd/common.cpp
index 53c0e4d5a64..aaadaeed2e3 100644
--- a/ndb/src/cw/cpcd/common.cpp
+++ b/ndb/src/cw/cpcd/common.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/common.hpp b/ndb/src/cw/cpcd/common.hpp
index 4f5f702762f..044a7eb67c3 100644
--- a/ndb/src/cw/cpcd/common.hpp
+++ b/ndb/src/cw/cpcd/common.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/cpcd/main.cpp b/ndb/src/cw/cpcd/main.cpp
index 137735c9e76..7021b4bc68d 100644
--- a/ndb/src/cw/cpcd/main.cpp
+++ b/ndb/src/cw/cpcd/main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/test/socketclient/socketClientTest.cpp b/ndb/src/cw/test/socketclient/socketClientTest.cpp
index 423c196aa43..a3da256a7ad 100644
--- a/ndb/src/cw/test/socketclient/socketClientTest.cpp
+++ b/ndb/src/cw/test/socketclient/socketClientTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/util/ClientInterface.cpp b/ndb/src/cw/util/ClientInterface.cpp
index 627b622f1dd..bc74698de76 100644
--- a/ndb/src/cw/util/ClientInterface.cpp
+++ b/ndb/src/cw/util/ClientInterface.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/util/ClientInterface.hpp b/ndb/src/cw/util/ClientInterface.hpp
index 66ecfe05197..3496595145e 100644
--- a/ndb/src/cw/util/ClientInterface.hpp
+++ b/ndb/src/cw/util/ClientInterface.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/util/SocketRegistry.cpp b/ndb/src/cw/util/SocketRegistry.cpp
index 1dbb402f7c9..ab94f772501 100644
--- a/ndb/src/cw/util/SocketRegistry.cpp
+++ b/ndb/src/cw/util/SocketRegistry.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/util/SocketRegistry.hpp b/ndb/src/cw/util/SocketRegistry.hpp
index 2b079156967..0166232d4c8 100644
--- a/ndb/src/cw/util/SocketRegistry.hpp
+++ b/ndb/src/cw/util/SocketRegistry.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/util/SocketService.cpp b/ndb/src/cw/util/SocketService.cpp
index b993ec8c2c1..7b423e5546e 100644
--- a/ndb/src/cw/util/SocketService.cpp
+++ b/ndb/src/cw/util/SocketService.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/cw/util/SocketService.hpp b/ndb/src/cw/util/SocketService.hpp
index 7a0c3a2fd91..770d5d8ec96 100644
--- a/ndb/src/cw/util/SocketService.hpp
+++ b/ndb/src/cw/util/SocketService.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/Makefile.am b/ndb/src/kernel/Makefile.am
index 6e075f0f248..860acf39830 100644
--- a/ndb/src/kernel/Makefile.am
+++ b/ndb/src/kernel/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = error blocks vm
include $(top_srcdir)/ndb/config/common.mk.am
diff --git a/ndb/src/kernel/SimBlockList.cpp b/ndb/src/kernel/SimBlockList.cpp
index 271d515dc92..b585a3a17d1 100644
--- a/ndb/src/kernel/SimBlockList.cpp
+++ b/ndb/src/kernel/SimBlockList.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ERROR_codes.txt b/ndb/src/kernel/blocks/ERROR_codes.txt
index 74d5df2c1e6..0bcc99a6334 100644
--- a/ndb/src/kernel/blocks/ERROR_codes.txt
+++ b/ndb/src/kernel/blocks/ERROR_codes.txt
@@ -6,7 +6,7 @@ Next DBTUP 4014
Next DBLQH 5043
Next DBDICT 6007
Next DBDIH 7178
-Next DBTC 8038
+Next DBTC 8039
Next CMVMI 9000
Next BACKUP 10022
Next DBUTIL 11002
@@ -21,6 +21,9 @@ Crash president when he starts to run in ArbitState 1-9.
910: Crash new president after node crash
+935 : Crash master on node failure (delayed)
+ and skip sending GSN_COMMIT_FAILREQ to specified node
+
ERROR CODES FOR TESTING NODE FAILURE, GLOBAL CHECKPOINT HANDLING:
-----------------------------------------------------------------
@@ -287,6 +290,11 @@ ABORT OF TCKEYREQ
8037 : Invalid schema version in TCINDXREQ
+------
+
+8038 : Simulate API disconnect just after SCAN_TAB_REQ
+
+
CMVMI
-----
9000 Set RestartOnErrorInsert to restart -n
diff --git a/ndb/src/kernel/blocks/Makefile.am b/ndb/src/kernel/blocks/Makefile.am
index 8addf257003..9c7227fa0bf 100644
--- a/ndb/src/kernel/blocks/Makefile.am
+++ b/ndb/src/kernel/blocks/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = \
cmvmi \
dbacc \
@@ -16,3 +31,6 @@ SUBDIRS = \
dbtux
windoze-dsp:
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/src/kernel/blocks/backup/Backup.cpp b/ndb/src/kernel/blocks/backup/Backup.cpp
index 8f3f6ffe55c..70721bfca56 100644
--- a/ndb/src/kernel/blocks/backup/Backup.cpp
+++ b/ndb/src/kernel/blocks/backup/Backup.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/backup/Backup.hpp b/ndb/src/kernel/blocks/backup/Backup.hpp
index e869cbf9544..8b0c27727b0 100644
--- a/ndb/src/kernel/blocks/backup/Backup.hpp
+++ b/ndb/src/kernel/blocks/backup/Backup.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/backup/BackupFormat.hpp b/ndb/src/kernel/blocks/backup/BackupFormat.hpp
index b8ffff3a294..f8069ba3f37 100644
--- a/ndb/src/kernel/blocks/backup/BackupFormat.hpp
+++ b/ndb/src/kernel/blocks/backup/BackupFormat.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/backup/BackupInit.cpp b/ndb/src/kernel/blocks/backup/BackupInit.cpp
index 96c11468939..5d65a68bab2 100644
--- a/ndb/src/kernel/blocks/backup/BackupInit.cpp
+++ b/ndb/src/kernel/blocks/backup/BackupInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/backup/FsBuffer.hpp b/ndb/src/kernel/blocks/backup/FsBuffer.hpp
index 2f3c7daae43..a6cfe9f86e0 100644
--- a/ndb/src/kernel/blocks/backup/FsBuffer.hpp
+++ b/ndb/src/kernel/blocks/backup/FsBuffer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/backup/Makefile.am b/ndb/src/kernel/blocks/backup/Makefile.am
index c8f44f31292..6f04a5c1158 100644
--- a/ndb/src/kernel/blocks/backup/Makefile.am
+++ b/ndb/src/kernel/blocks/backup/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LIBRARIES = libbackup.a
diff --git a/ndb/src/kernel/blocks/backup/read.cpp b/ndb/src/kernel/blocks/backup/read.cpp
index 89cc08ee9de..3c1af930f4f 100644
--- a/ndb/src/kernel/blocks/backup/read.cpp
+++ b/ndb/src/kernel/blocks/backup/read.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
index 44f9917438f..5dd1e527dd2 100644
--- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -91,6 +90,7 @@ Cmvmi::Cmvmi(const Configuration & conf) :
addRecSignal(GSN_DUMP_STATE_ORD, &Cmvmi::execDUMP_STATE_ORD);
addRecSignal(GSN_TESTSIG, &Cmvmi::execTESTSIG);
+ addRecSignal(GSN_NODE_START_REP, &Cmvmi::execNODE_START_REP, true);
subscriberPool.setSize(5);
@@ -340,6 +340,16 @@ void Cmvmi::execSTTOR(Signal* signal)
jamEntry();
if (theStartPhase == 1){
jam();
+
+ if(theConfig.lockPagesInMainMemory() == 1)
+ {
+ int res = NdbMem_MemLockAll(0);
+ if(res != 0){
+ g_eventLogger.warning("Failed to memlock pages");
+ warningEvent("Failed to memlock pages");
+ }
+ }
+
sendSTTORRY(signal);
return;
} else if (theStartPhase == 3) {
@@ -360,18 +370,6 @@ void Cmvmi::execSTTOR(Signal* signal)
execOPEN_COMREQ(signal);
globalData.theStartLevel = NodeState::SL_STARTED;
sendSTTORRY(signal);
- } else {
- jam();
-
- if(theConfig.lockPagesInMainMemory()){
- int res = NdbMem_MemLockAll();
- if(res != 0){
- g_eventLogger.warning("Failed to memlock pages");
- warningEvent("Failed to memlock pages");
- }
- }
-
- sendSTTORRY(signal);
}
}
@@ -425,7 +423,8 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal)
if(len == 2){
#ifdef ERROR_INSERT
- if (! (ERROR_INSERTED(9000) && c_error_9000_nodes_mask.get(tStartingNode)))
+ if (! ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002))
+ && c_error_9000_nodes_mask.get(tStartingNode)))
#endif
{
globalTransporterRegistry.do_connect(tStartingNode);
@@ -446,7 +445,8 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal)
jam();
#ifdef ERROR_INSERT
- if (ERROR_INSERTED(9000) && c_error_9000_nodes_mask.get(i))
+ if ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002))
+ && c_error_9000_nodes_mask.get(i))
continue;
#endif
@@ -697,6 +697,7 @@ Cmvmi::execTEST_ORD(Signal * signal){
// Do nothing
break;
}
+ globalSignalLoggers.flushSignalLog();
}
#endif
@@ -787,6 +788,21 @@ Cmvmi::execSTART_ORD(Signal* signal) {
if(globalData.theStartLevel == NodeState::SL_CMVMI){
jam();
+
+ if(theConfig.lockPagesInMainMemory() == 2)
+ {
+ int res = NdbMem_MemLockAll(1);
+ if(res != 0)
+ {
+ g_eventLogger.warning("Failed to memlock pages");
+ warningEvent("Failed to memlock pages");
+ }
+ else
+ {
+ g_eventLogger.info("Locked future allocations");
+ }
+ }
+
globalData.theStartLevel = NodeState::SL_STARTING;
globalData.theRestartFlag = system_started;
/**
@@ -1144,9 +1160,9 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
}
#ifdef ERROR_INSERT
- if (arg == 9000)
+ if (arg == 9000 || arg == 9002)
{
- SET_ERROR_INSERT_VALUE(9000);
+ SET_ERROR_INSERT_VALUE(arg);
for (Uint32 i = 1; i<signal->getLength(); i++)
c_error_9000_nodes_mask.set(signal->theData[i]);
}
@@ -1193,6 +1209,17 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal)
#endif
}//Cmvmi::execDUMP_STATE_ORD()
+void
+Cmvmi::execNODE_START_REP(Signal* signal)
+{
+#ifdef ERROR_INSERT
+ if (ERROR_INSERTED(9002) && signal->theData[0] == getOwnNodeId())
+ {
+ signal->theData[0] = 9001;
+ execDUMP_STATE_ORD(signal);
+ }
+#endif
+}
BLOCK_FUNCTIONS(Cmvmi)
diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp
index f89c8f15e86..e3a20795701 100644
--- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp
+++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -72,7 +71,8 @@ private:
void handleSET_VAR_REQ(Signal* signal);
void execTESTSIG(Signal* signal);
-
+ void execNODE_START_REP(Signal* signal);
+
char theErrorMessage[256];
void sendSTTORRY(Signal* signal);
diff --git a/ndb/src/kernel/blocks/cmvmi/Makefile.am b/ndb/src/kernel/blocks/cmvmi/Makefile.am
index dc2e12746fd..c3150080500 100644
--- a/ndb/src/kernel/blocks/cmvmi/Makefile.am
+++ b/ndb/src/kernel/blocks/cmvmi/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LIBRARIES = libcmvmi.a
diff --git a/ndb/src/kernel/blocks/dbacc/Dbacc.hpp b/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
index 7f51a281f37..43810a08ac7 100644
--- a/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
+++ b/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp b/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
index e560d924e5a..024a32ca95c 100644
--- a/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
+++ b/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
index 2652da97aea..40af5a52c03 100644
--- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbacc/Makefile.am b/ndb/src/kernel/blocks/dbacc/Makefile.am
index ca1b1efac37..b8879677530 100644
--- a/ndb/src/kernel/blocks/dbacc/Makefile.am
+++ b/ndb/src/kernel/blocks/dbacc/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LIBRARIES = libdbacc.a
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 2eca2a76c45..7b82631884f 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -10184,6 +10183,15 @@ Dbdict::checkDictLockQueue(Signal* signal, bool poll)
break;
}
+ if (c_blockState != BS_IDLE)
+ {
+ /**
+ * If state is BS_NODE_FAILURE, it might be that no op is running
+ */
+ jam();
+ break;
+ }
+
ndbrequire(c_blockState == BS_IDLE);
lockPtr.p->locked = true;
c_blockState = lockPtr.p->lt->blockState;
diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
index 82644826d5b..49b85affdcd 100644
--- a/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+++ b/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbdict/Makefile.am b/ndb/src/kernel/blocks/dbdict/Makefile.am
index 3c1cf6735d9..b43a938dc49 100644
--- a/ndb/src/kernel/blocks/dbdict/Makefile.am
+++ b/ndb/src/kernel/blocks/dbdict/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libdbdict.a
EXTRA_PROGRAMS = printSchemaFile
diff --git a/ndb/src/kernel/blocks/dbdict/Master_AddTable.sfl b/ndb/src/kernel/blocks/dbdict/Master_AddTable.sfl
index 1bcec156ef7..89dfd56fd40 100644
--- a/ndb/src/kernel/blocks/dbdict/Master_AddTable.sfl
+++ b/ndb/src/kernel/blocks/dbdict/Master_AddTable.sfl
@@ -1,8 +1,21 @@
+// Copyright (C) 2004 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// ---------------------------------------------------------------------------
// This file contains a signal log trace for DBDICT at the master for a
// create table. Another file contains the signal log for the participant
// node. Master node is 2, participant node 4 and api node is 3.
-//
// ---------------------------------------------------------------------------
// First arrives the table description in a number of DICTTABINFO signals.
diff --git a/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp b/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
index 0226991a073..b8af0f2b5de 100644
--- a/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
+++ b/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbdict/Slave_AddTable.sfl b/ndb/src/kernel/blocks/dbdict/Slave_AddTable.sfl
index 8740be9595d..4c018ea5460 100644
--- a/ndb/src/kernel/blocks/dbdict/Slave_AddTable.sfl
+++ b/ndb/src/kernel/blocks/dbdict/Slave_AddTable.sfl
@@ -1,3 +1,22 @@
+// Copyright (C) 2004 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+// ---------------------------------------------------------------------------
+// This file contains a signal log trace for DBDICT at the master for a
+// create table. Another file contains the signal log for the participant
+// node. Master node is 2, participant node 4 and api node is 3.
+
// ---------------------------------------------------------------------------
// This file contains a signal log trace for DBDICT at the participant for a
// add table. Another file contains the signal log for the master
diff --git a/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp b/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
index f73654fd9d5..1e0faf59275 100644
--- a/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
+++ b/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
index 53e54e96d2b..e8f24876979 100644
--- a/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
+++ b/ndb/src/kernel/blocks/dbdih/Dbdih.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1602,7 +1601,7 @@ private:
void startInfoReply(Signal *, Uint32 nodeId);
// DIH specifics for execNODE_START_REP (sendDictUnlockOrd)
- void exec_node_start_rep(Signal* signal);
+ void execNODE_START_REP(Signal* signal);
/*
* Lock master DICT. Only current use is by starting node
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp b/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
index 2b878034258..360f320cb74 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -269,7 +268,8 @@ Dbdih::Dbdih(const class Configuration & config):
addRecSignal(GSN_DICT_LOCK_CONF, &Dbdih::execDICT_LOCK_CONF);
addRecSignal(GSN_DICT_LOCK_REF, &Dbdih::execDICT_LOCK_REF);
-
+ addRecSignal(GSN_NODE_START_REP, &Dbdih::execNODE_START_REP, true);
+
apiConnectRecord = 0;
connectRecord = 0;
fileRecord = 0;
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index 4aeb8136650..5ee3ac8d67d 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1390,7 +1389,7 @@ void Dbdih::execNDB_STTOR(Signal* signal)
}//Dbdih::execNDB_STTOR()
void
-Dbdih::exec_node_start_rep(Signal* signal)
+Dbdih::execNODE_START_REP(Signal* signal)
{
/*
* Send DICT_UNLOCK_ORD when this node is SL_STARTED.
@@ -3555,7 +3554,6 @@ void Dbdih::endTakeOver(Uint32 takeOverPtrI)
takeOverPtr.i = takeOverPtrI;
ptrCheckGuard(takeOverPtr, MAX_NDB_NODES, takeOverRecord);
- releaseTakeOver(takeOverPtrI);
if ((takeOverPtr.p->toMasterStatus != TakeOverRecord::IDLE) &&
(takeOverPtr.p->toMasterStatus != TakeOverRecord::TO_WAIT_START_TAKE_OVER)) {
jam();
@@ -3569,6 +3567,7 @@ void Dbdih::endTakeOver(Uint32 takeOverPtrI)
}//if
setAllowNodeStart(takeOverPtr.p->toStartingNode, true);
initTakeOver(takeOverPtr);
+ releaseTakeOver(takeOverPtrI);
}//Dbdih::endTakeOver()
void Dbdih::releaseTakeOver(Uint32 takeOverPtrI)
@@ -4710,6 +4709,7 @@ void Dbdih::handleTakeOverNewMaster(Signal* signal, Uint32 takeOverPtrI)
break;
}
ndbrequire(ok);
+ endTakeOver(takeOverPtr.i);
}//if
}//Dbdih::handleTakeOverNewMaster()
diff --git a/ndb/src/kernel/blocks/dbdih/Makefile.am b/ndb/src/kernel/blocks/dbdih/Makefile.am
index 3b5ae716a63..0d9c7db4e69 100644
--- a/ndb/src/kernel/blocks/dbdih/Makefile.am
+++ b/ndb/src/kernel/blocks/dbdih/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libdbdih.a
EXTRA_PROGRAMS = ndbd_sysfile_reader
diff --git a/ndb/src/kernel/blocks/dbdih/Sysfile.hpp b/ndb/src/kernel/blocks/dbdih/Sysfile.hpp
index 3e2f3b0dd48..3502a6981bc 100644
--- a/ndb/src/kernel/blocks/dbdih/Sysfile.hpp
+++ b/ndb/src/kernel/blocks/dbdih/Sysfile.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp b/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
index efa4b9c92c5..8ef69cff388 100644
--- a/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
+++ b/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
index 299cad16ec1..817832bdfcb 100644
--- a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
+++ b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -236,6 +235,7 @@
#define ZOPERATION_EVENT_REP 19
#define ZPREP_DROP_TABLE 20
#define ZENABLE_EXPAND_CHECK 21
+#define ZRETRY_TCKEYREF 22
/* ------------------------------------------------------------------------- */
/* NODE STATE DURING SYSTEM RESTART, VARIABLES CNODES_SR_STATE */
@@ -2276,6 +2276,7 @@ private:
void releaseScanrec(Signal* signal);
void seizeScanrec(Signal* signal);
Uint32 sendKeyinfo20(Signal* signal, ScanRecord *, TcConnectionrec *);
+ void sendTCKEYREF(Signal*, Uint32 dst, Uint32 route, Uint32 cnt);
void sendScanFragConf(Signal* signal, Uint32 scanCompleted);
void initCopyrec(Signal* signal);
void initCopyTc(Signal* signal);
diff --git a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
index ba18e20f4fb..0b395e250c1 100644
--- a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
+++ b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index 4739450884c..6a439b24c03 100644
--- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -464,6 +463,22 @@ void Dblqh::execCONTINUEB(Signal* signal)
return;
}
}
+ case ZRETRY_TCKEYREF:
+ {
+ jam();
+ Uint32 cnt = signal->theData[1];
+ Uint32 ref = signal->theData[2];
+ if (cnt < (10 * 60 * 5))
+ {
+ jam();
+ /**
+ * Only retry for 5 minutes...then hope that API has handled it..somehow
+ */
+ memmove(signal->theData, signal->theData+3, 4*TcKeyRef::SignalLength);
+ sendTCKEYREF(signal, ref, 0, cnt);
+ }
+ return;
+ }
default:
ndbrequire(false);
break;
@@ -2370,7 +2385,7 @@ void Dblqh::noFreeRecordLab(Signal* signal,
tcKeyRef->transId[0] = transid1;
tcKeyRef->transId[1] = transid2;
tcKeyRef->errorCode = errCode;
- sendSignal(apiRef, GSN_TCKEYREF, signal, TcKeyRef::SignalLength, JBB);
+ sendTCKEYREF(signal, apiRef, signal->getSendersBlockRef(), 0);
} else {
jam();
@@ -6576,8 +6591,7 @@ void Dblqh::continueAfterLogAbortWriteLab(Signal* signal)
tcKeyRef->transId[0] = regTcPtr->transid[0];
tcKeyRef->transId[1] = regTcPtr->transid[1];
tcKeyRef->errorCode = regTcPtr->errorCode;
- sendSignal(regTcPtr->applRef,
- GSN_TCKEYREF, signal, TcKeyRef::SignalLength, JBB);
+ sendTCKEYREF(signal, regTcPtr->applRef, regTcPtr->clientBlockref, 0);
cleanUp(signal);
return;
}//if
@@ -6612,6 +6626,29 @@ void Dblqh::continueAfterLogAbortWriteLab(Signal* signal)
cleanUp(signal);
}//Dblqh::continueAfterLogAbortWriteLab()
+void
+Dblqh::sendTCKEYREF(Signal* signal, Uint32 ref, Uint32 routeRef, Uint32 cnt)
+{
+ const Uint32 nodeId = refToNode(ref);
+ const bool connectedToNode = getNodeInfo(nodeId).m_connected;
+
+ if (likely(connectedToNode))
+ {
+ jam();
+ sendSignal(ref, GSN_TCKEYREF, signal, TcKeyRef::SignalLength, JBB);
+ }
+ else
+ {
+ jam();
+ memmove(signal->theData + 3, signal->theData, 4*TcKeyRef::SignalLength);
+ signal->theData[0] = ZRETRY_TCKEYREF;
+ signal->theData[1] = cnt + 1;
+ signal->theData[2] = ref;
+ sendSignalWithDelay(reference(), GSN_CONTINUEB, signal, 100,
+ TcKeyRef::SignalLength + 3);
+ }
+}
+
/* ##########################################################################
* ####### MODULE TO HANDLE TC FAILURE #######
*
diff --git a/ndb/src/kernel/blocks/dblqh/Makefile.am b/ndb/src/kernel/blocks/dblqh/Makefile.am
index bb8efe8c5b8..07c6ea1ea52 100644
--- a/ndb/src/kernel/blocks/dblqh/Makefile.am
+++ b/ndb/src/kernel/blocks/dblqh/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libdblqh.a
EXTRA_PROGRAMS = ndbd_redo_log_reader
diff --git a/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp b/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
index 6eadefe5df5..e164931eda3 100644
--- a/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
+++ b/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp b/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp
index 06bf7a85d53..1559494684e 100644
--- a/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp
+++ b/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp b/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp
index 751d27db74e..e5df14aea9a 100644
--- a/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp
+++ b/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
index bf6ce7129ba..d6c4529bb72 100644
--- a/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
+++ b/ndb/src/kernel/blocks/dbtc/Dbtc.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -139,7 +138,6 @@
#define ZNOT_FOUND 626
#define ZALREADYEXIST 630
-#define ZINCONSISTENTHASHINDEX 892
#define ZNOTUNIQUE 893
#define ZINVALID_KEY 290
@@ -942,7 +940,8 @@ public:
NF_CHECK_SCAN = 0x2,
NF_CHECK_TRANSACTION = 0x4,
NF_CHECK_DROP_TAB = 0x8,
- NF_NODE_FAIL_BITS = 0xF // All bits...
+ NF_NODE_FAIL_BITS = 0xF, // All bits...
+ NF_STARTED = 0x10
};
Uint32 m_nf_bits;
NdbNodeBitmask m_lqh_trans_conf;
@@ -1319,6 +1318,7 @@ private:
void execCOMMITCONF(Signal* signal);
void execABORTCONF(Signal* signal);
void execNODE_FAILREP(Signal* signal);
+ void execNODE_START_REP(Signal* signal);
void execINCL_NODEREQ(Signal* signal);
void execTIME_SIGNAL(Signal* signal);
void execAPI_FAILREQ(Signal* signal);
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp b/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
index 7bd308119fc..0b46f598a89 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -290,7 +289,8 @@ Dbtc::Dbtc(const class Configuration & conf):
addRecSignal(GSN_WAIT_DROP_TAB_CONF, &Dbtc::execWAIT_DROP_TAB_CONF);
addRecSignal(GSN_ALTER_TAB_REQ, &Dbtc::execALTER_TAB_REQ);
-
+ addRecSignal(GSN_NODE_START_REP, &Dbtc::execNODE_START_REP, true);
+
cacheRecord = 0;
apiConnectRecord = 0;
tcConnectRecord = 0;
diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index cc39219590f..2b2e0e649a4 100644
--- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -3068,7 +3067,28 @@ void Dbtc::tckeyreq050Lab(Signal* signal)
}//if
}//for
}
- }//if
+
+ if (regTcPtr->tcNodedata[0] != getOwnNodeId())
+ {
+ jam();
+ for (Uint32 i = 0; i < tnoOfBackup + 1; i++)
+ {
+ HostRecordPtr hostPtr;
+ hostPtr.i = regTcPtr->tcNodedata[i];
+ ptrCheckGuard(hostPtr, chostFilesize, hostRecord);
+ if (hostPtr.p->m_nf_bits & HostRecord::NF_STARTED)
+ {
+ jam();
+ if (i != 0)
+ {
+ jam();
+ regTcPtr->tcNodedata[0] = hostPtr.i;
+ }
+ break;
+ }
+ }
+ }//if
+ }
jam();
regTcPtr->lastReplicaNo = 0;
regTcPtr->noOfNodes = 1;
@@ -5063,7 +5083,7 @@ void Dbtc::execLQHKEYREF(Signal* signal)
ptrAss(tcConnectptr, tcConnectRecord);
TcConnectRecord * const regTcPtr = tcConnectptr.p;
if (regTcPtr->tcConnectstate == OS_OPERATING) {
- apiConnectptr.i = regTcPtr->apiConnect;
+ Uint32 save = apiConnectptr.i = regTcPtr->apiConnect;
ptrCheckGuard(apiConnectptr, capiConnectFilesize, apiConnectRecord);
ApiConnectRecord * const regApiPtr = apiConnectptr.p;
compare_transid1 = regApiPtr->transid[0] ^ lqhKeyRef->transId1;
@@ -5174,7 +5194,7 @@ void Dbtc::execLQHKEYREF(Signal* signal)
regApiPtr->lqhkeyreqrec--; // Compensate for extra during read
tcKeyRef->connectPtr = indexOp;
EXECUTE_DIRECT(DBTC, GSN_TCKEYREF, signal, TcKeyRef::SignalLength);
- apiConnectptr.i = regTcPtr->apiConnect;
+ apiConnectptr.i = save;
apiConnectptr.p = regApiPtr;
} else {
jam();
@@ -5199,6 +5219,8 @@ void Dbtc::execLQHKEYREF(Signal* signal)
jam();
sendtckeyconf(signal, 1);
regApiPtr->apiConnectstate = CS_CONNECTED;
+ regApiPtr->m_transaction_nodes.clear();
+ setApiConTimer(apiConnectptr.i, 0,__LINE__);
}
return;
} else if (regApiPtr->tckeyrec > 0 || regApiPtr->m_exec_flag) {
@@ -7003,6 +7025,19 @@ void Dbtc::execNODE_FAILREP(Signal* signal)
}//Dbtc::execNODE_FAILREP()
void
+Dbtc::execNODE_START_REP(Signal* signal)
+{
+ Uint32 nodeId = signal->theData[0];
+ hostptr.i = nodeId;
+ ptrCheckGuard(hostptr, chostFilesize, hostRecord);
+ if (hostptr.p->m_nf_bits == 0)
+ {
+ jam();
+ hostptr.p->m_nf_bits |= HostRecord::NF_STARTED;
+ }
+}
+
+void
Dbtc::checkNodeFailComplete(Signal* signal,
Uint32 failedNodeId,
Uint32 bit)
@@ -8701,6 +8736,20 @@ void Dbtc::execSCAN_TABREQ(Signal* signal)
* IF ANY TO RECEIVE.
**********************************************************/
scanptr.p->scanState = ScanRecord::WAIT_AI;
+
+ if (ERROR_INSERTED(8038))
+ {
+ /**
+ * Force API_FAILREQ
+ */
+ DisconnectRep * const rep = (DisconnectRep *)signal->getDataPtrSend();
+ rep->nodeId = refToNode(apiConnectptr.p->ndbapiBlockref);
+ rep->err = 8038;
+
+ EXECUTE_DIRECT(CMVMI, GSN_DISCONNECT_REP, signal, 2);
+ CLEAR_ERROR_INSERT_VALUE;
+ }
+
return;
SCAN_error_check:
@@ -8790,6 +8839,7 @@ void Dbtc::initScanrec(ScanRecordPtr scanptr,
jam();
ScanFragRecPtr ptr;
ndbrequire(list.seize(ptr));
+ ptr.p->scanFragState = ScanFragRec::IDLE;
ptr.p->scanRec = scanptr.i;
ptr.p->scanFragId = 0;
ptr.p->m_apiPtr = cdata[i];
@@ -9582,9 +9632,17 @@ Dbtc::close_scan_req(Signal* signal, ScanRecordPtr scanPtr, bool req_received){
ScanRecord* scanP = scanPtr.p;
ndbrequire(scanPtr.p->scanState != ScanRecord::IDLE);
+ ScanRecord::ScanState old = scanPtr.p->scanState;
scanPtr.p->scanState = ScanRecord::CLOSING_SCAN;
scanPtr.p->m_close_scan_req = req_received;
+ if (old == ScanRecord::WAIT_FRAGMENT_COUNT)
+ {
+ jam();
+ scanPtr.p->scanState = old;
+ return; // Will continue on execDI_FCOUNTCONF
+ }
+
/**
* Queue : Action
* ============= : =================
@@ -9612,11 +9670,22 @@ Dbtc::close_scan_req(Signal* signal, ScanRecordPtr scanPtr, bool req_received){
ScanFragRecPtr curr = ptr; // Remove while iterating...
running.next(ptr);
- if(curr.p->scanFragState == ScanFragRec::WAIT_GET_PRIMCONF){
+ switch(curr.p->scanFragState){
+ case ScanFragRec::IDLE:
+ jam(); // real early abort
+ ndbrequire(old == ScanRecord::WAIT_AI);
+ running.release(curr);
+ continue;
+ case ScanFragRec::WAIT_GET_PRIMCONF:
jam();
continue;
+ case ScanFragRec::LQH_ACTIVE:
+ jam();
+ break;
+ default:
+ jamLine(curr.p->scanFragState);
+ ndbrequire(false);
}
- ndbrequire(curr.p->scanFragState == ScanFragRec::LQH_ACTIVE);
curr.p->startFragTimer(ctcTimer);
curr.p->scanFragState = ScanFragRec::LQH_ACTIVE;
@@ -11810,17 +11879,6 @@ void Dbtc::execTCKEYREF(Signal* signal)
case(IOS_INDEX_ACCESS_WAIT_FOR_TRANSID_AI):
case(IOS_INDEX_ACCESS_WAIT_FOR_TCKEYCONF): {
jam();
- // If we fail index access for a non-read operation during commit
- // we abort transaction
- if (commitFlg == 1) {
- jam();
- releaseIndexOperation(regApiPtr, indexOp);
- apiConnectptr.i = indexOp->connectionIndex;
- ptrCheckGuard(apiConnectptr, capiConnectFilesize, apiConnectRecord);
- terrorCode = tcKeyRef->errorCode;
- abortErrorLab(signal);
- break;
- }
/**
* Increase count as it will be decreased below...
* (and the code is written to handle failing lookup on "real" table
diff --git a/ndb/src/kernel/blocks/dbtc/Makefile.am b/ndb/src/kernel/blocks/dbtc/Makefile.am
index 98ee2639bac..8d3cea09e33 100644
--- a/ndb/src/kernel/blocks/dbtc/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtc/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libdbtc.a
libdbtc_a_SOURCES = DbtcInit.cpp DbtcMain.cpp
diff --git a/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp b/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp
index 2c62adab3e5..9445d5aa1cb 100644
--- a/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp
+++ b/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
index 0b66d9a45bb..3079a530807 100644
--- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -196,6 +195,7 @@
#define ZTRY_TO_UPDATE_ERROR 888
#define ZCALL_ERROR 890
#define ZTEMPORARY_RESOURCE_FAILURE 891
+#define ZUNSUPPORTED_BRANCH 892
#define ZSTORED_SEIZE_ATTRINBUFREC_ERROR 873 // Part of Scan
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp b/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
index e9043a8b52d..ac1457ad977 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -444,6 +443,11 @@ int Dbtup::TUPKEY_abort(Signal* signal, int error_type)
}//if
break;
+ case 40:
+ ljam();
+ terrorCode = ZUNSUPPORTED_BRANCH;
+ break;
+
default:
ndbrequire(false);
break;
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp b/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp
index 6a478bea917..26fe74b3eed 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp b/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
index e16d3df6d8d..017b0ec5b92 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp b/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp
index 8c43de52a75..975b95f7f41 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
index 13c0bad9c7a..42b86102dff 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1876,6 +1875,11 @@ int Dbtup::interpreterNextLab(Signal* signal,
// NULL==NULL and NULL<not-NULL
res1 = r1_null && r2_null ? 0 : r1_null ? -1 : 1;
} else {
+ jam();
+ if (unlikely(sqlType.m_cmp == 0))
+ {
+ return TUPKEY_abort(signal, 40);
+ }
res1 = (*sqlType.m_cmp)(cs, s1, attrLen, s2, argLen, true);
}
} else {
@@ -1883,6 +1887,11 @@ int Dbtup::interpreterNextLab(Signal* signal,
// NULL like NULL is true (has no practical use)
res1 = r1_null && r2_null ? 0 : -1;
} else {
+ jam();
+ if (unlikely(sqlType.m_like == 0))
+ {
+ return TUPKEY_abort(signal, 40);
+ }
res1 = (*sqlType.m_like)(cs, s1, attrLen, s2, argLen);
}
}
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp b/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
index cdd54ba2337..1fe3fd22866 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
index 6b1056fdeac..f21f2eba9fc 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
index ab6e0642e11..b0f71223c9d 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupLCP.cpp b/ndb/src/kernel/blocks/dbtup/DbtupLCP.cpp
index 370ef4c4ba5..de98fece373 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupLCP.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupLCP.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp b/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
index 7d2f7d56d48..2ae04078ae0 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp b/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp
index 8a18fddae19..c6924c5d762 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp b/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp
index 0bb7c8a1e41..60a83e46cd9 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp b/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
index 8a55777ac05..ae3bb0dcd7c 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
index 396404faa8c..9439509d102 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp b/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp
index 3b957688a1c..37fcd3df317 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp b/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp
index 35d1b75e573..f9898519bde 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupSystemRestart.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
index 3e96bc6c14a..76b5d6869c1 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp b/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
index 6652464dc0f..ba5e4d2ee7c 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupUndoLog.cpp b/ndb/src/kernel/blocks/dbtup/DbtupUndoLog.cpp
index 869f399583f..64151cb7509 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupUndoLog.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupUndoLog.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtup/Makefile.am b/ndb/src/kernel/blocks/dbtup/Makefile.am
index 2d14ad41025..27e46aceb2a 100644
--- a/ndb/src/kernel/blocks/dbtup/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtup/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libdbtup.a
libdbtup_a_SOURCES = \
diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
index 9c4a38e9320..c5cde728ff7 100644
--- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
+++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp
index 058409c99b0..95c7b417da9 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
index 4eb45c69501..7827794082a 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
index e40f70ea397..6c1ad8324f4 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp
index e7138b4110d..b44b5fa7c29 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
index c85c8384081..9a66783525c 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp
index 68a3e78ce9e..32cd7ab0460 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
index 6d9385b3989..3d59b8aad4f 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
index da2321bdf6f..f7b93401252 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp
index 5107a8d8e31..5bca96667b9 100644
--- a/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp
+++ b/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbtux/Makefile.am b/ndb/src/kernel/blocks/dbtux/Makefile.am
index b5951e8ed37..cb2a0a0c51b 100644
--- a/ndb/src/kernel/blocks/dbtux/Makefile.am
+++ b/ndb/src/kernel/blocks/dbtux/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libdbtux.a
libdbtux_a_SOURCES = \
diff --git a/ndb/src/kernel/blocks/dbutil/DbUtil.cpp b/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
index 0f45c407d83..55d36124476 100644
--- a/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
+++ b/ndb/src/kernel/blocks/dbutil/DbUtil.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbutil/DbUtil.hpp b/ndb/src/kernel/blocks/dbutil/DbUtil.hpp
index 983dd4402a4..e0d7d9df937 100644
--- a/ndb/src/kernel/blocks/dbutil/DbUtil.hpp
+++ b/ndb/src/kernel/blocks/dbutil/DbUtil.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/dbutil/Makefile.am b/ndb/src/kernel/blocks/dbutil/Makefile.am
index 925356c2f76..4848ae85082 100644
--- a/ndb/src/kernel/blocks/dbutil/Makefile.am
+++ b/ndb/src/kernel/blocks/dbutil/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libdbutil.a
libdbutil_a_SOURCES = DbUtil.cpp
diff --git a/ndb/src/kernel/blocks/mutexes.hpp b/ndb/src/kernel/blocks/mutexes.hpp
index 5c0276fc4fa..2eb248b3d5e 100644
--- a/ndb/src/kernel/blocks/mutexes.hpp
+++ b/ndb/src/kernel/blocks/mutexes.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbcntr/Makefile.am b/ndb/src/kernel/blocks/ndbcntr/Makefile.am
index 3f24675b2b3..dee66082f19 100644
--- a/ndb/src/kernel/blocks/ndbcntr/Makefile.am
+++ b/ndb/src/kernel/blocks/ndbcntr/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libndbcntr.a
libndbcntr_a_SOURCES = \
diff --git a/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp b/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp
index 7aa5be7a3cb..ec9d4a0dc60 100644
--- a/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp
+++ b/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp
index 08251348b2b..6df52b6fbe7 100644
--- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp
+++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
index af05eeb9e9a..26e8f246293 100644
--- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
+++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp
index 2a65271a32a..8690fbe9448 100644
--- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp
+++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp b/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
index ddf16024017..ee6ab49f1e5 100644
--- a/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp b/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
index 997bf40fe2a..da7f33ae78d 100644
--- a/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp b/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp
index 004752c9543..45b53b2693e 100644
--- a/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp b/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp
index 30b40097c9b..1202d14d699 100644
--- a/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp b/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp
index 460ad3f614a..668b0e1b70e 100644
--- a/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/Filename.cpp b/ndb/src/kernel/blocks/ndbfs/Filename.cpp
index 238390f262c..83c1e2a4f5c 100644
--- a/ndb/src/kernel/blocks/ndbfs/Filename.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/Filename.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/Filename.hpp b/ndb/src/kernel/blocks/ndbfs/Filename.hpp
index 249c1b1ca10..8d664be5c10 100644
--- a/ndb/src/kernel/blocks/ndbfs/Filename.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/Filename.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/Makefile.am b/ndb/src/kernel/blocks/ndbfs/Makefile.am
index a22386f8612..457a4fb5be5 100644
--- a/ndb/src/kernel/blocks/ndbfs/Makefile.am
+++ b/ndb/src/kernel/blocks/ndbfs/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libndbfs.a
libndbfs_a_SOURCES = \
diff --git a/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp b/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp
index a1aebdef7a1..fa84a52414e 100644
--- a/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp b/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
index f46cc66fe16..82e0855a57f 100644
--- a/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/MemoryChannelOSE.hpp b/ndb/src/kernel/blocks/ndbfs/MemoryChannelOSE.hpp
index ca90bc60153..aac1d3984a0 100644
--- a/ndb/src/kernel/blocks/ndbfs/MemoryChannelOSE.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/MemoryChannelOSE.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp b/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp
index b98c60693f4..2ef4d5019ab 100644
--- a/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
index 5049c726315..353330929e5 100644
--- a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp b/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp
index 17ce8fbd8aa..1f534433b81 100644
--- a/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp b/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp
index eacda6ec77d..636d9b78620 100644
--- a/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/Pool.hpp b/ndb/src/kernel/blocks/ndbfs/Pool.hpp
index 0410673af6f..de0b4d1f437 100644
--- a/ndb/src/kernel/blocks/ndbfs/Pool.hpp
+++ b/ndb/src/kernel/blocks/ndbfs/Pool.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp b/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp
index 5a03d8bb1a0..e8ee1c9392d 100644
--- a/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp
+++ b/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/qmgr/Makefile.am b/ndb/src/kernel/blocks/qmgr/Makefile.am
index 278af2a7865..f25df91b165 100644
--- a/ndb/src/kernel/blocks/qmgr/Makefile.am
+++ b/ndb/src/kernel/blocks/qmgr/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libqmgr.a
libqmgr_a_SOURCES = \
diff --git a/ndb/src/kernel/blocks/qmgr/Qmgr.hpp b/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
index e728ea81a7d..dcca240eeb6 100644
--- a/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
+++ b/ndb/src/kernel/blocks/qmgr/Qmgr.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -426,6 +425,10 @@ private:
StopReq c_stopReq;
bool check_multi_node_shutdown(Signal* signal);
+
+#ifdef ERROR_INSERT
+ Uint32 c_error_insert_extra;
+#endif
};
#endif
diff --git a/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp b/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp
index f14cbd48695..b8885569f0e 100644
--- a/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp
+++ b/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
index 68e649d8ae0..0156f334051 100644
--- a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
+++ b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -2895,6 +2894,17 @@ void Qmgr::failReportLab(Signal* signal, Uint16 aFailedNode,
systemErrorLab(signal, __LINE__);
return;
}//if
+
+ if (getNodeState().startLevel < NodeState::SL_STARTED)
+ {
+ jam();
+ CRASH_INSERTION(932);
+ char buf[100];
+ BaseString::snprintf(buf, 100, "Node failure during restart");
+ progError(__LINE__, NDBD_EXIT_SR_OTHERNODEFAILED, buf);
+ ndbrequire(false);
+ }
+
TnoFailedNodes = cnoFailedNodes;
failReport(signal, failedNodePtr.i, (UintR)ZTRUE, aFailCause);
if (cpresident == getOwnNodeId()) {
@@ -2981,6 +2991,16 @@ void Qmgr::execPREP_FAILREQ(Signal* signal)
return;
}//if
+ if (getNodeState().startLevel < NodeState::SL_STARTED)
+ {
+ jam();
+ CRASH_INSERTION(932);
+ char buf[100];
+ BaseString::snprintf(buf, 100, "Node failure during restart");
+ progError(__LINE__, NDBD_EXIT_SR_OTHERNODEFAILED, buf);
+ ndbrequire(false);
+ }
+
guard0 = cnoPrepFailedNodes - 1;
arrGuard(guard0, MAX_NDB_NODES);
for (Tindex = 0; Tindex <= guard0; Tindex++) {
@@ -3158,6 +3178,18 @@ Qmgr::sendCommitFailReq(Signal* signal)
for (nodePtr.i = 1; nodePtr.i < MAX_NDB_NODES; nodePtr.i++) {
jam();
ptrAss(nodePtr, nodeRec);
+
+#ifdef ERROR_INSERT
+ if (ERROR_INSERTED(935) && nodePtr.i == c_error_insert_extra)
+ {
+ ndbout_c("skipping node %d", c_error_insert_extra);
+ CLEAR_ERROR_INSERT_VALUE;
+ signal->theData[0] = 9999;
+ sendSignalWithDelay(CMVMI_REF, GSN_NDB_TAMPER, signal, 1000, 1);
+ continue;
+ }
+#endif
+
if (nodePtr.p->phase == ZRUNNING) {
jam();
nodePtr.p->sendCommitFailReqStatus = Q_ACTIVE;
@@ -3228,6 +3260,33 @@ void Qmgr::execPREP_FAILREF(Signal* signal)
return;
}//Qmgr::execPREP_FAILREF()
+static
+Uint32
+clear_nodes(Uint32 dstcnt, Uint16 dst[], Uint32 srccnt, const Uint16 src[])
+{
+ if (srccnt == 0)
+ return dstcnt;
+
+ Uint32 pos = 0;
+ for (Uint32 i = 0; i<dstcnt; i++)
+ {
+ Uint32 node = dst[i];
+ for (Uint32 j = 0; j<srccnt; j++)
+ {
+ if (node == dst[j])
+ {
+ node = RNIL;
+ break;
+ }
+ }
+ if (node != RNIL)
+ {
+ dst[pos++] = node;
+ }
+ }
+ return pos;
+}
+
/*---------------------------------------------------------------------------*/
/* THE PRESIDENT IS NOW COMMITTING THE PREVIOUSLY PREPARED NODE FAILURE. */
/*---------------------------------------------------------------------------*/
@@ -3315,19 +3374,18 @@ void Qmgr::execCOMMIT_FAILREQ(Signal* signal)
NodeFailRep::SignalLength, JBB);
}//if
}//for
- if (cpresident != getOwnNodeId()) {
- jam();
- cnoFailedNodes = cnoCommitFailedNodes - cnoFailedNodes;
- if (cnoFailedNodes > 0) {
- jam();
- guard0 = cnoFailedNodes - 1;
- arrGuard(guard0 + cnoCommitFailedNodes, MAX_NDB_NODES);
- for (Tj = 0; Tj <= guard0; Tj++) {
- jam();
- cfailedNodes[Tj] = cfailedNodes[Tj + cnoCommitFailedNodes];
- }//for
- }//if
- }//if
+
+ /**
+ * Remove committed nodes from failed/prepared
+ */
+ cnoFailedNodes = clear_nodes(cnoFailedNodes,
+ cfailedNodes,
+ cnoCommitFailedNodes,
+ ccommitFailedNodes);
+ cnoPrepFailedNodes = clear_nodes(cnoPrepFailedNodes,
+ cprepFailedNodes,
+ cnoCommitFailedNodes,
+ ccommitFailedNodes);
cnoCommitFailedNodes = 0;
}//if
/**-----------------------------------------------------------------------
@@ -4706,6 +4764,14 @@ Qmgr::execDUMP_STATE_ORD(Signal* signal)
default:
;
}//switch
+
+#ifdef ERROR_INSERT
+ if (signal->theData[0] == 935 && signal->getLength() == 2)
+ {
+ SET_ERROR_INSERT_VALUE(935);
+ c_error_insert_extra = signal->theData[1];
+ }
+#endif
}//Qmgr::execDUMP_STATE_ORD()
void Qmgr::execSET_VAR_REQ(Signal* signal)
diff --git a/ndb/src/kernel/blocks/qmgr/timer.hpp b/ndb/src/kernel/blocks/qmgr/timer.hpp
index 9c35a23766c..09b6de7b0db 100644
--- a/ndb/src/kernel/blocks/qmgr/timer.hpp
+++ b/ndb/src/kernel/blocks/qmgr/timer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/suma/Makefile.am b/ndb/src/kernel/blocks/suma/Makefile.am
index 5a74dbb74eb..f52ea9f00d1 100644
--- a/ndb/src/kernel/blocks/suma/Makefile.am
+++ b/ndb/src/kernel/blocks/suma/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libsuma.a
libsuma_a_SOURCES = Suma.cpp SumaInit.cpp
diff --git a/ndb/src/kernel/blocks/suma/Suma.cpp b/ndb/src/kernel/blocks/suma/Suma.cpp
index 449436331e4..be3171da7a0 100644
--- a/ndb/src/kernel/blocks/suma/Suma.cpp
+++ b/ndb/src/kernel/blocks/suma/Suma.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/suma/Suma.hpp b/ndb/src/kernel/blocks/suma/Suma.hpp
index 5cf1c4d543f..8c423a57569 100644
--- a/ndb/src/kernel/blocks/suma/Suma.hpp
+++ b/ndb/src/kernel/blocks/suma/Suma.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/suma/SumaInit.cpp b/ndb/src/kernel/blocks/suma/SumaInit.cpp
index ae7425da4bf..27a498be976 100644
--- a/ndb/src/kernel/blocks/suma/SumaInit.cpp
+++ b/ndb/src/kernel/blocks/suma/SumaInit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/trix/Makefile.am b/ndb/src/kernel/blocks/trix/Makefile.am
index 343063a6283..83822d967dd 100644
--- a/ndb/src/kernel/blocks/trix/Makefile.am
+++ b/ndb/src/kernel/blocks/trix/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = libtrix.a
libtrix_a_SOURCES = Trix.cpp
diff --git a/ndb/src/kernel/blocks/trix/Trix.cpp b/ndb/src/kernel/blocks/trix/Trix.cpp
index 1d6e5adad62..a5ccbb584cb 100644
--- a/ndb/src/kernel/blocks/trix/Trix.cpp
+++ b/ndb/src/kernel/blocks/trix/Trix.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/blocks/trix/Trix.hpp b/ndb/src/kernel/blocks/trix/Trix.hpp
index 78c5b8b35c3..c4e4c870bde 100644
--- a/ndb/src/kernel/blocks/trix/Trix.hpp
+++ b/ndb/src/kernel/blocks/trix/Trix.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/error/ErrorHandlingMacros.hpp b/ndb/src/kernel/error/ErrorHandlingMacros.hpp
index 8c3454b1ba1..de85127e638 100644
--- a/ndb/src/kernel/error/ErrorHandlingMacros.hpp
+++ b/ndb/src/kernel/error/ErrorHandlingMacros.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/error/ErrorReporter.cpp b/ndb/src/kernel/error/ErrorReporter.cpp
index e95cd5c132f..3d1b7fad7f3 100644
--- a/ndb/src/kernel/error/ErrorReporter.cpp
+++ b/ndb/src/kernel/error/ErrorReporter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/error/ErrorReporter.hpp b/ndb/src/kernel/error/ErrorReporter.hpp
index dffec14dff2..a32270e85cf 100644
--- a/ndb/src/kernel/error/ErrorReporter.hpp
+++ b/ndb/src/kernel/error/ErrorReporter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/error/Makefile.am b/ndb/src/kernel/error/Makefile.am
index c58cdf80940..1cd8b0e8e3b 100644
--- a/ndb/src/kernel/error/Makefile.am
+++ b/ndb/src/kernel/error/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
noinst_LIBRARIES = liberror.a
liberror_a_SOURCES = TimeModule.cpp \
diff --git a/ndb/src/kernel/error/TimeModule.cpp b/ndb/src/kernel/error/TimeModule.cpp
index c4e569e7221..1c01f91f86b 100644
--- a/ndb/src/kernel/error/TimeModule.cpp
+++ b/ndb/src/kernel/error/TimeModule.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/error/TimeModule.hpp b/ndb/src/kernel/error/TimeModule.hpp
index f1414c77af3..870e12eebc2 100644
--- a/ndb/src/kernel/error/TimeModule.hpp
+++ b/ndb/src/kernel/error/TimeModule.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/error/ndbd_exit_codes.c b/ndb/src/kernel/error/ndbd_exit_codes.c
index 205af85575a..37a54e33350 100644
--- a/ndb/src/kernel/error/ndbd_exit_codes.c
+++ b/ndb/src/kernel/error/ndbd_exit_codes.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/main.cpp b/ndb/src/kernel/main.cpp
index 649ae7cae3f..9c9581c9c42 100644
--- a/ndb/src/kernel/main.cpp
+++ b/ndb/src/kernel/main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Array.hpp b/ndb/src/kernel/vm/Array.hpp
index 97b0a345cb4..770dd47f048 100644
--- a/ndb/src/kernel/vm/Array.hpp
+++ b/ndb/src/kernel/vm/Array.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ArrayFifoList.hpp b/ndb/src/kernel/vm/ArrayFifoList.hpp
index b21bf449734..709f59324e9 100644
--- a/ndb/src/kernel/vm/ArrayFifoList.hpp
+++ b/ndb/src/kernel/vm/ArrayFifoList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ArrayList.hpp b/ndb/src/kernel/vm/ArrayList.hpp
index 4b46347a39b..7387c65afe7 100644
--- a/ndb/src/kernel/vm/ArrayList.hpp
+++ b/ndb/src/kernel/vm/ArrayList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ArrayPool.hpp b/ndb/src/kernel/vm/ArrayPool.hpp
index 3b1264af8be..17a170c6ce8 100644
--- a/ndb/src/kernel/vm/ArrayPool.hpp
+++ b/ndb/src/kernel/vm/ArrayPool.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/CArray.hpp b/ndb/src/kernel/vm/CArray.hpp
index 93f75056b50..b06a04bde24 100644
--- a/ndb/src/kernel/vm/CArray.hpp
+++ b/ndb/src/kernel/vm/CArray.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Callback.hpp b/ndb/src/kernel/vm/Callback.hpp
index 6a619ba7859..4cf67858ca0 100644
--- a/ndb/src/kernel/vm/Callback.hpp
+++ b/ndb/src/kernel/vm/Callback.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ClusterConfiguration.cpp b/ndb/src/kernel/vm/ClusterConfiguration.cpp
index 813407b497e..0f854f3504b 100644
--- a/ndb/src/kernel/vm/ClusterConfiguration.cpp
+++ b/ndb/src/kernel/vm/ClusterConfiguration.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ClusterConfiguration.hpp b/ndb/src/kernel/vm/ClusterConfiguration.hpp
index cc7000a54ef..40509b63f19 100644
--- a/ndb/src/kernel/vm/ClusterConfiguration.hpp
+++ b/ndb/src/kernel/vm/ClusterConfiguration.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Configuration.cpp b/ndb/src/kernel/vm/Configuration.cpp
index 13947f4b309..8a627e8b6cd 100644
--- a/ndb/src/kernel/vm/Configuration.cpp
+++ b/ndb/src/kernel/vm/Configuration.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -480,7 +479,7 @@ Configuration::setupConfiguration(){
DBUG_VOID_RETURN;
}
-bool
+Uint32
Configuration::lockPagesInMainMemory() const {
return _lockPagesInMainMemory;
}
diff --git a/ndb/src/kernel/vm/Configuration.hpp b/ndb/src/kernel/vm/Configuration.hpp
index 6315209ddbb..934261e40af 100644
--- a/ndb/src/kernel/vm/Configuration.hpp
+++ b/ndb/src/kernel/vm/Configuration.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +36,7 @@ public:
void setupConfiguration();
void closeConfiguration(bool end_session= true);
- bool lockPagesInMainMemory() const;
+ Uint32 lockPagesInMainMemory() const;
int timeBetweenWatchDogCheck() const ;
void timeBetweenWatchDogCheck(int value);
diff --git a/ndb/src/kernel/vm/DLFifoList.hpp b/ndb/src/kernel/vm/DLFifoList.hpp
index 877a93110e2..e4b8d67f71c 100644
--- a/ndb/src/kernel/vm/DLFifoList.hpp
+++ b/ndb/src/kernel/vm/DLFifoList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/DLHashTable.hpp b/ndb/src/kernel/vm/DLHashTable.hpp
index 13a9632f8da..acf53944b07 100644
--- a/ndb/src/kernel/vm/DLHashTable.hpp
+++ b/ndb/src/kernel/vm/DLHashTable.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/DLHashTable2.hpp b/ndb/src/kernel/vm/DLHashTable2.hpp
index 1018b053e2a..ad03e8ed3ba 100644
--- a/ndb/src/kernel/vm/DLHashTable2.hpp
+++ b/ndb/src/kernel/vm/DLHashTable2.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/DLList.hpp b/ndb/src/kernel/vm/DLList.hpp
index b7820eb9229..3e68d38aa5e 100644
--- a/ndb/src/kernel/vm/DLList.hpp
+++ b/ndb/src/kernel/vm/DLList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/DataBuffer.hpp b/ndb/src/kernel/vm/DataBuffer.hpp
index 7f553898eb5..d86aa95dd7b 100644
--- a/ndb/src/kernel/vm/DataBuffer.hpp
+++ b/ndb/src/kernel/vm/DataBuffer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Emulator.cpp b/ndb/src/kernel/vm/Emulator.cpp
index e203ec4bde8..3d240a204ba 100644
--- a/ndb/src/kernel/vm/Emulator.cpp
+++ b/ndb/src/kernel/vm/Emulator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Emulator.hpp b/ndb/src/kernel/vm/Emulator.hpp
index cd194202d85..e90f9cadb65 100644
--- a/ndb/src/kernel/vm/Emulator.hpp
+++ b/ndb/src/kernel/vm/Emulator.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/FastScheduler.cpp b/ndb/src/kernel/vm/FastScheduler.cpp
index ad24a6795a4..588887d1f63 100644
--- a/ndb/src/kernel/vm/FastScheduler.cpp
+++ b/ndb/src/kernel/vm/FastScheduler.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/FastScheduler.hpp b/ndb/src/kernel/vm/FastScheduler.hpp
index dc707e47eef..0151007ea3e 100644
--- a/ndb/src/kernel/vm/FastScheduler.hpp
+++ b/ndb/src/kernel/vm/FastScheduler.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/GlobalData.hpp b/ndb/src/kernel/vm/GlobalData.hpp
index 99b65727374..712fac2ec68 100644
--- a/ndb/src/kernel/vm/GlobalData.hpp
+++ b/ndb/src/kernel/vm/GlobalData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/KeyDescriptor.hpp b/ndb/src/kernel/vm/KeyDescriptor.hpp
index 456d64ce1d8..d12dc924ac9 100644
--- a/ndb/src/kernel/vm/KeyDescriptor.hpp
+++ b/ndb/src/kernel/vm/KeyDescriptor.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/KeyTable.hpp b/ndb/src/kernel/vm/KeyTable.hpp
index e78837b5c8a..72911886b03 100644
--- a/ndb/src/kernel/vm/KeyTable.hpp
+++ b/ndb/src/kernel/vm/KeyTable.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/KeyTable2.hpp b/ndb/src/kernel/vm/KeyTable2.hpp
index 5c2b3096abe..1076ffa420f 100644
--- a/ndb/src/kernel/vm/KeyTable2.hpp
+++ b/ndb/src/kernel/vm/KeyTable2.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/LongSignal.hpp b/ndb/src/kernel/vm/LongSignal.hpp
index 9818358011f..f5a64288030 100644
--- a/ndb/src/kernel/vm/LongSignal.hpp
+++ b/ndb/src/kernel/vm/LongSignal.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Makefile.am b/ndb/src/kernel/vm/Makefile.am
index 8f9bf92cb01..abfef1541ac 100644
--- a/ndb/src/kernel/vm/Makefile.am
+++ b/ndb/src/kernel/vm/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
#SUBDIRS = testCopy testDataBuffer testSimplePropertiesSection
#ifneq ($(USE_EDITLINE), N)
#DIRS += testLongSig
diff --git a/ndb/src/kernel/vm/MetaData.cpp b/ndb/src/kernel/vm/MetaData.cpp
index 51afbf21503..24a1ec8ef18 100644
--- a/ndb/src/kernel/vm/MetaData.cpp
+++ b/ndb/src/kernel/vm/MetaData.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/MetaData.hpp b/ndb/src/kernel/vm/MetaData.hpp
index 1000114a421..9c34ac2b612 100644
--- a/ndb/src/kernel/vm/MetaData.hpp
+++ b/ndb/src/kernel/vm/MetaData.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Mutex.cpp b/ndb/src/kernel/vm/Mutex.cpp
index aab9e74312b..250eff19b64 100644
--- a/ndb/src/kernel/vm/Mutex.cpp
+++ b/ndb/src/kernel/vm/Mutex.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Mutex.hpp b/ndb/src/kernel/vm/Mutex.hpp
index 7a16046188c..ec177a75707 100644
--- a/ndb/src/kernel/vm/Mutex.hpp
+++ b/ndb/src/kernel/vm/Mutex.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/Prio.hpp b/ndb/src/kernel/vm/Prio.hpp
index 4c9c22b0afe..3f14a3a6c74 100644
--- a/ndb/src/kernel/vm/Prio.hpp
+++ b/ndb/src/kernel/vm/Prio.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/RequestTracker.hpp b/ndb/src/kernel/vm/RequestTracker.hpp
index ac9ed85ae4b..cfd2a413231 100644
--- a/ndb/src/kernel/vm/RequestTracker.hpp
+++ b/ndb/src/kernel/vm/RequestTracker.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SLList.hpp b/ndb/src/kernel/vm/SLList.hpp
index 5fde41aa3e0..6cf91b80279 100644
--- a/ndb/src/kernel/vm/SLList.hpp
+++ b/ndb/src/kernel/vm/SLList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SafeCounter.cpp b/ndb/src/kernel/vm/SafeCounter.cpp
index 542e43f9172..b6492ec929a 100644
--- a/ndb/src/kernel/vm/SafeCounter.cpp
+++ b/ndb/src/kernel/vm/SafeCounter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SafeCounter.hpp b/ndb/src/kernel/vm/SafeCounter.hpp
index 917a67f2508..093fd25c296 100644
--- a/ndb/src/kernel/vm/SafeCounter.hpp
+++ b/ndb/src/kernel/vm/SafeCounter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SectionReader.cpp b/ndb/src/kernel/vm/SectionReader.cpp
index dd474a49e50..44d70c2ec16 100644
--- a/ndb/src/kernel/vm/SectionReader.cpp
+++ b/ndb/src/kernel/vm/SectionReader.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SectionReader.hpp b/ndb/src/kernel/vm/SectionReader.hpp
index b51006b6128..6297b08f76a 100644
--- a/ndb/src/kernel/vm/SectionReader.hpp
+++ b/ndb/src/kernel/vm/SectionReader.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SignalCounter.hpp b/ndb/src/kernel/vm/SignalCounter.hpp
index 62242cb65bd..b72c88cbf29 100644
--- a/ndb/src/kernel/vm/SignalCounter.hpp
+++ b/ndb/src/kernel/vm/SignalCounter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SimBlockList.hpp b/ndb/src/kernel/vm/SimBlockList.hpp
index 40485a37425..09ec3dccc78 100644
--- a/ndb/src/kernel/vm/SimBlockList.hpp
+++ b/ndb/src/kernel/vm/SimBlockList.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SimplePropertiesSection.cpp b/ndb/src/kernel/vm/SimplePropertiesSection.cpp
index 070563be36b..1159ddd9ca7 100644
--- a/ndb/src/kernel/vm/SimplePropertiesSection.cpp
+++ b/ndb/src/kernel/vm/SimplePropertiesSection.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SimulatedBlock.cpp b/ndb/src/kernel/vm/SimulatedBlock.cpp
index b4787209d55..b58e1feed9d 100644
--- a/ndb/src/kernel/vm/SimulatedBlock.cpp
+++ b/ndb/src/kernel/vm/SimulatedBlock.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -658,24 +657,26 @@ SimulatedBlock::allocRecord(const char * type, size_t s, size_t n, bool clear)
void * p = NULL;
size_t size = n*s;
+ Uint64 real_size = (Uint64)((Uint64)n)*((Uint64)s);
refresh_watch_dog();
- if (size > 0){
+ if (real_size > 0){
#ifdef VM_TRACE_MEM
- ndbout_c("%s::allocRecord(%s, %u, %u) = %u bytes",
+ ndbout_c("%s::allocRecord(%s, %u, %u) = %llu bytes",
getBlockName(number()),
type,
s,
n,
- size);
+ real_size);
#endif
- p = ndbd_malloc(size);
+ if( real_size == (Uint64)size )
+ p = ndbd_malloc(size);
if (p == NULL){
char buf1[255];
char buf2[255];
BaseString::snprintf(buf1, sizeof(buf1), "%s could not allocate memory for %s",
getBlockName(number()), type);
- BaseString::snprintf(buf2, sizeof(buf2), "Requested: %ux%u = %u bytes",
- (Uint32)s, (Uint32)n, (Uint32)size);
+ BaseString::snprintf(buf2, sizeof(buf2), "Requested: %ux%u = %llu bytes",
+ (Uint32)s, (Uint32)n, (Uint64)real_size);
ERROR_SET(fatal, NDBD_EXIT_MEMALLOC, buf1, buf2);
}
@@ -917,15 +918,6 @@ SimulatedBlock::execCONTINUE_FRAGMENTED(Signal * signal){
void
SimulatedBlock::execNODE_START_REP(Signal* signal)
{
- // common stuff for all blocks
-
- // block specific stuff by virtual method override (default empty)
- exec_node_start_rep(signal);
-}
-
-void
-SimulatedBlock::exec_node_start_rep(Signal* signal)
-{
}
#ifdef VM_TRACE_TIME
diff --git a/ndb/src/kernel/vm/SimulatedBlock.hpp b/ndb/src/kernel/vm/SimulatedBlock.hpp
index 4a3620a00ab..3b705c7d497 100644
--- a/ndb/src/kernel/vm/SimulatedBlock.hpp
+++ b/ndb/src/kernel/vm/SimulatedBlock.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -424,7 +423,6 @@ private:
void execSIGNAL_DROPPED_REP(Signal* signal);
void execCONTINUE_FRAGMENTED(Signal* signal);
void execNODE_START_REP(Signal* signal);
- virtual void exec_node_start_rep(Signal* signal);
Uint32 c_fragmentIdCounter;
ArrayPool<FragmentInfo> c_fragmentInfoPool;
diff --git a/ndb/src/kernel/vm/SuperPool.cpp b/ndb/src/kernel/vm/SuperPool.cpp
index 65e5dd99629..354c5a2bd26 100644
--- a/ndb/src/kernel/vm/SuperPool.cpp
+++ b/ndb/src/kernel/vm/SuperPool.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/SuperPool.hpp b/ndb/src/kernel/vm/SuperPool.hpp
index 157c75aa0d5..84121af76dd 100644
--- a/ndb/src/kernel/vm/SuperPool.hpp
+++ b/ndb/src/kernel/vm/SuperPool.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ThreadConfig.cpp b/ndb/src/kernel/vm/ThreadConfig.cpp
index 76fcc4ba84f..89fcea5c433 100644
--- a/ndb/src/kernel/vm/ThreadConfig.cpp
+++ b/ndb/src/kernel/vm/ThreadConfig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ThreadConfig.hpp b/ndb/src/kernel/vm/ThreadConfig.hpp
index 91c2cafe0e0..64b22e46025 100644
--- a/ndb/src/kernel/vm/ThreadConfig.hpp
+++ b/ndb/src/kernel/vm/ThreadConfig.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/TimeQueue.cpp b/ndb/src/kernel/vm/TimeQueue.cpp
index 0b620c75d52..bb8c7a74edf 100644
--- a/ndb/src/kernel/vm/TimeQueue.cpp
+++ b/ndb/src/kernel/vm/TimeQueue.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/TimeQueue.hpp b/ndb/src/kernel/vm/TimeQueue.hpp
index 1203ace10f5..53e9c6ef95e 100644
--- a/ndb/src/kernel/vm/TimeQueue.hpp
+++ b/ndb/src/kernel/vm/TimeQueue.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/TransporterCallback.cpp b/ndb/src/kernel/vm/TransporterCallback.cpp
index badd2af669c..398b7965156 100644
--- a/ndb/src/kernel/vm/TransporterCallback.cpp
+++ b/ndb/src/kernel/vm/TransporterCallback.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/VMSignal.cpp b/ndb/src/kernel/vm/VMSignal.cpp
index e4eafb47ff7..cee9aa2911b 100644
--- a/ndb/src/kernel/vm/VMSignal.cpp
+++ b/ndb/src/kernel/vm/VMSignal.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/VMSignal.hpp b/ndb/src/kernel/vm/VMSignal.hpp
index 33f8a9f25c0..e92335dbfa2 100644
--- a/ndb/src/kernel/vm/VMSignal.hpp
+++ b/ndb/src/kernel/vm/VMSignal.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/WaitQueue.hpp b/ndb/src/kernel/vm/WaitQueue.hpp
index 4d7240b6866..fd9bf366d2a 100644
--- a/ndb/src/kernel/vm/WaitQueue.hpp
+++ b/ndb/src/kernel/vm/WaitQueue.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/WatchDog.cpp b/ndb/src/kernel/vm/WatchDog.cpp
index c80317e1725..d8311ec5d35 100644
--- a/ndb/src/kernel/vm/WatchDog.cpp
+++ b/ndb/src/kernel/vm/WatchDog.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/WatchDog.hpp b/ndb/src/kernel/vm/WatchDog.hpp
index 65b23dafdb1..1d91c2451c3 100644
--- a/ndb/src/kernel/vm/WatchDog.hpp
+++ b/ndb/src/kernel/vm/WatchDog.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/al_test/arrayListTest.cpp b/ndb/src/kernel/vm/al_test/arrayListTest.cpp
index bb320106653..08a73084d53 100644
--- a/ndb/src/kernel/vm/al_test/arrayListTest.cpp
+++ b/ndb/src/kernel/vm/al_test/arrayListTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp b/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp
index e80905121e1..835b35994ce 100644
--- a/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp
+++ b/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/al_test/main.cpp b/ndb/src/kernel/vm/al_test/main.cpp
index 23193b50725..efdc16b1cbc 100644
--- a/ndb/src/kernel/vm/al_test/main.cpp
+++ b/ndb/src/kernel/vm/al_test/main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ndbd_malloc.cpp b/ndb/src/kernel/vm/ndbd_malloc.cpp
index 4bfccf828fc..9386e3c7cd3 100644
--- a/ndb/src/kernel/vm/ndbd_malloc.cpp
+++ b/ndb/src/kernel/vm/ndbd_malloc.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/ndbd_malloc.hpp b/ndb/src/kernel/vm/ndbd_malloc.hpp
index 136e9f0c372..dbdd6b53a0e 100644
--- a/ndb/src/kernel/vm/ndbd_malloc.hpp
+++ b/ndb/src/kernel/vm/ndbd_malloc.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/pc.hpp b/ndb/src/kernel/vm/pc.hpp
index 95839c48e4e..269719c44d0 100644
--- a/ndb/src/kernel/vm/pc.hpp
+++ b/ndb/src/kernel/vm/pc.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/testCopy/rr.cpp b/ndb/src/kernel/vm/testCopy/rr.cpp
index 1e8305dfe4c..362cd1d5136 100644
--- a/ndb/src/kernel/vm/testCopy/rr.cpp
+++ b/ndb/src/kernel/vm/testCopy/rr.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/testCopy/testCopy.cpp b/ndb/src/kernel/vm/testCopy/testCopy.cpp
index 78a1dab2619..521f93f4df5 100644
--- a/ndb/src/kernel/vm/testCopy/testCopy.cpp
+++ b/ndb/src/kernel/vm/testCopy/testCopy.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp b/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp
index 5ba59418223..1ebdd4c176b 100644
--- a/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp
+++ b/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/testLongSig/testLongSig.cpp b/ndb/src/kernel/vm/testLongSig/testLongSig.cpp
index 1d1fb8ebc82..0d2a0e80113 100644
--- a/ndb/src/kernel/vm/testLongSig/testLongSig.cpp
+++ b/ndb/src/kernel/vm/testLongSig/testLongSig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp b/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp
index e16870edf11..feabe769a31 100644
--- a/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp
+++ b/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/kernel/vm/testSuperPool.cpp b/ndb/src/kernel/vm/testSuperPool.cpp
index 194b3a43fa0..22aa7a8b6eb 100644
--- a/ndb/src/kernel/vm/testSuperPool.cpp
+++ b/ndb/src/kernel/vm/testSuperPool.cpp
@@ -10,8 +10,7 @@ exit $?
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/LocalConfig.cpp b/ndb/src/mgmapi/LocalConfig.cpp
index 75ad8b40a1f..f01b6ff3da3 100644
--- a/ndb/src/mgmapi/LocalConfig.cpp
+++ b/ndb/src/mgmapi/LocalConfig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/LocalConfig.hpp b/ndb/src/mgmapi/LocalConfig.hpp
index c415ec1be91..7a583077913 100644
--- a/ndb/src/mgmapi/LocalConfig.hpp
+++ b/ndb/src/mgmapi/LocalConfig.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/Makefile.am b/ndb/src/mgmapi/Makefile.am
index efe1b8ea2d5..a222ac9ee96 100644
--- a/ndb/src/mgmapi/Makefile.am
+++ b/ndb/src/mgmapi/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LTLIBRARIES = libmgmapi.la
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index df69684784a..fa7aed8b182 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -94,6 +93,7 @@ struct ndb_mgm_handle {
char last_error_desc[NDB_MGM_MAX_ERR_DESC_SIZE];
int read_timeout;
int write_timeout;
+ unsigned int connect_timeout;
NDB_SOCKET_TYPE socket;
@@ -160,6 +160,7 @@ ndb_mgm_create_handle()
h->socket = NDB_INVALID_SOCKET;
h->read_timeout = 50000;
h->write_timeout = 100;
+ h->connect_timeout = 0;
h->cfg_i = -1;
h->errstream = stdout;
h->m_name = 0;
@@ -178,7 +179,7 @@ ndb_mgm_create_handle()
h->mgmd_version_minor= -1;
h->mgmd_version_build= -1;
- DBUG_PRINT("info", ("handle=0x%x", (UintPtr)h));
+ DBUG_PRINT("info", ("handle: 0x%lx", (long)h));
DBUG_RETURN(h);
}
@@ -195,7 +196,7 @@ int
ndb_mgm_set_connectstring(NdbMgmHandle handle, const char * mgmsrv)
{
DBUG_ENTER("ndb_mgm_set_connectstring");
- DBUG_PRINT("info", ("handle=0x%x", (UintPtr)handle));
+ DBUG_PRINT("info", ("handle: 0x%lx", (long)handle));
handle->cfg.~LocalConfig();
new (&(handle->cfg)) LocalConfig;
if (!handle->cfg.init(mgmsrv, 0) ||
@@ -237,7 +238,7 @@ ndb_mgm_destroy_handle(NdbMgmHandle * handle)
DBUG_ENTER("ndb_mgm_destroy_handle");
if(!handle)
DBUG_VOID_RETURN;
- DBUG_PRINT("info", ("handle=0x%x", (UintPtr)(* handle)));
+ DBUG_PRINT("info", ("handle: 0x%lx", (long)(* handle)));
/**
* important! only disconnect if connected
* other code relies on this
@@ -427,6 +428,16 @@ int ndb_mgm_is_connected(NdbMgmHandle handle)
return handle->connected;
}
+extern "C"
+int ndb_mgm_set_connect_timeout(NdbMgmHandle handle, unsigned int seconds)
+{
+ if(!handle)
+ return -1;
+
+ handle->connect_timeout= seconds;
+ return 0;
+}
+
/**
* Connect to a management server
*/
@@ -457,6 +468,7 @@ ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
Uint32 i;
int binderror = 0;
SocketClient s(0, 0);
+ s.set_connect_timeout(handle->connect_timeout);
if (!s.init())
{
fprintf(handle->errstream,
diff --git a/ndb/src/mgmapi/mgmapi_configuration.cpp b/ndb/src/mgmapi/mgmapi_configuration.cpp
index 80ab428c05a..e0ae23e508f 100644
--- a/ndb/src/mgmapi/mgmapi_configuration.cpp
+++ b/ndb/src/mgmapi/mgmapi_configuration.cpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004-2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <ndb_types.h>
#include <mgmapi.h>
#include "mgmapi_configuration.hpp"
diff --git a/ndb/src/mgmapi/mgmapi_configuration.hpp b/ndb/src/mgmapi/mgmapi_configuration.hpp
index 7d60a4842a1..6088114016e 100644
--- a/ndb/src/mgmapi/mgmapi_configuration.hpp
+++ b/ndb/src/mgmapi/mgmapi_configuration.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/mgmapi_internal.h b/ndb/src/mgmapi/mgmapi_internal.h
index 90f93129f2a..d30be221dcd 100644
--- a/ndb/src/mgmapi/mgmapi_internal.h
+++ b/ndb/src/mgmapi/mgmapi_internal.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/ndb_logevent.cpp b/ndb/src/mgmapi/ndb_logevent.cpp
index 2472a434590..3885bb79536 100644
--- a/ndb/src/mgmapi/ndb_logevent.cpp
+++ b/ndb/src/mgmapi/ndb_logevent.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/ndb_logevent.hpp b/ndb/src/mgmapi/ndb_logevent.hpp
index cb1a0e388e5..df0a657e9b1 100644
--- a/ndb/src/mgmapi/ndb_logevent.hpp
+++ b/ndb/src/mgmapi/ndb_logevent.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/test/keso.c b/ndb/src/mgmapi/test/keso.c
index d2675b2ca8a..922bace6b91 100644
--- a/ndb/src/mgmapi/test/keso.c
+++ b/ndb/src/mgmapi/test/keso.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmapi/test/mgmSrvApi.cpp b/ndb/src/mgmapi/test/mgmSrvApi.cpp
index 4a8e38c9ba5..5a8acbfadc5 100644
--- a/ndb/src/mgmapi/test/mgmSrvApi.cpp
+++ b/ndb/src/mgmapi/test/mgmSrvApi.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp
index 1dacd9689e8..2ea98a57866 100644
--- a/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmclient/Makefile.am b/ndb/src/mgmclient/Makefile.am
index c63e8d1bff8..8ce8bf4da45 100644
--- a/ndb/src/mgmclient/Makefile.am
+++ b/ndb/src/mgmclient/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LTLIBRARIES = libndbmgmclient.la
ndbtools_PROGRAMS = ndb_mgm
diff --git a/ndb/src/mgmclient/main.cpp b/ndb/src/mgmclient/main.cpp
index 219559876ec..2d0103632b9 100644
--- a/ndb/src/mgmclient/main.cpp
+++ b/ndb/src/mgmclient/main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmclient/ndb_mgmclient.h b/ndb/src/mgmclient/ndb_mgmclient.h
index b62a33999a3..edb57e25ccb 100644
--- a/ndb/src/mgmclient/ndb_mgmclient.h
+++ b/ndb/src/mgmclient/ndb_mgmclient.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmclient/ndb_mgmclient.hpp b/ndb/src/mgmclient/ndb_mgmclient.hpp
index 956caebe803..e21f57ba323 100644
--- a/ndb/src/mgmclient/ndb_mgmclient.hpp
+++ b/ndb/src/mgmclient/ndb_mgmclient.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp b/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp
index 32f0adbcf26..b70d75e5fbe 100644
--- a/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp
+++ b/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/Config.cpp b/ndb/src/mgmsrv/Config.cpp
index 6ff5fb789f0..0bbf3580b5c 100644
--- a/ndb/src/mgmsrv/Config.cpp
+++ b/ndb/src/mgmsrv/Config.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/Config.hpp b/ndb/src/mgmsrv/Config.hpp
index 8e16ddf1810..1eaa1c34280 100644
--- a/ndb/src/mgmsrv/Config.hpp
+++ b/ndb/src/mgmsrv/Config.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp
index d4e72a7ff1d..4c731eb9dd5 100644
--- a/ndb/src/mgmsrv/ConfigInfo.cpp
+++ b/ndb/src/mgmsrv/ConfigInfo.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -564,10 +563,10 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = {
"If set to yes, then NDB Cluster data will not be swapped out to disk",
ConfigInfo::CI_USED,
true,
- ConfigInfo::CI_BOOL,
- "false",
- "false",
- "true" },
+ ConfigInfo::CI_INT,
+ "0",
+ "1",
+ "2" },
{
CFG_DB_WATCHDOG_INTERVAL,
diff --git a/ndb/src/mgmsrv/ConfigInfo.hpp b/ndb/src/mgmsrv/ConfigInfo.hpp
index 788619db7fe..08b12522807 100644
--- a/ndb/src/mgmsrv/ConfigInfo.hpp
+++ b/ndb/src/mgmsrv/ConfigInfo.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/InitConfigFileParser.cpp b/ndb/src/mgmsrv/InitConfigFileParser.cpp
index f937daf8620..fdfc0cde1a2 100644
--- a/ndb/src/mgmsrv/InitConfigFileParser.cpp
+++ b/ndb/src/mgmsrv/InitConfigFileParser.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/InitConfigFileParser.hpp b/ndb/src/mgmsrv/InitConfigFileParser.hpp
index 616fd5a62fb..64ccead1d33 100644
--- a/ndb/src/mgmsrv/InitConfigFileParser.hpp
+++ b/ndb/src/mgmsrv/InitConfigFileParser.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/Makefile.am b/ndb/src/mgmsrv/Makefile.am
index effad38be10..88622c08e53 100644
--- a/ndb/src/mgmsrv/Makefile.am
+++ b/ndb/src/mgmsrv/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
MYSQLDATAdir = $(localstatedir)
MYSQLSHAREdir = $(pkgdatadir)
MYSQLBASEdir= $(prefix)
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 766992af0cb..0ee59f70885 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -138,8 +137,11 @@ MgmtSrvr::logLevelThreadRun()
m_started_nodes.erase(0, false);
m_started_nodes.unlock();
- setEventReportingLevelImpl(node, req);
-
+ if (setEventReportingLevelImpl(node, req))
+ {
+ ndbout_c("setEventReportingLevelImpl(%d): failed", node);
+ }
+
SetLogLevelOrd ord;
ord = m_nodeLogLevel[node];
setNodeLogLevelImpl(node, ord);
@@ -156,10 +158,16 @@ MgmtSrvr::logLevelThreadRun()
m_log_level_requests.erase(0, false);
m_log_level_requests.unlock();
- if(req.blockRef == 0){
+ if(req.blockRef == 0)
+ {
req.blockRef = _ownReference;
- setEventReportingLevelImpl(0, req);
- } else {
+ if (setEventReportingLevelImpl(0, req))
+ {
+ ndbout_c("setEventReportingLevelImpl: failed 2!");
+ }
+ }
+ else
+ {
SetLogLevelOrd ord;
ord = req;
setNodeLogLevelImpl(req.blockRef, ord);
@@ -1377,9 +1385,6 @@ int MgmtSrvr::restartDB(bool nostart, bool initialStart,
NodeId nodeId = 0;
NDB_TICKS maxTime = NdbTick_CurrentMillisecond() + waitTime;
- ndbout_c(" %d", nodes.get(1));
- ndbout_c(" %d", nodes.get(2));
-
while(getNextNodeId(&nodeId, NDB_MGM_NODE_TYPE_NDB)) {
if (!nodes.get(nodeId))
continue;
@@ -1585,6 +1590,11 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
}
}
+ if (nodes.isclear())
+ {
+ return SEND_OR_RECEIVE_FAILED;
+ }
+
int error = 0;
while (!nodes.isclear())
{
@@ -1601,16 +1611,24 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
error = 1;
break;
}
+ // Since sending okToSend(true),
+ // there is no guarantee that NF_COMPLETEREP will come
+ // i.e listen also to NODE_FAILREP
+ case GSN_NODE_FAILREP: {
+ const NodeFailRep * const rep =
+ CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
+ NdbNodeBitmask mask;
+ mask.assign(NdbNodeBitmask::Size, rep->theNodes);
+ nodes.bitANDC(mask);
+ break;
+ }
+
case GSN_NF_COMPLETEREP:{
const NFCompleteRep * const rep =
CAST_CONSTPTR(NFCompleteRep, signal->getDataPtr());
nodes.clear(rep->failedNodeId);
break;
}
- case GSN_NODE_FAILREP:{
- // ignore, NF_COMPLETEREP will arrive later
- break;
- }
default:
report_unknown_signal(signal);
return SEND_OR_RECEIVE_FAILED;
@@ -1910,10 +1928,13 @@ MgmtSrvr::handleStatus(NodeId nodeId, bool alive, bool nfComplete)
theData[1] = nodeId;
if (alive) {
- m_started_nodes.push_back(nodeId);
+ if (nodeTypes[nodeId] == NODE_TYPE_DB)
+ {
+ m_started_nodes.push_back(nodeId);
+ }
rep->setEventType(NDB_LE_Connected);
} else {
- rep->setEventType(NDB_LE_Connected);
+ rep->setEventType(NDB_LE_Disconnected);
if(nfComplete)
{
DBUG_VOID_RETURN;
diff --git a/ndb/src/mgmsrv/MgmtSrvr.hpp b/ndb/src/mgmsrv/MgmtSrvr.hpp
index 17debb19f50..59f1487f7dc 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.hpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/MgmtSrvrConfig.cpp b/ndb/src/mgmsrv/MgmtSrvrConfig.cpp
index e56643a3d7e..cc101eacc22 100644
--- a/ndb/src/mgmsrv/MgmtSrvrConfig.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvrConfig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp b/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp
index c99936e1861..a8fd443497f 100644
--- a/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp
index bf16aa03d04..a2dec949f67 100644
--- a/ndb/src/mgmsrv/Services.cpp
+++ b/ndb/src/mgmsrv/Services.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1337,7 +1336,7 @@ Ndb_mgmd_event_service::log(int eventType, const Uint32* theData, NodeId nodeId)
if (EventLoggerBase::event_lookup(eventType,cat,threshold,severity,textF))
DBUG_VOID_RETURN;
- char m_text[256];
+ char m_text[512];
EventLogger::getText(m_text, sizeof(m_text),
textF, theData, nodeId);
@@ -1353,6 +1352,15 @@ Ndb_mgmd_event_service::log(int eventType, const Uint32* theData, NodeId nodeId)
if (ndb_logevent_body[i].index_fn)
val= (*(ndb_logevent_body[i].index_fn))(val);
str.appfmt("%s=%d\n",ndb_logevent_body[i].token, val);
+ if(strcmp(ndb_logevent_body[i].token,"error") == 0)
+ {
+ int m_text_len= strlen(m_text);
+ if(sizeof(m_text)-m_text_len-3 > 0)
+ {
+ BaseString::snprintf(m_text+m_text_len, 4 , " - ");
+ ndb_error_string(val, m_text+(m_text_len+3), sizeof(m_text)-m_text_len-3);
+ }
+ }
}
Vector<NDB_SOCKET_TYPE> copy;
diff --git a/ndb/src/mgmsrv/Services.hpp b/ndb/src/mgmsrv/Services.hpp
index f9b87e3b63d..4d904e8369e 100644
--- a/ndb/src/mgmsrv/Services.hpp
+++ b/ndb/src/mgmsrv/Services.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/SignalQueue.cpp b/ndb/src/mgmsrv/SignalQueue.cpp
index 08ad5f363a6..d1c29dc617d 100644
--- a/ndb/src/mgmsrv/SignalQueue.cpp
+++ b/ndb/src/mgmsrv/SignalQueue.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/SignalQueue.hpp b/ndb/src/mgmsrv/SignalQueue.hpp
index bacbad53415..cb0ed2e4ea1 100644
--- a/ndb/src/mgmsrv/SignalQueue.hpp
+++ b/ndb/src/mgmsrv/SignalQueue.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/convertStrToInt.cpp b/ndb/src/mgmsrv/convertStrToInt.cpp
index e5216047d10..4622a76e3db 100644
--- a/ndb/src/mgmsrv/convertStrToInt.cpp
+++ b/ndb/src/mgmsrv/convertStrToInt.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/convertStrToInt.hpp b/ndb/src/mgmsrv/convertStrToInt.hpp
index 0b2a96ed0bf..163f8198932 100644
--- a/ndb/src/mgmsrv/convertStrToInt.hpp
+++ b/ndb/src/mgmsrv/convertStrToInt.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/main.cpp b/ndb/src/mgmsrv/main.cpp
index 32b9de92d90..76b7ee6f146 100644
--- a/ndb/src/mgmsrv/main.cpp
+++ b/ndb/src/mgmsrv/main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/mgmsrv/mkconfig/mkconfig.cpp b/ndb/src/mgmsrv/mkconfig/mkconfig.cpp
index 28823aaa35e..5e8a03aacd1 100644
--- a/ndb/src/mgmsrv/mkconfig/mkconfig.cpp
+++ b/ndb/src/mgmsrv/mkconfig/mkconfig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/API.hpp b/ndb/src/ndbapi/API.hpp
index 05e2d863cb6..ca8473d99d8 100644
--- a/ndb/src/ndbapi/API.hpp
+++ b/ndb/src/ndbapi/API.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/ClusterMgr.cpp b/ndb/src/ndbapi/ClusterMgr.cpp
index 8545c599341..2ff27ca893e 100644
--- a/ndb/src/ndbapi/ClusterMgr.cpp
+++ b/ndb/src/ndbapi/ClusterMgr.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -508,6 +507,7 @@ ClusterMgr::reportConnected(NodeId nodeId){
theNode.m_info.m_version = 0;
theNode.compatible = true;
theNode.nfCompleteRep = true;
+ theNode.m_state.startLevel = NodeState::SL_NOTHING;
theFacade.ReportNodeAlive(nodeId);
}
@@ -519,14 +519,13 @@ ClusterMgr::reportDisconnected(NodeId nodeId){
noOfConnectedNodes--;
theNodes[nodeId].connected = false;
-
theNodes[nodeId].m_state.m_connected_nodes.clear();
- reportNodeFailed(nodeId);
+ reportNodeFailed(nodeId, true);
}
void
-ClusterMgr::reportNodeFailed(NodeId nodeId){
+ClusterMgr::reportNodeFailed(NodeId nodeId, bool disconnect){
Node & theNode = theNodes[nodeId];
@@ -537,10 +536,11 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
{
theFacade.doDisconnect(nodeId);
}
+
const bool report = (theNode.m_state.startLevel != NodeState::SL_NOTHING);
theNode.m_state.startLevel = NodeState::SL_NOTHING;
- if(report)
+ if(disconnect || report)
{
theFacade.ReportNodeDead(nodeId);
}
diff --git a/ndb/src/ndbapi/ClusterMgr.hpp b/ndb/src/ndbapi/ClusterMgr.hpp
index d2bcc52f7e8..32234a0b2f4 100644
--- a/ndb/src/ndbapi/ClusterMgr.hpp
+++ b/ndb/src/ndbapi/ClusterMgr.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -98,8 +97,8 @@ private:
NdbMutex* clusterMgrThreadMutex;
void showState(NodeId nodeId);
- void reportNodeFailed(NodeId nodeId);
-
+ void reportNodeFailed(NodeId nodeId, bool disconnect = false);
+
/**
* Signals received
*/
diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp
index ba8b0799398..82e8d82bc24 100644
--- a/ndb/src/ndbapi/DictCache.cpp
+++ b/ndb/src/ndbapi/DictCache.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/DictCache.hpp b/ndb/src/ndbapi/DictCache.hpp
index 19198e88824..4b569c114c9 100644
--- a/ndb/src/ndbapi/DictCache.hpp
+++ b/ndb/src/ndbapi/DictCache.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/Makefile.am b/ndb/src/ndbapi/Makefile.am
index 522e78dd6e0..85013b540dc 100644
--- a/ndb/src/ndbapi/Makefile.am
+++ b/ndb/src/ndbapi/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
#SUBDIRS = signal-sender
noinst_LTLIBRARIES = libndbapi.la
diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp
index c701fbf77e0..80bf0315b9c 100644
--- a/ndb/src/ndbapi/Ndb.cpp
+++ b/ndb/src/ndbapi/Ndb.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -777,7 +776,7 @@ Ndb::getAutoIncrementValue(const char* aTableName,
}
if (getTupleIdFromNdb(info, tupleId, cacheSize) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong) tupleId));
DBUG_RETURN(0);
}
@@ -798,7 +797,7 @@ Ndb::getAutoIncrementValue(const NdbDictionary::Table * aTable,
}
if (getTupleIdFromNdb(info, tupleId, cacheSize) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -811,7 +810,7 @@ Ndb::getTupleIdFromNdb(Ndb_local_table_info* info,
{
assert(info->m_first_tuple_id < info->m_last_tuple_id);
tupleId = ++info->m_first_tuple_id;
- DBUG_PRINT("info", ("next cached value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("next cached value %lu", (ulong)tupleId));
}
else
{
@@ -845,7 +844,7 @@ Ndb::readAutoIncrementValue(const char* aTableName,
}
if (readTupleIdFromNdb(info, tupleId) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -866,7 +865,7 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable,
}
if (readTupleIdFromNdb(info, tupleId) == -1)
DBUG_RETURN(-1);
- DBUG_PRINT("info", ("value %llu", (ulonglong)tupleId));
+ DBUG_PRINT("info", ("value %lu", (ulong)tupleId));
DBUG_RETURN(0);
}
@@ -948,8 +947,8 @@ Ndb::setTupleIdInNdb(Ndb_local_table_info* info,
{
info->m_first_tuple_id = tupleId - 1;
DBUG_PRINT("info",
- ("Setting next auto increment cached value to %llu",
- (ulonglong)tupleId));
+ ("Setting next auto increment cached value to %lu",
+ (ulong)tupleId));
DBUG_RETURN(0);
}
}
@@ -976,7 +975,8 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op)
{
DBUG_ENTER("Ndb::opTupleIdOnNdb");
Uint32 aTableId = info->m_table_impl->m_tableId;
- DBUG_PRINT("enter", ("table=%u value=%llu op=%u", aTableId, opValue, op));
+ DBUG_PRINT("enter", ("table: %u value: %lu op: %u",
+ aTableId, (ulong) opValue, op));
NdbTransaction* tConnection;
NdbOperation* tOperation= 0; // Compiler warning if not initialized
@@ -1050,8 +1050,8 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op)
else
{
DBUG_PRINT("info",
- ("Setting next auto increment value (db) to %llu",
- (ulonglong)opValue));
+ ("Setting next auto increment value (db) to %lu",
+ (ulong)opValue));
info->m_first_tuple_id = info->m_last_tuple_id = opValue - 1;
}
break;
@@ -1247,7 +1247,7 @@ Ndb::internalize_index_name(const NdbTableImpl * table,
if (!table)
{
DBUG_PRINT("error", ("!table"));
- return ret;
+ DBUG_RETURN(ret);
}
if (fullyQualifiedNames)
diff --git a/ndb/src/ndbapi/NdbApiSignal.cpp b/ndb/src/ndbapi/NdbApiSignal.cpp
index 94695185224..b19b112ee2c 100644
--- a/ndb/src/ndbapi/NdbApiSignal.cpp
+++ b/ndb/src/ndbapi/NdbApiSignal.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbApiSignal.hpp b/ndb/src/ndbapi/NdbApiSignal.hpp
index 9d04a8594a8..bd07f2665bf 100644
--- a/ndb/src/ndbapi/NdbApiSignal.hpp
+++ b/ndb/src/ndbapi/NdbApiSignal.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp
index fdee8961337..7986f5d14ba 100644
--- a/ndb/src/ndbapi/NdbBlob.cpp
+++ b/ndb/src/ndbapi/NdbBlob.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbBlobImpl.hpp b/ndb/src/ndbapi/NdbBlobImpl.hpp
index b56aabfd84e..9a7aa7ff40b 100644
--- a/ndb/src/ndbapi/NdbBlobImpl.hpp
+++ b/ndb/src/ndbapi/NdbBlobImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp
index 6c721b76ba0..747954f4532 100644
--- a/ndb/src/ndbapi/NdbDictionary.cpp
+++ b/ndb/src/ndbapi/NdbDictionary.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
index b91df24d8d7..c622332f11f 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/ndb/src/ndbapi/NdbDictionaryImpl.hpp
index 6a86ee44bfb..ed86f66ee11 100644
--- a/ndb/src/ndbapi/NdbDictionaryImpl.hpp
+++ b/ndb/src/ndbapi/NdbDictionaryImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbErrorOut.cpp b/ndb/src/ndbapi/NdbErrorOut.cpp
index 07e0b2fe6e8..703abbb8c9e 100644
--- a/ndb/src/ndbapi/NdbErrorOut.cpp
+++ b/ndb/src/ndbapi/NdbErrorOut.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbEventOperation.cpp b/ndb/src/ndbapi/NdbEventOperation.cpp
index e99cad918c5..2104e5da560 100644
--- a/ndb/src/ndbapi/NdbEventOperation.cpp
+++ b/ndb/src/ndbapi/NdbEventOperation.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index 9c147be9f16..f83581b8527 100644
--- a/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbEventOperationImpl.hpp b/ndb/src/ndbapi/NdbEventOperationImpl.hpp
index 96958979c76..0e5315ffb71 100644
--- a/ndb/src/ndbapi/NdbEventOperationImpl.hpp
+++ b/ndb/src/ndbapi/NdbEventOperationImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbImpl.hpp b/ndb/src/ndbapi/NdbImpl.hpp
index c668533457d..90b81dabff6 100644
--- a/ndb/src/ndbapi/NdbImpl.hpp
+++ b/ndb/src/ndbapi/NdbImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbIndexOperation.cpp b/ndb/src/ndbapi/NdbIndexOperation.cpp
index 853bab09c41..54386e93539 100644
--- a/ndb/src/ndbapi/NdbIndexOperation.cpp
+++ b/ndb/src/ndbapi/NdbIndexOperation.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbLinHash.hpp b/ndb/src/ndbapi/NdbLinHash.hpp
index 0655e81ce9d..f0399d30233 100644
--- a/ndb/src/ndbapi/NdbLinHash.hpp
+++ b/ndb/src/ndbapi/NdbLinHash.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbOperation.cpp b/ndb/src/ndbapi/NdbOperation.cpp
index 86875cafbab..3ab1b56a717 100644
--- a/ndb/src/ndbapi/NdbOperation.cpp
+++ b/ndb/src/ndbapi/NdbOperation.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbOperationDefine.cpp b/ndb/src/ndbapi/NdbOperationDefine.cpp
index 42dec161307..8e8d01a4252 100644
--- a/ndb/src/ndbapi/NdbOperationDefine.cpp
+++ b/ndb/src/ndbapi/NdbOperationDefine.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbOperationExec.cpp b/ndb/src/ndbapi/NdbOperationExec.cpp
index 11713678478..d8e10c04fe8 100644
--- a/ndb/src/ndbapi/NdbOperationExec.cpp
+++ b/ndb/src/ndbapi/NdbOperationExec.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbOperationInt.cpp b/ndb/src/ndbapi/NdbOperationInt.cpp
index 6defb37467f..24e77363fb5 100644
--- a/ndb/src/ndbapi/NdbOperationInt.cpp
+++ b/ndb/src/ndbapi/NdbOperationInt.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbOperationScan.cpp b/ndb/src/ndbapi/NdbOperationScan.cpp
index 283eb591bdb..aad24159455 100644
--- a/ndb/src/ndbapi/NdbOperationScan.cpp
+++ b/ndb/src/ndbapi/NdbOperationScan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbOperationSearch.cpp b/ndb/src/ndbapi/NdbOperationSearch.cpp
index ede3240e9f4..8d678117e04 100644
--- a/ndb/src/ndbapi/NdbOperationSearch.cpp
+++ b/ndb/src/ndbapi/NdbOperationSearch.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbPool.cpp b/ndb/src/ndbapi/NdbPool.cpp
index a8263f564f1..9a83cade52b 100644
--- a/ndb/src/ndbapi/NdbPool.cpp
+++ b/ndb/src/ndbapi/NdbPool.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbPoolImpl.cpp b/ndb/src/ndbapi/NdbPoolImpl.cpp
index 32e0a6f1410..e5d1b000601 100644
--- a/ndb/src/ndbapi/NdbPoolImpl.cpp
+++ b/ndb/src/ndbapi/NdbPoolImpl.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbPoolImpl.hpp b/ndb/src/ndbapi/NdbPoolImpl.hpp
index cd36f30e90b..f4dbaf009cb 100644
--- a/ndb/src/ndbapi/NdbPoolImpl.hpp
+++ b/ndb/src/ndbapi/NdbPoolImpl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbRecAttr.cpp b/ndb/src/ndbapi/NdbRecAttr.cpp
index 771da56523c..e1b0ef3a350 100644
--- a/ndb/src/ndbapi/NdbRecAttr.cpp
+++ b/ndb/src/ndbapi/NdbRecAttr.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbReceiver.cpp b/ndb/src/ndbapi/NdbReceiver.cpp
index 62119880076..9322f88a351 100644
--- a/ndb/src/ndbapi/NdbReceiver.cpp
+++ b/ndb/src/ndbapi/NdbReceiver.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbScanFilter.cpp b/ndb/src/ndbapi/NdbScanFilter.cpp
index b39fd10fe95..2e9e338d5aa 100644
--- a/ndb/src/ndbapi/NdbScanFilter.cpp
+++ b/ndb/src/ndbapi/NdbScanFilter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp
index a0322f09256..30046978542 100644
--- a/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -653,9 +652,9 @@ NdbScanOperation::doSend(int ProcessorId)
void NdbScanOperation::close(bool forceSend, bool releaseOp)
{
DBUG_ENTER("NdbScanOperation::close");
- DBUG_PRINT("enter", ("this=%x tcon=%x con=%x force=%d release=%d",
- (UintPtr)this,
- (UintPtr)m_transConnection, (UintPtr)theNdbCon,
+ DBUG_PRINT("enter", ("this: 0x%lx tcon: 0x%lx con: 0x%lx force: %d release: %d",
+ (long)this,
+ (long)m_transConnection, (long)theNdbCon,
forceSend, releaseOp));
if(m_transConnection){
diff --git a/ndb/src/ndbapi/NdbTransaction.cpp b/ndb/src/ndbapi/NdbTransaction.cpp
index 86dc92a86c1..2fe43b8cc21 100644
--- a/ndb/src/ndbapi/NdbTransaction.cpp
+++ b/ndb/src/ndbapi/NdbTransaction.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -474,6 +473,7 @@ NdbTransaction::executeNoBlobs(ExecType aTypeOfExec,
* This timeout situation can occur if NDB crashes.
*/
ndbout << "This timeout should never occur, execute(..)" << endl;
+ theError.code = 4012;
setOperationErrorCodeAbort(4012); // Error code for "Cluster Failure"
DBUG_RETURN(-1);
}//if
@@ -923,7 +923,10 @@ NdbTransaction::release(){
* The user did not perform any rollback but simply closed the
* transaction. We must rollback Ndb since Ndb have been contacted.
************************************************************************/
- execute(Rollback);
+ if (!theSimpleState)
+ {
+ execute(Rollback);
+ }
}//if
theMagicNumber = 0xFE11DC;
theInUseState = false;
@@ -1007,7 +1010,8 @@ void
NdbTransaction::releaseExecutedScanOperation(NdbIndexScanOperation* cursorOp)
{
DBUG_ENTER("NdbTransaction::releaseExecutedScanOperation");
- DBUG_PRINT("enter", ("this=0x%x op=0x%x", (UintPtr)this, (UintPtr)cursorOp));
+ DBUG_PRINT("enter", ("this: 0x%lx op=0x%lx",
+ (long)this, (long)cursorOp));
releaseScanOperation(&m_firstExecutedScanOp, 0, cursorOp);
@@ -1962,6 +1966,14 @@ NdbTransaction::receiveTCINDXCONF(const TcIndxConf * indxConf,
theGlobalCheckpointId = tGCI;
} else if ((tNoComp >= tNoSent) &&
(theLastExecOpInList->theCommitIndicator == 1)){
+
+ if (m_abortOption == AO_IgnoreError && theError.code != 0){
+ /**
+ * There's always a TCKEYCONF when using IgnoreError
+ */
+ return -1;
+ }
+
/**********************************************************************/
// We sent the transaction with Commit flag set and received a CONF with
// no Commit flag set. This is clearly an anomaly.
diff --git a/ndb/src/ndbapi/NdbTransactionScan.cpp b/ndb/src/ndbapi/NdbTransactionScan.cpp
index 4c507f6ab8c..a2bbf45fbb5 100644
--- a/ndb/src/ndbapi/NdbTransactionScan.cpp
+++ b/ndb/src/ndbapi/NdbTransactionScan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbUtil.cpp b/ndb/src/ndbapi/NdbUtil.cpp
index 6019ea675a1..c0087e51777 100644
--- a/ndb/src/ndbapi/NdbUtil.cpp
+++ b/ndb/src/ndbapi/NdbUtil.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbUtil.hpp b/ndb/src/ndbapi/NdbUtil.hpp
index 268f6c69e6f..f76b21cfceb 100644
--- a/ndb/src/ndbapi/NdbUtil.hpp
+++ b/ndb/src/ndbapi/NdbUtil.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/NdbWaiter.hpp b/ndb/src/ndbapi/NdbWaiter.hpp
index 8b7b2a75879..c6154044ead 100644
--- a/ndb/src/ndbapi/NdbWaiter.hpp
+++ b/ndb/src/ndbapi/NdbWaiter.hpp
@@ -1,8 +1,7 @@
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/Ndberr.cpp b/ndb/src/ndbapi/Ndberr.cpp
index ad0b4eafcb4..4a237a561b7 100644
--- a/ndb/src/ndbapi/Ndberr.cpp
+++ b/ndb/src/ndbapi/Ndberr.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/Ndbif.cpp b/ndb/src/ndbapi/Ndbif.cpp
index 3ab9446e011..75ec5df60cb 100644
--- a/ndb/src/ndbapi/Ndbif.cpp
+++ b/ndb/src/ndbapi/Ndbif.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -952,6 +951,7 @@ Ndb::check_send_timeout()
//abort();
#endif
a_con->theReleaseOnClose = true;
+ a_con->theError.code = 4012;
a_con->setOperationErrorCodeAbort(4012);
a_con->theCommitStatus = NdbTransaction::NeedAbort;
a_con->theCompletionStatus = NdbTransaction::CompletedFailure;
diff --git a/ndb/src/ndbapi/Ndbinit.cpp b/ndb/src/ndbapi/Ndbinit.cpp
index fbabe9e6dc6..35ad7882e78 100644
--- a/ndb/src/ndbapi/Ndbinit.cpp
+++ b/ndb/src/ndbapi/Ndbinit.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/Ndblist.cpp b/ndb/src/ndbapi/Ndblist.cpp
index f82348fc91d..812410e283f 100644
--- a/ndb/src/ndbapi/Ndblist.cpp
+++ b/ndb/src/ndbapi/Ndblist.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -361,7 +360,7 @@ void
Ndb::releaseScanOperation(NdbIndexScanOperation* aScanOperation)
{
DBUG_ENTER("Ndb::releaseScanOperation");
- DBUG_PRINT("enter", ("op=%x", (UintPtr)aScanOperation));
+ DBUG_PRINT("enter", ("op: 0x%lx", (long)aScanOperation));
#ifdef ndb_release_check_dup
{ NdbIndexScanOperation* tOp = theScanOpIdleList;
while (tOp != NULL) {
diff --git a/ndb/src/ndbapi/ObjectMap.hpp b/ndb/src/ndbapi/ObjectMap.hpp
index c730d1ce6b1..486ef08abb8 100644
--- a/ndb/src/ndbapi/ObjectMap.hpp
+++ b/ndb/src/ndbapi/ObjectMap.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/SignalSender.cpp b/ndb/src/ndbapi/SignalSender.cpp
index 0ecc98f5f29..804ea92877d 100644
--- a/ndb/src/ndbapi/SignalSender.cpp
+++ b/ndb/src/ndbapi/SignalSender.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,6 +19,14 @@
#include <signaldata/NFCompleteRep.hpp>
#include <signaldata/NodeFailRep.hpp>
+static
+void
+require(bool x)
+{
+ if (!x)
+ abort();
+}
+
SimpleSignal::SimpleSignal(bool dealloc){
memset(this, 0, sizeof(* this));
deallocSections = dealloc;
@@ -146,6 +153,7 @@ SignalSender::waitFor(Uint32 timeOutMillis, T & t)
{
SimpleSignal * s = t.check(m_jobBuffer);
if(s != 0){
+ m_usedBuffer.push_back(s);
return s;
}
diff --git a/ndb/src/ndbapi/SignalSender.hpp b/ndb/src/ndbapi/SignalSender.hpp
index 4b991460034..ec874e63c52 100644
--- a/ndb/src/ndbapi/SignalSender.hpp
+++ b/ndb/src/ndbapi/SignalSender.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/TransporterFacade.cpp b/ndb/src/ndbapi/TransporterFacade.cpp
index 7554111f4bd..79240180098 100644
--- a/ndb/src/ndbapi/TransporterFacade.cpp
+++ b/ndb/src/ndbapi/TransporterFacade.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/TransporterFacade.hpp b/ndb/src/ndbapi/TransporterFacade.hpp
index 48e1c8ed25f..2e0f08601e5 100644
--- a/ndb/src/ndbapi/TransporterFacade.hpp
+++ b/ndb/src/ndbapi/TransporterFacade.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/ndb_cluster_connection.cpp b/ndb/src/ndbapi/ndb_cluster_connection.cpp
index 3ae84125112..467522aecd8 100644
--- a/ndb/src/ndbapi/ndb_cluster_connection.cpp
+++ b/ndb/src/ndbapi/ndb_cluster_connection.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp b/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
index a50d3004364..5bb5f0a0fca 100644
--- a/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
+++ b/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/ndberror.c b/ndb/src/ndbapi/ndberror.c
index 6173292261d..45248000703 100644
--- a/ndb/src/ndbapi/ndberror.c
+++ b/ndb/src/ndbapi/ndberror.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -209,7 +208,6 @@ ErrorBundle ErrorCodes[] = {
/**
* Internal errors
*/
- { 892, IE, "Inconsistent hash index. The index needs to be dropped and recreated" },
{ 896, IE, "Tuple corrupted - wrong checksum or column data in invalid format" },
{ 901, IE, "Inconsistent ordered index. The index needs to be dropped and recreated" },
{ 202, IE, "202" },
@@ -278,6 +276,7 @@ ErrorBundle ErrorCodes[] = {
{ 885, AE, "Stack underflow in interpreter" },
{ 886, AE, "More than 65535 instructions executed in interpreter" },
{ 897, AE, "Update attempt of primary key via ndbcluster internal api (if this occurs via the MySQL server it is a bug, please report)" },
+ { 892, AE, "Unsupported type in scan filter" },
{ 4256, AE, "Must call Ndb::init() before this function" },
{ 4257, AE, "Tried to read too much - too many getValue calls" },
@@ -680,11 +679,14 @@ const char *ndberror_classification_message(ndberror_classification classificati
return empty_string;
}
-int ndb_error_string(int err_no, char *str, unsigned int size)
+int ndb_error_string(int err_no, char *str, int size)
{
ndberror_struct error;
- unsigned int len;
+ int len;
+ assert(size > 1);
+ if(size <= 1)
+ return 0;
error.code = err_no;
ndberror_update(&error);
diff --git a/ndb/src/ndbapi/signal-sender/SignalSender.cpp b/ndb/src/ndbapi/signal-sender/SignalSender.cpp
index 680d0c23b4a..faca172a93e 100644
--- a/ndb/src/ndbapi/signal-sender/SignalSender.cpp
+++ b/ndb/src/ndbapi/signal-sender/SignalSender.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/src/ndbapi/signal-sender/SignalSender.hpp b/ndb/src/ndbapi/signal-sender/SignalSender.hpp
index e4e6c1931d2..e1ed4ba68ed 100644
--- a/ndb/src/ndbapi/signal-sender/SignalSender.hpp
+++ b/ndb/src/ndbapi/signal-sender/SignalSender.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/Makefile.am b/ndb/test/Makefile.am
index b8753668c60..c746f526769 100644
--- a/ndb/test/Makefile.am
+++ b/ndb/test/Makefile.am
@@ -1,3 +1,18 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS = src tools ndbapi run-test
EXTRA_DIST = include
@@ -6,3 +21,6 @@ dist-hook:
-rm -rf `find $(distdir) -type d -name SCCS`
windoze-dsp:
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/ndb/test/include/CpcClient.hpp b/ndb/test/include/CpcClient.hpp
index 8d8e079d219..62f016f8e1d 100644
--- a/ndb/test/include/CpcClient.hpp
+++ b/ndb/test/include/CpcClient.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/HugoAsynchTransactions.hpp b/ndb/test/include/HugoAsynchTransactions.hpp
index d7e6e8fc187..bc79b8d5134 100644
--- a/ndb/test/include/HugoAsynchTransactions.hpp
+++ b/ndb/test/include/HugoAsynchTransactions.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/HugoCalculator.hpp b/ndb/test/include/HugoCalculator.hpp
index 03de46cd7ea..6dfcb253d24 100644
--- a/ndb/test/include/HugoCalculator.hpp
+++ b/ndb/test/include/HugoCalculator.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/HugoOperations.hpp b/ndb/test/include/HugoOperations.hpp
index 82fd5529fa2..04fbf4a6cf1 100644
--- a/ndb/test/include/HugoOperations.hpp
+++ b/ndb/test/include/HugoOperations.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/HugoTransactions.hpp b/ndb/test/include/HugoTransactions.hpp
index 7a15a2f977d..5ed02375e64 100644
--- a/ndb/test/include/HugoTransactions.hpp
+++ b/ndb/test/include/HugoTransactions.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT.hpp b/ndb/test/include/NDBT.hpp
index 657a9cb03b6..144ea00871b 100644
--- a/ndb/test/include/NDBT.hpp
+++ b/ndb/test/include/NDBT.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_DataSet.hpp b/ndb/test/include/NDBT_DataSet.hpp
index 1a0122f617c..b5f91cb50c3 100644
--- a/ndb/test/include/NDBT_DataSet.hpp
+++ b/ndb/test/include/NDBT_DataSet.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_DataSetTransaction.hpp b/ndb/test/include/NDBT_DataSetTransaction.hpp
index 9f250c566dd..bf57ae85ccc 100644
--- a/ndb/test/include/NDBT_DataSetTransaction.hpp
+++ b/ndb/test/include/NDBT_DataSetTransaction.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_Error.hpp b/ndb/test/include/NDBT_Error.hpp
index 6775a107196..352f5926eeb 100644
--- a/ndb/test/include/NDBT_Error.hpp
+++ b/ndb/test/include/NDBT_Error.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_Output.hpp b/ndb/test/include/NDBT_Output.hpp
index aaa619ac479..397a3912c23 100644
--- a/ndb/test/include/NDBT_Output.hpp
+++ b/ndb/test/include/NDBT_Output.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_ResultRow.hpp b/ndb/test/include/NDBT_ResultRow.hpp
index cbb5d7f6c6a..58a36e83d33 100644
--- a/ndb/test/include/NDBT_ResultRow.hpp
+++ b/ndb/test/include/NDBT_ResultRow.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_ReturnCodes.h b/ndb/test/include/NDBT_ReturnCodes.h
index 0bc71ad8ceb..8660c0828f4 100644
--- a/ndb/test/include/NDBT_ReturnCodes.h
+++ b/ndb/test/include/NDBT_ReturnCodes.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_Stats.hpp b/ndb/test/include/NDBT_Stats.hpp
index 28212bdba17..55785f633ec 100644
--- a/ndb/test/include/NDBT_Stats.hpp
+++ b/ndb/test/include/NDBT_Stats.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_Table.hpp b/ndb/test/include/NDBT_Table.hpp
index d2f99b85187..75c516b226c 100644
--- a/ndb/test/include/NDBT_Table.hpp
+++ b/ndb/test/include/NDBT_Table.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_Tables.hpp b/ndb/test/include/NDBT_Tables.hpp
index a6973861af8..53689578aa0 100644
--- a/ndb/test/include/NDBT_Tables.hpp
+++ b/ndb/test/include/NDBT_Tables.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NDBT_Test.hpp b/ndb/test/include/NDBT_Test.hpp
index 027ac356e0c..c102c569933 100644
--- a/ndb/test/include/NDBT_Test.hpp
+++ b/ndb/test/include/NDBT_Test.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbBackup.hpp b/ndb/test/include/NdbBackup.hpp
index e2e672b8a72..9903fe0c6a6 100644
--- a/ndb/test/include/NdbBackup.hpp
+++ b/ndb/test/include/NdbBackup.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbConfig.hpp b/ndb/test/include/NdbConfig.hpp
index 19439fafbb2..efd7e260ac0 100644
--- a/ndb/test/include/NdbConfig.hpp
+++ b/ndb/test/include/NdbConfig.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbGrep.hpp b/ndb/test/include/NdbGrep.hpp
index 31c49d1e4da..3115ef27693 100644
--- a/ndb/test/include/NdbGrep.hpp
+++ b/ndb/test/include/NdbGrep.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbRestarter.hpp b/ndb/test/include/NdbRestarter.hpp
index 3ec92ae786e..2f21c41b9c4 100644
--- a/ndb/test/include/NdbRestarter.hpp
+++ b/ndb/test/include/NdbRestarter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbRestarts.hpp b/ndb/test/include/NdbRestarts.hpp
index aabcd7b9975..fdba34bcc0b 100644
--- a/ndb/test/include/NdbRestarts.hpp
+++ b/ndb/test/include/NdbRestarts.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbSchemaCon.hpp b/ndb/test/include/NdbSchemaCon.hpp
index 313daf0094b..10df5f6be0b 100644
--- a/ndb/test/include/NdbSchemaCon.hpp
+++ b/ndb/test/include/NdbSchemaCon.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbSchemaOp.hpp b/ndb/test/include/NdbSchemaOp.hpp
index 1edbc155643..768cfe8e78d 100644
--- a/ndb/test/include/NdbSchemaOp.hpp
+++ b/ndb/test/include/NdbSchemaOp.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbTest.hpp b/ndb/test/include/NdbTest.hpp
index a2e612b7ffa..105147af7de 100644
--- a/ndb/test/include/NdbTest.hpp
+++ b/ndb/test/include/NdbTest.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/NdbTimer.hpp b/ndb/test/include/NdbTimer.hpp
index b0d500b5c2c..94a39522434 100644
--- a/ndb/test/include/NdbTimer.hpp
+++ b/ndb/test/include/NdbTimer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/TestNdbEventOperation.hpp b/ndb/test/include/TestNdbEventOperation.hpp
index 307b0e0089b..a25e89f704d 100644
--- a/ndb/test/include/TestNdbEventOperation.hpp
+++ b/ndb/test/include/TestNdbEventOperation.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/UtilTransactions.hpp b/ndb/test/include/UtilTransactions.hpp
index 333f5d98328..75bbcd9c776 100644
--- a/ndb/test/include/UtilTransactions.hpp
+++ b/ndb/test/include/UtilTransactions.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/include/getarg.h b/ndb/test/include/getarg.h
index 03ed25f6828..64a0b9f0e14 100644
--- a/ndb/test/include/getarg.h
+++ b/ndb/test/include/getarg.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/InsertRecs.cpp b/ndb/test/ndbapi/InsertRecs.cpp
index f42786d666d..41f17da3aae 100644
--- a/ndb/test/ndbapi/InsertRecs.cpp
+++ b/ndb/test/ndbapi/InsertRecs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/Makefile.am b/ndb/test/ndbapi/Makefile.am
index b639c71d07a..4766e6b83b3 100644
--- a/ndb/test/ndbapi/Makefile.am
+++ b/ndb/test/ndbapi/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
SUBDIRS = bank
diff --git a/ndb/test/ndbapi/ScanFilter.hpp b/ndb/test/ndbapi/ScanFilter.hpp
index 09786756798..aa866648bf6 100644
--- a/ndb/test/ndbapi/ScanFilter.hpp
+++ b/ndb/test/ndbapi/ScanFilter.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ScanFunctions.hpp b/ndb/test/ndbapi/ScanFunctions.hpp
index 37389d9b7de..7cb984f4157 100644
--- a/ndb/test/ndbapi/ScanFunctions.hpp
+++ b/ndb/test/ndbapi/ScanFunctions.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ScanInterpretTest.hpp b/ndb/test/ndbapi/ScanInterpretTest.hpp
index d4e9bbecc81..d0c2acc621f 100644
--- a/ndb/test/ndbapi/ScanInterpretTest.hpp
+++ b/ndb/test/ndbapi/ScanInterpretTest.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/TraceNdbApi.cpp b/ndb/test/ndbapi/TraceNdbApi.cpp
index bd43b15f2e6..42a424c96f1 100644
--- a/ndb/test/ndbapi/TraceNdbApi.cpp
+++ b/ndb/test/ndbapi/TraceNdbApi.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/VerifyNdbApi.cpp b/ndb/test/ndbapi/VerifyNdbApi.cpp
index 79645827e2c..89aaf2ff734 100644
--- a/ndb/test/ndbapi/VerifyNdbApi.cpp
+++ b/ndb/test/ndbapi/VerifyNdbApi.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/acid.cpp b/ndb/test/ndbapi/acid.cpp
index 3eb1625be26..b0343c1d7ee 100644
--- a/ndb/test/ndbapi/acid.cpp
+++ b/ndb/test/ndbapi/acid.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/acid2.cpp b/ndb/test/ndbapi/acid2.cpp
index 7bd7ec00ac5..c798e1f98c8 100644
--- a/ndb/test/ndbapi/acid2.cpp
+++ b/ndb/test/ndbapi/acid2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/adoInsertRecs.cpp b/ndb/test/ndbapi/adoInsertRecs.cpp
index 0bc67ef641b..6e33d93fa41 100644
--- a/ndb/test/ndbapi/adoInsertRecs.cpp
+++ b/ndb/test/ndbapi/adoInsertRecs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/asyncGenerator.cpp b/ndb/test/ndbapi/asyncGenerator.cpp
index d91e38dff1a..16dd8ae74ce 100644
--- a/ndb/test/ndbapi/asyncGenerator.cpp
+++ b/ndb/test/ndbapi/asyncGenerator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/Bank.cpp b/ndb/test/ndbapi/bank/Bank.cpp
index 37224fdd055..07edc7da33a 100644
--- a/ndb/test/ndbapi/bank/Bank.cpp
+++ b/ndb/test/ndbapi/bank/Bank.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/Bank.hpp b/ndb/test/ndbapi/bank/Bank.hpp
index b80f02dae97..47c98374485 100644
--- a/ndb/test/ndbapi/bank/Bank.hpp
+++ b/ndb/test/ndbapi/bank/Bank.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/BankLoad.cpp b/ndb/test/ndbapi/bank/BankLoad.cpp
index 34947019a51..76a9df5a495 100644
--- a/ndb/test/ndbapi/bank/BankLoad.cpp
+++ b/ndb/test/ndbapi/bank/BankLoad.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/Makefile.am b/ndb/test/ndbapi/bank/Makefile.am
index d4f82a7f9c4..b754ab19386 100644
--- a/ndb/test/ndbapi/bank/Makefile.am
+++ b/ndb/test/ndbapi/bank/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
ndbtest_PROGRAMS = testBank bankSumAccounts bankValidateAllGLs bankMakeGL bankTransactionMaker bankCreator bankTimer
diff --git a/ndb/test/ndbapi/bank/bankCreator.cpp b/ndb/test/ndbapi/bank/bankCreator.cpp
index 257255babc8..0cd42a23c2b 100644
--- a/ndb/test/ndbapi/bank/bankCreator.cpp
+++ b/ndb/test/ndbapi/bank/bankCreator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/bankMakeGL.cpp b/ndb/test/ndbapi/bank/bankMakeGL.cpp
index cf373481e3e..cc3843d39ca 100644
--- a/ndb/test/ndbapi/bank/bankMakeGL.cpp
+++ b/ndb/test/ndbapi/bank/bankMakeGL.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/bankSumAccounts.cpp b/ndb/test/ndbapi/bank/bankSumAccounts.cpp
index 034f70f8f95..e40b4b290b8 100644
--- a/ndb/test/ndbapi/bank/bankSumAccounts.cpp
+++ b/ndb/test/ndbapi/bank/bankSumAccounts.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/bankTimer.cpp b/ndb/test/ndbapi/bank/bankTimer.cpp
index 298f85e1e43..121759bb1da 100644
--- a/ndb/test/ndbapi/bank/bankTimer.cpp
+++ b/ndb/test/ndbapi/bank/bankTimer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/bankTransactionMaker.cpp b/ndb/test/ndbapi/bank/bankTransactionMaker.cpp
index f8e646b6553..cc90f7abc12 100644
--- a/ndb/test/ndbapi/bank/bankTransactionMaker.cpp
+++ b/ndb/test/ndbapi/bank/bankTransactionMaker.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp b/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp
index 0c268121d8a..098d958097c 100644
--- a/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp
+++ b/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bank/testBank.cpp b/ndb/test/ndbapi/bank/testBank.cpp
index 6be66d528b1..b7ddba8bdba 100644
--- a/ndb/test/ndbapi/bank/testBank.cpp
+++ b/ndb/test/ndbapi/bank/testBank.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/asyncGenerator.cpp b/ndb/test/ndbapi/bench/asyncGenerator.cpp
index d91e38dff1a..16dd8ae74ce 100644
--- a/ndb/test/ndbapi/bench/asyncGenerator.cpp
+++ b/ndb/test/ndbapi/bench/asyncGenerator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/dbGenerator.h b/ndb/test/ndbapi/bench/dbGenerator.h
index 2256498e151..3e1a3e6704a 100644
--- a/ndb/test/ndbapi/bench/dbGenerator.h
+++ b/ndb/test/ndbapi/bench/dbGenerator.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/dbPopulate.cpp b/ndb/test/ndbapi/bench/dbPopulate.cpp
index 42fbb52f3b2..89c312ab636 100644
--- a/ndb/test/ndbapi/bench/dbPopulate.cpp
+++ b/ndb/test/ndbapi/bench/dbPopulate.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/dbPopulate.h b/ndb/test/ndbapi/bench/dbPopulate.h
index 1916720e141..a7220b671b1 100644
--- a/ndb/test/ndbapi/bench/dbPopulate.h
+++ b/ndb/test/ndbapi/bench/dbPopulate.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/macros.h b/ndb/test/ndbapi/bench/macros.h
index 22b7f564490..d50183d1749 100644
--- a/ndb/test/ndbapi/bench/macros.h
+++ b/ndb/test/ndbapi/bench/macros.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp b/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp
index 828b924582f..5e488436d9a 100644
--- a/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp
+++ b/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/mainPopulate.cpp b/ndb/test/ndbapi/bench/mainPopulate.cpp
index 5ab1a5b015d..8189821723c 100644
--- a/ndb/test/ndbapi/bench/mainPopulate.cpp
+++ b/ndb/test/ndbapi/bench/mainPopulate.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_async1.cpp b/ndb/test/ndbapi/bench/ndb_async1.cpp
index 2a84f6b2aca..e532744ac93 100644
--- a/ndb/test/ndbapi/bench/ndb_async1.cpp
+++ b/ndb/test/ndbapi/bench/ndb_async1.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_async2.cpp b/ndb/test/ndbapi/bench/ndb_async2.cpp
index 31cf1d8310a..14422f6617b 100644
--- a/ndb/test/ndbapi/bench/ndb_async2.cpp
+++ b/ndb/test/ndbapi/bench/ndb_async2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_error.hpp b/ndb/test/ndbapi/bench/ndb_error.hpp
index d90f5506813..1874213c6da 100644
--- a/ndb/test/ndbapi/bench/ndb_error.hpp
+++ b/ndb/test/ndbapi/bench/ndb_error.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_schema.hpp b/ndb/test/ndbapi/bench/ndb_schema.hpp
index af08bc2eecd..ff7be1f8956 100644
--- a/ndb/test/ndbapi/bench/ndb_schema.hpp
+++ b/ndb/test/ndbapi/bench/ndb_schema.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_user_transaction.cpp b/ndb/test/ndbapi/bench/ndb_user_transaction.cpp
index 182f1f99586..37de6dadc90 100644
--- a/ndb/test/ndbapi/bench/ndb_user_transaction.cpp
+++ b/ndb/test/ndbapi/bench/ndb_user_transaction.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp b/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp
index df3c7a7989e..bb27bfe3600 100644
--- a/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp
+++ b/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp b/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp
index d2c92ecd424..d193b21fa11 100644
--- a/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp
+++ b/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp b/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp
index e652c7bfed8..5df4717eb6d 100644
--- a/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp
+++ b/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp b/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp
index 86580008d10..d76f6afd3f9 100644
--- a/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp
+++ b/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp b/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp
index 262f38e9ffb..4f705ee5047 100644
--- a/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp
+++ b/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/testData.h b/ndb/test/ndbapi/bench/testData.h
index 3db85e7342e..0327656de73 100644
--- a/ndb/test/ndbapi/bench/testData.h
+++ b/ndb/test/ndbapi/bench/testData.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/testDefinitions.h b/ndb/test/ndbapi/bench/testDefinitions.h
index 2f4aeb30975..e2705b55a34 100644
--- a/ndb/test/ndbapi/bench/testDefinitions.h
+++ b/ndb/test/ndbapi/bench/testDefinitions.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/userInterface.cpp b/ndb/test/ndbapi/bench/userInterface.cpp
index 35e88183230..651963cb95a 100644
--- a/ndb/test/ndbapi/bench/userInterface.cpp
+++ b/ndb/test/ndbapi/bench/userInterface.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bench/userInterface.h b/ndb/test/ndbapi/bench/userInterface.h
index bad61fcf171..5492b012553 100644
--- a/ndb/test/ndbapi/bench/userInterface.h
+++ b/ndb/test/ndbapi/bench/userInterface.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/benchronja.cpp b/ndb/test/ndbapi/benchronja.cpp
index a7523e8e416..4973e6e2487 100644
--- a/ndb/test/ndbapi/benchronja.cpp
+++ b/ndb/test/ndbapi/benchronja.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/bulk_copy.cpp b/ndb/test/ndbapi/bulk_copy.cpp
index b53654ce0fb..3828a833fc6 100644
--- a/ndb/test/ndbapi/bulk_copy.cpp
+++ b/ndb/test/ndbapi/bulk_copy.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/cdrserver.cpp b/ndb/test/ndbapi/cdrserver.cpp
index 976319034bf..1a39edcfaec 100644
--- a/ndb/test/ndbapi/cdrserver.cpp
+++ b/ndb/test/ndbapi/cdrserver.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/celloDb.cpp b/ndb/test/ndbapi/celloDb.cpp
index 2d6401c355a..243930056f7 100644
--- a/ndb/test/ndbapi/celloDb.cpp
+++ b/ndb/test/ndbapi/celloDb.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/create_all_tabs.cpp b/ndb/test/ndbapi/create_all_tabs.cpp
index f06078d67a2..1820af6fec2 100644
--- a/ndb/test/ndbapi/create_all_tabs.cpp
+++ b/ndb/test/ndbapi/create_all_tabs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/create_tab.cpp b/ndb/test/ndbapi/create_tab.cpp
index b35c8655236..d93308bbec7 100644
--- a/ndb/test/ndbapi/create_tab.cpp
+++ b/ndb/test/ndbapi/create_tab.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/drop_all_tabs.cpp b/ndb/test/ndbapi/drop_all_tabs.cpp
index f12d750916e..cebd257cc29 100644
--- a/ndb/test/ndbapi/drop_all_tabs.cpp
+++ b/ndb/test/ndbapi/drop_all_tabs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/flexAsynch.cpp b/ndb/test/ndbapi/flexAsynch.cpp
index 8a7dbec1561..20a157fc2f3 100644
--- a/ndb/test/ndbapi/flexAsynch.cpp
+++ b/ndb/test/ndbapi/flexAsynch.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/flexBench.cpp b/ndb/test/ndbapi/flexBench.cpp
index abddecfdc40..5c60022797b 100644
--- a/ndb/test/ndbapi/flexBench.cpp
+++ b/ndb/test/ndbapi/flexBench.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/flexHammer.cpp b/ndb/test/ndbapi/flexHammer.cpp
index f254b1e5ccf..9abac905f5a 100644
--- a/ndb/test/ndbapi/flexHammer.cpp
+++ b/ndb/test/ndbapi/flexHammer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/flexScan.cpp b/ndb/test/ndbapi/flexScan.cpp
index 1f001bd0210..cbea90f44f4 100644
--- a/ndb/test/ndbapi/flexScan.cpp
+++ b/ndb/test/ndbapi/flexScan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/flexTT.cpp b/ndb/test/ndbapi/flexTT.cpp
index 7cd5ac8e3b4..71d5b6c096e 100644
--- a/ndb/test/ndbapi/flexTT.cpp
+++ b/ndb/test/ndbapi/flexTT.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/flexTimedAsynch.cpp b/ndb/test/ndbapi/flexTimedAsynch.cpp
index 2b8c0bdd5f8..cc44ab8b237 100644
--- a/ndb/test/ndbapi/flexTimedAsynch.cpp
+++ b/ndb/test/ndbapi/flexTimedAsynch.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/flex_bench_mysql.cpp b/ndb/test/ndbapi/flex_bench_mysql.cpp
index 3efb7ee2094..5d4e7ece7c7 100644
--- a/ndb/test/ndbapi/flex_bench_mysql.cpp
+++ b/ndb/test/ndbapi/flex_bench_mysql.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/index.cpp b/ndb/test/ndbapi/index.cpp
index c22da594164..1326f9fee75 100644
--- a/ndb/test/ndbapi/index.cpp
+++ b/ndb/test/ndbapi/index.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/index2.cpp b/ndb/test/ndbapi/index2.cpp
index f739468d7df..8c7ea26fead 100644
--- a/ndb/test/ndbapi/index2.cpp
+++ b/ndb/test/ndbapi/index2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/initronja.cpp b/ndb/test/ndbapi/initronja.cpp
index 3ce274e4319..63bbc374c62 100644
--- a/ndb/test/ndbapi/initronja.cpp
+++ b/ndb/test/ndbapi/initronja.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/interpreterInTup.cpp b/ndb/test/ndbapi/interpreterInTup.cpp
index a07d5898213..4d4ef75f81d 100644
--- a/ndb/test/ndbapi/interpreterInTup.cpp
+++ b/ndb/test/ndbapi/interpreterInTup.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/mainAsyncGenerator.cpp b/ndb/test/ndbapi/mainAsyncGenerator.cpp
index 73a8b98ab57..b9c623c4793 100644
--- a/ndb/test/ndbapi/mainAsyncGenerator.cpp
+++ b/ndb/test/ndbapi/mainAsyncGenerator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/msa.cpp b/ndb/test/ndbapi/msa.cpp
index e39f7a8c64a..2db694f4dbb 100644
--- a/ndb/test/ndbapi/msa.cpp
+++ b/ndb/test/ndbapi/msa.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_async1.cpp b/ndb/test/ndbapi/ndb_async1.cpp
index 2a84f6b2aca..e532744ac93 100644
--- a/ndb/test/ndbapi/ndb_async1.cpp
+++ b/ndb/test/ndbapi/ndb_async1.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_async2.cpp b/ndb/test/ndbapi/ndb_async2.cpp
index 0c1d138defb..9aa5ef0ae87 100644
--- a/ndb/test/ndbapi/ndb_async2.cpp
+++ b/ndb/test/ndbapi/ndb_async2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_user_populate.cpp b/ndb/test/ndbapi/ndb_user_populate.cpp
index ce3a76cdd59..9aea13932ec 100644
--- a/ndb/test/ndbapi/ndb_user_populate.cpp
+++ b/ndb/test/ndbapi/ndb_user_populate.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_user_transaction.cpp b/ndb/test/ndbapi/ndb_user_transaction.cpp
index 182f1f99586..37de6dadc90 100644
--- a/ndb/test/ndbapi/ndb_user_transaction.cpp
+++ b/ndb/test/ndbapi/ndb_user_transaction.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_user_transaction2.cpp b/ndb/test/ndbapi/ndb_user_transaction2.cpp
index df3c7a7989e..bb27bfe3600 100644
--- a/ndb/test/ndbapi/ndb_user_transaction2.cpp
+++ b/ndb/test/ndbapi/ndb_user_transaction2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_user_transaction3.cpp b/ndb/test/ndbapi/ndb_user_transaction3.cpp
index d2c92ecd424..d193b21fa11 100644
--- a/ndb/test/ndbapi/ndb_user_transaction3.cpp
+++ b/ndb/test/ndbapi/ndb_user_transaction3.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_user_transaction4.cpp b/ndb/test/ndbapi/ndb_user_transaction4.cpp
index e652c7bfed8..5df4717eb6d 100644
--- a/ndb/test/ndbapi/ndb_user_transaction4.cpp
+++ b/ndb/test/ndbapi/ndb_user_transaction4.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_user_transaction5.cpp b/ndb/test/ndbapi/ndb_user_transaction5.cpp
index 86580008d10..d76f6afd3f9 100644
--- a/ndb/test/ndbapi/ndb_user_transaction5.cpp
+++ b/ndb/test/ndbapi/ndb_user_transaction5.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/ndb_user_transaction6.cpp b/ndb/test/ndbapi/ndb_user_transaction6.cpp
index 262f38e9ffb..4f705ee5047 100644
--- a/ndb/test/ndbapi/ndb_user_transaction6.cpp
+++ b/ndb/test/ndbapi/ndb_user_transaction6.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp b/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp
index 2bd4eab6b70..16acd639f18 100644
--- a/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp
+++ b/ndb/test/ndbapi/old_dirs/acid2/TraceNdbApi.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp b/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp
index 4a5b8cc8111..f9d5dff698d 100644
--- a/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp
+++ b/ndb/test/ndbapi/old_dirs/acid2/VerifyNdbApi.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h
index 2256498e151..3e1a3e6704a 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/dbGenerator.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h
index 3db85e7342e..0327656de73 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/testData.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h
index 94bd1e80ab3..61769904964 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/include/userInterface.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h
index 22b7f564490..d50183d1749 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/macros.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp
index 9e6c5e55e73..cb5cd062ae4 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/async-src/user/ndb_error.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp
index af08bc2eecd..ff7be1f8956 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/include/ndb_schema.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h b/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h
index 2f4aeb30975..e2705b55a34 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/include/testDefinitions.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c
index 7484c7647f5..a0df1e7c1d2 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h
index 824688b6cf9..206b13c3f00 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/dbGenerator.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c
index 4a31db0b4e9..cb47207a0f2 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/generator/mainGenerator.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h
index 863c230502b..494b111ea7f 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/testData.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h
index b70ded87756..ed1146f3a0c 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/include/userInterface.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c
index 42fbb52f3b2..89c312ab636 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h
index 1916720e141..a7220b671b1 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/dbPopulate.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c
index 838ac8a7196..e882edcc186 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/populator/mainPopulate.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c
index dd100507016..f3ad4c9f12f 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/localDbPrepare.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h
index 363f247b93f..c4a9c38f2a3 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/macros.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp
index b3aaeac822e..a86966d128e 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/ndb_error.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h
index 1de468d4dad..61baca41501 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userHandle.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c
index bacf1861dde..03a9465b32c 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userInterface.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c
index a2f4787bb0c..bdc60912482 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/old/userTransaction.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h
index 6da76fc2bff..9b6ac1ef161 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userHandle.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp
index fe3c17acbf5..f20316ec52a 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userInterface.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c
index a2f4787bb0c..bdc60912482 100644
--- a/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c
+++ b/ndb/test/ndbapi/old_dirs/lmc-bench/src/user/userTransaction.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/vw_test/bcd.h b/ndb/test/ndbapi/old_dirs/vw_test/bcd.h
index d0aaffbd8b7..9e42355d30f 100644
--- a/ndb/test/ndbapi/old_dirs/vw_test/bcd.h
+++ b/ndb/test/ndbapi/old_dirs/vw_test/bcd.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/vw_test/utv.h b/ndb/test/ndbapi/old_dirs/vw_test/utv.h
index 6f378e5595b..7dfbf29b467 100644
--- a/ndb/test/ndbapi/old_dirs/vw_test/utv.h
+++ b/ndb/test/ndbapi/old_dirs/vw_test/utv.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h b/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h
index 3c5444d733b..156cd4d3c3d 100644
--- a/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h
+++ b/ndb/test/ndbapi/old_dirs/vw_test/vcdrfunc.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/restarter.cpp b/ndb/test/ndbapi/restarter.cpp
index d6831494b48..089f6834375 100644
--- a/ndb/test/ndbapi/restarter.cpp
+++ b/ndb/test/ndbapi/restarter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/restarter2.cpp b/ndb/test/ndbapi/restarter2.cpp
index 846748a7bba..f14f703f29f 100644
--- a/ndb/test/ndbapi/restarter2.cpp
+++ b/ndb/test/ndbapi/restarter2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/restarts.cpp b/ndb/test/ndbapi/restarts.cpp
index 184e754de4a..9269953fe4a 100644
--- a/ndb/test/ndbapi/restarts.cpp
+++ b/ndb/test/ndbapi/restarts.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/size.cpp b/ndb/test/ndbapi/size.cpp
index ff178b11d68..b9cf44e1a35 100644
--- a/ndb/test/ndbapi/size.cpp
+++ b/ndb/test/ndbapi/size.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testBackup.cpp b/ndb/test/ndbapi/testBackup.cpp
index da3c52cf4d2..79fec217c08 100644
--- a/ndb/test/ndbapi/testBackup.cpp
+++ b/ndb/test/ndbapi/testBackup.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testBasic.cpp b/ndb/test/ndbapi/testBasic.cpp
index 4d64b15ecfa..a9487262ea3 100644
--- a/ndb/test/ndbapi/testBasic.cpp
+++ b/ndb/test/ndbapi/testBasic.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1034,6 +1033,28 @@ runMassiveRollback2(NDBT_Context* ctx, NDBT_Step* step){
return result;
}
+int
+runBug25090(NDBT_Context* ctx, NDBT_Step* step){
+
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary * dict = pNdb->getDictionary();
+
+ HugoOperations ops(*ctx->getTab());
+
+ int loops = ctx->getNumLoops();
+ const int rows = ctx->getNumRecords();
+
+ while (loops--)
+ {
+ ops.startTransaction(pNdb);
+ ops.pkReadRecord(pNdb, 1, 1);
+ ops.execute_Commit(pNdb, AO_IgnoreError);
+ sleep(10);
+ ops.closeTransaction(pNdb);
+ }
+
+ return NDBT_OK;
+}
NDBT_TESTSUITE(testBasic);
TESTCASE("PkInsert",
@@ -1277,6 +1298,10 @@ TESTCASE("Fill",
INITIALIZER(runPkRead);
FINALIZER(runClearTable2);
}
+TESTCASE("Bug25090",
+ "Verify what happens when we fill the db" ){
+ STEP(runBug25090);
+}
NDBT_TESTSUITE_END(testBasic);
#if 0
diff --git a/ndb/test/ndbapi/testBasicAsynch.cpp b/ndb/test/ndbapi/testBasicAsynch.cpp
index 6daa22fdc6a..c7e5c187218 100644
--- a/ndb/test/ndbapi/testBasicAsynch.cpp
+++ b/ndb/test/ndbapi/testBasicAsynch.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testBlobs.cpp b/ndb/test/ndbapi/testBlobs.cpp
index fae3a662ff9..81072f6a12a 100644
--- a/ndb/test/ndbapi/testBlobs.cpp
+++ b/ndb/test/ndbapi/testBlobs.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testDataBuffers.cpp b/ndb/test/ndbapi/testDataBuffers.cpp
index 83a063d60d3..92e97f4e6e1 100644
--- a/ndb/test/ndbapi/testDataBuffers.cpp
+++ b/ndb/test/ndbapi/testDataBuffers.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testDeadlock.cpp b/ndb/test/ndbapi/testDeadlock.cpp
index 0070a7ecc83..045abf66d98 100644
--- a/ndb/test/ndbapi/testDeadlock.cpp
+++ b/ndb/test/ndbapi/testDeadlock.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testDict.cpp b/ndb/test/ndbapi/testDict.cpp
index ba05bbad7bb..d6cc5dd7c62 100644
--- a/ndb/test/ndbapi/testDict.cpp
+++ b/ndb/test/ndbapi/testDict.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1893,7 +1892,7 @@ runDictOps(NDBT_Context* ctx, NDBT_Step* step)
// create indexes
const char** indlist = NDBT_Tables::getIndexes(tabName);
uint indnum = 0;
- while (*indlist != 0) {
+ while (indlist != 0 && *indlist != 0) {
uint count = 0;
try_create_index:
count++;
diff --git a/ndb/test/ndbapi/testGrepVerify.cpp b/ndb/test/ndbapi/testGrepVerify.cpp
index 52dcda9a162..461ee249985 100644
--- a/ndb/test/ndbapi/testGrepVerify.cpp
+++ b/ndb/test/ndbapi/testGrepVerify.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testIndex.cpp b/ndb/test/ndbapi/testIndex.cpp
index c25aae55897..78672cd519f 100644
--- a/ndb/test/ndbapi/testIndex.cpp
+++ b/ndb/test/ndbapi/testIndex.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1239,7 +1238,64 @@ runBug21384(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK;
}
+int
+runBug25059(NDBT_Context* ctx, NDBT_Step* step)
+{
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary * dict = pNdb->getDictionary();
+ const NdbDictionary::Index * idx = dict->getIndex(pkIdxName, *ctx->getTab());
+ HugoOperations ops(*ctx->getTab(), idx);
+
+ int res = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ const int rows = ctx->getNumRecords();
+
+ while (res == NDBT_OK && loops--)
+ {
+ ops.startTransaction(pNdb);
+ ops.pkReadRecord(pNdb, 10 + rand() % rows, rows);
+ int tmp;
+ if (tmp = ops.execute_Commit(pNdb, AO_IgnoreError))
+ {
+ if (tmp == 4012)
+ res = NDBT_FAILED;
+ else
+ if (ops.getTransaction()->getNdbError().code == 4012)
+ res = NDBT_FAILED;
+ }
+ ops.closeTransaction(pNdb);
+ }
+
+ loops = ctx->getNumLoops();
+ while (res == NDBT_OK && loops--)
+ {
+ ops.startTransaction(pNdb);
+ ops.pkUpdateRecord(pNdb, 10 + rand() % rows, rows);
+ int tmp;
+ int arg;
+ switch(rand() % 2){
+ case 0:
+ arg = AbortOnError;
+ break;
+ case 1:
+ arg = AO_IgnoreError;
+ ndbout_c("ignore error");
+ break;
+ }
+ if (tmp = ops.execute_Commit(pNdb, (AbortOption)arg))
+ {
+ if (tmp == 4012)
+ res = NDBT_FAILED;
+ else
+ if (ops.getTransaction()->getNdbError().code == 4012)
+ res = NDBT_FAILED;
+ }
+ ops.closeTransaction(pNdb);
+ }
+
+ return res;
+}
NDBT_TESTSUITE(testIndex);
TESTCASE("CreateAll",
@@ -1564,6 +1620,14 @@ TESTCASE("Bug21384",
FINALIZER(createPkIndex_Drop);
FINALIZER(runClearTable);
}
+TESTCASE("Bug25059",
+ "Test that unique indexes and nulls"){
+ TC_PROPERTY("LoggedIndexes", (unsigned)0);
+ INITIALIZER(createPkIndex);
+ INITIALIZER(runLoadTable);
+ STEP(runBug25059);
+ FINALIZER(createPkIndex_Drop);
+}
NDBT_TESTSUITE_END(testIndex);
int main(int argc, const char** argv){
diff --git a/ndb/test/ndbapi/testInterpreter.cpp b/ndb/test/ndbapi/testInterpreter.cpp
index 5d930d3d555..0dc032ba7aa 100644
--- a/ndb/test/ndbapi/testInterpreter.cpp
+++ b/ndb/test/ndbapi/testInterpreter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testMgm.cpp b/ndb/test/ndbapi/testMgm.cpp
index 3234117405c..b7037e682f9 100644
--- a/ndb/test/ndbapi/testMgm.cpp
+++ b/ndb/test/ndbapi/testMgm.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testNdbApi.cpp b/ndb/test/ndbapi/testNdbApi.cpp
index f456d852898..a8ea420804e 100644
--- a/ndb/test/ndbapi/testNdbApi.cpp
+++ b/ndb/test/ndbapi/testNdbApi.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp
index c1502940655..9adbfbd46a6 100644
--- a/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/ndb/test/ndbapi/testNodeRestart.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -23,6 +22,7 @@
#include <Vector.hpp>
#include <signaldata/DumpStateOrd.hpp>
#include <Bitmask.hpp>
+#include <RefConvert.hpp>
int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){
@@ -919,6 +919,131 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
+int runBug24717(NDBT_Context* ctx, NDBT_Step* step){
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+ Ndb* pNdb = GETNDB(step);
+
+ HugoTransactions hugoTrans(*ctx->getTab());
+
+ int dump[] = { 9002, 0 } ;
+ Uint32 ownNode = refToNode(pNdb->getReference());
+ dump[1] = ownNode;
+
+ for (; loops; loops --)
+ {
+ int nodeId = restarter.getRandomNotMasterNodeId(rand());
+ restarter.restartOneDbNode(nodeId, false, true, true);
+ restarter.waitNodesNoStart(&nodeId, 1);
+
+ if (restarter.dumpStateOneNode(nodeId, dump, 2))
+ return NDBT_FAILED;
+
+ restarter.startNodes(&nodeId, 1);
+
+ for (Uint32 i = 0; i < 100; i++)
+ {
+ hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
+ }
+
+ restarter.waitClusterStarted();
+ }
+
+ return NDBT_OK;
+}
+
+int runBug25364(NDBT_Context* ctx, NDBT_Step* step){
+ int result = NDBT_OK;
+ NdbRestarter restarter;
+ Ndb* pNdb = GETNDB(step);
+ int loops = ctx->getNumLoops();
+
+ if (restarter.getNumDbNodes() < 4)
+ return NDBT_OK;
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+ for (; loops; loops --)
+ {
+ int master = restarter.getMasterNodeId();
+ int victim = restarter.getRandomNodeOtherNodeGroup(master, rand());
+ int second = restarter.getRandomNodeSameNodeGroup(victim, rand());
+
+ int dump[] = { 935, victim } ;
+ if (restarter.dumpStateOneNode(master, dump, 2))
+ return NDBT_FAILED;
+
+ if (restarter.dumpStateOneNode(master, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.restartOneDbNode(second, false, true, true))
+ return NDBT_FAILED;
+
+ int nodes[2] = { master, second };
+ if (restarter.waitNodesNoStart(nodes, 2))
+ return NDBT_FAILED;
+
+ restarter.startNodes(nodes, 2);
+
+ if (restarter.waitNodesStarted(nodes, 2))
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
+int runBug25554(NDBT_Context* ctx, NDBT_Step* step){
+
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+
+ if (restarter.getNumDbNodes() < 4)
+ return NDBT_OK;
+
+ for (int i = 0; i<loops; i++)
+ {
+ int master = restarter.getMasterNodeId();
+ int node1 = restarter.getRandomNodeOtherNodeGroup(master, rand());
+ restarter.restartOneDbNode(node1, false, true, true);
+
+ int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+
+ if (restarter.dumpStateOneNode(master, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(master, 7141))
+ return NDBT_FAILED;
+
+ if (restarter.waitNodesNoStart(&node1, 1))
+ return NDBT_FAILED;
+
+ if (restarter.dumpStateOneNode(node1, val2, 2))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(node1, 932))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(&node1, 1))
+ return NDBT_FAILED;
+
+ int nodes[] = { master, node1 };
+ if (restarter.waitNodesNoStart(nodes, 2))
+ return NDBT_FAILED;
+
+ if (restarter.startNodes(nodes, 2))
+ return NDBT_FAILED;
+
+ if (restarter.waitClusterStarted())
+ return NDBT_FAILED;
+ }
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
@@ -1232,6 +1357,15 @@ TESTCASE("Bug20185",
STEP(runBug20185);
FINALIZER(runClearTable);
}
+TESTCASE("Bug24717", ""){
+ INITIALIZER(runBug24717);
+}
+TESTCASE("Bug25364", ""){
+ INITIALIZER(runBug25364);
+}
+TESTCASE("Bug25554", ""){
+ INITIALIZER(runBug25554);
+}
NDBT_TESTSUITE_END(testNodeRestart);
int main(int argc, const char** argv){
diff --git a/ndb/test/ndbapi/testOIBasic.cpp b/ndb/test/ndbapi/testOIBasic.cpp
index 271f19a5477..8f77f0bb062 100644
--- a/ndb/test/ndbapi/testOIBasic.cpp
+++ b/ndb/test/ndbapi/testOIBasic.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testOperations.cpp b/ndb/test/ndbapi/testOperations.cpp
index 505b1620900..1f610cade4a 100644
--- a/ndb/test/ndbapi/testOperations.cpp
+++ b/ndb/test/ndbapi/testOperations.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testOrderedIndex.cpp b/ndb/test/ndbapi/testOrderedIndex.cpp
index b3a75410646..60eaca3248b 100644
--- a/ndb/test/ndbapi/testOrderedIndex.cpp
+++ b/ndb/test/ndbapi/testOrderedIndex.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testPartitioning.cpp b/ndb/test/ndbapi/testPartitioning.cpp
index 9d67c27354b..da6889e13c1 100644
--- a/ndb/test/ndbapi/testPartitioning.cpp
+++ b/ndb/test/ndbapi/testPartitioning.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testReadPerf.cpp b/ndb/test/ndbapi/testReadPerf.cpp
index ba5f3c4232d..17ef60c1849 100644
--- a/ndb/test/ndbapi/testReadPerf.cpp
+++ b/ndb/test/ndbapi/testReadPerf.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testRestartGci.cpp b/ndb/test/ndbapi/testRestartGci.cpp
index 4e541d1f38f..7fac47fe3fb 100644
--- a/ndb/test/ndbapi/testRestartGci.cpp
+++ b/ndb/test/ndbapi/testRestartGci.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testSRBank.cpp b/ndb/test/ndbapi/testSRBank.cpp
index 6d57724f4c6..dfe8ebcbd01 100644
--- a/ndb/test/ndbapi/testSRBank.cpp
+++ b/ndb/test/ndbapi/testSRBank.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testScan.cpp b/ndb/test/ndbapi/testScan.cpp
index 2802f1c950e..f7bb14c33d6 100644
--- a/ndb/test/ndbapi/testScan.cpp
+++ b/ndb/test/ndbapi/testScan.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -630,7 +629,7 @@ int runRestarter(NDBT_Context* ctx, NDBT_Step* step){
int nodeId = restarter.getDbNodeId(lastId);
lastId = (lastId + 1) % restarter.getNumDbNodes();
- if(restarter.restartOneDbNode(nodeId) != 0){
+ if(restarter.restartOneDbNode(nodeId, false, false, true) != 0){
g_err << "Failed to restartNextDbNode" << endl;
result = NDBT_FAILED;
break;
@@ -1125,6 +1124,39 @@ runScanParallelism(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
+int
+runBug24447(NDBT_Context* ctx, NDBT_Step* step){
+ int loops = 1; //ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ int abort = ctx->getProperty("AbortProb", 15);
+ NdbRestarter restarter;
+ HugoTransactions hugoTrans(*ctx->getTab());
+ int i = 0;
+ while (i<loops && !ctx->isTestStopped())
+ {
+ g_info << i++ << ": ";
+
+ int nodeId = restarter.getRandomNotMasterNodeId(rand());
+ if (nodeId == -1)
+ nodeId = restarter.getMasterNodeId();
+ if (restarter.insertErrorInNode(nodeId, 8038) != 0)
+ {
+ ndbout << "Could not insert error in node="<<nodeId<<endl;
+ return NDBT_FAILED;
+ }
+
+ for (Uint32 j = 0; i<10; i++)
+ {
+ hugoTrans.scanReadRecords(GETNDB(step), records, abort, 0,
+ NdbOperation::LM_CommittedRead);
+ }
+
+ }
+ restarter.insertErrorInAllNodes(0);
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testScan);
TESTCASE("ScanRead",
"Verify scan requirement: It should be possible "\
@@ -1603,6 +1635,12 @@ TESTCASE("ScanParallelism",
STEP(runScanParallelism);
FINALIZER(runClearTable);
}
+TESTCASE("Bug24447",
+ ""){
+ INITIALIZER(runLoadTable);
+ STEP(runBug24447);
+ FINALIZER(runClearTable);
+}
NDBT_TESTSUITE_END(testScan);
int main(int argc, const char** argv){
diff --git a/ndb/test/ndbapi/testScanInterpreter.cpp b/ndb/test/ndbapi/testScanInterpreter.cpp
index 5a7ca30cd2a..ae7859d7328 100644
--- a/ndb/test/ndbapi/testScanInterpreter.cpp
+++ b/ndb/test/ndbapi/testScanInterpreter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testScanPerf.cpp b/ndb/test/ndbapi/testScanPerf.cpp
index a730136c3af..837b96a5c96 100644
--- a/ndb/test/ndbapi/testScanPerf.cpp
+++ b/ndb/test/ndbapi/testScanPerf.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testSystemRestart.cpp b/ndb/test/ndbapi/testSystemRestart.cpp
index 8a0100ff3e4..026492d6afa 100644
--- a/ndb/test/ndbapi/testSystemRestart.cpp
+++ b/ndb/test/ndbapi/testSystemRestart.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testTimeout.cpp b/ndb/test/ndbapi/testTimeout.cpp
index e719cdf03e9..e5831ffee79 100644
--- a/ndb/test/ndbapi/testTimeout.cpp
+++ b/ndb/test/ndbapi/testTimeout.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/testTransactions.cpp b/ndb/test/ndbapi/testTransactions.cpp
index 46be808d8a5..6b6d2137d68 100644
--- a/ndb/test/ndbapi/testTransactions.cpp
+++ b/ndb/test/ndbapi/testTransactions.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/test_event.cpp b/ndb/test/ndbapi/test_event.cpp
index 2df50f21e43..b5096ce8c12 100644
--- a/ndb/test/ndbapi/test_event.cpp
+++ b/ndb/test/ndbapi/test_event.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/test_event_merge.cpp b/ndb/test/ndbapi/test_event_merge.cpp
index f57667caf62..3477923d81c 100644
--- a/ndb/test/ndbapi/test_event_merge.cpp
+++ b/ndb/test/ndbapi/test_event_merge.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/test_event_multi_table.cpp b/ndb/test/ndbapi/test_event_multi_table.cpp
index f16504029fa..aab8a563ff6 100644
--- a/ndb/test/ndbapi/test_event_multi_table.cpp
+++ b/ndb/test/ndbapi/test_event_multi_table.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/ndbapi/userInterface.cpp b/ndb/test/ndbapi/userInterface.cpp
index 2f77c0f4857..de5509cdfb7 100644
--- a/ndb/test/ndbapi/userInterface.cpp
+++ b/ndb/test/ndbapi/userInterface.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/newtonapi/basic_test/basic/basic.cpp b/ndb/test/newtonapi/basic_test/basic/basic.cpp
index bc33400078d..23c9d38cbdc 100644
--- a/ndb/test/newtonapi/basic_test/basic/basic.cpp
+++ b/ndb/test/newtonapi/basic_test/basic/basic.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp b/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp
index 4120cfba864..7b447b29e05 100644
--- a/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp
+++ b/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/newtonapi/basic_test/common.cpp b/ndb/test/newtonapi/basic_test/common.cpp
index d4c4e6a74a7..d393394dcc9 100644
--- a/ndb/test/newtonapi/basic_test/common.cpp
+++ b/ndb/test/newtonapi/basic_test/common.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/newtonapi/basic_test/common.hpp b/ndb/test/newtonapi/basic_test/common.hpp
index 0df8f7e078d..d76d1cf1733 100644
--- a/ndb/test/newtonapi/basic_test/common.hpp
+++ b/ndb/test/newtonapi/basic_test/common.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp b/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp
index 2c9cee5be87..754dad25dba 100644
--- a/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp
+++ b/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/newtonapi/basic_test/too_basic.cpp b/ndb/test/newtonapi/basic_test/too_basic.cpp
index 883aacf8841..f751967c181 100644
--- a/ndb/test/newtonapi/basic_test/too_basic.cpp
+++ b/ndb/test/newtonapi/basic_test/too_basic.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/newtonapi/perf_test/perf.cpp b/ndb/test/newtonapi/perf_test/perf.cpp
index 7b818e93a2a..23484dbdac2 100644
--- a/ndb/test/newtonapi/perf_test/perf.cpp
+++ b/ndb/test/newtonapi/perf_test/perf.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/SQL99_test/SQL99_test.cpp b/ndb/test/odbc/SQL99_test/SQL99_test.cpp
index eda9ff33834..039a77f4d53 100644
--- a/ndb/test/odbc/SQL99_test/SQL99_test.cpp
+++ b/ndb/test/odbc/SQL99_test/SQL99_test.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/SQL99_test/SQL99_test.h b/ndb/test/odbc/SQL99_test/SQL99_test.h
index 1c49f4a9a51..0af4e79be47 100644
--- a/ndb/test/odbc/SQL99_test/SQL99_test.h
+++ b/ndb/test/odbc/SQL99_test/SQL99_test.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp b/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp
index 336f4a46554..4f5f8455349 100644
--- a/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp
+++ b/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp b/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp
index 8477a71edbf..7154409efa5 100644
--- a/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp
+++ b/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/NDBT_SQLConnect.cpp b/ndb/test/odbc/client/NDBT_SQLConnect.cpp
index da97ffebea4..11522d7cf5a 100644
--- a/ndb/test/odbc/client/NDBT_SQLConnect.cpp
+++ b/ndb/test/odbc/client/NDBT_SQLConnect.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/NDBT_SQLPrepare.cpp b/ndb/test/odbc/client/NDBT_SQLPrepare.cpp
index 4aaff6a7df9..ce4300caf75 100644
--- a/ndb/test/odbc/client/NDBT_SQLPrepare.cpp
+++ b/ndb/test/odbc/client/NDBT_SQLPrepare.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLAllocEnvTest.cpp b/ndb/test/odbc/client/SQLAllocEnvTest.cpp
index ce50c4b7ccd..e44672b2dbc 100644
--- a/ndb/test/odbc/client/SQLAllocEnvTest.cpp
+++ b/ndb/test/odbc/client/SQLAllocEnvTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLAllocHandleTest.cpp b/ndb/test/odbc/client/SQLAllocHandleTest.cpp
index 0c51e2e46b7..b66f7ebc2f6 100644
--- a/ndb/test/odbc/client/SQLAllocHandleTest.cpp
+++ b/ndb/test/odbc/client/SQLAllocHandleTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp b/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp
index 7786675243a..fc9a9d504ba 100644
--- a/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp
+++ b/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLBindColTest.cpp b/ndb/test/odbc/client/SQLBindColTest.cpp
index e2cd4ce73d1..aa6effe1831 100644
--- a/ndb/test/odbc/client/SQLBindColTest.cpp
+++ b/ndb/test/odbc/client/SQLBindColTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLBindParameterTest.cpp b/ndb/test/odbc/client/SQLBindParameterTest.cpp
index 2ffd2892064..913c1d82230 100644
--- a/ndb/test/odbc/client/SQLBindParameterTest.cpp
+++ b/ndb/test/odbc/client/SQLBindParameterTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLCancelTest.cpp b/ndb/test/odbc/client/SQLCancelTest.cpp
index 904ffab6979..355dc4f3189 100644
--- a/ndb/test/odbc/client/SQLCancelTest.cpp
+++ b/ndb/test/odbc/client/SQLCancelTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLCloseCursorTest.cpp b/ndb/test/odbc/client/SQLCloseCursorTest.cpp
index 35f125df59d..e6a630319d5 100644
--- a/ndb/test/odbc/client/SQLCloseCursorTest.cpp
+++ b/ndb/test/odbc/client/SQLCloseCursorTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLColAttributeTest.cpp b/ndb/test/odbc/client/SQLColAttributeTest.cpp
index 4c067c21d7d..ade640173fe 100644
--- a/ndb/test/odbc/client/SQLColAttributeTest.cpp
+++ b/ndb/test/odbc/client/SQLColAttributeTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLColAttributeTest1.cpp b/ndb/test/odbc/client/SQLColAttributeTest1.cpp
index 322a21eefc1..45b1dd15967 100644
--- a/ndb/test/odbc/client/SQLColAttributeTest1.cpp
+++ b/ndb/test/odbc/client/SQLColAttributeTest1.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLColAttributeTest2.cpp b/ndb/test/odbc/client/SQLColAttributeTest2.cpp
index 18cffae76c1..fb1f2a9aa4a 100644
--- a/ndb/test/odbc/client/SQLColAttributeTest2.cpp
+++ b/ndb/test/odbc/client/SQLColAttributeTest2.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLColAttributeTest3.cpp b/ndb/test/odbc/client/SQLColAttributeTest3.cpp
index f8817565711..ef4943a8cdb 100644
--- a/ndb/test/odbc/client/SQLColAttributeTest3.cpp
+++ b/ndb/test/odbc/client/SQLColAttributeTest3.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLConnectTest.cpp b/ndb/test/odbc/client/SQLConnectTest.cpp
index 552fc8640fe..1adbd865f0c 100644
--- a/ndb/test/odbc/client/SQLConnectTest.cpp
+++ b/ndb/test/odbc/client/SQLConnectTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLCopyDescTest.cpp b/ndb/test/odbc/client/SQLCopyDescTest.cpp
index 4a3742f97ae..d944da5acbb 100644
--- a/ndb/test/odbc/client/SQLCopyDescTest.cpp
+++ b/ndb/test/odbc/client/SQLCopyDescTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLDescribeColTest.cpp b/ndb/test/odbc/client/SQLDescribeColTest.cpp
index 9f55c6a1cfe..abb31b53c5b 100644
--- a/ndb/test/odbc/client/SQLDescribeColTest.cpp
+++ b/ndb/test/odbc/client/SQLDescribeColTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLDisconnectTest.cpp b/ndb/test/odbc/client/SQLDisconnectTest.cpp
index 823b446ab84..700fadfed33 100644
--- a/ndb/test/odbc/client/SQLDisconnectTest.cpp
+++ b/ndb/test/odbc/client/SQLDisconnectTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLDriverConnectTest.cpp b/ndb/test/odbc/client/SQLDriverConnectTest.cpp
index fc3b1d10f91..376b0970f2e 100644
--- a/ndb/test/odbc/client/SQLDriverConnectTest.cpp
+++ b/ndb/test/odbc/client/SQLDriverConnectTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLEndTranTest.cpp b/ndb/test/odbc/client/SQLEndTranTest.cpp
index 06c497954fd..953336ec909 100644
--- a/ndb/test/odbc/client/SQLEndTranTest.cpp
+++ b/ndb/test/odbc/client/SQLEndTranTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLErrorTest.cpp b/ndb/test/odbc/client/SQLErrorTest.cpp
index 5220e7b5eed..f4effa464c8 100644
--- a/ndb/test/odbc/client/SQLErrorTest.cpp
+++ b/ndb/test/odbc/client/SQLErrorTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLExecDirectTest.cpp b/ndb/test/odbc/client/SQLExecDirectTest.cpp
index b9b4e770412..d0b7955f928 100644
--- a/ndb/test/odbc/client/SQLExecDirectTest.cpp
+++ b/ndb/test/odbc/client/SQLExecDirectTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLExecuteTest.cpp b/ndb/test/odbc/client/SQLExecuteTest.cpp
index 5f6bdb5d4bf..bcff66ff287 100644
--- a/ndb/test/odbc/client/SQLExecuteTest.cpp
+++ b/ndb/test/odbc/client/SQLExecuteTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLFetchScrollTest.cpp b/ndb/test/odbc/client/SQLFetchScrollTest.cpp
index 4a11ccd143e..1a92ac058a8 100644
--- a/ndb/test/odbc/client/SQLFetchScrollTest.cpp
+++ b/ndb/test/odbc/client/SQLFetchScrollTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLFetchTest.cpp b/ndb/test/odbc/client/SQLFetchTest.cpp
index bd62fcb2f04..0dcb3571bf7 100644
--- a/ndb/test/odbc/client/SQLFetchTest.cpp
+++ b/ndb/test/odbc/client/SQLFetchTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLFreeHandleTest.cpp b/ndb/test/odbc/client/SQLFreeHandleTest.cpp
index 3a7241dbe68..d8ab766a362 100644
--- a/ndb/test/odbc/client/SQLFreeHandleTest.cpp
+++ b/ndb/test/odbc/client/SQLFreeHandleTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLFreeStmtTest.cpp b/ndb/test/odbc/client/SQLFreeStmtTest.cpp
index e636b3063de..ce804283358 100644
--- a/ndb/test/odbc/client/SQLFreeStmtTest.cpp
+++ b/ndb/test/odbc/client/SQLFreeStmtTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp b/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp
index 8d5a5c0dbbb..7eb6432904e 100644
--- a/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp
+++ b/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetCursorNameTest.cpp b/ndb/test/odbc/client/SQLGetCursorNameTest.cpp
index 1e3ed9f557e..da66d976f34 100644
--- a/ndb/test/odbc/client/SQLGetCursorNameTest.cpp
+++ b/ndb/test/odbc/client/SQLGetCursorNameTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetDataTest.cpp b/ndb/test/odbc/client/SQLGetDataTest.cpp
index 9d958c6c953..12b7969c092 100644
--- a/ndb/test/odbc/client/SQLGetDataTest.cpp
+++ b/ndb/test/odbc/client/SQLGetDataTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetDescFieldTest.cpp b/ndb/test/odbc/client/SQLGetDescFieldTest.cpp
index b789ed75378..0bae4ae58b2 100644
--- a/ndb/test/odbc/client/SQLGetDescFieldTest.cpp
+++ b/ndb/test/odbc/client/SQLGetDescFieldTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetDescRecTest.cpp b/ndb/test/odbc/client/SQLGetDescRecTest.cpp
index 5944f393a71..46ecbfeaa83 100644
--- a/ndb/test/odbc/client/SQLGetDescRecTest.cpp
+++ b/ndb/test/odbc/client/SQLGetDescRecTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp b/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp
index ef9bc3eb3fc..c8d381abd56 100644
--- a/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp
+++ b/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp b/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp
index 8fa4a2b3dbb..22a4e07f470 100644
--- a/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp
+++ b/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetDiagRecTest.cpp b/ndb/test/odbc/client/SQLGetDiagRecTest.cpp
index 27c78edaa4d..2a8aed12a57 100644
--- a/ndb/test/odbc/client/SQLGetDiagRecTest.cpp
+++ b/ndb/test/odbc/client/SQLGetDiagRecTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp b/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp
index efc8117d6d2..0c6b2ab51b8 100644
--- a/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp
+++ b/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetFunctionsTest.cpp b/ndb/test/odbc/client/SQLGetFunctionsTest.cpp
index c6feb8ec033..917f63d7e18 100644
--- a/ndb/test/odbc/client/SQLGetFunctionsTest.cpp
+++ b/ndb/test/odbc/client/SQLGetFunctionsTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetInfoTest.cpp b/ndb/test/odbc/client/SQLGetInfoTest.cpp
index 95f7562dafe..0322cc47250 100644
--- a/ndb/test/odbc/client/SQLGetInfoTest.cpp
+++ b/ndb/test/odbc/client/SQLGetInfoTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp b/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp
index 2052af60ee0..4a268ce99c1 100644
--- a/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp
+++ b/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp b/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp
index 5925d1cc1ae..fb114d06c26 100644
--- a/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp
+++ b/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLMoreResultsTest.cpp b/ndb/test/odbc/client/SQLMoreResultsTest.cpp
index cba8b0dc53e..8b7ed0e4581 100644
--- a/ndb/test/odbc/client/SQLMoreResultsTest.cpp
+++ b/ndb/test/odbc/client/SQLMoreResultsTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLNumResultColsTest.cpp b/ndb/test/odbc/client/SQLNumResultColsTest.cpp
index 8f0c1dba94c..ca70d42018e 100644
--- a/ndb/test/odbc/client/SQLNumResultColsTest.cpp
+++ b/ndb/test/odbc/client/SQLNumResultColsTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLParamDataTest.cpp b/ndb/test/odbc/client/SQLParamDataTest.cpp
index 92d491dfaf5..e502a9e15fa 100644
--- a/ndb/test/odbc/client/SQLParamDataTest.cpp
+++ b/ndb/test/odbc/client/SQLParamDataTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLPrepareTest.cpp b/ndb/test/odbc/client/SQLPrepareTest.cpp
index 2ebbc224b85..aa20b1992a2 100644
--- a/ndb/test/odbc/client/SQLPrepareTest.cpp
+++ b/ndb/test/odbc/client/SQLPrepareTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLPutDataTest.cpp b/ndb/test/odbc/client/SQLPutDataTest.cpp
index 38a8458fec4..ea1a34651c3 100644
--- a/ndb/test/odbc/client/SQLPutDataTest.cpp
+++ b/ndb/test/odbc/client/SQLPutDataTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLRowCountTest.cpp b/ndb/test/odbc/client/SQLRowCountTest.cpp
index f298017c519..1cc2929c2dc 100644
--- a/ndb/test/odbc/client/SQLRowCountTest.cpp
+++ b/ndb/test/odbc/client/SQLRowCountTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp b/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp
index c41ef885521..4e5f08a4a4c 100644
--- a/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp
+++ b/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLSetCursorNameTest.cpp b/ndb/test/odbc/client/SQLSetCursorNameTest.cpp
index b35cf9fefc2..8676ab6eddf 100644
--- a/ndb/test/odbc/client/SQLSetCursorNameTest.cpp
+++ b/ndb/test/odbc/client/SQLSetCursorNameTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLSetDescFieldTest.cpp b/ndb/test/odbc/client/SQLSetDescFieldTest.cpp
index 798622e0f75..9ea93013312 100644
--- a/ndb/test/odbc/client/SQLSetDescFieldTest.cpp
+++ b/ndb/test/odbc/client/SQLSetDescFieldTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLSetDescRecTest.cpp b/ndb/test/odbc/client/SQLSetDescRecTest.cpp
index d97af576cb0..52a6b81ee84 100644
--- a/ndb/test/odbc/client/SQLSetDescRecTest.cpp
+++ b/ndb/test/odbc/client/SQLSetDescRecTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp b/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp
index 16ae5671ca3..e843c5509b8 100644
--- a/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp
+++ b/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp b/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp
index 646f82cd306..dc37fc64e1c 100644
--- a/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp
+++ b/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLTablesTest.cpp b/ndb/test/odbc/client/SQLTablesTest.cpp
index 735efd81e9c..ff55f217d0a 100644
--- a/ndb/test/odbc/client/SQLTablesTest.cpp
+++ b/ndb/test/odbc/client/SQLTablesTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/SQLTransactTest.cpp b/ndb/test/odbc/client/SQLTransactTest.cpp
index e9abe42129d..d7444794d5a 100644
--- a/ndb/test/odbc/client/SQLTransactTest.cpp
+++ b/ndb/test/odbc/client/SQLTransactTest.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/common.hpp b/ndb/test/odbc/client/common.hpp
index 236decf1b95..1eb61f44bd9 100644
--- a/ndb/test/odbc/client/common.hpp
+++ b/ndb/test/odbc/client/common.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/client/main.cpp b/ndb/test/odbc/client/main.cpp
index b202b6de111..187ac96c6a7 100644
--- a/ndb/test/odbc/client/main.cpp
+++ b/ndb/test/odbc/client/main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/driver/testOdbcDriver.cpp b/ndb/test/odbc/driver/testOdbcDriver.cpp
index d3b3802ebe1..bdda4d447f8 100644
--- a/ndb/test/odbc/driver/testOdbcDriver.cpp
+++ b/ndb/test/odbc/driver/testOdbcDriver.cpp
@@ -2,24 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/odbc/test_compiler/test_compiler.cpp b/ndb/test/odbc/test_compiler/test_compiler.cpp
index 042e9e6d4bf..d64d8f2a63d 100644
--- a/ndb/test/odbc/test_compiler/test_compiler.cpp
+++ b/ndb/test/odbc/test_compiler/test_compiler.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/run-test/Makefile.am b/ndb/test/run-test/Makefile.am
index 2c45db50556..2008510349f 100644
--- a/ndb/test/run-test/Makefile.am
+++ b/ndb/test/run-test/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
testdir=$(prefix)/mysql-test/ndb
diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt
index a544355abd6..75be728f3b1 100644
--- a/ndb/test/run-test/daily-basic-tests.txt
+++ b/ndb/test/run-test/daily-basic-tests.txt
@@ -211,6 +211,14 @@ max-time: 500
cmd: testTimeout
args: T1
+max-time: 500
+cmd: testBasic
+args: -n Bug25090 T1
+
+max-time: 500
+cmd: testIndex
+args: -n Bug25059 -r 3000 T1
+
# SCAN TESTS
#
max-time: 500
@@ -414,6 +422,10 @@ cmd: testScan
args: -n ScanParallelism
max-time: 500
+cmd: testScan
+args: -n Bug24447 T1
+
+max-time: 500
cmd: testNodeRestart
args: -n Bug15587 T1
@@ -453,6 +465,18 @@ max-time: 1000
cmd: testIndex
args: -n Bug21384
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug24717 T1
+
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug25364 T1
+
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug25554 T1
+
# OLD FLEX
max-time: 500
cmd: flexBench
@@ -510,7 +534,7 @@ args: -n TemporaryTables T1 T6 T7 T8
max-time: 1500
cmd: testDict
-args: -n Restart_NR2 T1
+args: -n Restart_NR2 T1 I3
#
# TEST NDBAPI
diff --git a/ndb/test/run-test/main.cpp b/ndb/test/run-test/main.cpp
index 0b0b7472a19..aef041d24d6 100644
--- a/ndb/test/run-test/main.cpp
+++ b/ndb/test/run-test/main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/run-test/run-test.hpp b/ndb/test/run-test/run-test.hpp
index 7011aec33d3..2b259e83a60 100644
--- a/ndb/test/run-test/run-test.hpp
+++ b/ndb/test/run-test/run-test.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/CpcClient.cpp b/ndb/test/src/CpcClient.cpp
index 4d06b4a7ff5..51f2fb4cf4d 100644
--- a/ndb/test/src/CpcClient.cpp
+++ b/ndb/test/src/CpcClient.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/HugoAsynchTransactions.cpp b/ndb/test/src/HugoAsynchTransactions.cpp
index 5d2eb451c0b..6926c8a973e 100644
--- a/ndb/test/src/HugoAsynchTransactions.cpp
+++ b/ndb/test/src/HugoAsynchTransactions.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/HugoCalculator.cpp b/ndb/test/src/HugoCalculator.cpp
index d4d7ca2f95f..8c543f2f764 100644
--- a/ndb/test/src/HugoCalculator.cpp
+++ b/ndb/test/src/HugoCalculator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/HugoOperations.cpp b/ndb/test/src/HugoOperations.cpp
index f2e54971766..b409c0acc5d 100644
--- a/ndb/test/src/HugoOperations.cpp
+++ b/ndb/test/src/HugoOperations.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/HugoTransactions.cpp b/ndb/test/src/HugoTransactions.cpp
index 7616c93c9e3..dba4e7b5d74 100644
--- a/ndb/test/src/HugoTransactions.cpp
+++ b/ndb/test/src/HugoTransactions.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/Makefile.am b/ndb/test/src/Makefile.am
index 289633b060a..d3645ae0a1d 100644
--- a/ndb/test/src/Makefile.am
+++ b/ndb/test/src/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
noinst_LIBRARIES = libNDBT.a
diff --git a/ndb/test/src/NDBT_Error.cpp b/ndb/test/src/NDBT_Error.cpp
index ffacb3eb928..c291a81a0df 100644
--- a/ndb/test/src/NDBT_Error.cpp
+++ b/ndb/test/src/NDBT_Error.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NDBT_Output.cpp b/ndb/test/src/NDBT_Output.cpp
index 633d71991d0..e08a3d996eb 100644
--- a/ndb/test/src/NDBT_Output.cpp
+++ b/ndb/test/src/NDBT_Output.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NDBT_ResultRow.cpp b/ndb/test/src/NDBT_ResultRow.cpp
index ab8d7b07ea1..a226b072521 100644
--- a/ndb/test/src/NDBT_ResultRow.cpp
+++ b/ndb/test/src/NDBT_ResultRow.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NDBT_ReturnCodes.cpp b/ndb/test/src/NDBT_ReturnCodes.cpp
index 5bffc00177f..5cd5eed3af7 100644
--- a/ndb/test/src/NDBT_ReturnCodes.cpp
+++ b/ndb/test/src/NDBT_ReturnCodes.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NDBT_Table.cpp b/ndb/test/src/NDBT_Table.cpp
index 8d398b75d81..1d1896eee7f 100644
--- a/ndb/test/src/NDBT_Table.cpp
+++ b/ndb/test/src/NDBT_Table.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NDBT_Tables.cpp b/ndb/test/src/NDBT_Tables.cpp
index d72dfcc5031..63ae7ad24bf 100644
--- a/ndb/test/src/NDBT_Tables.cpp
+++ b/ndb/test/src/NDBT_Tables.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NDBT_Test.cpp b/ndb/test/src/NDBT_Test.cpp
index 8fecf56531f..37100732eca 100644
--- a/ndb/test/src/NDBT_Test.cpp
+++ b/ndb/test/src/NDBT_Test.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NdbBackup.cpp b/ndb/test/src/NdbBackup.cpp
index a9c71120d80..8fa3f907bd8 100644
--- a/ndb/test/src/NdbBackup.cpp
+++ b/ndb/test/src/NdbBackup.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NdbConfig.cpp b/ndb/test/src/NdbConfig.cpp
index 2fb466d1b8f..ecb2030e63c 100644
--- a/ndb/test/src/NdbConfig.cpp
+++ b/ndb/test/src/NdbConfig.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NdbGrep.cpp b/ndb/test/src/NdbGrep.cpp
index 6c0c9cabfcb..99bcede63c8 100644
--- a/ndb/test/src/NdbGrep.cpp
+++ b/ndb/test/src/NdbGrep.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NdbRestarter.cpp b/ndb/test/src/NdbRestarter.cpp
index 2c16a05240d..6f13a3bfca4 100644
--- a/ndb/test/src/NdbRestarter.cpp
+++ b/ndb/test/src/NdbRestarter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NdbRestarts.cpp b/ndb/test/src/NdbRestarts.cpp
index 8465caaab48..013c7a97d1f 100644
--- a/ndb/test/src/NdbRestarts.cpp
+++ b/ndb/test/src/NdbRestarts.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NdbSchemaCon.cpp b/ndb/test/src/NdbSchemaCon.cpp
index 0de49ff983f..1e1b4028fc1 100644
--- a/ndb/test/src/NdbSchemaCon.cpp
+++ b/ndb/test/src/NdbSchemaCon.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/NdbSchemaOp.cpp b/ndb/test/src/NdbSchemaOp.cpp
index 4281ceb02c8..9e19426c615 100644
--- a/ndb/test/src/NdbSchemaOp.cpp
+++ b/ndb/test/src/NdbSchemaOp.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/src/UtilTransactions.cpp b/ndb/test/src/UtilTransactions.cpp
index 31c323045ed..3a166f19c92 100644
--- a/ndb/test/src/UtilTransactions.cpp
+++ b/ndb/test/src/UtilTransactions.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/Makefile.am b/ndb/test/tools/Makefile.am
index 873136e254d..849d8226466 100644
--- a/ndb/test/tools/Makefile.am
+++ b/ndb/test/tools/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2005 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
ndbtest_PROGRAMS = hugoLoad hugoFill hugoLockRecords hugoPkDelete hugoPkRead hugoPkReadRecord hugoPkUpdate hugoScanRead hugoScanUpdate restart verify_index copy_tab create_index ndb_cpcc
diff --git a/ndb/test/tools/copy_tab.cpp b/ndb/test/tools/copy_tab.cpp
index 97370b170ef..3a511995f48 100644
--- a/ndb/test/tools/copy_tab.cpp
+++ b/ndb/test/tools/copy_tab.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/cpcc.cpp b/ndb/test/tools/cpcc.cpp
index dd59e577f2c..f26f0ec4cd9 100644
--- a/ndb/test/tools/cpcc.cpp
+++ b/ndb/test/tools/cpcc.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/create_index.cpp b/ndb/test/tools/create_index.cpp
index 9f9c26aa0da..450d88124e7 100644
--- a/ndb/test/tools/create_index.cpp
+++ b/ndb/test/tools/create_index.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoCalculator.cpp b/ndb/test/tools/hugoCalculator.cpp
index 82c4bbff1a4..eedd8cd6e46 100644
--- a/ndb/test/tools/hugoCalculator.cpp
+++ b/ndb/test/tools/hugoCalculator.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoFill.cpp b/ndb/test/tools/hugoFill.cpp
index 6408b2987f9..713c2ca5152 100644
--- a/ndb/test/tools/hugoFill.cpp
+++ b/ndb/test/tools/hugoFill.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoLoad.cpp b/ndb/test/tools/hugoLoad.cpp
index 1a229169650..97448aa79b3 100644
--- a/ndb/test/tools/hugoLoad.cpp
+++ b/ndb/test/tools/hugoLoad.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoLockRecords.cpp b/ndb/test/tools/hugoLockRecords.cpp
index c0d0b9f9c5a..ddc77061446 100644
--- a/ndb/test/tools/hugoLockRecords.cpp
+++ b/ndb/test/tools/hugoLockRecords.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoPkDelete.cpp b/ndb/test/tools/hugoPkDelete.cpp
index 84e7ded0add..e9fc27d1e68 100644
--- a/ndb/test/tools/hugoPkDelete.cpp
+++ b/ndb/test/tools/hugoPkDelete.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoPkRead.cpp b/ndb/test/tools/hugoPkRead.cpp
index e3702dc5ca1..dd14203c16e 100644
--- a/ndb/test/tools/hugoPkRead.cpp
+++ b/ndb/test/tools/hugoPkRead.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoPkReadRecord.cpp b/ndb/test/tools/hugoPkReadRecord.cpp
index c60a994c7d4..28726e83206 100644
--- a/ndb/test/tools/hugoPkReadRecord.cpp
+++ b/ndb/test/tools/hugoPkReadRecord.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoPkUpdate.cpp b/ndb/test/tools/hugoPkUpdate.cpp
index 7d46ae95c29..f7445ed5102 100644
--- a/ndb/test/tools/hugoPkUpdate.cpp
+++ b/ndb/test/tools/hugoPkUpdate.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoScanRead.cpp b/ndb/test/tools/hugoScanRead.cpp
index a345bb88d0e..aa3ecf46e5a 100644
--- a/ndb/test/tools/hugoScanRead.cpp
+++ b/ndb/test/tools/hugoScanRead.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/hugoScanUpdate.cpp b/ndb/test/tools/hugoScanUpdate.cpp
index 6960fa44b96..3775b36f404 100644
--- a/ndb/test/tools/hugoScanUpdate.cpp
+++ b/ndb/test/tools/hugoScanUpdate.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/old_dirs/waiter/waiter.cpp b/ndb/test/tools/old_dirs/waiter/waiter.cpp
index d57daff3aea..0c2da8aceea 100644
--- a/ndb/test/tools/old_dirs/waiter/waiter.cpp
+++ b/ndb/test/tools/old_dirs/waiter/waiter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/restart.cpp b/ndb/test/tools/restart.cpp
index 9ad20801fd7..6fb16ef1d34 100644
--- a/ndb/test/tools/restart.cpp
+++ b/ndb/test/tools/restart.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/transproxy.cpp b/ndb/test/tools/transproxy.cpp
index 28a621fa584..b6aa3d2f313 100644
--- a/ndb/test/tools/transproxy.cpp
+++ b/ndb/test/tools/transproxy.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/test/tools/verify_index.cpp b/ndb/test/tools/verify_index.cpp
index acc97af883b..567f029aa06 100644
--- a/ndb/test/tools/verify_index.cpp
+++ b/ndb/test/tools/verify_index.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/Makefile.am b/ndb/tools/Makefile.am
index c8aff4da633..feae510349c 100644
--- a/ndb/tools/Makefile.am
+++ b/ndb/tools/Makefile.am
@@ -1,3 +1,17 @@
+# Copyright (C) 2004-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
dist_bin_SCRIPTS = ndb_size.pl ndb_error_reporter
dist_pkgdata_DATA = ndb_size.tmpl
diff --git a/ndb/tools/delete_all.cpp b/ndb/tools/delete_all.cpp
index a3d9ff4ccee..6b50d850d3f 100644
--- a/ndb/tools/delete_all.cpp
+++ b/ndb/tools/delete_all.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/desc.cpp b/ndb/tools/desc.cpp
index 934394e4d31..fa7b6a750b1 100644
--- a/ndb/tools/desc.cpp
+++ b/ndb/tools/desc.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/drop_index.cpp b/ndb/tools/drop_index.cpp
index c10211a9108..7cc791dcdb7 100644
--- a/ndb/tools/drop_index.cpp
+++ b/ndb/tools/drop_index.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/drop_tab.cpp b/ndb/tools/drop_tab.cpp
index 61df4ee9b34..efbbba73d4b 100644
--- a/ndb/tools/drop_tab.cpp
+++ b/ndb/tools/drop_tab.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/listTables.cpp b/ndb/tools/listTables.cpp
index 8cc4e65586a..75bed2e35fe 100644
--- a/ndb/tools/listTables.cpp
+++ b/ndb/tools/listTables.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/ndb_config.cpp b/ndb/tools/ndb_config.cpp
index 049e4599447..5c842076873 100644
--- a/ndb/tools/ndb_config.cpp
+++ b/ndb/tools/ndb_config.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +36,6 @@ static int g_verbose = 0;
static int try_reconnect = 3;
static int g_nodes, g_connections, g_section;
-static const char * g_connectstring = 0;
static const char * g_query = 0;
static int g_nodeid = 0;
@@ -486,7 +484,7 @@ fetch_configuration()
ndb_mgm_set_error_stream(mgm, stderr);
- if (ndb_mgm_set_connectstring(mgm, g_connectstring))
+ if (ndb_mgm_set_connectstring(mgm, opt_connect_str))
{
fprintf(stderr, "* %5d: %s\n",
ndb_mgm_get_latest_error(mgm),
diff --git a/ndb/tools/ndb_test_platform.cpp b/ndb/tools/ndb_test_platform.cpp
index 88f21b31d58..27b50df5188 100644
--- a/ndb/tools/ndb_test_platform.cpp
+++ b/ndb/tools/ndb_test_platform.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/ndbsql.cpp b/ndb/tools/ndbsql.cpp
index 1997e4abebd..c243209afdd 100644
--- a/ndb/tools/ndbsql.cpp
+++ b/ndb/tools/ndbsql.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/Restore.cpp b/ndb/tools/restore/Restore.cpp
index a808a48b558..9aa79f4dc94 100644
--- a/ndb/tools/restore/Restore.cpp
+++ b/ndb/tools/restore/Restore.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/Restore.hpp b/ndb/tools/restore/Restore.hpp
index cf8feb7125c..b132dda374d 100644
--- a/ndb/tools/restore/Restore.hpp
+++ b/ndb/tools/restore/Restore.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/consumer.cpp b/ndb/tools/restore/consumer.cpp
index b130c4998d5..0164860767b 100644
--- a/ndb/tools/restore/consumer.cpp
+++ b/ndb/tools/restore/consumer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/consumer.hpp b/ndb/tools/restore/consumer.hpp
index 6a8ef29e295..14611897f19 100644
--- a/ndb/tools/restore/consumer.hpp
+++ b/ndb/tools/restore/consumer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/consumer_printer.cpp b/ndb/tools/restore/consumer_printer.cpp
index 0aa5b521d29..8fe9805c39c 100644
--- a/ndb/tools/restore/consumer_printer.cpp
+++ b/ndb/tools/restore/consumer_printer.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/consumer_printer.hpp b/ndb/tools/restore/consumer_printer.hpp
index e47bc56f874..f56fed4677a 100644
--- a/ndb/tools/restore/consumer_printer.hpp
+++ b/ndb/tools/restore/consumer_printer.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/consumer_restore.cpp b/ndb/tools/restore/consumer_restore.cpp
index d67ed139f52..c955570eaa3 100644
--- a/ndb/tools/restore/consumer_restore.cpp
+++ b/ndb/tools/restore/consumer_restore.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/consumer_restore.hpp b/ndb/tools/restore/consumer_restore.hpp
index d1a9678b5ef..09b355c8103 100644
--- a/ndb/tools/restore/consumer_restore.hpp
+++ b/ndb/tools/restore/consumer_restore.hpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/consumer_restorem.cpp b/ndb/tools/restore/consumer_restorem.cpp
index 56179a60ab0..2dc0476b5a6 100644
--- a/ndb/tools/restore/consumer_restorem.cpp
+++ b/ndb/tools/restore/consumer_restorem.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/restore/restore_main.cpp b/ndb/tools/restore/restore_main.cpp
index eb0a8b8d139..0110782ff39 100644
--- a/ndb/tools/restore/restore_main.cpp
+++ b/ndb/tools/restore/restore_main.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/select_all.cpp b/ndb/tools/select_all.cpp
index 7bb3557d1ba..5d70ac32d02 100644
--- a/ndb/tools/select_all.cpp
+++ b/ndb/tools/select_all.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/select_count.cpp b/ndb/tools/select_count.cpp
index 0d5d4684878..a133f7967f8 100644
--- a/ndb/tools/select_count.cpp
+++ b/ndb/tools/select_count.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp
index 2a29d3612ba..a3a986b2929 100644
--- a/ndb/tools/waiter.cpp
+++ b/ndb/tools/waiter.cpp
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/netware/Makefile.am b/netware/Makefile.am
index 648ce79c484..de39376f6a1 100644
--- a/netware/Makefile.am
+++ b/netware/Makefile.am
@@ -30,6 +30,8 @@ netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlbinlog.def client/mysqlcheck.def \
client/mysqldump.def client/mysqlimport.def \
client/mysqlshow.def client/mysqltest.def \
+ client/mysql_upgrade.def \
+ tests/mysql_client_test.def \
extra/my_print_defaults.def \
extra/perror.def extra/replace.def \
extra/resolveip.def extra/comp_err.def \
@@ -69,7 +71,8 @@ EXTRA_DIST= $(BUILT_SOURCES) comp_err.def init_db.sql install_test_db.ncf \
mysql_test_run.def mysql_waitpid.def mysqladmin.def \
mysqlbinlog.def mysqlcheck.def mysqld.def \
mysqld_safe.c mysqld_safe.def mysqldump.def mysqlimport.def \
- mysqlshow.def mysqltest.def perror.def \
+ mysqlshow.def mysqltest.def mysql_upgrade.def perror.def \
+ mysql_client_test.def \
replace.def resolve_stack_dump.def resolveip.def test_db.sql \
static_init_db.sql \
BUILD/apply-patch BUILD/compile-AUTOTOOLS \
diff --git a/netware/comp_err.def b/netware/comp_err.def
index f27b40c7b78..f5b18bbdb9a 100644
--- a/netware/comp_err.def
+++ b/netware/comp_err.def
@@ -5,6 +5,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Error File Compiler"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/isamchk.def b/netware/isamchk.def
index 31cf3fc569a..8ae2c0ca96c 100644
--- a/netware/isamchk.def
+++ b/netware/isamchk.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL ISAM Table Check Tool"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Check Tool"
VERSION 4, 0
-STACKSIZE 65536
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/isamlog.def b/netware/isamlog.def
index 52f9de0d928..777d73a7835 100644
--- a/netware/isamlog.def
+++ b/netware/isamlog.def
@@ -5,6 +5,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Log Tool"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/libmysql.def b/netware/libmysql.def
index 8a34754e092..d9d4c752612 100644
--- a/netware/libmysql.def
+++ b/netware/libmysql.def
@@ -7,6 +7,6 @@ COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Res
DESCRIPTION "MySQL Client Library"
VERSION 4, 0
AUTOUNLOAD
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/my_print_defaults.def b/netware/my_print_defaults.def
index 778a5204ebd..acba6c81b49 100644
--- a/netware/my_print_defaults.def
+++ b/netware/my_print_defaults.def
@@ -5,7 +5,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Print Defaults Tool"
VERSION 5, 0, 17
-STACKSIZE 32767
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisam_ftdump.def b/netware/myisam_ftdump.def
index 9639404b53b..78123537a54 100644
--- a/netware/myisam_ftdump.def
+++ b/netware/myisam_ftdump.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL MyISAM Table Dump Tool"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Dump Tool"
VERSION 4, 0
-STACKSIZE 65536
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisamchk.def b/netware/myisamchk.def
index b7ec5ac9474..9805eb4ec1b 100644
--- a/netware/myisamchk.def
+++ b/netware/myisamchk.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL MyISAM Table Check Tool[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Check Tool"
VERSION 4, 0
-STACKSIZE 65536
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisamlog.def b/netware/myisamlog.def
index 553a818a2ae..925650eac7b 100644
--- a/netware/myisamlog.def
+++ b/netware/myisamlog.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL MyISAM Table Log Tool"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Log Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/myisampack.def b/netware/myisampack.def
index d1f85fe03f8..877a143fd2e 100644
--- a/netware/myisampack.def
+++ b/netware/myisampack.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL MyISAM Table Pack Tool"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL MyISAM Table Pack Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql.def b/netware/mysql.def
index 16acc7babe1..4e44f4882d1 100644
--- a/netware/mysql.def
+++ b/netware/mysql.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Monitor[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Monitor"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
MULTIPLE
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_client_test.def b/netware/mysql_client_test.def
new file mode 100644
index 00000000000..9a6f63ec4d7
--- /dev/null
+++ b/netware/mysql_client_test.def
@@ -0,0 +1,10 @@
+#------------------------------------------------------------------------------
+# MySQL Test
+#------------------------------------------------------------------------------
+MODULE libc.nlm
+COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
+DESCRIPTION "MySQL Client Test"
+VERSION 4, 0
+STACKSIZE 131072
+XDCDATA ../netware/mysql.xdc
+#DEBUG
diff --git a/netware/mysql_fix_privilege_tables.pl b/netware/mysql_fix_privilege_tables.pl
index 20af37be2d7..e40b4158e1c 100644
--- a/netware/mysql_fix_privilege_tables.pl
+++ b/netware/mysql_fix_privilege_tables.pl
@@ -3,8 +3,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/netware/mysql_install_db.def b/netware/mysql_install_db.def
index 372bbf15570..e3dc57fe44c 100644
--- a/netware/mysql_install_db.def
+++ b/netware/mysql_install_db.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Install"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Initial Database Installer"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_secure_installation.pl b/netware/mysql_secure_installation.pl
index e363cacbc0d..8550f0e6d6e 100644
--- a/netware/mysql_secure_installation.pl
+++ b/netware/mysql_secure_installation.pl
@@ -3,8 +3,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/netware/mysql_test_run.def b/netware/mysql_test_run.def
index d4d4baee168..c8afd305978 100644
--- a/netware/mysql_test_run.def
+++ b/netware/mysql_test_run.def
@@ -2,10 +2,10 @@
# MySQL Test Run
#------------------------------------------------------------------------------
MODULE libc.nlm
-STACKSIZE 65536
SCREENNAME "MySQL Test Run"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Run"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysql_upgrade.def b/netware/mysql_upgrade.def
new file mode 100644
index 00000000000..7b5718ffb1b
--- /dev/null
+++ b/netware/mysql_upgrade.def
@@ -0,0 +1,11 @@
+#------------------------------------------------------------------------------
+# MySQL Admin
+#------------------------------------------------------------------------------
+MODULE libc.nlm
+COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
+DESCRIPTION "MySQL Upgrade Tool"
+VERSION 4, 0
+STACKSIZE 131072
+XDCDATA ../netware/mysql.xdc
+#DEBUG
+
diff --git a/netware/mysql_waitpid.def b/netware/mysql_waitpid.def
index da0884ccba3..6e9cc76f139 100644
--- a/netware/mysql_waitpid.def
+++ b/netware/mysql_waitpid.def
@@ -6,7 +6,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Tool - Wait for a Program to Terminate"
VERSION 4, 0
-STACKSIZE 65536
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqladmin.def b/netware/mysqladmin.def
index 6532cab84a0..03f15dfdd08 100644
--- a/netware/mysqladmin.def
+++ b/netware/mysqladmin.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Admin[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Admin Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlbinlog.def b/netware/mysqlbinlog.def
index aced63429c5..88024acc318 100644
--- a/netware/mysqlbinlog.def
+++ b/netware/mysqlbinlog.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Binary Log Dump Tool[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Binary Log Dump Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlcheck.def b/netware/mysqlcheck.def
index 1b90b2a1dbe..b9028c237d1 100644
--- a/netware/mysqlcheck.def
+++ b/netware/mysqlcheck.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Check Tool[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Check Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqld.def b/netware/mysqld.def
index 42c2d176a1b..bb7b8129983 100644
--- a/netware/mysqld.def
+++ b/netware/mysqld.def
@@ -6,7 +6,7 @@ COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Res
DESCRIPTION "MySQL Database Server"
VERSION 4, 0
MULTIPLE
-STACKSIZE 65536
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqld_safe.def b/netware/mysqld_safe.def
index ff3f1924906..5c436cc97ca 100644
--- a/netware/mysqld_safe.def
+++ b/netware/mysqld_safe.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Database Server"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Database Server Monitor"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
MULTIPLE
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqldump.def b/netware/mysqldump.def
index 5d7999c789f..2e745492cf3 100644
--- a/netware/mysqldump.def
+++ b/netware/mysqldump.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Dump Tool[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Dump Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlimport.def b/netware/mysqlimport.def
index f98d8021a73..5db6b940ce7 100644
--- a/netware/mysqlimport.def
+++ b/netware/mysqlimport.def
@@ -6,7 +6,7 @@ SCREENNAME "MySQL Import[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Import Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqlshow.def b/netware/mysqlshow.def
index b7b84a94067..386cb98c091 100644
--- a/netware/mysqlshow.def
+++ b/netware/mysqlshow.def
@@ -6,6 +6,7 @@ SCREENNAME "MySQL Show[scrollable]"
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Show Tool"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/mysqltest.def b/netware/mysqltest.def
index e134acede07..f0ee5f7e6a4 100644
--- a/netware/mysqltest.def
+++ b/netware/mysqltest.def
@@ -5,6 +5,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Test Case Tool"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/pack_isam.def b/netware/pack_isam.def
index 9ea72a4f2e7..514b57b04bd 100644
--- a/netware/pack_isam.def
+++ b/netware/pack_isam.def
@@ -7,6 +7,7 @@ COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Res
DESCRIPTION "MySQL ISAM Table Pack Tool"
SCREENNAME "MySQL ISAM Table Pack Tool"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/perror.def b/netware/perror.def
index d67bd6191b4..fc95de3476a 100644
--- a/netware/perror.def
+++ b/netware/perror.def
@@ -5,7 +5,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Error Code Description Tool"
VERSION 4, 0
-STACKSIZE 32768
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/replace.def b/netware/replace.def
index 19348ee4245..7feccdbff41 100644
--- a/netware/replace.def
+++ b/netware/replace.def
@@ -5,6 +5,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Text Replacement Tool"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/resolve_stack_dump.def b/netware/resolve_stack_dump.def
index 01042699d61..20098c1b4e0 100644
--- a/netware/resolve_stack_dump.def
+++ b/netware/resolve_stack_dump.def
@@ -6,7 +6,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Stack Dump Resolve Tool"
VERSION 4, 0
-STACKSIZE 65536
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/netware/resolveip.def b/netware/resolveip.def
index 244f52bb969..1962d61be53 100644
--- a/netware/resolveip.def
+++ b/netware/resolveip.def
@@ -5,6 +5,7 @@ MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL IP/Hostname Resolve Tool"
VERSION 4, 0
+STACKSIZE 131072
XDCDATA ../netware/mysql.xdc
#DEBUG
diff --git a/os2/Makefile.am b/os2/Makefile.am
index 9feab6d1b2c..b1bc832a8a8 100644
--- a/os2/Makefile.am
+++ b/os2/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2002 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os2/ReadMe.txt b/os2/ReadMe.txt
index 073c65290c0..7dadf4a391d 100644
--- a/os2/ReadMe.txt
+++ b/os2/ReadMe.txt
@@ -39,7 +39,7 @@ Linux are made available every week. This port may therefore be a few
minor versions after the latest Linux/Win32 builds but its generally
more stable than the "latest and greates" port.
-MySQL is brought to you by: TcX DataKonsult AB & MySQL Finland AB
+MySQL is brought to you by: MySQL AB
This port is brought to you by:
diff --git a/os2/include/Makefile.am b/os2/include/Makefile.am
index b0478e7c470..fcea89a2aa7 100644
--- a/os2/include/Makefile.am
+++ b/os2/include/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2002 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/os2/include/sys/Makefile.am b/os2/include/sys/Makefile.am
index b68f968aafe..8379d3baa39 100644
--- a/os2/include/sys/Makefile.am
+++ b/os2/include/sys/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2002 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2002 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/pstack/Makefile.am b/pstack/Makefile.am
index 20d5d8314ce..70973bd36b0 100644
--- a/pstack/Makefile.am
+++ b/pstack/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2003, 2005 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/pstack/aout/Makefile.am b/pstack/aout/Makefile.am
index 0b02cb7b643..2e61555db87 100644
--- a/pstack/aout/Makefile.am
+++ b/pstack/aout/Makefile.am
@@ -1 +1,4 @@
noinst_HEADERS = aout64.h stab.def stab_gnu.h
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/regex/CMakeLists.txt b/regex/CMakeLists.txt
index 796481a62d5..bdec7194e41 100755
--- a/regex/CMakeLists.txt
+++ b/regex/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/regex/Makefile.am b/regex/Makefile.am
index 1f496fcec62..e2304ff7309 100644
--- a/regex/Makefile.am
+++ b/regex/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2003, 2005-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index dd4c133ff94..1fad4befe6e 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -115,6 +114,7 @@ SUFFIXES = .sh
-e 's!@''pkglibdir''@!$(pkglibdir)!g' \
-e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \
-e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \
+ -e 's!@''sysconfdir''@!$(sysconfdir)!g' \
-e 's!@''CC''@!@CC@!'\
-e 's!@''CXX''@!@CXX@!'\
-e 's!@''GXX''@!@GXX@!'\
diff --git a/scripts/fill_func_tables.sh b/scripts/fill_func_tables.sh
index ad5b7fbb521..f6554292a5d 100644
--- a/scripts/fill_func_tables.sh
+++ b/scripts/fill_func_tables.sh
@@ -1,7 +1,18 @@
#!@PERL@
-#
# Copyright (C) 2003 MySQL AB
-# For a more info consult the file COPYRIGHT distributed with this file.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# fill_func_tables - parse ../Docs/manual.texi
#
diff --git a/scripts/fill_help_tables.sh b/scripts/fill_help_tables.sh
index fc0c684c2dc..1dff7edd268 100644
--- a/scripts/fill_help_tables.sh
+++ b/scripts/fill_help_tables.sh
@@ -1,8 +1,19 @@
#!@PERL@
-#
# Copyright (C) 2003 MySQL AB
-# For a more info consult the file COPYRIGHT distributed with this file.
-#
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# This script generates the SQL statements required by mysql_install_db to
# fill up the tables for the server-side online function help, which can be
# invoked with "help <function>" from the MySQL client.
@@ -498,8 +509,7 @@ print <<EOF;
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
--- the Free Software Foundation; either version 2 of the License, or
--- (at your option) any later version.
+-- the Free Software Foundation; version 2 of the License.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index a6a2f1e3b49..ba103357f5e 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -1,4 +1,18 @@
#!/bin/sh
+# Copyright (C) 2000-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This is a script to create a TAR or ZIP binary distribution out of a
# built source tree. The output file will be put at the top level of
@@ -243,9 +257,10 @@ $CP mysql-test/include/*.inc $BASE/mysql-test/include
$CP mysql-test/include/*.test $BASE/mysql-test/include
$CP mysql-test/t/*.def $BASE/mysql-test/t
$CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
+ mysql-test/std_data/*.MYD mysql-test/std_data/*.MYI \
mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
- mysql-test/std_data/*.cnf \
+ mysql-test/std_data/*.cnf mysql-test/std_data/*.MY* \
$BASE/mysql-test/std_data
$CP mysql-test/t/*.test mysql-test/t/*.imtest \
mysql-test/t/*.disabled mysql-test/t/*.opt \
@@ -345,7 +360,7 @@ BASE=$BASE2
#
if [ x"@GXX@" = x"yes" ] ; then
- gcclib=`@CC@ --print-libgcc-file`
+ gcclib=`@CC@ @CFLAGS@ --print-libgcc-file`
if [ $? -ne 0 ] ; then
echo "Warning: Couldn't find libgcc.a!"
else
diff --git a/scripts/make_sharedlib_distribution.sh b/scripts/make_sharedlib_distribution.sh
index c475d0e14a4..f6669788233 100644
--- a/scripts/make_sharedlib_distribution.sh
+++ b/scripts/make_sharedlib_distribution.sh
@@ -1,4 +1,19 @@
#!/bin/sh
+# Copyright (C) 2003-2004, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# The default path should be /usr/local
# Get some info from configure
diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist
index 38e7ab88f22..211eea8a265 100755
--- a/scripts/make_win_bin_dist
+++ b/scripts/make_win_bin_dist
@@ -1,4 +1,18 @@
#!/bin/sh
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Exit if failing to copy, we want exact specifications, not
# just "what happen to be built".
diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh
index 6206ca64121..d6109772060 100644
--- a/scripts/make_win_src_distribution.sh
+++ b/scripts/make_win_src_distribution.sh
@@ -1,4 +1,18 @@
#!/bin/sh
+# Copyright (C) 2003-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Terminate loudly on error, we don't want partial package
set -e
diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
index 92201a2c8af..f094cb060b7 100644
--- a/scripts/mysql_config.sh
+++ b/scripts/mysql_config.sh
@@ -1,10 +1,9 @@
#!/bin/sh
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/scripts/mysql_convert_table_format.sh b/scripts/mysql_convert_table_format.sh
index c1955e632fb..0c9ce3a67e0 100644
--- a/scripts/mysql_convert_table_format.sh
+++ b/scripts/mysql_convert_table_format.sh
@@ -1,4 +1,18 @@
#!@PERL@
+# Copyright (C) 2000-2002 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Convert given tables in a database to MYISAM
diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh
index 54f0ef230ad..1936ba6f6b6 100644
--- a/scripts/mysql_create_system_tables.sh
+++ b/scripts/mysql_create_system_tables.sh
@@ -1,6 +1,18 @@
#!/bin/sh
# Copyright (C) 1997-2003 MySQL AB
-# For a more info consult the file COPYRIGHT distributed with this file
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This script writes on stdout SQL commands to generate all not
# existing MySQL system tables. It also replaces the help tables with
diff --git a/scripts/mysql_explain_log.sh b/scripts/mysql_explain_log.sh
index fd468fdf091..a549817db5a 100644
--- a/scripts/mysql_explain_log.sh
+++ b/scripts/mysql_explain_log.sh
@@ -1,4 +1,19 @@
#!@PERL@
+# Copyright (C) 2001-2003, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
use strict;
use warnings;
use DBI;
@@ -6,9 +21,6 @@ use DBI;
use Getopt::Long;
$Getopt::Long::ignorecase=0;
-print "explain_log provided by http://www.mobile.de\n";
-print "=========== ================================\n";
-
my $Param={};
$Param->{host}='';
@@ -17,16 +29,28 @@ $Param->{password}='';
$Param->{PrintError}=0;
$Param->{socket}='';
-if (!GetOptions ('date|d:i' => \$Param->{ViewDate},
+my $help;
+
+if (!GetOptions (
+ 'date|d:i' => \$Param->{ViewDate},
'host|h:s' => \$Param->{host},
'user|u:s' => \$Param->{user},
'password|p:s' => \$Param->{password},
'printerror|e:s' => \$Param->{PrintError},
'socket|s:s' => \$Param->{socket},
+ 'help|h' => \$help,
)) {
ShowOptions();
+ exit(0);
}
-else {
+if (defined ($help)) {
+ ShowOptions();
+ exit(0);
+}
+
+ print "explain_log provided by http://www.mobile.de\n";
+ print "=========== ================================\n";
+
$Param->{UpdateCount} = 0;
$Param->{SelectCount} = 0;
$Param->{IdxUseCount} = 0;
@@ -230,7 +254,6 @@ else {
print "Finished: \t".localtime(time)."\n";
}
-}
###########################################################################
@@ -308,21 +331,26 @@ sub ShowOptions {
print <<EOF;
Usage: $0 [OPTIONS] < LOGFILE
---date=YYMMDD select only entrys of date
--d=YYMMDD
---host=HOSTNAME db-host to ask
--h=HOSTNAME
---user=USERNAME db-user
--u=USERNAME
---password=PASSWORD password of db-user
--p=PASSWORD
---socket=SOCKET mysqld socket file to connect
--s=SOCKET
---printerror=1 enable error output
--e 1
-
-Read logfile from STDIN an try to EXPLAIN all SELECT statements. All UPDATE statements are rewritten to an EXPLAIN SELECT statement. The results of the EXPLAIN statement are collected and counted. All results with type=ALL are collected in an separete list. Results are printed to STDOUT.
-
+--help, -h
+ Display this help message
+--date=YYMMDD, -d=YYMMDD
+ Select entries from the log only for the given date
+--host=HOSTNAME, -h=HOSTNAME
+ Connect to the MySQL server on the given host
+--user=USERNAME, -u=USERNAME
+ The MySQL username to use when connecting to the server
+--password=PASSWORD, -p=PASSWORD
+ The password to use when connecting to the server
+--socket=SOCKET, -s=SOCKET
+ The socket file to use when connecting to the server
+--printerror=1, -e 1
+ Enable error output
+
+mysql_explain_log reads its standard input for query log contents. It
+uses EXPLAIN to analyze SELECT statements found in the input. UPDATE
+statements are rewritten to SELECT statements and also analyzed with
+EXPLAIN. mysql_explain_log then displays a summary of its results.
+Results are printed to the standard output.
EOF
}
@@ -336,46 +364,37 @@ __END__
mysql_explain_log
-Feed a mysqld general logfile (created with mysqld --log) back into mysql
-and collect statistics about index usage with EXPLAIN.
+Feed a mysqld general query logfile (created with mysqld --log) back
+into mysql and collect statistics about index usage with EXPLAIN.
=head1 DISCUSSION
-To optimize your indices, you have to know which ones are actually
-used and what kind of queries are causing table scans. Especially
-if you are generating your queries dynamically and you have a huge
-amount of queries going on, this isn't easy.
+To optimize your indexes, you must know which ones are actually used
+and what kind of queries are causing table scans. This may not be easy,
+especially if you are generating your queries dynamically and you have
+a huge number of queries being executed.
Use this tool to take a look at the effects of your real life queries.
-Then add indices to avoid table scans and remove those which aren't used.
+Then add indexes to avoid table scans and remove indexes that aren't used.
=head1 USAGE
-mysql_explain_log [--date=YYMMDD] --host=dbhost] [--user=dbuser] [--password=dbpw] [--socket=/path/to/socket] < logfile
-
---date=YYMMDD select only entrys of date
-
--d=YYMMDD
-
---host=HOSTNAME db-host to ask
-
--h=HOSTNAME
-
---user=USERNAME db-user
-
--u=USERNAME
-
---password=PASSWORD password of db-user
-
--p=PASSWORD
-
---socket=SOCKET change path to the socket
-
--s=SOCKET
-
---printerror=1 enable error output
-
--e 1
+mysql_explain_log [--date=YYMMDD] --host=dbhost] [--user=dbuser] [--password=dbpw] [--socket=/path/to/socket] [--printerror=1] < logfile
+
+--help, -h
+ Display this help message
+--date=YYMMDD, -d=YYMMDD
+ Select entries from the log only for the given date
+--host=HOSTNAME, -h=HOSTNAME
+ Connect to the MySQL server on the given host
+--user=USERNAME, -u=USERNAME
+ The MySQL username to use when connecting to the server
+--password=PASSWORD, -p=PASSWORD
+ The password to use when connecting to the server
+--socket=SOCKET, -s=SOCKET
+ The socket file to use when connecting to the server
+--printerror=1, -e 1
+ Enable error output
=head1 EXAMPLE
diff --git a/scripts/mysql_find_rows.sh b/scripts/mysql_find_rows.sh
index 91ffc326e16..77eacc8a9b4 100644
--- a/scripts/mysql_find_rows.sh
+++ b/scripts/mysql_find_rows.sh
@@ -1,4 +1,18 @@
#!@PERL@
+# Copyright (C) 2000, 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
$version="1.02";
@@ -114,9 +128,6 @@ sub usage
print <<EOF;
$0 Ver $version
-TCX Datakonsult AB, by Monty.
-This software comes with NO WARRANTY: see the file PUBLIC for details.
-
Prints all SQL queries that matches a regexp or contains a 'use
database' or 'set ..' command to stdout. A SQL query may contain
newlines. This is useful to find things in a MySQL update log.
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index 073964d4bde..5493f8fdb4f 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -1,4 +1,19 @@
#!/bin/sh
+# Copyright (C) 2000-2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# This script is a wrapper to pipe the mysql_fix_privilege_tables.sql
# through the mysql client program to the mysqld server
@@ -119,9 +134,6 @@ then
fi
cmd="$bindir/mysql --no-defaults --force --user=$user --host=$host"
-if test ! -z "$password" ; then
- cmd="$cmd --password=$password"
-fi
if test ! -z "$port"; then
cmd="$cmd --port=$port"
fi
@@ -178,11 +190,22 @@ then
s_echo ""
fi
+run_cmd() {
+ # Password argument is added here to allow for spaces in password.
+
+ if test ! -z "$password"
+ then
+ cat $sql_file | $cmd --password="$password"
+ else
+ cat $sql_file | $cmd
+ fi
+}
+
if test $verbose = 0
then
- cat $sql_file | $cmd > /dev/null 2>&1
+ run_cmd > /dev/null 2>&1
else
- cat $sql_file | $cmd > /dev/null
+ run_cmd > /dev/null
fi
if test $? = 0
then
diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql
index 41d468fd3cf..5709fb96793 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_fix_privilege_tables.sql
@@ -1,5 +1,5 @@
-- This script converts any old privilege tables to privilege tables suitable
--- for MySQL 4.0.
+-- for MySQL 4.1
-- You can safely ignore all 'Duplicate column' and 'Unknown column' errors"
-- because these just mean that your tables are already up to date.
@@ -46,9 +46,8 @@ ADD x509_subject BLOB NOT NULL;
ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL;
--
--- Create tables_priv and columns_priv if they don't exists
+-- tables_priv
--
-
CREATE TABLE IF NOT EXISTS tables_priv (
Host char(60) binary DEFAULT '' NOT NULL,
Db char(64) binary DEFAULT '' NOT NULL,
@@ -56,22 +55,38 @@ CREATE TABLE IF NOT EXISTS tables_priv (
Table_name char(64) binary DEFAULT '' NOT NULL,
Grantor char(77) DEFAULT '' NOT NULL,
Timestamp timestamp(14),
- Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ Table_priv set('Select','Insert','Update','Delete','Create',
+ 'Drop','Grant','References','Index','Alter')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name)
) CHARACTER SET utf8 COLLATE utf8_bin;
--- Fix collation of set fields
+
ALTER TABLE tables_priv
- modify Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- modify Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-ALTER TABLE procs_priv ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE procs_priv
- modify Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-ALTER TABLE procs_priv
- add Routine_type enum('FUNCTION','PROCEDURE') COLLATE utf8_general_ci NOT NULL AFTER Routine_name;
-ALTER TABLE procs_priv
- modify Timestamp timestamp(14) AFTER Proc_priv;
+ ADD KEY Grantor (Grantor);
+ALTER TABLE tables_priv
+ MODIFY Host char(60) NOT NULL default '',
+ MODIFY Db char(64) NOT NULL default '',
+ MODIFY User char(16) NOT NULL default '',
+ MODIFY Table_name char(64) NOT NULL default '',
+ MODIFY Grantor char(77) NOT NULL default '',
+ ENGINE=MyISAM,
+ CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+
+ALTER TABLE tables_priv
+ MODIFY Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ MODIFY Table_priv set('Select','Insert','Update','Delete','Create',
+ 'Drop','Grant','References','Index','Alter',
+ 'Create View','Show view')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ COMMENT='Table privileges';
+
+--
+-- columns_priv
+--
CREATE TABLE IF NOT EXISTS columns_priv (
Host char(60) DEFAULT '' NOT NULL,
Db char(64) DEFAULT '' NOT NULL,
@@ -82,16 +97,25 @@ CREATE TABLE IF NOT EXISTS columns_priv (
Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
PRIMARY KEY (Host,Db,User,Table_name,Column_name)
) CHARACTER SET utf8 COLLATE utf8_bin;
--- Fix collation of set fields
-ALTER TABLE columns_priv
- MODIFY Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-
---
-- Name change of Type -> Column_priv from MySQL 3.22.12
---
+ALTER TABLE columns_priv
+ CHANGE Type Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+
+ALTER TABLE columns_priv
+ MODIFY Host char(60) NOT NULL default '',
+ MODIFY Db char(64) NOT NULL default '',
+ MODIFY User char(16) NOT NULL default '',
+ MODIFY Table_name char(64) NOT NULL default '',
+ MODIFY Column_name char(64) NOT NULL default '',
+ ENGINE=MyISAM,
+ CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin,
+ COMMENT='Column privileges';
-ALTER TABLE columns_priv change Type Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+ALTER TABLE columns_priv
+ MODIFY Column_priv set('Select','Insert','Update','References')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
--
-- Add the new 'type' column to the func table.
@@ -100,7 +124,7 @@ ALTER TABLE columns_priv change Type Column_priv set('Select','Insert','Update',
ALTER TABLE func add type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
--
--- Change the user,db and host tables to MySQL 4.0 format
+-- Change the user,db and host tables to current format
--
# Detect whether we had Show_db_priv
@@ -142,14 +166,12 @@ ADD Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT
ADD Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
alter table user change max_questions max_questions int(11) unsigned DEFAULT 0 NOT NULL;
-alter table tables_priv add KEY Grantor (Grantor);
+
alter table db comment='Database privileges';
alter table host comment='Host privileges; Merged with database privileges';
alter table user comment='Users and global privileges';
alter table func comment='User defined functions';
-alter table tables_priv comment='Table privileges';
-alter table columns_priv comment='Column privileges';
-- Convert all tables to UTF-8 with binary collation
-- and reset all char columns to correct width
@@ -181,6 +203,7 @@ ALTER TABLE user
MODIFY Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+
ALTER TABLE db
MODIFY Host char(60) NOT NULL default '',
MODIFY Db char(64) NOT NULL default '',
@@ -199,6 +222,7 @@ ALTER TABLE db
MODIFY Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
+
ALTER TABLE host
MODIFY Host char(60) NOT NULL default '',
MODIFY Db char(64) NOT NULL default '',
@@ -216,29 +240,11 @@ ALTER TABLE host
MODIFY Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
MODIFY Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
+
ALTER TABLE func
ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
ALTER TABLE func
MODIFY type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
-ALTER TABLE columns_priv
- MODIFY Host char(60) NOT NULL default '',
- MODIFY Db char(64) NOT NULL default '',
- MODIFY User char(16) NOT NULL default '',
- MODIFY Table_name char(64) NOT NULL default '',
- MODIFY Column_name char(64) NOT NULL default '',
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE columns_priv
- MODIFY Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
-ALTER TABLE tables_priv
- MODIFY Host char(60) NOT NULL default '',
- MODIFY Db char(64) NOT NULL default '',
- MODIFY User char(16) NOT NULL default '',
- MODIFY Table_name char(64) NOT NULL default '',
- MODIFY Grantor char(77) NOT NULL default '',
- ENGINE=MyISAM, CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
-ALTER TABLE tables_priv
- MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- MODIFY Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
#
# Detect whether we had Create_view_priv
@@ -250,20 +256,25 @@ SELECT @hadCreateViewPriv:=1 FROM user WHERE Create_view_priv LIKE '%';
# Create VIEWs privileges (v5.0)
#
ALTER TABLE db ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
+ALTER TABLE db MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
+
ALTER TABLE host ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
+ALTER TABLE host MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Lock_tables_priv;
+
ALTER TABLE user ADD Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_client_priv;
+ALTER TABLE user MODIFY Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Repl_client_priv;
#
# Show VIEWs privileges (v5.0)
#
ALTER TABLE db ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
+ALTER TABLE db MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
+
ALTER TABLE host ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-ALTER TABLE user ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
+ALTER TABLE host MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
-#
-# Show/Create views table privileges (v5.0)
-#
-ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+ALTER TABLE user ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
+ALTER TABLE user MODIFY Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv;
#
# Assign create/show view privileges to people who have create provileges
@@ -280,18 +291,31 @@ SELECT @hadCreateRoutinePriv:=1 FROM user WHERE Create_routine_priv LIKE '%';
# Create PROCEDUREs privileges (v5.0)
#
ALTER TABLE db ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
+ALTER TABLE db MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
+
ALTER TABLE host ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
+ALTER TABLE host MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
+
ALTER TABLE user ADD Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
+ALTER TABLE user MODIFY Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Show_view_priv;
#
# Alter PROCEDUREs privileges (v5.0)
#
ALTER TABLE db ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
+ALTER TABLE db MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
+
ALTER TABLE host ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
+ALTER TABLE host MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
+
ALTER TABLE user ADD Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
+ALTER TABLE user MODIFY Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_routine_priv;
ALTER TABLE db ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
+ALTER TABLE db MODIFY Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
+
ALTER TABLE host ADD Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
+ALTER TABLE host MODIFY Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
#
# Assign create/alter routine privileges to people who have create privileges
@@ -313,26 +337,46 @@ SET @hadCreateUserPriv:=0;
SELECT @hadCreateUserPriv:=1 FROM user WHERE Create_user_priv LIKE '%';
ALTER TABLE user ADD Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
+ALTER TABLE user MODIFY Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Alter_routine_priv;
UPDATE user LEFT JOIN db USING (Host,User) SET Create_user_priv='Y'
WHERE @hadCreateUserPriv = 0 AND
(user.Grant_priv = 'Y' OR db.Grant_priv = 'Y');
-#
-# Create some possible missing tables
-#
+--
+-- procs_priv
+--
CREATE TABLE IF NOT EXISTS procs_priv (
-Host char(60) binary DEFAULT '' NOT NULL,
-Db char(64) binary DEFAULT '' NOT NULL,
-User char(16) binary DEFAULT '' NOT NULL,
-Routine_name char(64) binary DEFAULT '' NOT NULL,
-Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
-Grantor char(77) DEFAULT '' NOT NULL,
-Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
-Timestamp timestamp(14),
-PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),
-KEY Grantor (Grantor)
+ Host char(60) binary DEFAULT '' NOT NULL,
+ Db char(64) binary DEFAULT '' NOT NULL,
+ User char(16) binary DEFAULT '' NOT NULL,
+ Routine_name char(64) binary DEFAULT '' NOT NULL,
+ Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
+ Grantor char(77) DEFAULT '' NOT NULL,
+ Proc_priv set('Execute','Alter Routine','Grant')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL,
+ Timestamp timestamp(14),
+ PRIMARY KEY (Host, Db, User, Routine_name, Routine_type),
+ KEY Grantor (Grantor)
) CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
+ALTER TABLE procs_priv
+ ENGINE=MyISAM,
+ CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
+
+ALTER TABLE procs_priv
+ MODIFY Proc_priv set('Execute','Alter Routine','Grant')
+ COLLATE utf8_general_ci DEFAULT '' NOT NULL;
+
+ALTER TABLE procs_priv
+ ADD Routine_type enum('FUNCTION','PROCEDURE')
+ COLLATE utf8_general_ci NOT NULL AFTER Routine_name;
+
+ALTER TABLE procs_priv
+ MODIFY Timestamp timestamp(14) AFTER Proc_priv;
+
+--
+-- help_topic
+--
CREATE TABLE IF NOT EXISTS help_topic (
help_topic_id int unsigned not null,
name varchar(64) not null,
@@ -408,7 +452,7 @@ PRIMARY KEY TranTime (Transition_time)
#
-# Create proc table if it doesn't exists
+# Create proc table if it does not exists
#
CREATE TABLE IF NOT EXISTS proc (
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 5d7933e5277..0e89a32aa66 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -1,6 +1,18 @@
#!/bin/sh
# Copyright (C) 2002-2003 MySQL AB
-# For a more info consult the file COPYRIGHT distributed with this file.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# This scripts creates the privilege tables db, host, user, tables_priv,
# columns_priv, procs_priv in the mysql database, as well as the func table.
@@ -33,6 +45,7 @@ parse_arguments() {
case "$arg" in
--force) force=1 ;;
--basedir=*) basedir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
+ --srcdir=*) srcdir=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--ldata=*|--datadir=*) ldata=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--user=*)
# Note that the user will be passed to mysqld so that it runs
@@ -78,6 +91,7 @@ ldata=
execdir=
bindir=
basedir=
+srcdir=
force=0
verbose=0
fill_help_tables=""
@@ -106,18 +120,24 @@ else
fi
# find fill_help_tables.sh
-for i in $basedir/support-files $basedir/share $basedir/share/mysql $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
-do
- if test -f $i/fill_help_tables.sql
- then
- pkgdatadir=$i
- fi
-done
-
-if test -f $pkgdatadir/fill_help_tables.sql
+if test -n "$srcdir"
then
- fill_help_tables=$pkgdatadir/fill_help_tables.sql
+ fill_help_tables=$srcdir/scripts/fill_help_tables.sql
else
+ for i in $basedir/support-files $basedir/share $basedir/share/mysql \
+ $basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
+ do
+ if test -f $i/fill_help_tables.sql
+ then
+ pkgdatadir=$i
+ fi
+ done
+
+ fill_help_tables=$pkgdatadir/fill_help_tables.sql
+fi
+
+if test ! -f $fill_help_tables
+then
echo "Could not find help file 'fill_help_tables.sql' in @pkgdatadir@ or inside $basedir".
exit 1;
fi
@@ -130,7 +150,13 @@ scriptdir=$bindir
if test "$windows" = 1
then
mysqld="./sql/mysqld"
- mysqld_opt="--language=./sql/share/english"
+ if test -n "$srcdir" -a -f $srcdir/sql/share/english/errmsg.sys
+ then
+ langdir=$srcdir/sql/share/english
+ else
+ langdir=./sql/share/english
+ fi
+ mysqld_opt="--language=$langdir"
scriptdir="./scripts"
fi
@@ -210,7 +236,8 @@ if test "$in_rpm" -eq 0 -a "$windows" -eq 0
then
echo "Installing all prepared tables"
fi
-mysqld_install_cmd_line="$mysqld $defaults $mysqld_opt --bootstrap \
+mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
+mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
--skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
--skip-bdb --skip-ndbcluster $args --max_allowed_packet=8M --net_buffer_length=16K"
if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh
index 1c7ca34ad59..6c2d88d6d29 100644
--- a/scripts/mysql_secure_installation.sh
+++ b/scripts/mysql_secure_installation.sh
@@ -4,8 +4,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -22,6 +21,16 @@ command=".mysql.$$"
trap "interrupt" 2
rootpass=""
+echo_n=
+echo_c=
+
+set_echo_compat() {
+ case `echo "testing\c"`,`echo -n testing` in
+ *c*,-n*) echo_n= echo_c= ;;
+ *c*,*) echo_n=-n echo_c= ;;
+ *) echo_n= echo_c='\c' ;;
+ esac
+}
prepare() {
touch $config $command
@@ -45,7 +54,7 @@ get_root_password() {
status=1
while [ $status -eq 1 ]; do
stty -echo
- echo -n "Enter current password for root (enter for none): "
+ echo $echo_n "Enter current password for root (enter for none): $echo_c"
read password
echo
stty echo
@@ -65,10 +74,10 @@ get_root_password() {
set_root_password() {
stty -echo
- echo -n "New password: "
+ echo $echo_n "New password: $echo_c"
read password1
echo
- echo -n "Re-enter new password: "
+ echo $echo_n "Re-enter new password: $echo_c"
read password2
echo
stty echo
@@ -173,6 +182,7 @@ cleanup() {
# The actual script starts here
prepare
+set_echo_compat
echo
echo
@@ -201,11 +211,11 @@ echo "root user without the proper authorisation."
echo
if [ $hadpass -eq 0 ]; then
- echo -n "Set root password? [Y/n] "
+ echo $echo_n "Set root password? [Y/n] $echo_c"
else
echo "You already have a root password set, so you can safely answer 'n'."
echo
- echo -n "Change the root password? [Y/n] "
+ echo $echo_n "Change the root password? [Y/n] $echo_c"
fi
read reply
@@ -232,7 +242,7 @@ echo "go a bit smoother. You should remove them before moving into a"
echo "production environment."
echo
-echo -n "Remove anonymous users? [Y/n] "
+echo $echo_n "Remove anonymous users? [Y/n] $echo_c"
read reply
if [ "$reply" = "n" ]; then
@@ -251,7 +261,7 @@ echo "Normally, root should only be allowed to connect from 'localhost'. This"
echo "ensures that someone cannot guess at the root password from the network."
echo
-echo -n "Disallow root login remotely? [Y/n] "
+echo $echo_n "Disallow root login remotely? [Y/n] $echo_c"
read reply
if [ "$reply" = "n" ]; then
echo " ... skipping."
@@ -270,7 +280,7 @@ echo "access. This is also intended only for testing, and should be removed"
echo "before moving into a production environment."
echo
-echo -n "Remove test database and access to it? [Y/n] "
+echo $echo_n "Remove test database and access to it? [Y/n] $echo_c"
read reply
if [ "$reply" = "n" ]; then
echo " ... skipping."
@@ -288,7 +298,7 @@ echo "Reloading the privilege tables will ensure that all changes made so far"
echo "will take effect immediately."
echo
-echo -n "Reload privilege tables now? [Y/n] "
+echo $echo_n "Reload privilege tables now? [Y/n] $echo_c"
read reply
if [ "$reply" = "n" ]; then
echo " ... skipping."
diff --git a/scripts/mysql_upgrade_shell.sh b/scripts/mysql_upgrade_shell.sh
index c9f375b6c5b..8a24a0d0740 100644
--- a/scripts/mysql_upgrade_shell.sh
+++ b/scripts/mysql_upgrade_shell.sh
@@ -1,6 +1,18 @@
#!/bin/sh
# Copyright (C) 2002-2003 MySQL AB
-# For a more info consult the file COPYRIGHT distributed with this file.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Runs mysqlcheck --check-upgrade in case it has not been done on this
# major MySQL version
diff --git a/scripts/mysql_zap.sh b/scripts/mysql_zap.sh
index 89823c1373b..6c05afb772c 100644
--- a/scripts/mysql_zap.sh
+++ b/scripts/mysql_zap.sh
@@ -1,4 +1,19 @@
#!@PERL@
+# Copyright (C) 2000-2002, 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# This is a utility for MySQL. It is not needed by any standard part
# of MySQL.
diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh
index 654b43a8a99..bcaf9f8af8e 100644
--- a/scripts/mysqlaccess.sh
+++ b/scripts/mysqlaccess.sh
@@ -462,6 +462,9 @@ MySQLaccess::Report::Print_Header();
if (-f "./$script_conf") {
require "./$script_conf";
}
+ elsif (-f "@sysconfdir@/$script_conf") {
+ require "@sysconfdir@/$script_conf";
+ }
elsif (-f "/etc/$script_conf") {
require "/etc/$script_conf";
}
@@ -929,6 +932,7 @@ sub MergeConfigFile {
# =================================
sub MergeConfigFiles {
my ($name,$pass,$uid,$gid,$quota,$comment,$gcos,$dir,$shell) = getpwuid $<;
+ MergeConfigFile("@sysconfdir@/my.cnf");
MergeConfigFile("/etc/my.cnf");
MergeConfigFile("$dir/.my.cnf");
}
diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh
index 6aed140b79d..69ea82e8794 100644
--- a/scripts/mysqlbug.sh
+++ b/scripts/mysqlbug.sh
@@ -1,4 +1,19 @@
#!/bin/sh
+# Copyright (C) 2000-2002, 2004 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
# Create a bug report and mail it to the mysql mailing list
# Based on glibc bug reporting script.
@@ -132,7 +147,13 @@ if test -z "$VISUAL"
then
if test -z "$EDITOR"
then
- EDIT=emacs
+ # Honor debian sensible-editor
+ if test -x "/usr/bin/sensible-editor"
+ then
+ EDIT=/usr/bin/sensible-editor
+ else
+ EDIT=emacs
+ fi
else
EDIT="$EDITOR"
fi
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 2dcc8dc7bc4..a68ee7fed28 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -464,7 +464,10 @@ sub find_groups
}
else
{
- if (-f "/etc/my.cnf" && -r "/etc/my.cnf")
+ if (-f "@sysconfdir@/my.cnf" && -r "@sysconfdir@/my.cnf")
+ {
+ open(MY_CNF, "<@sysconfdir@/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+ } elsif (-f "/etc/my.cnf" && -r "/etc/my.cnf")
{
open(MY_CNF, "</etc/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
}
@@ -472,6 +475,14 @@ sub find_groups
{
$data[$i] = $line;
}
+ if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf")
+ {
+ open(MY_CNF, "</etc/mysql/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+ }
+ for (; ($line = shift @tmp); $i++)
+ {
+ $data[$i] = $line;
+ }
if (defined($ENV{MYSQL_HOME}) && -f "$ENV{MYSQL_HOME}/my.cnf" &&
-r "$ENV{MYSQL_HOME}/my.cnf")
{
@@ -482,6 +493,14 @@ sub find_groups
{
$data[$i] = $line;
}
+ if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf")
+ {
+ open(MY_CNF, "</etc/mysql/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+ }
+ for (; ($line = shift @tmp); $i++)
+ {
+ $data[$i] = $line;
+ }
if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf")
{
open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
@@ -491,7 +510,7 @@ sub find_groups
$data[$i] = $line;
}
}
- chop @data;
+ chomp @data;
# Make a list of the wanted group ids
if (defined($raw_gids))
{
@@ -703,7 +722,7 @@ sub example
# (as per Linux/Unix standard). You may even replace the
# /etc/init.d/mysql.server script with it.
#
-# Before using, you must create a my.cnf file either in /etc/my.cnf
+# Before using, you must create a my.cnf file either in @sysconfdir@/my.cnf
# or /root/.my.cnf and add the [mysqld_multi] and [mysqld#] groups.
#
# The script can be found from support-files/mysqld_multi.server.sh
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 02a961dc3ec..52fe282f916 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -211,6 +211,7 @@ if [ ! -d $mysql_unix_port_dir ]
then
mkdir $mysql_unix_port_dir
chown $user $mysql_unix_port_dir
+ chmod 755 $mysql_unix_port_dir
fi
# Use the mysqld-max binary by default if the user doesn't specify a binary
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh
index ccb006f692d..ff82a35ec3f 100644
--- a/scripts/mysqldumpslow.sh
+++ b/scripts/mysqldumpslow.sh
@@ -40,6 +40,7 @@ unless (@ARGV) {
warn "basedir=$basedir\n" if $opt{v};
my $datadir = ($defaults =~ m/--datadir=(.*)/)[0];
+ my $slowlog = ($defaults =~ m/--log-slow-queries=(.*)/)[0];
if (!$datadir or $opt{i}) {
# determine the datadir from the instances section of /etc/my.cnf, if any
my $instances = `my_print_defaults instances`;
@@ -55,8 +56,13 @@ unless (@ARGV) {
warn "datadir=$datadir\n" if $opt{v};
}
- @ARGV = <$datadir/$opt{h}-slow.log>;
- die "Can't find '$datadir/$opt{h}-slow.log'\n" unless @ARGV;
+ if ( -f $slowlog ) {
+ @ARGV = ($slowlog);
+ die "Can't find '$slowlog'\n" unless @ARGV;
+ } else {
+ @ARGV = <$datadir/$opt{h}-slow.log>;
+ die "Can't find '$datadir/$opt{h}-slow.log'\n" unless @ARGV;
+ }
}
warn "\nReading mysql slow query log from @ARGV\n";
diff --git a/server-tools/CMakeLists.txt b/server-tools/CMakeLists.txt
index 1983d459ce2..3f02ba88f1d 100755
--- a/server-tools/CMakeLists.txt
+++ b/server-tools/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/server-tools/Makefile.am b/server-tools/Makefile.am
index 573bf07ccff..77612af843e 100644
--- a/server-tools/Makefile.am
+++ b/server-tools/Makefile.am
@@ -1,2 +1,20 @@
+# Copyright (C) 2003, 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SUBDIRS= instance-manager
DIST_SUBDIRS= instance-manager
+
+# Don't update the files from bitkeeper
+%::SCCS/s.%
diff --git a/server-tools/instance-manager/CMakeLists.txt b/server-tools/instance-manager/CMakeLists.txt
index fafc3df4108..861c44e9f71 100755
--- a/server-tools/instance-manager/CMakeLists.txt
+++ b/server-tools/instance-manager/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/server-tools/instance-manager/IMService.cpp b/server-tools/instance-manager/IMService.cpp
index b7ea8e7eb81..c2844114873 100644
--- a/server-tools/instance-manager/IMService.cpp
+++ b/server-tools/instance-manager/IMService.cpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <windows.h>
#include <signal.h>
#include "log.h"
diff --git a/server-tools/instance-manager/IMService.h b/server-tools/instance-manager/IMService.h
index cad38bebdaf..5954a8a46af 100644
--- a/server-tools/instance-manager/IMService.h
+++ b/server-tools/instance-manager/IMService.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#pragma once
#include "windowsservice.h"
diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am
index b1d77506efa..1c47033d4cb 100644
--- a/server-tools/instance-manager/Makefile.am
+++ b/server-tools/instance-manager/Makefile.am
@@ -2,8 +2,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/WindowsService.cpp b/server-tools/instance-manager/WindowsService.cpp
index 192045b7a4c..07ef2e6ea39 100644
--- a/server-tools/instance-manager/WindowsService.cpp
+++ b/server-tools/instance-manager/WindowsService.cpp
@@ -1,3 +1,18 @@
+/* Copyright (C) 2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <windows.h>
#include <assert.h>
#include ".\windowsservice.h"
diff --git a/server-tools/instance-manager/WindowsService.h b/server-tools/instance-manager/WindowsService.h
index 1a034ce1351..033e02ecb7f 100644
--- a/server-tools/instance-manager/WindowsService.h
+++ b/server-tools/instance-manager/WindowsService.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2005 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#pragma once
class WindowsService
diff --git a/server-tools/instance-manager/buffer.cc b/server-tools/instance-manager/buffer.cc
index 8039ab24481..a782c2ae33e 100644
--- a/server-tools/instance-manager/buffer.cc
+++ b/server-tools/instance-manager/buffer.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/buffer.h b/server-tools/instance-manager/buffer.h
index afc71320ecb..a551dd98a25 100644
--- a/server-tools/instance-manager/buffer.h
+++ b/server-tools/instance-manager/buffer.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/command.cc b/server-tools/instance-manager/command.cc
index f76366d5661..e68698207d1 100644
--- a/server-tools/instance-manager/command.cc
+++ b/server-tools/instance-manager/command.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/command.h b/server-tools/instance-manager/command.h
index b84cc6a8e9e..10f46fae585 100644
--- a/server-tools/instance-manager/command.h
+++ b/server-tools/instance-manager/command.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/commands.cc b/server-tools/instance-manager/commands.cc
index 2c9d3236720..01afa703a47 100644
--- a/server-tools/instance-manager/commands.cc
+++ b/server-tools/instance-manager/commands.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/commands.h b/server-tools/instance-manager/commands.h
index bfd38d34889..2a3022c9d7e 100644
--- a/server-tools/instance-manager/commands.h
+++ b/server-tools/instance-manager/commands.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/guardian.cc b/server-tools/instance-manager/guardian.cc
index 3587a599160..cc3ff06256f 100644
--- a/server-tools/instance-manager/guardian.cc
+++ b/server-tools/instance-manager/guardian.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -222,17 +221,14 @@ void Guardian_thread::run()
while (node != NULL)
{
- struct timespec timeout;
-
GUARD_NODE *current_node= (GUARD_NODE *) node->data;
instance= ((GUARD_NODE *) node->data)->instance;
process_instance(instance, current_node, &guarded_instances, node);
node= node->next;
}
- timeout.tv_sec= time(NULL) + monitoring_interval;
- timeout.tv_nsec= 0;
-
+ set_timespec(timeout, monitoring_interval);
+
/* check the loop predicate before sleeping */
if (!(shutdown_requested && (!(guarded_instances))))
thread_registry.cond_timedwait(&thread_info, &COND_guardian,
diff --git a/server-tools/instance-manager/guardian.h b/server-tools/instance-manager/guardian.h
index f1c54262c12..63150de79f4 100644
--- a/server-tools/instance-manager/guardian.h
+++ b/server-tools/instance-manager/guardian.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc
index daa8082ef2f..58fe7569db7 100644
--- a/server-tools/instance-manager/instance.cc
+++ b/server-tools/instance-manager/instance.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -476,10 +475,9 @@ int Instance::stop()
waitchild= options.shutdown_delay_val;
kill_instance(SIGTERM);
- /* sleep on condition to wait for SIGCHLD */
- timeout.tv_sec= time(NULL) + waitchild;
- timeout.tv_nsec= 0;
+ /* sleep on condition to wait for SIGCHLD */
+ set_timespec(timeout, waitchild);
if (pthread_mutex_lock(&LOCK_instance))
return ER_STOP_INSTANCE;
diff --git a/server-tools/instance-manager/instance.h b/server-tools/instance-manager/instance.h
index adb66991685..21511be546f 100644
--- a/server-tools/instance-manager/instance.h
+++ b/server-tools/instance-manager/instance.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/instance_map.cc b/server-tools/instance-manager/instance_map.cc
index f6662847440..39fd20cbc2d 100644
--- a/server-tools/instance-manager/instance_map.cc
+++ b/server-tools/instance-manager/instance_map.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/instance_map.h b/server-tools/instance-manager/instance_map.h
index d3de42f4d80..18e82f0106b 100644
--- a/server-tools/instance-manager/instance_map.h
+++ b/server-tools/instance-manager/instance_map.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/instance_options.cc b/server-tools/instance-manager/instance_options.cc
index f86f359959b..c816069c51e 100644
--- a/server-tools/instance-manager/instance_options.cc
+++ b/server-tools/instance-manager/instance_options.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/instance_options.h b/server-tools/instance-manager/instance_options.h
index b316dbf00fc..fdae77985c2 100644
--- a/server-tools/instance-manager/instance_options.h
+++ b/server-tools/instance-manager/instance_options.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/listener.cc b/server-tools/instance-manager/listener.cc
index 70cd7360f0d..15583b233fb 100644
--- a/server-tools/instance-manager/listener.cc
+++ b/server-tools/instance-manager/listener.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/listener.h b/server-tools/instance-manager/listener.h
index 28ccbf91731..a42f8b48fe5 100644
--- a/server-tools/instance-manager/listener.h
+++ b/server-tools/instance-manager/listener.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_LISTENER_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_LISTENER_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_LISTENER_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_LISTENER_H
+
#include <my_global.h>
#include <my_pthread.h>
diff --git a/server-tools/instance-manager/log.cc b/server-tools/instance-manager/log.cc
index 3f54bc0649a..b63696e2ce6 100644
--- a/server-tools/instance-manager/log.cc
+++ b/server-tools/instance-manager/log.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/log.h b/server-tools/instance-manager/log.h
index 825d7515513..139dcd552ee 100644
--- a/server-tools/instance-manager/log.h
+++ b/server-tools/instance-manager/log.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_LOG_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_LOG_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_LOG_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_LOG_H
+
/*
Logging facilities.
diff --git a/server-tools/instance-manager/manager.cc b/server-tools/instance-manager/manager.cc
index ec22e5c4fbb..30b6aea8519 100644
--- a/server-tools/instance-manager/manager.cc
+++ b/server-tools/instance-manager/manager.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/manager.h b/server-tools/instance-manager/manager.h
index 3ddf292132e..0d459d9cee1 100644
--- a/server-tools/instance-manager/manager.h
+++ b/server-tools/instance-manager/manager.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_MANAGER_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_MANAGER_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_MANAGER_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_MANAGER_H
+
struct Options;
void manager(const Options &options);
diff --git a/server-tools/instance-manager/messages.cc b/server-tools/instance-manager/messages.cc
index d2595638de0..a1a45b05f7c 100644
--- a/server-tools/instance-manager/messages.cc
+++ b/server-tools/instance-manager/messages.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/messages.h b/server-tools/instance-manager/messages.h
index b771efe5e13..5d9383093bc 100644
--- a/server-tools/instance-manager/messages.h
+++ b/server-tools/instance-manager/messages.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_MESSAGES_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_MESSAGES_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_MESSAGES_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_MESSAGES_H
+
const char *message(unsigned sql_errno);
const char *errno_to_sqlstate(unsigned sql_errno);
diff --git a/server-tools/instance-manager/mysql_connection.cc b/server-tools/instance-manager/mysql_connection.cc
index a19914dfdd2..7dabc00ad2d 100644
--- a/server-tools/instance-manager/mysql_connection.cc
+++ b/server-tools/instance-manager/mysql_connection.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/mysql_connection.h b/server-tools/instance-manager/mysql_connection.h
index 3496cc05815..6f5836af4c7 100644
--- a/server-tools/instance-manager/mysql_connection.h
+++ b/server-tools/instance-manager/mysql_connection.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_MYSQL_CONNECTION_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_MYSQL_CONNECTION_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_MYSQL_CONNECTION_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_MYSQL_CONNECTION_H
+
#include <my_global.h>
#include <my_pthread.h>
diff --git a/server-tools/instance-manager/mysql_manager_error.h b/server-tools/instance-manager/mysql_manager_error.h
index ff782923a8e..930ad5ed6fa 100644
--- a/server-tools/instance-manager/mysql_manager_error.h
+++ b/server-tools/instance-manager/mysql_manager_error.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/mysqlmanager.cc b/server-tools/instance-manager/mysqlmanager.cc
index ef714099de7..2b6921d59aa 100644
--- a/server-tools/instance-manager/mysqlmanager.cc
+++ b/server-tools/instance-manager/mysqlmanager.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/options.cc b/server-tools/instance-manager/options.cc
index c6c709295bc..63de47a7b69 100644
--- a/server-tools/instance-manager/options.cc
+++ b/server-tools/instance-manager/options.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/options.h b/server-tools/instance-manager/options.h
index f32e106bd7a..152f0f1643f 100644
--- a/server-tools/instance-manager/options.h
+++ b/server-tools/instance-manager/options.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H
+
/*
Options - all possible options for the instance manager grouped in one
struct.
diff --git a/server-tools/instance-manager/parse.cc b/server-tools/instance-manager/parse.cc
index 14b3db16b45..bdbc8045d9d 100644
--- a/server-tools/instance-manager/parse.cc
+++ b/server-tools/instance-manager/parse.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/parse.h b/server-tools/instance-manager/parse.h
index 3da53e3a61e..5e9f33beb11 100644
--- a/server-tools/instance-manager/parse.h
+++ b/server-tools/instance-manager/parse.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/parse_output.cc b/server-tools/instance-manager/parse_output.cc
index ebc45c1f7d4..f8ddf5a2d08 100644
--- a/server-tools/instance-manager/parse_output.cc
+++ b/server-tools/instance-manager/parse_output.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/parse_output.h b/server-tools/instance-manager/parse_output.h
index 6a84fabbf17..c236357a200 100644
--- a/server-tools/instance-manager/parse_output.h
+++ b/server-tools/instance-manager/parse_output.h
@@ -4,8 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/portability.h b/server-tools/instance-manager/portability.h
index 23a5a5bd14c..31bebd1b33a 100644
--- a/server-tools/instance-manager/portability.h
+++ b/server-tools/instance-manager/portability.h
@@ -1,3 +1,18 @@
+/* Copyright (C) 2005-2006 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
#define INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
@@ -15,7 +30,6 @@
#define snprintf _snprintf
#define SIGKILL 9
-#define SHUT_RDWR 0x2
/*TODO: fix this */
#define PROTOCOL_VERSION 10
diff --git a/server-tools/instance-manager/priv.cc b/server-tools/instance-manager/priv.cc
index d2d6a3f636c..9e08189887e 100644
--- a/server-tools/instance-manager/priv.cc
+++ b/server-tools/instance-manager/priv.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/priv.h b/server-tools/instance-manager/priv.h
index 52d7aa1d23d..a746288f28b 100644
--- a/server-tools/instance-manager/priv.h
+++ b/server-tools/instance-manager/priv.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PRIV_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_PRIV_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PRIV_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_PRIV_H
+
#include <sys/types.h>
#ifdef __WIN__
#include "portability.h"
diff --git a/server-tools/instance-manager/protocol.cc b/server-tools/instance-manager/protocol.cc
index 73e07f993ae..6c7a7f0ecfa 100644
--- a/server-tools/instance-manager/protocol.cc
+++ b/server-tools/instance-manager/protocol.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/protocol.h b/server-tools/instance-manager/protocol.h
index f38eac6b079..b8cd4b3d807 100644
--- a/server-tools/instance-manager/protocol.h
+++ b/server-tools/instance-manager/protocol.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PROTOCOL_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_PROTOCOL_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PROTOCOL_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_PROTOCOL_H
+
#include "buffer.h"
#include <my_list.h>
diff --git a/server-tools/instance-manager/thread_registry.cc b/server-tools/instance-manager/thread_registry.cc
index 0091d713a91..e061bb3384b 100644
--- a/server-tools/instance-manager/thread_registry.cc
+++ b/server-tools/instance-manager/thread_registry.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/thread_registry.h b/server-tools/instance-manager/thread_registry.h
index 6dc320a8533..694fa57378e 100644
--- a/server-tools/instance-manager/thread_registry.h
+++ b/server-tools/instance-manager/thread_registry.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_THREAD_REGISTRY_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_THREAD_REGISTRY_H
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_THREAD_REGISTRY_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_THREAD_REGISTRY_H
+
/*
A multi-threaded application shall nicely work with signals.
diff --git a/server-tools/instance-manager/user_map.cc b/server-tools/instance-manager/user_map.cc
index 9cb15307131..aac536cee97 100644
--- a/server-tools/instance-manager/user_map.cc
+++ b/server-tools/instance-manager/user_map.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/server-tools/instance-manager/user_map.h b/server-tools/instance-manager/user_map.h
index 4134017dd9b..126533119eb 100644
--- a/server-tools/instance-manager/user_map.h
+++ b/server-tools/instance-manager/user_map.h
@@ -1,11 +1,8 @@
-#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MAP_H
-#define INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MAP_H
-/* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MAP_H
+#define INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MAP_H
#include <my_global.h>
diff --git a/sql-bench/Makefile.am b/sql-bench/Makefile.am
index 12f3d5550b3..a7aff83e7aa 100644
--- a/sql-bench/Makefile.am
+++ b/sql-bench/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2003, 2005 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/as3ap.sh b/sql-bench/as3ap.sh
index f6827c004d7..d84219a37eb 100644
--- a/sql-bench/as3ap.sh
+++ b/sql-bench/as3ap.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/bench-count-distinct.sh b/sql-bench/bench-count-distinct.sh
index 8ebc910df59..31558aa0b2e 100644
--- a/sql-bench/bench-count-distinct.sh
+++ b/sql-bench/bench-count-distinct.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/bench-init.pl.sh b/sql-bench/bench-init.pl.sh
index 31282d06abf..399c8cb9879 100644
--- a/sql-bench/bench-init.pl.sh
+++ b/sql-bench/bench-init.pl.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2003, 2005 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/compare-results.sh b/sql-bench/compare-results.sh
index e95bd23e6a3..145c4894ca2 100644
--- a/sql-bench/compare-results.sh
+++ b/sql-bench/compare-results.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/copy-db.sh b/sql-bench/copy-db.sh
index 3d2f418280c..f74fa68a081 100644
--- a/sql-bench/copy-db.sh
+++ b/sql-bench/copy-db.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/crash-me.sh b/sql-bench/crash-me.sh
index a40ef8fbc7d..b28bdba7f9f 100644
--- a/sql-bench/crash-me.sh
+++ b/sql-bench/crash-me.sh
@@ -1,11 +1,11 @@
#!@PERL@
# -*- perl -*-
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/print-limit-table b/sql-bench/print-limit-table
index 53b62ae3397..f0cf7cadc69 100755
--- a/sql-bench/print-limit-table
+++ b/sql-bench/print-limit-table
@@ -1,10 +1,10 @@
#!/usr/bin/perl
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/run-all-tests.sh b/sql-bench/run-all-tests.sh
index da576d73852..7e607b313e4 100644
--- a/sql-bench/run-all-tests.sh
+++ b/sql-bench/run-all-tests.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/server-cfg.sh b/sql-bench/server-cfg.sh
index 75528b24b77..cd694169aa5 100644
--- a/sql-bench/server-cfg.sh
+++ b/sql-bench/server-cfg.sh
@@ -1,11 +1,11 @@
#!@PERL@
# -*- perl -*-
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-ATIS.sh b/sql-bench/test-ATIS.sh
index 1f11f4319b5..6d102fd3977 100644
--- a/sql-bench/test-ATIS.sh
+++ b/sql-bench/test-ATIS.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-alter-table.sh b/sql-bench/test-alter-table.sh
index 2ca54000065..eb06582dc0b 100644
--- a/sql-bench/test-alter-table.sh
+++ b/sql-bench/test-alter-table.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-big-tables.sh b/sql-bench/test-big-tables.sh
index fb58247eddd..0226967bc54 100644
--- a/sql-bench/test-big-tables.sh
+++ b/sql-bench/test-big-tables.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-connect.sh b/sql-bench/test-connect.sh
index b7a360cac38..84175c357aa 100644
--- a/sql-bench/test-connect.sh
+++ b/sql-bench/test-connect.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-create.sh b/sql-bench/test-create.sh
index 8188b47f587..bc2f17c1f0a 100644
--- a/sql-bench/test-create.sh
+++ b/sql-bench/test-create.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-insert.sh b/sql-bench/test-insert.sh
index f83d0fd13be..5189e8851e1 100644
--- a/sql-bench/test-insert.sh
+++ b/sql-bench/test-insert.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-select.sh b/sql-bench/test-select.sh
index 63f70b0aaa1..809755ab4d7 100644
--- a/sql-bench/test-select.sh
+++ b/sql-bench/test-select.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-transactions.sh b/sql-bench/test-transactions.sh
index 50d7098bca7..5723c856564 100644
--- a/sql-bench/test-transactions.sh
+++ b/sql-bench/test-transactions.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-bench/test-wisconsin.sh b/sql-bench/test-wisconsin.sh
index 89ffb9aa629..38ab93e7f4a 100644
--- a/sql-bench/test-wisconsin.sh
+++ b/sql-bench/test-wisconsin.sh
@@ -1,10 +1,10 @@
#!@PERL@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-common/Makefile.am b/sql-common/Makefile.am
index d71523a741c..614ccffde9d 100644
--- a/sql-common/Makefile.am
+++ b/sql-common/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2003-2004, 2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-common/client.c b/sql-common/client.c
index 44b7940a503..bcba50548ca 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1217,7 +1216,7 @@ unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
{
uchar *pos;
/* fields count may be wrong */
- DBUG_ASSERT ((field - result) < fields);
+ DBUG_ASSERT((uint) (field - result) < fields);
cli_fetch_lengths(&lengths[0], row->data, default_value ? 8 : 7);
field->catalog = strdup_root(alloc,(char*) row->data[0]);
field->db = strdup_root(alloc,(char*) row->data[1]);
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index efef1d98673..8496c0ceba1 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -411,7 +410,9 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
if (number_of_fields < 3 ||
l_time->year > 9999 || l_time->month > 12 ||
l_time->day > 31 || l_time->hour > 23 ||
- l_time->minute > 59 || l_time->second > 59)
+ l_time->minute > 59 || l_time->second > 59 ||
+ (l_time->year == 0 && l_time->month == 0 && l_time->day == 0 &&
+ (l_time->hour != 0 || l_time->minute != 0 || l_time->second != 0)))
{
/* Only give warning for a zero date if there is some garbage after */
if (!not_zero_date) /* If zero date */
@@ -429,7 +430,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
goto err;
}
- if (check_date(l_time, not_zero_date, flags, was_cut))
+ if (check_date(l_time, not_zero_date != 0, flags, was_cut))
goto err;
l_time->time_type= (number_of_fields <= 3 ?
@@ -530,15 +531,15 @@ my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
if ((uint) (end-str) > 1 && str != end_of_days &&
my_isdigit(&my_charset_latin1, *str))
{ /* Found days part */
- date[0]= value;
+ date[0]= (ulong) value;
state= 1; /* Assume next is hours */
found_days= 1;
}
else if ((end-str) > 1 && *str == time_separator &&
my_isdigit(&my_charset_latin1, str[1]))
{
- date[0]=0; /* Assume we found hours */
- date[1]=value;
+ date[0]= 0; /* Assume we found hours */
+ date[1]= (ulong) value;
state=2;
found_hours=1;
str++; /* skip ':' */
@@ -547,9 +548,9 @@ my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
{
/* String given as one number; assume HHMMSS format */
date[0]= 0;
- date[1]= value/10000;
- date[2]= value/100 % 100;
- date[3]= value % 100;
+ date[1]= (ulong) (value/10000);
+ date[2]= (ulong) (value/100 % 100);
+ date[3]= (ulong) (value % 100);
state=4;
goto fractional;
}
@@ -559,7 +560,7 @@ my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
{
for (value=0; str != end && my_isdigit(&my_charset_latin1,*str) ; str++)
value=value*10L + (long) (*str - '0');
- date[state++]=value;
+ date[state++]= (ulong) value;
if (state == 4 || (end-str) < 2 || *str != time_separator ||
!my_isdigit(&my_charset_latin1,str[1]))
break;
@@ -594,7 +595,7 @@ fractional:
value*= (long) log_10_int[field_length];
else if (field_length < 0)
*warning|= MYSQL_TIME_WARN_TRUNCATED;
- date[4]=value;
+ date[4]= (ulong) value;
}
else
date[4]=0;
diff --git a/sql-common/my_user.c b/sql-common/my_user.c
index c39f08e520f..fa5b80413bf 100644
--- a/sql-common/my_user.c
+++ b/sql-common/my_user.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql-common/pack.c b/sql-common/pack.c
index ed79143a04b..33c1103fb04 100644
--- a/sql-common/pack.c
+++ b/sql-common/pack.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 9b2fae847d6..7e26f62b5f7 100755
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
SET(CMAKE_C_FLAGS_DEBUG
@@ -25,6 +40,10 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc
ADD_DEFINITIONS(-DHAVE_INNOBASE -DMYSQL_SERVER
-D_CONSOLE -DHAVE_DLOPEN)
+
+IF(DISABLE_GRANT_OPTIONS)
+ ADD_DEFINITIONS(-DDISABLE_GRANT_OPTIONS)
+ENDIF(DISABLE_GRANT_OPTIONS)
ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
diff --git a/sql/Makefile.am b/sql/Makefile.am
index cbb87f16d80..20c4527185b 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/client_settings.h b/sql/client_settings.h
index a8cd36af102..f0742cd8046 100644
--- a/sql/client_settings.h
+++ b/sql/client_settings.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/custom_conf.h b/sql/custom_conf.h
index 19ced12bfbb..137b7e9eef2 100644
--- a/sql/custom_conf.h
+++ b/sql/custom_conf.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/derror.cc b/sql/derror.cc
index bee818a14c1..0e74d411b1f 100644
--- a/sql/derror.cc
+++ b/sql/derror.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/des_key_file.cc b/sql/des_key_file.cc
index 77cb0c8de0f..d99d712b45a 100644
--- a/sql/des_key_file.cc
+++ b/sql/des_key_file.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/discover.cc b/sql/discover.cc
index 1251055c70e..5d24607cf6b 100644
--- a/sql/discover.cc
+++ b/sql/discover.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/examples/CMakeLists.txt b/sql/examples/CMakeLists.txt
index d3cc430ef40..1a22e9a3efd 100755
--- a/sql/examples/CMakeLists.txt
+++ b/sql/examples/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc
index 92e5469a832..19c686ee495 100644
--- a/sql/examples/ha_example.cc
+++ b/sql/examples/ha_example.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/examples/ha_example.h b/sql/examples/ha_example.h
index f18063f6c32..d6ec93cf97f 100644
--- a/sql/examples/ha_example.h
+++ b/sql/examples/ha_example.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc
index 7fb2de9ca30..f328a631d10 100644
--- a/sql/examples/ha_tina.cc
+++ b/sql/examples/ha_tina.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/examples/ha_tina.h b/sql/examples/ha_tina.h
index 3bd6405b3f8..98cba8bf4cd 100644
--- a/sql/examples/ha_tina.h
+++ b/sql/examples/ha_tina.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/field.cc b/sql/field.cc
index 1cfd0843179..efe608b7bdd 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -47,6 +46,8 @@ uchar Field_null::null[1]={1};
const char field_separator=',';
#define DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE 320
+#define LONGLONG_TO_STRING_CONVERSION_BUFFER_SIZE 128
+#define DECIMAL_TO_STRING_CONVERSION_BUFFER_SIZE 128
#define BLOB_PACK_LENGTH_TO_MAX_LENGH(arg) \
((ulong) ((LL(1) << min(arg, 4) * 8) - LL(1)))
@@ -1567,10 +1568,11 @@ void Field_null::sql_type(String &res) const
This is an number stored as a pre-space (or pre-zero) string
****************************************************************************/
-void
+int
Field_decimal::reset(void)
{
Field_decimal::store(STRING_WITH_LEN("0"),&my_charset_bin);
+ return 0;
}
void Field_decimal::overflow(bool negative)
@@ -2215,9 +2217,10 @@ Field_new_decimal::Field_new_decimal(uint32 len_arg,
}
-void Field_new_decimal::reset(void)
+int Field_new_decimal::reset(void)
{
store_value(&decimal_zero);
+ return 0;
}
@@ -4813,7 +4816,7 @@ int Field_time::store_time(TIME *ltime, timestamp_type type)
(ltime->minute * 100 + ltime->second);
if (ltime->neg)
tmp= -tmp;
- return Field_time::store((longlong) tmp);
+ return Field_time::store((longlong) tmp, FALSE);
}
@@ -5409,11 +5412,11 @@ int Field_newdate::store_time(TIME *ltime,timestamp_type type)
if (type == MYSQL_TIMESTAMP_DATE || type == MYSQL_TIMESTAMP_DATETIME)
{
tmp=ltime->year*16*32+ltime->month*32+ltime->day;
- if ((my_bool)check_date(ltime, tmp,
- (TIME_FUZZY_DATE |
- (current_thd->variables.sql_mode &
- (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
- MODE_INVALID_DATES))), &error))
+ if (check_date(ltime, tmp != 0,
+ (TIME_FUZZY_DATE |
+ (current_thd->variables.sql_mode &
+ (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
+ MODE_INVALID_DATES))), &error))
{
char buff[12];
String str(buff, sizeof(buff), &my_charset_latin1);
@@ -5633,11 +5636,11 @@ int Field_datetime::store_time(TIME *ltime,timestamp_type type)
{
tmp=((ltime->year*10000L+ltime->month*100+ltime->day)*LL(1000000)+
(ltime->hour*10000L+ltime->minute*100+ltime->second));
- if ((my_bool)check_date(ltime, tmp,
- (TIME_FUZZY_DATE |
- (current_thd->variables.sql_mode &
- (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
- MODE_INVALID_DATES))), &error))
+ if (check_date(ltime, tmp != 0,
+ (TIME_FUZZY_DATE |
+ (current_thd->variables.sql_mode &
+ (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
+ MODE_INVALID_DATES))), &error))
{
char buff[19];
String str(buff, sizeof(buff), &my_charset_latin1);
@@ -6056,19 +6059,49 @@ int Field_longstr::store_decimal(const my_decimal *d)
double Field_string::val_real(void)
{
- int not_used;
- char *end_not_used;
+ int error;
+ char *end;
CHARSET_INFO *cs= charset();
- return my_strntod(cs,ptr,field_length,&end_not_used,&not_used);
+ double result;
+
+ result= my_strntod(cs,ptr,field_length,&end,&error);
+ if (!table->in_use->no_errors &&
+ (error || (field_length != (uint32)(end - ptr) &&
+ !check_if_only_end_space(cs, end, ptr + field_length))))
+ {
+ char buf[DOUBLE_TO_STRING_CONVERSION_BUFFER_SIZE];
+ String tmp(buf, sizeof(buf), cs);
+ tmp.copy(ptr, field_length, cs);
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE),
+ "DOUBLE", tmp.c_ptr());
+ }
+ return result;
}
longlong Field_string::val_int(void)
{
- int not_used;
- char *end_not_used;
- CHARSET_INFO *cs=charset();
- return my_strntoll(cs,ptr,field_length,10,&end_not_used,&not_used);
+ int error;
+ char *end;
+ CHARSET_INFO *cs= charset();
+ longlong result;
+
+ result= my_strntoll(cs,ptr,field_length,10,&end,&error);
+ if (!table->in_use->no_errors &&
+ (error || (field_length != (uint32)(end - ptr) &&
+ !check_if_only_end_space(cs, end, ptr + field_length))))
+ {
+ char buf[LONGLONG_TO_STRING_CONVERSION_BUFFER_SIZE];
+ String tmp(buf, sizeof(buf), cs);
+ tmp.copy(ptr, field_length, cs);
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE),
+ "INTEGER", tmp.c_ptr());
+ }
+ return result;
}
@@ -6085,8 +6118,20 @@ String *Field_string::val_str(String *val_buffer __attribute__((unused)),
my_decimal *Field_string::val_decimal(my_decimal *decimal_value)
{
- str2my_decimal(E_DEC_FATAL_ERROR, ptr, field_length, charset(),
+ int err= str2my_decimal(E_DEC_FATAL_ERROR, ptr, field_length, charset(),
decimal_value);
+ if (!table->in_use->no_errors && err)
+ {
+ char buf[DECIMAL_TO_STRING_CONVERSION_BUFFER_SIZE];
+ CHARSET_INFO *cs= charset();
+ String tmp(buf, sizeof(buf), cs);
+ tmp.copy(ptr, field_length, cs);
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_TRUNCATED_WRONG_VALUE,
+ ER(ER_TRUNCATED_WRONG_VALUE),
+ "DECIMAL", tmp.c_ptr());
+ }
+
return decimal_value;
}
@@ -7789,6 +7834,16 @@ void Field_enum::sql_type(String &res) const
}
+Field *Field_enum::new_field(MEM_ROOT *root, struct st_table *new_table,
+ bool keep_type)
+{
+ Field_enum *res= (Field_enum*) Field::new_field(root, new_table, keep_type);
+ if (res)
+ res->typelib= copy_typelib(root, typelib);
+ return res;
+}
+
+
/*
set type.
This is a string which can have a collection of different values.
@@ -7982,6 +8037,7 @@ Field_bit::Field_bit(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
bit_ptr(bit_ptr_arg), bit_ofs(bit_ofs_arg), bit_len(len_arg & 7),
bytes_in_rec(len_arg / 8)
{
+ flags|= UNSIGNED_FLAG;
/*
Ensure that Field::eq() can distinguish between two different bit fields.
(two bit fields that are not null, may have same ptr and null_ptr)
@@ -8076,7 +8132,7 @@ int Field_bit::store_decimal(const my_decimal *val)
{
int err= 0;
longlong i= convert_decimal2longlong(val, 1, &err);
- return test(err | store(i));
+ return test(err | store(i, TRUE));
}
@@ -8221,6 +8277,7 @@ Field_bit_as_char::Field_bit_as_char(char *ptr_arg, uint32 len_arg,
: Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, 0,
0, unireg_check_arg, field_name_arg, table_arg)
{
+ flags|= UNSIGNED_FLAG;
bit_len= 0;
bytes_in_rec= (len_arg + 7) / 8;
}
@@ -8229,7 +8286,7 @@ Field_bit_as_char::Field_bit_as_char(char *ptr_arg, uint32 len_arg,
int Field_bit_as_char::store(const char *from, uint length, CHARSET_INFO *cs)
{
int delta;
- uchar bits= field_length & 7;
+ uchar bits= (uchar) (field_length & 7);
for (; length && !*from; from++, length--); // skip left 0's
delta= bytes_in_rec - length;
diff --git a/sql/field.h b/sql/field.h
index 709630218b2..565342637ba 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -150,7 +149,7 @@ public:
*/
virtual uint32 data_length(const char *from) { return pack_length(); }
virtual uint32 sort_length() const { return pack_length(); }
- virtual void reset(void) { bzero(ptr,pack_length()); }
+ virtual int reset(void) { bzero(ptr,pack_length()); return 0; }
virtual void reset_fields() {}
virtual void set_default()
{
@@ -450,10 +449,10 @@ public:
enum_field_types type() const { return FIELD_TYPE_DECIMAL;}
enum ha_base_keytype key_type() const
{ return zerofill ? HA_KEYTYPE_BINARY : HA_KEYTYPE_NUM; }
- void reset(void);
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
+ int reset(void);
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -490,7 +489,7 @@ public:
enum_field_types type() const { return FIELD_TYPE_NEWDECIMAL;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; }
Item_result result_type () const { return DECIMAL_RESULT; }
- void reset(void);
+ int reset(void);
bool store_value(const my_decimal *decimal_value);
void set_value_on_overflow(my_decimal *decimal_value, bool sign);
int store(const char *to, uint length, CHARSET_INFO *charset);
@@ -527,10 +526,10 @@ public:
enum_field_types type() const { return FIELD_TYPE_TINY;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_BINARY : HA_KEYTYPE_INT8; }
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=0; }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int reset(void) { ptr[0]=0; return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -563,10 +562,10 @@ public:
enum_field_types type() const { return FIELD_TYPE_SHORT;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_USHORT_INT : HA_KEYTYPE_SHORT_INT;}
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=ptr[1]=0; }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int reset(void) { ptr[0]=ptr[1]=0; return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -594,10 +593,10 @@ public:
enum_field_types type() const { return FIELD_TYPE_INT24;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_UINT24 : HA_KEYTYPE_INT24; }
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=0; }
+ int reset(void) { ptr[0]=ptr[1]=ptr[2]=0; return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -630,10 +629,10 @@ public:
enum_field_types type() const { return FIELD_TYPE_LONG;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_ULONG_INT : HA_KEYTYPE_LONG_INT; }
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
double val_real(void);
longlong val_int(void);
bool send_binary(Protocol *protocol);
@@ -668,10 +667,14 @@ public:
enum_field_types type() const { return FIELD_TYPE_LONGLONG;}
enum ha_base_keytype key_type() const
{ return unsigned_flag ? HA_KEYTYPE_ULONGLONG : HA_KEYTYPE_LONGLONG; }
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0; }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int reset(void)
+ {
+ ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0;
+ return 0;
+ }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -704,10 +707,10 @@ public:
{}
enum_field_types type() const { return FIELD_TYPE_FLOAT;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_FLOAT; }
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- void reset(void) { bzero(ptr,sizeof(float)); }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int reset(void) { bzero(ptr,sizeof(float)); return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -741,7 +744,7 @@ public:
int store(const char *to,uint length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
- void reset(void) { bzero(ptr,sizeof(double)); }
+ int reset(void) { bzero(ptr,sizeof(double)); return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -768,10 +771,10 @@ public:
enum_field_types type() const { return FIELD_TYPE_NULL;}
int store(const char *to, uint length, CHARSET_INFO *cs)
{ null[0]=1; return 0; }
- int store(double nr) { null[0]=1; return 0; }
- int store(longlong nr, bool unsigned_val) { null[0]=1; return 0; }
- int store_decimal(const my_decimal *d) { null[0]=1; return 0; }
- void reset(void) {}
+ int store(double nr) { null[0]=1; return 0; }
+ int store(longlong nr, bool unsigned_val) { null[0]=1; return 0; }
+ int store_decimal(const my_decimal *d) { null[0]=1; return 0; }
+ int reset(void) { return 0; }
double val_real(void) { return 0.0;}
longlong val_int(void) { return 0;}
my_decimal *val_decimal(my_decimal *) { return 0; }
@@ -801,7 +804,7 @@ public:
int store(const char *to,uint length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; }
+ int reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -877,10 +880,10 @@ public:
enum_field_types type() const { return FIELD_TYPE_DATE;}
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONG_INT; }
enum Item_result cmp_type () const { return INT_RESULT; }
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=0; return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -909,7 +912,7 @@ public:
int store(double nr);
int store(longlong nr, bool unsigned_val);
int store_time(TIME *ltime, timestamp_type type);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=0; }
+ int reset(void) { ptr[0]=ptr[1]=ptr[2]=0; return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -941,10 +944,10 @@ public:
enum ha_base_keytype key_type() const { return HA_KEYTYPE_INT24; }
enum Item_result cmp_type () const { return INT_RESULT; }
int store_time(TIME *ltime, timestamp_type type);
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(double nr);
- int store(longlong nr, bool unsigned_val);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=0; }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(double nr);
+ int store(longlong nr, bool unsigned_val);
+ int reset(void) { ptr[0]=ptr[1]=ptr[2]=0; return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -982,7 +985,11 @@ public:
int store(double nr);
int store(longlong nr, bool unsigned_val);
int store_time(TIME *ltime, timestamp_type type);
- void reset(void) { ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0; }
+ int reset(void)
+ {
+ ptr[0]=ptr[1]=ptr[2]=ptr[3]=ptr[4]=ptr[5]=ptr[6]=ptr[7]=0;
+ return 0;
+ }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -1025,9 +1032,14 @@ public:
enum ha_base_keytype key_type() const
{ return binary() ? HA_KEYTYPE_BINARY : HA_KEYTYPE_TEXT; }
bool zero_pack() const { return 0; }
- void reset(void) { charset()->cset->fill(charset(),ptr,field_length,' '); }
- int store(const char *to,uint length,CHARSET_INFO *charset);
- int store(longlong nr, bool unsigned_val);
+ int reset(void)
+ {
+ charset()->cset->fill(charset(),ptr,field_length,
+ (has_charset() ? ' ' : 0));
+ return 0;
+ }
+ int store(const char *to,uint length,CHARSET_INFO *charset);
+ int store(longlong nr, bool unsigned_val);
int store(double nr) { return Field_str::store(nr); } /* QQ: To be deleted */
double val_real(void);
longlong val_int(void);
@@ -1082,7 +1094,7 @@ public:
enum_field_types type() const { return MYSQL_TYPE_VARCHAR; }
enum ha_base_keytype key_type() const;
bool zero_pack() const { return 0; }
- void reset(void) { bzero(ptr,field_length+length_bytes); }
+ int reset(void) { bzero(ptr,field_length+length_bytes); return 0; }
uint32 pack_length() const { return (uint32) field_length+length_bytes; }
uint32 key_length() const { return (uint32) field_length; }
uint32 sort_length() const
@@ -1183,7 +1195,7 @@ public:
{
return (uint32) (((ulonglong) 1 << (packlength*8)) -1);
}
- void reset(void) { bzero(ptr, packlength+sizeof(char*)); }
+ int reset(void) { bzero(ptr, packlength+sizeof(char*)); return 0; }
void reset_fields() { bzero((char*) &value,sizeof(value)); }
void store_length(uint32 number);
inline uint32 get_length(uint row_offset=0)
@@ -1264,6 +1276,7 @@ public:
int store_decimal(const my_decimal *);
void get_key_image(char *buff,uint length,imagetype type);
uint size_of() const { return sizeof(*this); }
+ int reset(void) { return !maybe_null(); }
};
#endif /*HAVE_SPATIAL*/
@@ -1285,6 +1298,7 @@ public:
{
flags|=ENUM_FLAG;
}
+ Field *new_field(MEM_ROOT *root, struct st_table *new_table, bool keep_type);
enum_field_types type() const { return FIELD_TYPE_STRING; }
enum Item_result cmp_type () const { return INT_RESULT; }
enum Item_result cast_to_int_type () const { return INT_RESULT; }
@@ -1292,7 +1306,7 @@ public:
int store(const char *to,uint length,CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
- void reset() { bzero(ptr,packlength); }
+ int reset() { bzero(ptr,packlength); return 0; }
double val_real(void);
longlong val_int(void);
String *val_str(String*,String *);
@@ -1353,7 +1367,7 @@ public:
uint32 max_length() { return field_length; }
uint size_of() const { return sizeof(*this); }
Item_result result_type () const { return INT_RESULT; }
- void reset(void) { bzero(ptr, bytes_in_rec); }
+ int reset(void) { bzero(ptr, bytes_in_rec); return 0; }
int store(const char *to, uint length, CHARSET_INFO *charset);
int store(double nr);
int store(longlong nr, bool unsigned_val);
diff --git a/sql/field_conv.cc b/sql/field_conv.cc
index 95ff985376d..e5752708123 100644
--- a/sql/field_conv.cc
+++ b/sql/field_conv.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -309,6 +308,21 @@ static void do_field_string(Copy_field *copy)
}
+static void do_field_varbinary_pre50(Copy_field *copy)
+{
+ char buff[MAX_FIELD_WIDTH];
+ copy->tmp.set_quick(buff,sizeof(buff),copy->tmp.charset());
+ copy->from_field->val_str(&copy->tmp);
+
+ /* Use the same function as in 4.1 to trim trailing spaces */
+ uint length= my_lengthsp_8bit(&my_charset_bin, copy->tmp.c_ptr_quick(),
+ copy->from_field->field_length);
+
+ copy->to_field->store(copy->tmp.c_ptr_quick(), length,
+ copy->tmp.charset());
+}
+
+
static void do_field_int(Copy_field *copy)
{
longlong value= copy->from_field->val_int();
@@ -571,6 +585,15 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*)
if (from->result_type() == STRING_RESULT)
{
/*
+ Detect copy from pre 5.0 varbinary to varbinary as of 5.0 and
+ use special copy function that removes trailing spaces and thus
+ repairs data.
+ */
+ if (from->type() == MYSQL_TYPE_VAR_STRING && !from->has_charset() &&
+ to->type() == MYSQL_TYPE_VARCHAR && !to->has_charset())
+ return do_field_varbinary_pre50;
+
+ /*
If we are copying date or datetime's we have to check the dates
if we don't allow 'all' dates.
*/
diff --git a/sql/filesort.cc b/sql/filesort.cc
index 38c941b30f4..81600ce8a93 100644
--- a/sql/filesort.cc
+++ b/sql/filesort.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/frm_crypt.cc b/sql/frm_crypt.cc
index 8dd70900648..590205e83ab 100644
--- a/sql/frm_crypt.cc
+++ b/sql/frm_crypt.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc
index 5a8bd48d699..7abdb5f488c 100644
--- a/sql/gen_lex_hash.cc
+++ b/sql/gen_lex_hash.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -206,9 +205,10 @@ void insert_symbols()
void insert_sql_functions()
{
- size_t i= 0;
+ int i= 0;
SYMBOL *cur;
- for (cur= sql_functions; i<array_elements(sql_functions); cur++, i++){
+ for (cur= sql_functions; i < (int) array_elements(sql_functions); cur++, i++)
+ {
hash_lex_struct *root=
get_hash_struct_by_len(&root_by_len,cur->length,&max_len);
insert_into_hash(root,cur->name,0,-i-1,1);
diff --git a/sql/gstream.cc b/sql/gstream.cc
index 4083cb2fe71..46e12b6ef3b 100644
--- a/sql/gstream.cc
+++ b/sql/gstream.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/gstream.h b/sql/gstream.h
index bfbf28851ce..10274635413 100644
--- a/sql/gstream.h
+++ b/sql/gstream.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_archive.cc b/sql/ha_archive.cc
index 113008c4885..0f714cc2008 100644
--- a/sql/ha_archive.cc
+++ b/sql/ha_archive.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -211,7 +210,7 @@ bool archive_db_init()
max_zfile_size= INT_MAX16;
break;
case 8:
- max_zfile_size= LONGLONG_MAX;
+ max_zfile_size= (z_off_t) LONGLONG_MAX;
break;
case 4:
default:
@@ -327,8 +326,8 @@ int ha_archive::read_meta_file(File meta_file, ha_rows *rows)
DBUG_PRINT("ha_archive::read_meta_file", ("Check %d", (uint)meta_buffer[0]));
DBUG_PRINT("ha_archive::read_meta_file", ("Version %d", (uint)meta_buffer[1]));
- DBUG_PRINT("ha_archive::read_meta_file", ("Rows %lld", *rows));
- DBUG_PRINT("ha_archive::read_meta_file", ("Checkpoint %lld", check_point));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Rows %lu", (ulong) *rows));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Checkpoint %lu", (ulong) check_point));
DBUG_PRINT("ha_archive::read_meta_file", ("Dirty %d", (int)meta_buffer[18]));
if ((meta_buffer[0] != (uchar)ARCHIVE_CHECK_HEADER) ||
@@ -359,8 +358,8 @@ int ha_archive::write_meta_file(File meta_file, ha_rows rows, bool dirty)
*(meta_buffer + 18)= (uchar)dirty;
DBUG_PRINT("ha_archive::write_meta_file", ("Check %d", (uint)ARCHIVE_CHECK_HEADER));
DBUG_PRINT("ha_archive::write_meta_file", ("Version %d", (uint)ARCHIVE_VERSION));
- DBUG_PRINT("ha_archive::write_meta_file", ("Rows %llu", (ulonglong)rows));
- DBUG_PRINT("ha_archive::write_meta_file", ("Checkpoint %llu", check_point));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Rows %lu", (ulong)rows));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Checkpoint %lu", (ulong) check_point));
DBUG_PRINT("ha_archive::write_meta_file", ("Dirty %d", (uint)dirty));
VOID(my_seek(meta_file, 0, MY_SEEK_SET, MYF(0)));
@@ -495,7 +494,7 @@ int ha_archive::init_archive_writer()
}
share->archive_write_open= TRUE;
info(HA_STATUS_TIME);
- share->approx_file_size= data_file_length;
+ share->approx_file_size= (ulong) data_file_length;
DBUG_RETURN(0);
}
@@ -676,7 +675,7 @@ int ha_archive::real_write_row(byte *buf, gzFile writer)
if (share->approx_file_size > max_zfile_size - total_row_length)
{
info(HA_STATUS_TIME);
- share->approx_file_size= data_file_length;
+ share->approx_file_size= (ulong) data_file_length;
if (share->approx_file_size > max_zfile_size - total_row_length)
DBUG_RETURN(HA_ERR_RECORD_FILE_FULL);
}
@@ -783,7 +782,7 @@ int ha_archive::rnd_init(bool scan)
if (scan)
{
scan_rows= share->rows_recorded;
- DBUG_PRINT("info", ("archive will retrieve %llu rows", scan_rows));
+ DBUG_PRINT("info", ("archive will retrieve %lu rows", (ulong) scan_rows));
records= 0;
/*
@@ -1019,7 +1018,8 @@ int ha_archive::optimize(THD* thd, HA_CHECK_OPT* check_opt)
share->rows_recorded++;
}
}
- DBUG_PRINT("info", ("recovered %llu archive rows", share->rows_recorded));
+ DBUG_PRINT("info", ("recovered %lu archive rows",
+ (ulong) share->rows_recorded));
my_free((char*)buf, MYF(0));
if (rc && rc != HA_ERR_END_OF_FILE)
diff --git a/sql/ha_archive.h b/sql/ha_archive.h
index 6c6b587dd2a..54d0be69441 100644
--- a/sql/ha_archive.h
+++ b/sql/ha_archive.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index ac3625157cf..d63935f1a9c 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_berkeley.h b/sql/ha_berkeley.h
index 2ff0a7cf044..051990b0ee5 100644
--- a/sql/ha_berkeley.h
+++ b/sql/ha_berkeley.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc
index 6aabcb4e7cd..61a8658be53 100644
--- a/sql/ha_blackhole.cc
+++ b/sql/ha_blackhole.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_blackhole.h b/sql/ha_blackhole.h
index 05cb1c66b39..0046a57d10a 100644
--- a/sql/ha_blackhole.h
+++ b/sql/ha_blackhole.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc
index 6328803c743..6508216e3d6 100644
--- a/sql/ha_federated.cc
+++ b/sql/ha_federated.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1249,7 +1248,6 @@ bool ha_federated::create_where_from_key(String *to,
if (tmp.append(FEDERATED_CLOSEPAREN))
DBUG_RETURN(1);
-next_loop:
if (store_length >= length)
break;
DBUG_PRINT("info", ("remainder %d", remainder));
@@ -1435,6 +1433,16 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
/* Connect to foreign database mysql_real_connect() */
mysql= mysql_init(0);
+
+ /*
+ BUG# 17044 Federated Storage Engine is not UTF8 clean
+ Add set names to whatever charset the table is at open
+ of table
+ */
+ /* this sets the csname like 'set names utf8' */
+ mysql_options(mysql,MYSQL_SET_CHARSET_NAME,
+ this->table->s->table_charset->csname);
+
if (!mysql || !mysql_real_connect(mysql,
share->hostname,
share->username,
@@ -1451,6 +1459,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
API silently reconnect. For future versions, we will need more logic to
deal with transactions
*/
+
mysql->reconnect= 1;
ref_length= (table->s->primary_key != MAX_KEY ?
@@ -1914,8 +1923,8 @@ int ha_federated::delete_row(const byte *buf)
{
DBUG_RETURN(stash_remote_error());
}
- deleted+= mysql->affected_rows;
- records-= mysql->affected_rows;
+ deleted+= (ha_rows) mysql->affected_rows;
+ records-= (ha_rows) mysql->affected_rows;
DBUG_PRINT("info",
("rows deleted %ld rows deleted for all time %ld",
(long) mysql->affected_rows, (long) deleted));
@@ -2270,7 +2279,6 @@ int ha_federated::rnd_next(byte *buf)
int ha_federated::read_next(byte *buf, MYSQL_RES *result)
{
int retval;
- my_ulonglong num_rows;
MYSQL_ROW row;
DBUG_ENTER("ha_federated::read_next");
diff --git a/sql/ha_federated.h b/sql/ha_federated.h
index c04ce09e75d..09c934cb493 100644
--- a/sql/ha_federated.h
+++ b/sql/ha_federated.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc
index 34ef888a029..fe5e8b76ec9 100644
--- a/sql/ha_heap.cc
+++ b/sql/ha_heap.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -631,7 +630,7 @@ int ha_heap::create(const char *name, TABLE *table_arg,
}
mem_per_row+= MY_ALIGN(share->reclength + 1, sizeof(char*));
max_rows = (ha_rows) (table->in_use->variables.max_heap_table_size /
- mem_per_row);
+ (ulonglong) mem_per_row);
if (table_arg->found_next_number_field)
{
keydef[share->next_number_index].flag|= HA_AUTO_KEY;
diff --git a/sql/ha_heap.h b/sql/ha_heap.h
index a48428e9289..18389c1298d 100644
--- a/sql/ha_heap.h
+++ b/sql/ha_heap.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index a1619d8e1a1..d854c362df8 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -173,6 +172,7 @@ my_bool innobase_use_large_pages = FALSE;
my_bool innobase_use_native_aio = FALSE;
my_bool innobase_file_per_table = FALSE;
my_bool innobase_locks_unsafe_for_binlog = FALSE;
+my_bool innobase_rollback_on_timeout = FALSE;
my_bool innobase_create_status_file = FALSE;
static char *internal_innobase_data_file_path = NULL;
@@ -467,6 +467,10 @@ convert_error_code_to_mysql(
latest SQL statement in a lock wait timeout. Previously, we
rolled back the whole transaction. */
+ if (thd && row_rollback_on_timeout) {
+ ha_rollback(thd);
+ }
+
return(HA_ERR_LOCK_WAIT_TIMEOUT);
} else if (error == (int) DB_NO_REFERENCED_ROW) {
@@ -1380,6 +1384,8 @@ innobase_init(void)
os_use_large_pages = (ibool) innobase_use_large_pages;
os_large_page_size = (ulint) innobase_large_page_size;
+ row_rollback_on_timeout = (ibool) innobase_rollback_on_timeout;
+
srv_file_per_table = (ibool) innobase_file_per_table;
srv_locks_unsafe_for_binlog = (ibool) innobase_locks_unsafe_for_binlog;
@@ -2739,7 +2745,6 @@ ha_innobase::store_key_val_for_row(
CHARSET_INFO* cs;
ulint key_len;
- ulint len;
ulint true_len;
int error=0;
ulint blob_len;
@@ -5309,19 +5314,11 @@ ha_innobase::info(
prebuilt->trx->op_info = (char*)
"returning various info to MySQL";
-
- if (ib_table->space != 0) {
- my_snprintf(path, sizeof(path), "%s/%s%s",
- mysql_data_home, ib_table->name,
- ".ibd");
- unpack_filename(path,path);
- } else {
- my_snprintf(path, sizeof(path), "%s/%s%s",
+ my_snprintf(path, sizeof(path), "%s/%s%s",
mysql_data_home, ib_table->name,
reg_ext);
- unpack_filename(path,path);
- }
+ unpack_filename(path,path);
/* Note that we do not know the access time of the table,
nor the CHECK TABLE time, nor the UPDATE or INSERT time. */
@@ -6378,14 +6375,17 @@ innodb_mutex_show_status(
Protocol *protocol= thd->protocol;
List<Item> field_list;
mutex_t* mutex;
+#ifdef UNIV_DEBUG
ulint rw_lock_count= 0;
ulint rw_lock_count_spin_loop= 0;
ulint rw_lock_count_spin_rounds= 0;
ulint rw_lock_count_os_wait= 0;
ulint rw_lock_count_os_yield= 0;
ulonglong rw_lock_wait_time= 0;
+#endif /* UNIV_DEBUG */
DBUG_ENTER("innodb_mutex_show_status");
+#ifdef UNIV_DEBUG
field_list.push_back(new Item_empty_string("Mutex", FN_REFLEN));
field_list.push_back(new Item_empty_string("Module", FN_REFLEN));
field_list.push_back(new Item_uint("Count", 21));
@@ -6394,19 +6394,23 @@ innodb_mutex_show_status(
field_list.push_back(new Item_uint("OS_waits", 21));
field_list.push_back(new Item_uint("OS_yields", 21));
field_list.push_back(new Item_uint("OS_waits_time", 21));
+#else /* UNIV_DEBUG */
+ field_list.push_back(new Item_empty_string("File", FN_REFLEN));
+ field_list.push_back(new Item_uint("Line", 21));
+ field_list.push_back(new Item_uint("OS_waits", 21));
+#endif /* UNIV_DEBUG */
if (protocol->send_fields(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
DBUG_RETURN(TRUE);
-#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
- mutex_enter(&mutex_list_mutex);
-#endif
+ mutex_enter_noninline(&mutex_list_mutex);
mutex = UT_LIST_GET_FIRST(mutex_list);
while ( mutex != NULL )
{
+#ifdef UNIV_DEBUG
if (mutex->mutex_type != 1)
{
if (mutex->count_using > 0)
@@ -6423,9 +6427,7 @@ innodb_mutex_show_status(
if (protocol->write())
{
-#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
- mutex_exit(&mutex_list_mutex);
-#endif
+ mutex_exit_noninline(&mutex_list_mutex);
DBUG_RETURN(1);
}
}
@@ -6439,10 +6441,25 @@ innodb_mutex_show_status(
rw_lock_count_os_yield += mutex->count_os_yield;
rw_lock_wait_time += mutex->lspent_time;
}
+#else /* UNIV_DEBUG */
+ protocol->prepare_for_resend();
+ protocol->store(mutex->cfile_name, system_charset_info);
+ protocol->store((ulonglong)mutex->cline);
+ protocol->store((ulonglong)mutex->count_os_wait);
+
+ if (protocol->write())
+ {
+ mutex_exit_noninline(&mutex_list_mutex);
+ DBUG_RETURN(1);
+ }
+#endif /* UNIV_DEBUG */
mutex = UT_LIST_GET_NEXT(list, mutex);
}
+ mutex_exit_noninline(&mutex_list_mutex);
+
+#ifdef UNIV_DEBUG
protocol->prepare_for_resend();
protocol->store("rw_lock_mutexes", system_charset_info);
protocol->store("", system_charset_info);
@@ -6457,10 +6474,8 @@ innodb_mutex_show_status(
{
DBUG_RETURN(1);
}
+#endif /* UNIV_DEBUG */
-#ifdef MUTEX_PROTECT_TO_BE_ADDED_LATER
- mutex_exit(&mutex_list_mutex);
-#endif
send_eof(thd);
DBUG_RETURN(FALSE);
}
diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h
index 95d7a9437ad..fd0f1ff2a4f 100644
--- a/sql/ha_innodb.h
+++ b/sql/ha_innodb.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -216,6 +215,7 @@ extern my_bool innobase_log_archive,
innobase_use_large_pages,
innobase_use_native_aio,
innobase_file_per_table, innobase_locks_unsafe_for_binlog,
+ innobase_rollback_on_timeout,
innobase_create_status_file;
extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before
calling innobase_end() if you want
diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc
index 19ec1b29da3..495c3f4f78f 100644
--- a/sql/ha_myisam.cc
+++ b/sql/ha_myisam.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_myisam.h b/sql/ha_myisam.h
index f5c45333f50..b186d9c7bb8 100644
--- a/sql/ha_myisam.h
+++ b/sql/ha_myisam.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc
index 5e613a63303..09445f775de 100644
--- a/sql/ha_myisammrg.cc
+++ b/sql/ha_myisammrg.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_myisammrg.h b/sql/ha_myisammrg.h
index e20214fa84f..e546dfee699 100644
--- a/sql/ha_myisammrg.h
+++ b/sql/ha_myisammrg.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 739fae79565..30be53f1ddb 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -822,8 +821,8 @@ int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob,
{
char *buf= m_blobs_buffer + offset;
uint32 len= 0xffffffff; // Max uint32
- DBUG_PRINT("value", ("read blob ptr=%x len=%u",
- (UintPtr)buf, (uint)blob_len));
+ DBUG_PRINT("value", ("read blob ptr: 0x%lx len: %u",
+ (long)buf, (uint)blob_len));
if (ndb_blob->readData(buf, len) != 0)
DBUG_RETURN(-1);
DBUG_ASSERT(len == blob_len);
@@ -1059,6 +1058,7 @@ int ha_ndbcluster::build_index_list(Ndb *ndb, TABLE *tab, enum ILBP phase)
int error= 0;
const char *index_name;
char unique_index_name[FN_LEN];
+ bool null_in_unique_index= false;
static const char* unique_suffix= "$unique";
KEY* key_info= tab->key_info;
const char **key_name= tab->s->keynames.type_names;
@@ -1096,10 +1096,26 @@ int ha_ndbcluster::build_index_list(Ndb *ndb, TABLE *tab, enum ILBP phase)
error= create_unique_index(unique_index_name, key_info);
break;
case UNIQUE_INDEX:
- if (!(error= check_index_fields_not_null(i)))
- error= create_unique_index(unique_index_name, key_info);
+ if (check_index_fields_not_null(i))
+ {
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_NULL_COLUMN_IN_INDEX,
+ "Ndb does not support unique index on NULL valued attributes, index access with NULL value will become full table scan");
+ null_in_unique_index= true;
+ }
+ error= create_unique_index(unique_index_name, key_info);
break;
case ORDERED_INDEX:
+ if (key_info->algorithm == HA_KEY_ALG_HASH)
+ {
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR,
+ ER_UNSUPPORTED_EXTENSION,
+ ER(ER_UNSUPPORTED_EXTENSION),
+ "Ndb does not support non-unique "
+ "hash based indexes");
+ error= HA_ERR_UNSUPPORTED;
+ break;
+ }
error= create_ordered_index(index_name, key_info);
break;
default:
@@ -1129,6 +1145,11 @@ int ha_ndbcluster::build_index_list(Ndb *ndb, TABLE *tab, enum ILBP phase)
m_index[i].unique_index= (void *) index;
error= fix_unique_index_attr_order(m_index[i], index, key_info);
}
+ if (idx_type == UNIQUE_INDEX &&
+ phase != ILBP_CREATE &&
+ check_index_fields_not_null(i))
+ null_in_unique_index= true;
+ m_index[i].null_in_unique_index= null_in_unique_index;
}
DBUG_RETURN(error);
@@ -1150,7 +1171,7 @@ NDB_INDEX_TYPE ha_ndbcluster::get_index_type_from_table(uint inx) const
ORDERED_INDEX);
}
-int ha_ndbcluster::check_index_fields_not_null(uint inx)
+bool ha_ndbcluster::check_index_fields_not_null(uint inx)
{
KEY* key_info= table->key_info + inx;
KEY_PART_INFO* key_part= key_info->key_part;
@@ -1161,14 +1182,10 @@ int ha_ndbcluster::check_index_fields_not_null(uint inx)
{
Field* field= key_part->field;
if (field->maybe_null())
- {
- my_printf_error(ER_NULL_COLUMN_IN_INDEX,ER(ER_NULL_COLUMN_IN_INDEX),
- MYF(0),field->field_name);
- DBUG_RETURN(ER_NULL_COLUMN_IN_INDEX);
- }
+ DBUG_RETURN(true);
}
- DBUG_RETURN(0);
+ DBUG_RETURN(false);
}
void ha_ndbcluster::release_metadata()
@@ -1261,6 +1278,12 @@ inline NDB_INDEX_TYPE ha_ndbcluster::get_index_type(uint idx_no) const
return m_index[idx_no].type;
}
+inline bool ha_ndbcluster::has_null_in_unique_index(uint idx_no) const
+{
+ DBUG_ASSERT(idx_no < MAX_KEY);
+ return m_index[idx_no].null_in_unique_index;
+}
+
/*
Get the flags for an index
@@ -1596,7 +1619,7 @@ bool ha_ndbcluster::check_all_operations_for_error(NdbTransaction *trans,
* primary key or unique index values
*/
-int ha_ndbcluster::peek_indexed_rows(const byte *record)
+int ha_ndbcluster::peek_indexed_rows(const byte *record, bool check_pk)
{
NdbTransaction *trans= m_active_trans;
NdbOperation *op;
@@ -1609,7 +1632,7 @@ int ha_ndbcluster::peek_indexed_rows(const byte *record)
(NdbOperation::LockMode)get_ndb_lock_type(m_lock.type);
first= NULL;
- if (table->s->primary_key != MAX_KEY)
+ if (check_pk && table->s->primary_key != MAX_KEY)
{
/*
* Fetch any row with colliding primary key
@@ -2090,6 +2113,42 @@ int ha_ndbcluster::ordered_index_scan(const key_range *start_key,
}
/*
+ Unique index scan in NDB (full table scan with scan filter)
+ */
+
+int ha_ndbcluster::unique_index_scan(const KEY* key_info,
+ const byte *key,
+ uint key_len,
+ byte *buf)
+{
+ int res;
+ NdbScanOperation *op;
+ NdbTransaction *trans= m_active_trans;
+
+ DBUG_ENTER("unique_index_scan");
+ DBUG_PRINT("enter", ("Starting new scan on %s", m_tabname));
+
+ NdbOperation::LockMode lm=
+ (NdbOperation::LockMode)get_ndb_lock_type(m_lock.type);
+ bool need_pk = (lm == NdbOperation::LM_Read);
+ if (!(op=trans->getNdbScanOperation((const NDBTAB *) m_table)) ||
+ op->readTuples(lm,
+ (need_pk)?NdbScanOperation::SF_KeyInfo:0,
+ parallelism))
+ ERR_RETURN(trans->getNdbError());
+ m_active_cursor= op;
+ if (generate_scan_filter_from_key(op, key_info, key, key_len, buf))
+ DBUG_RETURN(ndb_err(trans));
+ if ((res= define_read_attrs(buf, op)))
+ DBUG_RETURN(res);
+
+ if (execute_no_commit(this,trans,false) != 0)
+ DBUG_RETURN(ndb_err(trans));
+ DBUG_PRINT("exit", ("Scan started successfully"));
+ DBUG_RETURN(next_result(buf));
+}
+
+/*
Start full table scan in NDB
*/
@@ -2166,7 +2225,7 @@ int ha_ndbcluster::write_row(byte *record)
start_bulk_insert will set parameters to ensure that each
write_row is committed individually
*/
- int peek_res= peek_indexed_rows(record);
+ int peek_res= peek_indexed_rows(record, true);
if (!peek_res)
{
@@ -2335,8 +2394,26 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
NdbScanOperation* cursor= m_active_cursor;
NdbOperation *op;
uint i;
+ bool pk_update= (table->s->primary_key != MAX_KEY &&
+ key_cmp(table->s->primary_key, old_data, new_data));
DBUG_ENTER("update_row");
+ /*
+ * If IGNORE the ignore constraint violations on primary and unique keys,
+ * but check that it is not part of INSERT ... ON DUPLICATE KEY UPDATE
+ */
+ if (m_ignore_dup_key && thd->lex->sql_command == SQLCOM_UPDATE)
+ {
+ int peek_res= peek_indexed_rows(new_data, pk_update);
+
+ if (!peek_res)
+ {
+ DBUG_RETURN(HA_ERR_FOUND_DUPP_KEY);
+ }
+ if (peek_res != HA_ERR_KEY_NOT_FOUND)
+ DBUG_RETURN(peek_res);
+ }
+
statistic_increment(thd->status_var.ha_update_count, &LOCK_status);
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
{
@@ -2346,8 +2423,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data)
}
/* Check for update of primary key for special handling */
- if ((table->s->primary_key != MAX_KEY) &&
- (key_cmp(table->s->primary_key, old_data, new_data)))
+ if (pk_update)
{
int read_res, insert_res, delete_res, undo_res;
@@ -2763,7 +2839,7 @@ int ha_ndbcluster::index_read(byte *buf,
}
else if (type == UNIQUE_INDEX)
{
- DBUG_RETURN(1);
+ DBUG_RETURN(unique_index_scan(key_info, key, key_len, buf));
}
break;
case ORDERED_INDEX:
@@ -2856,12 +2932,13 @@ int ha_ndbcluster::read_range_first_to_buf(const key_range *start_key,
bool eq_r, bool sorted,
byte* buf)
{
- KEY* key_info;
+ ndb_index_type type= get_index_type(active_index);
+KEY* key_info;
int error= 1;
DBUG_ENTER("ha_ndbcluster::read_range_first_to_buf");
DBUG_PRINT("info", ("eq_r: %d, sorted: %d", eq_r, sorted));
- switch (get_index_type(active_index)){
+ switch (type){
case PRIMARY_KEY_ORDERED_INDEX:
case PRIMARY_KEY_INDEX:
key_info= table->key_info + active_index;
@@ -2887,6 +2964,11 @@ int ha_ndbcluster::read_range_first_to_buf(const key_range *start_key,
error= unique_index_read(start_key->key, start_key->length, buf);
DBUG_RETURN(error == HA_ERR_KEY_NOT_FOUND ? HA_ERR_END_OF_FILE : error);
}
+ else if (type == UNIQUE_INDEX)
+ DBUG_RETURN(unique_index_scan(key_info,
+ start_key->key,
+ start_key->length,
+ buf));
break;
default:
break;
@@ -3062,20 +3144,26 @@ void ha_ndbcluster::position(const byte *record)
size_t len = key_part->length;
const byte * ptr = record + key_part->offset;
Field *field = key_part->field;
- if ((field->type() == MYSQL_TYPE_VARCHAR) &&
- ((Field_varstring*)field)->length_bytes == 1)
+ if (field->type() == MYSQL_TYPE_VARCHAR)
{
- /**
- * Keys always use 2 bytes length
- */
- buff[0] = ptr[0];
- buff[1] = 0;
- memcpy(buff+2, ptr + 1, len);
- len += 2;
+ if (((Field_varstring*)field)->length_bytes == 1)
+ {
+ /**
+ * Keys always use 2 bytes length
+ */
+ buff[0] = ptr[0];
+ buff[1] = 0;
+ memcpy(buff+2, ptr + 1, len);
+ }
+ else
+ {
+ memcpy(buff, ptr, len + 2);
+ }
+ len += 2;
}
else
{
- memcpy(buff, ptr, len);
+ memcpy(buff, ptr, len);
}
buff += len;
}
@@ -4097,19 +4185,29 @@ static int create_ndb_column(NDBCOL &col,
col.setType(NDBCOL::Text);
col.setCharset(cs);
}
- // Use "<=" even if "<" is the exact condition
- if (field->max_length() <= (1 << 8))
- goto mysql_type_tiny_blob;
- else if (field->max_length() <= (1 << 16))
{
- col.setInlineSize(256);
- col.setPartSize(2000);
- col.setStripeSize(16);
+ Field_blob *field_blob= (Field_blob *)field;
+ /*
+ * max_data_length is 2^8-1, 2^16-1, 2^24-1 for tiny, blob, medium.
+ * Tinyblob gets no blob parts. The other cases are just a crude
+ * way to control part size and striping.
+ *
+ * In mysql blob(256) is promoted to blob(65535) so it does not
+ * in fact fit "inline" in NDB.
+ */
+ if (field_blob->max_data_length() < (1 << 8))
+ goto mysql_type_tiny_blob;
+ else if (field_blob->max_data_length() < (1 << 16))
+ {
+ col.setInlineSize(256);
+ col.setPartSize(2000);
+ col.setStripeSize(16);
+ }
+ else if (field_blob->max_data_length() < (1 << 24))
+ goto mysql_type_medium_blob;
+ else
+ goto mysql_type_long_blob;
}
- else if (field->max_length() <= (1 << 24))
- goto mysql_type_medium_blob;
- else
- goto mysql_type_long_blob;
break;
mysql_type_medium_blob:
case MYSQL_TYPE_MEDIUM_BLOB:
@@ -6036,7 +6134,7 @@ ndb_get_table_statistics(ha_ndbcluster* file, bool report_error, Ndb* ndb,
retry:
if(report_error)
{
- if (file)
+ if (file && pTrans)
{
reterr= file->ndb_err(pTrans);
}
@@ -6117,6 +6215,30 @@ ha_ndbcluster::release_completed_operations(NdbTransaction *trans,
trans->releaseCompletedOperations();
}
+bool
+ha_ndbcluster::null_value_index_search(KEY_MULTI_RANGE *ranges,
+ KEY_MULTI_RANGE *end_range,
+ HANDLER_BUFFER *buffer)
+{
+ DBUG_ENTER("null_value_index_search");
+ KEY* key_info= table->key_info + active_index;
+ KEY_MULTI_RANGE *range= ranges;
+ ulong reclength= table->s->reclength;
+ byte *curr= (byte*)buffer->buffer;
+ byte *end_of_buffer= (byte*)buffer->buffer_end;
+
+ for (; range<end_range && curr+reclength <= end_of_buffer;
+ range++)
+ {
+ const byte *key= range->start_key.key;
+ uint key_len= range->start_key.length;
+ if (check_null_in_key(key_info, key, key_len))
+ DBUG_RETURN(true);
+ curr += reclength;
+ }
+ DBUG_RETURN(false);
+}
+
int
ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
KEY_MULTI_RANGE *ranges,
@@ -6133,11 +6255,14 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
NdbOperation* op;
Thd_ndb *thd_ndb= get_thd_ndb(current_thd);
- if (uses_blob_value(m_retrieve_all_fields))
+ /**
+ * blobs and unique hash index with NULL can't be batched currently
+ */
+ if (uses_blob_value(m_retrieve_all_fields) ||
+ (index_type == UNIQUE_INDEX &&
+ has_null_in_unique_index(active_index) &&
+ null_value_index_search(ranges, ranges+range_count, buffer)))
{
- /**
- * blobs can't be batched currently
- */
m_disable_multi_read= TRUE;
DBUG_RETURN(handler::read_multi_range_first(found_range_p,
ranges,
@@ -6193,7 +6318,6 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
goto range;
/* fall through */
case PRIMARY_KEY_INDEX:
- {
multi_range_curr->range_flag |= UNIQUE_RANGE;
if ((op= m_active_trans->getNdbOperation(tab)) &&
!op->readTuple(lm) &&
@@ -6204,8 +6328,6 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
else
ERR_RETURN(op ? op->getNdbError() : m_active_trans->getNdbError());
break;
- }
- break;
case UNIQUE_ORDERED_INDEX:
if (!(multi_range_curr->start_key.length == key_info->key_length &&
multi_range_curr->start_key.flag == HA_READ_KEY_EXACT &&
@@ -6214,18 +6336,16 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
goto range;
/* fall through */
case UNIQUE_INDEX:
- {
multi_range_curr->range_flag |= UNIQUE_RANGE;
if ((op= m_active_trans->getNdbIndexOperation(unique_idx, tab)) &&
- !op->readTuple(lm) &&
- !set_index_key(op, key_info, multi_range_curr->start_key.key) &&
- !define_read_attrs(curr, op) &&
- (op->setAbortOption(AO_IgnoreError), TRUE))
- curr += reclength;
+ !op->readTuple(lm) &&
+ !set_index_key(op, key_info, multi_range_curr->start_key.key) &&
+ !define_read_attrs(curr, op) &&
+ (op->setAbortOption(AO_IgnoreError), TRUE))
+ curr += reclength;
else
- ERR_RETURN(op ? op->getNdbError() : m_active_trans->getNdbError());
+ ERR_RETURN(op ? op->getNdbError() : m_active_trans->getNdbError());
break;
- }
case ORDERED_INDEX:
{
range:
@@ -7968,31 +8088,12 @@ ha_ndbcluster::generate_scan_filter(Ndb_cond_stack *ndb_cond_stack,
NdbScanOperation *op)
{
DBUG_ENTER("generate_scan_filter");
+
if (ndb_cond_stack)
{
- DBUG_PRINT("info", ("Generating scan filter"));
NdbScanFilter filter(op);
- bool multiple_cond= FALSE;
- // Wrap an AND group around multiple conditions
- if (ndb_cond_stack->next) {
- multiple_cond= TRUE;
- if (filter.begin() == -1)
- DBUG_RETURN(1);
- }
- for (Ndb_cond_stack *stack= ndb_cond_stack;
- (stack);
- stack= stack->next)
- {
- Ndb_cond *cond= stack->ndb_cond;
-
- if (build_scan_filter(cond, &filter))
- {
- DBUG_PRINT("info", ("build_scan_filter failed"));
- DBUG_RETURN(1);
- }
- }
- if (multiple_cond && filter.end() == -1)
- DBUG_RETURN(1);
+
+ DBUG_RETURN(generate_scan_filter_from_cond(ndb_cond_stack, filter));
}
else
{
@@ -8003,6 +8104,88 @@ ha_ndbcluster::generate_scan_filter(Ndb_cond_stack *ndb_cond_stack,
}
int
+ha_ndbcluster::generate_scan_filter_from_cond(Ndb_cond_stack *ndb_cond_stack,
+ NdbScanFilter& filter)
+{
+ DBUG_ENTER("generate_scan_filter_from_cond");
+ bool multiple_cond= FALSE;
+
+ DBUG_PRINT("info", ("Generating scan filter"));
+ // Wrap an AND group around multiple conditions
+ if (ndb_cond_stack->next)
+ {
+ multiple_cond= TRUE;
+ if (filter.begin() == -1)
+ DBUG_RETURN(1);
+ }
+ for (Ndb_cond_stack *stack= ndb_cond_stack;
+ (stack);
+ stack= stack->next)
+ {
+ Ndb_cond *cond= stack->ndb_cond;
+
+ if (build_scan_filter(cond, &filter))
+ {
+ DBUG_PRINT("info", ("build_scan_filter failed"));
+ DBUG_RETURN(1);
+ }
+ }
+ if (multiple_cond && filter.end() == -1)
+ DBUG_RETURN(1);
+
+ DBUG_RETURN(0);
+}
+
+int ha_ndbcluster::generate_scan_filter_from_key(NdbScanOperation *op,
+ const KEY* key_info,
+ const byte *key,
+ uint key_len,
+ byte *buf)
+{
+ KEY_PART_INFO* key_part= key_info->key_part;
+ KEY_PART_INFO* end= key_part+key_info->key_parts;
+ NdbScanFilter filter(op);
+ int res;
+
+ DBUG_ENTER("generate_scan_filter_from_key");
+ filter.begin(NdbScanFilter::AND);
+ for (; key_part != end; key_part++)
+ {
+ Field* field= key_part->field;
+ uint32 pack_len= field->pack_length();
+ const byte* ptr= key;
+ char buf[256];
+ DBUG_PRINT("info", ("Filtering value for %s", field->field_name));
+ DBUG_DUMP("key", (char*)ptr, pack_len);
+ if (key_part->null_bit)
+ {
+ DBUG_PRINT("info", ("Generating ISNULL filter"));
+ if (filter.isnull(key_part->fieldnr-1) == -1)
+ DBUG_RETURN(1);
+ }
+ else
+ {
+ DBUG_PRINT("info", ("Generating EQ filter"));
+ if (filter.cmp(NdbScanFilter::COND_EQ,
+ key_part->fieldnr-1,
+ ptr,
+ pack_len) == -1)
+ DBUG_RETURN(1);
+ }
+ key += key_part->store_length;
+ }
+ // Add any pushed condition
+ if (m_cond_stack &&
+ (res= generate_scan_filter_from_cond(m_cond_stack, filter)))
+ DBUG_RETURN(res);
+
+ if (filter.end() == -1)
+ DBUG_RETURN(1);
+
+ DBUG_RETURN(0);
+}
+
+int
ndbcluster_show_status(THD* thd)
{
Protocol *protocol= thd->protocol;
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index d0f7c020184..274dc53e547 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -56,6 +55,7 @@ typedef struct ndb_index_data {
void *index;
void *unique_index;
unsigned char *unique_index_attrid_map;
+ bool null_in_unique_index;
} NDB_INDEX_DATA;
typedef struct st_ndbcluster_share {
@@ -546,7 +546,9 @@ class ha_ndbcluster: public handler
KEY_MULTI_RANGE*ranges, uint range_count,
bool sorted, HANDLER_BUFFER *buffer);
int read_multi_range_next(KEY_MULTI_RANGE **found_range_p);
-
+ bool null_value_index_search(KEY_MULTI_RANGE *ranges,
+ KEY_MULTI_RANGE *end_range,
+ HANDLER_BUFFER *buffer);
bool get_error_message(int error, String *buf);
int info(uint);
int extra(enum ha_extra_function operation);
@@ -649,7 +651,8 @@ private:
void release_metadata();
NDB_INDEX_TYPE get_index_type(uint idx_no) const;
NDB_INDEX_TYPE get_index_type_from_table(uint index_no) const;
- int check_index_fields_not_null(uint index_no);
+ bool has_null_in_unique_index(uint idx_no) const;
+ bool check_index_fields_not_null(uint index_no);
int pk_read(const byte *key, uint key_len, byte *buf);
int complemented_pk_read(const byte *old_data, byte *new_data);
@@ -657,12 +660,17 @@ private:
const NdbOperation *first,
const NdbOperation *last,
uint errcode);
- int peek_indexed_rows(const byte *record);
+ int peek_indexed_rows(const byte *record, bool check_pk);
int unique_index_read(const byte *key, uint key_len,
byte *buf);
int ordered_index_scan(const key_range *start_key,
const key_range *end_key,
bool sorted, bool descending, byte* buf);
+ int unique_index_scan(const KEY* key_info,
+ const byte *key,
+ uint key_len,
+ byte *buf);
+
int full_table_scan(byte * buf);
int fetch_next(NdbScanOperation* op);
int next_result(byte *buf);
@@ -725,6 +733,13 @@ bool uses_blob_value(bool all_fields);
int build_scan_filter(Ndb_cond* &cond, NdbScanFilter* filter);
int generate_scan_filter(Ndb_cond_stack* cond_stack,
NdbScanOperation* op);
+ int generate_scan_filter_from_cond(Ndb_cond_stack* cond_stack,
+ NdbScanFilter& filter);
+ int generate_scan_filter_from_key(NdbScanOperation* op,
+ const KEY* key_info,
+ const byte *key,
+ uint key_len,
+ byte *buf);
friend int execute_commit(ha_ndbcluster*, NdbTransaction*);
friend int execute_no_commit(ha_ndbcluster*, NdbTransaction*, bool);
diff --git a/sql/handler.cc b/sql/handler.cc
index 3f0411d6198..c836c949f3a 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -474,7 +473,6 @@ int ha_init()
{
int error= 0;
handlerton **types;
- show_table_alias_st *table_alias;
total_ha= savepoint_alloc_size= 0;
if (ha_init_errors())
@@ -885,8 +883,8 @@ int ha_commit_or_rollback_by_xid(XID *xid, bool commit)
if ((*types)->state == SHOW_OPTION_YES && (*types)->recover)
{
if ((*(commit ? (*types)->commit_by_xid :
- (*types)->rollback_by_xid))(xid));
- res= 0;
+ (*types)->rollback_by_xid))(xid))
+ res= 0;
}
}
return res;
@@ -1779,7 +1777,7 @@ void handler::print_error(int error, myf errflag)
{
/* Key is unknown */
str.copy("", 0, system_charset_info);
- key_nr= -1;
+ key_nr= (uint) -1;
}
else
{
@@ -1982,6 +1980,10 @@ int handler::check_old_types()
{
return HA_ADMIN_NEEDS_ALTER;
}
+ if ((*field)->type() == MYSQL_TYPE_VAR_STRING)
+ {
+ return HA_ADMIN_NEEDS_ALTER;
+ }
}
}
return 0;
diff --git a/sql/handler.h b/sql/handler.h
index e474eac8cb1..9e381ca4482 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000,2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/hash_filo.cc b/sql/hash_filo.cc
index ec200768222..9303120e18a 100644
--- a/sql/hash_filo.cc
+++ b/sql/hash_filo.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/hash_filo.h b/sql/hash_filo.h
index fc48c3b1540..c25af67b572 100644
--- a/sql/hash_filo.h
+++ b/sql/hash_filo.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/hostname.cc b/sql/hostname.cc
index c5c337080cf..3b5f3adf88a 100644
--- a/sql/hostname.cc
+++ b/sql/hostname.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/init.cc b/sql/init.cc
index e53eeab8902..25856a1e1b4 100644
--- a/sql/init.cc
+++ b/sql/init.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item.cc b/sql/item.cc
index 59d28c00416..d73be7206d6 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -276,7 +275,6 @@ my_decimal *Item::val_decimal_from_date(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
TIME ltime;
- longlong date;
if (get_date(&ltime, TIME_FUZZY_DATE))
{
my_decimal_set_zero(decimal_value);
@@ -290,7 +288,6 @@ my_decimal *Item::val_decimal_from_time(my_decimal *decimal_value)
{
DBUG_ASSERT(fixed == 1);
TIME ltime;
- longlong date;
if (get_time(&ltime))
{
my_decimal_set_zero(decimal_value);
@@ -2175,12 +2172,6 @@ void Item_string::print(String *str)
}
-inline bool check_if_only_end_space(CHARSET_INFO *cs, char *str, char *end)
-{
- return str+ cs->cset->scan(cs, str, end, MY_SEQ_SPACES) == end;
-}
-
-
double Item_string::val_real()
{
DBUG_ASSERT(fixed == 1);
@@ -3707,6 +3698,8 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
Item** res= find_item_in_list(this, thd->lex->current_select->item_list,
&counter, REPORT_EXCEPT_NOT_FOUND,
&not_used);
+ if (!res)
+ return 1;
if (res != (Item **)not_found_item)
{
if ((*res)->type() == Item::FIELD_ITEM)
@@ -4560,18 +4553,31 @@ my_decimal *Item_hex_string::val_decimal(my_decimal *decimal_value)
int Item_hex_string::save_in_field(Field *field, bool no_conversions)
{
- int error;
field->set_notnull();
if (field->result_type() == STRING_RESULT)
+ return field->store(str_value.ptr(), str_value.length(),
+ collation.collation);
+
+ ulonglong nr;
+ uint32 length= str_value.length();
+ if (length > 8)
{
- error=field->store(str_value.ptr(),str_value.length(),collation.collation);
+ nr= field->flags & UNSIGNED_FLAG ? ULONGLONG_MAX : LONGLONG_MAX;
+ goto warn;
}
- else
+ nr= (ulonglong) val_int();
+ if ((length == 8) && !(field->flags & UNSIGNED_FLAG) && (nr > LONGLONG_MAX))
{
- longlong nr=val_int();
- error=field->store(nr, TRUE); // Assume hex numbers are unsigned
+ nr= LONGLONG_MAX;
+ goto warn;
}
- return error;
+ return field->store((longlong) nr, TRUE); // Assume hex numbers are unsigned
+
+warn:
+ if (!field->store((longlong) nr, TRUE))
+ field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE,
+ 1);
+ return 1;
}
@@ -4764,6 +4770,22 @@ bool Item_field::send(Protocol *protocol, String *buffer)
}
+void Item_field::update_null_value()
+{
+ /*
+ need to set no_errors to prevent warnings about type conversion
+ popping up.
+ */
+ THD *thd= field->table->in_use;
+ int no_errors;
+
+ no_errors= thd->no_errors;
+ thd->no_errors= 1;
+ Item::update_null_value();
+ thd->no_errors= no_errors;
+}
+
+
Item_ref::Item_ref(Name_resolution_context *context_arg,
Item **item, const char *table_name_arg,
const char *field_name_arg)
@@ -5479,6 +5501,7 @@ int Item_default_value::save_in_field(Field *field_arg, bool no_conversions)
ER(ER_NO_DEFAULT_FOR_FIELD),
field_arg->field_name);
}
+ field_arg->set_default();
return 1;
}
field_arg->set_default();
@@ -5646,7 +5669,7 @@ void Item_trigger_field::set_required_privilege(bool rw)
}
-bool Item_trigger_field::set_value(THD *thd, sp_rcontext */*ctx*/, Item **it)
+bool Item_trigger_field::set_value(THD *thd, sp_rcontext * /*ctx*/, Item **it)
{
Item *item= sp_prepare_func_item(thd, it);
@@ -6120,7 +6143,7 @@ bool Item_cache_row::null_inside()
}
else
{
- values[i]->val_int();
+ values[i]->update_null_value();
if (values[i]->null_value)
return 1;
}
diff --git a/sql/item.h b/sql/item.h
index 63d89113ec1..c7c1218d3e9 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000-2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -337,23 +336,18 @@ public:
{
save_table_list= context->table_list;
save_first_name_resolution_table= context->first_name_resolution_table;
- save_next_name_resolution_table= (context->first_name_resolution_table) ?
- context->first_name_resolution_table->
- next_name_resolution_table :
- NULL;
save_resolve_in_select_list= context->resolve_in_select_list;
save_next_local= table_list->next_local;
+ save_next_name_resolution_table= table_list->next_name_resolution_table;
}
/* Restore a name resolution context from saved state. */
void restore_state(Name_resolution_context *context, TABLE_LIST *table_list)
{
table_list->next_local= save_next_local;
+ table_list->next_name_resolution_table= save_next_name_resolution_table;
context->table_list= save_table_list;
context->first_name_resolution_table= save_first_name_resolution_table;
- if (context->first_name_resolution_table)
- context->first_name_resolution_table->
- next_name_resolution_table= save_next_name_resolution_table;
context->resolve_in_select_list= save_resolve_in_select_list;
}
};
@@ -704,6 +698,11 @@ public:
virtual bool is_null() { return 0; }
/*
+ Make sure the null_value member has a correct value.
+ */
+ virtual void update_null_value () { (void) val_int(); }
+
+ /*
Inform the item that there will be no distinction between its result
being FALSE or NULL.
@@ -1270,6 +1269,7 @@ public:
bool get_date_result(TIME *ltime,uint fuzzydate);
bool get_time(TIME *ltime);
bool is_null() { return field->is_null(); }
+ void update_null_value();
Item *get_tmp_table_item(THD *thd);
bool collect_item_field_processor(byte * arg);
bool find_item_in_field_list_processor(byte *arg);
diff --git a/sql/item_buff.cc b/sql/item_buff.cc
index 37f9ca7ce6c..c162b84f457 100644
--- a/sql/item_buff.cc
+++ b/sql/item_buff.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 29fa049b6c4..936ae04e93d 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000-2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -2990,7 +2989,7 @@ longlong Item_func_isnull::val_int()
Handle optimization if the argument can't be null
This has to be here because of the test in update_used_tables().
*/
- if (!used_tables_cache)
+ if (!used_tables_cache && !with_subselect)
return cached_value;
return args[0]->is_null() ? 1: 0;
}
@@ -2999,7 +2998,7 @@ longlong Item_is_not_null_test::val_int()
{
DBUG_ASSERT(fixed == 1);
DBUG_ENTER("Item_is_not_null_test::val_int");
- if (!used_tables_cache)
+ if (!used_tables_cache && !with_subselect)
{
owner->was_null|= (!cached_value);
DBUG_PRINT("info", ("cached :%ld", (long) cached_value));
@@ -3026,7 +3025,7 @@ void Item_is_not_null_test::update_used_tables()
else
{
args[0]->update_used_tables();
- if (!(used_tables_cache=args[0]->used_tables()))
+ if (!(used_tables_cache=args[0]->used_tables()) && !with_subselect)
{
/* Remember if the value is always NULL or never NULL */
cached_value= (longlong) !args[0]->is_null();
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index acad1e51bc9..7bdc90adcee 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1028,7 +1027,8 @@ public:
else
{
args[0]->update_used_tables();
- if ((const_item_cache= !(used_tables_cache= args[0]->used_tables())))
+ if ((const_item_cache= !(used_tables_cache= args[0]->used_tables())) &&
+ !with_subselect)
{
/* Remember if the value is always NULL or never NULL */
cached_value= (longlong) args[0]->is_null();
diff --git a/sql/item_create.cc b/sql/item_create.cc
index e0e18094705..c1a81da0285 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_create.h b/sql/item_create.h
index cf61f90f91d..2ff849263c6 100644
--- a/sql/item_create.h
+++ b/sql/item_create.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 6bbb199a52b..1ef77208469 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -900,7 +899,8 @@ void Item_func_signed::print(String *str)
longlong Item_func_signed::val_int_from_str(int *error)
{
- char buff[MAX_FIELD_WIDTH], *end;
+ char buff[MAX_FIELD_WIDTH], *end, *start;
+ uint32 length;
String tmp(buff,sizeof(buff), &my_charset_bin), *res;
longlong value;
@@ -916,13 +916,21 @@ longlong Item_func_signed::val_int_from_str(int *error)
return 0;
}
null_value= 0;
- end= (char*) res->ptr()+ res->length();
- value= my_strtoll10(res->ptr(), &end, error);
- if (*error > 0 || end != res->ptr()+ res->length())
+ start= (char *)res->ptr();
+ length= res->length();
+
+ end= start + length;
+ value= my_strtoll10(start, &end, error);
+ if (*error > 0 || end != start+ length)
+ {
+ char err_buff[128];
+ String err_tmp(err_buff,(uint32) sizeof(err_buff), system_charset_info);
+ err_tmp.copy(start, length, system_charset_info);
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE,
ER(ER_TRUNCATED_WRONG_VALUE), "INTEGER",
- res->c_ptr());
+ err_tmp.c_ptr());
+ }
return value;
}
@@ -1333,6 +1341,10 @@ longlong Item_func_mod::int_op()
signal_divide_by_null();
return 0;
}
+
+ if (args[0]->unsigned_flag)
+ return ((ulonglong) value) % val2;
+
return value % val2;
}
@@ -2333,7 +2345,7 @@ longlong Item_func_locate::val_int()
return 0;
/* start is now sufficiently valid to pass to charpos function */
- start= a->charpos(start);
+ start= a->charpos((int) start);
if (start + b->length() > a->length())
return 0;
@@ -2343,7 +2355,8 @@ longlong Item_func_locate::val_int()
return start + 1;
if (!cmp_collation.collation->coll->instr(cmp_collation.collation,
- a->ptr()+start, a->length()-start,
+ a->ptr()+start,
+ (uint) (a->length()-start),
b->ptr(), b->length(),
&match, 1))
return 0;
@@ -2703,39 +2716,47 @@ udf_handler::fix_fields(THD *thd, Item_result_field *func,
char *to=num_buffer;
for (uint i=0; i < arg_count; i++)
{
- f_args.args[i]=0;
+ /*
+ For a constant argument i, args->args[i] points to the argument value.
+ For non-constant, args->args[i] is NULL.
+ */
+ f_args.args[i]= NULL; /* Non-const unless updated below. */
+
f_args.lengths[i]= arguments[i]->max_length;
f_args.maybe_null[i]= (char) arguments[i]->maybe_null;
f_args.attributes[i]= arguments[i]->name;
f_args.attribute_lengths[i]= arguments[i]->name_length;
- switch(arguments[i]->type()) {
- case Item::STRING_ITEM: // Constant string !
+ if (arguments[i]->const_item())
{
- String *res=arguments[i]->val_str(&buffers[i]);
- if (arguments[i]->null_value)
- continue;
- f_args.args[i]= (char*) res->ptr();
- break;
- }
- case Item::INT_ITEM:
- *((longlong*) to) = arguments[i]->val_int();
- if (!arguments[i]->null_value)
- {
- f_args.args[i]=to;
- to+= ALIGN_SIZE(sizeof(longlong));
- }
- break;
- case Item::REAL_ITEM:
- *((double*) to)= arguments[i]->val_real();
- if (!arguments[i]->null_value)
- {
- f_args.args[i]=to;
- to+= ALIGN_SIZE(sizeof(double));
- }
- break;
- default: // Skip these
- break;
+ if (arguments[i]->null_value)
+ continue;
+
+ switch (arguments[i]->result_type())
+ {
+ case STRING_RESULT:
+ case DECIMAL_RESULT:
+ {
+ String *res= arguments[i]->val_str(&buffers[i]);
+ f_args.args[i]= (char*) res->ptr();
+ break;
+ }
+ case INT_RESULT:
+ *((longlong*) to)= arguments[i]->val_int();
+ f_args.args[i]= to;
+ to+= ALIGN_SIZE(sizeof(longlong));
+ break;
+ case REAL_RESULT:
+ *((double*) to)= arguments[i]->val_real();
+ f_args.args[i]= to;
+ to+= ALIGN_SIZE(sizeof(double));
+ break;
+ case ROW_RESULT:
+ default:
+ // This case should never be chosen
+ DBUG_ASSERT(0);
+ break;
+ }
}
}
thd->net.last_error[0]=0;
@@ -3367,7 +3388,11 @@ longlong Item_func_release_lock::val_int()
}
else
{
+#ifdef EMBEDDED_LIBRARY
+ if (ull->locked && pthread_equal(current_thd->real_id,ull->thread))
+#else
if (ull->locked && pthread_equal(pthread_self(),ull->thread))
+#endif
{
result=1; // Release is ok
item_user_lock_release(ull);
@@ -3663,8 +3688,9 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, uint length,
char *pos= (char*) entry+ ALIGN_SIZE(sizeof(user_var_entry));
if (entry->value == pos)
entry->value=0;
- if (!(entry->value=(char*) my_realloc(entry->value, length,
- MYF(MY_ALLOW_ZERO_PTR))))
+ entry->value= (char*) my_realloc(entry->value, length,
+ MYF(MY_ALLOW_ZERO_PTR | MY_WME));
+ if (!entry->value)
return 1;
}
}
@@ -4031,6 +4057,105 @@ void Item_func_set_user_var::make_field(Send_field *tmp_field)
Item::make_field(tmp_field);
}
+
+/*
+ Save the value of a user variable into a field
+
+ SYNOPSIS
+ save_in_field()
+ field target field to save the value to
+ no_conversion flag indicating whether conversions are allowed
+
+ DESCRIPTION
+ Save the function value into a field and update the user variable
+ accordingly. If a result field is defined and the target field doesn't
+ coincide with it then the value from the result field will be used as
+ the new value of the user variable.
+
+ The reason to have this method rather than simply using the result
+ field in the val_xxx() methods is that the value from the result field
+ not always can be used when the result field is defined.
+ Let's consider the following cases:
+ 1) when filling a tmp table the result field is defined but the value of it
+ is undefined because it has to be produced yet. Thus we can't use it.
+ 2) on execution of an INSERT ... SELECT statement the save_in_field()
+ function will be called to fill the data in the new record. If the SELECT
+ part uses a tmp table then the result field is defined and should be
+ used in order to get the correct result.
+
+ The difference between the SET_USER_VAR function and regular functions
+ like CONCAT is that the Item_func objects for the regular functions are
+ replaced by Item_field objects after the values of these functions have
+ been stored in a tmp table. Yet an object of the Item_field class cannot
+ be used to update a user variable.
+ Due to this we have to handle the result field in a special way here and
+ in the Item_func_set_user_var::send() function.
+
+ RETURN VALUES
+ FALSE Ok
+ TRUE Error
+*/
+
+int Item_func_set_user_var::save_in_field(Field *field, bool no_conversions)
+{
+ bool use_result_field= (result_field && result_field != field);
+ int error;
+
+ /* Update the value of the user variable */
+ check(use_result_field);
+ update();
+
+ if (result_type() == STRING_RESULT ||
+ result_type() == REAL_RESULT &&
+ field->result_type() == STRING_RESULT)
+ {
+ String *result;
+ CHARSET_INFO *cs= collation.collation;
+ char buff[MAX_FIELD_WIDTH]; // Alloc buffer for small columns
+ str_value.set_quick(buff, sizeof(buff), cs);
+ result= entry->val_str(&null_value, &str_value, decimals);
+
+ if (null_value)
+ {
+ str_value.set_quick(0, 0, cs);
+ return set_field_to_null_with_conversions(field, no_conversions);
+ }
+
+ /* NOTE: If null_value == FALSE, "result" must be not NULL. */
+
+ field->set_notnull();
+ error=field->store(result->ptr(),result->length(),cs);
+ str_value.set_quick(0, 0, cs);
+ }
+ else if (result_type() == REAL_RESULT)
+ {
+ double nr= entry->val_real(&null_value);
+ if (null_value)
+ return set_field_to_null(field);
+ field->set_notnull();
+ error=field->store(nr);
+ }
+ else if (result_type() == DECIMAL_RESULT)
+ {
+ my_decimal decimal_value;
+ my_decimal *value= entry->val_decimal(&null_value, &decimal_value);
+ if (null_value)
+ return set_field_to_null(field);
+ field->set_notnull();
+ error=field->store_decimal(value);
+ }
+ else
+ {
+ longlong nr= entry->val_int(&null_value);
+ if (null_value)
+ return set_field_to_null_with_conversions(field, no_conversions);
+ field->set_notnull();
+ error=field->store(nr, unsigned_flag);
+ }
+ return error;
+}
+
+
String *
Item_func_get_user_var::val_str(String *str)
{
@@ -4288,7 +4413,7 @@ bool Item_func_get_user_var::eq(const Item *item, bool binary_cmp) const
bool Item_func_get_user_var::set_value(THD *thd,
- sp_rcontext */*ctx*/, Item **it)
+ sp_rcontext * /*ctx*/, Item **it)
{
Item_func_set_user_var *suv= new Item_func_set_user_var(get_name(), *it);
/*
diff --git a/sql/item_func.h b/sql/item_func.h
index 9d94bc85d2c..68591f9c6f5 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -157,7 +156,7 @@ public:
return (null_value=args[0]->get_time(ltime));
}
bool is_null() {
- (void) val_int(); /* Discard result. It sets null_value as side-effect. */
+ update_null_value();
return null_value;
}
void signal_divide_by_null();
@@ -241,7 +240,7 @@ public:
virtual double real_op()= 0;
virtual my_decimal *decimal_op(my_decimal *)= 0;
virtual String *str_op(String *)= 0;
- bool is_null() { (void) val_real(); return null_value; }
+ bool is_null() { update_null_value(); return null_value; }
};
/* function where type of result detected by first argument */
@@ -1189,6 +1188,7 @@ public:
void print(String *str);
void print_as_stmt(String *str);
const char *func_name() const { return "set_user_var"; }
+ int save_in_field(Field *field, bool no_conversions);
};
@@ -1292,7 +1292,7 @@ public:
Item_func_inet_aton(Item *a) :Item_int_func(a) {}
longlong val_int();
const char *func_name() const { return "inet_aton"; }
- void fix_length_and_dec() { decimals = 0; max_length = 21; maybe_null=1;}
+ void fix_length_and_dec() { decimals = 0; max_length = 21; maybe_null=1;unsigned_flag=1;}
};
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index c5200e26cb7..676b3bc9b36 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 4848f59301d..4fb379fdda7 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_row.cc b/sql/item_row.cc
index d7591b9865d..c037c092d89 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_row.h b/sql/item_row.h
index d6dd4371372..bd47558a2f6 100644
--- a/sql/item_row.h
+++ b/sql/item_row.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index e8d46293065..f98a14d2cc6 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -983,8 +982,8 @@ String *Item_func_insert::val_str(String *str)
length= res->length() + 1;
/* start and length are now sufficiently valid to pass to charpos function */
- start= res->charpos(start);
- length= res->charpos(length, start);
+ start= res->charpos((int) start);
+ length= res->charpos((int) length, (uint32) start);
/* Re-testing with corrected params */
if (start > res->length() + 1)
@@ -992,8 +991,8 @@ String *Item_func_insert::val_str(String *str)
if (length > res->length() - start)
length= res->length() - start;
- if (res->length() - length + res2->length() >
- current_thd->variables.max_allowed_packet)
+ if ((ulonglong) (res->length() - length + res2->length()) >
+ (ulonglong) current_thd->variables.max_allowed_packet)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
@@ -1002,7 +1001,7 @@ String *Item_func_insert::val_str(String *str)
goto null;
}
res=copy_if_not_alloced(str,res,res->length());
- res->replace(start,length,*res2);
+ res->replace((uint32) start,(uint32) length,*res2);
return res;
null:
null_value=1;
@@ -1078,7 +1077,7 @@ String *Item_func_left::val_str(String *str)
return &my_empty_string;
if ((res->length() <= (ulonglong) length) ||
- (res->length() <= (char_pos= res->charpos(length))))
+ (res->length() <= (char_pos= res->charpos((int) length))))
return res;
tmp_value.set(*res, 0, char_pos);
@@ -1166,21 +1165,22 @@ String *Item_func_substr::val_str(String *str)
/* if "unsigned_flag" is set, we have a *huge* positive number. */
/* Assumes that the maximum length of a String is < INT_MAX32. */
- if ((args[1]->unsigned_flag) || (start < INT_MIN32) || (start > INT_MAX32))
+ if ((!args[1]->unsigned_flag && (start < INT_MIN32 || start > INT_MAX32)) ||
+ (args[1]->unsigned_flag && ((ulonglong) start > INT_MAX32)))
return &my_empty_string;
start= ((start < 0) ? res->numchars() + start : start - 1);
- start= res->charpos(start);
+ start= res->charpos((int) start);
if ((start < 0) || ((uint) start + 1 > res->length()))
return &my_empty_string;
- length= res->charpos(length, start);
+ length= res->charpos((int) length, (uint32) start);
tmp_length= res->length() - start;
length= min(length, tmp_length);
- if (!start && res->length() == (ulonglong) length)
+ if (!start && (longlong) res->length() == length)
return res;
- tmp_value.set(*res, (ulonglong) start, (ulonglong) length);
+ tmp_value.set(*res, (uint32) start, (uint32) length);
return &tmp_value;
}
@@ -1787,8 +1787,13 @@ bool Item_func_current_user::fix_fields(THD *thd, Item **ref)
if (Item_func_sysconst::fix_fields(thd, ref))
return TRUE;
- Security_context *ctx= (context->security_ctx
+ Security_context *ctx=
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
+ (context->security_ctx
? context->security_ctx : thd->security_ctx);
+#else
+ thd->security_ctx;
+#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
return init(ctx->priv_user, ctx->priv_host);
}
@@ -2227,25 +2232,23 @@ String *Item_func_repeat::val_str(String *str)
uint length,tot_length;
char *to;
/* must be longlong to avoid truncation */
- longlong tmp_count= args[1]->val_int();
- long count= tmp_count;
+ longlong count= args[1]->val_int();
String *res= args[0]->val_str(str);
- /* Assumes that the maximum length of a String is < INT_MAX32. */
- /* Bounds check on count: If this is triggered, we will error. */
- if ((tmp_count > INT_MAX32) || args[1]->unsigned_flag)
- count= INT_MAX32;
-
if (args[0]->null_value || args[1]->null_value)
goto err; // string and/or delim are null
null_value= 0;
- if ((tmp_count <= 0) && !args[1]->unsigned_flag) // For nicer SQL code
+ if ((count <= 0) && !args[1]->unsigned_flag) // For nicer SQL code
return &my_empty_string;
+ /* Assumes that the maximum length of a String is < INT_MAX32. */
+ /* Bounds check on count: If this is triggered, we will error. */
+ if ((ulonglong) count > INT_MAX32)
+ count= INT_MAX32;
if (count == 1) // To avoid reallocs
return res;
length=res->length();
// Safe length check
- if (length > current_thd->variables.max_allowed_packet/count)
+ if (length > current_thd->variables.max_allowed_packet / (uint) count)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
@@ -2319,18 +2322,17 @@ String *Item_func_rpad::val_str(String *str)
String *res= args[0]->val_str(str);
String *rpad= args[2]->val_str(&rpad_str);
+ if (!res || args[1]->null_value || !rpad ||
+ ((count < 0) && !args[1]->unsigned_flag))
+ goto err;
+ null_value=0;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
- if ((count > INT_MAX32) || args[1]->unsigned_flag)
+ if ((ulonglong) count > INT_MAX32)
count= INT_MAX32;
-
- if (!res || args[1]->null_value || !rpad || count < 0)
- goto err;
- null_value=0;
-
if (count <= (res_char_length= res->numchars()))
{ // String to pad is big enough
- res->length(res->charpos(count)); // Shorten result if longer
+ res->length(res->charpos((int) count)); // Shorten result if longer
return (res);
}
pad_char_length= rpad->numchars();
@@ -2347,7 +2349,7 @@ String *Item_func_rpad::val_str(String *str)
if (args[2]->null_value || !pad_char_length)
goto err;
res_byte_length= res->length(); /* Must be done before alloc_buffer */
- if (!(res= alloc_buffer(res,str,&tmp_value,byte_count)))
+ if (!(res= alloc_buffer(res,str,&tmp_value, (ulong) byte_count)))
goto err;
to= (char*) res->ptr()+res_byte_length;
@@ -2361,7 +2363,7 @@ String *Item_func_rpad::val_str(String *str)
}
if (count)
{
- pad_byte_length= rpad->charpos(count);
+ pad_byte_length= rpad->charpos((int) count);
memcpy(to,ptr_pad,(size_t) pad_byte_length);
to+= pad_byte_length;
}
@@ -2421,26 +2423,27 @@ String *Item_func_lpad::val_str(String *str)
String *res= args[0]->val_str(&tmp_value);
String *pad= args[2]->val_str(&lpad_str);
+ if (!res || args[1]->null_value || !pad ||
+ ((count < 0) && !args[1]->unsigned_flag))
+ goto err;
+ null_value=0;
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Set here so that rest of code sees out-of-bound value as such. */
- if ((count > INT_MAX32) || args[1]->unsigned_flag)
+ if ((ulonglong) count > INT_MAX32)
count= INT_MAX32;
- if (!res || args[1]->null_value || !pad || count < 0)
- goto err;
- null_value=0;
res_char_length= res->numchars();
if (count <= res_char_length)
{
- res->length(res->charpos(count));
+ res->length(res->charpos((int) count));
return res;
}
pad_char_length= pad->numchars();
byte_count= count * collation.collation->mbmaxlen;
- if (byte_count > current_thd->variables.max_allowed_packet)
+ if ((ulonglong) byte_count > current_thd->variables.max_allowed_packet)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
@@ -2449,7 +2452,8 @@ String *Item_func_lpad::val_str(String *str)
goto err;
}
- if (args[2]->null_value || !pad_char_length || str->alloc(byte_count))
+ if (args[2]->null_value || !pad_char_length ||
+ str->alloc((uint32) byte_count))
goto err;
str->length(0);
@@ -2461,7 +2465,7 @@ String *Item_func_lpad::val_str(String *str)
count-= pad_char_length;
}
if (count > 0)
- str->append(pad->ptr(), pad->charpos(count), collation.collation);
+ str->append(pad->ptr(), pad->charpos((int) count), collation.collation);
str->append(*res);
null_value= 0;
@@ -2791,7 +2795,7 @@ String *Item_load_file::val_str(String *str)
tmp_value.length(stat_info.st_size);
my_close(file, MYF(0));
null_value = 0;
- return &tmp_value;
+ DBUG_RETURN(&tmp_value);
err:
null_value = 1;
@@ -3281,4 +3285,3 @@ String *Item_func_uuid::val_str(String *str)
strmov(s+18, clock_seq_and_node_str);
return str;
}
-
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index fd2aaf19675..67dd71fc886 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 21624f23267..53e1353d308 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -379,6 +378,7 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
*/
!(select_lex->item_list.head()->type() == FIELD_ITEM ||
select_lex->item_list.head()->type() == REF_ITEM) &&
+ !join->conds && !join->having &&
/*
switch off this optimization for prepare statement,
because we do not rollback this changes
@@ -403,8 +403,6 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
*/
substitution->walk(&Item::remove_dependence_processor,
(byte *) select_lex->outer_select());
- /* SELECT without FROM clause can't have WHERE or HAVING clause */
- DBUG_ASSERT(join->conds == 0 && join->having == 0);
return RES_REDUCE;
}
return RES_OK;
@@ -2308,6 +2306,22 @@ bool subselect_single_select_engine::no_tables()
/*
+ Check statically whether the subquery can return NULL
+
+ SINOPSYS
+ subselect_single_select_engine::may_be_null()
+
+ RETURN
+ FALSE can guarantee that the subquery never return NULL
+ TRUE otherwise
+*/
+bool subselect_single_select_engine::may_be_null()
+{
+ return ((no_tables() && !join->conds && !join->having) ? maybe_null : 1);
+}
+
+
+/*
Report about presence of tables in subquery
SYNOPSIS
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index c866cafd8c0..a125a119ad8 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -91,7 +90,7 @@ public:
enum Type type() const;
bool is_null()
{
- val_int();
+ update_null_value();
return null_value;
}
bool fix_fields(THD *thd, Item **ref);
@@ -379,7 +378,7 @@ public:
enum Item_result type() { return res_type; }
enum_field_types field_type() { return res_field_type; }
virtual void exclude()= 0;
- bool may_be_null() { return maybe_null; };
+ virtual bool may_be_null() { return maybe_null; };
virtual table_map upper_select_const_tables()= 0;
static table_map calc_const_tables(TABLE_LIST *);
virtual void print(String *str)= 0;
@@ -416,6 +415,7 @@ public:
void print (String *str);
bool change_result(Item_subselect *si, select_subselect *result);
bool no_tables();
+ bool may_be_null();
bool is_executed() const { return executed; }
bool no_rows();
};
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 4d84fa20300..8bfac058936 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1054,7 +1053,7 @@ bool Item_sum_count::add()
count++;
else
{
- (void) args[0]->val_int();
+ args[0]->update_null_value();
if (!args[0]->null_value)
count++;
}
@@ -1114,7 +1113,7 @@ Field *Item_sum_avg::create_tmp_field(bool group, TABLE *table,
{
/*
We must store both value and counter in the temporary table in one field.
- The easyest way is to do this is to store both value in a string
+ The easiest way is to do this is to store both value in a string
and unpack on access.
*/
return new Field_string(((hybrid_type == DECIMAL_RESULT) ?
@@ -1188,8 +1187,9 @@ String *Item_sum_avg::val_str(String *str)
double Item_sum_std::val_real()
{
DBUG_ASSERT(fixed == 1);
- double tmp= Item_sum_variance::val_real();
- return tmp <= 0.0 ? 0.0 : sqrt(tmp);
+ double nr= Item_sum_variance::val_real();
+ DBUG_ASSERT(nr >= 0.0);
+ return sqrt(nr);
}
Item *Item_sum_std::copy_or_same(THD* thd)
@@ -1203,40 +1203,77 @@ Item *Item_sum_std::copy_or_same(THD* thd)
*/
-Item_sum_variance::Item_sum_variance(THD *thd, Item_sum_variance *item):
- Item_sum_num(thd, item), hybrid_type(item->hybrid_type),
- cur_dec(item->cur_dec), count(item->count), sample(item->sample),
- prec_increment(item->prec_increment)
+/**
+ Variance implementation for floating-point implementations, without
+ catastrophic cancellation, from Knuth's _TAoCP_, 3rd ed, volume 2, pg232.
+ This alters the value at m, s, and increments count.
+*/
+
+/*
+ These two functions are used by the Item_sum_variance and the
+ Item_variance_field classes, which are unrelated, and each need to calculate
+ variance. The difference between the two classes is that the first is used
+ for a mundane SELECT, while the latter is used in a GROUPing SELECT.
+*/
+static void variance_fp_recurrence_next(double *m, double *s, ulonglong *count, double nr)
{
- if (hybrid_type == DECIMAL_RESULT)
+ *count += 1;
+
+ if (*count == 1)
{
- memcpy(dec_sum, item->dec_sum, sizeof(item->dec_sum));
- memcpy(dec_sqr, item->dec_sqr, sizeof(item->dec_sqr));
- for (int i=0; i<2; i++)
- {
- dec_sum[i].fix_buffer_pointer();
- dec_sqr[i].fix_buffer_pointer();
- }
+ *m= nr;
+ *s= 0;
}
else
{
- sum= item->sum;
- sum_sqr= item->sum_sqr;
+ double m_kminusone= *m;
+ *m= m_kminusone + (nr - m_kminusone) / (double) *count;
+ *s= *s + (nr - m_kminusone) * (nr - *m);
}
}
+static double variance_fp_recurrence_result(double s, ulonglong count, bool is_sample_variance)
+{
+ if (count == 1)
+ return 0.0;
+
+ if (is_sample_variance)
+ return s / (count - 1);
+
+ /* else, is a population variance */
+ return s / count;
+}
+
+
+Item_sum_variance::Item_sum_variance(THD *thd, Item_sum_variance *item):
+ Item_sum_num(thd, item), hybrid_type(item->hybrid_type),
+ count(item->count), sample(item->sample),
+ prec_increment(item->prec_increment)
+{
+ recurrence_m= item->recurrence_m;
+ recurrence_s= item->recurrence_s;
+}
+
+
void Item_sum_variance::fix_length_and_dec()
{
DBUG_ENTER("Item_sum_variance::fix_length_and_dec");
maybe_null= null_value= 1;
prec_increment= current_thd->variables.div_precincrement;
+
+ /*
+ According to the SQL2003 standard (Part 2, Foundations; sec 10.9,
+ aggregate function; paragraph 7h of Syntax Rules), "the declared
+ type of the result is an implementation-defined aproximate numeric
+ type.
+ */
+ hybrid_type= REAL_RESULT;
+
switch (args[0]->result_type()) {
case REAL_RESULT:
case STRING_RESULT:
decimals= min(args[0]->decimals + 4, NOT_FIXED_DEC);
- hybrid_type= REAL_RESULT;
- sum= 0.0;
break;
case INT_RESULT:
case DECIMAL_RESULT:
@@ -1245,37 +1282,14 @@ void Item_sum_variance::fix_length_and_dec()
decimals= min(args[0]->decimals + prec_increment, DECIMAL_MAX_SCALE);
max_length= my_decimal_precision_to_length(precision, decimals,
unsigned_flag);
- cur_dec= 0;
- hybrid_type= DECIMAL_RESULT;
- my_decimal_set_zero(dec_sum);
- my_decimal_set_zero(dec_sqr);
- /*
- The maxium value to usable for variance is DECIMAL_MAX_LENGTH/2
- becasue we need to be able to calculate in dec_bin_size1
- column_value * column_value
- */
- f_scale0= args[0]->decimals;
- f_precision0= min(args[0]->decimal_precision() + DECIMAL_LONGLONG_DIGITS,
- DECIMAL_MAX_PRECISION);
- f_scale1= min(args[0]->decimals * 2, DECIMAL_MAX_SCALE);
- f_precision1= min(args[0]->decimal_precision()*2 + DECIMAL_LONGLONG_DIGITS,
- DECIMAL_MAX_PRECISION);
- dec_bin_size0= my_decimal_get_binary_size(f_precision0, f_scale0);
- dec_bin_size1= my_decimal_get_binary_size(f_precision1, f_scale1);
break;
}
case ROW_RESULT:
default:
DBUG_ASSERT(0);
}
- DBUG_PRINT("info", ("Type: %s (%d, %d)",
- (hybrid_type == REAL_RESULT ? "REAL_RESULT" :
- hybrid_type == DECIMAL_RESULT ? "DECIMAL_RESULT" :
- hybrid_type == INT_RESULT ? "INT_RESULT" :
- "--ILLEGAL!!!--"),
- max_length,
- (int)decimals));
+ DBUG_PRINT("info", ("Type: REAL_RESULT (%d, %d)", max_length, (int)decimals));
DBUG_VOID_RETURN;
}
@@ -1286,6 +1300,11 @@ Item *Item_sum_variance::copy_or_same(THD* thd)
}
+/**
+ Create a new field to match the type of value we're expected to yield.
+ If we're grouping, then we need some space to serialize variables into, to
+ pass around.
+*/
Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
uint convert_blob_len)
{
@@ -1293,13 +1312,10 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
{
/*
We must store both value and counter in the temporary table in one field.
- The easyest way is to do this is to store both value in a string
+ The easiest way is to do this is to store both value in a string
and unpack on access.
*/
- return new Field_string(((hybrid_type == DECIMAL_RESULT) ?
- dec_bin_size0 + dec_bin_size1 :
- sizeof(double)*2) + sizeof(longlong),
- 0, name, table, &my_charset_bin);
+ return new Field_string(sizeof(double)*2 + sizeof(longlong), 0, name, table, &my_charset_bin);
}
return new Field_double(max_length, maybe_null,name,table,decimals);
}
@@ -1307,90 +1323,51 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
void Item_sum_variance::clear()
{
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal_set_zero(dec_sum);
- my_decimal_set_zero(dec_sqr);
- cur_dec= 0;
- }
- else
- sum=sum_sqr=0.0;
- count=0;
+ count= 0;
}
bool Item_sum_variance::add()
{
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal dec_buf, *dec= args[0]->val_decimal(&dec_buf);
- my_decimal sqr_buf;
- if (!args[0]->null_value)
- {
- count++;
- int next_dec= cur_dec ^ 1;
- my_decimal_mul(E_DEC_FATAL_ERROR, &sqr_buf, dec, dec);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sqr+next_dec,
- dec_sqr+cur_dec, &sqr_buf);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sum+next_dec,
- dec_sum+cur_dec, dec);
- cur_dec= next_dec;
- }
- }
- else
- {
- double nr= args[0]->val_real();
- if (!args[0]->null_value)
- {
- sum+=nr;
- sum_sqr+=nr*nr;
- count++;
- }
- }
+ /*
+ Why use a temporary variable? We don't know if it is null until we
+ evaluate it, which has the side-effect of setting null_value .
+ */
+ double nr= args[0]->val_real();
+
+ if (!args[0]->null_value)
+ variance_fp_recurrence_next(&recurrence_m, &recurrence_s, &count, nr);
return 0;
}
double Item_sum_variance::val_real()
{
DBUG_ASSERT(fixed == 1);
- if (hybrid_type == DECIMAL_RESULT)
- return val_real_from_decimal();
+ /*
+ 'sample' is a 1/0 boolean value. If it is 1/true, id est this is a sample
+ variance call, then we should set nullness when the count of the items
+ is one or zero. If it's zero, i.e. a population variance, then we only
+ set nullness when the count is zero.
+
+ Another way to read it is that 'sample' is the numerical threshhold, at and
+ below which a 'count' number of items is called NULL.
+ */
+ DBUG_ASSERT((sample == 0) || (sample == 1));
if (count <= sample)
{
null_value=1;
return 0.0;
}
+
null_value=0;
- /* Avoid problems when the precision isn't good enough */
- double tmp=ulonglong2double(count);
- double tmp2= (sum_sqr - sum*sum/tmp)/(tmp - (double)sample);
- return tmp2 <= 0.0 ? 0.0 : tmp2;
+ return variance_fp_recurrence_result(recurrence_s, count, sample);
}
my_decimal *Item_sum_variance::val_decimal(my_decimal *dec_buf)
{
- my_decimal count_buf, count1_buf, sum_sqr_buf;
- DBUG_ASSERT(fixed ==1 );
- if (hybrid_type == REAL_RESULT)
- return val_decimal_from_real(dec_buf);
-
- if (count <= sample)
- {
- null_value= 1;
- return 0;
- }
- null_value= 0;
- int2my_decimal(E_DEC_FATAL_ERROR, count, 0, &count_buf);
- int2my_decimal(E_DEC_FATAL_ERROR, count-sample, 0, &count1_buf);
- my_decimal_mul(E_DEC_FATAL_ERROR, &sum_sqr_buf,
- dec_sum+cur_dec, dec_sum+cur_dec);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf,
- &sum_sqr_buf, &count_buf, prec_increment);
- my_decimal_sub(E_DEC_FATAL_ERROR, &sum_sqr_buf, dec_sqr+cur_dec, dec_buf);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf,
- &sum_sqr_buf, &count1_buf, prec_increment);
- return dec_buf;
+ DBUG_ASSERT(fixed == 1);
+ return val_decimal_from_real(dec_buf);
}
@@ -1399,89 +1376,44 @@ void Item_sum_variance::reset_field()
double nr;
char *res= result_field->ptr;
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal value, *arg_dec, *arg2_dec;
- longlong tmp;
-
- arg_dec= args[0]->val_decimal(&value);
- if (args[0]->null_value)
- {
- arg_dec= arg2_dec= &decimal_zero;
- tmp= 0;
- }
- else
- {
- my_decimal_mul(E_DEC_FATAL_ERROR, dec_sum, arg_dec, arg_dec);
- arg2_dec= dec_sum;
- tmp= 1;
- }
- my_decimal2binary(E_DEC_FATAL_ERROR, arg_dec,
- res, f_precision0, f_scale0);
- my_decimal2binary(E_DEC_FATAL_ERROR, arg2_dec,
- res+dec_bin_size0, f_precision1, f_scale1);
- res+= dec_bin_size0 + dec_bin_size1;
- int8store(res,tmp);
- return;
- }
- nr= args[0]->val_real();
+ nr= args[0]->val_real(); /* sets null_value as side-effect */
if (args[0]->null_value)
bzero(res,sizeof(double)*2+sizeof(longlong));
else
{
- longlong tmp;
- float8store(res,nr);
- nr*=nr;
- float8store(res+sizeof(double),nr);
- tmp= 1;
- int8store(res+sizeof(double)*2,tmp);
+ /* Serialize format is (double)m, (double)s, (longlong)count */
+ ulonglong tmp_count;
+ double tmp_s;
+ float8store(res, nr); /* recurrence variable m */
+ tmp_s= 0.0;
+ float8store(res + sizeof(double), tmp_s);
+ tmp_count= 1;
+ int8store(res + sizeof(double)*2, tmp_count);
}
}
void Item_sum_variance::update_field()
{
- longlong field_count;
+ ulonglong field_count;
char *res=result_field->ptr;
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal value, *arg_val= args[0]->val_decimal(&value);
- if (!args[0]->null_value)
- {
- binary2my_decimal(E_DEC_FATAL_ERROR, res,
- dec_sum+1, f_precision0, f_scale0);
- binary2my_decimal(E_DEC_FATAL_ERROR, res+dec_bin_size0,
- dec_sqr+1, f_precision1, f_scale1);
- field_count= sint8korr(res + (dec_bin_size0 + dec_bin_size1));
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sum, arg_val, dec_sum+1);
- my_decimal_mul(E_DEC_FATAL_ERROR, dec_sum+1, arg_val, arg_val);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sqr, dec_sqr+1, dec_sum+1);
- field_count++;
- my_decimal2binary(E_DEC_FATAL_ERROR, dec_sum,
- res, f_precision0, f_scale0);
- my_decimal2binary(E_DEC_FATAL_ERROR, dec_sqr,
- res+dec_bin_size0, f_precision1, f_scale1);
- res+= dec_bin_size0 + dec_bin_size1;
- int8store(res, field_count);
- }
+
+ double nr= args[0]->val_real(); /* sets null_value as side-effect */
+
+ if (args[0]->null_value)
return;
- }
- double nr,old_nr,old_sqr;
- float8get(old_nr, res);
- float8get(old_sqr, res+sizeof(double));
+ /* Serialize format is (double)m, (double)s, (longlong)count */
+ double field_recurrence_m, field_recurrence_s;
+ float8get(field_recurrence_m, res);
+ float8get(field_recurrence_s, res + sizeof(double));
field_count=sint8korr(res+sizeof(double)*2);
- nr= args[0]->val_real();
- if (!args[0]->null_value)
- {
- old_nr+=nr;
- old_sqr+=nr*nr;
- field_count++;
- }
- float8store(res,old_nr);
- float8store(res+sizeof(double),old_sqr);
+ variance_fp_recurrence_next(&field_recurrence_m, &field_recurrence_s, &field_count, nr);
+
+ float8store(res, field_recurrence_m);
+ float8store(res + sizeof(double), field_recurrence_s);
res+= sizeof(double)*2;
int8store(res,field_count);
}
@@ -1961,7 +1893,7 @@ void Item_sum_count::reset_field()
nr=1;
else
{
- (void) args[0]->val_int();
+ args[0]->update_null_value();
if (!args[0]->null_value)
nr=1;
}
@@ -2071,7 +2003,7 @@ void Item_sum_count::update_field()
nr++;
else
{
- (void) args[0]->val_int();
+ args[0]->update_null_value();
if (!args[0]->null_value)
nr++;
}
@@ -2311,25 +2243,9 @@ double Item_std_field::val_real()
{
double nr;
// fix_fields() never calls for this Item
- if (hybrid_type == REAL_RESULT)
- {
- /*
- We can't call Item_variance_field::val_real() on a DECIMAL_RESULT
- as this would call Item_std_field::val_decimal() and we would
- calculate sqrt() twice
- */
- nr= Item_variance_field::val_real();
- }
- else
- {
- my_decimal dec_buf,*dec;
- dec= Item_variance_field::val_decimal(&dec_buf);
- if (!dec)
- nr= 0.0; // NULL; Return 0.0
- else
- my_decimal2double(E_DEC_FATAL_ERROR, dec, &nr);
- }
- return nr <= 0.0 ? 0.0 : sqrt(nr);
+ nr= Item_variance_field::val_real();
+ DBUG_ASSERT(nr >= 0.0);
+ return sqrt(nr);
}
@@ -2343,11 +2259,13 @@ my_decimal *Item_std_field::val_decimal(my_decimal *dec_buf)
double nr;
if (hybrid_type == REAL_RESULT)
return val_decimal_from_real(dec_buf);
+
dec= Item_variance_field::val_decimal(dec_buf);
if (!dec)
return 0;
my_decimal2double(E_DEC_FATAL_ERROR, dec, &nr);
- nr= nr <= 0.0 ? 0.0 : sqrt(nr);
+ DBUG_ASSERT(nr >= 0.0);
+ nr= sqrt(nr);
double2my_decimal(E_DEC_FATAL_ERROR, nr, &tmp_dec);
my_decimal_round(E_DEC_FATAL_ERROR, &tmp_dec, decimals, FALSE, dec_buf);
return dec_buf;
@@ -2382,52 +2300,15 @@ double Item_variance_field::val_real()
if (hybrid_type == DECIMAL_RESULT)
return val_real_from_decimal();
- double sum,sum_sqr;
- longlong count;
- float8get(sum,field->ptr);
- float8get(sum_sqr,(field->ptr+sizeof(double)));
+ double recurrence_s;
+ ulonglong count;
+ float8get(recurrence_s, (field->ptr + sizeof(double)));
count=sint8korr(field->ptr+sizeof(double)*2);
if ((null_value= (count <= sample)))
return 0.0;
- double tmp= (double) count;
- double tmp2= (sum_sqr - sum*sum/tmp)/(tmp - (double)sample);
- return tmp2 <= 0.0 ? 0.0 : tmp2;
-}
-
-
-String *Item_variance_field::val_str(String *str)
-{
- if (hybrid_type == DECIMAL_RESULT)
- return val_string_from_decimal(str);
- return val_string_from_real(str);
-}
-
-
-my_decimal *Item_variance_field::val_decimal(my_decimal *dec_buf)
-{
- // fix_fields() never calls for this Item
- if (hybrid_type == REAL_RESULT)
- return val_decimal_from_real(dec_buf);
-
- longlong count= sint8korr(field->ptr+dec_bin_size0+dec_bin_size1);
- if ((null_value= (count <= sample)))
- return 0;
-
- my_decimal dec_count, dec1_count, dec_sum, dec_sqr, tmp;
- int2my_decimal(E_DEC_FATAL_ERROR, count, 0, &dec_count);
- int2my_decimal(E_DEC_FATAL_ERROR, count-sample, 0, &dec1_count);
- binary2my_decimal(E_DEC_FATAL_ERROR, field->ptr,
- &dec_sum, f_precision0, f_scale0);
- binary2my_decimal(E_DEC_FATAL_ERROR, field->ptr+dec_bin_size0,
- &dec_sqr, f_precision1, f_scale1);
- my_decimal_mul(E_DEC_FATAL_ERROR, &tmp, &dec_sum, &dec_sum);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf, &tmp, &dec_count, prec_increment);
- my_decimal_sub(E_DEC_FATAL_ERROR, &dec_sum, &dec_sqr, dec_buf);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf,
- &dec_sum, &dec1_count, prec_increment);
- return dec_buf;
+ return variance_fp_recurrence_result(recurrence_s, count, sample);
}
@@ -2551,7 +2432,7 @@ bool Item_sum_count_distinct::setup(THD *thd)
return TRUE; // End of memory
if (item->const_item())
{
- (void) item->val_int();
+ item->update_null_value();
if (item->null_value)
always_null=1;
}
@@ -3413,8 +3294,8 @@ bool Item_func_group_concat::setup(THD *thd)
duplicate values (according to the syntax of this function). If there
is no DISTINCT or ORDER BY clauses, we don't create this tree.
*/
- init_tree(tree, min(thd->variables.max_heap_table_size,
- thd->variables.sortbuff_size/16), 0,
+ init_tree(tree, (uint) min(thd->variables.max_heap_table_size,
+ thd->variables.sortbuff_size/16), 0,
tree_key_length, compare_key, 0, NULL, (void*) this);
}
diff --git a/sql/item_sum.h b/sql/item_sum.h
index c11ef7e548a..f011f105453 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -618,7 +617,7 @@ public:
double val_real();
longlong val_int();
my_decimal *val_decimal(my_decimal *);
- bool is_null() { (void) val_int(); return null_value; }
+ bool is_null() { update_null_value(); return null_value; }
String *val_str(String*);
enum_field_types field_type() const
{
@@ -683,9 +682,11 @@ public:
double val_real();
longlong val_int()
{ /* can't be fix_fields()ed */ return (longlong) rint(val_real()); }
- String *val_str(String*);
- my_decimal *val_decimal(my_decimal *);
- bool is_null() { (void) val_int(); return null_value; }
+ String *val_str(String *str)
+ { return val_string_from_real(str); }
+ my_decimal *val_decimal(my_decimal *dec_buf)
+ { return val_decimal_from_real(dec_buf); }
+ bool is_null() { update_null_value(); return null_value; }
enum_field_types field_type() const
{
return hybrid_type == DECIMAL_RESULT ?
@@ -706,6 +707,14 @@ public:
= (sum(ai^2) - 2*sum(a)*sum(a)/count(a) + count(a)*sum(a)^2/count(a)^2 )/count(a) =
= (sum(ai^2) - 2*sum(a)^2/count(a) + sum(a)^2/count(a) )/count(a) =
= (sum(ai^2) - sum(a)^2/count(a))/count(a)
+
+But, this falls prey to catastrophic cancellation. Instead, use the recurrence formulas
+
+ M_{1} = x_{1}, ~ M_{k} = M_{k-1} + (x_{k} - M_{k-1}) / k newline
+ S_{1} = 0, ~ S_{k} = S_{k-1} + (x_{k} - M_{k-1}) times (x_{k} - M_{k}) newline
+ for 2 <= k <= n newline
+ ital variance = S_{n} / (n-1)
+
*/
class Item_sum_variance : public Item_sum_num
@@ -714,9 +723,8 @@ class Item_sum_variance : public Item_sum_num
public:
Item_result hybrid_type;
- double sum, sum_sqr;
- my_decimal dec_sum[2], dec_sqr[2];
int cur_dec;
+ double recurrence_m, recurrence_s; /* Used in recurrence relation. */
ulonglong count;
uint f_precision0, f_scale0;
uint f_precision1, f_scale1;
@@ -725,7 +733,7 @@ public:
uint prec_increment;
Item_sum_variance(Item *item_par, uint sample_arg) :Item_sum_num(item_par),
- hybrid_type(REAL_RESULT), cur_dec(0), count(0), sample(sample_arg)
+ hybrid_type(REAL_RESULT), count(0), sample(sample_arg)
{}
Item_sum_variance(THD *thd, Item_sum_variance *item);
enum Sumfunctype sum_func () const { return VARIANCE_FUNC; }
@@ -745,7 +753,6 @@ public:
enum Item_result result_type () const { return REAL_RESULT; }
void cleanup()
{
- cur_dec= 0;
count= 0;
Item_sum_num::cleanup();
}
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 9d9108dd301..e99db62068d 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -110,7 +109,6 @@ static bool make_datetime_with_warn(date_time_format_types format, TIME *ltime,
String *str)
{
int warning= 0;
- bool rc;
if (make_datetime(format, ltime, str))
return 1;
@@ -290,15 +288,16 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
for (; ptr != end && val != val_end; ptr++)
{
+ /* Skip pre-space between each argument */
+ while (val != val_end && my_isspace(cs, *val))
+ val++;
+
if (*ptr == '%' && ptr+1 != end)
{
int val_len;
char *tmp;
error= 0;
- /* Skip pre-space between each argument */
- while (val != val_end && my_isspace(cs, *val))
- val++;
val_len= (uint) (val_end - val);
switch (*++ptr) {
@@ -609,16 +608,10 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time,
uint weekday;
ulong length;
const char *ptr, *end;
- MY_LOCALE *locale;
THD *thd= current_thd;
- char buf[STRING_BUFFER_USUAL_SIZE];
- String tmp(buf, sizeof(buf), thd->variables.character_set_results);
- uint errors= 0;
+ MY_LOCALE *locale= thd->variables.lc_time_names;
- tmp.length(0);
str->length(0);
- str->set_charset(&my_charset_bin);
- locale = thd->variables.lc_time_names;
if (l_time->neg)
str->append('-');
@@ -632,41 +625,37 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time,
{
switch (*++ptr) {
case 'M':
- if (!l_time->month)
- return 1;
- tmp.copy(locale->month_names->type_names[l_time->month-1],
- strlen(locale->month_names->type_names[l_time->month-1]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (!l_time->month)
+ return 1;
+ str->append(locale->month_names->type_names[l_time->month-1],
+ strlen(locale->month_names->type_names[l_time->month-1]),
+ system_charset_info);
+ break;
case 'b':
- if (!l_time->month)
- return 1;
- tmp.copy(locale->ab_month_names->type_names[l_time->month-1],
- strlen(locale->ab_month_names->type_names[l_time->month-1]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (!l_time->month)
+ return 1;
+ str->append(locale->ab_month_names->type_names[l_time->month-1],
+ strlen(locale->ab_month_names->type_names[l_time->month-1]),
+ system_charset_info);
+ break;
case 'W':
- if (type == MYSQL_TIMESTAMP_TIME)
- return 1;
- weekday= calc_weekday(calc_daynr(l_time->year,l_time->month,
- l_time->day),0);
- tmp.copy(locale->day_names->type_names[weekday],
- strlen(locale->day_names->type_names[weekday]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (type == MYSQL_TIMESTAMP_TIME)
+ return 1;
+ weekday= calc_weekday(calc_daynr(l_time->year,l_time->month,
+ l_time->day),0);
+ str->append(locale->day_names->type_names[weekday],
+ strlen(locale->day_names->type_names[weekday]),
+ system_charset_info);
+ break;
case 'a':
- if (type == MYSQL_TIMESTAMP_TIME)
- return 1;
- weekday=calc_weekday(calc_daynr(l_time->year,l_time->month,
- l_time->day),0);
- tmp.copy(locale->ab_day_names->type_names[weekday],
- strlen(locale->ab_day_names->type_names[weekday]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (type == MYSQL_TIMESTAMP_TIME)
+ return 1;
+ weekday=calc_weekday(calc_daynr(l_time->year,l_time->month,
+ l_time->day),0);
+ str->append(locale->ab_day_names->type_names[weekday],
+ strlen(locale->ab_day_names->type_names[weekday]),
+ system_charset_info);
+ break;
case 'D':
if (type == MYSQL_TIMESTAMP_TIME)
return 1;
@@ -1645,7 +1634,7 @@ double Item_func_sysdate_local::val_real()
{
DBUG_ASSERT(fixed == 1);
store_now_in_TIME(&ltime);
- return (longlong) TIME_to_ulonglong_datetime(&ltime);
+ return (double) TIME_to_ulonglong_datetime(&ltime);
}
@@ -1710,6 +1699,7 @@ longlong Item_func_sec_to_time::val_int()
void Item_func_date_format::fix_length_and_dec()
{
+ THD* thd= current_thd;
/*
Must use this_item() in case it's a local SP variable
(for ->max_length and ->str_value)
@@ -1717,22 +1707,18 @@ void Item_func_date_format::fix_length_and_dec()
Item *arg1= args[1]->this_item();
decimals=0;
- collation.set(&my_charset_bin);
+ collation.set(thd->variables.collation_connection);
if (arg1->type() == STRING_ITEM)
{ // Optimize the normal case
fixed_length=1;
-
- /*
- The result is a binary string (no reason to use collation->mbmaxlen
- This is becasue make_date_time() only returns binary strings
- */
- max_length= format_length(&arg1->str_value);
+ max_length= format_length(&arg1->str_value) *
+ collation.collation->mbmaxlen;
}
else
{
fixed_length=0;
- /* The result is a binary string (no reason to use collation->mbmaxlen */
- max_length=min(arg1->max_length, MAX_BLOB_WIDTH) * 10;
+ max_length=min(arg1->max_length, MAX_BLOB_WIDTH) * 10 *
+ collation.collation->mbmaxlen;
set_if_smaller(max_length,MAX_BLOB_WIDTH);
}
maybe_null=1; // If wrong date
@@ -1877,6 +1863,7 @@ String *Item_func_date_format::val_str(String *str)
date_time_format.format.length= format->length();
/* Create the result string */
+ str->set_charset(collation.collation);
if (!make_date_time(&date_time_format, &l_time,
is_time_format ? MYSQL_TIMESTAMP_TIME :
MYSQL_TIMESTAMP_DATE,
@@ -3322,7 +3309,9 @@ bool Item_func_str_to_date::get_date(TIME *ltime, uint fuzzy_date)
date_time_format.format.str= (char*) format->ptr();
date_time_format.format.length= format->length();
if (extract_date_time(&date_time_format, val->ptr(), val->length(),
- ltime, cached_timestamp_type, 0, "datetime"))
+ ltime, cached_timestamp_type, 0, "datetime") ||
+ ((fuzzy_date & TIME_NO_ZERO_DATE) &&
+ (ltime->year == 0 || ltime->month == 0 || ltime->day == 0)))
goto null_date;
if (cached_timestamp_type == MYSQL_TIMESTAMP_TIME && ltime->day)
{
@@ -3359,8 +3348,13 @@ String *Item_func_str_to_date::val_str(String *str)
bool Item_func_last_day::get_date(TIME *ltime, uint fuzzy_date)
{
- if (get_arg0_date(ltime, fuzzy_date & ~TIME_FUZZY_DATE))
+ if (get_arg0_date(ltime, fuzzy_date & ~TIME_FUZZY_DATE) ||
+ (ltime->month == 0))
+ {
+ null_value= 1;
return 1;
+ }
+ null_value= 0;
uint month_idx= ltime->month-1;
ltime->day= days_in_month[month_idx];
if ( month_idx == 1 && calc_days_in_year(ltime->year) == 366)
diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h
index 68e8700d1b0..beb1945b33c 100644
--- a/sql/item_timefunc.h
+++ b/sql/item_timefunc.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_uniq.cc b/sql/item_uniq.cc
index 79b2ca68f4f..1a5524eb1e0 100644
--- a/sql/item_uniq.cc
+++ b/sql/item_uniq.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/item_uniq.h b/sql/item_uniq.h
index a0aa0b96cc6..ce43abe3f33 100644
--- a/sql/item_uniq.h
+++ b/sql/item_uniq.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/key.cc b/sql/key.cc
index 5e658312352..921f3daa201 100644
--- a/sql/key.cc
+++ b/sql/key.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/lex.h b/sql/lex.h
index 68f34d8de93..5299be89d35 100644
--- a/sql/lex.h
+++ b/sql/lex.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/lex_symbol.h b/sql/lex_symbol.h
index 3074a489b6a..5d929508030 100644
--- a/sql/lex_symbol.h
+++ b/sql/lex_symbol.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/lock.cc b/sql/lock.cc
index 90ddcc957a2..2afe1de59f5 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/log.cc b/sql/log.cc
index 960fc4f60c2..1961a5b6f88 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1676,14 +1675,14 @@ bool MYSQL_LOG::write(Log_event *event_info)
}
trans_log->end_of_file= max_binlog_cache_size;
trans_register_ha(thd,
- thd->options & (OPTION_NOT_AUTOCOMMIT |
- OPTION_BEGIN),
+ test(thd->options & (OPTION_NOT_AUTOCOMMIT |
+ OPTION_BEGIN)),
&binlog_hton);
}
else if (!my_b_tell(trans_log))
trans_register_ha(thd,
- thd->options & (OPTION_NOT_AUTOCOMMIT |
- OPTION_BEGIN),
+ test(thd->options & (OPTION_NOT_AUTOCOMMIT |
+ OPTION_BEGIN)),
&binlog_hton);
file= trans_log;
}
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 0d7ef7e8f2a..657fd510e78 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -261,7 +260,7 @@ append_query_string(CHARSET_INFO *csinfo,
else
{
*ptr++= '\'';
- ptr+= escape_string_for_mysql(from->charset(), ptr, 0,
+ ptr+= escape_string_for_mysql(csinfo, ptr, 0,
from->ptr(), from->length());
*ptr++='\'';
}
@@ -1088,7 +1087,8 @@ bool Query_log_event::write(IO_CACHE* file)
1+1+FN_REFLEN+ // code of catalog and catalog length and catalog
1+4+ // code of autoinc and the 2 autoinc variables
1+6+ // code of charset and charset
- 1+1+MAX_TIME_ZONE_NAME_LENGTH // code of tz and tz length and tz name
+ 1+1+MAX_TIME_ZONE_NAME_LENGTH+ // code of tz and tz length and tz name
+ 1+2 // code of lc_time_names and lc_time_names_number
], *start, *start_of_status;
ulong event_length;
@@ -1200,6 +1200,13 @@ bool Query_log_event::write(IO_CACHE* file)
memcpy(start, time_zone_str, time_zone_len);
start+= time_zone_len;
}
+ if (lc_time_names_number)
+ {
+ DBUG_ASSERT(lc_time_names_number <= 0xFFFF);
+ *start++= Q_LC_TIME_NAMES_CODE;
+ int2store(start, lc_time_names_number);
+ start+= 2;
+ }
/*
Here there could be code like
if (command-line-option-which-says-"log_this_variable" && inited)
@@ -1264,7 +1271,8 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
flags2_inited(1), sql_mode_inited(1), charset_inited(1),
sql_mode(thd_arg->variables.sql_mode),
auto_increment_increment(thd_arg->variables.auto_increment_increment),
- auto_increment_offset(thd_arg->variables.auto_increment_offset)
+ auto_increment_offset(thd_arg->variables.auto_increment_offset),
+ lc_time_names_number(thd_arg->variables.lc_time_names->number)
{
time_t end_time;
time(&end_time);
@@ -1306,23 +1314,30 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
/* 2 utility functions for the next method */
-static void get_str_len_and_pointer(const char **dst, const char **src, uint *len)
+/*
+ Get the pointer for a string (src) that contains the length in
+ the first byte. Set the output string (dst) to the string value
+ and place the length of the string in the byte after the string.
+*/
+static void get_str_len_and_pointer(const Log_event::Byte **src,
+ const char **dst,
+ uint *len)
{
if ((*len= **src))
- *dst= *src + 1; // Will be copied later
- (*src)+= *len+1;
+ *dst= (char *)*src + 1; // Will be copied later
+ (*src)+= *len + 1;
}
-
-static void copy_str_and_move(char **dst, const char **src, uint len)
+static void copy_str_and_move(const char **src,
+ Log_event::Byte **dst,
+ uint len)
{
memcpy(*dst, *src, len);
- *src= *dst;
+ *src= (const char *)*dst;
(*dst)+= len;
*(*dst)++= 0;
}
-
/*
Query_log_event::Query_log_event()
This is used by the SQL slave thread to prepare the event before execution.
@@ -1335,13 +1350,13 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
db(NullS), catalog_len(0), status_vars_len(0),
flags2_inited(0), sql_mode_inited(0), charset_inited(0),
auto_increment_increment(1), auto_increment_offset(1),
- time_zone_len(0)
+ time_zone_len(0), lc_time_names_number(0)
{
ulong data_len;
uint32 tmp;
uint8 common_header_len, post_header_len;
- char *start;
- const char *end;
+ Log_event::Byte *start;
+ const Log_event::Byte *end;
bool catalog_nz= 1;
DBUG_ENTER("Query_log_event::Query_log_event(char*,...)");
@@ -1387,9 +1402,9 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
/* variable-part: the status vars; only in MySQL 5.0 */
- start= (char*) (buf+post_header_len);
- end= (const char*) (start+status_vars_len);
- for (const uchar* pos= (const uchar*) start; pos < (const uchar*) end;)
+ start= (Log_event::Byte*) (buf+post_header_len);
+ end= (const Log_event::Byte*) (start+status_vars_len);
+ for (const Log_event::Byte* pos= start; pos < end;)
{
switch (*pos++) {
case Q_FLAGS2_CODE:
@@ -1411,7 +1426,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
break;
}
case Q_CATALOG_NZ_CODE:
- get_str_len_and_pointer(&catalog, (const char **)(&pos), &catalog_len);
+ get_str_len_and_pointer(&pos, &catalog, &catalog_len);
break;
case Q_AUTO_INCREMENT:
auto_increment_increment= uint2korr(pos);
@@ -1427,7 +1442,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
}
case Q_TIME_ZONE_CODE:
{
- get_str_len_and_pointer(&time_zone_str, (const char **)(&pos), &time_zone_len);
+ get_str_len_and_pointer(&pos, &time_zone_str, &time_zone_len);
break;
}
case Q_CATALOG_CODE: /* for 5.0.x where 0<=x<=3 masters */
@@ -1436,6 +1451,10 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
pos+= catalog_len+2; // leap over end 0
catalog_nz= 0; // catalog has end 0 in event
break;
+ case Q_LC_TIME_NAMES_CODE:
+ lc_time_names_number= uint2korr(pos);
+ pos+= 2;
+ break;
default:
/* That's why you must write status vars in growing order of code */
DBUG_PRINT("info",("Query_log_event has unknown status vars (first has\
@@ -1445,38 +1464,38 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
}
#if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE)
- if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
- time_zone_len + 1 +
- data_len + 1 +
- QUERY_CACHE_FLAGS_SIZE +
- db_len + 1,
- MYF(MY_WME))))
+ if (!(start= data_buf = (Log_event::Byte*) my_malloc(catalog_len + 1 +
+ time_zone_len + 1 +
+ data_len + 1 +
+ QUERY_CACHE_FLAGS_SIZE +
+ db_len + 1,
+ MYF(MY_WME))))
#else
- if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
- time_zone_len + 1 +
- data_len + 1,
- MYF(MY_WME))))
+ if (!(start= data_buf = (Log_event::Byte*) my_malloc(catalog_len + 1 +
+ time_zone_len + 1 +
+ data_len + 1,
+ MYF(MY_WME))))
#endif
DBUG_VOID_RETURN;
if (catalog_len) // If catalog is given
{
if (likely(catalog_nz)) // true except if event comes from 5.0.0|1|2|3.
- copy_str_and_move(&start, &catalog, catalog_len);
+ copy_str_and_move(&catalog, &start, catalog_len);
else
{
memcpy(start, catalog, catalog_len+1); // copy end 0
- catalog= start;
+ catalog= (const char *)start;
start+= catalog_len+1;
}
}
if (time_zone_len)
- copy_str_and_move(&start, &time_zone_str, time_zone_len);
+ copy_str_and_move(&time_zone_str, &start, time_zone_len);
/* A 2nd variable part; this is common to all versions */
memcpy((char*) start, end, data_len); // Copy db and query
start[data_len]= '\0'; // End query with \0 (For safetly)
- db= start;
- query= start + db_len + 1;
+ db= (char *)start;
+ query= (char *)(start + db_len + 1);
q_len= data_len - db_len -1;
DBUG_VOID_RETURN;
}
@@ -1507,15 +1526,16 @@ void Query_log_event::print_query_header(FILE* file,
if (different_db= memcmp(print_event_info->db, db, db_len + 1))
memcpy(print_event_info->db, db, db_len + 1);
if (db[0] && different_db)
- fprintf(file, "use %s;\n", db);
+ fprintf(file, "use %s%s\n", db, print_event_info->delimiter);
}
end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10);
- *end++=';';
+ end= strmov(end, print_event_info->delimiter);
*end++='\n';
my_fwrite(file, (byte*) buff, (uint) (end-buff),MYF(MY_NABP | MY_WME));
if (flags & LOG_EVENT_THREAD_SPECIFIC_F)
- fprintf(file,"SET @@session.pseudo_thread_id=%lu;\n",(ulong)thread_id);
+ fprintf(file,"SET @@session.pseudo_thread_id=%lu%s\n",
+ (ulong)thread_id, print_event_info->delimiter);
/*
If flags2_inited==0, this is an event from 3.23 or 4.0; nothing to
@@ -1544,7 +1564,7 @@ void Query_log_event::print_query_header(FILE* file,
"@@session.sql_auto_is_null", &need_comma);
print_set_option(file, tmp, OPTION_RELAXED_UNIQUE_CHECKS, ~flags2,
"@@session.unique_checks", &need_comma);
- fprintf(file,";\n");
+ fprintf(file,"%s\n", print_event_info->delimiter);
print_event_info->flags2= flags2;
}
}
@@ -1572,15 +1592,17 @@ void Query_log_event::print_query_header(FILE* file,
}
if (unlikely(print_event_info->sql_mode != sql_mode))
{
- fprintf(file,"SET @@session.sql_mode=%lu;\n",(ulong)sql_mode);
+ fprintf(file,"SET @@session.sql_mode=%lu%s\n",
+ (ulong)sql_mode, print_event_info->delimiter);
print_event_info->sql_mode= sql_mode;
}
}
if (print_event_info->auto_increment_increment != auto_increment_increment ||
print_event_info->auto_increment_offset != auto_increment_offset)
{
- fprintf(file,"SET @@session.auto_increment_increment=%lu, @@session.auto_increment_offset=%lu;\n",
- auto_increment_increment,auto_increment_offset);
+ fprintf(file,"SET @@session.auto_increment_increment=%lu, @@session.auto_increment_offset=%lu%s\n",
+ auto_increment_increment,auto_increment_offset,
+ print_event_info->delimiter);
print_event_info->auto_increment_increment= auto_increment_increment;
print_event_info->auto_increment_offset= auto_increment_offset;
}
@@ -1599,16 +1621,19 @@ void Query_log_event::print_query_header(FILE* file,
CHARSET_INFO *cs_info= get_charset(uint2korr(charset), MYF(MY_WME));
if (cs_info)
{
- fprintf(file, "/*!\\C %s */;\n", cs_info->csname); /* for mysql client */
+ /* for mysql client */
+ fprintf(file, "/*!\\C %s */%s\n",
+ cs_info->csname, print_event_info->delimiter);
}
fprintf(file,"SET "
"@@session.character_set_client=%d,"
"@@session.collation_connection=%d,"
"@@session.collation_server=%d"
- ";\n",
+ "%s\n",
uint2korr(charset),
uint2korr(charset+2),
- uint2korr(charset+4));
+ uint2korr(charset+4),
+ print_event_info->delimiter);
memcpy(print_event_info->charset, charset, 6);
}
}
@@ -1616,10 +1641,17 @@ void Query_log_event::print_query_header(FILE* file,
{
if (bcmp(print_event_info->time_zone_str, time_zone_str, time_zone_len+1))
{
- fprintf(file,"SET @@session.time_zone='%s';\n", time_zone_str);
+ fprintf(file,"SET @@session.time_zone='%s'%s\n",
+ time_zone_str, print_event_info->delimiter);
memcpy(print_event_info->time_zone_str, time_zone_str, time_zone_len+1);
}
}
+ if (lc_time_names_number != print_event_info->lc_time_names_number)
+ {
+ fprintf(file, "SET @@session.lc_time_names=%d%s\n",
+ lc_time_names_number, print_event_info->delimiter);
+ print_event_info->lc_time_names_number= lc_time_names_number;
+ }
}
@@ -1627,7 +1659,7 @@ void Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
{
print_query_header(file, print_event_info);
my_fwrite(file, (byte*) query, q_len, MYF(MY_NABP | MY_WME));
- fputs(";\n", file);
+ fprintf(file, "%s\n", print_event_info->delimiter);
}
#endif /* MYSQL_CLIENT */
@@ -1772,6 +1804,19 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli,
goto compare_errors;
}
}
+ if (lc_time_names_number)
+ {
+ if (!(thd->variables.lc_time_names=
+ my_locale_by_number(lc_time_names_number)))
+ {
+ my_printf_error(ER_UNKNOWN_ERROR,
+ "Unknown locale: '%d'", MYF(0), lc_time_names_number);
+ thd->variables.lc_time_names= &my_locale_en_US;
+ goto compare_errors;
+ }
+ }
+ else
+ thd->variables.lc_time_names= &my_locale_en_US;
/* Execute the query (note that we bypass dispatch_command()) */
mysql_parse(thd, thd->query, thd->query_length);
@@ -1981,9 +2026,9 @@ void Start_log_event_v3::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
and rollback unfinished transaction.
Probably this can be done with RESET CONNECTION (syntax to be defined).
*/
- fprintf(file,"RESET CONNECTION;\n");
+ fprintf(file,"RESET CONNECTION%s\n", print_event_info->delimiter);
#else
- fprintf(file,"ROLLBACK;\n");
+ fprintf(file,"ROLLBACK%s\n", print_event_info->delimiter);
#endif
}
fflush(file);
@@ -2717,13 +2762,14 @@ void Load_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info,
}
if (db && db[0] && different_db)
- fprintf(file, "%suse %s;\n",
+ fprintf(file, "%suse %s%s\n",
commented ? "# " : "",
- db);
+ db, print_event_info->delimiter);
if (flags & LOG_EVENT_THREAD_SPECIFIC_F)
- fprintf(file,"%sSET @@session.pseudo_thread_id=%lu;\n",
- commented ? "# " : "", (ulong)thread_id);
+ fprintf(file,"%sSET @@session.pseudo_thread_id=%lu%s\n",
+ commented ? "# " : "", (ulong)thread_id,
+ print_event_info->delimiter);
fprintf(file, "%sLOAD DATA ",
commented ? "# " : "");
if (check_fname_outside_temp_buf())
@@ -2775,7 +2821,7 @@ void Load_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info,
fputc(')', file);
}
- fprintf(file, ";\n");
+ fprintf(file, "%s\n", print_event_info->delimiter);
DBUG_VOID_RETURN;
}
#endif /* MYSQL_CLIENT */
@@ -3352,7 +3398,8 @@ void Intvar_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
msg="INVALID_INT";
break;
}
- fprintf(file, "%s=%s;\n", msg, llstr(val,llbuff));
+ fprintf(file, "%s=%s%s\n",
+ msg, llstr(val,llbuff), print_event_info->delimiter);
fflush(file);
}
#endif
@@ -3427,8 +3474,9 @@ void Rand_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
print_header(file, print_event_info);
fprintf(file, "\tRand\n");
}
- fprintf(file, "SET @@RAND_SEED1=%s, @@RAND_SEED2=%s;\n",
- llstr(seed1, llbuff),llstr(seed2, llbuff2));
+ fprintf(file, "SET @@RAND_SEED1=%s, @@RAND_SEED2=%s%s\n",
+ llstr(seed1, llbuff),llstr(seed2, llbuff2),
+ print_event_info->delimiter);
fflush(file);
}
#endif /* MYSQL_CLIENT */
@@ -3500,7 +3548,7 @@ void Xid_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
fprintf(file, "\tXid = %s\n", buf);
fflush(file);
}
- fprintf(file, "COMMIT;\n");
+ fprintf(file, "COMMIT%s\n", print_event_info->delimiter);
}
#endif /* MYSQL_CLIENT */
@@ -3701,7 +3749,7 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
if (is_null)
{
- fprintf(file, ":=NULL;\n");
+ fprintf(file, ":=NULL%s\n", print_event_info->delimiter);
}
else
{
@@ -3709,12 +3757,12 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
case REAL_RESULT:
double real_val;
float8get(real_val, val);
- fprintf(file, ":=%.14g;\n", real_val);
+ fprintf(file, ":=%.14g%s\n", real_val, print_event_info->delimiter);
break;
case INT_RESULT:
char int_buf[22];
longlong10_to_str(uint8korr(val), int_buf, -10);
- fprintf(file, ":=%s;\n", int_buf);
+ fprintf(file, ":=%s%s\n", int_buf, print_event_info->delimiter);
break;
case DECIMAL_RESULT:
{
@@ -3730,7 +3778,7 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
bin2decimal(val+2, &dec, precision, scale);
decimal2string(&dec, str_buf, &str_len, 0, 0, 0);
str_buf[str_len]= 0;
- fprintf(file, ":=%s;\n",str_buf);
+ fprintf(file, ":=%s%s\n",str_buf, print_event_info->delimiter);
break;
}
case STRING_RESULT:
@@ -3766,9 +3814,10 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
Generate an unusable command (=> syntax error) is probably the best
thing we can do here.
*/
- fprintf(file, ":=???;\n");
+ fprintf(file, ":=???%s\n", print_event_info->delimiter);
else
- fprintf(file, ":=_%s %s COLLATE `%s`;\n", cs->csname, hex_str, cs->name);
+ fprintf(file, ":=_%s %s COLLATE `%s`%s\n",
+ cs->csname, hex_str, cs->name, print_event_info->delimiter);
my_afree(hex_str);
}
break;
@@ -4867,12 +4916,12 @@ void Execute_load_query_log_event::print(FILE* file,
fprintf(file, " INTO");
my_fwrite(file, (byte*) query + fn_pos_end, q_len-fn_pos_end,
MYF(MY_NABP | MY_WME));
- fprintf(file, ";\n");
+ fprintf(file, "%s\n", print_event_info->delimiter);
}
else
{
my_fwrite(file, (byte*) query, q_len, MYF(MY_NABP | MY_WME));
- fprintf(file, ";\n");
+ fprintf(file, "%s\n", print_event_info->delimiter);
}
if (!print_event_info->short_form)
diff --git a/sql/log_event.h b/sql/log_event.h
index 247e1962776..fd2a5e5fb63 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -271,6 +270,8 @@ struct sql_ex_info
*/
#define Q_CATALOG_NZ_CODE 6
+#define Q_LC_TIME_NAMES_CODE 7
+
/* Intvar event post-header */
#define I_TYPE_OFFSET 0
@@ -507,9 +508,11 @@ typedef struct st_print_event_info
bool charset_inited;
char charset[6]; // 3 variables, each of them storable in 2 bytes
char time_zone_str[MAX_TIME_ZONE_NAME_LENGTH];
+ uint lc_time_names_number;
st_print_event_info()
:flags2_inited(0), sql_mode_inited(0),
- auto_increment_increment(1),auto_increment_offset(1), charset_inited(0)
+ auto_increment_increment(1),auto_increment_offset(1), charset_inited(0),
+ lc_time_names_number(0)
{
/*
Currently we only use static PRINT_EVENT_INFO objects, so zeroed at
@@ -519,12 +522,14 @@ typedef struct st_print_event_info
bzero(db, sizeof(db));
bzero(charset, sizeof(charset));
bzero(time_zone_str, sizeof(time_zone_str));
+ strcpy(delimiter, ";");
}
/* Settings on how to print the events */
bool short_form;
my_off_t hexdump_from;
uint8 common_header_len;
+ char delimiter[16];
} PRINT_EVENT_INFO;
#endif
@@ -541,6 +546,13 @@ class Log_event
{
public:
/*
+ The following type definition is to be used whenever data is placed
+ and manipulated in a common buffer. Use this typedef for buffers
+ that contain data containing binary and character data.
+ */
+ typedef unsigned char Byte;
+
+ /*
The offset in the log where this event originally appeared (it is
preserved in relay logs, making SHOW SLAVE STATUS able to print
coordinates of the event in the master's binlog). Note: when a
@@ -713,7 +725,7 @@ public:
class Query_log_event: public Log_event
{
protected:
- char* data_buf;
+ Log_event::Byte* data_buf;
public:
const char* query;
const char* catalog;
@@ -784,6 +796,7 @@ public:
char charset[6];
uint time_zone_len; /* 0 means uninited */
const char *time_zone_str;
+ uint lc_time_names_number; /* 0 means en_US */
#ifndef MYSQL_CLIENT
diff --git a/sql/matherr.c b/sql/matherr.c
index ea0c15d2feb..4998d8b4961 100644
--- a/sql/matherr.c
+++ b/sql/matherr.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/mf_iocache.cc b/sql/mf_iocache.cc
index 71c8d588de7..f237f15dbc9 100644
--- a/sql/mf_iocache.cc
+++ b/sql/mf_iocache.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/my_decimal.cc b/sql/my_decimal.cc
index f33609e0168..0ef1f9794ba 100644
--- a/sql/my_decimal.cc
+++ b/sql/my_decimal.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2005-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/my_decimal.h b/sql/my_decimal.h
index af3edade8d6..45270150d22 100644
--- a/sql/my_decimal.h
+++ b/sql/my_decimal.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2005-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/my_lock.c b/sql/my_lock.c
index 7f47256703a..cbd00521a9b 100644
--- a/sql/my_lock.c
+++ b/sql/my_lock.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index a63b714e0b0..8ffa73d1707 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -109,6 +108,7 @@ enum Derivation
typedef struct my_locale_st
{
+ uint number;
const char *name;
const char *description;
const bool is_ascii;
@@ -117,9 +117,11 @@ typedef struct my_locale_st
TYPELIB *day_names;
TYPELIB *ab_day_names;
#ifdef __cplusplus
- my_locale_st(const char *name_par, const char *descr_par, bool is_ascii_par,
+ my_locale_st(uint number_par,
+ const char *name_par, const char *descr_par, bool is_ascii_par,
TYPELIB *month_names_par, TYPELIB *ab_month_names_par,
TYPELIB *day_names_par, TYPELIB *ab_day_names_par) :
+ number(number_par),
name(name_par), description(descr_par), is_ascii(is_ascii_par),
month_names(month_names_par), ab_month_names(ab_month_names_par),
day_names(day_names_par), ab_day_names(ab_day_names_par)
@@ -131,6 +133,7 @@ extern MY_LOCALE my_locale_en_US;
extern MY_LOCALE *my_locales[];
MY_LOCALE *my_locale_by_name(const char *name);
+MY_LOCALE *my_locale_by_number(uint number);
/***************************************************************************
Configuration parameters
@@ -745,7 +748,7 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
bool mysql_select(THD *thd, Item ***rref_pointer_array,
TABLE_LIST *tables, uint wild_num, List<Item> &list,
COND *conds, uint og_num, ORDER *order, ORDER *group,
- Item *having, ORDER *proc_param, ulong select_type,
+ Item *having, ORDER *proc_param, ulonglong select_type,
select_result *result, SELECT_LEX_UNIT *unit,
SELECT_LEX *select_lex);
void free_underlaid_joins(THD *thd, SELECT_LEX *select);
@@ -774,17 +777,15 @@ int prepare_create_field(create_field *sql_field,
uint table_flags);
bool mysql_create_table(THD *thd,const char *db, const char *table_name,
HA_CREATE_INFO *create_info,
- List<create_field> &fields, List<Key> &keys,
+ Alter_info *alter_info,
bool tmp_table, uint select_field_count);
bool mysql_alter_table(THD *thd, char *new_db, char *new_name,
HA_CREATE_INFO *create_info,
TABLE_LIST *table_list,
- List<create_field> &fields,
- List<Key> &keys,
- uint order_num, ORDER *order, bool ignore,
- ALTER_INFO *alter_info, bool do_send_ok);
-bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list, bool do_send_ok);
+ Alter_info *alter_info,
+ uint order_num, ORDER *order, bool ignore);
+bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list);
bool mysql_create_like_table(THD *thd, TABLE_LIST *table,
HA_CREATE_INFO *create_info,
Table_ident *src_table);
@@ -793,9 +794,6 @@ bool mysql_rename_table(enum db_type base,
const char * old_name,
const char *new_db,
const char * new_name);
-bool mysql_create_index(THD *thd, TABLE_LIST *table_list, List<Key> &keys);
-bool mysql_drop_index(THD *thd, TABLE_LIST *table_list,
- ALTER_INFO *alter_info);
bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list,
Item **conds, uint order_num, ORDER *order);
int mysql_update(THD *thd,TABLE_LIST *tables,List<Item> &fields,
@@ -897,7 +895,8 @@ int get_quote_char_for_identifier(THD *thd, const char *name, uint length);
void mysqld_list_fields(THD *thd,TABLE_LIST *table, const char *wild);
int mysqld_dump_create_info(THD *thd, TABLE_LIST *table_list, int fd);
bool mysqld_show_create(THD *thd, TABLE_LIST *table_list);
-bool mysqld_show_create_db(THD *thd, char *dbname, HA_CREATE_INFO *create);
+bool mysqld_show_create_db(THD *thd, char *dbname,
+ const HA_CREATE_INFO *create);
void mysqld_list_processes(THD *thd,const char *user,bool verbose);
int mysqld_show_status(THD *thd);
@@ -952,6 +951,7 @@ bool mysql_ha_read(THD *, TABLE_LIST *,enum enum_ha_read_modes,char *,
List<Item> *,enum ha_rkey_function,Item *,ha_rows,ha_rows);
int mysql_ha_flush(THD *thd, TABLE_LIST *tables, uint mode_flags,
bool is_locked);
+void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table);
/* mysql_ha_flush mode_flags bits */
#define MYSQL_HA_CLOSE_FINAL 0x00
#define MYSQL_HA_REOPEN_ON_USAGE 0x01
@@ -1157,6 +1157,7 @@ File open_binlog(IO_CACHE *log, const char *log_file_name,
/* mysqld.cc */
extern void MYSQLerror(const char*);
void refresh_status(THD *thd);
+my_bool mysql_rm_tmp_tables(void);
/* item_func.cc */
extern bool check_reserved_words(LEX_STRING *name);
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index ec50ee26fc8..4ee8c2e7e31 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -52,6 +51,10 @@
#define OPT_NDBCLUSTER_DEFAULT 0
#endif
+#ifndef DEFAULT_SKIP_THREAD_PRIORITY
+#define DEFAULT_SKIP_THREAD_PRIORITY 0
+#endif
+
#include <thr_alarm.h>
#include <ft_global.h>
#include <errmsg.h>
@@ -70,6 +73,12 @@
#define IF_PURIFY(A,B) (B)
#endif
+#if SIZEOF_CHARP == 4
+#define MAX_MEM_TABLE_SIZE ~(ulong) 0
+#else
+#define MAX_MEM_TABLE_SIZE ~(ulonglong) 0
+#endif
+
/* stack traces are only supported on linux intel */
#if defined(__linux__) && defined(__i386__) && defined(USE_PSTACK)
#define HAVE_STACK_TRACE_ON_SEGV
@@ -333,7 +342,7 @@ bool opt_error_log= IF_WIN(1,0);
bool opt_disable_networking=0, opt_skip_show_db=0;
my_bool opt_character_set_client_handshake= 1;
bool server_id_supplied = 0;
-bool opt_endinfo,using_udf_functions;
+bool opt_endinfo, using_udf_functions;
my_bool locked_in_memory;
bool opt_using_transactions, using_update_log;
bool volatile abort_loop;
@@ -1532,7 +1541,7 @@ static void network_init(void)
if (strlen(mysqld_unix_port) > (sizeof(UNIXaddr.sun_path) - 1))
{
sql_print_error("The socket file path is too long (> %u): %s",
- sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
+ (uint) sizeof(UNIXaddr.sun_path) - 1, mysqld_unix_port);
unireg_abort(1);
}
if ((unix_sock= socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
@@ -2108,13 +2117,24 @@ later when used with nscd), disable LDAP in your nsswitch.conf, or use a\n\
mysqld that is not statically linked.\n");
#endif
- if (test_flags & TEST_CORE_ON_SIGNAL)
- {
- fprintf(stderr, "Writing a core file\n");
- fflush(stderr);
- write_core(sig);
- }
- exit(1);
+ if (locked_in_memory)
+ {
+ fprintf(stderr, "\n\
+The \"--memlock\" argument, which was enabled, uses system calls that are\n\
+unreliable and unstable on some operating systems and operating-system\n\
+versions (notably, some versions of Linux). This crash could be due to use\n\
+of those buggy OS calls. You should consider whether you really need the\n\
+\"--memlock\" parameter and/or consult the OS distributer about \"mlockall\"\n\
+bugs.\n");
+ }
+
+ if (test_flags & TEST_CORE_ON_SIGNAL)
+ {
+ fprintf(stderr, "Writing a core file\n");
+ fflush(stderr);
+ write_core(sig);
+ }
+ exit(1);
}
#ifndef SA_RESETHAND
@@ -3323,8 +3343,10 @@ int win_main(int argc, char **argv)
int main(int argc, char **argv)
#endif
{
- DEBUGGER_OFF;
MY_INIT(argv[0]); // init my_sys library & pthreads
+ /* ^^^ Nothing should be before this line! */
+
+ DEBUGGER_OFF;
#ifdef _CUSTOMSTARTUPCONFIG_
if (_cust_check_startup())
@@ -3474,7 +3496,7 @@ we force server id to 2, but this MySQL server will not act as a slave.");
*/
error_handler_hook= my_message_sql;
start_signal_handler(); // Creates pidfile
- if (acl_init(opt_noacl) ||
+ if (mysql_rm_tmp_tables() || acl_init(opt_noacl) ||
my_tz_init((THD *)0, default_tz_name, opt_bootstrap))
{
abort_loop=1;
@@ -4555,8 +4577,8 @@ enum options_mysqld
OPT_LOG_BIN_TRUST_FUNCTION_CREATORS,
OPT_SAFE_SHOW_DB, OPT_INNODB_SAFE_BINLOG,
OPT_INNODB, OPT_ISAM,
- OPT_ENGINE_CONDITION_PUSHDOWN,
- OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING, OPT_NDB_USE_EXACT_COUNT,
+ OPT_ENGINE_CONDITION_PUSHDOWN, OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
+ OPT_NDB_USE_EXACT_COUNT, OPT_NDB_USE_TRANSACTIONS,
OPT_NDB_FORCE_SEND, OPT_NDB_AUTOINCREMENT_PREFETCH_SZ,
OPT_NDB_SHM, OPT_NDB_OPTIMIZED_NODE_SELECTION, OPT_NDB_CACHE_CHECK_TIME,
OPT_NDB_MGMD, OPT_NDB_NODEID,
@@ -4675,7 +4697,8 @@ enum options_mysqld
OPT_LOG_SLOW_ADMIN_STATEMENTS,
OPT_TABLE_LOCK_WAIT_TIMEOUT,
OPT_PORT_OPEN_TIMEOUT,
- OPT_MERGE
+ OPT_MERGE,
+ OPT_INNODB_ROLLBACK_ON_TIMEOUT
};
@@ -4757,8 +4780,10 @@ Disable with --skip-bdb (will save memory).",
{"binlog-ignore-db", OPT_BINLOG_IGNORE_DB,
"Tells the master that updates to the given database should not be logged tothe binary log.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+#ifndef DISABLE_GRANT_OPTIONS
{"bootstrap", OPT_BOOTSTRAP, "Used by mysql installation scripts.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
+#endif
{"character-set-client-handshake", OPT_CHARACTER_SET_CLIENT_HANDSHAKE,
"Don't ignore client side character set value sent during handshake.",
(gptr*) &opt_character_set_client_handshake,
@@ -4874,9 +4899,11 @@ Disable with --skip-large-pages.",
{"init-connect", OPT_INIT_CONNECT, "Command(s) that are executed for each new connection",
(gptr*) &opt_init_connect, (gptr*) &opt_init_connect, 0, GET_STR_ALLOC,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+#ifndef DISABLE_GRANT_OPTIONS
{"init-file", OPT_INIT_FILE, "Read SQL commands from this file at startup.",
(gptr*) &opt_init_file, (gptr*) &opt_init_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
+#endif
{"init-rpl-role", OPT_INIT_RPL_ROLE, "Set the replication role.", 0, 0, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"init-slave", OPT_INIT_SLAVE, "Command(s) that are executed when a slave connects to this master",
@@ -4951,6 +4978,10 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
(gptr*) &srv_max_purge_lag,
(gptr*) &srv_max_purge_lag, 0, GET_LONG, REQUIRED_ARG, 0, 0, ~0L,
0, 1L, 0},
+ {"innodb_rollback_on_timeout", OPT_INNODB_ROLLBACK_ON_TIMEOUT,
+ "Roll back the complete transaction on lock wait timeout, for 4.x compatibility (disabled by default)",
+ (gptr*) &innobase_rollback_on_timeout, (gptr*) &innobase_rollback_on_timeout,
+ 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"innodb_status_file", OPT_INNODB_STATUS_FILE,
"Enable SHOW INNODB STATUS output in the innodb_status.<pid> file",
(gptr*) &innobase_create_status_file, (gptr*) &innobase_create_status_file,
@@ -5182,6 +5213,17 @@ Disable with --skip-ndbcluster (will save memory).",
(gptr*) &global_system_variables.ndb_use_exact_count,
(gptr*) &global_system_variables.ndb_use_exact_count,
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
+ {"ndb-use-transactions", OPT_NDB_USE_TRANSACTIONS,
+ "Use transactions for large inserts, if enabled then large "
+ "inserts will be split into several smaller transactions",
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
+ {"ndb_use_transactions", OPT_NDB_USE_TRANSACTIONS,
+ "same as --ndb-use-transactions.",
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ (gptr*) &global_system_variables.ndb_use_transactions,
+ 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
{"ndb-shm", OPT_NDB_SHM,
"Use shared memory connections when available.",
(gptr*) &opt_ndb_shm,
@@ -5327,10 +5369,12 @@ Can't be set to 1 if --log-slave-updates is used.",
"Show user and password in SHOW SLAVE HOSTS on this master",
(gptr*) &opt_show_slave_auth_info, (gptr*) &opt_show_slave_auth_info, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+#ifndef DISABLE_GRANT_OPTIONS
{"skip-grant-tables", OPT_SKIP_GRANT,
"Start without grant tables. This gives all users FULL ACCESS to all tables!",
(gptr*) &opt_noacl, (gptr*) &opt_noacl, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
0},
+#endif
{"skip-host-cache", OPT_SKIP_HOST_CACHE, "Don't cache host names.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip-locking", OPT_SKIP_LOCK,
@@ -5363,8 +5407,8 @@ Can't be set to 1 if --log-slave-updates is used.",
{"skip-symlink", OPT_SKIP_SYMLINKS, "Don't allow symlinking of tables. Deprecated option. Use --skip-symbolic-links instead.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"skip-thread-priority", OPT_SKIP_PRIOR,
- "Don't give threads different priorities.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0,
- 0, 0, 0, 0, 0},
+ "Don't give threads different priorities.", 0, 0, 0, GET_NO_ARG, NO_ARG,
+ DEFAULT_SKIP_THREAD_PRIORITY, 0, 0, 0, 0, 0},
#ifdef HAVE_REPLICATION
{"slave-load-tmpdir", OPT_SLAVE_LOAD_TMPDIR,
"The location where the slave should put its temporary files when \
@@ -5435,6 +5479,11 @@ log and this option does nothing anymore.",
0, 0, 0, 0, 0},
{"use-symbolic-links", 's', "Enable symbolic link support. Deprecated option; use --symbolic-links instead.",
(gptr*) &my_use_symdir, (gptr*) &my_use_symdir, 0, GET_BOOL, NO_ARG,
+ /*
+ The system call realpath() produces warnings under valgrind and
+ purify. These are not suppressed: instead we disable symlinks
+ option if compiled with valgrind support.
+ */
IF_PURIFY(0,1), 0, 0, 0, 0, 0},
{"user", 'u', "Run mysqld daemon as user.", 0, 0, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
@@ -5718,8 +5767,9 @@ The minimum value for this variable is 4096.",
{"max_heap_table_size", OPT_MAX_HEP_TABLE_SIZE,
"Don't allow creation of heap tables bigger than this.",
(gptr*) &global_system_variables.max_heap_table_size,
- (gptr*) &max_system_variables.max_heap_table_size, 0, GET_ULONG,
- REQUIRED_ARG, 16*1024*1024L, 16384, ~0L, MALLOC_OVERHEAD, 1024, 0},
+ (gptr*) &max_system_variables.max_heap_table_size, 0, GET_ULL,
+ REQUIRED_ARG, 16*1024*1024L, 16384, MAX_MEM_TABLE_SIZE,
+ MALLOC_OVERHEAD, 1024, 0},
{"max_join_size", OPT_MAX_JOIN_SIZE,
"Joins that are probably going to read more than max_join_size records return an error.",
(gptr*) &global_system_variables.max_join_size,
@@ -5994,8 +6044,8 @@ The minimum value for this variable is 4096.",
{"tmp_table_size", OPT_TMP_TABLE_SIZE,
"If an in-memory temporary table exceeds this size, MySQL will automatically convert it to an on-disk MyISAM table.",
(gptr*) &global_system_variables.tmp_table_size,
- (gptr*) &max_system_variables.tmp_table_size, 0, GET_ULONG,
- REQUIRED_ARG, 32*1024*1024L, 1024, ~0L, 0, 1, 0},
+ (gptr*) &max_system_variables.tmp_table_size, 0, GET_ULL,
+ REQUIRED_ARG, 32*1024*1024L, 1024, MAX_MEM_TABLE_SIZE, 0, 1, 0},
{"transaction_alloc_block_size", OPT_TRANS_ALLOC_BLOCK_SIZE,
"Allocation block size for transactions to be stored in binary log",
(gptr*) &global_system_variables.trans_alloc_block_size,
@@ -6047,6 +6097,7 @@ struct show_var_st status_vars[]= {
{"Com_create_function", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_FUNCTION]), SHOW_LONG_STATUS},
{"Com_create_index", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_INDEX]), SHOW_LONG_STATUS},
{"Com_create_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_TABLE]), SHOW_LONG_STATUS},
+ {"Com_create_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CREATE_USER]), SHOW_LONG_STATUS},
{"Com_dealloc_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DEALLOCATE_PREPARE]), SHOW_LONG_STATUS},
{"Com_delete", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE]), SHOW_LONG_STATUS},
{"Com_delete_multi", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DELETE_MULTI]), SHOW_LONG_STATUS},
diff --git a/sql/mysqld_suffix.h b/sql/mysqld_suffix.h
index 405c5d855b7..b348f272db1 100644
--- a/sql/mysqld_suffix.h
+++ b/sql/mysqld_suffix.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index e84b2266e82..df042ada79f 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -597,7 +596,10 @@ net_real_write(NET *net,const char *packet,ulong len)
}
#endif /* HAVE_COMPRESS */
- /* DBUG_DUMP("net",packet,len); */
+#ifdef DEBUG_DATA_PACKETS
+ DBUG_DUMP("data",packet,len);
+#endif
+
#ifndef NO_ALARM
thr_alarm_init(&alarmed);
if (net_blocking)
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index ef755d868d9..04bc24b718a 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -875,7 +874,11 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT()
if (file)
{
range_end();
- file->extra(HA_EXTRA_NO_KEYREAD);
+ if (head->key_read)
+ {
+ head->key_read= 0;
+ file->extra(HA_EXTRA_NO_KEYREAD);
+ }
if (free_file)
{
DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file,
@@ -1017,8 +1020,12 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
if (reuse_handler)
{
DBUG_PRINT("info", ("Reusing handler %p", file));
- if (file->extra(HA_EXTRA_KEYREAD) ||
- file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) ||
+ if (!head->no_keyread)
+ {
+ head->key_read= 1;
+ file->extra(HA_EXTRA_KEYREAD);
+ }
+ if (file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) ||
init() || reset())
{
DBUG_RETURN(1);
@@ -1041,9 +1048,12 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
}
if (file->external_lock(thd, F_RDLCK))
goto failure;
-
- if (file->extra(HA_EXTRA_KEYREAD) ||
- file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) ||
+ if (!head->no_keyread)
+ {
+ head->key_read= 1;
+ file->extra(HA_EXTRA_KEYREAD);
+ }
+ if (file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) ||
init() || reset())
{
file->external_lock(thd, F_UNLCK);
@@ -1924,7 +1934,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
key_parts->null_bit= key_part_info->null_bit;
key_parts->image_type =
(key_info->flags & HA_SPATIAL) ? Field::itMBR : Field::itRAW;
- key_parts->flag= key_part_info->key_part_flag;
+ key_parts->flag= (uint8) key_part_info->key_part_flag;
}
param.real_keynr[param.keys++]=idx;
}
@@ -3703,7 +3713,8 @@ static SEL_TREE *get_func_mm_tree(PARAM *param, Item_func *cond_func,
for (uint idx= 0; idx < param->keys; idx++)
{
SEL_ARG *new_interval, *last_val;
- if (((new_interval= tree2->keys[idx])) &&
+ if (((new_interval= tree2->keys[idx])) &&
+ (tree->keys[idx]) &&
((last_val= tree->keys[idx]->last())))
{
new_interval->min_value= last_val->max_value;
@@ -6240,7 +6251,7 @@ QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
key_part->length= key_info->key_part[part].length;
key_part->store_length= key_info->key_part[part].store_length;
key_part->null_bit= key_info->key_part[part].null_bit;
- key_part->flag= key_info->key_part[part].key_part_flag;
+ key_part->flag= (uint8) key_info->key_part[part].key_part_flag;
}
if (insert_dynamic(&quick->ranges,(gptr)&range))
goto err;
@@ -7445,7 +7456,7 @@ static TRP_GROUP_MIN_MAX *
get_best_group_min_max(PARAM *param, SEL_TREE *tree)
{
THD *thd= param->thd;
- JOIN *join= thd->lex->select_lex.join;
+ JOIN *join= thd->lex->current_select->join;
TABLE *table= param->table;
bool have_min= FALSE; /* TRUE if there is a MIN function. */
bool have_max= FALSE; /* TRUE if there is a MAX function. */
@@ -7466,7 +7477,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree)
DBUG_ENTER("get_best_group_min_max");
/* Perform few 'cheap' tests whether this access method is applicable. */
- if (!join || (thd->lex->sql_command != SQLCOM_SELECT))
+ if (!join)
DBUG_RETURN(NULL); /* This is not a select statement. */
if ((join->tables != 1) || /* The query must reference one table. */
((!join->group_list) && /* Neither GROUP BY nor a DISTINCT query. */
@@ -8316,7 +8327,7 @@ TRP_GROUP_MIN_MAX::make_quick(PARAM *param, bool retrieve_full_rows,
DBUG_ENTER("TRP_GROUP_MIN_MAX::make_quick");
quick= new QUICK_GROUP_MIN_MAX_SELECT(param->table,
- param->thd->lex->select_lex.join,
+ param->thd->lex->current_select->join,
have_min, have_max, min_max_arg_part,
group_prefix_len, used_key_parts,
index_info, index, read_cost, records,
diff --git a/sql/opt_range.h b/sql/opt_range.h
index f22b157df86..cbd27d389ad 100644
--- a/sql/opt_range.h
+++ b/sql/opt_range.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/opt_sum.cc b/sql/opt_sum.cc
index fc4edabc4a4..e8bc15a93f1 100644
--- a/sql/opt_sum.cc
+++ b/sql/opt_sum.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/parse_file.cc b/sql/parse_file.cc
index 415465b0cd1..1351cf66161 100644
--- a/sql/parse_file.cc
+++ b/sql/parse_file.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/parse_file.h b/sql/parse_file.h
index 5fb65b4c7ec..ab8b34561fe 100644
--- a/sql/parse_file.h
+++ b/sql/parse_file.h
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/password.c b/sql/password.c
index 506e1aa36a2..bb5b2693f26 100644
--- a/sql/password.c
+++ b/sql/password.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -406,7 +405,7 @@ make_scrambled_password(char *to, const char *password)
mysql_sha1_result(&sha1_context, hash_stage2);
/* convert hash_stage2 to hex string */
*to++= PVERSION41_CHAR;
- octet2hex(to, hash_stage2, SHA1_HASH_SIZE);
+ octet2hex(to, (char*) hash_stage2, SHA1_HASH_SIZE);
}
@@ -520,5 +519,5 @@ void get_salt_from_password(uint8 *hash_stage2, const char *password)
void make_password_from_salt(char *to, const uint8 *hash_stage2)
{
*to++= PVERSION41_CHAR;
- octet2hex(to, hash_stage2, SHA1_HASH_SIZE);
+ octet2hex(to, (char*) hash_stage2, SHA1_HASH_SIZE);
}
diff --git a/sql/procedure.cc b/sql/procedure.cc
index 554e2cd0565..bbfabc46608 100644
--- a/sql/procedure.cc
+++ b/sql/procedure.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2002, 2004-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/procedure.h b/sql/procedure.h
index aceadd10883..850d5c74db4 100644
--- a/sql/procedure.h
+++ b/sql/procedure.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/protocol.cc b/sql/protocol.cc
index e7a8d493341..757e7aae026 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/protocol.h b/sql/protocol.h
index 7e2bc1516ec..0e00a7c21e0 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/records.cc b/sql/records.cc
index 78473659b22..3a833c87b7b 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 21e46e71825..2cd733db647 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB & Sasha
+/* Copyright (C) 2001-2006 MySQL AB & Sasha
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/repl_failsafe.h b/sql/repl_failsafe.h
index 19849e63af9..561db00d841 100644
--- a/sql/repl_failsafe.h
+++ b/sql/repl_failsafe.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB & Sasha
+/* Copyright (C) 2001-2005 MySQL AB & Sasha
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/set_var.cc b/sql/set_var.cc
index b1dd6123d9c..9b02a192fe5 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -247,7 +246,7 @@ sys_var_thd_ulong sys_max_delayed_threads("max_delayed_threads",
fix_max_connections);
sys_var_thd_ulong sys_max_error_count("max_error_count",
&SV::max_error_count);
-sys_var_thd_ulong sys_max_heap_table_size("max_heap_table_size",
+sys_var_thd_ulonglong sys_max_heap_table_size("max_heap_table_size",
&SV::max_heap_table_size);
sys_var_thd_ulong sys_pseudo_thread_id("pseudo_thread_id",
&SV::pseudo_thread_id,
@@ -414,7 +413,7 @@ sys_var_thd_enum sys_tx_isolation("tx_isolation",
&SV::tx_isolation,
&tx_isolation_typelib,
fix_tx_isolation);
-sys_var_thd_ulong sys_tmp_table_size("tmp_table_size",
+sys_var_thd_ulonglong sys_tmp_table_size("tmp_table_size",
&SV::tmp_table_size);
sys_var_bool_ptr sys_timed_mutexes("timed_mutexes",
&timed_mutexes);
@@ -904,6 +903,7 @@ struct show_var_st init_vars[]= {
{sys_innodb_max_purge_lag.name, (char*) &sys_innodb_max_purge_lag, SHOW_SYS},
{"innodb_mirrored_log_groups", (char*) &innobase_mirrored_log_groups, SHOW_LONG},
{"innodb_open_files", (char*) &innobase_open_files, SHOW_LONG },
+ {"innodb_rollback_on_timeout", (char*) &innobase_rollback_on_timeout, SHOW_MY_BOOL},
{sys_innodb_support_xa.name, (char*) &sys_innodb_support_xa, SHOW_SYS},
{sys_innodb_sync_spin_loops.name, (char*) &sys_innodb_sync_spin_loops, SHOW_SYS},
{sys_innodb_table_locks.name, (char*) &sys_innodb_table_locks, SHOW_SYS},
@@ -2776,17 +2776,39 @@ byte *sys_var_max_user_conn::value_ptr(THD *thd, enum_var_type type,
return (byte*) &(max_user_connections);
}
+
bool sys_var_thd_lc_time_names::check(THD *thd, set_var *var)
{
- char *locale_str =var->value->str_value.c_ptr();
- MY_LOCALE *locale_match= my_locale_by_name(locale_str);
+ MY_LOCALE *locale_match;
- if (locale_match == NULL)
+ if (var->value->result_type() == INT_RESULT)
{
- my_printf_error(ER_UNKNOWN_ERROR,
- "Unknown locale: '%s'", MYF(0), locale_str);
- return 1;
+ if (!(locale_match= my_locale_by_number((uint) var->value->val_int())))
+ {
+ char buf[20];
+ int10_to_str((int) var->value->val_int(), buf, -10);
+ my_printf_error(ER_UNKNOWN_ERROR, "Unknown locale: '%s'", MYF(0), buf);
+ return 1;
+ }
+ }
+ else // STRING_RESULT
+ {
+ char buff[6];
+ String str(buff, sizeof(buff), &my_charset_latin1), *res;
+ if (!(res=var->value->val_str(&str)))
+ {
+ my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, "NULL");
+ return 1;
+ }
+ const char *locale_str= res->c_ptr();
+ if (!(locale_match= my_locale_by_name(locale_str)))
+ {
+ my_printf_error(ER_UNKNOWN_ERROR,
+ "Unknown locale: '%s'", MYF(0), locale_str);
+ return 1;
+ }
}
+
var->save_result.locale_value= locale_match;
return 0;
}
@@ -2830,7 +2852,7 @@ static bool set_option_autocommit(THD *thd, set_var *var)
{
/* The test is negative as the flag we use is NOT autocommit */
- ulong org_options=thd->options;
+ ulonglong org_options= thd->options;
if (var->save_result.ulong_value != 0)
thd->options&= ~((sys_var_thd_bit*) var->var)->bit_flag;
diff --git a/sql/set_var.h b/sql/set_var.h
index 11de6ceafe5..8cf9ba60c49 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -819,13 +818,17 @@ class sys_var_thd_lc_time_names :public sys_var_thd
{
public:
sys_var_thd_lc_time_names(const char *name_arg):
- sys_var_thd(name_arg)
- {}
+ sys_var_thd(name_arg)
+ {
+#if MYSQL_VERSION_ID < 50000
+ no_support_one_shot= 0;
+#endif
+ }
bool check(THD *thd, set_var *var);
SHOW_TYPE type() { return SHOW_CHAR; }
bool check_update_type(Item_result type)
{
- return type != STRING_RESULT; /* Only accept strings */
+ return ((type != STRING_RESULT) && (type != INT_RESULT));
}
bool check_default(enum_var_type type) { return 0; }
bool update(THD *thd, set_var *var);
diff --git a/sql/share/Makefile.am b/sql/share/Makefile.am
index 6d905ba35dc..68b393e619f 100644
--- a/sql/share/Makefile.am
+++ b/sql/share/Makefile.am
@@ -2,8 +2,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/Index.xml b/sql/share/charsets/Index.xml
index 8715f91a07e..ae72daa8ca2 100644
--- a/sql/share/charsets/Index.xml
+++ b/sql/share/charsets/Index.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/armscii8.xml b/sql/share/charsets/armscii8.xml
index d0ab428345f..714e57bb12e 100644
--- a/sql/share/charsets/armscii8.xml
+++ b/sql/share/charsets/armscii8.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/ascii.xml b/sql/share/charsets/ascii.xml
index 3813bd42601..97006c53680 100644
--- a/sql/share/charsets/ascii.xml
+++ b/sql/share/charsets/ascii.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/cp1250.xml b/sql/share/charsets/cp1250.xml
index 1e62e64ad5a..0bda643c910 100644
--- a/sql/share/charsets/cp1250.xml
+++ b/sql/share/charsets/cp1250.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/cp1251.xml b/sql/share/charsets/cp1251.xml
index 7f94788c0d0..b80db9f8ec0 100644
--- a/sql/share/charsets/cp1251.xml
+++ b/sql/share/charsets/cp1251.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/cp1256.xml b/sql/share/charsets/cp1256.xml
index 69eb6a68238..64cb253145c 100644
--- a/sql/share/charsets/cp1256.xml
+++ b/sql/share/charsets/cp1256.xml
@@ -9,8 +9,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/cp1257.xml b/sql/share/charsets/cp1257.xml
index 93a1bd47a77..0c2688c264e 100644
--- a/sql/share/charsets/cp1257.xml
+++ b/sql/share/charsets/cp1257.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/cp850.xml b/sql/share/charsets/cp850.xml
index 79497aa17f1..4076a5f6a56 100644
--- a/sql/share/charsets/cp850.xml
+++ b/sql/share/charsets/cp850.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/cp852.xml b/sql/share/charsets/cp852.xml
index 73a81e54b02..25b622d2a4b 100644
--- a/sql/share/charsets/cp852.xml
+++ b/sql/share/charsets/cp852.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/cp866.xml b/sql/share/charsets/cp866.xml
index 1a72b396c7c..fa2e1865de6 100644
--- a/sql/share/charsets/cp866.xml
+++ b/sql/share/charsets/cp866.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/dec8.xml b/sql/share/charsets/dec8.xml
index 2cb28cb0f4f..2cd52de464a 100644
--- a/sql/share/charsets/dec8.xml
+++ b/sql/share/charsets/dec8.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/geostd8.xml b/sql/share/charsets/geostd8.xml
index c09aa078fb7..5e3816975d6 100644
--- a/sql/share/charsets/geostd8.xml
+++ b/sql/share/charsets/geostd8.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/greek.xml b/sql/share/charsets/greek.xml
index 1cfe6b49610..000019a8ce0 100644
--- a/sql/share/charsets/greek.xml
+++ b/sql/share/charsets/greek.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/hebrew.xml b/sql/share/charsets/hebrew.xml
index 5bcf222a728..20d68487301 100644
--- a/sql/share/charsets/hebrew.xml
+++ b/sql/share/charsets/hebrew.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -40,7 +39,7 @@
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
- 02 02 02 02 02 02 02 02 02 02 02 00 00 00 00 00
+ 02 02 02 02 02 02 02 02 02 02 02 00 00 20 20 00
</map>
</ctype>
@@ -106,7 +105,7 @@
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 2017
05D0 05D1 05D2 05D3 05D4 05D5 05D6 05D7 05D8 05D9 05DA 05DB 05DC 05DD 05DE 05DF
-05E0 05E1 05E2 05E3 05E4 05E5 05E6 05E7 05E8 05E9 05EA 0000 0000 0000 0000 0000
+05E0 05E1 05E2 05E3 05E4 05E5 05E6 05E7 05E8 05E9 05EA 0000 0000 200E 200F 0000
</map>
</unicode>
diff --git a/sql/share/charsets/hp8.xml b/sql/share/charsets/hp8.xml
index 35224f8c544..3ab383ef386 100644
--- a/sql/share/charsets/hp8.xml
+++ b/sql/share/charsets/hp8.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/keybcs2.xml b/sql/share/charsets/keybcs2.xml
index 6332891ef23..7335a0f428d 100644
--- a/sql/share/charsets/keybcs2.xml
+++ b/sql/share/charsets/keybcs2.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/koi8r.xml b/sql/share/charsets/koi8r.xml
index 033597e9bfc..2d8473f6440 100644
--- a/sql/share/charsets/koi8r.xml
+++ b/sql/share/charsets/koi8r.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/koi8u.xml b/sql/share/charsets/koi8u.xml
index 4f5fa35af3d..16177627ffe 100644
--- a/sql/share/charsets/koi8u.xml
+++ b/sql/share/charsets/koi8u.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/latin1.xml b/sql/share/charsets/latin1.xml
index 5814a17b0e1..88ceff440d5 100644
--- a/sql/share/charsets/latin1.xml
+++ b/sql/share/charsets/latin1.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/latin2.xml b/sql/share/charsets/latin2.xml
index 7f00148a1df..6b887b927a4 100644
--- a/sql/share/charsets/latin2.xml
+++ b/sql/share/charsets/latin2.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/latin5.xml b/sql/share/charsets/latin5.xml
index 5004f045889..9c23200a46d 100644
--- a/sql/share/charsets/latin5.xml
+++ b/sql/share/charsets/latin5.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/latin7.xml b/sql/share/charsets/latin7.xml
index dd87a1a2d89..02d3ff8b17e 100644
--- a/sql/share/charsets/latin7.xml
+++ b/sql/share/charsets/latin7.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/macce.xml b/sql/share/charsets/macce.xml
index 61f6d79b34f..21e303609cf 100644
--- a/sql/share/charsets/macce.xml
+++ b/sql/share/charsets/macce.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/macroman.xml b/sql/share/charsets/macroman.xml
index 36c8e8cf13a..2b43fe73b07 100644
--- a/sql/share/charsets/macroman.xml
+++ b/sql/share/charsets/macroman.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/charsets/swe7.xml b/sql/share/charsets/swe7.xml
index 2b8ff4edcce..17fa6b7d9bc 100644
--- a/sql/share/charsets/swe7.xml
+++ b/sql/share/charsets/swe7.xml
@@ -7,8 +7,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index 2b6d2b18f88..e09629a1f3e 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -78,7 +78,7 @@ ER_CANT_CREATE_TABLE
cze "Nemohu vytvo-Bøit tabulku '%-.64s' (chybový kód: %d)"
dan "Kan ikke oprette tabellen '%-.64s' (Fejlkode: %d)"
nla "Kan tabel '%-.64s' niet aanmaken (Errcode: %d)"
- eng "Can't create table '%-.64s' (errno: %d)"
+ eng "Can't create table '%-.200s' (errno: %d)"
jps "'%-.64s' ƒe[ƒuƒ‹‚ªì‚ê‚Ü‚¹‚ñ.(errno: %d)",
est "Ei suuda luua tabelit '%-.64s' (veakood: %d)"
fre "Ne peut créer la table '%-.64s' (Errcode: %d)"
@@ -574,7 +574,7 @@ ER_ERROR_ON_RENAME
cze "Chyba p-Bøi pøejmenování '%-.64s' na '%-.64s' (chybový kód: %d)"
dan "Fejl ved omdøbning af '%-.64s' til '%-.64s' (Fejlkode: %d)"
nla "Fout bij het hernoemen van '%-.64s' naar '%-.64s' (Errcode: %d)"
- eng "Error on rename of '%-.64s' to '%-.64s' (errno: %d)"
+ eng "Error on rename of '%-.150s' to '%-.150s' (errno: %d)"
jps "'%-.64s' ‚ð '%-.64s' ‚É rename ‚Å‚«‚Ü‚¹‚ñ (errno: %d)",
est "Viga faili '%-.64s' ümbernimetamisel '%-.64s'-ks (veakood: %d)"
fre "Erreur en renommant '%-.64s' en '%-.64s' (Errcode: %d)"
diff --git a/sql/slave.cc b/sql/slave.cc
index b5c1fff4222..8805f950d50 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1513,7 +1512,7 @@ static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
TABLE_LIST tables;
int error= 1;
handler *file;
- ulong save_options;
+ ulonglong save_options;
NET *net= &mysql->net;
DBUG_ENTER("create_table_from_dump");
diff --git a/sql/slave.h b/sql/slave.h
index 65adb4564cc..bbf450bab75 100644
--- a/sql/slave.h
+++ b/sql/slave.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sp.cc b/sql/sp.cc
index 283f43f55b2..a33f6bfda29 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -494,17 +493,10 @@ db_create_routine(THD *thd, int type, sp_head *sp)
char definer[USER_HOST_BUFF_SIZE];
char old_db_buf[NAME_LEN+1];
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
- bool dbchanged;
DBUG_ENTER("db_create_routine");
DBUG_PRINT("enter", ("type: %d name: %.*s",type,sp->m_name.length,
sp->m_name.str));
- if ((ret= sp_use_new_db(thd, sp->m_db, &old_db, 0, &dbchanged)))
- {
- ret= SP_NO_DB_ERROR;
- goto done;
- }
-
if (!(table= open_proc_table_for_update(thd)))
ret= SP_OPEN_TABLE_FAILED;
else
@@ -539,17 +531,17 @@ db_create_routine(THD *thd, int type, sp_head *sp)
table->field[MYSQL_PROC_FIELD_NAME]->
store(sp->m_name.str, sp->m_name.length, system_charset_info);
table->field[MYSQL_PROC_FIELD_TYPE]->
- store((longlong)type);
+ store((longlong)type, 1);
table->field[MYSQL_PROC_FIELD_SPECIFIC_NAME]->
store(sp->m_name.str, sp->m_name.length, system_charset_info);
if (sp->m_chistics->daccess != SP_DEFAULT_ACCESS)
table->field[MYSQL_PROC_FIELD_ACCESS]->
- store((longlong)sp->m_chistics->daccess);
+ store((longlong)sp->m_chistics->daccess, 1);
table->field[MYSQL_PROC_FIELD_DETERMINISTIC]->
- store((longlong)(sp->m_chistics->detistic ? 1 : 2));
+ store((longlong)(sp->m_chistics->detistic ? 1 : 2), 1);
if (sp->m_chistics->suid != SP_IS_DEFAULT_SUID)
table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]->
- store((longlong)sp->m_chistics->suid);
+ store((longlong)sp->m_chistics->suid, 1);
table->field[MYSQL_PROC_FIELD_PARAM_LIST]->
store(sp->m_params.str, sp->m_params.length, system_charset_info);
if (sp->m_type == TYPE_ENUM_FUNCTION)
@@ -566,7 +558,7 @@ db_create_routine(THD *thd, int type, sp_head *sp)
((Field_timestamp *)table->field[MYSQL_PROC_FIELD_CREATED])->set_time();
((Field_timestamp *)table->field[MYSQL_PROC_FIELD_MODIFIED])->set_time();
table->field[MYSQL_PROC_FIELD_SQL_MODE]->
- store((longlong)thd->variables.sql_mode);
+ store((longlong)thd->variables.sql_mode, 1);
if (sp->m_chistics->comment.str)
table->field[MYSQL_PROC_FIELD_COMMENT]->
store(sp->m_chistics->comment.str, sp->m_chistics->comment.length,
@@ -629,8 +621,6 @@ db_create_routine(THD *thd, int type, sp_head *sp)
done:
close_thread_tables(thd);
- if (dbchanged)
- (void) mysql_change_db(thd, old_db.str, 1);
DBUG_RETURN(ret);
}
@@ -672,7 +662,6 @@ db_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
{
TABLE *table;
int ret;
- bool opened;
DBUG_ENTER("db_update_routine");
DBUG_PRINT("enter", ("type: %d name: %.*s",
type, name->m_name.length, name->m_name.str));
@@ -686,10 +675,10 @@ db_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics)
((Field_timestamp *)table->field[MYSQL_PROC_FIELD_MODIFIED])->set_time();
if (chistics->suid != SP_IS_DEFAULT_SUID)
table->field[MYSQL_PROC_FIELD_SECURITY_TYPE]->
- store((longlong)chistics->suid);
+ store((longlong)chistics->suid, 1);
if (chistics->daccess != SP_DEFAULT_ACCESS)
table->field[MYSQL_PROC_FIELD_ACCESS]->
- store((longlong)chistics->daccess);
+ store((longlong)chistics->daccess, 1);
if (chistics->comment.str)
table->field[MYSQL_PROC_FIELD_COMMENT]->store(chistics->comment.str,
chistics->comment.length,
diff --git a/sql/sp.h b/sql/sp.h
index 631b8a87aa2..38b7d43c08f 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sp_cache.cc b/sql/sp_cache.cc
index fea6a67f32c..de4e1efd496 100644
--- a/sql/sp_cache.cc
+++ b/sql/sp_cache.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -124,7 +123,6 @@ void sp_cache_clear(sp_cache **cp)
void sp_cache_insert(sp_cache **cp, sp_head *sp)
{
sp_cache *c;
- ulong v;
if (!(c= *cp))
{
diff --git a/sql/sp_cache.h b/sql/sp_cache.h
index 1021d17b9e2..9d34c9a2fb5 100644
--- a/sql/sp_cache.h
+++ b/sql/sp_cache.h
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 203f81aacfb..de0edabda3e 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -93,7 +92,7 @@ sp_map_item_type(enum enum_field_types type)
*/
static String *
-sp_get_item_value(Item *item, String *str)
+sp_get_item_value(THD *thd, Item *item, String *str)
{
Item_result result_type= item->result_type();
@@ -113,15 +112,16 @@ sp_get_item_value(Item *item, String *str)
{
char buf_holder[STRING_BUFFER_USUAL_SIZE];
String buf(buf_holder, sizeof(buf_holder), result->charset());
+ CHARSET_INFO *cs= thd->variables.character_set_client;
/* We must reset length of the buffer, because of String specificity. */
buf.length(0);
buf.append('_');
buf.append(result->charset()->csname);
- if (result->charset()->escape_with_backslash_is_dangerous)
+ if (cs->escape_with_backslash_is_dangerous)
buf.append(' ');
- append_query_string(result->charset(), result, &buf);
+ append_query_string(cs, result, &buf);
str->copy(buf);
return str;
@@ -444,9 +444,12 @@ sp_head::operator delete(void *ptr, size_t size)
sp_head::sp_head()
:Query_arena(&main_mem_root, INITIALIZED_FOR_SP),
m_flags(0), m_recursion_level(0), m_next_cached_sp(0),
- m_first_instance(this), m_first_free_instance(this), m_last_cached_sp(this),
m_cont_level(0)
{
+ m_first_instance= this;
+ m_first_free_instance= this;
+ m_last_cached_sp= this;
+
m_return_field_def.charset = NULL;
extern byte *
@@ -841,7 +844,7 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
val= (*splocal)->this_item();
DBUG_PRINT("info", ("print %p", val));
- str_value= sp_get_item_value(val, &str_value_holder);
+ str_value= sp_get_item_value(thd, val, &str_value_holder);
if (str_value)
res|= qbuf.append(*str_value);
else
@@ -1425,6 +1428,8 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
{
binlog_buf.length(0);
binlog_buf.append(STRING_WITH_LEN("SELECT "));
+ append_identifier(thd, &binlog_buf, m_db.str, m_db.length);
+ binlog_buf.append('.');
append_identifier(thd, &binlog_buf, m_name.str, m_name.length);
binlog_buf.append('(');
for (arg_no= 0; arg_no < argcount; arg_no++)
@@ -1435,7 +1440,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
if (arg_no)
binlog_buf.append(',');
- str_value= sp_get_item_value(nctx->get_item(arg_no),
+ str_value= sp_get_item_value(thd, nctx->get_item(arg_no),
&str_value_holder);
if (str_value)
@@ -1627,7 +1632,7 @@ sp_head::execute_procedure(THD *thd, List<Item> *args)
Item_null *null_item= new Item_null();
if (!null_item ||
- nctx->set_variable(thd, i, (struct Item **)&null_item))
+ nctx->set_variable(thd, i, (Item **)&null_item))
{
err_status= TRUE;
break;
@@ -2805,7 +2810,7 @@ void
sp_instr_freturn::print(String *str)
{
/* freturn type expr... */
- if (str->reserve(UINT_MAX+8+32)) // Add some for the expr. too
+ if (str->reserve(1024+8+32)) // Add some for the expr. too
return;
str->qs_append(STRING_WITH_LEN("freturn "));
str->qs_append((uint)m_type);
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 6a377e6f188..0139f879ce4 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
index b0b65d5313b..6229cf14604 100644
--- a/sql/sp_pcontext.cc
+++ b/sql/sp_pcontext.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h
index 2ee77696efb..b2cdd5e689c 100644
--- a/sql/sp_pcontext.h
+++ b/sql/sp_pcontext.h
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index 67ee5459bb4..e49c4eb1240 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h
index 5e03aa60d23..fbf479f52aa 100644
--- a/sql/sp_rcontext.h
+++ b/sql/sp_rcontext.h
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/spatial.cc b/sql/spatial.cc
index e91653f79d5..9012ced1041 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/spatial.h b/sql/spatial.h
index a6f74a1ada0..3e398ac6200 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2002-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index d91da405c36..39a38f3c44e 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1498,7 +1497,7 @@ bool change_password(THD *thd, const char *host, const char *user,
{
query_length=
my_sprintf(buff,
- (buff,"SET PASSWORD FOR \"%-.120s\"@\"%-.120s\"=\"%-.120s\"",
+ (buff,"SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
acl_user->user ? acl_user->user : "",
acl_user->host.hostname ? acl_user->host.hostname : "",
new_password));
@@ -1898,7 +1897,7 @@ static int replace_user_table(THD *thd, TABLE *table, const LEX_USER &combo,
table->field[next_field+2]->store((longlong) mqh.conn_per_hour, TRUE);
if (table->s->fields >= 36 &&
(mqh.specified_limits & USER_RESOURCES::USER_CONNECTIONS))
- table->field[next_field+3]->store((longlong) mqh.user_conn);
+ table->field[next_field+3]->store((longlong) mqh.user_conn, TRUE);
mqh_used= mqh_used || mqh.questions || mqh.updates || mqh.conn_per_hour;
}
if (old_row_exists)
diff --git a/sql/sql_acl.h b/sql/sql_acl.h
index e1737f79ce7..cf2b9ce66a9 100644
--- a/sql/sql_acl.h
+++ b/sql/sql_acl.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index 62b6d4f7920..5d7d35cf69b 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h
index 9e5926fd9b1..21a37209e89 100644
--- a/sql/sql_analyse.h
+++ b/sql/sql_analyse.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_array.h b/sql/sql_array.h
index c68caf74b25..e2e12bee241 100644
--- a/sql/sql_array.h
+++ b/sql/sql_array.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 7c652fdcd4f..a4318f7b4bf 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +36,6 @@ static int open_unireg_entry(THD *thd, TABLE *entry, const char *db,
TABLE_LIST *table_list, MEM_ROOT *mem_root,
uint flags);
static void free_cache_entry(TABLE *entry);
-static void mysql_rm_tmp_tables(void);
static bool open_new_frm(THD *thd, const char *path, const char *alias,
const char *db, const char *table_name,
uint db_stat, uint prgflag,
@@ -54,7 +52,6 @@ extern "C" byte *table_cache_key(const byte *record,uint *length,
bool table_cache_init(void)
{
- mysql_rm_tmp_tables();
return hash_init(&open_cache, &my_charset_bin, table_cache_size+16,
0, 0,table_cache_key,
(hash_free_key) free_cache_entry, 0) != 0;
@@ -519,7 +516,15 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
DBUG_PRINT("info", ("thd->open_tables: %p", thd->open_tables));
- found_old_table= 0;
+
+ /*
+ End open index scans and table scans and remove references to the tables
+ from the handler tables hash. After this preparation it is safe to close
+ the tables.
+ */
+ mysql_ha_mark_tables_for_reopen(thd, thd->open_tables);
+
+ found_old_table= 0;
while (thd->open_tables)
found_old_table|=close_thread_table(thd, &thd->open_tables);
thd->some_tables_deleted=0;
@@ -686,7 +691,7 @@ void close_temporary_tables(THD *thd)
/* We always quote db,table names though it is slight overkill */
if (found_user_tables &&
- !(was_quote_show= (thd->options & OPTION_QUOTE_SHOW_CREATE)))
+ !(was_quote_show= test(thd->options & OPTION_QUOTE_SHOW_CREATE)))
{
thd->options |= OPTION_QUOTE_SHOW_CREATE;
}
@@ -2970,6 +2975,19 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
column reference. See create_view_field() for details.
*/
item= nj_col->create_item(thd);
+ /*
+ *ref != NULL means that *ref contains the item that we need to
+ replace. If the item was aliased by the user, set the alias to
+ the replacing item.
+ We need to set alias on both ref itself and on ref real item.
+ */
+ if (*ref && !(*ref)->is_autogenerated_name)
+ {
+ item->set_name((*ref)->name, (*ref)->name_length,
+ system_charset_info);
+ item->real_item()->set_name((*ref)->name, (*ref)->name_length,
+ system_charset_info);
+ }
if (register_tree_change && arena)
thd->restore_active_arena(arena, &backup);
@@ -3308,6 +3326,12 @@ find_field_in_tables(THD *thd, Item_ident *item,
{
if (found == WRONG_GRANT)
return (Field*) 0;
+
+ /*
+ Only views fields should be marked as dependent, not an underlying
+ fields.
+ */
+ if (!table_ref->belong_to_view)
{
SELECT_LEX *current_sel= thd->lex->current_select;
SELECT_LEX *last_select= table_ref->select_lex;
@@ -5144,14 +5168,21 @@ fill_record_n_invoke_before_triggers(THD *thd, Field **ptr,
}
-static void mysql_rm_tmp_tables(void)
+my_bool mysql_rm_tmp_tables(void)
{
uint i, idx;
- char filePath[FN_REFLEN], *tmpdir;
+ char filePath[FN_REFLEN], *tmpdir, filePathCopy[FN_REFLEN];
MY_DIR *dirp;
FILEINFO *file;
+ TABLE tmp_table;
+ THD *thd;
DBUG_ENTER("mysql_rm_tmp_tables");
+ if (!(thd= new THD))
+ DBUG_RETURN(1);
+ thd->thread_stack= (char*) &thd;
+ thd->store_globals();
+
for (i=0; i<=mysql_tmpdir_list.max; i++)
{
tmpdir=mysql_tmpdir_list.list[i];
@@ -5172,13 +5203,37 @@ static void mysql_rm_tmp_tables(void)
if (!bcmp(file->name,tmp_file_prefix,tmp_file_prefix_length))
{
- sprintf(filePath,"%s%s",tmpdir,file->name);
- VOID(my_delete(filePath,MYF(MY_WME)));
+ char *ext= fn_ext(file->name);
+ uint ext_len= strlen(ext);
+ uint filePath_len= my_snprintf(filePath, sizeof(filePath),
+ "%s%s", tmpdir, file->name);
+ if (!bcmp(reg_ext, ext, ext_len))
+ {
+ TABLE tmp_table;
+ if (!openfrm(thd, filePath, "tmp_table", (uint) 0,
+ READ_KEYINFO | COMPUTE_TYPES | EXTRA_RECORD,
+ 0, &tmp_table))
+ {
+ /* We should cut file extention before deleting of table */
+ memcpy(filePathCopy, filePath, filePath_len - ext_len);
+ filePathCopy[filePath_len - ext_len]= 0;
+ tmp_table.file->delete_table(filePathCopy);
+ closefrm(&tmp_table);
+ }
+ }
+ /*
+ File can be already deleted by tmp_table.file->delete_table().
+ So we hide error messages which happnes during deleting of these
+ files(MYF(0)).
+ */
+ VOID(my_delete(filePath, MYF(0)));
}
}
my_dirend(dirp);
}
- DBUG_VOID_RETURN;
+ delete thd;
+ my_pthread_setspecific_ptr(THR_THD, 0);
+ DBUG_RETURN(0);
}
diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h
index 0f5b6dcd35e..3b507d64df5 100644
--- a/sql/sql_bitmap.h
+++ b/sql/sql_bitmap.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index 635c65eb726..d06ac7824fd 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -906,7 +905,7 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu",
if (thd->db_length)
{
memcpy(thd->query+thd->query_length+1, thd->db, thd->db_length);
- DBUG_PRINT("qcache", ("database : %s length %u",
+ DBUG_PRINT("qcache", ("database: %s length: %u",
thd->db, thd->db_length));
}
else
@@ -1052,7 +1051,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
(pre-space is removed in dispatch_command)
First '/' looks like comment before command it is not
- frequently appeared in real lihe, consequently we can
+ frequently appeared in real life, consequently we can
check all such queries, too.
*/
if ((my_toupper(system_charset_info, sql[i]) != 'S' ||
@@ -1081,7 +1080,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length)
if (thd->db_length)
{
memcpy(sql+query_length+1, thd->db, thd->db_length);
- DBUG_PRINT("qcache", ("database: '%s' length %u",
+ DBUG_PRINT("qcache", ("database: '%s' length: %u",
thd->db, thd->db_length));
}
else
@@ -1234,9 +1233,9 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu",
if (engine_data != table->engine_data())
{
DBUG_PRINT("qcache",
- ("Handler require invalidation queries of %s.%s %lld-%lld",
- table_list.db, table_list.alias,
- engine_data, table->engine_data()));
+ ("Handler require invalidation queries of %s.%s %lu-%lu",
+ table_list.db, table_list.alias,
+ (ulong) engine_data, (ulong) table->engine_data()));
invalidate_table((byte *) table->db(), table->key_length());
}
else
@@ -1257,10 +1256,10 @@ sql mode: 0x%lx, sort len: %lu, conncat len: %lu",
#ifndef EMBEDDED_LIBRARY
do
{
- DBUG_PRINT("qcache", ("Results (len: %lu used: %lu headers: %u)",
+ DBUG_PRINT("qcache", ("Results (len: %lu used: %lu headers: %lu)",
result_block->length, result_block->used,
- result_block->headers_len()+
- ALIGN_SIZE(sizeof(Query_cache_result))));
+ (ulong) (result_block->headers_len()+
+ ALIGN_SIZE(sizeof(Query_cache_result)))));
Query_cache_result *result = result_block->result();
if (net_real_write(&thd->net, result->data(),
@@ -1342,7 +1341,7 @@ void Query_cache::invalidate(CHANGED_TABLE_LIST *tables_used)
for (; tables_used; tables_used= tables_used->next)
{
invalidate_table((byte*) tables_used->key, tables_used->key_length);
- DBUG_PRINT("qcache", (" db %s, table %s", tables_used->key,
+ DBUG_PRINT("qcache", ("db: %s table: %s", tables_used->key,
tables_used->key+
strlen(tables_used->key)+1));
}
@@ -1766,8 +1765,18 @@ void Query_cache::free_cache()
{
DBUG_ENTER("Query_cache::free_cache");
if (query_cache_size > 0)
- {
flush_cache();
+ /*
+ There may be two free_cache() calls in progress, because we
+ release 'structure_guard_mutex' in flush_cache(). When the second
+ flush_cache() wakes up from the wait on 'COND_flush_finished', the
+ first call to free_cache() has done its job. So we have to test
+ 'query_cache_size > 0' the second time to see if the cache wasn't
+ reset by other thread, or if it was reset and was re-enabled then.
+ If the cache was reset, then we have nothing to do here.
+ */
+ if (query_cache_size > 0)
+ {
#ifndef DBUG_OFF
if (bins[0].free_blocks == 0)
{
@@ -1809,6 +1818,12 @@ void Query_cache::free_cache()
flush_in_progress flag and releases the lock, so other threads may
proceed skipping the cache as if it is disabled. Concurrent
flushes are performed in turn.
+
+ After flush_cache() call, the cache is flushed, all the freed
+ memory is accumulated in bin[0], and the 'structure_guard_mutex'
+ is locked. However, since we could release the mutex during
+ execution, the rest of the cache state could have been changed,
+ and should not be relied on.
*/
void Query_cache::flush_cache()
@@ -2353,7 +2368,7 @@ Query_cache::register_tables_from_list(TABLE_LIST *tables_used,
{
char key[MAX_DBKEY_LENGTH];
uint key_length;
- DBUG_PRINT("qcache", ("view %s, db %s",
+ DBUG_PRINT("qcache", ("view: %s db: %s",
tables_used->view_name.str,
tables_used->view_db.str));
key_length= (uint) (strmov(strmov(key, tables_used->view_db.str) + 1,
@@ -2474,11 +2489,11 @@ Query_cache::insert_table(uint key_len, char *key,
table_block->table()->engine_data() != engine_data)
{
DBUG_PRINT("qcache",
- ("Handler require invalidation queries of %s.%s %lld-%lld",
+ ("Handler require invalidation queries of %s.%s %lu-%lu",
table_block->table()->db(),
table_block->table()->table(),
- engine_data,
- table_block->table()->engine_data()));
+ (ulong) engine_data,
+ (ulong) table_block->table()->engine_data()));
/*
as far as we delete all queries with this table, table block will be
deleted, too
@@ -2976,7 +2991,7 @@ static TABLE_COUNTER_TYPE process_and_count_tables(TABLE_LIST *tables_used,
table_count++;
if (tables_used->view)
{
- DBUG_PRINT("qcache", ("view %s, db %s",
+ DBUG_PRINT("qcache", ("view: %s db: %s",
tables_used->view_name.str,
tables_used->view_db.str));
*tables_type|= HA_CACHE_TBL_NONTRANSACT;
@@ -3042,7 +3057,7 @@ Query_cache::is_cacheable(THD *thd, uint32 query_len, char *query, LEX *lex,
lex->safe_to_cache_query)
{
DBUG_PRINT("qcache", ("options: %lx %lx type: %u",
- OPTION_TO_QUERY_CACHE,
+ (long) OPTION_TO_QUERY_CACHE,
(long) lex->select_lex.options,
(int) thd->variables.query_cache_type));
@@ -3062,7 +3077,7 @@ Query_cache::is_cacheable(THD *thd, uint32 query_len, char *query, LEX *lex,
DBUG_PRINT("qcache",
("not interesting query: %d or not cacheable, options %lx %lx type: %u",
(int) lex->sql_command,
- OPTION_TO_QUERY_CACHE,
+ (long) OPTION_TO_QUERY_CACHE,
(long) lex->select_lex.options,
(int) thd->variables.query_cache_type));
DBUG_RETURN(0);
@@ -3772,8 +3787,8 @@ my_bool Query_cache::check_integrity(bool locked)
(((long)first_block) % (long)ALIGN_SIZE(1)))
{
DBUG_PRINT("error",
- ("block 0x%lx do not aligned by %d", (ulong) block,
- ALIGN_SIZE(1)));
+ ("block 0x%lx do not aligned by %d", (long) block,
+ (int) ALIGN_SIZE(1)));
result = 1;
}
// Check memory allocation
diff --git a/sql/sql_cache.h b/sql/sql_cache.h
index a66067159e2..0fbc06ce919 100644
--- a/sql/sql_cache.h
+++ b/sql/sql_cache.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index f46cd2353eb..3b612dadcd0 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -291,9 +290,6 @@ void THD::init(void)
variables.date_format);
variables.datetime_format= date_time_format_copy((THD*) 0,
variables.datetime_format);
-#ifdef HAVE_NDBCLUSTER_DB
- variables.ndb_use_transactions= 1;
-#endif
pthread_mutex_unlock(&LOCK_global_system_variables);
server_status= SERVER_STATUS_AUTOCOMMIT;
if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)
@@ -1517,45 +1513,14 @@ bool select_exists_subselect::send_data(List<Item> &items)
int select_dumpvar::prepare(List<Item> &list, SELECT_LEX_UNIT *u)
{
- List_iterator_fast<Item> li(list);
- List_iterator_fast<my_var> gl(var_list);
- Item *item;
-
- local_vars.empty(); // Clear list if SP
unit= u;
- row_count= 0;
-
+
if (var_list.elements != list.elements)
{
my_message(ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT,
ER(ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT), MYF(0));
return 1;
- }
- while ((item=li++))
- {
- my_var *mv= gl++;
- if (mv->local)
- {
- Item_splocal *var= new Item_splocal(mv->s, mv->offset, mv->type);
- (void)local_vars.push_back(var);
-#ifndef DBUG_OFF
- var->m_sp= mv->sp;
-#endif
- }
- else
- {
- Item_func_set_user_var *var= new Item_func_set_user_var(mv->s, item);
- /*
- Item_func_set_user_var can't substitute something else on its place =>
- 0 can be passed as last argument (reference on item)
- Item_func_set_user_var can't be fixed after creation, so we do not
- check var->fixed
- */
- var->fix_fields(thd, 0);
- var->fix_length_and_dec();
- vars.push_back(var);
- }
- }
+ }
return 0;
}
@@ -1569,8 +1534,7 @@ bool select_dumpvar::check_simple_select() const
void select_dumpvar::cleanup()
{
- vars.empty();
- row_count=0;
+ row_count= 0;
}
@@ -1879,13 +1843,10 @@ Statement_map::~Statement_map()
bool select_dumpvar::send_data(List<Item> &items)
{
- List_iterator_fast<Item_func_set_user_var> li(vars);
- List_iterator_fast<Item_splocal> var_li(local_vars);
- List_iterator_fast<my_var> my_li(var_list);
+ List_iterator_fast<my_var> var_li(var_list);
List_iterator<Item> it(items);
- Item_func_set_user_var *xx;
- Item_splocal *yy;
- my_var *zz;
+ Item *item;
+ my_var *mv;
DBUG_ENTER("select_dumpvar::send_data");
if (unit->offset_limit_cnt)
@@ -1898,24 +1859,19 @@ bool select_dumpvar::send_data(List<Item> &items)
my_message(ER_TOO_MANY_ROWS, ER(ER_TOO_MANY_ROWS), MYF(0));
DBUG_RETURN(1);
}
- while ((zz=my_li++) && (it++))
+ while ((mv= var_li++) && (item= it++))
{
- if (zz->local)
+ if (mv->local)
{
- if ((yy=var_li++))
- {
- if (thd->spcont->set_variable(current_thd, yy->get_var_idx(),
- it.ref()))
- DBUG_RETURN(1);
- }
+ if (thd->spcont->set_variable(thd, mv->offset, &item))
+ DBUG_RETURN(1);
}
else
{
- if ((xx=li++))
- {
- xx->check(0);
- xx->update();
- }
+ Item_func_set_user_var *suv= new Item_func_set_user_var(mv->s, item);
+ suv->fix_fields(thd, 0);
+ suv->check(0);
+ suv->update();
}
}
DBUG_RETURN(0);
diff --git a/sql/sql_class.h b/sql/sql_class.h
index ec03b9cb4a6..05034ebd573 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -495,6 +494,8 @@ struct system_variables
{
ulonglong myisam_max_extra_sort_file_size;
ulonglong myisam_max_sort_file_size;
+ ulonglong max_heap_table_size;
+ ulonglong tmp_table_size;
ha_rows select_limit;
ha_rows max_join_size;
ulong auto_increment_increment, auto_increment_offset;
@@ -503,7 +504,6 @@ struct system_variables
ulong long_query_time;
ulong max_allowed_packet;
ulong max_error_count;
- ulong max_heap_table_size;
ulong max_length_for_sort_data;
ulong max_sort_length;
ulong max_tmp_tables;
@@ -527,7 +527,6 @@ struct system_variables
ulong div_precincrement;
ulong sortbuff_size;
ulong table_type;
- ulong tmp_table_size;
ulong tx_isolation;
ulong completion_type;
/* Determines which non-standard SQL behaviour should be enabled */
@@ -1840,21 +1839,22 @@ class select_insert :public select_result_interceptor {
class select_create: public select_insert {
ORDER *group;
TABLE_LIST *create_table;
- List<create_field> *extra_fields;
- List<Key> *keys;
HA_CREATE_INFO *create_info;
+ Alter_info *alter_info;
MYSQL_LOCK *lock;
Field **field;
public:
- select_create (TABLE_LIST *table,
- HA_CREATE_INFO *create_info_par,
- List<create_field> &fields_par,
- List<Key> &keys_par,
- List<Item> &select_fields,enum_duplicates duplic, bool ignore)
- :select_insert (NULL, NULL, &select_fields, 0, 0, duplic, ignore), create_table(table),
- extra_fields(&fields_par),keys(&keys_par), create_info(create_info_par),
+ select_create(TABLE_LIST *table,
+ HA_CREATE_INFO *create_info_arg,
+ Alter_info *alter_info_arg,
+ List<Item> &select_fields,
+ enum_duplicates duplic, bool ignore)
+ :select_insert(NULL, NULL, &select_fields, 0, 0, duplic, ignore),
+ create_table(table),
+ create_info(create_info_arg),
+ alter_info(alter_info_arg),
lock(0)
- {}
+ {}
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
void store_values(List<Item> &values);
void send_error(uint errcode,const char *err);
@@ -2081,7 +2081,8 @@ class user_var_entry
class Unique :public Sql_alloc
{
DYNAMIC_ARRAY file_ptrs;
- ulong max_elements, max_in_memory_size;
+ ulong max_elements;
+ ulonglong max_in_memory_size;
IO_CACHE file;
TREE tree;
byte *record_pointers;
@@ -2091,7 +2092,7 @@ class Unique :public Sql_alloc
public:
ulong elements;
Unique(qsort_cmp2 comp_func, void *comp_func_fixed_arg,
- uint size_arg, ulong max_in_memory_size_arg);
+ uint size_arg, ulonglong max_in_memory_size_arg);
~Unique();
ulong elements_in_tree() { return tree.elements_in_tree; }
inline bool unique_add(void *ptr)
@@ -2105,13 +2106,13 @@ public:
bool get(TABLE *table);
static double get_use_cost(uint *buffer, uint nkeys, uint key_size,
- ulong max_in_memory_size);
+ ulonglong max_in_memory_size);
inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size,
- ulong max_in_memory_size)
+ ulonglong max_in_memory_size)
{
- register ulong max_elems_in_tree=
+ register ulonglong max_elems_in_tree=
(1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
- return sizeof(uint)*(1 + nkeys/max_elems_in_tree);
+ return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree));
}
void reset();
@@ -2202,9 +2203,7 @@ class select_dumpvar :public select_result_interceptor {
ha_rows row_count;
public:
List<my_var> var_list;
- List<Item_func_set_user_var> vars;
- List<Item_splocal> local_vars;
- select_dumpvar(void) { var_list.empty(); local_vars.empty(); vars.empty(); row_count=0;}
+ select_dumpvar() { var_list.empty(); row_count= 0;}
~select_dumpvar() {}
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
bool send_data(List<Item> &items);
diff --git a/sql/sql_client.cc b/sql/sql_client.cc
index 49d0d3087ad..d6f1183806e 100644
--- a/sql/sql_client.cc
+++ b/sql/sql_client.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_crypt.cc b/sql/sql_crypt.cc
index f21a109e95d..367b9e38e56 100644
--- a/sql/sql_crypt.cc
+++ b/sql/sql_crypt.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_crypt.h b/sql/sql_crypt.h
index 25bc2d29e1d..f3db9adde25 100644
--- a/sql/sql_crypt.h
+++ b/sql/sql_crypt.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc
index 2784e71ccae..2e98da42be1 100644
--- a/sql/sql_cursor.cc
+++ b/sql/sql_cursor.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2005 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2005-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_cursor.h b/sql/sql_cursor.h
index d1156dfba8d..6edd6b24b36 100644
--- a/sql/sql_cursor.h
+++ b/sql/sql_cursor.h
@@ -1,11 +1,8 @@
-#ifndef _sql_cursor_h_
-#define _sql_cursor_h_
-/* Copyright (C) 2005 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#ifndef _sql_cursor_h_
+#define _sql_cursor_h_
+
#ifdef USE_PRAGMA_INTERFACE
#pragma interface /* gcc class interface */
#endif
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 43d09d288e5..f95ed8b6fc9 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1172,7 +1171,7 @@ err:
bool mysql_change_db(THD *thd, const char *name, bool no_access_check)
{
- int path_length, db_length;
+ int db_length;
char *db_name;
bool system_db= 0;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 38c12562fe3..9264362a1c8 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -902,7 +901,7 @@ end:
trunc_by_del:
/* Probably InnoDB table */
- ulong save_options= thd->options;
+ ulonglong save_options= thd->options;
table_list->lock_type= TL_WRITE;
thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT);
ha_enable_transaction(thd, FALSE);
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index e1817985cbd..1765f8b73fa 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_do.cc b/sql/sql_do.cc
index 08388dee516..2330339db8e 100644
--- a/sql/sql_do.cc
+++ b/sql/sql_do.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index ebd515bd209..61a7581908c 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_error.h b/sql/sql_error.h
index 223b50be744..28d946f14f8 100644
--- a/sql/sql_error.h
+++ b/sql/sql_error.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 0193d4d5355..d1a5ab7dfa8 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -1,8 +1,7 @@
/* Copyright (C) 2000-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -338,7 +337,6 @@ bool mysql_ha_read(THD *thd, TABLE_LIST *tables,
ha_rows select_limit_cnt, ha_rows offset_limit_cnt)
{
TABLE_LIST *hash_tables;
- TABLE **table_ptr;
TABLE *table;
MYSQL_LOCK *lock;
List<Item> list;
@@ -748,3 +746,41 @@ static int mysql_ha_flush_table(THD *thd, TABLE **table_ptr, uint mode_flags)
DBUG_RETURN(0);
}
+
+
+/*
+ Mark tables for reopen.
+
+ SYNOPSIS
+ mysql_ha_mark_tables_for_reopen()
+ thd Thread identifier.
+ table Table list to mark for reopen.
+
+ DESCRIPTION
+ For each table found in the handler hash mark it as closed
+ (ready for reopen) and end all index/table scans.
+
+ NOTE
+ The caller must lock LOCK_open.
+*/
+
+void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table)
+{
+ DBUG_ENTER("mysql_ha_mark_tables_for_reopen");
+
+ safe_mutex_assert_owner(&LOCK_open);
+ for (; table; table= table->next)
+ {
+ TABLE_LIST *hash_tables;
+ if ((hash_tables= (TABLE_LIST*) hash_search(&thd->handler_tables_hash,
+ (byte*) table->alias,
+ strlen(table->alias) + 1)))
+ {
+ /* Mark table as ready for reopen. */
+ hash_tables->table= NULL;
+ /* End open index/table scans. */
+ table->file->ha_index_or_rnd_end();
+ }
+ }
+ DBUG_VOID_RETURN;
+}
diff --git a/sql/sql_help.cc b/sql/sql_help.cc
index d6d1a6ed119..78349a6ef0d 100644
--- a/sql/sql_help.cc
+++ b/sql/sql_help.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 2ce83caa369..c60d3c307d0 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1745,8 +1744,6 @@ void kill_delayed_threads(void)
delayed_insert *tmp;
while ((tmp=it++))
{
- /* Ensure that the thread doesn't kill itself while we are looking at it */
- pthread_mutex_lock(&tmp->mutex);
tmp->thd.killed= THD::KILL_CONNECTION;
if (tmp->thd.mysys_var)
{
@@ -1765,7 +1762,6 @@ void kill_delayed_threads(void)
}
pthread_mutex_unlock(&tmp->thd.mysys_var->mutex);
}
- pthread_mutex_unlock(&tmp->mutex);
}
VOID(pthread_mutex_unlock(&LOCK_delayed_insert)); // For unlink from list
}
@@ -2620,11 +2616,11 @@ bool select_insert::send_eof()
temporary table flag)
create_table in Pointer to TABLE_LIST object providing database
and name for table to be created or to be open
- extra_fields in/out Initial list of fields for table to be created
- keys in List of keys for table to be created
+ alter_info in/out Initial list of columns and indexes for the table
+ to be created
items in List of items which should be used to produce rest
of fields for the table (corresponding fields will
- be added to the end of 'extra_fields' list)
+ be added to the end of alter_info->create_list)
lock out Pointer to the MYSQL_LOCK object for table created
(open) will be returned in this parameter. Since
this table is not included in THD::lock caller is
@@ -2646,8 +2642,8 @@ bool select_insert::send_eof()
static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
TABLE_LIST *create_table,
- List<create_field> *extra_fields,
- List<Key> *keys, List<Item> *items,
+ Alter_info *alter_info,
+ List<Item> *items,
MYSQL_LOCK **lock)
{
TABLE tmp_table; // Used during 'create_field()'
@@ -2686,7 +2682,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
DBUG_RETURN(0);
if (item->maybe_null)
cr_field->flags &= ~NOT_NULL_FLAG;
- extra_fields->push_back(cr_field);
+ alter_info->create_list.push_back(cr_field);
}
/*
create and lock table
@@ -2707,8 +2703,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
{
tmp_disable_binlog(thd);
if (!mysql_create_table(thd, create_table->db, create_table->table_name,
- create_info, *extra_fields, *keys, 0,
- select_field_count))
+ create_info, alter_info, 0, select_field_count))
{
/*
If we are here in prelocked mode we either create temporary table
@@ -2764,7 +2759,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
unit= u;
table= create_table_from_items(thd, create_info, create_table,
- extra_fields, keys, &values, &lock);
+ alter_info, &values, &lock);
if (!table)
DBUG_RETURN(-1); // abort() deletes table
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index dd4e56d8097..f14856e23fa 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1055,6 +1054,17 @@ int MYSQLlex(void *arg, void *yythd)
}
+Alter_info::Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root)
+ :drop_list(rhs.drop_list, mem_root),
+ alter_list(rhs.alter_list, mem_root),
+ key_list(rhs.key_list, mem_root),
+ create_list(rhs.create_list, mem_root),
+ flags(rhs.flags),
+ keys_onoff(rhs.keys_onoff),
+ tablespace_op(rhs.tablespace_op)
+{}
+
+
/*
Skip comment in the end of statement.
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index bee48580a8e..5731e009cb4 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -397,7 +396,7 @@ protected:
TABLE *table; /* temporary table using for appending UNION results */
select_result *result;
- ulong found_rows_for_union;
+ ulonglong found_rows_for_union;
bool res;
public:
bool prepared, // prepare phase already performed for UNION (unit)
@@ -687,18 +686,58 @@ typedef class st_select_lex SELECT_LEX;
#define ALTER_CONVERT 1024
#define ALTER_FORCE 2048
-typedef struct st_alter_info
+/**
+ @brief Parsing data for CREATE or ALTER TABLE.
+
+ This structure contains a list of columns or indexes to be created,
+ altered or dropped.
+*/
+
+class Alter_info
{
+public:
List<Alter_drop> drop_list;
List<Alter_column> alter_list;
+ List<Key> key_list;
+ List<create_field> create_list;
uint flags;
enum enum_enable_or_disable keys_onoff;
enum tablespace_op_type tablespace_op;
- st_alter_info(){clear();}
- void clear(){keys_onoff= LEAVE_AS_IS;tablespace_op= NO_TABLESPACE_OP;}
- void reset(){drop_list.empty();alter_list.empty();clear();}
-} ALTER_INFO;
+ Alter_info() :
+ flags(0),
+ keys_onoff(LEAVE_AS_IS),
+ tablespace_op(NO_TABLESPACE_OP)
+ {}
+
+ void reset()
+ {
+ drop_list.empty();
+ alter_list.empty();
+ key_list.empty();
+ create_list.empty();
+ flags= 0;
+ keys_onoff= LEAVE_AS_IS;
+ tablespace_op= NO_TABLESPACE_OP;
+ }
+ /**
+ Construct a copy of this object to be used for mysql_alter_table
+ and mysql_create_table. Historically, these two functions modify
+ their Alter_info arguments. This behaviour breaks re-execution of
+ prepared statements and stored procedures and is compensated by
+ always supplying a copy of Alter_info to these functions.
+ The constructed copy still shares key Key, Alter_drop, create_field
+ and Alter_column elements of the lists - these structures are not
+ modified and thus are not copied.
+
+ @note You need to use check thd->is_fatal_error for out
+ of memory condition after calling this function.
+ */
+ Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root);
+private:
+ Alter_info &operator=(const Alter_info &rhs); // not implemented
+ Alter_info(const Alter_info &rhs); // not implemented
+};
struct st_sp_chistics
{
@@ -884,8 +923,6 @@ typedef struct st_lex : public Query_tables_list
List<String> interval_list;
List<LEX_USER> users_list;
List<LEX_COLUMN> columns;
- List<Key> key_list;
- List<create_field> create_list;
List<Item> *insert_list,field_list,value_list,update_list;
List<List_item> many_values;
List<set_var_base> var_list;
@@ -978,7 +1015,7 @@ typedef struct st_lex : public Query_tables_list
bool safe_to_cache_query;
bool subqueries, ignore;
st_parsing_options parsing_options;
- ALTER_INFO alter_info;
+ Alter_info alter_info;
/* Prepared statements SQL syntax:*/
LEX_STRING prepared_stmt_name; /* Statement name (in all queries) */
/*
diff --git a/sql/sql_list.cc b/sql/sql_list.cc
index d57a7dfe4e3..01ab9b91424 100644
--- a/sql/sql_list.cc
+++ b/sql/sql_list.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_list.h b/sql/sql_list.h
index afad6d0f6ac..d00a4598af5 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -62,21 +61,24 @@ public:
pointer.
*/
-class list_node :public Sql_alloc
+
+/**
+ list_node - a node of a single-linked list.
+ @note We never call a destructor for instances of this class.
+*/
+
+struct list_node :public Sql_alloc
{
-public:
list_node *next;
void *info;
list_node(void *info_par,list_node *next_par)
:next(next_par),info(info_par)
- {}
+ {}
list_node() /* For end_of_list */
- {
- info=0;
- next= this;
- }
- friend class base_list;
- friend class base_list_iterator;
+ {
+ info= 0;
+ next= this;
+ }
};
@@ -92,12 +94,57 @@ public:
inline void empty() { elements=0; first= &end_of_list; last=&first;}
inline base_list() { empty(); }
+ /**
+ This is a shallow copy constructor that implicitly passes the ownership
+ from the source list to the new instance. The old instance is not
+ updated, so both objects end up sharing the same nodes. If one of
+ the instances then adds or removes a node, the other becomes out of
+ sync ('last' pointer), while still operational. Some old code uses and
+ relies on this behaviour. This logic is quite tricky: please do not use
+ it in any new code.
+ */
inline base_list(const base_list &tmp) :Sql_alloc()
{
elements= tmp.elements;
first= tmp.first;
last= elements ? tmp.last : &first;
}
+ /**
+ Construct a deep copy of the argument in memory root mem_root.
+ The elements themselves are copied by pointer.
+ */
+ inline base_list(const base_list &rhs, MEM_ROOT *mem_root)
+ {
+ if (rhs.elements)
+ {
+ /*
+ It's okay to allocate an array of nodes at once: we never
+ call a destructor for list_node objects anyway.
+ */
+ first= (list_node*) alloc_root(mem_root,
+ sizeof(list_node) * rhs.elements);
+ if (first)
+ {
+ elements= rhs.elements;
+ list_node *dst= first;
+ list_node *src= rhs.first;
+ for (; dst < first + elements - 1; dst++, src= src->next)
+ {
+ dst->info= src->info;
+ dst->next= dst + 1;
+ }
+ /* Copy the last node */
+ dst->info= src->info;
+ dst->next= &end_of_list;
+ /* Setup 'last' member */
+ last= &dst->next;
+ return;
+ }
+ }
+ elements= 0;
+ first= &end_of_list;
+ last= &first;
+ }
inline base_list(bool error) { }
inline bool push_back(void *info)
{
@@ -348,6 +395,8 @@ template <class T> class List :public base_list
public:
inline List() :base_list() {}
inline List(const List<T> &tmp) :base_list(tmp) {}
+ inline List(const List<T> &tmp, MEM_ROOT *mem_root) :
+ base_list(tmp, mem_root) {}
inline bool push_back(T *a) { return base_list::push_back(a); }
inline bool push_back(T *a, MEM_ROOT *mem_root)
{ return base_list::push_back(a, mem_root); }
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index bdc08b7bd2d..0e4057d9ae4 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -696,7 +695,12 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
if (item->type() == Item::FIELD_ITEM)
{
Field *field= ((Item_field *)item)->field;
- field->reset();
+ if (field->reset())
+ {
+ my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0), field->field_name,
+ thd->row_count);
+ DBUG_RETURN(1);
+ }
field->set_null();
if (field == table->next_number_field)
table->auto_increment_field_not_null= TRUE;
@@ -745,6 +749,13 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
{
if (item->type() == Item::FIELD_ITEM)
{
+ Field *field= ((Item_field *)item)->field;
+ if (field->reset())
+ {
+ my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0),field->field_name,
+ thd->row_count);
+ DBUG_RETURN(1);
+ }
/*
QQ: We probably should not throw warning for each field.
But how about intention to always have the same number
diff --git a/sql/sql_locale.cc b/sql/sql_locale.cc
index b947b9dfa98..4e61c664106 100644
--- a/sql/sql_locale.cc
+++ b/sql/sql_locale.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -24,17 +23,6 @@
#include "mysql_priv.h"
-MY_LOCALE *my_locale_by_name(const char *name)
-{
- MY_LOCALE **locale;
- for( locale= my_locales; *locale != NULL; locale++)
- {
- if(!strcmp((*locale)->name, name))
- return *locale;
- }
- return NULL;
-}
-
/***** LOCALE BEGIN ar_AE: Arabic - United Arab Emirates *****/
static const char *my_locale_month_names_ar_AE[13] =
{"يناير","ÙØ¨Ø±Ø§ÙŠØ±","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر", NullS };
@@ -52,7 +40,17 @@ static TYPELIB my_locale_typelib_day_names_ar_AE =
{ array_elements(my_locale_day_names_ar_AE)-1, "", my_locale_day_names_ar_AE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_AE =
{ array_elements(my_locale_ab_day_names_ar_AE)-1, "", my_locale_ab_day_names_ar_AE, NULL };
-MY_LOCALE my_locale_ar_AE ( "ar_AE", "Arabic - United Arab Emirates", FALSE, &my_locale_typelib_month_names_ar_AE, &my_locale_typelib_ab_month_names_ar_AE, &my_locale_typelib_day_names_ar_AE, &my_locale_typelib_ab_day_names_ar_AE );
+MY_LOCALE my_locale_ar_AE
+(
+ 6,
+ "ar_AE",
+ "Arabic - United Arab Emirates",
+ FALSE,
+ &my_locale_typelib_month_names_ar_AE,
+ &my_locale_typelib_ab_month_names_ar_AE,
+ &my_locale_typelib_day_names_ar_AE,
+ &my_locale_typelib_ab_day_names_ar_AE
+);
/***** LOCALE END ar_AE *****/
/***** LOCALE BEGIN ar_BH: Arabic - Bahrain *****/
@@ -72,7 +70,17 @@ static TYPELIB my_locale_typelib_day_names_ar_BH =
{ array_elements(my_locale_day_names_ar_BH)-1, "", my_locale_day_names_ar_BH, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_BH =
{ array_elements(my_locale_ab_day_names_ar_BH)-1, "", my_locale_ab_day_names_ar_BH, NULL };
-MY_LOCALE my_locale_ar_BH ( "ar_BH", "Arabic - Bahrain", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_BH
+(
+ 7,
+ "ar_BH",
+ "Arabic - Bahrain",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_BH *****/
/***** LOCALE BEGIN ar_JO: Arabic - Jordan *****/
@@ -92,7 +100,17 @@ static TYPELIB my_locale_typelib_day_names_ar_JO =
{ array_elements(my_locale_day_names_ar_JO)-1, "", my_locale_day_names_ar_JO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_JO =
{ array_elements(my_locale_ab_day_names_ar_JO)-1, "", my_locale_ab_day_names_ar_JO, NULL };
-MY_LOCALE my_locale_ar_JO ( "ar_JO", "Arabic - Jordan", FALSE, &my_locale_typelib_month_names_ar_JO, &my_locale_typelib_ab_month_names_ar_JO, &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO );
+MY_LOCALE my_locale_ar_JO
+(
+ 8,
+ "ar_JO",
+ "Arabic - Jordan",
+ FALSE,
+ &my_locale_typelib_month_names_ar_JO,
+ &my_locale_typelib_ab_month_names_ar_JO,
+ &my_locale_typelib_day_names_ar_JO,
+ &my_locale_typelib_ab_day_names_ar_JO
+);
/***** LOCALE END ar_JO *****/
/***** LOCALE BEGIN ar_SA: Arabic - Saudi Arabia *****/
@@ -112,7 +130,17 @@ static TYPELIB my_locale_typelib_day_names_ar_SA =
{ array_elements(my_locale_day_names_ar_SA)-1, "", my_locale_day_names_ar_SA, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_SA =
{ array_elements(my_locale_ab_day_names_ar_SA)-1, "", my_locale_ab_day_names_ar_SA, NULL };
-MY_LOCALE my_locale_ar_SA ( "ar_SA", "Arabic - Saudi Arabia", FALSE, &my_locale_typelib_month_names_ar_SA, &my_locale_typelib_ab_month_names_ar_SA, &my_locale_typelib_day_names_ar_SA, &my_locale_typelib_ab_day_names_ar_SA );
+MY_LOCALE my_locale_ar_SA
+(
+ 9,
+ "ar_SA",
+ "Arabic - Saudi Arabia",
+ FALSE,
+ &my_locale_typelib_month_names_ar_SA,
+ &my_locale_typelib_ab_month_names_ar_SA,
+ &my_locale_typelib_day_names_ar_SA,
+ &my_locale_typelib_ab_day_names_ar_SA
+);
/***** LOCALE END ar_SA *****/
/***** LOCALE BEGIN ar_SY: Arabic - Syria *****/
@@ -132,7 +160,17 @@ static TYPELIB my_locale_typelib_day_names_ar_SY =
{ array_elements(my_locale_day_names_ar_SY)-1, "", my_locale_day_names_ar_SY, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_SY =
{ array_elements(my_locale_ab_day_names_ar_SY)-1, "", my_locale_ab_day_names_ar_SY, NULL };
-MY_LOCALE my_locale_ar_SY ( "ar_SY", "Arabic - Syria", FALSE, &my_locale_typelib_month_names_ar_SY, &my_locale_typelib_ab_month_names_ar_SY, &my_locale_typelib_day_names_ar_SY, &my_locale_typelib_ab_day_names_ar_SY );
+MY_LOCALE my_locale_ar_SY
+(
+ 10,
+ "ar_SY",
+ "Arabic - Syria",
+ FALSE,
+ &my_locale_typelib_month_names_ar_SY,
+ &my_locale_typelib_ab_month_names_ar_SY,
+ &my_locale_typelib_day_names_ar_SY,
+ &my_locale_typelib_ab_day_names_ar_SY
+);
/***** LOCALE END ar_SY *****/
/***** LOCALE BEGIN be_BY: Belarusian - Belarus *****/
@@ -152,7 +190,17 @@ static TYPELIB my_locale_typelib_day_names_be_BY =
{ array_elements(my_locale_day_names_be_BY)-1, "", my_locale_day_names_be_BY, NULL };
static TYPELIB my_locale_typelib_ab_day_names_be_BY =
{ array_elements(my_locale_ab_day_names_be_BY)-1, "", my_locale_ab_day_names_be_BY, NULL };
-MY_LOCALE my_locale_be_BY ( "be_BY", "Belarusian - Belarus", FALSE, &my_locale_typelib_month_names_be_BY, &my_locale_typelib_ab_month_names_be_BY, &my_locale_typelib_day_names_be_BY, &my_locale_typelib_ab_day_names_be_BY );
+MY_LOCALE my_locale_be_BY
+(
+ 11,
+ "be_BY",
+ "Belarusian - Belarus",
+ FALSE,
+ &my_locale_typelib_month_names_be_BY,
+ &my_locale_typelib_ab_month_names_be_BY,
+ &my_locale_typelib_day_names_be_BY,
+ &my_locale_typelib_ab_day_names_be_BY
+);
/***** LOCALE END be_BY *****/
/***** LOCALE BEGIN bg_BG: Bulgarian - Bulgaria *****/
@@ -172,7 +220,17 @@ static TYPELIB my_locale_typelib_day_names_bg_BG =
{ array_elements(my_locale_day_names_bg_BG)-1, "", my_locale_day_names_bg_BG, NULL };
static TYPELIB my_locale_typelib_ab_day_names_bg_BG =
{ array_elements(my_locale_ab_day_names_bg_BG)-1, "", my_locale_ab_day_names_bg_BG, NULL };
-MY_LOCALE my_locale_bg_BG ( "bg_BG", "Bulgarian - Bulgaria", FALSE, &my_locale_typelib_month_names_bg_BG, &my_locale_typelib_ab_month_names_bg_BG, &my_locale_typelib_day_names_bg_BG, &my_locale_typelib_ab_day_names_bg_BG );
+MY_LOCALE my_locale_bg_BG
+(
+ 12,
+ "bg_BG",
+ "Bulgarian - Bulgaria",
+ FALSE,
+ &my_locale_typelib_month_names_bg_BG,
+ &my_locale_typelib_ab_month_names_bg_BG,
+ &my_locale_typelib_day_names_bg_BG,
+ &my_locale_typelib_ab_day_names_bg_BG
+);
/***** LOCALE END bg_BG *****/
/***** LOCALE BEGIN ca_ES: Catalan - Catalan *****/
@@ -192,7 +250,17 @@ static TYPELIB my_locale_typelib_day_names_ca_ES =
{ array_elements(my_locale_day_names_ca_ES)-1, "", my_locale_day_names_ca_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ca_ES =
{ array_elements(my_locale_ab_day_names_ca_ES)-1, "", my_locale_ab_day_names_ca_ES, NULL };
-MY_LOCALE my_locale_ca_ES ( "ca_ES", "Catalan - Catalan", FALSE, &my_locale_typelib_month_names_ca_ES, &my_locale_typelib_ab_month_names_ca_ES, &my_locale_typelib_day_names_ca_ES, &my_locale_typelib_ab_day_names_ca_ES );
+MY_LOCALE my_locale_ca_ES
+(
+ 13,
+ "ca_ES",
+ "Catalan - Catalan",
+ FALSE,
+ &my_locale_typelib_month_names_ca_ES,
+ &my_locale_typelib_ab_month_names_ca_ES,
+ &my_locale_typelib_day_names_ca_ES,
+ &my_locale_typelib_ab_day_names_ca_ES
+);
/***** LOCALE END ca_ES *****/
/***** LOCALE BEGIN cs_CZ: Czech - Czech Republic *****/
@@ -212,7 +280,17 @@ static TYPELIB my_locale_typelib_day_names_cs_CZ =
{ array_elements(my_locale_day_names_cs_CZ)-1, "", my_locale_day_names_cs_CZ, NULL };
static TYPELIB my_locale_typelib_ab_day_names_cs_CZ =
{ array_elements(my_locale_ab_day_names_cs_CZ)-1, "", my_locale_ab_day_names_cs_CZ, NULL };
-MY_LOCALE my_locale_cs_CZ ( "cs_CZ", "Czech - Czech Republic", FALSE, &my_locale_typelib_month_names_cs_CZ, &my_locale_typelib_ab_month_names_cs_CZ, &my_locale_typelib_day_names_cs_CZ, &my_locale_typelib_ab_day_names_cs_CZ );
+MY_LOCALE my_locale_cs_CZ
+(
+ 14,
+ "cs_CZ",
+ "Czech - Czech Republic",
+ FALSE,
+ &my_locale_typelib_month_names_cs_CZ,
+ &my_locale_typelib_ab_month_names_cs_CZ,
+ &my_locale_typelib_day_names_cs_CZ,
+ &my_locale_typelib_ab_day_names_cs_CZ
+);
/***** LOCALE END cs_CZ *****/
/***** LOCALE BEGIN da_DK: Danish - Denmark *****/
@@ -232,7 +310,17 @@ static TYPELIB my_locale_typelib_day_names_da_DK =
{ array_elements(my_locale_day_names_da_DK)-1, "", my_locale_day_names_da_DK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_da_DK =
{ array_elements(my_locale_ab_day_names_da_DK)-1, "", my_locale_ab_day_names_da_DK, NULL };
-MY_LOCALE my_locale_da_DK ( "da_DK", "Danish - Denmark", FALSE, &my_locale_typelib_month_names_da_DK, &my_locale_typelib_ab_month_names_da_DK, &my_locale_typelib_day_names_da_DK, &my_locale_typelib_ab_day_names_da_DK );
+MY_LOCALE my_locale_da_DK
+(
+ 15,
+ "da_DK",
+ "Danish - Denmark",
+ FALSE,
+ &my_locale_typelib_month_names_da_DK,
+ &my_locale_typelib_ab_month_names_da_DK,
+ &my_locale_typelib_day_names_da_DK,
+ &my_locale_typelib_ab_day_names_da_DK
+);
/***** LOCALE END da_DK *****/
/***** LOCALE BEGIN de_AT: German - Austria *****/
@@ -252,7 +340,17 @@ static TYPELIB my_locale_typelib_day_names_de_AT =
{ array_elements(my_locale_day_names_de_AT)-1, "", my_locale_day_names_de_AT, NULL };
static TYPELIB my_locale_typelib_ab_day_names_de_AT =
{ array_elements(my_locale_ab_day_names_de_AT)-1, "", my_locale_ab_day_names_de_AT, NULL };
-MY_LOCALE my_locale_de_AT ( "de_AT", "German - Austria", FALSE, &my_locale_typelib_month_names_de_AT, &my_locale_typelib_ab_month_names_de_AT, &my_locale_typelib_day_names_de_AT, &my_locale_typelib_ab_day_names_de_AT );
+MY_LOCALE my_locale_de_AT
+(
+ 16,
+ "de_AT",
+ "German - Austria",
+ FALSE,
+ &my_locale_typelib_month_names_de_AT,
+ &my_locale_typelib_ab_month_names_de_AT,
+ &my_locale_typelib_day_names_de_AT,
+ &my_locale_typelib_ab_day_names_de_AT
+);
/***** LOCALE END de_AT *****/
/***** LOCALE BEGIN de_DE: German - Germany *****/
@@ -272,7 +370,17 @@ static TYPELIB my_locale_typelib_day_names_de_DE =
{ array_elements(my_locale_day_names_de_DE)-1, "", my_locale_day_names_de_DE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_de_DE =
{ array_elements(my_locale_ab_day_names_de_DE)-1, "", my_locale_ab_day_names_de_DE, NULL };
-MY_LOCALE my_locale_de_DE ( "de_DE", "German - Germany", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_DE
+(
+ 4,
+ "de_DE",
+ "German - Germany",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_DE *****/
/***** LOCALE BEGIN en_US: English - United States *****/
@@ -292,7 +400,17 @@ static TYPELIB my_locale_typelib_day_names_en_US =
{ array_elements(my_locale_day_names_en_US)-1, "", my_locale_day_names_en_US, NULL };
static TYPELIB my_locale_typelib_ab_day_names_en_US =
{ array_elements(my_locale_ab_day_names_en_US)-1, "", my_locale_ab_day_names_en_US, NULL };
-MY_LOCALE my_locale_en_US ( "en_US", "English - United States", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_US
+(
+ 0,
+ "en_US",
+ "English - United States",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_US *****/
/***** LOCALE BEGIN es_ES: Spanish - Spain *****/
@@ -312,7 +430,17 @@ static TYPELIB my_locale_typelib_day_names_es_ES =
{ array_elements(my_locale_day_names_es_ES)-1, "", my_locale_day_names_es_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_es_ES =
{ array_elements(my_locale_ab_day_names_es_ES)-1, "", my_locale_ab_day_names_es_ES, NULL };
-MY_LOCALE my_locale_es_ES ( "es_ES", "Spanish - Spain", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_ES
+(
+ 17,
+ "es_ES",
+ "Spanish - Spain",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_ES *****/
/***** LOCALE BEGIN et_EE: Estonian - Estonia *****/
@@ -332,7 +460,17 @@ static TYPELIB my_locale_typelib_day_names_et_EE =
{ array_elements(my_locale_day_names_et_EE)-1, "", my_locale_day_names_et_EE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_et_EE =
{ array_elements(my_locale_ab_day_names_et_EE)-1, "", my_locale_ab_day_names_et_EE, NULL };
-MY_LOCALE my_locale_et_EE ( "et_EE", "Estonian - Estonia", FALSE, &my_locale_typelib_month_names_et_EE, &my_locale_typelib_ab_month_names_et_EE, &my_locale_typelib_day_names_et_EE, &my_locale_typelib_ab_day_names_et_EE );
+MY_LOCALE my_locale_et_EE
+(
+ 18,
+ "et_EE",
+ "Estonian - Estonia",
+ FALSE,
+ &my_locale_typelib_month_names_et_EE,
+ &my_locale_typelib_ab_month_names_et_EE,
+ &my_locale_typelib_day_names_et_EE,
+ &my_locale_typelib_ab_day_names_et_EE
+);
/***** LOCALE END et_EE *****/
/***** LOCALE BEGIN eu_ES: Basque - Basque *****/
@@ -352,7 +490,17 @@ static TYPELIB my_locale_typelib_day_names_eu_ES =
{ array_elements(my_locale_day_names_eu_ES)-1, "", my_locale_day_names_eu_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_eu_ES =
{ array_elements(my_locale_ab_day_names_eu_ES)-1, "", my_locale_ab_day_names_eu_ES, NULL };
-MY_LOCALE my_locale_eu_ES ( "eu_ES", "Basque - Basque", TRUE, &my_locale_typelib_month_names_eu_ES, &my_locale_typelib_ab_month_names_eu_ES, &my_locale_typelib_day_names_eu_ES, &my_locale_typelib_ab_day_names_eu_ES );
+MY_LOCALE my_locale_eu_ES
+(
+ 19,
+ "eu_ES",
+ "Basque - Basque",
+ TRUE,
+ &my_locale_typelib_month_names_eu_ES,
+ &my_locale_typelib_ab_month_names_eu_ES,
+ &my_locale_typelib_day_names_eu_ES,
+ &my_locale_typelib_ab_day_names_eu_ES
+);
/***** LOCALE END eu_ES *****/
/***** LOCALE BEGIN fi_FI: Finnish - Finland *****/
@@ -372,7 +520,17 @@ static TYPELIB my_locale_typelib_day_names_fi_FI =
{ array_elements(my_locale_day_names_fi_FI)-1, "", my_locale_day_names_fi_FI, NULL };
static TYPELIB my_locale_typelib_ab_day_names_fi_FI =
{ array_elements(my_locale_ab_day_names_fi_FI)-1, "", my_locale_ab_day_names_fi_FI, NULL };
-MY_LOCALE my_locale_fi_FI ( "fi_FI", "Finnish - Finland", FALSE, &my_locale_typelib_month_names_fi_FI, &my_locale_typelib_ab_month_names_fi_FI, &my_locale_typelib_day_names_fi_FI, &my_locale_typelib_ab_day_names_fi_FI );
+MY_LOCALE my_locale_fi_FI
+(
+ 20,
+ "fi_FI",
+ "Finnish - Finland",
+ FALSE,
+ &my_locale_typelib_month_names_fi_FI,
+ &my_locale_typelib_ab_month_names_fi_FI,
+ &my_locale_typelib_day_names_fi_FI,
+ &my_locale_typelib_ab_day_names_fi_FI
+);
/***** LOCALE END fi_FI *****/
/***** LOCALE BEGIN fo_FO: Faroese - Faroe Islands *****/
@@ -392,7 +550,17 @@ static TYPELIB my_locale_typelib_day_names_fo_FO =
{ array_elements(my_locale_day_names_fo_FO)-1, "", my_locale_day_names_fo_FO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_fo_FO =
{ array_elements(my_locale_ab_day_names_fo_FO)-1, "", my_locale_ab_day_names_fo_FO, NULL };
-MY_LOCALE my_locale_fo_FO ( "fo_FO", "Faroese - Faroe Islands", FALSE, &my_locale_typelib_month_names_fo_FO, &my_locale_typelib_ab_month_names_fo_FO, &my_locale_typelib_day_names_fo_FO, &my_locale_typelib_ab_day_names_fo_FO );
+MY_LOCALE my_locale_fo_FO
+(
+ 21,
+ "fo_FO",
+ "Faroese - Faroe Islands",
+ FALSE,
+ &my_locale_typelib_month_names_fo_FO,
+ &my_locale_typelib_ab_month_names_fo_FO,
+ &my_locale_typelib_day_names_fo_FO,
+ &my_locale_typelib_ab_day_names_fo_FO
+);
/***** LOCALE END fo_FO *****/
/***** LOCALE BEGIN fr_FR: French - France *****/
@@ -412,7 +580,17 @@ static TYPELIB my_locale_typelib_day_names_fr_FR =
{ array_elements(my_locale_day_names_fr_FR)-1, "", my_locale_day_names_fr_FR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_fr_FR =
{ array_elements(my_locale_ab_day_names_fr_FR)-1, "", my_locale_ab_day_names_fr_FR, NULL };
-MY_LOCALE my_locale_fr_FR ( "fr_FR", "French - France", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_FR
+(
+ 5,
+ "fr_FR",
+ "French - France",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_FR *****/
/***** LOCALE BEGIN gl_ES: Galician - Galician *****/
@@ -432,7 +610,17 @@ static TYPELIB my_locale_typelib_day_names_gl_ES =
{ array_elements(my_locale_day_names_gl_ES)-1, "", my_locale_day_names_gl_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_gl_ES =
{ array_elements(my_locale_ab_day_names_gl_ES)-1, "", my_locale_ab_day_names_gl_ES, NULL };
-MY_LOCALE my_locale_gl_ES ( "gl_ES", "Galician - Galician", FALSE, &my_locale_typelib_month_names_gl_ES, &my_locale_typelib_ab_month_names_gl_ES, &my_locale_typelib_day_names_gl_ES, &my_locale_typelib_ab_day_names_gl_ES );
+MY_LOCALE my_locale_gl_ES
+(
+ 22,
+ "gl_ES",
+ "Galician - Galician",
+ FALSE,
+ &my_locale_typelib_month_names_gl_ES,
+ &my_locale_typelib_ab_month_names_gl_ES,
+ &my_locale_typelib_day_names_gl_ES,
+ &my_locale_typelib_ab_day_names_gl_ES
+);
/***** LOCALE END gl_ES *****/
/***** LOCALE BEGIN gu_IN: Gujarati - India *****/
@@ -452,7 +640,17 @@ static TYPELIB my_locale_typelib_day_names_gu_IN =
{ array_elements(my_locale_day_names_gu_IN)-1, "", my_locale_day_names_gu_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_gu_IN =
{ array_elements(my_locale_ab_day_names_gu_IN)-1, "", my_locale_ab_day_names_gu_IN, NULL };
-MY_LOCALE my_locale_gu_IN ( "gu_IN", "Gujarati - India", FALSE, &my_locale_typelib_month_names_gu_IN, &my_locale_typelib_ab_month_names_gu_IN, &my_locale_typelib_day_names_gu_IN, &my_locale_typelib_ab_day_names_gu_IN );
+MY_LOCALE my_locale_gu_IN
+(
+ 23,
+ "gu_IN",
+ "Gujarati - India",
+ FALSE,
+ &my_locale_typelib_month_names_gu_IN,
+ &my_locale_typelib_ab_month_names_gu_IN,
+ &my_locale_typelib_day_names_gu_IN,
+ &my_locale_typelib_ab_day_names_gu_IN
+);
/***** LOCALE END gu_IN *****/
/***** LOCALE BEGIN he_IL: Hebrew - Israel *****/
@@ -472,7 +670,17 @@ static TYPELIB my_locale_typelib_day_names_he_IL =
{ array_elements(my_locale_day_names_he_IL)-1, "", my_locale_day_names_he_IL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_he_IL =
{ array_elements(my_locale_ab_day_names_he_IL)-1, "", my_locale_ab_day_names_he_IL, NULL };
-MY_LOCALE my_locale_he_IL ( "he_IL", "Hebrew - Israel", FALSE, &my_locale_typelib_month_names_he_IL, &my_locale_typelib_ab_month_names_he_IL, &my_locale_typelib_day_names_he_IL, &my_locale_typelib_ab_day_names_he_IL );
+MY_LOCALE my_locale_he_IL
+(
+ 24,
+ "he_IL",
+ "Hebrew - Israel",
+ FALSE,
+ &my_locale_typelib_month_names_he_IL,
+ &my_locale_typelib_ab_month_names_he_IL,
+ &my_locale_typelib_day_names_he_IL,
+ &my_locale_typelib_ab_day_names_he_IL
+);
/***** LOCALE END he_IL *****/
/***** LOCALE BEGIN hi_IN: Hindi - India *****/
@@ -492,7 +700,17 @@ static TYPELIB my_locale_typelib_day_names_hi_IN =
{ array_elements(my_locale_day_names_hi_IN)-1, "", my_locale_day_names_hi_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_hi_IN =
{ array_elements(my_locale_ab_day_names_hi_IN)-1, "", my_locale_ab_day_names_hi_IN, NULL };
-MY_LOCALE my_locale_hi_IN ( "hi_IN", "Hindi - India", FALSE, &my_locale_typelib_month_names_hi_IN, &my_locale_typelib_ab_month_names_hi_IN, &my_locale_typelib_day_names_hi_IN, &my_locale_typelib_ab_day_names_hi_IN );
+MY_LOCALE my_locale_hi_IN
+(
+ 25,
+ "hi_IN",
+ "Hindi - India",
+ FALSE,
+ &my_locale_typelib_month_names_hi_IN,
+ &my_locale_typelib_ab_month_names_hi_IN,
+ &my_locale_typelib_day_names_hi_IN,
+ &my_locale_typelib_ab_day_names_hi_IN
+);
/***** LOCALE END hi_IN *****/
/***** LOCALE BEGIN hr_HR: Croatian - Croatia *****/
@@ -512,7 +730,17 @@ static TYPELIB my_locale_typelib_day_names_hr_HR =
{ array_elements(my_locale_day_names_hr_HR)-1, "", my_locale_day_names_hr_HR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_hr_HR =
{ array_elements(my_locale_ab_day_names_hr_HR)-1, "", my_locale_ab_day_names_hr_HR, NULL };
-MY_LOCALE my_locale_hr_HR ( "hr_HR", "Croatian - Croatia", FALSE, &my_locale_typelib_month_names_hr_HR, &my_locale_typelib_ab_month_names_hr_HR, &my_locale_typelib_day_names_hr_HR, &my_locale_typelib_ab_day_names_hr_HR );
+MY_LOCALE my_locale_hr_HR
+(
+ 26,
+ "hr_HR",
+ "Croatian - Croatia",
+ FALSE,
+ &my_locale_typelib_month_names_hr_HR,
+ &my_locale_typelib_ab_month_names_hr_HR,
+ &my_locale_typelib_day_names_hr_HR,
+ &my_locale_typelib_ab_day_names_hr_HR
+);
/***** LOCALE END hr_HR *****/
/***** LOCALE BEGIN hu_HU: Hungarian - Hungary *****/
@@ -532,7 +760,17 @@ static TYPELIB my_locale_typelib_day_names_hu_HU =
{ array_elements(my_locale_day_names_hu_HU)-1, "", my_locale_day_names_hu_HU, NULL };
static TYPELIB my_locale_typelib_ab_day_names_hu_HU =
{ array_elements(my_locale_ab_day_names_hu_HU)-1, "", my_locale_ab_day_names_hu_HU, NULL };
-MY_LOCALE my_locale_hu_HU ( "hu_HU", "Hungarian - Hungary", FALSE, &my_locale_typelib_month_names_hu_HU, &my_locale_typelib_ab_month_names_hu_HU, &my_locale_typelib_day_names_hu_HU, &my_locale_typelib_ab_day_names_hu_HU );
+MY_LOCALE my_locale_hu_HU
+(
+ 27,
+ "hu_HU",
+ "Hungarian - Hungary",
+ FALSE,
+ &my_locale_typelib_month_names_hu_HU,
+ &my_locale_typelib_ab_month_names_hu_HU,
+ &my_locale_typelib_day_names_hu_HU,
+ &my_locale_typelib_ab_day_names_hu_HU
+);
/***** LOCALE END hu_HU *****/
/***** LOCALE BEGIN id_ID: Indonesian - Indonesia *****/
@@ -552,7 +790,17 @@ static TYPELIB my_locale_typelib_day_names_id_ID =
{ array_elements(my_locale_day_names_id_ID)-1, "", my_locale_day_names_id_ID, NULL };
static TYPELIB my_locale_typelib_ab_day_names_id_ID =
{ array_elements(my_locale_ab_day_names_id_ID)-1, "", my_locale_ab_day_names_id_ID, NULL };
-MY_LOCALE my_locale_id_ID ( "id_ID", "Indonesian - Indonesia", TRUE, &my_locale_typelib_month_names_id_ID, &my_locale_typelib_ab_month_names_id_ID, &my_locale_typelib_day_names_id_ID, &my_locale_typelib_ab_day_names_id_ID );
+MY_LOCALE my_locale_id_ID
+(
+ 28,
+ "id_ID",
+ "Indonesian - Indonesia",
+ TRUE,
+ &my_locale_typelib_month_names_id_ID,
+ &my_locale_typelib_ab_month_names_id_ID,
+ &my_locale_typelib_day_names_id_ID,
+ &my_locale_typelib_ab_day_names_id_ID
+);
/***** LOCALE END id_ID *****/
/***** LOCALE BEGIN is_IS: Icelandic - Iceland *****/
@@ -572,7 +820,17 @@ static TYPELIB my_locale_typelib_day_names_is_IS =
{ array_elements(my_locale_day_names_is_IS)-1, "", my_locale_day_names_is_IS, NULL };
static TYPELIB my_locale_typelib_ab_day_names_is_IS =
{ array_elements(my_locale_ab_day_names_is_IS)-1, "", my_locale_ab_day_names_is_IS, NULL };
-MY_LOCALE my_locale_is_IS ( "is_IS", "Icelandic - Iceland", FALSE, &my_locale_typelib_month_names_is_IS, &my_locale_typelib_ab_month_names_is_IS, &my_locale_typelib_day_names_is_IS, &my_locale_typelib_ab_day_names_is_IS );
+MY_LOCALE my_locale_is_IS
+(
+ 29,
+ "is_IS",
+ "Icelandic - Iceland",
+ FALSE,
+ &my_locale_typelib_month_names_is_IS,
+ &my_locale_typelib_ab_month_names_is_IS,
+ &my_locale_typelib_day_names_is_IS,
+ &my_locale_typelib_ab_day_names_is_IS
+);
/***** LOCALE END is_IS *****/
/***** LOCALE BEGIN it_CH: Italian - Switzerland *****/
@@ -592,7 +850,17 @@ static TYPELIB my_locale_typelib_day_names_it_CH =
{ array_elements(my_locale_day_names_it_CH)-1, "", my_locale_day_names_it_CH, NULL };
static TYPELIB my_locale_typelib_ab_day_names_it_CH =
{ array_elements(my_locale_ab_day_names_it_CH)-1, "", my_locale_ab_day_names_it_CH, NULL };
-MY_LOCALE my_locale_it_CH ( "it_CH", "Italian - Switzerland", FALSE, &my_locale_typelib_month_names_it_CH, &my_locale_typelib_ab_month_names_it_CH, &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH );
+MY_LOCALE my_locale_it_CH
+(
+ 30,
+ "it_CH",
+ "Italian - Switzerland",
+ FALSE,
+ &my_locale_typelib_month_names_it_CH,
+ &my_locale_typelib_ab_month_names_it_CH,
+ &my_locale_typelib_day_names_it_CH,
+ &my_locale_typelib_ab_day_names_it_CH
+);
/***** LOCALE END it_CH *****/
/***** LOCALE BEGIN ja_JP: Japanese - Japan *****/
@@ -612,7 +880,17 @@ static TYPELIB my_locale_typelib_day_names_ja_JP =
{ array_elements(my_locale_day_names_ja_JP)-1, "", my_locale_day_names_ja_JP, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ja_JP =
{ array_elements(my_locale_ab_day_names_ja_JP)-1, "", my_locale_ab_day_names_ja_JP, NULL };
-MY_LOCALE my_locale_ja_JP ( "ja_JP", "Japanese - Japan", FALSE, &my_locale_typelib_month_names_ja_JP, &my_locale_typelib_ab_month_names_ja_JP, &my_locale_typelib_day_names_ja_JP, &my_locale_typelib_ab_day_names_ja_JP );
+MY_LOCALE my_locale_ja_JP
+(
+ 2,
+ "ja_JP",
+ "Japanese - Japan",
+ FALSE,
+ &my_locale_typelib_month_names_ja_JP,
+ &my_locale_typelib_ab_month_names_ja_JP,
+ &my_locale_typelib_day_names_ja_JP,
+ &my_locale_typelib_ab_day_names_ja_JP
+);
/***** LOCALE END ja_JP *****/
/***** LOCALE BEGIN ko_KR: Korean - Korea *****/
@@ -632,7 +910,17 @@ static TYPELIB my_locale_typelib_day_names_ko_KR =
{ array_elements(my_locale_day_names_ko_KR)-1, "", my_locale_day_names_ko_KR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ko_KR =
{ array_elements(my_locale_ab_day_names_ko_KR)-1, "", my_locale_ab_day_names_ko_KR, NULL };
-MY_LOCALE my_locale_ko_KR ( "ko_KR", "Korean - Korea", FALSE, &my_locale_typelib_month_names_ko_KR, &my_locale_typelib_ab_month_names_ko_KR, &my_locale_typelib_day_names_ko_KR, &my_locale_typelib_ab_day_names_ko_KR );
+MY_LOCALE my_locale_ko_KR
+(
+ 31,
+ "ko_KR",
+ "Korean - Korea",
+ FALSE,
+ &my_locale_typelib_month_names_ko_KR,
+ &my_locale_typelib_ab_month_names_ko_KR,
+ &my_locale_typelib_day_names_ko_KR,
+ &my_locale_typelib_ab_day_names_ko_KR
+);
/***** LOCALE END ko_KR *****/
/***** LOCALE BEGIN lt_LT: Lithuanian - Lithuania *****/
@@ -652,7 +940,17 @@ static TYPELIB my_locale_typelib_day_names_lt_LT =
{ array_elements(my_locale_day_names_lt_LT)-1, "", my_locale_day_names_lt_LT, NULL };
static TYPELIB my_locale_typelib_ab_day_names_lt_LT =
{ array_elements(my_locale_ab_day_names_lt_LT)-1, "", my_locale_ab_day_names_lt_LT, NULL };
-MY_LOCALE my_locale_lt_LT ( "lt_LT", "Lithuanian - Lithuania", FALSE, &my_locale_typelib_month_names_lt_LT, &my_locale_typelib_ab_month_names_lt_LT, &my_locale_typelib_day_names_lt_LT, &my_locale_typelib_ab_day_names_lt_LT );
+MY_LOCALE my_locale_lt_LT
+(
+ 32,
+ "lt_LT",
+ "Lithuanian - Lithuania",
+ FALSE,
+ &my_locale_typelib_month_names_lt_LT,
+ &my_locale_typelib_ab_month_names_lt_LT,
+ &my_locale_typelib_day_names_lt_LT,
+ &my_locale_typelib_ab_day_names_lt_LT
+);
/***** LOCALE END lt_LT *****/
/***** LOCALE BEGIN lv_LV: Latvian - Latvia *****/
@@ -672,7 +970,17 @@ static TYPELIB my_locale_typelib_day_names_lv_LV =
{ array_elements(my_locale_day_names_lv_LV)-1, "", my_locale_day_names_lv_LV, NULL };
static TYPELIB my_locale_typelib_ab_day_names_lv_LV =
{ array_elements(my_locale_ab_day_names_lv_LV)-1, "", my_locale_ab_day_names_lv_LV, NULL };
-MY_LOCALE my_locale_lv_LV ( "lv_LV", "Latvian - Latvia", FALSE, &my_locale_typelib_month_names_lv_LV, &my_locale_typelib_ab_month_names_lv_LV, &my_locale_typelib_day_names_lv_LV, &my_locale_typelib_ab_day_names_lv_LV );
+MY_LOCALE my_locale_lv_LV
+(
+ 33,
+ "lv_LV",
+ "Latvian - Latvia",
+ FALSE,
+ &my_locale_typelib_month_names_lv_LV,
+ &my_locale_typelib_ab_month_names_lv_LV,
+ &my_locale_typelib_day_names_lv_LV,
+ &my_locale_typelib_ab_day_names_lv_LV
+);
/***** LOCALE END lv_LV *****/
/***** LOCALE BEGIN mk_MK: Macedonian - FYROM *****/
@@ -692,7 +1000,17 @@ static TYPELIB my_locale_typelib_day_names_mk_MK =
{ array_elements(my_locale_day_names_mk_MK)-1, "", my_locale_day_names_mk_MK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_mk_MK =
{ array_elements(my_locale_ab_day_names_mk_MK)-1, "", my_locale_ab_day_names_mk_MK, NULL };
-MY_LOCALE my_locale_mk_MK ( "mk_MK", "Macedonian - FYROM", FALSE, &my_locale_typelib_month_names_mk_MK, &my_locale_typelib_ab_month_names_mk_MK, &my_locale_typelib_day_names_mk_MK, &my_locale_typelib_ab_day_names_mk_MK );
+MY_LOCALE my_locale_mk_MK
+(
+ 34,
+ "mk_MK",
+ "Macedonian - FYROM",
+ FALSE,
+ &my_locale_typelib_month_names_mk_MK,
+ &my_locale_typelib_ab_month_names_mk_MK,
+ &my_locale_typelib_day_names_mk_MK,
+ &my_locale_typelib_ab_day_names_mk_MK
+);
/***** LOCALE END mk_MK *****/
/***** LOCALE BEGIN mn_MN: Mongolia - Mongolian *****/
@@ -712,7 +1030,17 @@ static TYPELIB my_locale_typelib_day_names_mn_MN =
{ array_elements(my_locale_day_names_mn_MN)-1, "", my_locale_day_names_mn_MN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_mn_MN =
{ array_elements(my_locale_ab_day_names_mn_MN)-1, "", my_locale_ab_day_names_mn_MN, NULL };
-MY_LOCALE my_locale_mn_MN ( "mn_MN", "Mongolia - Mongolian", FALSE, &my_locale_typelib_month_names_mn_MN, &my_locale_typelib_ab_month_names_mn_MN, &my_locale_typelib_day_names_mn_MN, &my_locale_typelib_ab_day_names_mn_MN );
+MY_LOCALE my_locale_mn_MN
+(
+ 35,
+ "mn_MN",
+ "Mongolia - Mongolian",
+ FALSE,
+ &my_locale_typelib_month_names_mn_MN,
+ &my_locale_typelib_ab_month_names_mn_MN,
+ &my_locale_typelib_day_names_mn_MN,
+ &my_locale_typelib_ab_day_names_mn_MN
+);
/***** LOCALE END mn_MN *****/
/***** LOCALE BEGIN ms_MY: Malay - Malaysia *****/
@@ -732,7 +1060,17 @@ static TYPELIB my_locale_typelib_day_names_ms_MY =
{ array_elements(my_locale_day_names_ms_MY)-1, "", my_locale_day_names_ms_MY, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ms_MY =
{ array_elements(my_locale_ab_day_names_ms_MY)-1, "", my_locale_ab_day_names_ms_MY, NULL };
-MY_LOCALE my_locale_ms_MY ( "ms_MY", "Malay - Malaysia", TRUE, &my_locale_typelib_month_names_ms_MY, &my_locale_typelib_ab_month_names_ms_MY, &my_locale_typelib_day_names_ms_MY, &my_locale_typelib_ab_day_names_ms_MY );
+MY_LOCALE my_locale_ms_MY
+(
+ 36,
+ "ms_MY",
+ "Malay - Malaysia",
+ TRUE,
+ &my_locale_typelib_month_names_ms_MY,
+ &my_locale_typelib_ab_month_names_ms_MY,
+ &my_locale_typelib_day_names_ms_MY,
+ &my_locale_typelib_ab_day_names_ms_MY
+);
/***** LOCALE END ms_MY *****/
/***** LOCALE BEGIN nb_NO: Norwegian(Bokml) - Norway *****/
@@ -752,7 +1090,17 @@ static TYPELIB my_locale_typelib_day_names_nb_NO =
{ array_elements(my_locale_day_names_nb_NO)-1, "", my_locale_day_names_nb_NO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_nb_NO =
{ array_elements(my_locale_ab_day_names_nb_NO)-1, "", my_locale_ab_day_names_nb_NO, NULL };
-MY_LOCALE my_locale_nb_NO ( "nb_NO", "Norwegian(Bokml) - Norway", FALSE, &my_locale_typelib_month_names_nb_NO, &my_locale_typelib_ab_month_names_nb_NO, &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO );
+MY_LOCALE my_locale_nb_NO
+(
+ 37,
+ "nb_NO",
+ "Norwegian(Bokml) - Norway",
+ FALSE,
+ &my_locale_typelib_month_names_nb_NO,
+ &my_locale_typelib_ab_month_names_nb_NO,
+ &my_locale_typelib_day_names_nb_NO,
+ &my_locale_typelib_ab_day_names_nb_NO
+);
/***** LOCALE END nb_NO *****/
/***** LOCALE BEGIN nl_NL: Dutch - The Netherlands *****/
@@ -772,7 +1120,17 @@ static TYPELIB my_locale_typelib_day_names_nl_NL =
{ array_elements(my_locale_day_names_nl_NL)-1, "", my_locale_day_names_nl_NL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_nl_NL =
{ array_elements(my_locale_ab_day_names_nl_NL)-1, "", my_locale_ab_day_names_nl_NL, NULL };
-MY_LOCALE my_locale_nl_NL ( "nl_NL", "Dutch - The Netherlands", TRUE, &my_locale_typelib_month_names_nl_NL, &my_locale_typelib_ab_month_names_nl_NL, &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL );
+MY_LOCALE my_locale_nl_NL
+(
+ 38,
+ "nl_NL",
+ "Dutch - The Netherlands",
+ TRUE,
+ &my_locale_typelib_month_names_nl_NL,
+ &my_locale_typelib_ab_month_names_nl_NL,
+ &my_locale_typelib_day_names_nl_NL,
+ &my_locale_typelib_ab_day_names_nl_NL
+);
/***** LOCALE END nl_NL *****/
/***** LOCALE BEGIN pl_PL: Polish - Poland *****/
@@ -792,7 +1150,17 @@ static TYPELIB my_locale_typelib_day_names_pl_PL =
{ array_elements(my_locale_day_names_pl_PL)-1, "", my_locale_day_names_pl_PL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_pl_PL =
{ array_elements(my_locale_ab_day_names_pl_PL)-1, "", my_locale_ab_day_names_pl_PL, NULL };
-MY_LOCALE my_locale_pl_PL ( "pl_PL", "Polish - Poland", FALSE, &my_locale_typelib_month_names_pl_PL, &my_locale_typelib_ab_month_names_pl_PL, &my_locale_typelib_day_names_pl_PL, &my_locale_typelib_ab_day_names_pl_PL );
+MY_LOCALE my_locale_pl_PL
+(
+ 39,
+ "pl_PL",
+ "Polish - Poland",
+ FALSE,
+ &my_locale_typelib_month_names_pl_PL,
+ &my_locale_typelib_ab_month_names_pl_PL,
+ &my_locale_typelib_day_names_pl_PL,
+ &my_locale_typelib_ab_day_names_pl_PL
+);
/***** LOCALE END pl_PL *****/
/***** LOCALE BEGIN pt_BR: Portugese - Brazil *****/
@@ -812,7 +1180,17 @@ static TYPELIB my_locale_typelib_day_names_pt_BR =
{ array_elements(my_locale_day_names_pt_BR)-1, "", my_locale_day_names_pt_BR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_pt_BR =
{ array_elements(my_locale_ab_day_names_pt_BR)-1, "", my_locale_ab_day_names_pt_BR, NULL };
-MY_LOCALE my_locale_pt_BR ( "pt_BR", "Portugese - Brazil", FALSE, &my_locale_typelib_month_names_pt_BR, &my_locale_typelib_ab_month_names_pt_BR, &my_locale_typelib_day_names_pt_BR, &my_locale_typelib_ab_day_names_pt_BR );
+MY_LOCALE my_locale_pt_BR
+(
+ 40,
+ "pt_BR",
+ "Portugese - Brazil",
+ FALSE,
+ &my_locale_typelib_month_names_pt_BR,
+ &my_locale_typelib_ab_month_names_pt_BR,
+ &my_locale_typelib_day_names_pt_BR,
+ &my_locale_typelib_ab_day_names_pt_BR
+);
/***** LOCALE END pt_BR *****/
/***** LOCALE BEGIN pt_PT: Portugese - Portugal *****/
@@ -832,7 +1210,17 @@ static TYPELIB my_locale_typelib_day_names_pt_PT =
{ array_elements(my_locale_day_names_pt_PT)-1, "", my_locale_day_names_pt_PT, NULL };
static TYPELIB my_locale_typelib_ab_day_names_pt_PT =
{ array_elements(my_locale_ab_day_names_pt_PT)-1, "", my_locale_ab_day_names_pt_PT, NULL };
-MY_LOCALE my_locale_pt_PT ( "pt_PT", "Portugese - Portugal", FALSE, &my_locale_typelib_month_names_pt_PT, &my_locale_typelib_ab_month_names_pt_PT, &my_locale_typelib_day_names_pt_PT, &my_locale_typelib_ab_day_names_pt_PT );
+MY_LOCALE my_locale_pt_PT
+(
+ 41,
+ "pt_PT",
+ "Portugese - Portugal",
+ FALSE,
+ &my_locale_typelib_month_names_pt_PT,
+ &my_locale_typelib_ab_month_names_pt_PT,
+ &my_locale_typelib_day_names_pt_PT,
+ &my_locale_typelib_ab_day_names_pt_PT
+);
/***** LOCALE END pt_PT *****/
/***** LOCALE BEGIN ro_RO: Romanian - Romania *****/
@@ -852,7 +1240,17 @@ static TYPELIB my_locale_typelib_day_names_ro_RO =
{ array_elements(my_locale_day_names_ro_RO)-1, "", my_locale_day_names_ro_RO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ro_RO =
{ array_elements(my_locale_ab_day_names_ro_RO)-1, "", my_locale_ab_day_names_ro_RO, NULL };
-MY_LOCALE my_locale_ro_RO ( "ro_RO", "Romanian - Romania", FALSE, &my_locale_typelib_month_names_ro_RO, &my_locale_typelib_ab_month_names_ro_RO, &my_locale_typelib_day_names_ro_RO, &my_locale_typelib_ab_day_names_ro_RO );
+MY_LOCALE my_locale_ro_RO
+(
+ 42,
+ "ro_RO",
+ "Romanian - Romania",
+ FALSE,
+ &my_locale_typelib_month_names_ro_RO,
+ &my_locale_typelib_ab_month_names_ro_RO,
+ &my_locale_typelib_day_names_ro_RO,
+ &my_locale_typelib_ab_day_names_ro_RO
+);
/***** LOCALE END ro_RO *****/
/***** LOCALE BEGIN ru_RU: Russian - Russia *****/
@@ -872,7 +1270,17 @@ static TYPELIB my_locale_typelib_day_names_ru_RU =
{ array_elements(my_locale_day_names_ru_RU)-1, "", my_locale_day_names_ru_RU, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ru_RU =
{ array_elements(my_locale_ab_day_names_ru_RU)-1, "", my_locale_ab_day_names_ru_RU, NULL };
-MY_LOCALE my_locale_ru_RU ( "ru_RU", "Russian - Russia", FALSE, &my_locale_typelib_month_names_ru_RU, &my_locale_typelib_ab_month_names_ru_RU, &my_locale_typelib_day_names_ru_RU, &my_locale_typelib_ab_day_names_ru_RU );
+MY_LOCALE my_locale_ru_RU
+(
+ 43,
+ "ru_RU",
+ "Russian - Russia",
+ FALSE,
+ &my_locale_typelib_month_names_ru_RU,
+ &my_locale_typelib_ab_month_names_ru_RU,
+ &my_locale_typelib_day_names_ru_RU,
+ &my_locale_typelib_ab_day_names_ru_RU
+);
/***** LOCALE END ru_RU *****/
/***** LOCALE BEGIN ru_UA: Russian - Ukraine *****/
@@ -892,7 +1300,17 @@ static TYPELIB my_locale_typelib_day_names_ru_UA =
{ array_elements(my_locale_day_names_ru_UA)-1, "", my_locale_day_names_ru_UA, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ru_UA =
{ array_elements(my_locale_ab_day_names_ru_UA)-1, "", my_locale_ab_day_names_ru_UA, NULL };
-MY_LOCALE my_locale_ru_UA ( "ru_UA", "Russian - Ukraine", FALSE, &my_locale_typelib_month_names_ru_UA, &my_locale_typelib_ab_month_names_ru_UA, &my_locale_typelib_day_names_ru_UA, &my_locale_typelib_ab_day_names_ru_UA );
+MY_LOCALE my_locale_ru_UA
+(
+ 44,
+ "ru_UA",
+ "Russian - Ukraine",
+ FALSE,
+ &my_locale_typelib_month_names_ru_UA,
+ &my_locale_typelib_ab_month_names_ru_UA,
+ &my_locale_typelib_day_names_ru_UA,
+ &my_locale_typelib_ab_day_names_ru_UA
+);
/***** LOCALE END ru_UA *****/
/***** LOCALE BEGIN sk_SK: Slovak - Slovakia *****/
@@ -912,7 +1330,17 @@ static TYPELIB my_locale_typelib_day_names_sk_SK =
{ array_elements(my_locale_day_names_sk_SK)-1, "", my_locale_day_names_sk_SK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sk_SK =
{ array_elements(my_locale_ab_day_names_sk_SK)-1, "", my_locale_ab_day_names_sk_SK, NULL };
-MY_LOCALE my_locale_sk_SK ( "sk_SK", "Slovak - Slovakia", FALSE, &my_locale_typelib_month_names_sk_SK, &my_locale_typelib_ab_month_names_sk_SK, &my_locale_typelib_day_names_sk_SK, &my_locale_typelib_ab_day_names_sk_SK );
+MY_LOCALE my_locale_sk_SK
+(
+ 45,
+ "sk_SK",
+ "Slovak - Slovakia",
+ FALSE,
+ &my_locale_typelib_month_names_sk_SK,
+ &my_locale_typelib_ab_month_names_sk_SK,
+ &my_locale_typelib_day_names_sk_SK,
+ &my_locale_typelib_ab_day_names_sk_SK
+);
/***** LOCALE END sk_SK *****/
/***** LOCALE BEGIN sl_SI: Slovenian - Slovenia *****/
@@ -932,7 +1360,17 @@ static TYPELIB my_locale_typelib_day_names_sl_SI =
{ array_elements(my_locale_day_names_sl_SI)-1, "", my_locale_day_names_sl_SI, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sl_SI =
{ array_elements(my_locale_ab_day_names_sl_SI)-1, "", my_locale_ab_day_names_sl_SI, NULL };
-MY_LOCALE my_locale_sl_SI ( "sl_SI", "Slovenian - Slovenia", FALSE, &my_locale_typelib_month_names_sl_SI, &my_locale_typelib_ab_month_names_sl_SI, &my_locale_typelib_day_names_sl_SI, &my_locale_typelib_ab_day_names_sl_SI );
+MY_LOCALE my_locale_sl_SI
+(
+ 46,
+ "sl_SI",
+ "Slovenian - Slovenia",
+ FALSE,
+ &my_locale_typelib_month_names_sl_SI,
+ &my_locale_typelib_ab_month_names_sl_SI,
+ &my_locale_typelib_day_names_sl_SI,
+ &my_locale_typelib_ab_day_names_sl_SI
+);
/***** LOCALE END sl_SI *****/
/***** LOCALE BEGIN sq_AL: Albanian - Albania *****/
@@ -952,7 +1390,17 @@ static TYPELIB my_locale_typelib_day_names_sq_AL =
{ array_elements(my_locale_day_names_sq_AL)-1, "", my_locale_day_names_sq_AL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sq_AL =
{ array_elements(my_locale_ab_day_names_sq_AL)-1, "", my_locale_ab_day_names_sq_AL, NULL };
-MY_LOCALE my_locale_sq_AL ( "sq_AL", "Albanian - Albania", FALSE, &my_locale_typelib_month_names_sq_AL, &my_locale_typelib_ab_month_names_sq_AL, &my_locale_typelib_day_names_sq_AL, &my_locale_typelib_ab_day_names_sq_AL );
+MY_LOCALE my_locale_sq_AL
+(
+ 47,
+ "sq_AL",
+ "Albanian - Albania",
+ FALSE,
+ &my_locale_typelib_month_names_sq_AL,
+ &my_locale_typelib_ab_month_names_sq_AL,
+ &my_locale_typelib_day_names_sq_AL,
+ &my_locale_typelib_ab_day_names_sq_AL
+);
/***** LOCALE END sq_AL *****/
/***** LOCALE BEGIN sr_YU: Servian - Yugoslavia *****/
@@ -972,7 +1420,17 @@ static TYPELIB my_locale_typelib_day_names_sr_YU =
{ array_elements(my_locale_day_names_sr_YU)-1, "", my_locale_day_names_sr_YU, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sr_YU =
{ array_elements(my_locale_ab_day_names_sr_YU)-1, "", my_locale_ab_day_names_sr_YU, NULL };
-MY_LOCALE my_locale_sr_YU ( "sr_YU", "Servian - Yugoslavia", FALSE, &my_locale_typelib_month_names_sr_YU, &my_locale_typelib_ab_month_names_sr_YU, &my_locale_typelib_day_names_sr_YU, &my_locale_typelib_ab_day_names_sr_YU );
+MY_LOCALE my_locale_sr_YU
+(
+ 48,
+ "sr_YU",
+ "Servian - Yugoslavia",
+ FALSE,
+ &my_locale_typelib_month_names_sr_YU,
+ &my_locale_typelib_ab_month_names_sr_YU,
+ &my_locale_typelib_day_names_sr_YU,
+ &my_locale_typelib_ab_day_names_sr_YU
+);
/***** LOCALE END sr_YU *****/
/***** LOCALE BEGIN sv_SE: Swedish - Sweden *****/
@@ -992,7 +1450,17 @@ static TYPELIB my_locale_typelib_day_names_sv_SE =
{ array_elements(my_locale_day_names_sv_SE)-1, "", my_locale_day_names_sv_SE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sv_SE =
{ array_elements(my_locale_ab_day_names_sv_SE)-1, "", my_locale_ab_day_names_sv_SE, NULL };
-MY_LOCALE my_locale_sv_SE ( "sv_SE", "Swedish - Sweden", FALSE, &my_locale_typelib_month_names_sv_SE, &my_locale_typelib_ab_month_names_sv_SE, &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE );
+MY_LOCALE my_locale_sv_SE
+(
+ 3,
+ "sv_SE",
+ "Swedish - Sweden",
+ FALSE,
+ &my_locale_typelib_month_names_sv_SE,
+ &my_locale_typelib_ab_month_names_sv_SE,
+ &my_locale_typelib_day_names_sv_SE,
+ &my_locale_typelib_ab_day_names_sv_SE
+);
/***** LOCALE END sv_SE *****/
/***** LOCALE BEGIN ta_IN: Tamil - India *****/
@@ -1012,7 +1480,17 @@ static TYPELIB my_locale_typelib_day_names_ta_IN =
{ array_elements(my_locale_day_names_ta_IN)-1, "", my_locale_day_names_ta_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ta_IN =
{ array_elements(my_locale_ab_day_names_ta_IN)-1, "", my_locale_ab_day_names_ta_IN, NULL };
-MY_LOCALE my_locale_ta_IN ( "ta_IN", "Tamil - India", FALSE, &my_locale_typelib_month_names_ta_IN, &my_locale_typelib_ab_month_names_ta_IN, &my_locale_typelib_day_names_ta_IN, &my_locale_typelib_ab_day_names_ta_IN );
+MY_LOCALE my_locale_ta_IN
+(
+ 49,
+ "ta_IN",
+ "Tamil - India",
+ FALSE,
+ &my_locale_typelib_month_names_ta_IN,
+ &my_locale_typelib_ab_month_names_ta_IN,
+ &my_locale_typelib_day_names_ta_IN,
+ &my_locale_typelib_ab_day_names_ta_IN
+);
/***** LOCALE END ta_IN *****/
/***** LOCALE BEGIN te_IN: Telugu - India *****/
@@ -1032,7 +1510,17 @@ static TYPELIB my_locale_typelib_day_names_te_IN =
{ array_elements(my_locale_day_names_te_IN)-1, "", my_locale_day_names_te_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_te_IN =
{ array_elements(my_locale_ab_day_names_te_IN)-1, "", my_locale_ab_day_names_te_IN, NULL };
-MY_LOCALE my_locale_te_IN ( "te_IN", "Telugu - India", FALSE, &my_locale_typelib_month_names_te_IN, &my_locale_typelib_ab_month_names_te_IN, &my_locale_typelib_day_names_te_IN, &my_locale_typelib_ab_day_names_te_IN );
+MY_LOCALE my_locale_te_IN
+(
+ 50,
+ "te_IN",
+ "Telugu - India",
+ FALSE,
+ &my_locale_typelib_month_names_te_IN,
+ &my_locale_typelib_ab_month_names_te_IN,
+ &my_locale_typelib_day_names_te_IN,
+ &my_locale_typelib_ab_day_names_te_IN
+);
/***** LOCALE END te_IN *****/
/***** LOCALE BEGIN th_TH: Thai - Thailand *****/
@@ -1052,7 +1540,17 @@ static TYPELIB my_locale_typelib_day_names_th_TH =
{ array_elements(my_locale_day_names_th_TH)-1, "", my_locale_day_names_th_TH, NULL };
static TYPELIB my_locale_typelib_ab_day_names_th_TH =
{ array_elements(my_locale_ab_day_names_th_TH)-1, "", my_locale_ab_day_names_th_TH, NULL };
-MY_LOCALE my_locale_th_TH ( "th_TH", "Thai - Thailand", FALSE, &my_locale_typelib_month_names_th_TH, &my_locale_typelib_ab_month_names_th_TH, &my_locale_typelib_day_names_th_TH, &my_locale_typelib_ab_day_names_th_TH );
+MY_LOCALE my_locale_th_TH
+(
+ 51,
+ "th_TH",
+ "Thai - Thailand",
+ FALSE,
+ &my_locale_typelib_month_names_th_TH,
+ &my_locale_typelib_ab_month_names_th_TH,
+ &my_locale_typelib_day_names_th_TH,
+ &my_locale_typelib_ab_day_names_th_TH
+);
/***** LOCALE END th_TH *****/
/***** LOCALE BEGIN tr_TR: Turkish - Turkey *****/
@@ -1072,7 +1570,17 @@ static TYPELIB my_locale_typelib_day_names_tr_TR =
{ array_elements(my_locale_day_names_tr_TR)-1, "", my_locale_day_names_tr_TR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_tr_TR =
{ array_elements(my_locale_ab_day_names_tr_TR)-1, "", my_locale_ab_day_names_tr_TR, NULL };
-MY_LOCALE my_locale_tr_TR ( "tr_TR", "Turkish - Turkey", FALSE, &my_locale_typelib_month_names_tr_TR, &my_locale_typelib_ab_month_names_tr_TR, &my_locale_typelib_day_names_tr_TR, &my_locale_typelib_ab_day_names_tr_TR );
+MY_LOCALE my_locale_tr_TR
+(
+ 52,
+ "tr_TR",
+ "Turkish - Turkey",
+ FALSE,
+ &my_locale_typelib_month_names_tr_TR,
+ &my_locale_typelib_ab_month_names_tr_TR,
+ &my_locale_typelib_day_names_tr_TR,
+ &my_locale_typelib_ab_day_names_tr_TR
+);
/***** LOCALE END tr_TR *****/
/***** LOCALE BEGIN uk_UA: Ukrainian - Ukraine *****/
@@ -1092,7 +1600,17 @@ static TYPELIB my_locale_typelib_day_names_uk_UA =
{ array_elements(my_locale_day_names_uk_UA)-1, "", my_locale_day_names_uk_UA, NULL };
static TYPELIB my_locale_typelib_ab_day_names_uk_UA =
{ array_elements(my_locale_ab_day_names_uk_UA)-1, "", my_locale_ab_day_names_uk_UA, NULL };
-MY_LOCALE my_locale_uk_UA ( "uk_UA", "Ukrainian - Ukraine", FALSE, &my_locale_typelib_month_names_uk_UA, &my_locale_typelib_ab_month_names_uk_UA, &my_locale_typelib_day_names_uk_UA, &my_locale_typelib_ab_day_names_uk_UA );
+MY_LOCALE my_locale_uk_UA
+(
+ 53,
+ "uk_UA",
+ "Ukrainian - Ukraine",
+ FALSE,
+ &my_locale_typelib_month_names_uk_UA,
+ &my_locale_typelib_ab_month_names_uk_UA,
+ &my_locale_typelib_day_names_uk_UA,
+ &my_locale_typelib_ab_day_names_uk_UA
+);
/***** LOCALE END uk_UA *****/
/***** LOCALE BEGIN ur_PK: Urdu - Pakistan *****/
@@ -1112,7 +1630,17 @@ static TYPELIB my_locale_typelib_day_names_ur_PK =
{ array_elements(my_locale_day_names_ur_PK)-1, "", my_locale_day_names_ur_PK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ur_PK =
{ array_elements(my_locale_ab_day_names_ur_PK)-1, "", my_locale_ab_day_names_ur_PK, NULL };
-MY_LOCALE my_locale_ur_PK ( "ur_PK", "Urdu - Pakistan", FALSE, &my_locale_typelib_month_names_ur_PK, &my_locale_typelib_ab_month_names_ur_PK, &my_locale_typelib_day_names_ur_PK, &my_locale_typelib_ab_day_names_ur_PK );
+MY_LOCALE my_locale_ur_PK
+(
+ 54,
+ "ur_PK",
+ "Urdu - Pakistan",
+ FALSE,
+ &my_locale_typelib_month_names_ur_PK,
+ &my_locale_typelib_ab_month_names_ur_PK,
+ &my_locale_typelib_day_names_ur_PK,
+ &my_locale_typelib_ab_day_names_ur_PK
+);
/***** LOCALE END ur_PK *****/
/***** LOCALE BEGIN vi_VN: Vietnamese - Vietnam *****/
@@ -1132,7 +1660,17 @@ static TYPELIB my_locale_typelib_day_names_vi_VN =
{ array_elements(my_locale_day_names_vi_VN)-1, "", my_locale_day_names_vi_VN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_vi_VN =
{ array_elements(my_locale_ab_day_names_vi_VN)-1, "", my_locale_ab_day_names_vi_VN, NULL };
-MY_LOCALE my_locale_vi_VN ( "vi_VN", "Vietnamese - Vietnam", FALSE, &my_locale_typelib_month_names_vi_VN, &my_locale_typelib_ab_month_names_vi_VN, &my_locale_typelib_day_names_vi_VN, &my_locale_typelib_ab_day_names_vi_VN );
+MY_LOCALE my_locale_vi_VN
+(
+ 55,
+ "vi_VN",
+ "Vietnamese - Vietnam",
+ FALSE,
+ &my_locale_typelib_month_names_vi_VN,
+ &my_locale_typelib_ab_month_names_vi_VN,
+ &my_locale_typelib_day_names_vi_VN,
+ &my_locale_typelib_ab_day_names_vi_VN
+);
/***** LOCALE END vi_VN *****/
/***** LOCALE BEGIN zh_CN: Chinese - Peoples Republic of China *****/
@@ -1152,7 +1690,17 @@ static TYPELIB my_locale_typelib_day_names_zh_CN =
{ array_elements(my_locale_day_names_zh_CN)-1, "", my_locale_day_names_zh_CN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_zh_CN =
{ array_elements(my_locale_ab_day_names_zh_CN)-1, "", my_locale_ab_day_names_zh_CN, NULL };
-MY_LOCALE my_locale_zh_CN ( "zh_CN", "Chinese - Peoples Republic of China", FALSE, &my_locale_typelib_month_names_zh_CN, &my_locale_typelib_ab_month_names_zh_CN, &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN );
+MY_LOCALE my_locale_zh_CN
+(
+ 56,
+ "zh_CN",
+ "Chinese - Peoples Republic of China",
+ FALSE,
+ &my_locale_typelib_month_names_zh_CN,
+ &my_locale_typelib_ab_month_names_zh_CN,
+ &my_locale_typelib_day_names_zh_CN,
+ &my_locale_typelib_ab_day_names_zh_CN
+);
/***** LOCALE END zh_CN *****/
/***** LOCALE BEGIN zh_TW: Chinese - Taiwan *****/
@@ -1172,217 +1720,754 @@ static TYPELIB my_locale_typelib_day_names_zh_TW =
{ array_elements(my_locale_day_names_zh_TW)-1, "", my_locale_day_names_zh_TW, NULL };
static TYPELIB my_locale_typelib_ab_day_names_zh_TW =
{ array_elements(my_locale_ab_day_names_zh_TW)-1, "", my_locale_ab_day_names_zh_TW, NULL };
-MY_LOCALE my_locale_zh_TW ( "zh_TW", "Chinese - Taiwan", FALSE, &my_locale_typelib_month_names_zh_TW, &my_locale_typelib_ab_month_names_zh_TW, &my_locale_typelib_day_names_zh_TW, &my_locale_typelib_ab_day_names_zh_TW );
+MY_LOCALE my_locale_zh_TW
+(
+ 57,
+ "zh_TW",
+ "Chinese - Taiwan",
+ FALSE,
+ &my_locale_typelib_month_names_zh_TW,
+ &my_locale_typelib_ab_month_names_zh_TW,
+ &my_locale_typelib_day_names_zh_TW,
+ &my_locale_typelib_ab_day_names_zh_TW
+);
/***** LOCALE END zh_TW *****/
/***** LOCALE BEGIN ar_DZ: Arabic - Algeria *****/
-MY_LOCALE my_locale_ar_DZ ( "ar_DZ", "Arabic - Algeria", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_DZ
+(
+ 58,
+ "ar_DZ",
+ "Arabic - Algeria",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_DZ *****/
/***** LOCALE BEGIN ar_EG: Arabic - Egypt *****/
-MY_LOCALE my_locale_ar_EG ( "ar_EG", "Arabic - Egypt", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_EG
+(
+ 59,
+ "ar_EG",
+ "Arabic - Egypt",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_EG *****/
/***** LOCALE BEGIN ar_IN: Arabic - Iran *****/
-MY_LOCALE my_locale_ar_IN ( "ar_IN", "Arabic - Iran", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_IN
+(
+ 60,
+ "ar_IN",
+ "Arabic - Iran",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_IN *****/
/***** LOCALE BEGIN ar_IQ: Arabic - Iraq *****/
-MY_LOCALE my_locale_ar_IQ ( "ar_IQ", "Arabic - Iraq", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_IQ
+(
+ 61,
+ "ar_IQ",
+ "Arabic - Iraq",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_IQ *****/
/***** LOCALE BEGIN ar_KW: Arabic - Kuwait *****/
-MY_LOCALE my_locale_ar_KW ( "ar_KW", "Arabic - Kuwait", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_KW
+(
+ 62,
+ "ar_KW",
+ "Arabic - Kuwait",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_KW *****/
/***** LOCALE BEGIN ar_LB: Arabic - Lebanon *****/
-MY_LOCALE my_locale_ar_LB ( "ar_LB", "Arabic - Lebanon", FALSE, &my_locale_typelib_month_names_ar_JO, &my_locale_typelib_ab_month_names_ar_JO, &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO );
+MY_LOCALE my_locale_ar_LB
+(
+ 63,
+ "ar_LB",
+ "Arabic - Lebanon",
+ FALSE,
+ &my_locale_typelib_month_names_ar_JO,
+ &my_locale_typelib_ab_month_names_ar_JO,
+ &my_locale_typelib_day_names_ar_JO,
+ &my_locale_typelib_ab_day_names_ar_JO
+);
/***** LOCALE END ar_LB *****/
/***** LOCALE BEGIN ar_LY: Arabic - Libya *****/
-MY_LOCALE my_locale_ar_LY ( "ar_LY", "Arabic - Libya", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_LY
+(
+ 64,
+ "ar_LY",
+ "Arabic - Libya",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_LY *****/
/***** LOCALE BEGIN ar_MA: Arabic - Morocco *****/
-MY_LOCALE my_locale_ar_MA ( "ar_MA", "Arabic - Morocco", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_MA
+(
+ 65,
+ "ar_MA",
+ "Arabic - Morocco",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_MA *****/
/***** LOCALE BEGIN ar_OM: Arabic - Oman *****/
-MY_LOCALE my_locale_ar_OM ( "ar_OM", "Arabic - Oman", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_OM
+(
+ 66,
+ "ar_OM",
+ "Arabic - Oman",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_OM *****/
/***** LOCALE BEGIN ar_QA: Arabic - Qatar *****/
-MY_LOCALE my_locale_ar_QA ( "ar_QA", "Arabic - Qatar", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_QA
+(
+ 67,
+ "ar_QA",
+ "Arabic - Qatar",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_QA *****/
/***** LOCALE BEGIN ar_SD: Arabic - Sudan *****/
-MY_LOCALE my_locale_ar_SD ( "ar_SD", "Arabic - Sudan", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_SD
+(
+ 68,
+ "ar_SD",
+ "Arabic - Sudan",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_SD *****/
/***** LOCALE BEGIN ar_TN: Arabic - Tunisia *****/
-MY_LOCALE my_locale_ar_TN ( "ar_TN", "Arabic - Tunisia", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_TN
+(
+ 69,
+ "ar_TN",
+ "Arabic - Tunisia",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_TN *****/
/***** LOCALE BEGIN ar_YE: Arabic - Yemen *****/
-MY_LOCALE my_locale_ar_YE ( "ar_YE", "Arabic - Yemen", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_YE
+(
+ 70,
+ "ar_YE",
+ "Arabic - Yemen",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_YE *****/
/***** LOCALE BEGIN de_BE: German - Belgium *****/
-MY_LOCALE my_locale_de_BE ( "de_BE", "German - Belgium", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_BE
+(
+ 71,
+ "de_BE",
+ "German - Belgium",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_BE *****/
/***** LOCALE BEGIN de_CH: German - Switzerland *****/
-MY_LOCALE my_locale_de_CH ( "de_CH", "German - Switzerland", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_CH
+(
+ 72,
+ "de_CH",
+ "German - Switzerland",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_CH *****/
/***** LOCALE BEGIN de_LU: German - Luxembourg *****/
-MY_LOCALE my_locale_de_LU ( "de_LU", "German - Luxembourg", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_LU
+(
+ 73,
+ "de_LU",
+ "German - Luxembourg",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_LU *****/
/***** LOCALE BEGIN en_AU: English - Australia *****/
-MY_LOCALE my_locale_en_AU ( "en_AU", "English - Australia", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_AU
+(
+ 74,
+ "en_AU",
+ "English - Australia",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_AU *****/
/***** LOCALE BEGIN en_CA: English - Canada *****/
-MY_LOCALE my_locale_en_CA ( "en_CA", "English - Canada", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_CA
+(
+ 75,
+ "en_CA",
+ "English - Canada",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_CA *****/
/***** LOCALE BEGIN en_GB: English - United Kingdom *****/
-MY_LOCALE my_locale_en_GB ( "en_GB", "English - United Kingdom", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_GB
+(
+ 1,
+ "en_GB",
+ "English - United Kingdom",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_GB *****/
/***** LOCALE BEGIN en_IN: English - India *****/
-MY_LOCALE my_locale_en_IN ( "en_IN", "English - India", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_IN
+(
+ 76,
+ "en_IN",
+ "English - India",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_IN *****/
/***** LOCALE BEGIN en_NZ: English - New Zealand *****/
-MY_LOCALE my_locale_en_NZ ( "en_NZ", "English - New Zealand", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_NZ
+(
+ 77,
+ "en_NZ",
+ "English - New Zealand",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_NZ *****/
/***** LOCALE BEGIN en_PH: English - Philippines *****/
-MY_LOCALE my_locale_en_PH ( "en_PH", "English - Philippines", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_PH
+(
+ 78,
+ "en_PH",
+ "English - Philippines",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_PH *****/
/***** LOCALE BEGIN en_ZA: English - South Africa *****/
-MY_LOCALE my_locale_en_ZA ( "en_ZA", "English - South Africa", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_ZA
+(
+ 79,
+ "en_ZA",
+ "English - South Africa",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_ZA *****/
/***** LOCALE BEGIN en_ZW: English - Zimbabwe *****/
-MY_LOCALE my_locale_en_ZW ( "en_ZW", "English - Zimbabwe", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_ZW
+(
+ 80,
+ "en_ZW",
+ "English - Zimbabwe",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_ZW *****/
/***** LOCALE BEGIN es_AR: Spanish - Argentina *****/
-MY_LOCALE my_locale_es_AR ( "es_AR", "Spanish - Argentina", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_AR
+(
+ 81,
+ "es_AR",
+ "Spanish - Argentina",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_AR *****/
/***** LOCALE BEGIN es_BO: Spanish - Bolivia *****/
-MY_LOCALE my_locale_es_BO ( "es_BO", "Spanish - Bolivia", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_BO
+(
+ 82,
+ "es_BO",
+ "Spanish - Bolivia",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_BO *****/
/***** LOCALE BEGIN es_CL: Spanish - Chile *****/
-MY_LOCALE my_locale_es_CL ( "es_CL", "Spanish - Chile", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_CL
+(
+ 83,
+ "es_CL",
+ "Spanish - Chile",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_CL *****/
/***** LOCALE BEGIN es_CO: Spanish - Columbia *****/
-MY_LOCALE my_locale_es_CO ( "es_CO", "Spanish - Columbia", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_CO
+(
+ 84,
+ "es_CO",
+ "Spanish - Columbia",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_CO *****/
/***** LOCALE BEGIN es_CR: Spanish - Costa Rica *****/
-MY_LOCALE my_locale_es_CR ( "es_CR", "Spanish - Costa Rica", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_CR
+(
+ 85,
+ "es_CR",
+ "Spanish - Costa Rica",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_CR *****/
/***** LOCALE BEGIN es_DO: Spanish - Dominican Republic *****/
-MY_LOCALE my_locale_es_DO ( "es_DO", "Spanish - Dominican Republic", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_DO
+(
+ 86,
+ "es_DO",
+ "Spanish - Dominican Republic",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_DO *****/
/***** LOCALE BEGIN es_EC: Spanish - Ecuador *****/
-MY_LOCALE my_locale_es_EC ( "es_EC", "Spanish - Ecuador", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_EC
+(
+ 87,
+ "es_EC",
+ "Spanish - Ecuador",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_EC *****/
/***** LOCALE BEGIN es_GT: Spanish - Guatemala *****/
-MY_LOCALE my_locale_es_GT ( "es_GT", "Spanish - Guatemala", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_GT
+(
+ 88,
+ "es_GT",
+ "Spanish - Guatemala",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_GT *****/
/***** LOCALE BEGIN es_HN: Spanish - Honduras *****/
-MY_LOCALE my_locale_es_HN ( "es_HN", "Spanish - Honduras", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_HN
+(
+ 89,
+ "es_HN",
+ "Spanish - Honduras",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_HN *****/
/***** LOCALE BEGIN es_MX: Spanish - Mexico *****/
-MY_LOCALE my_locale_es_MX ( "es_MX", "Spanish - Mexico", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_MX
+(
+ 90,
+ "es_MX",
+ "Spanish - Mexico",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_MX *****/
/***** LOCALE BEGIN es_NI: Spanish - Nicaragua *****/
-MY_LOCALE my_locale_es_NI ( "es_NI", "Spanish - Nicaragua", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_NI
+(
+ 91,
+ "es_NI",
+ "Spanish - Nicaragua",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_NI *****/
/***** LOCALE BEGIN es_PA: Spanish - Panama *****/
-MY_LOCALE my_locale_es_PA ( "es_PA", "Spanish - Panama", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PA
+(
+ 92,
+ "es_PA",
+ "Spanish - Panama",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PA *****/
/***** LOCALE BEGIN es_PE: Spanish - Peru *****/
-MY_LOCALE my_locale_es_PE ( "es_PE", "Spanish - Peru", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PE
+(
+ 93,
+ "es_PE",
+ "Spanish - Peru",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PE *****/
/***** LOCALE BEGIN es_PR: Spanish - Puerto Rico *****/
-MY_LOCALE my_locale_es_PR ( "es_PR", "Spanish - Puerto Rico", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PR
+(
+ 94,
+ "es_PR",
+ "Spanish - Puerto Rico",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PR *****/
/***** LOCALE BEGIN es_PY: Spanish - Paraguay *****/
-MY_LOCALE my_locale_es_PY ( "es_PY", "Spanish - Paraguay", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PY
+(
+ 95,
+ "es_PY",
+ "Spanish - Paraguay",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PY *****/
/***** LOCALE BEGIN es_SV: Spanish - El Salvador *****/
-MY_LOCALE my_locale_es_SV ( "es_SV", "Spanish - El Salvador", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_SV
+(
+ 96,
+ "es_SV",
+ "Spanish - El Salvador",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_SV *****/
/***** LOCALE BEGIN es_US: Spanish - United States *****/
-MY_LOCALE my_locale_es_US ( "es_US", "Spanish - United States", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_US
+(
+ 97,
+ "es_US",
+ "Spanish - United States",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_US *****/
/***** LOCALE BEGIN es_UY: Spanish - Uruguay *****/
-MY_LOCALE my_locale_es_UY ( "es_UY", "Spanish - Uruguay", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_UY
+(
+ 98,
+ "es_UY",
+ "Spanish - Uruguay",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_UY *****/
/***** LOCALE BEGIN es_VE: Spanish - Venezuela *****/
-MY_LOCALE my_locale_es_VE ( "es_VE", "Spanish - Venezuela", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_VE
+(
+ 99,
+ "es_VE",
+ "Spanish - Venezuela",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_VE *****/
/***** LOCALE BEGIN fr_BE: French - Belgium *****/
-MY_LOCALE my_locale_fr_BE ( "fr_BE", "French - Belgium", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_BE
+(
+ 100,
+ "fr_BE",
+ "French - Belgium",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_BE *****/
/***** LOCALE BEGIN fr_CA: French - Canada *****/
-MY_LOCALE my_locale_fr_CA ( "fr_CA", "French - Canada", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_CA
+(
+ 101,
+ "fr_CA",
+ "French - Canada",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_CA *****/
/***** LOCALE BEGIN fr_CH: French - Switzerland *****/
-MY_LOCALE my_locale_fr_CH ( "fr_CH", "French - Switzerland", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_CH
+(
+ 102,
+ "fr_CH",
+ "French - Switzerland",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_CH *****/
/***** LOCALE BEGIN fr_LU: French - Luxembourg *****/
-MY_LOCALE my_locale_fr_LU ( "fr_LU", "French - Luxembourg", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_LU
+(
+ 103,
+ "fr_LU",
+ "French - Luxembourg",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_LU *****/
/***** LOCALE BEGIN it_IT: Italian - Italy *****/
-MY_LOCALE my_locale_it_IT ( "it_IT", "Italian - Italy", FALSE, &my_locale_typelib_month_names_it_CH, &my_locale_typelib_ab_month_names_it_CH, &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH );
+MY_LOCALE my_locale_it_IT
+(
+ 104,
+ "it_IT",
+ "Italian - Italy",
+ FALSE,
+ &my_locale_typelib_month_names_it_CH,
+ &my_locale_typelib_ab_month_names_it_CH,
+ &my_locale_typelib_day_names_it_CH,
+ &my_locale_typelib_ab_day_names_it_CH
+);
/***** LOCALE END it_IT *****/
/***** LOCALE BEGIN nl_BE: Dutch - Belgium *****/
-MY_LOCALE my_locale_nl_BE ( "nl_BE", "Dutch - Belgium", TRUE, &my_locale_typelib_month_names_nl_NL, &my_locale_typelib_ab_month_names_nl_NL, &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL );
+MY_LOCALE my_locale_nl_BE
+(
+ 105,
+ "nl_BE",
+ "Dutch - Belgium",
+ TRUE,
+ &my_locale_typelib_month_names_nl_NL,
+ &my_locale_typelib_ab_month_names_nl_NL,
+ &my_locale_typelib_day_names_nl_NL,
+ &my_locale_typelib_ab_day_names_nl_NL
+);
/***** LOCALE END nl_BE *****/
/***** LOCALE BEGIN no_NO: Norwegian - Norway *****/
-MY_LOCALE my_locale_no_NO ( "no_NO", "Norwegian - Norway", FALSE, &my_locale_typelib_month_names_nb_NO, &my_locale_typelib_ab_month_names_nb_NO, &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO );
+MY_LOCALE my_locale_no_NO
+(
+ 106,
+ "no_NO",
+ "Norwegian - Norway",
+ FALSE,
+ &my_locale_typelib_month_names_nb_NO,
+ &my_locale_typelib_ab_month_names_nb_NO,
+ &my_locale_typelib_day_names_nb_NO,
+ &my_locale_typelib_ab_day_names_nb_NO
+);
/***** LOCALE END no_NO *****/
/***** LOCALE BEGIN sv_FI: Swedish - Finland *****/
-MY_LOCALE my_locale_sv_FI ( "sv_FI", "Swedish - Finland", FALSE, &my_locale_typelib_month_names_sv_SE, &my_locale_typelib_ab_month_names_sv_SE, &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE );
+MY_LOCALE my_locale_sv_FI
+(
+ 107,
+ "sv_FI",
+ "Swedish - Finland",
+ FALSE,
+ &my_locale_typelib_month_names_sv_SE,
+ &my_locale_typelib_ab_month_names_sv_SE,
+ &my_locale_typelib_day_names_sv_SE,
+ &my_locale_typelib_ab_day_names_sv_SE
+);
/***** LOCALE END sv_FI *****/
/***** LOCALE BEGIN zh_HK: Chinese - Hong Kong SAR *****/
-MY_LOCALE my_locale_zh_HK ( "zh_HK", "Chinese - Hong Kong SAR", FALSE, &my_locale_typelib_month_names_zh_CN, &my_locale_typelib_ab_month_names_zh_CN, &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN );
+MY_LOCALE my_locale_zh_HK
+(
+ 108,
+ "zh_HK",
+ "Chinese - Hong Kong SAR",
+ FALSE,
+ &my_locale_typelib_month_names_zh_CN,
+ &my_locale_typelib_ab_month_names_zh_CN,
+ &my_locale_typelib_day_names_zh_CN,
+ &my_locale_typelib_ab_day_names_zh_CN
+);
/***** LOCALE END zh_HK *****/
+
+/*
+ The list of all locales.
+ Note, locales must be ordered according to their
+ numbers to make my_locale_by_number() work fast.
+ Some debug asserts below check this.
+*/
MY_LOCALE *my_locales[]=
{
&my_locale_en_US,
@@ -1496,3 +2581,31 @@ MY_LOCALE *my_locales[]=
&my_locale_zh_HK,
NULL
};
+
+
+MY_LOCALE *my_locale_by_number(uint number)
+{
+ MY_LOCALE *locale;
+ if (number >= array_elements(my_locales) - 1)
+ return NULL;
+ locale= my_locales[number];
+ // Check that locale is on its correct position in the array
+ DBUG_ASSERT(locale == my_locales[locale->number]);
+ return locale;
+}
+
+
+MY_LOCALE *my_locale_by_name(const char *name)
+{
+ MY_LOCALE **locale;
+ for (locale= my_locales; *locale != NULL; locale++)
+ {
+ if (!my_strcasecmp(&my_charset_latin1, (*locale)->name, name))
+ {
+ // Check that locale is on its correct position in the array
+ DBUG_ASSERT((*locale) == my_locales[(*locale)->number]);
+ return *locale;
+ }
+ }
+ return NULL;
+}
diff --git a/sql/sql_manager.cc b/sql/sql_manager.cc
index 1d3acd1696c..33905bdb913 100644
--- a/sql/sql_manager.cc
+++ b/sql/sql_manager.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000, 2002, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_manager.h b/sql/sql_manager.h
index 35704705820..7ba1e9c0de2 100644
--- a/sql/sql_manager.h
+++ b/sql/sql_manager.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_map.cc b/sql/sql_map.cc
index 56b4b765355..03dc091b9b7 100644
--- a/sql/sql_map.cc
+++ b/sql/sql_map.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2004-2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_map.h b/sql/sql_map.h
index bfa6011ac54..d8eb64995aa 100644
--- a/sql/sql_map.h
+++ b/sql/sql_map.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2005 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_olap.cc b/sql/sql_olap.cc
index b457ff5a6d6..2749b0d1ec6 100644
--- a/sql/sql_olap.cc
+++ b/sql/sql_olap.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index fec7e5ab20d..b3f31b7e30c 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -2385,6 +2384,7 @@ static void reset_one_shot_variables(THD *thd)
thd->update_charset();
thd->variables.time_zone=
global_system_variables.time_zone;
+ thd->variables.lc_time_names= &my_locale_en_US;
thd->one_shot_set= 0;
}
@@ -2533,12 +2533,13 @@ mysql_execute_command(THD *thd)
tables. Except for the replication thread and the 'super' users.
*/
if (opt_readonly &&
- !(thd->security_ctx->master_access & SUPER_ACL) &&
- uc_update_queries[lex->sql_command] &&
- !((lex->sql_command == SQLCOM_CREATE_TABLE) &&
- (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) &&
- ((lex->sql_command != SQLCOM_UPDATE_MULTI) &&
- some_non_temp_table_to_be_updated(thd, all_tables)))
+ !(thd->security_ctx->master_access & SUPER_ACL) &&
+ uc_update_queries[lex->sql_command] &&
+ !((lex->sql_command == SQLCOM_CREATE_TABLE) &&
+ (lex->create_info.options & HA_LEX_CREATE_TMP_TABLE)) &&
+ !((lex->sql_command == SQLCOM_DROP_TABLE) && lex->drop_temporary) &&
+ ((lex->sql_command != SQLCOM_UPDATE_MULTI) &&
+ some_non_temp_table_to_be_updated(thd, all_tables)))
{
my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
DBUG_RETURN(-1);
@@ -2894,17 +2895,41 @@ mysql_execute_command(THD *thd)
// Skip first table, which is the table we are creating
TABLE_LIST *create_table= lex->unlink_first_table(&link_to_local);
TABLE_LIST *select_tables= lex->query_tables;
+ /*
+ Code below (especially in mysql_create_table() and select_create
+ methods) may modify HA_CREATE_INFO structure in LEX, so we have to
+ use a copy of this structure to make execution prepared statement-
+ safe. A shallow copy is enough as this code won't modify any memory
+ referenced from this structure.
+ */
+ HA_CREATE_INFO create_info(lex->create_info);
+ Alter_info alter_info(lex->alter_info, thd->mem_root);
+
+ if (thd->is_fatal_error)
+ {
+ /* out of memory when creating a copy of alter_info */
+ res= 1;
+ goto end_with_restore_list;
+ }
if ((res= create_table_precheck(thd, select_tables, create_table)))
goto end_with_restore_list;
+ create_info.alias= create_table->alias;
+
#ifndef HAVE_READLINK
- lex->create_info.data_file_name=lex->create_info.index_file_name=0;
+ if (create_info.data_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "DATA DIRECTORY option ignored");
+ if (create_info.index_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "INDEX DIRECTORY option ignored");
+ create_info.data_file_name= create_info.index_file_name= NULL;
#else
/* Fix names if symlinked tables */
- if (append_file_to_dir(thd, &lex->create_info.data_file_name,
+ if (append_file_to_dir(thd, &create_info.data_file_name,
create_table->table_name) ||
- append_file_to_dir(thd, &lex->create_info.index_file_name,
+ append_file_to_dir(thd, &create_info.index_file_name,
create_table->table_name))
goto end_with_restore_list;
#endif
@@ -2912,14 +2937,14 @@ mysql_execute_command(THD *thd)
If we are using SET CHARSET without DEFAULT, add an implicit
DEFAULT to not confuse old users. (This may change).
*/
- if ((lex->create_info.used_fields &
+ if ((create_info.used_fields &
(HA_CREATE_USED_DEFAULT_CHARSET | HA_CREATE_USED_CHARSET)) ==
HA_CREATE_USED_CHARSET)
{
- lex->create_info.used_fields&= ~HA_CREATE_USED_CHARSET;
- lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
- lex->create_info.default_table_charset= lex->create_info.table_charset;
- lex->create_info.table_charset= 0;
+ create_info.used_fields&= ~HA_CREATE_USED_CHARSET;
+ create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
+ create_info.default_table_charset= create_info.table_charset;
+ create_info.table_charset= 0;
}
/*
The create-select command will open and read-lock the select table
@@ -2953,7 +2978,7 @@ mysql_execute_command(THD *thd)
Is table which we are changing used somewhere in other parts
of query
*/
- if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
+ if (!(create_info.options & HA_LEX_CREATE_TMP_TABLE))
{
TABLE_LIST *duplicate;
if ((duplicate= unique_table(thd, create_table, select_tables)))
@@ -2964,10 +2989,10 @@ mysql_execute_command(THD *thd)
}
}
/* If we create merge table, we have to test tables in merge, too */
- if (lex->create_info.used_fields & HA_CREATE_USED_UNION)
+ if (create_info.used_fields & HA_CREATE_USED_UNION)
{
TABLE_LIST *tab;
- for (tab= (TABLE_LIST*) lex->create_info.merge_list.first;
+ for (tab= (TABLE_LIST*) create_info.merge_list.first;
tab;
tab= tab->next_local)
{
@@ -2980,14 +3005,16 @@ mysql_execute_command(THD *thd)
}
}
}
-
+ /*
+ select_create is currently not re-execution friendly and
+ needs to be created for every execution of a PS/SP.
+ */
if ((result= new select_create(create_table,
- &lex->create_info,
- lex->create_list,
- lex->key_list,
- select_lex->item_list,
- lex->duplicates,
- lex->ignore)))
+ &create_info,
+ &alter_info,
+ select_lex->item_list,
+ lex->duplicates,
+ lex->ignore)))
{
/*
CREATE from SELECT give its SELECT_LEX for SELECT,
@@ -2996,23 +3023,19 @@ mysql_execute_command(THD *thd)
res= handle_select(thd, lex, result, 0);
delete result;
}
- /* reset for PS */
- lex->create_list.empty();
- lex->key_list.empty();
}
}
else
{
/* regular create */
if (lex->name)
- res= mysql_create_like_table(thd, create_table, &lex->create_info,
- (Table_ident *)lex->name);
+ res= mysql_create_like_table(thd, create_table, &create_info,
+ (Table_ident *)lex->name);
else
{
res= mysql_create_table(thd, create_table->db,
- create_table->table_name, &lex->create_info,
- lex->create_list,
- lex->key_list, 0, 0);
+ create_table->table_name, &create_info,
+ &alter_info, 0, 0);
}
if (!res)
send_ok(thd);
@@ -3024,16 +3047,49 @@ end_with_restore_list:
break;
}
case SQLCOM_CREATE_INDEX:
+ /* Fall through */
+ case SQLCOM_DROP_INDEX:
+ /*
+ CREATE INDEX and DROP INDEX are implemented by calling ALTER
+ TABLE with proper arguments. This isn't very fast but it
+ should work for most cases.
+
+ In the future ALTER TABLE will notice that only added
+ indexes and create these one by one for the existing table
+ without having to do a full rebuild.
+
+ One should normally create all indexes with CREATE TABLE or
+ ALTER TABLE.
+ */
+ {
+ Alter_info alter_info(lex->alter_info, thd->mem_root);
+ HA_CREATE_INFO create_info;
+
+ if (thd->is_fatal_error) /* out of memory creating a copy of alter_info*/
+ goto error;
+
DBUG_ASSERT(first_table == all_tables && first_table != 0);
- if (check_one_table_access(thd, INDEX_ACL, all_tables))
+ if (check_one_table_access(thd, INDEX_ACL, first_table))
goto error; /* purecov: inspected */
- thd->enable_slow_log= opt_log_slow_admin_statements;
if (end_active_trans(thd))
goto error;
- else
- res = mysql_create_index(thd, first_table, lex->key_list);
- break;
+ /*
+ Currently CREATE INDEX or DROP INDEX cause a full table rebuild
+ and thus classify as slow administrative statements just like
+ ALTER TABLE.
+ */
+ thd->enable_slow_log= opt_log_slow_admin_statements;
+ bzero((char*) &create_info, sizeof(create_info));
+ create_info.db_type= DB_TYPE_DEFAULT;
+ create_info.row_type= ROW_TYPE_NOT_USED;
+ create_info.default_table_charset= thd->variables.collation_database;
+
+ res= mysql_alter_table(thd, first_table->db, first_table->table_name,
+ &create_info, first_table, &alter_info,
+ 0, (ORDER*) 0, 0);
+ break;
+ }
#ifdef HAVE_REPLICATION
case SQLCOM_SLAVE_START:
{
@@ -3074,6 +3130,17 @@ end_with_restore_list:
DBUG_ASSERT(first_table == all_tables && first_table != 0);
{
ulong priv=0;
+ /*
+ Code in mysql_alter_table() may modify its HA_CREATE_INFO argument,
+ so we have to use a copy of this structure to make execution
+ prepared statement- safe. A shallow copy is enough as no memory
+ referenced from this structure will be modified.
+ */
+ HA_CREATE_INFO create_info(lex->create_info);
+ Alter_info alter_info(lex->alter_info, thd->mem_root);
+
+ if (thd->is_fatal_error) /* out of memory creating a copy of alter_info */
+ goto error;
if (lex->name && (!lex->name[0] || strlen(lex->name) > NAME_LEN))
{
my_error(ER_WRONG_TABLE_NAME, MYF(0), lex->name);
@@ -3088,7 +3155,7 @@ end_with_restore_list:
is_schema_db(select_lex->db))||
check_merge_table_access(thd, first_table->db,
(TABLE_LIST *)
- lex->create_info.merge_list.first))
+ create_info.merge_list.first))
goto error; /* purecov: inspected */
if (grant_option)
{
@@ -3107,13 +3174,13 @@ end_with_restore_list:
}
}
/* Don't yet allow changing of symlinks with ALTER TABLE */
- if (lex->create_info.data_file_name)
+ if (create_info.data_file_name)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
"DATA DIRECTORY option ignored");
- if (lex->create_info.index_file_name)
+ if (create_info.index_file_name)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
"INDEX DIRECTORY option ignored");
- lex->create_info.data_file_name=lex->create_info.index_file_name=0;
+ create_info.data_file_name= create_info.index_file_name= NULL;
/* ALTER TABLE ends previous transaction */
if (end_active_trans(thd))
goto error;
@@ -3127,13 +3194,13 @@ end_with_restore_list:
}
thd->enable_slow_log= opt_log_slow_admin_statements;
- res= mysql_alter_table(thd, select_lex->db, lex->name,
- &lex->create_info,
- first_table, lex->create_list,
- lex->key_list,
- select_lex->order_list.elements,
+ res= mysql_alter_table(thd, select_lex->db, lex->name,
+ &create_info,
+ first_table,
+ &alter_info,
+ select_lex->order_list.elements,
(ORDER *) select_lex->order_list.first,
- lex->ignore, &lex->alter_info, 1);
+ lex->ignore);
}
break;
}
@@ -3286,7 +3353,7 @@ end_with_restore_list:
goto error; /* purecov: inspected */
thd->enable_slow_log= opt_log_slow_admin_statements;
res= (specialflag & (SPECIAL_SAFE_MODE | SPECIAL_NO_NEW_FUNC)) ?
- mysql_recreate_table(thd, first_table, 1) :
+ mysql_recreate_table(thd, first_table) :
mysql_optimize_table(thd, first_table, &lex->check_opt);
/* ! we write after unlocking the table */
if (!res && !lex->no_write_to_binlog)
@@ -3602,15 +3669,6 @@ end_with_restore_list:
lex->drop_temporary);
}
break;
- case SQLCOM_DROP_INDEX:
- DBUG_ASSERT(first_table == all_tables && first_table != 0);
- if (check_one_table_access(thd, INDEX_ACL, all_tables))
- goto error; /* purecov: inspected */
- if (end_active_trans(thd))
- goto error;
- else
- res = mysql_drop_index(thd, first_table, &lex->alter_info);
- break;
case SQLCOM_SHOW_PROCESSLIST:
if (!thd->security_ctx->priv_user[0] &&
check_global_access(thd,PROCESS_ACL))
@@ -3739,6 +3797,12 @@ end_with_restore_list:
break;
case SQLCOM_CREATE_DB:
{
+ /*
+ As mysql_create_db() may modify HA_CREATE_INFO structure passed to
+ it, we need to use a copy of LEX::create_info to make execution
+ prepared statement- safe.
+ */
+ HA_CREATE_INFO create_info(lex->create_info);
if (end_active_trans(thd))
{
res= -1;
@@ -3766,10 +3830,11 @@ end_with_restore_list:
break;
}
#endif
+
if (check_access(thd,CREATE_ACL,lex->name,0,1,0,is_schema_db(lex->name)))
break;
res= mysql_create_db(thd,(lower_case_table_names == 2 ? alias : lex->name),
- &lex->create_info, 0);
+ &create_info, 0);
break;
}
case SQLCOM_DROP_DB:
@@ -4039,8 +4104,9 @@ end_with_restore_list:
case SQLCOM_FLUSH:
{
bool write_to_binlog;
- if (check_global_access(thd,RELOAD_ACL) || check_db_used(thd, all_tables))
+ if (check_global_access(thd,RELOAD_ACL))
goto error;
+
/*
reload_acl_and_cache() will tell us if we are allowed to write to the
binlog or not.
@@ -4061,7 +4127,8 @@ end_with_restore_list:
}
}
send_ok(thd);
- }
+ }
+
break;
}
case SQLCOM_KILL:
@@ -4243,26 +4310,38 @@ end_with_restore_list:
{
uint namelen;
char *name;
- int result;
+ int result= SP_INTERNAL_ERROR;
DBUG_ASSERT(lex->sphead != 0);
DBUG_ASSERT(lex->sphead->m_db.str); /* Must be initialized in the parser */
-
- if (check_access(thd, CREATE_PROC_ACL, lex->sphead->m_db.str, 0, 0, 0,
- is_schema_db(lex->sphead->m_db.str)))
+ /*
+ Verify that the database name is allowed, optionally
+ lowercase it.
+ */
+ if (check_db_name(lex->sphead->m_db.str))
{
- delete lex->sphead;
- lex->sphead= 0;
- goto error;
+ my_error(ER_WRONG_DB_NAME, MYF(0), lex->sphead->m_db.str);
+ goto create_sp_error;
}
- if (end_active_trans(thd))
+ /*
+ Check that a database directory with this name
+ exists. Design note: This won't work on virtual databases
+ like information_schema.
+ */
+ if (check_db_dir_existence(lex->sphead->m_db.str))
{
- delete lex->sphead;
- lex->sphead= 0;
- goto error;
+ my_error(ER_BAD_DB_ERROR, MYF(0), lex->sphead->m_db.str);
+ goto create_sp_error;
}
+ if (check_access(thd, CREATE_PROC_ACL, lex->sphead->m_db.str, 0, 0, 0,
+ is_schema_db(lex->sphead->m_db.str)))
+ goto create_sp_error;
+
+ if (end_active_trans(thd))
+ goto create_sp_error;
+
name= lex->sphead->name(&namelen);
#ifdef HAVE_DLOPEN
if (lex->sphead->m_type == TYPE_ENUM_FUNCTION)
@@ -4271,10 +4350,8 @@ end_with_restore_list:
if (udf)
{
- my_error(ER_UDF_EXISTS, MYF(0), name);
- delete lex->sphead;
- lex->sphead= 0;
- goto error;
+ my_error(ER_UDF_EXISTS, MYF(0), name);
+ goto create_sp_error;
}
}
#endif
@@ -4282,7 +4359,7 @@ end_with_restore_list:
/*
If the definer is not specified, this means that CREATE-statement missed
DEFINER-clause. DEFINER-clause can be missed in two cases:
-
+
- The user submitted a statement w/o the clause. This is a normal
case, we should assign CURRENT_USER as definer.
@@ -4291,7 +4368,7 @@ end_with_restore_list:
CURRENT_USER as definer here, but also we should mark this routine
as NON-SUID. This is essential for the sake of backward
compatibility.
-
+
The problem is the slave thread is running under "special" user (@),
that actually does not exist. In the older versions we do not fail
execution of a stored routine if its definer does not exist and
@@ -4316,13 +4393,9 @@ end_with_restore_list:
if (ps_arena)
thd->restore_active_arena(ps_arena, &original_arena);
+ /* Error has been already reported. */
if (res)
- {
- /* Error has been already reported. */
- delete lex->sphead;
- lex->sphead= 0;
- goto error;
- }
+ goto create_sp_error;
if (thd->slave_thread)
lex->sphead->m_chistics->suid= SP_IS_NOT_SUID;
@@ -4333,7 +4406,7 @@ end_with_restore_list:
that the current user has SUPER privilege (in order to create a stored
routine under another user one must have SUPER privilege).
*/
-
+
else if (strcmp(lex->definer->user.str, thd->security_ctx->priv_user) ||
my_strcasecmp(system_charset_info,
lex->definer->host.str,
@@ -4342,9 +4415,7 @@ end_with_restore_list:
if (check_global_access(thd, SUPER_ACL))
{
my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
- delete lex->sphead;
- lex->sphead= 0;
- goto error;
+ goto create_sp_error;
}
}
@@ -4364,54 +4435,51 @@ end_with_restore_list:
#endif /* NO_EMBEDDED_ACCESS_CHECKS */
res= (result= lex->sphead->create(thd));
- if (result == SP_OK)
- {
+ switch (result) {
+ case SP_OK:
#ifndef NO_EMBEDDED_ACCESS_CHECKS
/* only add privileges if really neccessary */
if (sp_automatic_privileges && !opt_noacl &&
check_routine_access(thd, DEFAULT_CREATE_PROC_ACLS,
- lex->sphead->m_db.str, name,
+ lex->sphead->m_db.str, name,
lex->sql_command == SQLCOM_CREATE_PROCEDURE, 1))
{
- close_thread_tables(thd);
if (sp_grant_privileges(thd, lex->sphead->m_db.str, name,
lex->sql_command == SQLCOM_CREATE_PROCEDURE))
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
- ER_PROC_AUTO_GRANT_FAIL,
- ER(ER_PROC_AUTO_GRANT_FAIL));
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_PROC_AUTO_GRANT_FAIL,
+ ER(ER_PROC_AUTO_GRANT_FAIL));
+ close_thread_tables(thd);
}
#endif
- lex->unit.cleanup();
- delete lex->sphead;
- lex->sphead= 0;
- send_ok(thd);
- }
- else
- {
- switch (result) {
- case SP_WRITE_ROW_FAILED:
- my_error(ER_SP_ALREADY_EXISTS, MYF(0), SP_TYPE_STRING(lex), name);
- break;
- case SP_NO_DB_ERROR:
- my_error(ER_BAD_DB_ERROR, MYF(0), lex->sphead->m_db.str);
- break;
- case SP_BAD_IDENTIFIER:
- my_error(ER_TOO_LONG_IDENT, MYF(0), name);
- break;
- case SP_BODY_TOO_LONG:
- my_error(ER_TOO_LONG_BODY, MYF(0), name);
- break;
- default:
- my_error(ER_SP_STORE_FAILED, MYF(0), SP_TYPE_STRING(lex), name);
- break;
- }
- lex->unit.cleanup();
- delete lex->sphead;
- lex->sphead= 0;
- goto error;
- }
break;
- }
+ case SP_WRITE_ROW_FAILED:
+ my_error(ER_SP_ALREADY_EXISTS, MYF(0), SP_TYPE_STRING(lex), name);
+ break;
+ case SP_BAD_IDENTIFIER:
+ my_error(ER_TOO_LONG_IDENT, MYF(0), name);
+ break;
+ case SP_BODY_TOO_LONG:
+ my_error(ER_TOO_LONG_BODY, MYF(0), name);
+ break;
+ default:
+ my_error(ER_SP_STORE_FAILED, MYF(0), SP_TYPE_STRING(lex), name);
+ break;
+ } /* end switch */
+
+ /*
+ Capture all errors within this CASE and
+ clean up the environment.
+ */
+create_sp_error:
+ lex->unit.cleanup();
+ delete lex->sphead;
+ lex->sphead= 0;
+ if (result != SP_OK )
+ goto error;
+ send_ok(thd);
+ break; /* break super switch */
+ } /* end case group bracket */
case SQLCOM_CALL:
{
sp_head *sp;
@@ -4453,7 +4521,7 @@ end_with_restore_list:
goto error;
}
- my_bool nsok= thd->net.no_send_ok;
+ my_bool save_no_send_ok= thd->net.no_send_ok;
thd->net.no_send_ok= TRUE;
if (sp->m_flags & sp_head::MULTI_RESULTS)
{
@@ -4464,7 +4532,7 @@ end_with_restore_list:
back
*/
my_error(ER_SP_BADSELECT, MYF(0), sp->m_qname.str);
- thd->net.no_send_ok= nsok;
+ thd->net.no_send_ok= save_no_send_ok;
goto error;
}
/*
@@ -4480,15 +4548,13 @@ end_with_restore_list:
if (check_routine_access(thd, EXECUTE_ACL,
sp->m_db.str, sp->m_name.str, TRUE, FALSE))
{
- thd->net.no_send_ok= nsok;
+ thd->net.no_send_ok= save_no_send_ok;
goto error;
}
#endif
select_limit= thd->variables.select_limit;
thd->variables.select_limit= HA_POS_ERROR;
- thd->row_count_func= 0;
-
/*
We never write CALL statements into binlog:
- If the mode is non-prelocked, each statement will be logged
@@ -4507,7 +4573,7 @@ end_with_restore_list:
thd->variables.select_limit= select_limit;
- thd->net.no_send_ok= nsok;
+ thd->net.no_send_ok= save_no_send_ok;
thd->server_status&= ~bits_to_be_cleared;
if (!res)
@@ -5916,15 +5982,17 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
if (type_modifier & PRI_KEY_FLAG)
{
lex->col_list.push_back(new key_part_spec(field_name,0));
- lex->key_list.push_back(new Key(Key::PRIMARY, NullS, HA_KEY_ALG_UNDEF,
- 0, lex->col_list));
+ lex->alter_info.key_list.push_back(new Key(Key::PRIMARY, NullS,
+ HA_KEY_ALG_UNDEF, 0,
+ lex->col_list));
lex->col_list.empty();
}
if (type_modifier & (UNIQUE_FLAG | UNIQUE_KEY_FLAG))
{
lex->col_list.push_back(new key_part_spec(field_name,0));
- lex->key_list.push_back(new Key(Key::UNIQUE, NullS, HA_KEY_ALG_UNDEF, 0,
- lex->col_list));
+ lex->alter_info.key_list.push_back(new Key(Key::UNIQUE, NullS,
+ HA_KEY_ALG_UNDEF, 0,
+ lex->col_list));
lex->col_list.empty();
}
@@ -5987,7 +6055,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
interval_list, cs, uint_geom_type))
DBUG_RETURN(1);
- lex->create_list.push_back(new_field);
+ lex->alter_info.create_list.push_back(new_field);
lex->last_field=new_field;
DBUG_RETURN(0);
}
@@ -6732,7 +6800,10 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
tmp_write_to_binlog= 0;
mysql_log.new_file(1);
mysql_slow_log.new_file(1);
- mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
+ if( mysql_bin_log.is_open() )
+ {
+ mysql_bin_log.rotate_and_purge(RP_FORCE_ROTATE);
+ }
#ifdef HAVE_REPLICATION
pthread_mutex_lock(&LOCK_active_mi);
rotate_relay_log(active_mi);
@@ -7013,53 +7084,6 @@ Item * all_any_subquery_creator(Item *left_expr,
/*
- CREATE INDEX and DROP INDEX are implemented by calling ALTER TABLE with
- the proper arguments. This isn't very fast but it should work for most
- cases.
-
- In the future ALTER TABLE will notice that only added indexes
- and create these one by one for the existing table without having to do
- a full rebuild.
-
- One should normally create all indexes with CREATE TABLE or ALTER TABLE.
-*/
-
-bool mysql_create_index(THD *thd, TABLE_LIST *table_list, List<Key> &keys)
-{
- List<create_field> fields;
- ALTER_INFO alter_info;
- alter_info.flags= ALTER_ADD_INDEX;
- HA_CREATE_INFO create_info;
- DBUG_ENTER("mysql_create_index");
- bzero((char*) &create_info,sizeof(create_info));
- create_info.db_type=DB_TYPE_DEFAULT;
- create_info.default_table_charset= thd->variables.collation_database;
- DBUG_RETURN(mysql_alter_table(thd,table_list->db,table_list->table_name,
- &create_info, table_list,
- fields, keys, 0, (ORDER*)0,
- 0, &alter_info, 1));
-}
-
-
-bool mysql_drop_index(THD *thd, TABLE_LIST *table_list, ALTER_INFO *alter_info)
-{
- List<create_field> fields;
- List<Key> keys;
- HA_CREATE_INFO create_info;
- DBUG_ENTER("mysql_drop_index");
- bzero((char*) &create_info,sizeof(create_info));
- create_info.db_type=DB_TYPE_DEFAULT;
- create_info.default_table_charset= thd->variables.collation_database;
- alter_info->clear();
- alter_info->flags= ALTER_DROP_INDEX;
- DBUG_RETURN(mysql_alter_table(thd,table_list->db,table_list->table_name,
- &create_info, table_list,
- fields, keys, 0, (ORDER*)0,
- 0, alter_info, 1));
-}
-
-
-/*
Multi update query pre-check
SYNOPSIS
@@ -7357,7 +7381,6 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables,
want_priv= ((lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) ?
CREATE_TMP_ACL : CREATE_ACL);
- lex->create_info.alias= create_table->alias;
if (check_access(thd, want_priv, create_table->db,
&create_table->grant.privilege, 0, 0,
test(create_table->schema_table)) ||
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 8b2c2cd3674..152cc3aa385 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1253,7 +1252,6 @@ static int mysql_test_select(Prepared_statement *stmt,
lex->select_lex.context.resolve_in_select_list= TRUE;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
ulong privilege= lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL;
if (tables)
{
@@ -1262,7 +1260,6 @@ static int mysql_test_select(Prepared_statement *stmt,
}
else if (check_access(thd, privilege, any_db,0,0,0,0))
goto error;
-#endif
if (!lex->result && !(lex->result= new (stmt->mem_root) select_send))
{
@@ -2879,7 +2876,6 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
{
Statement stmt_backup;
Query_arena *old_stmt_arena;
- Item *old_free_list;
bool error= TRUE;
statistic_increment(thd->status_var.com_stmt_execute, &LOCK_status);
diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc
index c87a8696bbc..f6766aec285 100644
--- a/sql/sql_rename.cc
+++ b/sql/sql_rename.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -257,7 +256,7 @@ do_rename(THD *thd, TABLE_LIST *ren_table, char *new_db, char *new_table_name,
static TABLE_LIST *
rename_tables(THD *thd, TABLE_LIST *table_list, bool skip_error)
{
- TABLE_LIST *ren_table,*new_table, *tmp_table;
+ TABLE_LIST *ren_table, *new_table;
DBUG_ENTER("rename_tables");
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 8da8bbe25ca..88a752f7acb 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB & Sasha
+/* Copyright (C) 2000-2006 MySQL AB & Sasha
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_repl.h b/sql/sql_repl.h
index 9eb6456ee20..1fbc6eb30cf 100644
--- a/sql/sql_repl.h
+++ b/sql/sql_repl.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB & Sasha
+/* Copyright (C) 2000-2006 MySQL AB & Sasha
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index bcd7e8c4a9d..d62032c2b44 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000-2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -82,7 +81,7 @@ static store_key *get_store_key(THD *thd,
static bool make_simple_join(JOIN *join,TABLE *tmp_table);
static void make_outerjoin_info(JOIN *join);
static bool make_join_select(JOIN *join,SQL_SELECT *select,COND *item);
-static void make_join_readinfo(JOIN *join,uint options);
+static void make_join_readinfo(JOIN *join, ulonglong options);
static bool only_eq_ref_tables(JOIN *join, ORDER *order, table_map tables);
static void update_depend_map(JOIN *join);
static void update_depend_map(JOIN *join, ORDER *order);
@@ -90,7 +89,7 @@ static ORDER *remove_const(JOIN *join,ORDER *first_order,COND *cond,
bool change_list, bool *simple_order);
static int return_zero_rows(JOIN *join, select_result *res,TABLE_LIST *tables,
List<Item> &fields, bool send_row,
- uint select_options, const char *info,
+ ulonglong select_options, const char *info,
Item *having);
static COND *build_equal_items(THD *thd, COND *cond,
COND_EQUAL *inherited,
@@ -114,7 +113,7 @@ static bool resolve_nested_join (TABLE_LIST *table);
static bool const_expression_in_where(COND *conds,Item *item, Item **comp_item);
static bool open_tmp_table(TABLE *table);
static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
- ulong options);
+ ulonglong options);
static int do_select(JOIN *join,List<Item> *fields,TABLE *tmp_table,
Procedure *proc);
@@ -1974,7 +1973,7 @@ bool
mysql_select(THD *thd, Item ***rref_pointer_array,
TABLE_LIST *tables, uint wild_num, List<Item> &fields,
COND *conds, uint og_num, ORDER *order, ORDER *group,
- Item *having, ORDER *proc_param, ulong select_options,
+ Item *having, ORDER *proc_param, ulonglong select_options,
select_result *result, SELECT_LEX_UNIT *unit,
SELECT_LEX *select_lex)
{
@@ -2306,8 +2305,18 @@ make_join_statistics(JOIN *join, TABLE_LIST *tables, COND *conds,
substitution of a const table the key value happens to be null
then we can state that there are no matches for this equi-join.
*/
- if ((keyuse= s->keyuse) && *s->on_expr_ref)
+ if ((keyuse= s->keyuse) && *s->on_expr_ref && !s->embedding_map)
{
+ /*
+ When performing an outer join operation if there are no matching rows
+ for the single row of the outer table all the inner tables are to be
+ null complemented and thus considered as constant tables.
+ Here we apply this consideration to the case of outer join operations
+ with a single inner table only because the case with nested tables
+ would require a more thorough analysis.
+ TODO. Apply single row substitution to null complemented inner tables
+ for nested outer join operations.
+ */
while (keyuse->table == table)
{
if (!(keyuse->val->used_tables() & ~join->const_table_map) &&
@@ -4123,7 +4132,7 @@ choose_plan(JOIN *join, table_map join_tables)
{
uint search_depth= join->thd->variables.optimizer_search_depth;
uint prune_level= join->thd->variables.optimizer_prune_level;
- bool straight_join= join->select_options & SELECT_STRAIGHT_JOIN;
+ bool straight_join= test(join->select_options & SELECT_STRAIGHT_JOIN);
DBUG_ENTER("choose_plan");
join->cur_embedding_map= 0;
@@ -4725,8 +4734,6 @@ static void
find_best(JOIN *join,table_map rest_tables,uint idx,double record_count,
double read_time)
{
- ha_rows rec;
- double tmp;
THD *thd= join->thd;
if (!rest_tables)
{
@@ -5780,7 +5787,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
}
static void
-make_join_readinfo(JOIN *join, uint options)
+make_join_readinfo(JOIN *join, ulonglong options)
{
uint i;
@@ -6435,7 +6442,7 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond,
static int
return_zero_rows(JOIN *join, select_result *result,TABLE_LIST *tables,
- List<Item> &fields, bool send_row, uint select_options,
+ List<Item> &fields, bool send_row, ulonglong select_options,
const char *info, Item *having)
{
DBUG_ENTER("return_zero_rows");
@@ -6986,7 +6993,6 @@ static COND *build_equal_items_for_cond(COND *cond,
Item_equal *item_equal;
uint members;
COND_EQUAL cond_equal;
- COND *new_cond;
cond_equal.upper_levels= inherited;
if (cond->type() == Item::COND_ITEM)
@@ -8436,6 +8442,46 @@ remove_eq_conds(THD *thd, COND *cond, Item::cond_result *cond_value)
return cond; // Point at next and level
}
+/*
+ Check if equality can be used in removing components of GROUP BY/DISTINCT
+
+ SYNOPSIS
+ test_if_equality_guarantees_uniqueness()
+ l the left comparison argument (a field if any)
+ r the right comparison argument (a const of any)
+
+ DESCRIPTION
+ Checks if an equality predicate can be used to take away
+ DISTINCT/GROUP BY because it is known to be true for exactly one
+ distinct value (e.g. <expr> == <const>).
+ Arguments must be of the same type because e.g.
+ <string_field> = <int_const> may match more than 1 distinct value from
+ the column.
+ We must take into consideration and the optimization done for various
+ string constants when compared to dates etc (see Item_int_with_ref) as
+ well as the collation of the arguments.
+
+ RETURN VALUE
+ TRUE can be used
+ FALSE cannot be used
+*/
+static bool
+test_if_equality_guarantees_uniqueness(Item *l, Item *r)
+{
+ return r->const_item() &&
+ /* elements must be of the same result type */
+ (r->result_type() == l->result_type() ||
+ /* or dates compared to longs */
+ (((l->type() == Item::FIELD_ITEM &&
+ ((Item_field *)l)->field->can_be_compared_as_longlong()) ||
+ (l->type() == Item::FUNC_ITEM &&
+ ((Item_func *)l)->result_as_longlong())) &&
+ r->result_type() == INT_RESULT))
+ /* and must have the same collation if compared as strings */
+ && (l->result_type() != STRING_RESULT ||
+ l->collation.collation == r->collation.collation);
+}
+
/*
Return 1 if the item is a const value in all the WHERE clause
*/
@@ -8472,7 +8518,7 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item)
Item *right_item= ((Item_func*) cond)->arguments()[1];
if (left_item->eq(comp_item,1))
{
- if (right_item->const_item())
+ if (test_if_equality_guarantees_uniqueness (left_item, right_item))
{
if (*const_item)
return right_item->eq(*const_item, 1);
@@ -8482,7 +8528,7 @@ const_expression_in_where(COND *cond, Item *comp_item, Item **const_item)
}
else if (right_item->eq(comp_item,1))
{
- if (left_item->const_item())
+ if (test_if_equality_guarantees_uniqueness (right_item, left_item))
{
if (*const_item)
return left_item->eq(*const_item, 1);
@@ -9320,13 +9366,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
param->recinfo=recinfo;
store_record(table,s->default_values); // Make empty default record
- if (thd->variables.tmp_table_size == ~(ulong) 0) // No limit
+ if (thd->variables.tmp_table_size == ~ (ulonglong) 0) // No limit
table->s->max_rows= ~(ha_rows) 0;
else
- table->s->max_rows= (((table->s->db_type == DB_TYPE_HEAP) ?
- min(thd->variables.tmp_table_size,
- thd->variables.max_heap_table_size) :
- thd->variables.tmp_table_size)/ table->s->reclength);
+ table->s->max_rows= (ha_rows) (((table->s->db_type == DB_TYPE_HEAP) ?
+ min(thd->variables.tmp_table_size,
+ thd->variables.max_heap_table_size) :
+ thd->variables.tmp_table_size)/
+ table->s->reclength);
set_if_bigger(table->s->max_rows,1); // For dummy start options
/*
Push the LIMIT clause to the temporary table creation, so that we
@@ -9628,7 +9675,7 @@ static bool open_tmp_table(TABLE *table)
static bool create_myisam_tmp_table(TABLE *table,TMP_TABLE_PARAM *param,
- ulong options)
+ ulonglong options)
{
int error;
MI_KEYDEF keydef;
@@ -10387,6 +10434,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
*/
join->examined_rows++;
join->thd->row_count++;
+ join_tab->read_record.file->unlock_row();
}
return NESTED_LOOP_OK;
}
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 629b44538d8..ccdd66d5b95 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 1d524418480..21a5ead90af 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -461,10 +460,9 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
}
bool mysqld_show_create_db(THD *thd, char *dbname,
- HA_CREATE_INFO *create_info)
+ const HA_CREATE_INFO *create_info)
{
Security_context *sctx= thd->security_ctx;
- int length;
char buff[2048];
String buffer(buff, sizeof(buff), system_charset_info);
#ifndef NO_EMBEDDED_ACCESS_CHECKS
@@ -2367,7 +2365,6 @@ int fill_schema_shemata(THD *thd, TABLE_LIST *tables, COND *cond)
INDEX_FIELD_VALUES idx_field_vals;
List<char> files;
char *file_name;
- uint length;
bool with_i_schema;
HA_CREATE_INFO create;
TABLE *table= tables->table;
@@ -2939,7 +2936,7 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table,
restore_record(table, s->default_values);
if (!wild || !wild[0] || !wild_compare(sp_name.ptr(), wild, 0))
{
- int enum_idx= proc_table->field[5]->val_int();
+ int enum_idx= (int) proc_table->field[5]->val_int();
table->field[3]->store(sp_name.ptr(), sp_name.length(), cs);
get_field(thd->mem_root, proc_table->field[3], &tmp_string);
table->field[0]->store(tmp_string.ptr(), tmp_string.length(), cs);
@@ -3105,7 +3102,7 @@ static int get_schema_stat_record(THD *thd, struct st_table_list *tables,
show_table->field[key_part->fieldnr-1]->key_length()))
{
table->field[10]->store((longlong) key_part->length /
- key_part->field->charset()->mbmaxlen);
+ key_part->field->charset()->mbmaxlen, 1);
table->field[10]->set_notnull();
}
uint flags= key_part->field ? key_part->field->flags : 0;
diff --git a/sql/sql_sort.h b/sql/sql_sort.h
index 1831c4a2f3d..da28ca07e2c 100644
--- a/sql/sql_sort.h
+++ b/sql/sql_sort.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_state.c b/sql/sql_state.c
index 355b847f239..511dc65917b 100644
--- a/sql/sql_state.c
+++ b/sql/sql_state.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index 10ce72e9b9f..ef50e5864a5 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_string.h b/sql/sql_string.h
index 09b8478adf8..f4250f4c70a 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -363,3 +362,9 @@ public:
return (s->alloced && Ptr >= s->Ptr && Ptr < s->Ptr + s->str_length);
}
};
+
+static inline bool check_if_only_end_space(CHARSET_INFO *cs, char *str,
+ char *end)
+{
+ return str+ cs->cset->scan(cs, str, end, MY_SEQ_SPACES) == end;
+}
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index c14529f6eb1..d9dadfbfd81 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -37,7 +36,9 @@ static char *make_unique_key_name(const char *field_name,KEY *start,KEY *end);
static int copy_data_between_tables(TABLE *from,TABLE *to,
List<create_field> &create, bool ignore,
uint order_num, ORDER *order,
- ha_rows *copied,ha_rows *deleted);
+ ha_rows *copied,ha_rows *deleted,
+ enum enum_enable_or_disable keys_onoff);
+
static bool prepare_blob_field(THD *thd, create_field *sql_field);
static bool check_engine(THD *thd, const char *table_name,
enum db_type *new_engine);
@@ -644,8 +645,7 @@ int prepare_create_field(create_field *sql_field,
mysql_prepare_table()
thd Thread object
create_info Create information (like MAX_ROWS)
- fields List of fields to create
- keys List of keys to create
+ alter_info List of columns and indexes to create
DESCRIPTION
Prepares the table and key structures for table creation.
@@ -659,8 +659,8 @@ int prepare_create_field(create_field *sql_field,
*/
static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
- List<create_field> *fields,
- List<Key> *keys, bool tmp_table,
+ Alter_info *alter_info,
+ bool tmp_table,
uint *db_options,
handler *file, KEY **key_info_buffer,
uint *key_count, int select_field_count)
@@ -674,11 +674,12 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
int timestamps= 0, timestamps_with_niladic= 0;
int field_no,dup_no;
int select_field_pos,auto_increment=0;
- List_iterator<create_field> it(*fields),it2(*fields);
+ List_iterator<create_field> it(alter_info->create_list);
+ List_iterator<create_field> it2(alter_info->create_list);
uint total_uneven_bit_length= 0;
DBUG_ENTER("mysql_prepare_table");
- select_field_pos= fields->elements - select_field_count;
+ select_field_pos= alter_info->create_list.elements - select_field_count;
null_fields=blob_columns=0;
create_info->varchar= 0;
max_key_length= file->max_key_length();
@@ -1003,7 +1004,8 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
/* Create keys */
- List_iterator<Key> key_iterator(*keys), key_iterator2(*keys);
+ List_iterator<Key> key_iterator(alter_info->key_list);
+ List_iterator<Key> key_iterator2(alter_info->key_list);
uint key_parts=0, fk_key_count=0;
bool primary_key=0,unique_key=0;
Key *key, *key2;
@@ -1562,14 +1564,13 @@ void sp_prepare_create_field(THD *thd, create_field *sql_field)
SYNOPSIS
mysql_create_table()
- thd Thread object
- db Database
- table_name Table name
- create_info Create information (like MAX_ROWS)
- fields List of fields to create
- keys List of keys to create
- internal_tmp_table Set to 1 if this is an internal temporary table
- (From ALTER TABLE)
+ thd Thread object
+ db Database
+ table_name Table name
+ create_info [in/out] Create information (like MAX_ROWS)
+ alter_info [in/out] List of columns and indexes to create
+ internal_tmp_table Set to 1 if this is an internal temporary table
+ (From ALTER TABLE)
DESCRIPTION
If one creates a temporary table, this is automatically opened
@@ -1579,6 +1580,11 @@ void sp_prepare_create_field(THD *thd, create_field *sql_field)
select_field_count is also used for CREATE ... SELECT,
and must be zero for standard create of table.
+ Note that structures passed as 'create_info' and 'alter_info' parameters
+ may be modified by this function. It is responsibility of the caller to
+ make a copy of create_info in order to provide correct execution in
+ prepared statements/stored routines.
+
RETURN VALUES
FALSE OK
TRUE error
@@ -1586,8 +1592,8 @@ void sp_prepare_create_field(THD *thd, create_field *sql_field)
bool mysql_create_table(THD *thd,const char *db, const char *table_name,
HA_CREATE_INFO *create_info,
- List<create_field> &fields,
- List<Key> &keys,bool internal_tmp_table,
+ Alter_info *alter_info,
+ bool internal_tmp_table,
uint select_field_count)
{
char path[FN_REFLEN];
@@ -1599,7 +1605,7 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
DBUG_ENTER("mysql_create_table");
/* Check for duplicate fields and check type of table to create */
- if (!fields.elements)
+ if (!alter_info->create_list.elements)
{
my_message(ER_TABLE_MUST_HAVE_COLUMNS, ER(ER_TABLE_MUST_HAVE_COLUMNS),
MYF(0));
@@ -1643,10 +1649,10 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
create_info->default_table_charset= db_info.default_table_charset;
}
- if (mysql_prepare_table(thd, create_info, &fields,
- &keys, internal_tmp_table, &db_options, file,
- &key_info_buffer, &key_count,
- select_field_count))
+ if (mysql_prepare_table(thd, create_info, alter_info, internal_tmp_table,
+ &db_options, file,
+ &key_info_buffer, &key_count,
+ select_field_count))
DBUG_RETURN(TRUE);
/* Check if table exists */
@@ -1736,8 +1742,8 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
create_info->table_options=db_options;
if (rea_create_table(thd, path, db, table_name,
- create_info, fields, key_count,
- key_info_buffer))
+ create_info, alter_info->create_list,
+ key_count, key_info_buffer))
goto end;
if (create_info->options & HA_LEX_CREATE_TMP_TABLE)
{
@@ -2322,9 +2328,12 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
(table->table->file->ha_check_for_upgrade(check_opt) ==
HA_ADMIN_NEEDS_ALTER))
{
+ my_bool save_no_send_ok= thd->net.no_send_ok;
close_thread_tables(thd);
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
- result_code= mysql_recreate_table(thd, table, 0);
+ thd->net.no_send_ok= TRUE;
+ result_code= mysql_recreate_table(thd, table);
+ thd->net.no_send_ok= save_no_send_ok;
reenable_binlog(thd);
goto send_result;
}
@@ -2403,6 +2412,7 @@ send_result_message:
case HA_ADMIN_TRY_ALTER:
{
+ my_bool save_no_send_ok= thd->net.no_send_ok;
/*
This is currently used only by InnoDB. ha_innobase::optimize() answers
"try with alter", so here we close the table, do an ALTER TABLE,
@@ -2413,7 +2423,9 @@ send_result_message:
*save_next_global= table->next_global;
table->next_local= table->next_global= 0;
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
- result_code= mysql_recreate_table(thd, table, 0);
+ thd->net.no_send_ok= TRUE;
+ result_code= mysql_recreate_table(thd, table);
+ thd->net.no_send_ok= save_no_send_ok;
reenable_binlog(thd);
close_thread_tables(thd);
if (!result_code) // recreation went ok
@@ -2934,15 +2946,69 @@ err:
/*
+ Manages enabling/disabling of indexes for ALTER TABLE
+
+ SYNOPSIS
+ alter_table_manage_keys()
+ table Target table
+ indexes_were_disabled Whether the indexes of the from table
+ were disabled
+ keys_onoff ENABLE | DISABLE | LEAVE_AS_IS
+
+ RETURN VALUES
+ FALSE OK
+ TRUE Error
+*/
+
+static
+bool alter_table_manage_keys(TABLE *table, int indexes_were_disabled,
+ enum enum_enable_or_disable keys_onoff)
+{
+ int error= 0;
+ DBUG_ENTER("alter_table_manage_keys");
+ DBUG_PRINT("enter", ("table=%p were_disabled=%d on_off=%d",
+ table, indexes_were_disabled, keys_onoff));
+
+ switch (keys_onoff) {
+ case ENABLE:
+ error= table->file->enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ break;
+ case LEAVE_AS_IS:
+ if (!indexes_were_disabled)
+ break;
+ /* fall-through: disabled indexes */
+ case DISABLE:
+ error= table->file->disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ }
+
+ if (error == HA_ERR_WRONG_COMMAND)
+ {
+ push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), table->s->table_name);
+ error= 0;
+ } else if (error)
+ table->file->print_error(error, MYF(0));
+
+ DBUG_RETURN(error);
+}
+
+
+/*
Alter table
+
+
+ NOTE
+ The structures passed as 'create_info' and 'alter_info' parameters may
+ be modified by this function. It is responsibility of the caller to make
+ a copy of create_info in order to provide correct execution in prepared
+ statements/stored routines.
*/
bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
HA_CREATE_INFO *create_info,
TABLE_LIST *table_list,
- List<create_field> &fields, List<Key> &keys,
- uint order_num, ORDER *order, bool ignore,
- ALTER_INFO *alter_info, bool do_send_ok)
+ Alter_info *alter_info,
+ uint order_num, ORDER *order, bool ignore)
{
TABLE *table,*new_table=0;
int error;
@@ -3097,13 +3163,56 @@ view_err:
if (!(alter_info->flags & ~(ALTER_RENAME | ALTER_KEYS_ONOFF)) &&
!table->s->tmp_table) // no need to touch frm
{
- error=0;
+ switch (alter_info->keys_onoff) {
+ case LEAVE_AS_IS:
+ error= 0;
+ break;
+ case ENABLE:
+ /*
+ wait_while_table_is_used() ensures that table being altered is
+ opened only by this thread and that TABLE::TABLE_SHARE::version
+ of TABLE object corresponding to this table is 0.
+ The latter guarantees that no DML statement will open this table
+ until ALTER TABLE finishes (i.e. until close_thread_tables())
+ while the fact that the table is still open gives us protection
+ from concurrent DDL statements.
+ */
+ VOID(pthread_mutex_lock(&LOCK_open));
+ wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
+ VOID(pthread_mutex_unlock(&LOCK_open));
+ error= table->file->enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ /* COND_refresh will be signaled in close_thread_tables() */
+ break;
+ case DISABLE:
+ VOID(pthread_mutex_lock(&LOCK_open));
+ wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
+ VOID(pthread_mutex_unlock(&LOCK_open));
+ error=table->file->disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
+ /* COND_refresh will be signaled in close_thread_tables() */
+ break;
+ }
+ if (error == HA_ERR_WRONG_COMMAND)
+ {
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
+ table->alias);
+ error= 0;
+ }
+
VOID(pthread_mutex_lock(&LOCK_open));
- if (new_name != table_name || new_db != db)
+ /*
+ Unlike to the above case close_cached_table() below will remove ALL
+ instances of TABLE from table cache (it will also remove table lock
+ held by this thread). So to make actual table renaming and writing
+ to binlog atomic we have to put them into the same critical section
+ protected by LOCK_open mutex. This also removes gap for races between
+ access() and mysql_rename_table() calls.
+ */
+
+ if (!error && (new_name != table_name || new_db != db))
{
thd->proc_info="rename";
/* Then do a 'simple' rename of the table */
- error=0;
if (!access(new_name_buff,F_OK))
{
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), new_name);
@@ -3125,31 +3234,14 @@ view_err:
}
}
- if (!error)
- {
- switch (alter_info->keys_onoff) {
- case LEAVE_AS_IS:
- break;
- case ENABLE:
- wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
- error= table->file->enable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
- /* COND_refresh will be signaled in close_thread_tables() */
- break;
- case DISABLE:
- wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
- error=table->file->disable_indexes(HA_KEY_SWITCH_NONUNIQ_SAVE);
- /* COND_refresh will be signaled in close_thread_tables() */
- break;
- }
- }
-
if (error == HA_ERR_WRONG_COMMAND)
{
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
table->alias);
- error=0;
+ error= 0;
}
+
if (!error)
{
if (mysql_bin_log.is_open())
@@ -3158,8 +3250,7 @@ view_err:
Query_log_event qinfo(thd, thd->query, thd->query_length, FALSE, FALSE);
mysql_bin_log.write(&qinfo);
}
- if (do_send_ok)
- send_ok(thd);
+ send_ok(thd);
}
else if (error > 0)
{
@@ -3167,7 +3258,7 @@ view_err:
error= -1;
}
VOID(pthread_mutex_unlock(&LOCK_open));
- table_list->table=0; // For query cache
+ table_list->table= NULL; // For query cache
query_cache_invalidate3(thd, table_list, 0);
DBUG_RETURN(error);
}
@@ -3186,10 +3277,9 @@ view_err:
restore_record(table, s->default_values); // Empty record for DEFAULT
List_iterator<Alter_drop> drop_it(alter_info->drop_list);
- List_iterator<create_field> def_it(fields);
+ List_iterator<create_field> def_it(alter_info->create_list);
List_iterator<Alter_column> alter_it(alter_info->alter_list);
- List<create_field> create_list; // Add new fields here
- List<Key> key_list; // Add new keys here
+ Alter_info new_info; // Add new columns and indexes here
create_field *def;
/*
@@ -3237,13 +3327,13 @@ view_err:
def->field=field;
if (!def->after)
{
- create_list.push_back(def);
+ new_info.create_list.push_back(def);
def_it.remove();
}
}
else
{ // Use old field value
- create_list.push_back(def=new create_field(field,field));
+ new_info.create_list.push_back(def= new create_field(field, field));
alter_it.rewind(); // Change default if ALTER
Alter_column *alter;
while ((alter=alter_it++))
@@ -3267,7 +3357,7 @@ view_err:
}
}
def_it.rewind();
- List_iterator<create_field> find_it(create_list);
+ List_iterator<create_field> find_it(new_info.create_list);
while ((def=def_it++)) // Add new columns
{
if (def->change && ! def->field)
@@ -3276,9 +3366,9 @@ view_err:
DBUG_RETURN(TRUE);
}
if (!def->after)
- create_list.push_back(def);
+ new_info.create_list.push_back(def);
else if (def->after == first_keyword)
- create_list.push_front(def);
+ new_info.create_list.push_front(def);
else
{
create_field *find;
@@ -3302,7 +3392,7 @@ view_err:
alter_info->alter_list.head()->name, table_name);
DBUG_RETURN(TRUE);
}
- if (!create_list.elements)
+ if (!new_info.create_list.elements)
{
my_message(ER_CANT_REMOVE_ALL_FIELDS, ER(ER_CANT_REMOVE_ALL_FIELDS),
MYF(0));
@@ -3314,8 +3404,8 @@ view_err:
for which some fields exists.
*/
- List_iterator<Key> key_it(keys);
- List_iterator<create_field> field_it(create_list);
+ List_iterator<Key> key_it(alter_info->key_list);
+ List_iterator<create_field> field_it(new_info.create_list);
List<key_part_spec> key_parts;
KEY *key_info=table->key_info;
@@ -3387,24 +3477,37 @@ view_err:
key_part_length));
}
if (key_parts.elements)
- key_list.push_back(new Key(key_info->flags & HA_SPATIAL ? Key::SPATIAL :
- (key_info->flags & HA_NOSAME ?
- (!my_strcasecmp(system_charset_info,
- key_name, primary_key_name) ?
- Key::PRIMARY : Key::UNIQUE) :
- (key_info->flags & HA_FULLTEXT ?
- Key::FULLTEXT : Key::MULTIPLE)),
- key_name,
- key_info->algorithm,
- test(key_info->flags & HA_GENERATED_KEY),
- key_parts));
+ {
+ Key *key;
+ enum Key::Keytype key_type;
+
+ if (key_info->flags & HA_SPATIAL)
+ key_type= Key::SPATIAL;
+ else if (key_info->flags & HA_NOSAME)
+ {
+ if (! my_strcasecmp(system_charset_info, key_name, primary_key_name))
+ key_type= Key::PRIMARY;
+ else
+ key_type= Key::UNIQUE;
+ }
+ else if (key_info->flags & HA_FULLTEXT)
+ key_type= Key::FULLTEXT;
+ else
+ key_type= Key::MULTIPLE;
+
+ key= new Key(key_type, key_name,
+ key_info->algorithm,
+ test(key_info->flags & HA_GENERATED_KEY),
+ key_parts);
+ new_info.key_list.push_back(key);
+ }
}
{
Key *key;
while ((key=key_it++)) // Add new keys
{
if (key->type != Key::FOREIGN_KEY)
- key_list.push_back(key);
+ new_info.key_list.push_back(key);
if (key->name &&
!my_strcasecmp(system_charset_info,key->name,primary_key_name))
{
@@ -3539,7 +3642,7 @@ view_err:
{
tmp_disable_binlog(thd);
error= mysql_create_table(thd, new_db, tmp_name,
- create_info,create_list,key_list,1,0);
+ create_info, &new_info, 1, 0);
reenable_binlog(thd);
if (error)
DBUG_RETURN(error);
@@ -3580,9 +3683,21 @@ view_err:
{
new_table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
new_table->next_number_field=new_table->found_next_number_field;
- error=copy_data_between_tables(table, new_table, create_list, ignore,
- order_num, order, &copied, &deleted);
+ error= copy_data_between_tables(table, new_table, new_info.create_list,
+ ignore, order_num, order,
+ &copied, &deleted, alter_info->keys_onoff);
+ }
+ else if (!new_table)
+ {
+ VOID(pthread_mutex_lock(&LOCK_open));
+ wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN);
+ table->file->external_lock(thd, F_WRLCK);
+ alter_table_manage_keys(table, table->file->indexes_are_disabled(),
+ alter_info->keys_onoff);
+ table->file->external_lock(thd, F_UNLCK);
+ VOID(pthread_mutex_unlock(&LOCK_open));
}
+
thd->last_insert_id=next_insert_id; // Needed for correct log
thd->count_cuted_fields= CHECK_FIELD_IGNORE;
@@ -3794,8 +3909,7 @@ end_temporary:
my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO),
(ulong) (copied + deleted), (ulong) deleted,
(ulong) thd->cuted_fields);
- if (do_send_ok)
- send_ok(thd,copied+deleted,0L,tmp_name);
+ send_ok(thd, copied + deleted, 0L, tmp_name);
thd->some_tables_deleted=0;
DBUG_RETURN(FALSE);
@@ -3810,7 +3924,8 @@ copy_data_between_tables(TABLE *from,TABLE *to,
bool ignore,
uint order_num, ORDER *order,
ha_rows *copied,
- ha_rows *deleted)
+ ha_rows *deleted,
+ enum enum_enable_or_disable keys_onoff)
{
int error;
Copy_field *copy,*copy_end;
@@ -3843,6 +3958,9 @@ copy_data_between_tables(TABLE *from,TABLE *to,
if (to->file->external_lock(thd, F_WRLCK))
DBUG_RETURN(-1);
+ /* We need external lock before we can disable/enable keys */
+ alter_table_manage_keys(to, from->file->indexes_are_disabled(), keys_onoff);
+
/* We can abort alter table for any table type */
thd->no_trans_update= 0;
thd->abort_on_warning= !ignore && test(thd->variables.sql_mode &
@@ -3990,31 +4108,26 @@ copy_data_between_tables(TABLE *from,TABLE *to,
mysql_recreate_table()
thd Thread handler
tables Tables to recreate
- do_send_ok If we should send_ok() or leave it to caller
RETURN
Like mysql_alter_table().
*/
-bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list,
- bool do_send_ok)
+bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list)
{
- DBUG_ENTER("mysql_recreate_table");
- LEX *lex= thd->lex;
HA_CREATE_INFO create_info;
- lex->create_list.empty();
- lex->key_list.empty();
- lex->col_list.empty();
- lex->alter_info.reset();
- bzero((char*) &create_info,sizeof(create_info));
+ Alter_info alter_info;
+
+ DBUG_ENTER("mysql_recreate_table");
+
+ bzero((char*) &create_info, sizeof(create_info));
create_info.db_type=DB_TYPE_DEFAULT;
create_info.row_type=ROW_TYPE_NOT_USED;
create_info.default_table_charset=default_charset_info;
/* Force alter table to recreate table */
- lex->alter_info.flags= ALTER_CHANGE_COLUMN;
+ alter_info.flags= ALTER_CHANGE_COLUMN;
DBUG_RETURN(mysql_alter_table(thd, NullS, NullS, &create_info,
- table_list, lex->create_list,
- lex->key_list, 0, (ORDER *) 0,
- 0, &lex->alter_info, do_send_ok));
+ table_list, &alter_info,
+ 0, (ORDER *) 0, 0));
}
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 3e745ad8b47..465f53cc30c 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 3552fc596f3..632f9933532 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -356,7 +355,7 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables,
char dir_buff[FN_REFLEN], file_buff[FN_REFLEN], trigname_buff[FN_REFLEN],
trigname_path[FN_REFLEN];
LEX_STRING dir, file, trigname_file;
- LEX_STRING *trg_def, *name;
+ LEX_STRING *trg_def;
LEX_STRING definer_user;
LEX_STRING definer_host;
ulonglong *trg_sql_mode;
@@ -879,7 +878,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
DBUG_RETURN(1);
List_iterator_fast<LEX_STRING> it(triggers->definitions_list);
- LEX_STRING *trg_create_str, *trg_name_str;
+ LEX_STRING *trg_create_str;
ulonglong *trg_sql_mode;
if (triggers->definition_modes_list.is_empty() &&
@@ -996,7 +995,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
goto err_with_lex_cleanup;
}
- lex.sphead->set_info(0, 0, &lex.sp_chistics, *trg_sql_mode);
+ lex.sphead->set_info(0, 0, &lex.sp_chistics, (ulong) *trg_sql_mode);
triggers->bodies[lex.trg_chistics.event]
[lex.trg_chistics.action_time]= lex.sphead;
@@ -1337,7 +1336,6 @@ Table_triggers_list::change_table_name_in_triggers(THD *thd,
{
char path_buff[FN_REFLEN];
LEX_STRING *def, *on_table_name, new_def;
- ulonglong *sql_mode;
ulong save_sql_mode= thd->variables.sql_mode;
List_iterator_fast<LEX_STRING> it_def(definitions_list);
List_iterator_fast<LEX_STRING> it_on_table_name(on_table_names_list);
@@ -1351,7 +1349,7 @@ Table_triggers_list::change_table_name_in_triggers(THD *thd,
while ((def= it_def++))
{
on_table_name= it_on_table_name++;
- thd->variables.sql_mode= *(it_mode++);
+ thd->variables.sql_mode= (ulong) *(it_mode++);
/* Construct CREATE TRIGGER statement with new table name. */
buff.length(0);
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h
index 7e0fadfa677..91ce571e3f5 100644
--- a/sql/sql_trigger.h
+++ b/sql/sql_trigger.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 163801e2f1e..077660f0bb9 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -510,6 +509,8 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
TABLE *table;
TABLE_LIST tables;
udf_func *udf;
+ char *exact_name_str;
+ uint exact_name_len;
DBUG_ENTER("mysql_drop_function");
if (!initialized)
{
@@ -523,6 +524,8 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), udf_name->str);
goto err;
}
+ exact_name_str= udf->name.str;
+ exact_name_len= udf->name.length;
del_udf(udf);
/*
Close the handle if this was function that was found during boot or
@@ -536,7 +539,7 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
tables.table_name= tables.alias= (char*) "func";
if (!(table = open_ltable(thd,&tables,TL_WRITE)))
goto err;
- table->field[0]->store(udf_name->str, udf_name->length, system_charset_info);
+ table->field[0]->store(exact_name_str, exact_name_len, &my_charset_bin);
table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
if (!table->file->index_read_idx(table->record[0], 0,
(byte*) table->field[0]->ptr,
diff --git a/sql/sql_udf.h b/sql/sql_udf.h
index 21cf735f5ab..3cd9343610c 100644
--- a/sql/sql_udf.h
+++ b/sql/sql_udf.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 478b2dce370..55e52389a83 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index dabda39d6b7..4043fe17a46 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -25,8 +24,6 @@
#include "sp_head.h"
#include "sql_trigger.h"
-static bool safe_update_on_fly(JOIN_TAB *join_tab, List<Item> *fields);
-
/* Return 0 if row hasn't changed */
static bool compare_record(TABLE *table, query_id_t query_id)
@@ -118,7 +115,7 @@ int mysql_update(THD *thd,
enum enum_duplicates handle_duplicates, bool ignore)
{
bool using_limit= limit != HA_POS_ERROR;
- bool safe_update= thd->options & OPTION_SAFE_UPDATES;
+ bool safe_update= test(thd->options & OPTION_SAFE_UPDATES);
bool used_key_is_modified, transactional_table;
bool can_compare_record;
int res;
@@ -1041,27 +1038,73 @@ int multi_update::prepare(List<Item> &not_used_values,
for (i=0 ; i < table_count ; i++)
set_if_bigger(max_fields, fields_for_table[i]->elements);
copy_field= new Copy_field[max_fields];
+ DBUG_RETURN(thd->is_fatal_error != 0);
+}
- /*
- Mark all copies of tables that are updates to ensure that
- init_read_record() will not try to enable a cache on them
- The problem is that for queries like
+/*
+ Check if table is safe to update on fly
- UPDATE t1, t1 AS t2 SET t1.b=t2.c WHERE t1.a=t2.a;
+ SYNOPSIS
+ safe_update_on_fly()
+ thd Thread handler
+ join_tab How table is used in join
+ all_tables List of tables
+ fields Fields that are updated
- the row buffer may contain things that doesn't match what is on disk
- which will cause an error when reading a row.
- (This issue is mostly relevent for MyISAM tables)
- */
- for (table_ref= leaves; table_ref; table_ref= table_ref->next_leaf)
- {
- TABLE *table=table_ref->table;
- if ((tables_to_update & table->map) &&
- unique_table(thd, table_ref, update_tables))
- table->no_cache= 1; // Disable row cache
+ NOTES
+ We can update the first table in join on the fly if we know that
+ a row in this table will never be read twice. This is true under
+ the following conditions:
+
+ - We are doing a table scan and the data is in a separate file (MyISAM) or
+ if we don't update a clustered key.
+
+ - We are doing a range scan and we don't update the scan key or
+ the primary key for a clustered table handler.
+
+ - Table is not joined to itself.
+
+ When checking for above cases we also should take into account that
+ BEFORE UPDATE trigger potentially may change value of any field in row
+ being updated.
+
+ WARNING
+ This code is a bit dependent of how make_join_readinfo() works.
+
+ RETURN
+ 0 Not safe to update
+ 1 Safe to update
+*/
+
+static bool safe_update_on_fly(THD *thd, JOIN_TAB *join_tab,
+ TABLE_LIST *table_ref, TABLE_LIST *all_tables,
+ List<Item> *fields)
+{
+ TABLE *table= join_tab->table;
+ if (unique_table(thd, table_ref, all_tables))
+ return 0;
+ switch (join_tab->type) {
+ case JT_SYSTEM:
+ case JT_CONST:
+ case JT_EQ_REF:
+ return TRUE; // At most one matching row
+ case JT_REF:
+ case JT_REF_OR_NULL:
+ return !is_key_used(table, join_tab->ref.key, *fields);
+ case JT_ALL:
+ /* If range search on index */
+ if (join_tab->quick)
+ return !join_tab->quick->is_keys_used(fields);
+ /* If scanning in clustered key */
+ if ((table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
+ table->s->primary_key < MAX_KEY)
+ return !is_key_used(table, table->s->primary_key, *fields);
+ return TRUE;
+ default:
+ break; // Avoid compler warning
}
- DBUG_RETURN(thd->is_fatal_error != 0);
+ return FALSE;
}
@@ -1099,7 +1142,8 @@ multi_update::initialize_tables(JOIN *join)
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
if (table == main_table) // First table in join
{
- if (safe_update_on_fly(join->join_tab, &temp_fields))
+ if (safe_update_on_fly(thd, join->join_tab, table_ref, all_tables,
+ &temp_fields))
{
table_to_update= main_table; // Update table on the fly
continue;
@@ -1150,63 +1194,6 @@ multi_update::initialize_tables(JOIN *join)
DBUG_RETURN(0);
}
-/*
- Check if table is safe to update on fly
-
- SYNOPSIS
- safe_update_on_fly
- join_tab How table is used in join
- fields Fields that are updated
-
- NOTES
- We can update the first table in join on the fly if we know that
- a row in this table will never be read twice. This is true under
- the following conditions:
-
- - We are doing a table scan and the data is in a separate file (MyISAM) or
- if we don't update a clustered key.
-
- - We are doing a range scan and we don't update the scan key or
- the primary key for a clustered table handler.
-
- When checking for above cases we also should take into account that
- BEFORE UPDATE trigger potentially may change value of any field in row
- being updated.
-
- WARNING
- This code is a bit dependent of how make_join_readinfo() works.
-
- RETURN
- 0 Not safe to update
- 1 Safe to update
-*/
-
-static bool safe_update_on_fly(JOIN_TAB *join_tab, List<Item> *fields)
-{
- TABLE *table= join_tab->table;
- switch (join_tab->type) {
- case JT_SYSTEM:
- case JT_CONST:
- case JT_EQ_REF:
- return TRUE; // At most one matching row
- case JT_REF:
- case JT_REF_OR_NULL:
- return !is_key_used(table, join_tab->ref.key, *fields);
- case JT_ALL:
- /* If range search on index */
- if (join_tab->quick)
- return !join_tab->quick->is_keys_used(fields);
- /* If scanning in clustered key */
- if ((table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
- table->s->primary_key < MAX_KEY)
- return !is_key_used(table, table->s->primary_key, *fields);
- return TRUE;
- default:
- break; // Avoid compler warning
- }
- return FALSE;
-}
-
multi_update::~multi_update()
{
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index c0cdaf59712..18ef3eaf29c 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -197,7 +196,7 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view)
lex->definer= &view->definer;
}
if (lex->create_view_algorithm == VIEW_ALGORITHM_UNDEFINED)
- lex->create_view_algorithm= decoy.algorithm;
+ lex->create_view_algorithm= (uint8) decoy.algorithm;
if (lex->create_view_suid == VIEW_SUID_DEFAULT)
lex->create_view_suid= decoy.view_suid ?
VIEW_SUID_DEFINER : VIEW_SUID_INVOKER;
@@ -1136,13 +1135,17 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
/*
Prepare a security context to check underlying objects of the view
*/
- Security_context *save_security_ctx= thd->security_ctx;
if (!(table->view_sctx= (Security_context *)
thd->stmt_arena->alloc(sizeof(Security_context))))
goto err;
/* Assign the context to the tables referenced in the view */
- for (tbl= view_tables; tbl; tbl= tbl->next_global)
- tbl->security_ctx= table->view_sctx;
+ if (view_tables)
+ {
+ DBUG_ASSERT(view_tables_tail);
+ for (tbl= view_tables; tbl != view_tables_tail->next_global;
+ tbl= tbl->next_global)
+ tbl->security_ctx= table->view_sctx;
+ }
/* assign security context to SELECT name resolution contexts of view */
for(SELECT_LEX *sl= lex->all_selects_list;
sl;
@@ -1477,7 +1480,6 @@ bool check_key_in_view(THD *thd, TABLE_LIST *view)
TABLE *table;
Field_translator *trans, *end_of_trans;
KEY *key_info, *key_info_end;
- uint i;
DBUG_ENTER("check_key_in_view");
/*
diff --git a/sql/sql_view.h b/sql/sql_view.h
index a3f11f352b0..ab0920e0bf2 100644
--- a/sql/sql_view.h
+++ b/sql/sql_view.h
@@ -3,8 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 0e7b6236ed5..6739ba39bcd 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1428,8 +1427,7 @@ create:
TL_READ_NO_INSERT:
TL_READ)))
YYABORT;
- lex->create_list.empty();
- lex->key_list.empty();
+ lex->alter_info.reset();
lex->col_list.empty();
lex->change=NullS;
bzero((char*) &lex->create_info,sizeof(lex->create_info));
@@ -1447,16 +1445,17 @@ create:
if (!lex->current_select->add_table_to_list(lex->thd, $7, NULL,
TL_OPTION_UPDATING))
YYABORT;
- lex->create_list.empty();
- lex->key_list.empty();
+ lex->alter_info.reset();
+ lex->alter_info.flags= ALTER_ADD_INDEX;
lex->col_list.empty();
lex->change=NullS;
}
'(' key_list ')'
{
LEX *lex=Lex;
+ Key *key= new Key($2, $4.str, $5, 0, lex->col_list);
- lex->key_list.push_back(new Key($2,$4.str, $5, 0, lex->col_list));
+ lex->alter_info.key_list.push_back(key);
lex->col_list.empty();
}
| CREATE DATABASE opt_if_not_exists ident
@@ -1883,7 +1882,6 @@ sp_decl:
uint num_vars= pctx->context_var_count();
enum enum_field_types var_type= (enum enum_field_types) $4;
Item *dflt_value_item= $5;
- create_field *create_field_op;
if (!dflt_value_item)
{
@@ -2997,29 +2995,34 @@ key_def:
key_type opt_ident key_alg '(' key_list ')'
{
LEX *lex=Lex;
- lex->key_list.push_back(new Key($1,$2, $3, 0, lex->col_list));
+ Key *key= new Key($1, $2, $3, 0, lex->col_list);
+ lex->alter_info.key_list.push_back(key);
+
lex->col_list.empty(); /* Alloced by sql_alloc */
}
| opt_constraint constraint_key_type opt_ident key_alg '(' key_list ')'
{
LEX *lex=Lex;
const char *key_name= $3 ? $3:$1;
- lex->key_list.push_back(new Key($2, key_name, $4, 0,
- lex->col_list));
+ Key *key= new Key($2, key_name, $4, 0, lex->col_list);
+ lex->alter_info.key_list.push_back(key);
lex->col_list.empty(); /* Alloced by sql_alloc */
}
| opt_constraint FOREIGN KEY_SYM opt_ident '(' key_list ')' references
{
LEX *lex=Lex;
- lex->key_list.push_back(new foreign_key($4 ? $4:$1, lex->col_list,
- $8,
- lex->ref_list,
- lex->fk_delete_opt,
- lex->fk_update_opt,
- lex->fk_match_option));
- lex->key_list.push_back(new Key(Key::MULTIPLE, $4 ? $4 : $1,
- HA_KEY_ALG_UNDEF, 1,
- lex->col_list));
+ const char *key_name= $4 ? $4 : $1;
+ Key *key= new foreign_key(key_name, lex->col_list,
+ $8,
+ lex->ref_list,
+ lex->fk_delete_opt,
+ lex->fk_update_opt,
+ lex->fk_match_option);
+ lex->alter_info.key_list.push_back(key);
+ key= new Key(Key::MULTIPLE, key_name,
+ HA_KEY_ALG_UNDEF, 1,
+ lex->col_list);
+ lex->alter_info.key_list.push_back(key);
lex->col_list.empty(); /* Alloced by sql_alloc */
}
| constraint opt_check_constraint
@@ -3561,8 +3564,6 @@ alter:
if (!lex->select_lex.add_table_to_list(thd, $4, NULL,
TL_OPTION_UPDATING))
YYABORT;
- lex->create_list.empty();
- lex->key_list.empty();
lex->col_list.empty();
lex->select_lex.init_order();
lex->select_lex.db=
@@ -3572,8 +3573,7 @@ alter:
lex->create_info.db_type= DB_TYPE_DEFAULT;
lex->create_info.default_table_charset= NULL;
lex->create_info.row_type= ROW_TYPE_NOT_USED;
- lex->alter_info.reset();
- lex->alter_info.flags= 0;
+ lex->alter_info.reset();
}
alter_list
{}
@@ -3797,7 +3797,7 @@ alter_list_item:
{
Lex->alter_info.flags|= ALTER_FORCE;
}
- | order_clause
+ | alter_order_clause
{
LEX *lex=Lex;
lex->alter_info.flags|= ALTER_ORDER;
@@ -6024,6 +6024,29 @@ olap_opt:
;
/*
+ Order by statement in ALTER TABLE
+*/
+
+alter_order_clause:
+ ORDER_SYM BY alter_order_list
+ ;
+
+alter_order_list:
+ alter_order_list ',' alter_order_item
+ | alter_order_item
+ ;
+
+alter_order_item:
+ simple_ident_nospvar order_dir
+ {
+ THD *thd= YYTHD;
+ bool ascending= ($2 == 1) ? true : false;
+ if (add_order_to_list(thd, $1, ascending))
+ YYABORT;
+ }
+ ;
+
+/*
Order by statement in select
*/
@@ -6337,7 +6360,8 @@ drop:
{
LEX *lex=Lex;
lex->sql_command= SQLCOM_DROP_INDEX;
- lex->alter_info.drop_list.empty();
+ lex->alter_info.reset();
+ lex->alter_info.flags= ALTER_DROP_INDEX;
lex->alter_info.drop_list.push_back(new Alter_drop(Alter_drop::KEY,
$3.str));
if (!lex->current_select->add_table_to_list(lex->thd, $5, NULL,
diff --git a/sql/stacktrace.c b/sql/stacktrace.c
index 77e7707592d..d8e9b7fd883 100644
--- a/sql/stacktrace.c
+++ b/sql/stacktrace.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/stacktrace.h b/sql/stacktrace.h
index 527d10d70a2..f5c92e54e1c 100644
--- a/sql/stacktrace.h
+++ b/sql/stacktrace.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/strfunc.cc b/sql/strfunc.cc
index d03d88ee051..308e6fd3dcd 100644
--- a/sql/strfunc.cc
+++ b/sql/strfunc.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/structs.h b/sql/structs.h
index 41b5f3b39c5..2dcafdef615 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/table.cc b/sql/table.cc
index e63db72a02d..5c72ac6ccbf 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -453,6 +452,8 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
memcpy(comment_pos, disk_buff+read_length-com_length, com_length);
fix_type_pointers(&int_array, &share->fieldnames, 1, &names);
+ if (share->fieldnames.count != share->fields)
+ goto err;
fix_type_pointers(&int_array, share->intervals, interval_count,
&names);
@@ -730,6 +731,7 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
if (key_part->fieldnr)
{ // Should always be true !
Field *field=key_part->field=outparam->field[key_part->fieldnr-1];
+ key_part->type= field->key_type();
if (field->null_ptr)
{
key_part->null_offset=(uint) ((byte*) field->null_ptr -
@@ -2458,7 +2460,18 @@ bool st_table_list::prepare_view_securety_context(THD *thd)
}
else
{
- my_error(ER_NO_SUCH_USER, MYF(0), definer.user.str, definer.host.str);
+ if (thd->security_ctx->master_access & SUPER_ACL)
+ {
+ my_error(ER_NO_SUCH_USER, MYF(0), definer.user.str, definer.host.str);
+
+ }
+ else
+ {
+ my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
+ thd->security_ctx->priv_user,
+ thd->security_ctx->priv_host,
+ (thd->password ? ER(ER_YES) : ER(ER_NO)));
+ }
DBUG_RETURN(TRUE);
}
}
diff --git a/sql/table.h b/sql/table.h
index f0190353328..70e64439af5 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/thr_malloc.cc b/sql/thr_malloc.cc
index 3a9ca397bba..392db9224c3 100644
--- a/sql/thr_malloc.cc
+++ b/sql/thr_malloc.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003-2004 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/time.cc b/sql/time.cc
index 6c68d610207..a46f2fc237d 100644
--- a/sql/time.cc
+++ b/sql/time.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/tzfile.h b/sql/tzfile.h
index 623cddc1f12..1a57c0c5f69 100644
--- a/sql/tzfile.h
+++ b/sql/tzfile.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/tztime.cc b/sql/tztime.cc
index fe23954bbb2..91bd4471463 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1729,9 +1728,9 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
tz_leapcnt++;
DBUG_PRINT("info",
- ("time_zone_leap_second table: tz_leapcnt=%u tt_time=%lld offset=%ld",
- tz_leapcnt, (longlong)tz_lsis[tz_leapcnt-1].ls_trans,
- tz_lsis[tz_leapcnt-1].ls_corr));
+ ("time_zone_leap_second table: tz_leapcnt: %u tt_time: %lu offset=%ld",
+ tz_leapcnt, (ulong) tz_lsis[tz_leapcnt-1].ls_trans,
+ tz_lsis[tz_leapcnt-1].ls_corr));
res= table->file->index_next(table->record[0]);
}
@@ -2041,8 +2040,8 @@ tz_load_from_open_tables(const String *tz_name, TABLE_LIST *tz_tables)
tz_info->timecnt++;
DBUG_PRINT("info",
- ("time_zone_transition table: tz_id=%u tt_time=%lld tt_id=%u",
- tzid, (longlong)ttime, ttid));
+ ("time_zone_transition table: tz_id: %u tt_time: %lu tt_id: %u",
+ tzid, (ulong) ttime, ttid));
res= table->file->index_next_same(table->record[0],
(byte*)table->field[0]->ptr, 4);
diff --git a/sql/tztime.h b/sql/tztime.h
index c49b9fe4592..d1f33843810 100644
--- a/sql/tztime.h
+++ b/sql/tztime.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/udf_example.c b/sql/udf_example.c
index 2fa7474eb16..2bb4fe92d2f 100644
--- a/sql/udf_example.c
+++ b/sql/udf_example.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -165,6 +164,9 @@ void avgcost_reset( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error
void avgcost_clear( UDF_INIT* initid, char* is_null, char *error );
void avgcost_add( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
double avgcost( UDF_INIT* initid, UDF_ARGS* args, char* is_null, char *error );
+my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message);
+char *is_const(UDF_INIT *initid, UDF_ARGS *args, char *result, unsigned long
+ *length, char *is_null, char *error);
/*************************************************************************
@@ -1075,4 +1077,32 @@ char *myfunc_argument_name(UDF_INIT *initid __attribute__((unused)),
return result;
}
+
+
+my_bool is_const_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
+{
+ if (args->arg_count != 1)
+ {
+ strmov(message, "IS_CONST accepts only one argument");
+ return 1;
+ }
+ initid->ptr= (char*)((args->args[0] != NULL) ? 1UL : 0);
+ return 0;
+}
+
+char * is_const(UDF_INIT *initid, UDF_ARGS *args __attribute__((unused)),
+ char *result, unsigned long *length,
+ char *is_null, char *error __attribute__((unused)))
+{
+ if (initid->ptr != 0) {
+ sprintf(result, "const");
+ } else {
+ sprintf(result, "not const");
+ }
+ *is_null= 0;
+ *length= strlen(result);
+ return result;
+}
+
+
#endif /* HAVE_DLOPEN */
diff --git a/sql/udf_example.def b/sql/udf_example.def
index d3081ca7768..ee107d58e51 100644
--- a/sql/udf_example.def
+++ b/sql/udf_example.def
@@ -22,3 +22,5 @@ EXPORTS
avgcost_add
avgcost_clear
avgcost
+ is_const
+ is_const_init
diff --git a/sql/uniques.cc b/sql/uniques.cc
index ad074f8b2b0..9eb827f62a3 100644
--- a/sql/uniques.cc
+++ b/sql/uniques.cc
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -55,18 +54,19 @@ int unique_write_to_ptrs(gptr key, element_count count, Unique *unique)
}
Unique::Unique(qsort_cmp2 comp_func, void * comp_func_fixed_arg,
- uint size_arg, ulong max_in_memory_size_arg)
+ uint size_arg, ulonglong max_in_memory_size_arg)
:max_in_memory_size(max_in_memory_size_arg), size(size_arg), elements(0)
{
my_b_clear(&file);
- init_tree(&tree, max_in_memory_size / 16, 0, size, comp_func, 0, NULL,
- comp_func_fixed_arg);
+ init_tree(&tree, (ulong) (max_in_memory_size / 16), 0, size, comp_func, 0,
+ NULL, comp_func_fixed_arg);
/* If the following fail's the next add will also fail */
my_init_dynamic_array(&file_ptrs, sizeof(BUFFPEK), 16, 16);
/*
If you change the following, change it in get_max_elements function, too.
*/
- max_elements= max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+size);
+ max_elements= (ulong) (max_in_memory_size /
+ ALIGN_SIZE(sizeof(TREE_ELEMENT)+size));
VOID(open_cached_file(&file, mysql_tmpdir,TEMP_PREFIX, DISK_BUFFER_SIZE,
MYF(MY_WME)));
}
@@ -260,15 +260,15 @@ static double get_merge_many_buffs_cost(uint *buffer,
*/
double Unique::get_use_cost(uint *buffer, uint nkeys, uint key_size,
- ulong max_in_memory_size)
+ ulonglong max_in_memory_size)
{
ulong max_elements_in_tree;
ulong last_tree_elems;
int n_full_trees; /* number of trees in unique - 1 */
double result;
- max_elements_in_tree=
- max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size);
+ max_elements_in_tree= ((ulong) max_in_memory_size /
+ ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
n_full_trees= nkeys / max_elements_in_tree;
last_tree_elems= nkeys % max_elements_in_tree;
@@ -386,9 +386,11 @@ C_MODE_END
/*
DESCRIPTION
+
Function is very similar to merge_buffers, but instead of writing sorted
unique keys to the output file, it invokes walk_action for each key.
This saves I/O if you need to pass through all unique keys only once.
+
SYNOPSIS
merge_walk()
All params are 'IN' (but see comment for begin, end):
@@ -416,7 +418,7 @@ C_MODE_END
<> 0 error
*/
-static bool merge_walk(uchar *merge_buffer, uint merge_buffer_size,
+static bool merge_walk(uchar *merge_buffer, ulong merge_buffer_size,
uint key_length, BUFFPEK *begin, BUFFPEK *end,
tree_walk_action walk_action, void *walk_action_arg,
qsort_cmp2 compare, void *compare_arg,
@@ -425,14 +427,15 @@ static bool merge_walk(uchar *merge_buffer, uint merge_buffer_size,
BUFFPEK_COMPARE_CONTEXT compare_context = { compare, compare_arg };
QUEUE queue;
if (end <= begin ||
- merge_buffer_size < key_length * (end - begin + 1) ||
- init_queue(&queue, end - begin, offsetof(BUFFPEK, key), 0,
+ merge_buffer_size < (ulong) (key_length * (end - begin + 1)) ||
+ init_queue(&queue, (uint) (end - begin), offsetof(BUFFPEK, key), 0,
buffpek_compare, &compare_context))
return 1;
/* we need space for one key when a piece of merge buffer is re-read */
merge_buffer_size-= key_length;
uchar *save_key_buff= merge_buffer + merge_buffer_size;
- uint max_key_count_per_piece= merge_buffer_size/(end-begin)/key_length;
+ uint max_key_count_per_piece= (uint) (merge_buffer_size/(end-begin) /
+ key_length);
/* if piece_size is aligned reuse_freed_buffer will always hit */
uint piece_size= max_key_count_per_piece * key_length;
uint bytes_read; /* to hold return value of read_to_buffer */
@@ -548,6 +551,9 @@ end:
bool Unique::walk(tree_walk_action action, void *walk_action_arg)
{
+ int res;
+ uchar *merge_buffer;
+
if (elements == 0) /* the whole tree is in memory */
return tree_walk(&tree, action, walk_action_arg, left_root_right);
@@ -556,15 +562,14 @@ bool Unique::walk(tree_walk_action action, void *walk_action_arg)
return 1;
if (flush_io_cache(&file) || reinit_io_cache(&file, READ_CACHE, 0L, 0, 0))
return 1;
- uchar *merge_buffer= (uchar *) my_malloc(max_in_memory_size, MYF(0));
- if (merge_buffer == 0)
+ if (!(merge_buffer= (uchar *) my_malloc((ulong) max_in_memory_size, MYF(0))))
return 1;
- int res= merge_walk(merge_buffer, max_in_memory_size, size,
- (BUFFPEK *) file_ptrs.buffer,
- (BUFFPEK *) file_ptrs.buffer + file_ptrs.elements,
- action, walk_action_arg,
- tree.compare, tree.custom_arg, &file);
- x_free(merge_buffer);
+ res= merge_walk(merge_buffer, (ulong) max_in_memory_size, size,
+ (BUFFPEK *) file_ptrs.buffer,
+ (BUFFPEK *) file_ptrs.buffer + file_ptrs.elements,
+ action, walk_action_arg,
+ tree.compare, tree.custom_arg, &file);
+ my_free((char*) merge_buffer, MYF(0));
return res;
}
@@ -615,7 +620,7 @@ bool Unique::get(TABLE *table)
sort_param.sort_form=table;
sort_param.rec_length= sort_param.sort_length= sort_param.ref_length=
size;
- sort_param.keys= max_in_memory_size / sort_param.sort_length;
+ sort_param.keys= (uint) (max_in_memory_size / sort_param.sort_length);
sort_param.not_killable=1;
if (!(sort_buffer=(uchar*) my_malloc((sort_param.keys+1) *
diff --git a/sql/unireg.cc b/sql/unireg.cc
index 8568b09e498..a0229631aa2 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sql/unireg.h b/sql/unireg.h
index dfebde01338..886b3d99212 100644
--- a/sql/unireg.h
+++ b/sql/unireg.h
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/CMakeLists.txt b/strings/CMakeLists.txt
index 0c65ce390b2..4f752044271 100755
--- a/strings/CMakeLists.txt
+++ b/strings/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/strings/Makefile.am b/strings/Makefile.am
index 255bc4e1518..ffca972459b 100644
--- a/strings/Makefile.am
+++ b/strings/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bchange.c b/strings/bchange.c
index 034dd3382e1..f17fb9bea27 100644
--- a/strings/bchange.c
+++ b/strings/bchange.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bcmp.c b/strings/bcmp.c
index 64a6b72c443..fd9ee5c1b96 100644
--- a/strings/bcmp.c
+++ b/strings/bcmp.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bcopy-duff.c b/strings/bcopy-duff.c
index 5ac6a716dab..215857715fd 100644
--- a/strings/bcopy-duff.c
+++ b/strings/bcopy-duff.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bfill.c b/strings/bfill.c
index 85d21483b41..2750553f48a 100644
--- a/strings/bfill.c
+++ b/strings/bfill.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bmove.c b/strings/bmove.c
index 09fe067adcd..ae9641a5d58 100644
--- a/strings/bmove.c
+++ b/strings/bmove.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bmove512.c b/strings/bmove512.c
index d4c748fe0ff..c3a4b7dfe4e 100644
--- a/strings/bmove512.c
+++ b/strings/bmove512.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bmove_upp-sparc.s b/strings/bmove_upp-sparc.s
index f38c391f8ab..f745f0fc613 100644
--- a/strings/bmove_upp-sparc.s
+++ b/strings/bmove_upp-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bmove_upp.c b/strings/bmove_upp.c
index 5319cd9611a..02b59bdb703 100644
--- a/strings/bmove_upp.c
+++ b/strings/bmove_upp.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/bzero.c b/strings/bzero.c
index a2b780cb396..b720de65eed 100644
--- a/strings/bzero.c
+++ b/strings/bzero.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 8f7e40966b9..e2ac9846c85 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -276,7 +275,14 @@ main(int argc, char **argv __attribute__((unused)))
}
}
-
+ fprintf(f, "/*\n");
+ fprintf(f, " This file was generated by the conf_to_src utility. "
+ "Do not edit it directly,\n");
+ fprintf(f, " edit the XML definitions in sql/share/charsets/ instead.\n\n");
+ fprintf(f, " To re-generate, run the following in the strings/ "
+ "directory:\n");
+ fprintf(f, " ./conf_to_src ../sql/share/charsets/ > FILE\n");
+ fprintf(f, "*/\n\n");
fprintf(f,"#include <my_global.h>\n");
fprintf(f,"#include <m_ctype.h>\n\n");
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 479fb789816..be04d19a756 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c
index 3e8b05580f6..fa586694fd2 100644
--- a/strings/ctype-bin.c
+++ b/strings/ctype-bin.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-cp932.c b/strings/ctype-cp932.c
index b4e9ba16d92..3c71b7fbac7 100644
--- a/strings/ctype-cp932.c
+++ b/strings/ctype-cp932.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c
index d9f95868d6d..d0104a50f4a 100644
--- a/strings/ctype-czech.c
+++ b/strings/ctype-czech.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c
index 40e0f4e3d2d..abaa8f1a516 100644
--- a/strings/ctype-euc_kr.c
+++ b/strings/ctype-euc_kr.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-eucjpms.c b/strings/ctype-eucjpms.c
index 65fef2dfc4c..75000340c16 100644
--- a/strings/ctype-eucjpms.c
+++ b/strings/ctype-eucjpms.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c
index ea6fe68e973..1c20828ea54 100644
--- a/strings/ctype-extra.c
+++ b/strings/ctype-extra.c
@@ -1,3 +1,25 @@
+/*
+ This file was generated by the conf_to_src utility. Do not edit it directly,
+ edit the XML definitions in sql/share/charsets/ instead.
+
+ To re-generate, run the following in the strings/ directory:
+ ./conf_to_src ../sql/share/charsets/ > FILE
+*/
+/* Copyright (C) 2000-2003 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <my_global.h>
#include <m_ctype.h>
@@ -1169,7 +1191,7 @@ uchar ctype_hebrew_general_ci[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00
+0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00
};
uchar to_lower_hebrew_general_ci[] = {
@@ -1261,7 +1283,7 @@ uint16 to_uni_hebrew_general_ci[] = {
0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,
0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF,
0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7,
-0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x0000,0x0000,0x0000
+0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x200E,0x200F,0x0000
};
#endif
@@ -5100,7 +5122,7 @@ uchar ctype_hebrew_bin[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00
+0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00
};
uchar to_lower_hebrew_bin[] = {
@@ -5173,7 +5195,7 @@ uint16 to_uni_hebrew_bin[] = {
0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,
0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF,
0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7,
-0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x0000,0x0000,0x0000
+0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x200E,0x200F,0x0000
};
#endif
diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c
index c2fc1e2c190..811394878d6 100644
--- a/strings/ctype-gb2312.c
+++ b/strings/ctype-gb2312.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index c4d06d67eb9..c7160e923a9 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c
index 1298b66bb7e..906595e60bf 100644
--- a/strings/ctype-latin1.c
+++ b/strings/ctype-latin1.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index 3ef245015d7..c861c1c1525 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c
index 7484f3c0d92..56f18132d6f 100644
--- a/strings/ctype-simple.c
+++ b/strings/ctype-simple.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -1503,7 +1502,7 @@ my_strntoull10rnd_8bit(CHARSET_INFO *cs __attribute__((unused)),
else
{
*error= 0;
- return (ulonglong) (longlong) (long) -ul;
+ return (ulonglong) (longlong) -(long) ul;
}
}
else
@@ -1654,7 +1653,7 @@ ret_sign:
return (ulonglong) LONGLONG_MIN;
}
*error= 0;
- return (ulonglong) -ull;
+ return (ulonglong) -(longlong) ull;
}
else
{
diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c
index 3854837e09a..7f423362815 100644
--- a/strings/ctype-sjis.c
+++ b/strings/ctype-sjis.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c
index 85ebbe82731..b933f72533c 100644
--- a/strings/ctype-tis620.c
+++ b/strings/ctype-tis620.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index b18e5ee59d2..d1de758c797 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 3c69a314b45..baee37c103b 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c
index 675ac918e2c..efd793eb01c 100644
--- a/strings/ctype-ujis.c
+++ b/strings/ctype-ujis.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index a21fe4961ec..104afddb253 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c
index 39948964a42..d5be20f7b1b 100644
--- a/strings/ctype-win1250ch.c
+++ b/strings/ctype-win1250ch.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ctype.c b/strings/ctype.c
index 91fa1413259..f02b5542e78 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/decimal.c b/strings/decimal.c
index 6b7a2266194..502bf380af9 100644
--- a/strings/decimal.c
+++ b/strings/decimal.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -138,6 +137,12 @@ static const dec1 frac_max[DIG_PER_DEC1-1]={
900000000, 990000000, 999000000,
999900000, 999990000, 999999000,
999999900, 999999990 };
+static double scaler10[]= {
+ 1.0, 1e10, 1e20, 1e30, 1e40, 1e50, 1e60, 1e70, 1e80, 1e90
+};
+static double scaler1[]= {
+ 1.0, 10.0, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9
+};
#ifdef HAVE_purify
#define sanity(d) DBUG_ASSERT((d)->len > 0)
@@ -946,15 +951,27 @@ fatal_error:
int decimal2double(decimal_t *from, double *to)
{
- double x=0, t=DIG_BASE;
- int intg, frac;
- dec1 *buf=from->buf;
+ double result= 0.0;
+ int i, exp= 0;
+ dec1 *buf= from->buf;
+
+ for (i= from->intg; i > 0; i-= DIG_PER_DEC1)
+ result= result * DIG_BASE + *buf++;
+
+ for (i= from->frac; i > 0; i-= DIG_PER_DEC1) {
+ result= result * DIG_BASE + *buf++;
+ exp+= DIG_PER_DEC1;
+ }
+
+ DBUG_PRINT("info", ("interm.: %f %d %f", result, exp,
+ scaler10[exp / 10] * scaler1[exp % 10]));
+
+ result/= scaler10[exp / 10] * scaler1[exp % 10];
+
+ *to= from->sign ? -result : result;
+
+ DBUG_PRINT("info", ("result: %f (%lx)", *to, *(ulong *)to));
- for (intg=from->intg; intg > 0; intg-=DIG_PER_DEC1)
- x=x*DIG_BASE + *buf++;
- for (frac=from->frac; frac > 0; frac-=DIG_PER_DEC1, t*=DIG_BASE)
- x+=*buf++/t;
- *to=from->sign ? -x : x;
return E_DEC_OK;
}
diff --git a/strings/do_ctype.c b/strings/do_ctype.c
index f51770e3633..b8eca68debf 100644
--- a/strings/do_ctype.c
+++ b/strings/do_ctype.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/dump_map.c b/strings/dump_map.c
index 708d9139f3c..e2b8b7db077 100644
--- a/strings/dump_map.c
+++ b/strings/dump_map.c
@@ -1,3 +1,18 @@
+/* Copyright (C) 2003-2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <stdio.h>
#include <string.h>
diff --git a/strings/int2str.c b/strings/int2str.c
index be86e9735ab..9fc53032819 100644
--- a/strings/int2str.c
+++ b/strings/int2str.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/is_prefix.c b/strings/is_prefix.c
index 37d8002703b..451cd468b7e 100644
--- a/strings/is_prefix.c
+++ b/strings/is_prefix.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/llstr.c b/strings/llstr.c
index ac034cbe2e2..12aea63e014 100644
--- a/strings/llstr.c
+++ b/strings/llstr.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/longlong2str-x86.s b/strings/longlong2str-x86.s
index 168dab38a85..3de43a96e78 100644
--- a/strings/longlong2str-x86.s
+++ b/strings/longlong2str-x86.s
@@ -1,8 +1,7 @@
# Copyright (C) 2000 MySQL AB
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/longlong2str.c b/strings/longlong2str.c
index 096531095db..c464abcfccd 100644
--- a/strings/longlong2str.c
+++ b/strings/longlong2str.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/longlong2str_asm.c b/strings/longlong2str_asm.c
index e38a8328b91..637815e52c5 100644
--- a/strings/longlong2str_asm.c
+++ b/strings/longlong2str_asm.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/macros.asm b/strings/macros.asm
index 4cd5397fbaa..1eedcfbb15f 100644
--- a/strings/macros.asm
+++ b/strings/macros.asm
@@ -1,9 +1,9 @@
-; Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+; Copyright (C) 2000 MySQL AB
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Library General Public
-; License as published by the Free Software Foundation; either
-; version 2 of the License, or (at your option) any later version.
+; License as published by the Free Software Foundation; version 2
+; of the License.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/memcmp.c b/strings/memcmp.c
index 2f1e4e2ea1f..9471353f751 100644
--- a/strings/memcmp.c
+++ b/strings/memcmp.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/memcpy.c b/strings/memcpy.c
index de79e43ae72..f32d346e3ec 100644
--- a/strings/memcpy.c
+++ b/strings/memcpy.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/memset.c b/strings/memset.c
index 53383beb170..e07dc4ead85 100644
--- a/strings/memset.c
+++ b/strings/memset.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/my_strtoll10-x86.s b/strings/my_strtoll10-x86.s
index 1d8b8f2bbce..f73428de7de 100644
--- a/strings/my_strtoll10-x86.s
+++ b/strings/my_strtoll10-x86.s
@@ -1,8 +1,8 @@
# Copyright (C) 2003 MySQL AB
-# This program is free software; you can resistribute it and/or modify
+#
+# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/my_strtoll10.c b/strings/my_strtoll10.c
index b9b09810c51..165d3e38095 100644
--- a/strings/my_strtoll10.c
+++ b/strings/my_strtoll10.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c
index e4302f50c58..22410f552d1 100644
--- a/strings/my_vsnprintf.c
+++ b/strings/my_vsnprintf.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/ptr_cmp.asm b/strings/ptr_cmp.asm
index 6106016ee32..b2a020d8a37 100644
--- a/strings/ptr_cmp.asm
+++ b/strings/ptr_cmp.asm
@@ -1,9 +1,9 @@
-; Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+; Copyright (C) 2000 MySQL AB
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Library General Public
-; License as published by the Free Software Foundation; either
-; version 2 of the License, or (at your option) any later version.
+; License as published by the Free Software Foundation; version 2
+; of the License.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/r_strinstr.c b/strings/r_strinstr.c
index fdd6e010a22..98118015456 100644
--- a/strings/r_strinstr.c
+++ b/strings/r_strinstr.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/str2int.c b/strings/str2int.c
index d328d64d899..c4a4c07eeff 100644
--- a/strings/str2int.c
+++ b/strings/str2int.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/str_alloc.c b/strings/str_alloc.c
index 158fa7e75bb..615ad1ba1e2 100644
--- a/strings/str_alloc.c
+++ b/strings/str_alloc.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/str_test.c b/strings/str_test.c
index 369fa7251d8..7863dce8688 100644
--- a/strings/str_test.c
+++ b/strings/str_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strappend-sparc.s b/strings/strappend-sparc.s
index 30b621c3fce..d5add816eb0 100644
--- a/strings/strappend-sparc.s
+++ b/strings/strappend-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strappend.c b/strings/strappend.c
index 9912bd5197d..3a5da658709 100644
--- a/strings/strappend.c
+++ b/strings/strappend.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strcat.c b/strings/strcat.c
index 3c571514701..e69369c357f 100644
--- a/strings/strcat.c
+++ b/strings/strcat.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strcend.c b/strings/strcend.c
index a3f00a1057b..56e31d5f994 100644
--- a/strings/strcend.c
+++ b/strings/strcend.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strchr.c b/strings/strchr.c
index 3f1a569c296..5ffe386c718 100644
--- a/strings/strchr.c
+++ b/strings/strchr.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strcmp.c b/strings/strcmp.c
index d673c035dbc..54bbe92279b 100644
--- a/strings/strcmp.c
+++ b/strings/strcmp.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strcont.c b/strings/strcont.c
index 1d89be89517..d57af77804d 100644
--- a/strings/strcont.c
+++ b/strings/strcont.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strend-sparc.s b/strings/strend-sparc.s
index 0f19f6a435a..f264fcef32f 100644
--- a/strings/strend-sparc.s
+++ b/strings/strend-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strend.c b/strings/strend.c
index 0e9c0333fc8..4dadf0675dc 100644
--- a/strings/strend.c
+++ b/strings/strend.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strfill.c b/strings/strfill.c
index 0ef56a67706..7d3f25e3ff4 100644
--- a/strings/strfill.c
+++ b/strings/strfill.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strings-not-used.h b/strings/strings-not-used.h
index e0dc1eac3a5..3efaa8ab6eb 100644
--- a/strings/strings-not-used.h
+++ b/strings/strings-not-used.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strings-x86.s b/strings/strings-x86.s
index 30a7517a372..db7bb0c1274 100644
--- a/strings/strings-x86.s
+++ b/strings/strings-x86.s
@@ -1,8 +1,7 @@
# Copyright (C) 2000 MySQL AB
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strings.asm b/strings/strings.asm
index fe39c8bb3e6..2224025cc72 100644
--- a/strings/strings.asm
+++ b/strings/strings.asm
@@ -1,9 +1,9 @@
-; Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+; Copyright (C) 2000, 2003 MySQL AB
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Library General Public
-; License as published by the Free Software Foundation; either
-; version 2 of the License, or (at your option) any later version.
+; License as published by the Free Software Foundation; version 2
+; of the License.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strinstr-sparc.s b/strings/strinstr-sparc.s
index b9881743683..5278aff6aa7 100644
--- a/strings/strinstr-sparc.s
+++ b/strings/strinstr-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strinstr.c b/strings/strinstr.c
index 457581af950..10f83a54c29 100644
--- a/strings/strinstr.c
+++ b/strings/strinstr.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strlen.c b/strings/strlen.c
index b9be374fa6e..b3c901739b1 100644
--- a/strings/strlen.c
+++ b/strings/strlen.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strmake-sparc.s b/strings/strmake-sparc.s
index 4effe95774e..36db8efd402 100644
--- a/strings/strmake-sparc.s
+++ b/strings/strmake-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strmake.c b/strings/strmake.c
index d2252f648f6..5ca4688de46 100644
--- a/strings/strmake.c
+++ b/strings/strmake.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strmov-sparc.s b/strings/strmov-sparc.s
index 3536685b47b..f124da2dc9f 100644
--- a/strings/strmov-sparc.s
+++ b/strings/strmov-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strmov.c b/strings/strmov.c
index 507c2b6d997..1393411dd8f 100644
--- a/strings/strmov.c
+++ b/strings/strmov.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strnlen.c b/strings/strnlen.c
index fc8879b3a41..11ecf718746 100644
--- a/strings/strnlen.c
+++ b/strings/strnlen.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strnmov-sparc.s b/strings/strnmov-sparc.s
index f681318f410..df0c4bebf03 100644
--- a/strings/strnmov-sparc.s
+++ b/strings/strnmov-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strnmov.c b/strings/strnmov.c
index 362f3d6c4a8..b2099452d98 100644
--- a/strings/strnmov.c
+++ b/strings/strnmov.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strrchr.c b/strings/strrchr.c
index fb588c015f2..cdb0479ef90 100644
--- a/strings/strrchr.c
+++ b/strings/strrchr.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strstr-sparc.s b/strings/strstr-sparc.s
index eb658e9f7f0..2a6590c9c93 100644
--- a/strings/strstr-sparc.s
+++ b/strings/strstr-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strstr.c b/strings/strstr.c
index bd65ef654b1..a5b50d12043 100644
--- a/strings/strstr.c
+++ b/strings/strstr.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strto.c b/strings/strto.c
index 9e10b935834..934b5d88e90 100644
--- a/strings/strto.c
+++ b/strings/strto.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strtod.c b/strings/strtod.c
index ddb570718a0..932a34f921d 100644
--- a/strings/strtod.c
+++ b/strings/strtod.c
@@ -31,7 +31,6 @@
#define MAX_DBL_EXP 308
#define MAX_RESULT_FOR_MAX_EXP 1.7976931348623157
-#define MIN_RESULT_FOR_MIN_EXP 2.225073858507202
static double scaler10[] = {
1.0, 1e10, 1e20, 1e30, 1e40, 1e50, 1e60, 1e70, 1e80, 1e90
};
@@ -161,26 +160,15 @@ double my_strtod(const char *str, char **end_ptr, int *error)
order= exp + (neg_exp ? -1 : 1) * (ndigits - 1);
if (order < 0)
order= -order;
- if (order >= MAX_DBL_EXP && result)
+ if (order >= MAX_DBL_EXP && !neg_exp && result)
{
double c;
/* Compute modulus of C (see comment above) */
c= result / scaler * 10.0;
- if (neg_exp)
+ if (order > MAX_DBL_EXP || c > MAX_RESULT_FOR_MAX_EXP)
{
- if (order > MAX_DBL_EXP || c < MIN_RESULT_FOR_MIN_EXP)
- {
- result= 0.0;
- goto done;
- }
- }
- else
- {
- if (order > MAX_DBL_EXP || c > MAX_RESULT_FOR_MAX_EXP)
- {
- overflow= 1;
- goto done;
- }
+ overflow= 1;
+ goto done;
}
}
diff --git a/strings/strtol.c b/strings/strtol.c
index ed4ca86c846..42476b0226a 100644
--- a/strings/strtol.c
+++ b/strings/strtol.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strtoll.c b/strings/strtoll.c
index 45352ffd360..cfb6fbd75ee 100644
--- a/strings/strtoll.c
+++ b/strings/strtoll.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strtoul.c b/strings/strtoul.c
index 32a7bc62298..3e2b51bc982 100644
--- a/strings/strtoul.c
+++ b/strings/strtoul.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strtoull.c b/strings/strtoull.c
index 0c2788bc188..94bf6904f8d 100644
--- a/strings/strtoull.c
+++ b/strings/strtoull.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strxmov-sparc.s b/strings/strxmov-sparc.s
index b4ca531d2e4..11ae49a876b 100644
--- a/strings/strxmov-sparc.s
+++ b/strings/strxmov-sparc.s
@@ -1,9 +1,9 @@
-! Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+! Copyright (C) 2000, 2002 MySQL AB
!
! This library is free software; you can redistribute it and/or
! modify it under the terms of the GNU Library General Public
-! License as published by the Free Software Foundation; either
-! version 2 of the License, or (at your option) any later version.
+! License as published by the Free Software Foundation; version 2
+! of the License.
!
! This library is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strxmov.asm b/strings/strxmov.asm
index 9b027ad4276..ad5d0dd3db0 100644
--- a/strings/strxmov.asm
+++ b/strings/strxmov.asm
@@ -1,9 +1,9 @@
-; Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+; Copyright (C) 2000 MySQL AB
;
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Library General Public
-; License as published by the Free Software Foundation; either
-; version 2 of the License, or (at your option) any later version.
+; License as published by the Free Software Foundation; version 2
+; of the License.
;
; This library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strxmov.c b/strings/strxmov.c
index fe1e88c13d0..9dd2c936620 100644
--- a/strings/strxmov.c
+++ b/strings/strxmov.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/strxnmov.c b/strings/strxnmov.c
index 3ef0e57650c..dfa3ab858ab 100644
--- a/strings/strxnmov.c
+++ b/strings/strxnmov.c
@@ -2,8 +2,8 @@
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ License as published by the Free Software Foundation; version 2
+ of the License.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/t_ctype.h b/strings/t_ctype.h
index 4f6f78cd188..af4f3ebbaa1 100644
--- a/strings/t_ctype.h
+++ b/strings/t_ctype.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/uca-dump.c b/strings/uca-dump.c
index dd3b74a55e8..774e940c7da 100644
--- a/strings/uca-dump.c
+++ b/strings/uca-dump.c
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/strings/udiv.c b/strings/udiv.c
index 25f3f4685f0..81ac01ee9c3 100644
--- a/strings/udiv.c
+++ b/strings/udiv.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/strings/utr11-dump.c b/strings/utr11-dump.c
index c1b5a923946..a15f63025f4 100644
--- a/strings/utr11-dump.c
+++ b/strings/utr11-dump.c
@@ -1,3 +1,18 @@
+/* Copyright (C) 2004 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/strings/xml.c b/strings/xml.c
index 767cb004d34..5f8283f2ea8 100644
--- a/strings/xml.c
+++ b/strings/xml.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am
index ea99c46389d..85ccb9c126d 100644
--- a/support-files/MacOSX/Makefile.am
+++ b/support-files/MacOSX/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2003-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/support-files/Makefile.am b/support-files/Makefile.am
index 26d51438a1b..da8c25ccb1e 100644
--- a/support-files/Makefile.am
+++ b/support-files/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2001, 2003-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/support-files/MySQL-shared-compat.spec.sh b/support-files/MySQL-shared-compat.spec.sh
index 72ebf4d4d2b..14a98616863 100644
--- a/support-files/MySQL-shared-compat.spec.sh
+++ b/support-files/MySQL-shared-compat.spec.sh
@@ -11,8 +11,7 @@
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
+# Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
@@ -30,7 +29,7 @@
# Change this to match the version of the shared libs you want to include
#
%define version50 @MYSQL_NO_DASH_VERSION@
-%define version41 4.1.16
+%define version41 4.1.17
%define version40 4.0.26
%define version3 3.23.58
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh
index d5041f30c0a..f5fa4e9ed9a 100644
--- a/support-files/mysql.server.sh
+++ b/support-files/mysql.server.sh
@@ -82,7 +82,7 @@ datadir_set=
#
lsb_functions="/lib/lsb/init-functions"
if test -f $lsb_functions ; then
- source $lsb_functions
+ . $lsb_functions
else
log_success_msg()
{
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 6000773144c..528b1f2746b 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -362,7 +362,7 @@ fi
# Include libgcc.a in the devel subpackage (BUG 4921)
if expr "$CC" : ".*gcc.*" > /dev/null ;
then
- libgcc=`$CC --print-libgcc-file`
+ libgcc=`$CC $CFLAGS --print-libgcc-file`
if [ -f $libgcc ]
then
%define have_libgcc 1
@@ -575,6 +575,7 @@ fi
%doc %attr(644, root, root) %{_infodir}/mysql.info*
+%doc %attr(644, root, man) %{_mandir}/man1/my_print_defaults.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisam_ftdump.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisamchk.1*
%doc %attr(644, root, man) %{_mandir}/man1/myisamlog.1*
@@ -587,8 +588,9 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/mysql_upgrade.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlhotcopy.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysqlman.1*
-%doc %attr(644, root, man) %{_mandir}/man1/mysqlmanager.1*
+%doc %attr(644, root, man) %{_mandir}/man8/mysqlmanager.8*
%doc %attr(644, root, man) %{_mandir}/man1/mysql.server.1*
+%doc %attr(644, root, man) %{_mandir}/man1/mysql_tzinfo_to_sql.1*
%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
%doc %attr(644, root, man) %{_mandir}/man1/perror.1*
%doc %attr(644, root, man) %{_mandir}/man1/replace.1*
@@ -753,6 +755,21 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Fri Jan 05 2007 Kent Boortz <kent@mysql.com>
+
+- Add CFLAGS to gcc call with --print-libgcc-file, to make sure the
+ correct "libgcc.a" path is returned for the 32/64 bit architecture.
+
+* Mon Dec 18 2006 Joerg Bruehe <joerg@mysql.com>
+
+- Fix the move of "mysqlmanager" to section 8: Directory name was wrong.
+
+* Thu Dec 14 2006 Joerg Bruehe <joerg@mysql.com>
+
+- Include the new man pages for "my_print_defaults" and "mysql_tzinfo_to_sql"
+ in the server RPM.
+- The "mysqlmanager" man page got moved from section 1 to 8.
+
* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 46c42d461f3..5eade93621b 100755
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9f143173827..a19ffecbd14 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,9 +1,9 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2000-2006 MySQL AB
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
+# License as published by the Free Software Foundation; version 2
+# of the License.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,11 +17,6 @@
## Process this file with automake to create Makefile.in
-if HAVE_YASSL
- yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
-else
- yassl_dummy_link_fix=
-endif
EXTRA_DIST = auto_increment.res auto_increment.tst \
function.res function.tst lock_test.pl lock_test.res \
export.pl big_record.pl \
@@ -35,9 +30,6 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \
bin_PROGRAMS = mysql_client_test
noinst_PROGRAMS = insert_test select_test thread_test
-#
-# C Test for 4.1 protocol
-#
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes)
LIBS = @CLIENT_LIBS@
@@ -45,11 +37,11 @@ LDADD = @CLIENT_EXTRA_LDFLAGS@ \
$(top_builddir)/libmysql/libmysqlclient.la
mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS)
-mysql_client_test_SOURCES= mysql_client_test.c $(yassl_dummy_link_fix) \
+mysql_client_test_SOURCES= mysql_client_test.c\
$(top_srcdir)/mysys/my_memmem.c
-insert_test_SOURCES= insert_test.c $(yassl_dummy_link_fix)
-select_test_SOURCES= select_test.c $(yassl_dummy_link_fix)
+insert_test_SOURCES= insert_test.c
+select_test_SOURCES= select_test.c
insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
diff --git a/tests/connect_test.c b/tests/connect_test.c
index c68ade9f78f..a0f2d7561d1 100644
--- a/tests/connect_test.c
+++ b/tests/connect_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tests/deadlock_test.c b/tests/deadlock_test.c
index ab8158e0cd8..e386205a985 100644
--- a/tests/deadlock_test.c
+++ b/tests/deadlock_test.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2000-2001, 2003-2004, 2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tests/insert_test.c b/tests/insert_test.c
index 2b659e9eecb..bb7b0a2f928 100644
--- a/tests/insert_test.c
+++ b/tests/insert_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tests/list_test.c b/tests/list_test.c
index 1d50e703133..8b752c8b6e4 100644
--- a/tests/list_test.c
+++ b/tests/list_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 0b8d4d81558..792f955d729 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -11014,7 +11013,7 @@ static void test_view()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(1 == rc);
+ DIE_UNLESS(1 == rc);
}
mysql_stmt_close(stmt);
@@ -11057,7 +11056,7 @@ static void test_view_where()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(4 == rc);
+ DIE_UNLESS(4 == rc);
}
mysql_stmt_close(stmt);
@@ -11140,7 +11139,7 @@ static void test_view_2where()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(0 == rc);
+ DIE_UNLESS(0 == rc);
mysql_stmt_close(stmt);
@@ -11193,7 +11192,7 @@ static void test_view_star()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(0 == rc);
+ DIE_UNLESS(0 == rc);
}
mysql_stmt_close(stmt);
@@ -11256,7 +11255,7 @@ static void test_view_insert()
rc= mysql_stmt_execute(select_stmt);
check_execute(select_stmt, rc);
rowcount= (int)my_process_stmt_result(select_stmt);
- assert((i+1) == rowcount);
+ DIE_UNLESS((i+1) == rowcount);
}
mysql_stmt_close(insert_stmt);
mysql_stmt_close(select_stmt);
@@ -11297,7 +11296,7 @@ static void test_left_join_view()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(3 == rc);
+ DIE_UNLESS(3 == rc);
}
mysql_stmt_close(stmt);
@@ -11373,7 +11372,7 @@ static void test_view_insert_fields()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(1 == rc);
+ DIE_UNLESS(1 == rc);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP VIEW v1");
@@ -12851,6 +12850,81 @@ static void test_bug7990()
DIE_UNLESS(!mysql_errno(mysql));
}
+/*
+ Bug #15518 - Reusing a stmt that has failed during prepare
+ does not clear error
+*/
+
+static void test_bug15518()
+{
+ MYSQL_STMT *stmt;
+ MYSQL* mysql1;
+ int rc;
+ myheader("test_bug15518");
+
+ mysql1= mysql_init(NULL);
+
+ if (!mysql_real_connect(mysql1, opt_host, opt_user, opt_password,
+ opt_db ? opt_db : "test", opt_port, opt_unix_socket,
+ CLIENT_MULTI_STATEMENTS))
+ {
+ fprintf(stderr, "Failed to connect to the database\n");
+ DIE_UNLESS(0);
+ }
+
+ stmt= mysql_stmt_init(mysql1);
+
+ /*
+ The prepare of foo should fail with errno 1064 since
+ it's not a valid query
+ */
+ rc= mysql_stmt_prepare(stmt, "foo", 3);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d, mysql_errno: %d\n",
+ rc, mysql_stmt_errno(stmt), mysql_errno(mysql1));
+ DIE_UNLESS(rc && mysql_stmt_errno(stmt) && mysql_errno(mysql1));
+
+ /*
+ Use the same stmt and reprepare with another query that
+ suceeds
+ */
+ rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d, mysql_errno: %d\n",
+ rc, mysql_stmt_errno(stmt), mysql_errno(mysql1));
+ DIE_UNLESS(!rc || mysql_stmt_errno(stmt) || mysql_errno(mysql1));
+
+ mysql_stmt_close(stmt);
+ DIE_UNLESS(!mysql_errno(mysql1));
+
+ /*
+ part2, when connection to server has been closed
+ after first prepare
+ */
+ stmt= mysql_stmt_init(mysql1);
+ rc= mysql_stmt_prepare(stmt, "foo", 3);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d, mysql_errno: %d\n",
+ rc, mysql_stmt_errno(stmt), mysql_errno(mysql1));
+ DIE_UNLESS(rc && mysql_stmt_errno(stmt) && mysql_errno(mysql1));
+
+ /* Close connection to server */
+ mysql_close(mysql1);
+
+ /*
+ Use the same stmt and reprepare with another query that
+ suceeds. The prepare should fail with error 2013 since
+ connection to server has been closed.
+ */
+ rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d\n",
+ rc, mysql_stmt_errno(stmt));
+ DIE_UNLESS(rc && mysql_stmt_errno(stmt));
+
+ mysql_stmt_close(stmt);
+}
+
static void test_view_sp_list_fields()
{
@@ -15009,7 +15083,7 @@ static void test_bug17667()
}
else
{
- assert(0==1);
+ DIE_UNLESS(0==1);
}
}
@@ -15760,6 +15834,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug15752", test_bug15752 },
{ "test_bug21206", test_bug21206 },
{ "test_bug21726", test_bug21726 },
+ { "test_bug15518", test_bug15518 },
{ "test_bug23383", test_bug23383 },
{ "test_bug21635", test_bug21635 },
{ "test_bug24179", test_bug24179 },
diff --git a/tests/select_test.c b/tests/select_test.c
index 64c4fec5167..5a9021c4dd6 100644
--- a/tests/select_test.c
+++ b/tests/select_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tests/showdb_test.c b/tests/showdb_test.c
index 08229fc51ee..4be48c28205 100644
--- a/tests/showdb_test.c
+++ b/tests/showdb_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tests/ssl_test.c b/tests/ssl_test.c
index 85f490cb02e..136f0a83cbe 100644
--- a/tests/ssl_test.c
+++ b/tests/ssl_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tests/thread_test.c b/tests/thread_test.c
index f8577857d0a..0ad446282c2 100644
--- a/tests/thread_test.c
+++ b/tests/thread_test.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 61b9a612dc5..48d030ed037 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -2,8 +2,7 @@
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,18 +14,15 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Process this file with automake to create Makefile.in
-if HAVE_YASSL
- yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
-else
- yassl_dummy_link_fix=
-endif
INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes)
+
LDADD= @CLIENT_EXTRA_LDFLAGS@ \
$(top_builddir)/libmysql_r/libmysqlclient_r.la \
- @openssl_libs@ @yassl_libs@ @ZLIB_LIBS@
+ @openssl_libs@ @yassl_libs@ @ZLIB_LIBS@
+
bin_PROGRAMS= mysqltestmanager
-mysqltestmanager_SOURCES= mysqlmanager.c $(yassl_dummy_link_fix)
+mysqltestmanager_SOURCES= mysqlmanager.c
mysqltestmanager_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
DEF= -DUNDEF_THREADS_HACK
diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c
index 4d507fc3d32..6a8621fac42 100644
--- a/tools/mysqlmanager.c
+++ b/tools/mysqlmanager.c
@@ -1,9 +1,8 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+/* Copyright (C) 2001-2006 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/CMakeLists.txt b/vio/CMakeLists.txt
index a3cbb304289..e4940d54da8 100755
--- a/vio/CMakeLists.txt
+++ b/vio/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DSAFEMALLOC -DSAFE_MUTEX")
diff --git a/vio/Makefile.am b/vio/Makefile.am
index cb70501046e..d90eb2f0e99 100644
--- a/vio/Makefile.am
+++ b/vio/Makefile.am
@@ -1,43 +1,28 @@
-# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-#
+# Copyright (C) 2000-2003, 2005, 2006 MySQL AB
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
+# the Free Software Foundation; version 2 of the License.
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-if HAVE_YASSL
- yassl_dummy_link_fix= $(top_srcdir)/extra/yassl/src/dummy.cpp
-else
- yassl_dummy_link_fix=
-endif
-INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \
+INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
$(openssl_includes)
-LDADD= @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) $(yassl_libs)
-pkglib_LIBRARIES= libvio.a
-noinst_PROGRAMS = test-ssl test-sslserver test-sslclient
-noinst_HEADERS= vio_priv.h
-test_ssl_SOURCES= test-ssl.c $(yassl_dummy_link_fix)
-test_ssl_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
- ../mysys/libmysys.a ../strings/libmystrings.a \
- $(openssl_libs) $(yassl_libs)
-test_sslserver_SOURCES= test-sslserver.c $(yassl_dummy_link_fix)
-test_sslserver_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
- ../mysys/libmysys.a ../strings/libmystrings.a \
- $(openssl_libs) $(yassl_libs)
-test_sslclient_SOURCES= test-sslclient.c $(yassl_dummy_link_fix)
-test_sslclient_LDADD= @CLIENT_EXTRA_LDFLAGS@ ../dbug/libdbug.a libvio.a \
- ../mysys/libmysys.a ../strings/libmystrings.a \
- $(openssl_libs) $(yassl_libs)
-libvio_a_SOURCES= vio.c viosocket.c viossl.c viosslfactories.c
+LDADD = @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) $(yassl_libs)
+pkglib_LIBRARIES = libvio.a
+
+noinst_HEADERS = vio_priv.h
+
+libvio_a_SOURCES = vio.c viosocket.c viossl.c viosslfactories.c
+
EXTRA_DIST= CMakeLists.txt
+
# Don't update the files from bitkeeper
%::SCCS/s.%
diff --git a/vio/test-ssl.c b/vio/test-ssl.c
index f8172426e38..76833e25949 100644
--- a/vio/test-ssl.c
+++ b/vio/test-ssl.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/test-sslclient.c b/vio/test-sslclient.c
index 49d6768c884..c8e14721375 100644
--- a/vio/test-sslclient.c
+++ b/vio/test-sslclient.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/test-sslserver.c b/vio/test-sslserver.c
index daec3a6e6f9..59456db1fd4 100644
--- a/vio/test-sslserver.c
+++ b/vio/test-sslserver.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/vio.c b/vio/vio.c
index 2b0a7f0d79b..00b8964e30b 100644
--- a/vio/vio.c
+++ b/vio/vio.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/vio_priv.h b/vio/vio_priv.h
index db331abdea8..6820e49273a 100644
--- a/vio/vio_priv.h
+++ b/vio/vio_priv.h
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/viosocket.c b/vio/viosocket.c
index cae0cf70db4..01abde6e0f7 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/viossl.c b/vio/viossl.c
index f436262a3ce..4267486112f 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -126,12 +125,16 @@ int vio_ssl_close(Vio *vio)
{
switch ((r= SSL_shutdown(ssl)))
{
- case 1: /* Shutdown successful */
+ case 1:
+ /* Shutdown successful */
+ break;
+ case 0:
+ /*
+ Shutdown not yet finished - since the socket is going to
+ be closed there is no need to call SSL_shutdown() a second
+ time to wait for the other side to respond
+ */
break;
- case 0: /* Shutdown not yet finished, call it again */
- if ((r= SSL_shutdown(ssl) >= 0))
- break;
- /* Fallthrough */
default: /* Shutdown failed */
DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d",
SSL_get_error(ssl, r)));
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 014ce25d754..422745e6d75 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/vio/viotest-ssl.c b/vio/viotest-ssl.c
index b4a191a1e2f..81d119ff207 100644
--- a/vio/viotest-ssl.c
+++ b/vio/viotest-ssl.c
@@ -2,8 +2,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
+ the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/win/Makefile.am b/win/Makefile.am
index 05c01b61360..b087675793b 100755
--- a/win/Makefile.am
+++ b/win/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2006 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/win/README b/win/README
index cbda33e1184..8fe3dc21d1e 100644
--- a/win/README
+++ b/win/README
@@ -49,6 +49,9 @@ The options right now are
COMPILATION_COMMENT=<comment> Server comment, default "Source distribution"
MYSQL_TCP_PORT=<port> Server port, default 3306
CYBOZU
+ DISABLE_GRANT_OPTIONS Disables the use of --init-file and --skip-grant-tables
+ options of mysqld.exe
+
So the command line could look like:
diff --git a/win/build-vs71.bat b/win/build-vs71.bat
index 959067695c5..159b1ec97d1 100755
--- a/win/build-vs71.bat
+++ b/win/build-vs71.bat
@@ -1,5 +1,20 @@
@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
if exist cmakecache.txt del cmakecache.txt
copy win\vs71cache.txt cmakecache.txt
cmake -G "Visual Studio 7 .NET 2003"
diff --git a/win/build-vs8.bat b/win/build-vs8.bat
index d9c06241a9b..ff0eeb0a8cb 100755
--- a/win/build-vs8.bat
+++ b/win/build-vs8.bat
@@ -1,5 +1,20 @@
@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
if exist cmakecache.txt del cmakecache.txt
copy win\vs8cache.txt cmakecache.txt
cmake -G "Visual Studio 8 2005"
diff --git a/win/build-vs8_x64.bat b/win/build-vs8_x64.bat
index f1d96116390..bc13e01d742 100755
--- a/win/build-vs8_x64.bat
+++ b/win/build-vs8_x64.bat
@@ -1,5 +1,20 @@
@echo off
+REM Copyright (C) 2006 MySQL AB
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; version 2 of the License.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program; if not, write to the Free Software
+REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
if exist cmakecache.txt del cmakecache.txt
copy win\vs8cache.txt cmakecache.txt
cmake -G "Visual Studio 8 2005 Win64"
diff --git a/win/configure.js b/win/configure.js
index ef90ce982a6..59c73fc2fab 100755
--- a/win/configure.js
+++ b/win/configure.js
@@ -1,4 +1,19 @@
// Configure.js
+//
+// Copyright (C) 2006 MySQL AB
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
ForReading = 1;
ForWriting = 2;
@@ -32,6 +47,7 @@ try
case "WITH_PARTITION_STORAGE_ENGINE":
case "__NT__":
case "CYBOZU":
+ case "DISABLE_GRANT_OPTIONS":
configfile.WriteLine("SET (" + args.Item(i) + " TRUE)");
break;
case "MYSQL_SERVER_SUFFIX":
diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt
index 53560adf6d1..ac315b0dd85 100755
--- a/zlib/CMakeLists.txt
+++ b/zlib/CMakeLists.txt
@@ -1,3 +1,18 @@
+# Copyright (C) 2006 MySQL AB
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
diff --git a/zlib/Makefile.am b/zlib/Makefile.am
index af7d60d8568..c40c922851e 100644
--- a/zlib/Makefile.am
+++ b/zlib/Makefile.am
@@ -1,9 +1,8 @@
-# Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
+# Copyright (C) 2004-2006 MySQL AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
+# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -33,3 +32,5 @@ libz_la_SOURCES= adler32.c compress.c crc32.c deflate.c gzio.c \
EXTRA_DIST= README FAQ INDEX ChangeLog algorithm.txt zlib.3 CMakeLists.txt
+# Don't update the files from bitkeeper
+%::SCCS/s.%