mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
4dabfa5de7
into mysql.com:/home/kent/bk/main/mysql-5.1 BUILD/Makefile.am: Auto merged BitKeeper/deleted/.del-ArrayFifoList.hpp~7036ae04dd7e7bd2: Auto merged BitKeeper/deleted/.del-ArrayList.hpp~44695d09b1a02179: Auto merged BitKeeper/deleted/.del-DbtupLCP.cpp~855b1ed3fbc86a42: Auto merged BitKeeper/deleted/.del-DbtupSystemRestart.cpp~15b54d7e4e75d2d: Auto merged BitKeeper/deleted/.del-DbtupUndoLog.cpp~5a2ef6e86b1404e9: Auto merged Makefile.am: Auto merged BitKeeper/deleted/.del-Makefile.am~2: Auto merged BitKeeper/deleted/.del-Makefile.am~ab5c84d46412dc2e: Auto merged BitKeeper/deleted/.del-Makefile.am~abb265028eb9b6a7: Auto merged BitKeeper/deleted/.del-Makefile.am~de166d6fcac3b9b6: Auto merged BitKeeper/deleted/.del-Makefile.am~e5b911533dad2713: Auto merged BitKeeper/deleted/.del-Makefile.am~ead19441cc5ff35c: Auto merged BitKeeper/deleted/.del-Makefile.am~f87185e232d7c4f: Auto merged BitKeeper/deleted/.del-Makefile.in: Auto merged BitKeeper/deleted/.del-MemoryChannelOSE.hpp: Auto merged BitKeeper/deleted/.del-MetaData.cpp~146ae9865dd35829: Auto merged BitKeeper/deleted/.del-MetaData.hpp~538342afcd8ac53c: Auto merged BitKeeper/deleted/.del-NdbCondition.c~ad83464328ab37af: Auto merged BitKeeper/deleted/.del-NdbCondition.c~ee56562abdd718cf: Auto merged BitKeeper/deleted/.del-NdbConditionOSE.h~455dd2c29c2e6344: Auto merged BitKeeper/deleted/.del-NdbDaemon.c~3b8101f376b28df: Auto merged BitKeeper/deleted/.del-NdbEnv.c~207f9ce9754c9e8a: Auto merged BitKeeper/deleted/.del-NdbEnv.c~bb6fe7572d45288a: Auto merged BitKeeper/deleted/.del-NdbErrHnd.cpp: Auto merged BitKeeper/deleted/.del-NdbHost.c~2c29816c77396d7b: Auto merged BitKeeper/deleted/.del-NdbHost.c~cf18d6b3c825180c: Auto merged BitKeeper/deleted/.del-NdbMem.c~6285b159985d46da: Auto merged BitKeeper/deleted/.del-NdbMem.c~6c2b317c1ce230ab: Auto merged BitKeeper/deleted/.del-NdbMem_SoftOse.cpp~9c61e311ec168d44: Auto merged BitKeeper/deleted/.del-NdbMutex.c~768131269bccca10: Auto merged BitKeeper/deleted/.del-NdbMutex.c~f4bdd19be08b84ab: Auto merged BitKeeper/deleted/.del-NdbOut.cpp~8caa99a0d729540c: Auto merged BitKeeper/deleted/.del-NdbSleep.c~b643ea3e7103eb62: Auto merged BitKeeper/deleted/.del-NdbSleep.c~b88fbc5b140de10d: Auto merged BitKeeper/deleted/.del-NdbTCP.c~1e9f416992352f6d: Auto merged BitKeeper/deleted/.del-NdbTCP.c~b09cdcbef3ea2c57: Auto merged BitKeeper/deleted/.del-NdbThread.c~2fe1fa5f47801772: Auto merged BitKeeper/deleted/.del-NdbThread.c~fe71a67b5c3a4724: Auto merged BitKeeper/deleted/.del-NdbTick.c~aa6385567216509d: Auto merged BitKeeper/deleted/.del-NdbTick.c~b76feba2cf1493d1: Auto merged BitKeeper/deleted/.del-OSE_Receiver.cpp: Auto merged BitKeeper/deleted/.del-OSE_Receiver.hpp: Auto merged BitKeeper/deleted/.del-OSE_Signals.hpp: Auto merged BitKeeper/deleted/.del-OSE_Transporter.cpp: Auto merged BitKeeper/deleted/.del-OSE_Transporter.hpp: Auto merged BitKeeper/deleted/.del-TraceNdbApi.hpp~7a7f0ae5b70358bc: Auto merged BitKeeper/deleted/.del-VerifyNdbApi.hpp~f417f78f7cd05935: Auto merged BitKeeper/deleted/.del-bcd.h~81fbfcc1530534da: Auto merged BitKeeper/deleted/.del-config-os2.h~a16b51851ddd317b: Auto merged BitKeeper/deleted/.del-dbGenerator.c~7509c19f70cad0bf: Auto merged BitKeeper/deleted/.del-dbGenerator.h~63f1aeb98260bcb7: Auto merged BitKeeper/deleted/.del-dbGenerator.h~e1aaa6725999d458: Auto merged BitKeeper/deleted/.del-dbPopulate.c~5dcff1c99783d83b: Auto merged BitKeeper/deleted/.del-dbPopulate.h~229a894b59d4da73: Auto merged BitKeeper/deleted/.del-ha_berkeley.cc: Auto merged BitKeeper/deleted/.del-ha_berkeley.h: Auto merged BitKeeper/deleted/.del-localDbPrepare.c~33a2c46afc8fac9a: Auto merged BitKeeper/deleted/.del-macros.h~58097d584e29b5df: Auto merged BitKeeper/deleted/.del-macros.h~742871fab0681964: Auto merged BitKeeper/deleted/.del-mainGenerator.c~2d1c8016f72b2517: Auto merged BitKeeper/deleted/.del-mainPopulate.c~37def9a44980b8ec: Auto merged BitKeeper/deleted/.del-mgmapi_logevent.cpp~f1e7cf3e70edc4: Auto merged BitKeeper/deleted/.del-mmslist.cpp: Auto merged BitKeeper/deleted/.del-my_lread.c: Auto merged BitKeeper/deleted/.del-my_lwrite.c: Auto merged BitKeeper/deleted/.del-my_os2cond.c~e3b520af1c371bb5: Auto merged BitKeeper/deleted/.del-my_os2dirsrch.c~4e2479b2abb2eb5a: Auto merged BitKeeper/deleted/.del-my_os2dirsrch.h~5011cbc657537d0: Auto merged BitKeeper/deleted/.del-my_os2dlfcn.c~6d94b488717683dd: Auto merged BitKeeper/deleted/.del-my_os2dlfcn.h0~eae8edb8555eff87: Auto merged BitKeeper/deleted/.del-my_os2file64.c~251fb8a1e950c31b: Auto merged BitKeeper/deleted/.del-my_os2thread.c~65dca991548cec2a: Auto merged BitKeeper/deleted/.del-my_os2tls.c~58ade7a0f70ad5ea: Auto merged BitKeeper/deleted/.del-mysqlmanager-pwgen.c~d8f5f91ec54432b9: Auto merged BitKeeper/deleted/.del-mysqlmanager.c~e97636d71145a0b: Auto merged BitKeeper/deleted/.del-mysqlmanagerc.c~4f6e3499e68508f6: Auto merged BitKeeper/deleted/.del-ndb_error.hpp~24468bb7f20a0b41: Auto merged BitKeeper/deleted/.del-ndb_error.hpp~45a2fef922beae3: Auto merged BitKeeper/deleted/.del-ndb_schema.hpp~de9c21185d6bfe4e: Auto merged BitKeeper/deleted/.del-ndbapi_async.cpp~319189569fb659ec: Auto merged BitKeeper/deleted/.del-ndbapi_async1.cpp~2995dac9b963a0d: Auto merged BitKeeper/deleted/.del-ndbapi_event.cpp~c5d949802966180: Auto merged BitKeeper/deleted/.del-ndbapi_retries.cpp~7301496d8c1c310a: Auto merged BitKeeper/deleted/.del-ndbapi_scan.cpp~14ed2aa9a5d9e597: Auto merged BitKeeper/deleted/.del-ndbapi_simple.cpp~80962179f3c2f5b8: Auto merged BitKeeper/deleted/.del-ndbapi_simple_index.cpp~4b95a4d71808b5b6: Auto merged BitKeeper/deleted/.del-print-limit-table~b8e808031daa3758: Auto merged BitKeeper/deleted/.del-raid.cc~488f5fa6538394e1: Auto merged BitKeeper/deleted/.del-raid.h~2d2503a66b128ac6: Auto merged BitKeeper/deleted/.del-raid2.c~fe7aea5fb4b9748c: Auto merged BitKeeper/deleted/.del-sql_manager.h: Auto merged BitKeeper/deleted/.del-testData.h~696038ea2623a90b: Auto merged BitKeeper/deleted/.del-testData.h~898b71d7c639319e: Auto merged BitKeeper/deleted/.del-testDefinitions.h~f18a4553579a3725: Auto merged BitKeeper/deleted/.del-userHandle.h~3275bb415e1ca2c2: Auto merged BitKeeper/deleted/.del-userHandle.h~ec22dc7a7ed2f81b: Auto merged BitKeeper/deleted/.del-userInterface.cpp~82ee612ab14b3d48: Auto merged BitKeeper/deleted/.del-userInterface.c~92a20032f7d1e91: Auto merged BitKeeper/deleted/.del-userInterface.h~1f76ad2f28b283fd: Auto merged BitKeeper/deleted/.del-userInterface.h~49139f029bbdaabc: Auto merged BitKeeper/deleted/.del-userTransaction.c~438012ecc761b776: Auto merged BitKeeper/deleted/.del-userTransaction.c~f50661b4f54b0bdd: Auto merged BitKeeper/deleted/.del-utv.h~f64af026b9705ebb: Auto merged BitKeeper/deleted/.del-vcdrfunc.h~85803875180684cd: Auto merged BitKeeper/deleted/.del-waiter.cpp~b188e4bfddf2cf98: Auto merged Docs/Makefile.am: Auto merged client/Makefile.am: Auto merged client/client_priv.h: Auto merged client/get_password.c: Auto merged client/mysql.cc: Auto merged client/mysql_upgrade.c: Auto merged client/mysqladmin.cc: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqlcheck.c: Auto merged client/mysqldump.c: Auto merged client/mysqlimport.c: Auto merged client/mysqlshow.c: Auto merged client/mysqltest.c: Auto merged dbug/Makefile.am: Auto merged extra/Makefile.am: Auto merged extra/comp_err.c: Auto merged extra/perror.c: Auto merged extra/replace.c: Auto merged extra/resolveip.c: Auto merged include/Makefile.am: Auto merged include/base64.h: Auto merged include/config-netware.h: Auto merged include/config-win.h: Auto merged include/decimal.h: Auto merged include/errmsg.h: Auto merged include/ft_global.h: Auto merged include/heap.h: Auto merged include/m_ctype.h: Auto merged include/m_string.h: Auto merged include/my_base.h: Auto merged include/my_bitmap.h: Auto merged include/my_dbug.h: Auto merged include/my_global.h: Auto merged include/my_net.h: Auto merged include/my_no_pthread.h: Auto merged include/my_nosys.h: Auto merged include/my_pthread.h: Auto merged include/my_sys.h: Auto merged include/my_time.h: Auto merged include/my_tree.h: Auto merged include/my_xml.h: Auto merged include/myisam.h: Auto merged include/myisammrg.h: Auto merged include/mysql.h: Auto merged include/mysql_com.h: Auto merged include/mysys_err.h: Auto merged include/queues.h: Auto merged include/thr_alarm.h: Auto merged include/thr_lock.h: Auto merged include/violite.h: Auto merged libmysqld/Makefile.am: Auto merged libmysqld/emb_qcache.cc: Auto merged libmysqld/embedded_priv.h: Auto merged libmysqld/examples/Makefile.am: Auto merged libmysqld/libmysqld.c: Auto merged mysql-test/Makefile.am: Auto merged mysys/Makefile.am: Auto merged mysys/array.c: Auto merged mysys/base64.c: Auto merged mysys/charset-def.c: Auto merged mysys/default.c: Auto merged mysys/default_modify.c: Auto merged mysys/errors.c: Auto merged mysys/hash.c: Auto merged mysys/mf_dirname.c: Auto merged mysys/mf_format.c: Auto merged mysys/mf_iocache.c: Auto merged mysys/mf_iocache2.c: Auto merged mysys/mf_keycache.c: Auto merged mysys/mf_pack.c: Auto merged mysys/mf_path.c: Auto merged mysys/mf_tempdir.c: Auto merged mysys/mf_tempfile.c: Auto merged mysys/my_access.c: Auto merged mysys/my_alloc.c: Auto merged mysys/my_append.c: Auto merged mysys/my_bit.c: Auto merged mysys/my_bitmap.c: Auto merged mysys/my_clock.c: Auto merged mysys/my_compress.c: Auto merged mysys/my_copy.c: Auto merged mysys/my_create.c: Auto merged mysys/my_dup.c: Auto merged mysys/my_error.c: Auto merged mysys/my_file.c: Auto merged mysys/my_gethostbyname.c: Auto merged mysys/my_getopt.c: Auto merged mysys/my_getwd.c: Auto merged mysys/my_handler.c: Auto merged mysys/my_init.c: Auto merged mysys/my_lib.c: Auto merged mysys/my_lock.c: Auto merged mysys/my_malloc.c: Auto merged mysys/my_mkdir.c: Auto merged mysys/my_mmap.c: Auto merged mysys/my_net.c: Auto merged mysys/my_once.c: Auto merged mysys/my_open.c: Auto merged mysys/my_pread.c: Auto merged mysys/my_pthread.c: Auto merged mysys/my_redel.c: Auto merged mysys/my_rename.c: Auto merged mysys/my_seek.c: Auto merged mysys/my_sleep.c: Auto merged mysys/my_static.c: Auto merged mysys/my_symlink2.c: Auto merged mysys/my_thr_init.c: Auto merged mysys/mysys_priv.h: Auto merged mysys/ptr_cmp.c: Auto merged mysys/queues.c: Auto merged mysys/safemalloc.c: Auto merged mysys/string.c: Auto merged mysys/test_dir.c: Auto merged mysys/testhash.c: Auto merged mysys/thr_alarm.c: Auto merged mysys/thr_lock.c: Auto merged mysys/thr_mutex.c: Auto merged regex/Makefile.am: Auto merged scripts/Makefile.am: Auto merged server-tools/instance-manager/Makefile.am: Auto merged server-tools/instance-manager/buffer.cc: Auto merged server-tools/instance-manager/command.cc: Auto merged server-tools/instance-manager/command.h: Auto merged server-tools/instance-manager/commands.cc: Auto merged server-tools/instance-manager/commands.h: Auto merged server-tools/instance-manager/guardian.cc: Auto merged server-tools/instance-manager/guardian.h: Auto merged server-tools/instance-manager/instance.cc: Auto merged server-tools/instance-manager/instance.h: Auto merged server-tools/instance-manager/instance_map.cc: Auto merged server-tools/instance-manager/instance_map.h: Auto merged server-tools/instance-manager/instance_options.cc: Auto merged server-tools/instance-manager/instance_options.h: Auto merged server-tools/instance-manager/listener.cc: Auto merged server-tools/instance-manager/listener.h: Auto merged server-tools/instance-manager/log.cc: Auto merged server-tools/instance-manager/log.h: Auto merged server-tools/instance-manager/manager.cc: Auto merged server-tools/instance-manager/manager.h: Auto merged server-tools/instance-manager/messages.cc: Auto merged server-tools/instance-manager/mysql_connection.cc: Auto merged server-tools/instance-manager/mysql_connection.h: Auto merged server-tools/instance-manager/mysql_manager_error.h: Auto merged server-tools/instance-manager/mysqlmanager.cc: Auto merged server-tools/instance-manager/options.cc: Auto merged server-tools/instance-manager/options.h: Auto merged server-tools/instance-manager/parse.cc: Auto merged server-tools/instance-manager/parse.h: Auto merged server-tools/instance-manager/parse_output.cc: Auto merged server-tools/instance-manager/parse_output.h: Auto merged server-tools/instance-manager/priv.cc: Auto merged server-tools/instance-manager/priv.h: Auto merged server-tools/instance-manager/protocol.cc: Auto merged server-tools/instance-manager/protocol.h: Auto merged server-tools/instance-manager/thread_registry.cc: Auto merged server-tools/instance-manager/thread_registry.h: Auto merged server-tools/instance-manager/user_map.cc: Auto merged server-tools/instance-manager/user_map.h: Auto merged sql/Makefile.am: Auto merged sql/discover.cc: Auto merged sql/field.cc: Auto merged sql/field.h: Auto merged sql/field_conv.cc: Auto merged sql/filesort.cc: Auto merged sql/gen_lex_hash.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster.h: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/hostname.cc: Auto merged sql/init.cc: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_create.cc: Auto merged sql/item_create.h: Auto merged sql/item_func.cc: Auto merged sql/item_func.h: Auto merged sql/item_geofunc.cc: Auto merged sql/item_geofunc.h: Auto merged sql/item_row.cc: Auto merged sql/item_row.h: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_subselect.h: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/item_timefunc.cc: Auto merged sql/item_timefunc.h: Auto merged sql/item_uniq.cc: Auto merged sql/key.cc: Auto merged sql/lex.h: Auto merged sql/lex_symbol.h: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/log_event.h: Auto merged sql/my_decimal.cc: Auto merged sql/my_decimal.h: Auto merged sql/my_lock.c: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/net_serv.cc: Auto merged sql/opt_range.cc: Auto merged sql/opt_range.h: Auto merged sql/opt_sum.cc: Auto merged sql/parse_file.cc: Auto merged sql/parse_file.h: Auto merged sql/password.c: Auto merged sql/procedure.h: Auto merged sql/protocol.cc: Auto merged sql/protocol.h: Auto merged sql/records.cc: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sp.cc: Auto merged sql/sp.h: Auto merged sql/sp_cache.cc: Auto merged sql/sp_head.cc: Auto merged sql/sp_head.h: Auto merged sql/spatial.cc: Auto merged sql/spatial.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_acl.h: Auto merged sql/sql_analyse.cc: Auto merged sql/sql_analyse.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_bitmap.h: Auto merged sql/sql_cache.cc: Auto merged sql/sql_cache.h: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_crypt.cc: Auto merged sql/sql_cursor.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_derived.cc: Auto merged sql/sql_do.cc: Auto merged sql/sql_error.cc: Auto merged sql/sql_error.h: Auto merged sql/sql_handler.cc: Auto merged sql/sql_help.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_list.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_manager.cc: Auto merged sql/sql_map.cc: Auto merged sql/sql_olap.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_rename.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_string.cc: Auto merged sql/sql_string.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_test.cc: Auto merged sql/sql_trigger.cc: Auto merged sql/sql_trigger.h: Auto merged sql/sql_udf.cc: Auto merged sql/sql_union.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_view.cc: Auto merged sql-bench/Makefile.am: Auto merged sql-bench/as3ap.sh: Auto merged sql-bench/bench-count-distinct.sh: Auto merged sql-bench/bench-init.pl.sh: Auto merged sql-bench/compare-results.sh: Auto merged sql-bench/copy-db.sh: Auto merged sql/share/charsets/Index.xml: Auto merged sql/share/charsets/cp1250.xml: Auto merged sql/sql_view.h: Auto merged sql/sql_yacc.yy: Auto merged sql/stacktrace.c: Auto merged sql/stacktrace.h: Auto merged sql/strfunc.cc: Auto merged sql/structs.h: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged sql/time.cc: Auto merged sql/tztime.cc: Auto merged sql/tztime.h: Auto merged sql/udf_example.c: Auto merged sql/unireg.cc: Auto merged sql/unireg.h: Auto merged sql-bench/crash-me.sh: Auto merged sql-bench/run-all-tests.sh: Auto merged sql-bench/server-cfg.sh: Auto merged sql-bench/test-ATIS.sh: Auto merged sql-bench/test-alter-table.sh: Auto merged sql-bench/test-big-tables.sh: Auto merged sql-bench/test-connect.sh: Auto merged sql-bench/test-create.sh: Auto merged sql-bench/test-insert.sh: Auto merged sql-bench/test-select.sh: Auto merged sql-bench/test-transactions.sh: Auto merged sql-bench/test-wisconsin.sh: Auto merged sql-common/client.c: Auto merged sql-common/my_time.c: Auto merged storage/archive/ha_archive.cc: Auto merged storage/archive/ha_archive.h: Auto merged storage/blackhole/ha_blackhole.cc: Auto merged storage/blackhole/ha_blackhole.h: Auto merged storage/csv/ha_tina.cc: Auto merged storage/csv/ha_tina.h: Auto merged storage/example/ha_example.cc: Auto merged storage/example/ha_example.h: Auto merged storage/federated/ha_federated.cc: Auto merged storage/federated/ha_federated.h: Auto merged storage/heap/Makefile.am: Auto merged storage/heap/_check.c: Auto merged storage/heap/_rectest.c: Auto merged storage/heap/ha_heap.cc: Auto merged storage/heap/ha_heap.h: Auto merged storage/heap/heapdef.h: Auto merged storage/heap/hp_block.c: Auto merged storage/heap/hp_clear.c: Auto merged storage/heap/hp_close.c: Auto merged storage/heap/hp_create.c: Auto merged storage/heap/hp_delete.c: Auto merged storage/heap/hp_extra.c: Auto merged storage/heap/hp_hash.c: Auto merged storage/heap/hp_info.c: Auto merged storage/heap/hp_open.c: Auto merged storage/heap/hp_panic.c: Auto merged storage/heap/hp_rename.c: Auto merged storage/heap/hp_rfirst.c: Auto merged storage/heap/hp_rkey.c: Auto merged storage/heap/hp_rlast.c: Auto merged storage/heap/hp_rnext.c: Auto merged storage/heap/hp_rprev.c: Auto merged storage/heap/hp_rrnd.c: Auto merged storage/heap/hp_rsame.c: Auto merged storage/heap/hp_scan.c: Auto merged storage/heap/hp_static.c: Auto merged storage/heap/hp_test1.c: Auto merged storage/heap/hp_test2.c: Auto merged storage/heap/hp_update.c: Auto merged storage/heap/hp_write.c: Auto merged storage/innobase/Makefile.am: Auto merged storage/innobase/btr/Makefile.am: Auto merged storage/innobase/buf/Makefile.am: Auto merged storage/innobase/data/Makefile.am: Auto merged storage/innobase/dict/Makefile.am: Auto merged storage/innobase/dyn/Makefile.am: Auto merged storage/innobase/eval/Makefile.am: Auto merged storage/innobase/fil/Makefile.am: Auto merged storage/innobase/fsp/Makefile.am: Auto merged storage/innobase/fut/Makefile.am: Auto merged storage/innobase/ha/Makefile.am: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged storage/innobase/handler/ha_innodb.h: Auto merged storage/innobase/ibuf/Makefile.am: Auto merged storage/innobase/lock/Makefile.am: Auto merged storage/innobase/log/Makefile.am: Auto merged storage/innobase/mach/Makefile.am: Auto merged storage/innobase/mem/Makefile.am: Auto merged storage/innobase/mtr/Makefile.am: Auto merged storage/innobase/os/Makefile.am: Auto merged storage/innobase/page/Makefile.am: Auto merged storage/innobase/pars/Makefile.am: Auto merged storage/innobase/que/Makefile.am: Auto merged storage/innobase/read/Makefile.am: Auto merged storage/innobase/rem/Makefile.am: Auto merged storage/innobase/row/Makefile.am: Auto merged storage/innobase/srv/Makefile.am: Auto merged storage/innobase/sync/Makefile.am: Auto merged storage/innobase/thr/Makefile.am: Auto merged storage/innobase/trx/Makefile.am: Auto merged storage/innobase/usr/Makefile.am: Auto merged storage/innobase/ut/Makefile.am: Auto merged storage/myisam/Makefile.am: Auto merged storage/myisam/ft_boolean_search.c: Auto merged storage/myisam/ft_eval.c: Auto merged storage/myisam/ft_eval.h: Auto merged storage/myisam/ft_nlq_search.c: Auto merged storage/myisam/ft_parser.c: Auto merged storage/myisam/ft_static.c: Auto merged storage/myisam/ft_stem.c: Auto merged storage/myisam/ft_stopwords.c: Auto merged storage/myisam/ft_test1.c: Auto merged storage/myisam/ft_test1.h: Auto merged storage/myisam/ft_update.c: Auto merged storage/myisam/ftdefs.h: Auto merged storage/myisam/fulltext.h: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/ha_myisam.h: Auto merged storage/myisam/mi_cache.c: Auto merged storage/myisam/mi_changed.c: Auto merged storage/myisam/mi_check.c: Auto merged storage/myisam/mi_checksum.c: Auto merged storage/myisam/mi_close.c: Auto merged storage/myisam/mi_create.c: Auto merged storage/myisam/mi_dbug.c: Auto merged storage/myisam/mi_delete.c: Auto merged storage/myisam/mi_delete_all.c: Auto merged storage/myisam/mi_delete_table.c: Auto merged storage/myisam/mi_dynrec.c: Auto merged storage/myisam/mi_extra.c: Auto merged storage/myisam/mi_info.c: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/mi_keycache.c: Auto merged storage/myisam/mi_locking.c: Auto merged storage/myisam/mi_log.c: Auto merged storage/myisam/mi_open.c: Auto merged storage/myisam/mi_packrec.c: Auto merged storage/myisam/mi_page.c: Auto merged storage/myisam/mi_panic.c: Auto merged storage/myisam/mi_preload.c: Auto merged storage/myisam/mi_range.c: Auto merged storage/myisam/mi_rename.c: Auto merged storage/myisam/mi_rfirst.c: Auto merged storage/myisam/mi_rkey.c: Auto merged storage/myisam/mi_rlast.c: Auto merged storage/myisam/mi_rnext.c: Auto merged storage/myisam/mi_rnext_same.c: Auto merged storage/myisam/mi_rprev.c: Auto merged storage/myisam/mi_rrnd.c: Auto merged storage/myisam/mi_rsame.c: Auto merged storage/myisam/mi_rsamepos.c: Auto merged storage/myisam/mi_scan.c: Auto merged storage/myisam/mi_search.c: Auto merged storage/myisam/mi_static.c: Auto merged storage/myisam/mi_statrec.c: Auto merged storage/myisam/mi_test1.c: Auto merged storage/myisam/mi_test2.c: Auto merged storage/myisam/mi_test3.c: Auto merged storage/myisam/mi_unique.c: Auto merged storage/myisam/mi_update.c: Auto merged storage/myisam/mi_write.c: Auto merged storage/myisam/myisam_ftdump.c: Auto merged storage/myisam/myisamchk.c: Auto merged storage/myisam/myisamdef.h: Auto merged storage/myisam/myisamlog.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisam/rt_index.c: Auto merged storage/myisam/rt_index.h: Auto merged storage/myisam/rt_key.c: Auto merged storage/myisam/rt_key.h: Auto merged storage/myisam/rt_mbr.c: Auto merged storage/myisam/rt_mbr.h: Auto merged storage/myisam/rt_split.c: Auto merged storage/myisam/rt_test.c: Auto merged storage/myisam/sort.c: Auto merged storage/myisam/sp_defs.h: Auto merged storage/myisam/sp_key.c: Auto merged storage/myisam/sp_test.c: Auto merged storage/myisammrg/Makefile.am: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged storage/myisammrg/ha_myisammrg.h: Auto merged storage/myisammrg/myrg_close.c: Auto merged storage/myisammrg/myrg_create.c: Auto merged storage/myisammrg/myrg_def.h: Auto merged storage/myisammrg/myrg_delete.c: Auto merged storage/myisammrg/myrg_extra.c: Auto merged storage/myisammrg/myrg_info.c: Auto merged storage/myisammrg/myrg_locking.c: Auto merged storage/myisammrg/myrg_open.c: Auto merged storage/myisammrg/myrg_panic.c: Auto merged storage/myisammrg/myrg_queue.c: Auto merged storage/myisammrg/myrg_range.c: Auto merged storage/myisammrg/myrg_rfirst.c: Auto merged storage/myisammrg/myrg_rkey.c: Auto merged storage/myisammrg/myrg_rlast.c: Auto merged storage/myisammrg/myrg_rnext.c: Auto merged storage/myisammrg/myrg_rnext_same.c: Auto merged storage/myisammrg/myrg_rprev.c: Auto merged storage/myisammrg/myrg_rrnd.c: Auto merged storage/myisammrg/myrg_rsame.c: Auto merged storage/myisammrg/myrg_static.c: Auto merged storage/myisammrg/myrg_update.c: Auto merged storage/myisammrg/myrg_write.c: Auto merged storage/ndb/include/debugger/DebuggerNames.hpp: Auto merged storage/ndb/include/debugger/EventLogger.hpp: Auto merged storage/ndb/include/debugger/GrepError.hpp: Auto merged storage/ndb/include/debugger/SignalLoggerManager.hpp: Auto merged storage/ndb/include/ndb_constants.h: Auto merged storage/ndb/include/ndb_global.h.in: Auto merged storage/ndb/include/ndb_init.h: Auto merged storage/ndb/include/ndb_types.h.in: Auto merged storage/ndb/include/ndb_version.h.in: Auto merged storage/ndb/include/editline/editline.h: Auto merged storage/ndb/include/kernel/AttributeDescriptor.hpp: Auto merged storage/ndb/include/kernel/AttributeHeader.hpp: Auto merged storage/ndb/include/kernel/AttributeList.hpp: Auto merged storage/ndb/include/kernel/BlockNumbers.h: Auto merged storage/ndb/include/kernel/GlobalSignalNumbers.h: Auto merged storage/ndb/include/kernel/GrepEvent.hpp: Auto merged storage/ndb/include/kernel/Interpreter.hpp: Auto merged storage/ndb/include/kernel/LogLevel.hpp: Auto merged storage/ndb/include/kernel/NodeBitmask.hpp: Auto merged storage/ndb/include/kernel/NodeInfo.hpp: Auto merged storage/ndb/include/kernel/NodeState.hpp: Auto merged storage/ndb/include/kernel/RefConvert.hpp: Auto merged storage/ndb/include/kernel/kernel_types.h: Auto merged storage/ndb/include/kernel/ndb_limits.h: Auto merged storage/ndb/include/kernel/signaldata/AbortAll.hpp: Auto merged storage/ndb/include/kernel/signaldata/AccFrag.hpp: Auto merged storage/ndb/include/kernel/signaldata/AccLock.hpp: Auto merged storage/ndb/include/kernel/signaldata/AccScan.hpp: Auto merged storage/ndb/include/kernel/signaldata/AccSizeAltReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/AlterIndx.hpp: Auto merged storage/ndb/include/kernel/signaldata/AlterTab.hpp: Auto merged storage/ndb/include/kernel/signaldata/AlterTable.hpp: Auto merged storage/ndb/include/kernel/signaldata/AlterTrig.hpp: Auto merged storage/ndb/include/kernel/signaldata/ApiBroadcast.hpp: Auto merged storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp: Auto merged storage/ndb/include/kernel/signaldata/ApiVersion.hpp: Auto merged storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp: Auto merged storage/ndb/include/kernel/signaldata/AttrInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/BackupContinueB.hpp: Auto merged storage/ndb/include/kernel/signaldata/BackupImpl.hpp: Auto merged storage/ndb/include/kernel/signaldata/BackupSignalData.hpp: Auto merged storage/ndb/include/kernel/signaldata/BlockCommitOrd.hpp: Auto merged storage/ndb/include/kernel/signaldata/BuildIndx.hpp: Auto merged storage/ndb/include/kernel/signaldata/CheckNodeGroups.hpp: Auto merged storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/CmInit.hpp: Auto merged storage/ndb/include/kernel/trigger_definitions.h: Auto merged storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp: Auto merged storage/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/CntrMasterConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/CntrMasterReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/ConfigParamId.hpp: Auto merged storage/ndb/include/kernel/signaldata/ContinueFragmented.hpp: Auto merged storage/ndb/include/kernel/signaldata/CopyActive.hpp: Auto merged storage/ndb/include/kernel/signaldata/CopyFrag.hpp: Auto merged storage/ndb/include/kernel/signaldata/CopyGCIReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/CreateEvnt.hpp: Auto merged storage/ndb/include/kernel/signaldata/CreateFrag.hpp: Auto merged storage/ndb/include/kernel/signaldata/CreateFragmentation.hpp: Auto merged storage/ndb/include/kernel/signaldata/CreateIndx.hpp: Auto merged storage/ndb/include/kernel/signaldata/CreateTab.hpp: Auto merged storage/ndb/include/kernel/signaldata/CreateTable.hpp: Auto merged storage/ndb/include/kernel/signaldata/CreateTrig.hpp: Auto merged storage/ndb/include/kernel/signaldata/DiAddTab.hpp: Auto merged storage/ndb/include/kernel/signaldata/DiGetNodes.hpp: Auto merged storage/ndb/include/kernel/signaldata/DictLock.hpp: Auto merged storage/ndb/include/kernel/signaldata/DictSchemaInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/DictSizeAltReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/DictStart.hpp: Auto merged storage/ndb/include/kernel/signaldata/DictTabInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/DihAddFrag.hpp: Auto merged storage/ndb/include/kernel/signaldata/DihContinueB.hpp: Auto merged storage/ndb/include/kernel/signaldata/DihSizeAltReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/DihStartTab.hpp: Auto merged storage/ndb/include/kernel/signaldata/DihSwitchReplica.hpp: Auto merged storage/ndb/include/kernel/signaldata/DisconnectRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/DropIndx.hpp: Auto merged storage/ndb/include/kernel/signaldata/DropTab.hpp: Auto merged storage/ndb/include/kernel/signaldata/DropTabFile.hpp: Auto merged storage/ndb/include/kernel/signaldata/DropTable.hpp: Auto merged storage/ndb/include/kernel/signaldata/DropTrig.hpp: Auto merged storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp: Auto merged storage/ndb/include/kernel/signaldata/EmptyLcp.hpp: Auto merged storage/ndb/include/kernel/signaldata/EndTo.hpp: Auto merged storage/ndb/include/kernel/signaldata/EventReport.hpp: Auto merged storage/ndb/include/kernel/signaldata/EventSubscribeReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/ExecFragReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/FailRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/FireTrigOrd.hpp: Auto merged storage/ndb/include/kernel/signaldata/FsAppendReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/FsCloseReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/FsConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/FsOpenReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/FsReadWriteReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/FsRef.hpp: Auto merged storage/ndb/include/kernel/signaldata/FsRemoveReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/GCPSave.hpp: Auto merged storage/ndb/include/kernel/signaldata/GetTabInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/GetTableId.hpp: Auto merged storage/ndb/include/kernel/signaldata/GrepImpl.hpp: Auto merged storage/ndb/include/kernel/signaldata/HotSpareRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/IndxAttrInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/IndxKeyInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/KeyInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/LCP.hpp: Auto merged storage/ndb/include/kernel/signaldata/ListTables.hpp: Auto merged storage/ndb/include/kernel/signaldata/LqhFrag.hpp: Auto merged storage/ndb/include/kernel/signaldata/LqhKey.hpp: Auto merged storage/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/LqhTransConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/ManagementServer.hpp: Auto merged storage/ndb/include/kernel/signaldata/MasterGCP.hpp: Auto merged storage/ndb/include/kernel/signaldata/MasterLCP.hpp: Auto merged storage/ndb/include/kernel/signaldata/NFCompleteRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/NdbSttor.hpp: Auto merged storage/ndb/include/kernel/signaldata/NdbfsContinueB.hpp: Auto merged storage/ndb/include/kernel/signaldata/NextScan.hpp: Auto merged storage/ndb/include/kernel/signaldata/NodeFailRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/NodeStateSignalData.hpp: Auto merged storage/ndb/include/kernel/signaldata/PackedSignal.hpp: Auto merged storage/ndb/include/kernel/signaldata/PrepDropTab.hpp: Auto merged storage/ndb/include/kernel/signaldata/PrepFailReqRef.hpp: Auto merged storage/ndb/include/kernel/signaldata/ReadNodesConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/RelTabMem.hpp: Auto merged storage/ndb/include/kernel/signaldata/RepImpl.hpp: Auto merged storage/ndb/include/kernel/signaldata/ResumeReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/ScanFrag.hpp: Auto merged storage/ndb/include/kernel/signaldata/ScanTab.hpp: Auto merged storage/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp: Auto merged storage/ndb/include/kernel/signaldata/SetVarReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/SignalData.hpp: Auto merged storage/ndb/include/kernel/signaldata/SignalDataPrint.hpp: Auto merged storage/ndb/include/kernel/signaldata/SignalDroppedRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/SrFragidConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/StartFragReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/StartInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/StartMe.hpp: Auto merged storage/ndb/include/kernel/signaldata/StartOrd.hpp: Auto merged storage/ndb/include/kernel/signaldata/StartPerm.hpp: Auto merged storage/ndb/include/kernel/signaldata/StartRec.hpp: Auto merged storage/ndb/include/kernel/signaldata/StartTo.hpp: Auto merged storage/ndb/include/kernel/signaldata/StopMe.hpp: Auto merged storage/ndb/include/kernel/signaldata/StopPerm.hpp: Auto merged storage/ndb/include/kernel/signaldata/StopReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/SumaImpl.hpp: Auto merged storage/ndb/include/kernel/signaldata/SystemError.hpp: Auto merged storage/ndb/include/kernel/signaldata/TamperOrd.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcCommit.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcContinueB.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcHbRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcIndx.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcKeyConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcKeyFailConf.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcKeyRef.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcKeyReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcRollbackRep.hpp: Auto merged storage/ndb/include/kernel/signaldata/TcSizeAltReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/TestOrd.hpp: Auto merged storage/ndb/include/kernel/signaldata/TransIdAI.hpp: Auto merged storage/ndb/include/kernel/signaldata/TrigAttrInfo.hpp: Auto merged storage/ndb/include/kernel/signaldata/TupCommit.hpp: Auto merged storage/ndb/include/kernel/signaldata/TupFrag.hpp: Auto merged storage/ndb/include/kernel/signaldata/TupKey.hpp: Auto merged storage/ndb/include/kernel/signaldata/TupSizeAltReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/TuxBound.hpp: Auto merged storage/ndb/include/kernel/signaldata/TuxContinueB.hpp: Auto merged storage/ndb/include/kernel/signaldata/TuxMaint.hpp: Auto merged storage/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp: Auto merged storage/ndb/include/kernel/signaldata/UpdateTo.hpp: Auto merged storage/ndb/include/kernel/signaldata/UtilDelete.hpp: Auto merged storage/ndb/include/kernel/signaldata/UtilExecute.hpp: Auto merged storage/ndb/include/kernel/signaldata/UtilLock.hpp: Auto merged storage/ndb/include/kernel/signaldata/UtilPrepare.hpp: Auto merged storage/ndb/include/kernel/signaldata/UtilRelease.hpp: Auto merged storage/ndb/include/kernel/signaldata/UtilSequence.hpp: Auto merged storage/ndb/include/kernel/signaldata/WaitGCP.hpp: Auto merged storage/ndb/include/logger/ConsoleLogHandler.hpp: Auto merged storage/ndb/include/logger/FileLogHandler.hpp: Auto merged storage/ndb/include/logger/LogHandler.hpp: Auto merged storage/ndb/include/logger/Logger.hpp: Auto merged storage/ndb/include/logger/SysLogHandler.hpp: Auto merged storage/ndb/include/mgmapi/mgmapi.h: Auto merged storage/ndb/include/mgmapi/mgmapi_debug.h: Auto merged storage/ndb/include/mgmapi/ndb_logevent.h: Auto merged storage/ndb/include/mgmapi/ndbd_exit_codes.h: Auto merged storage/ndb/include/mgmcommon/ConfigRetriever.hpp: Auto merged storage/ndb/include/mgmcommon/IPCConfig.hpp: Auto merged storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp: Auto merged storage/ndb/include/ndbapi/Ndb.hpp: Auto merged storage/ndb/include/ndbapi/NdbApi.hpp: Auto merged storage/ndb/include/ndbapi/NdbBlob.hpp: Auto merged storage/ndb/include/ndbapi/NdbDictionary.hpp: Auto merged storage/ndb/include/ndbapi/NdbError.hpp: Auto merged storage/ndb/include/ndbapi/NdbEventOperation.hpp: Auto merged storage/ndb/include/ndbapi/NdbIndexOperation.hpp: Auto merged storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp: Auto merged storage/ndb/include/ndbapi/NdbOperation.hpp: Auto merged storage/ndb/include/ndbapi/NdbPool.hpp: Auto merged storage/ndb/include/ndbapi/NdbRecAttr.hpp: Auto merged storage/ndb/include/ndbapi/NdbReceiver.hpp: Auto merged storage/ndb/include/ndbapi/NdbScanFilter.hpp: Auto merged storage/ndb/include/ndbapi/NdbScanOperation.hpp: Auto merged storage/ndb/include/ndbapi/NdbTransaction.hpp: Auto merged storage/ndb/include/ndbapi/ndb_cluster_connection.hpp: Auto merged storage/ndb/include/ndbapi/ndb_opt_defaults.h: Auto merged storage/ndb/include/ndbapi/ndbapi_limits.h: Auto merged storage/ndb/include/ndbapi/ndberror.h: Auto merged storage/ndb/include/newtonapi/dba.h: Auto merged storage/ndb/include/newtonapi/defs/pcn_types.h: Auto merged storage/ndb/include/portlib/NdbCondition.h: Auto merged storage/ndb/include/portlib/NdbConfig.h: Auto merged storage/ndb/include/portlib/NdbDaemon.h: Auto merged storage/ndb/include/portlib/NdbEnv.h: Auto merged storage/ndb/include/portlib/NdbHost.h: Auto merged storage/ndb/include/portlib/NdbMain.h: Auto merged storage/ndb/include/portlib/NdbMem.h: Auto merged storage/ndb/include/portlib/NdbMutex.h: Auto merged storage/ndb/include/portlib/NdbSleep.h: Auto merged storage/ndb/include/portlib/NdbTCP.h: Auto merged storage/ndb/include/portlib/NdbThread.h: Auto merged storage/ndb/include/portlib/NdbTick.h: Auto merged storage/ndb/include/portlib/PortDefs.h: Auto merged storage/ndb/include/portlib/prefetch.h: Auto merged storage/ndb/include/transporter/TransporterCallback.hpp: Auto merged storage/ndb/include/transporter/TransporterDefinitions.hpp: Auto merged storage/ndb/include/transporter/TransporterRegistry.hpp: Auto merged storage/ndb/include/util/BaseString.hpp: Auto merged storage/ndb/include/util/Bitmask.hpp: Auto merged storage/ndb/include/util/File.hpp: Auto merged storage/ndb/include/util/InputStream.hpp: Auto merged storage/ndb/include/util/NdbAutoPtr.hpp: Auto merged storage/ndb/include/util/NdbOut.hpp: Auto merged storage/ndb/include/util/NdbSqlUtil.hpp: Auto merged storage/ndb/include/util/OutputStream.hpp: Auto merged storage/ndb/include/util/Parser.hpp: Auto merged storage/ndb/include/util/Properties.hpp: Auto merged storage/ndb/include/util/SimpleProperties.hpp: Auto merged storage/ndb/include/util/SocketAuthenticator.hpp: Auto merged storage/ndb/include/util/SocketClient.hpp: Auto merged storage/ndb/include/util/SocketServer.hpp: Auto merged storage/ndb/include/util/UtilBuffer.hpp: Auto merged storage/ndb/include/util/Vector.hpp: Auto merged storage/ndb/include/util/basestring_vsnprintf.h: Auto merged storage/ndb/include/util/md5_hash.hpp: Auto merged storage/ndb/include/util/ndb_opts.h: Auto merged storage/ndb/include/util/random.h: Auto merged storage/ndb/include/util/socket_io.h: Auto merged storage/ndb/include/util/uucode.h: Auto merged storage/ndb/include/util/version.h: Auto merged storage/ndb/src/common/debugger/BlockNames.cpp: Auto merged storage/ndb/src/common/debugger/DebuggerNames.cpp: Auto merged storage/ndb/src/common/debugger/EventLogger.cpp: Auto merged storage/ndb/src/common/debugger/GrepError.cpp: Auto merged storage/ndb/src/common/debugger/SignalLoggerManager.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/AccLock.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/AlterTab.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/AlterTable.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/ContinueB.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/DropIndx.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/DropTab.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/DropTrig.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FailRep.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FsConf.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/FsRef.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/GCPSave.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/LCP.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/LqhKey.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/ScanTab.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/SignalNames.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/StartRec.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/SystemError.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TcIndx.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TupCommit.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TupKey.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/UtilLock.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp: Auto merged storage/ndb/src/common/logger/ConsoleLogHandler.cpp: Auto merged storage/ndb/src/common/logger/FileLogHandler.cpp: Auto merged storage/ndb/src/common/logger/LogHandler.cpp: Auto merged storage/ndb/src/common/logger/LogHandlerList.cpp: Auto merged storage/ndb/src/common/logger/LogHandlerList.hpp: Auto merged storage/ndb/src/common/logger/Logger.cpp: Auto merged storage/ndb/src/common/logger/SysLogHandler.cpp: Auto merged storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp: Auto merged storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp: Auto merged storage/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp: Auto merged storage/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp: Auto merged storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp: Auto merged storage/ndb/src/common/mgmcommon/IPCConfig.cpp: Auto merged storage/ndb/src/common/mgmcommon/printConfig/printConfig.cpp: Auto merged storage/ndb/src/common/portlib/NdbCondition.c: Auto merged storage/ndb/src/common/portlib/NdbConfig.c: Auto merged storage/ndb/src/common/portlib/NdbDaemon.c: Auto merged storage/ndb/src/common/portlib/NdbEnv.c: Auto merged storage/ndb/src/common/portlib/NdbHost.c: Auto merged storage/ndb/src/common/portlib/NdbMem.c: Auto merged storage/ndb/src/common/portlib/NdbMutex.c: Auto merged storage/ndb/src/common/portlib/NdbPortLibTest.cpp: Auto merged storage/ndb/src/common/portlib/NdbSleep.c: Auto merged storage/ndb/src/common/portlib/NdbTCP.cpp: Auto merged storage/ndb/src/common/portlib/NdbThread.c: Auto merged storage/ndb/src/common/portlib/NdbTick.c: Auto merged storage/ndb/src/common/portlib/memtest.c: Auto merged storage/ndb/src/common/portlib/mmstest.cpp: Auto merged storage/ndb/src/common/portlib/munmaptest.cpp: Auto merged storage/ndb/src/common/portlib/win32/NdbCondition.c: Auto merged storage/ndb/src/common/portlib/win32/NdbDaemon.c: Auto merged storage/ndb/src/common/portlib/win32/NdbEnv.c: Auto merged storage/ndb/src/common/portlib/win32/NdbHost.c: Auto merged storage/ndb/src/common/portlib/win32/NdbMem.c: Auto merged storage/ndb/src/common/portlib/win32/NdbMutex.c: Auto merged storage/ndb/src/common/portlib/win32/NdbSleep.c: Auto merged storage/ndb/src/common/portlib/win32/NdbTCP.c: Auto merged storage/ndb/src/common/portlib/win32/NdbThread.c: Auto merged storage/ndb/src/common/portlib/win32/NdbTick.c: Auto merged storage/ndb/src/common/transporter/Packer.cpp: Auto merged storage/ndb/src/common/transporter/Packer.hpp: Auto merged storage/ndb/src/common/transporter/SCI_Transporter.cpp: Auto merged storage/ndb/src/common/transporter/SCI_Transporter.hpp: Auto merged storage/ndb/src/common/transporter/SHM_Buffer.hpp: Auto merged storage/ndb/src/common/transporter/SHM_Transporter.cpp: Auto merged storage/ndb/src/common/transporter/SHM_Transporter.hpp: Auto merged storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp: Auto merged storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp: Auto merged storage/ndb/src/common/transporter/SendBuffer.cpp: Auto merged storage/ndb/src/common/transporter/SendBuffer.hpp: Auto merged storage/ndb/src/common/transporter/TCP_Transporter.cpp: Auto merged storage/ndb/src/common/transporter/TCP_Transporter.hpp: Auto merged storage/ndb/src/common/transporter/Transporter.cpp: Auto merged storage/ndb/src/common/transporter/Transporter.hpp: Auto merged storage/ndb/src/common/transporter/TransporterInternalDefinitions.hpp: Auto merged storage/ndb/src/common/transporter/TransporterRegistry.cpp: Auto merged storage/ndb/src/common/transporter/basictest/basicTransporterTest.cpp: Auto merged storage/ndb/src/common/transporter/buddy.cpp: Auto merged storage/ndb/src/common/transporter/buddy.hpp: Auto merged storage/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp: Auto merged storage/ndb/src/common/transporter/perftest/perfTransporterTest.cpp: Auto merged storage/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp: Auto merged storage/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp: Auto merged storage/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp: Auto merged storage/ndb/src/common/transporter/priotest/prioTransporterTest.cpp: Auto merged storage/ndb/src/common/transporter/priotest/prioTransporterTest.hpp: Auto merged storage/ndb/src/common/util/BaseString.cpp: Auto merged storage/ndb/src/common/util/File.cpp: Auto merged storage/ndb/src/common/util/InputStream.cpp: Auto merged storage/ndb/src/common/util/NdbOut.cpp: Auto merged storage/ndb/src/common/util/NdbSqlUtil.cpp: Auto merged storage/ndb/src/common/util/OutputStream.cpp: Auto merged storage/ndb/src/common/util/Parser.cpp: Auto merged storage/ndb/src/common/util/Properties.cpp: Auto merged storage/ndb/src/common/util/SimpleProperties.cpp: Auto merged storage/ndb/src/common/util/SocketAuthenticator.cpp: Auto merged storage/ndb/src/common/util/SocketClient.cpp: Auto merged storage/ndb/src/common/util/SocketServer.cpp: Auto merged storage/ndb/src/common/util/basestring_vsnprintf.c: Auto merged storage/ndb/src/common/util/md5_hash.cpp: Auto merged storage/ndb/src/common/util/ndb_init.c: Auto merged storage/ndb/src/common/util/random.c: Auto merged storage/ndb/src/common/util/socket_io.cpp: Auto merged storage/ndb/src/common/util/strdup.c: Auto merged storage/ndb/src/common/util/filetest/FileUnitTest.cpp: Auto merged storage/ndb/src/common/util/filetest/FileUnitTest.hpp: Auto merged storage/ndb/src/common/util/testProperties/testProperties.cpp: Auto merged storage/ndb/src/common/util/testSimpleProperties/sp_test.cpp: Auto merged storage/ndb/src/common/util/uucode.c: Auto merged storage/ndb/src/common/util/version.c: Auto merged storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp: Auto merged storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h: Auto merged storage/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp: Auto merged storage/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp: Auto merged storage/ndb/src/cw/cpcc-win32/C++/StdAfx.h: Auto merged storage/ndb/src/cw/cpcc-win32/C++/TreeView.cpp: Auto merged storage/ndb/src/cw/cpcc-win32/C++/TreeView.h: Auto merged storage/ndb/src/cw/cpcc-win32/C++/resource.h: Auto merged storage/ndb/src/cw/cpcd/APIService.cpp: Auto merged storage/ndb/src/cw/cpcd/APIService.hpp: Auto merged storage/ndb/src/cw/cpcd/CPCD.cpp: Auto merged storage/ndb/src/cw/cpcd/CPCD.hpp: Auto merged storage/ndb/src/cw/cpcd/Monitor.cpp: Auto merged storage/ndb/src/cw/cpcd/Process.cpp: Auto merged storage/ndb/src/cw/cpcd/common.cpp: Auto merged storage/ndb/src/cw/cpcd/common.hpp: Auto merged storage/ndb/src/cw/cpcd/main.cpp: Auto merged storage/ndb/src/cw/test/socketclient/socketClientTest.cpp: Auto merged storage/ndb/src/cw/util/ClientInterface.cpp: Auto merged storage/ndb/src/cw/util/ClientInterface.hpp: Auto merged storage/ndb/src/cw/util/SocketRegistry.cpp: Auto merged storage/ndb/src/cw/util/SocketRegistry.hpp: Auto merged storage/ndb/src/cw/util/SocketService.cpp: Auto merged storage/ndb/src/cw/util/SocketService.hpp: Auto merged storage/ndb/src/kernel/SimBlockList.cpp: Auto merged storage/ndb/src/kernel/blocks/mutexes.hpp: Auto merged storage/ndb/src/kernel/main.cpp: Auto merged storage/ndb/src/kernel/blocks/backup/Backup.cpp: Auto merged storage/ndb/src/kernel/blocks/backup/Backup.hpp: Auto merged storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp: Auto merged storage/ndb/src/kernel/blocks/backup/BackupInit.cpp: Auto merged storage/ndb/src/kernel/blocks/backup/FsBuffer.hpp: Auto merged storage/ndb/src/kernel/blocks/backup/read.cpp: Auto merged storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp: Auto merged storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp: Auto merged storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp: Auto merged storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdih/Sysfile.hpp: Auto merged storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp: Auto merged storage/ndb/src/kernel/blocks/dblqh/redoLogReader/redoLogFileReader.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp: Auto merged storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp: Auto merged storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp: Auto merged storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/Filename.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/Pool.hpp: Auto merged storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp: Auto merged storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp: Auto merged storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp: Auto merged storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp: Auto merged storage/ndb/src/kernel/blocks/qmgr/timer.hpp: Auto merged storage/ndb/src/kernel/blocks/suma/Suma.cpp: Auto merged storage/ndb/src/kernel/blocks/suma/Suma.hpp: Auto merged storage/ndb/src/kernel/blocks/suma/SumaInit.cpp: Auto merged storage/ndb/src/kernel/blocks/trix/Trix.cpp: Auto merged storage/ndb/src/kernel/blocks/trix/Trix.hpp: Auto merged storage/ndb/src/kernel/error/ErrorHandlingMacros.hpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.hpp: Auto merged storage/ndb/src/kernel/error/TimeModule.cpp: Auto merged storage/ndb/src/kernel/error/TimeModule.hpp: Auto merged storage/ndb/src/kernel/error/ndbd_exit_codes.c: Auto merged storage/ndb/src/kernel/vm/Array.hpp: Auto merged storage/ndb/src/kernel/vm/ArrayPool.hpp: Auto merged storage/ndb/src/kernel/vm/CArray.hpp: Auto merged storage/ndb/src/kernel/vm/Callback.hpp: Auto merged storage/ndb/src/kernel/vm/ClusterConfiguration.cpp: Auto merged storage/ndb/src/kernel/vm/ClusterConfiguration.hpp: Auto merged storage/ndb/src/kernel/vm/Configuration.cpp: Auto merged storage/ndb/src/kernel/vm/Configuration.hpp: Auto merged storage/ndb/src/kernel/vm/DLFifoList.hpp: Auto merged storage/ndb/src/kernel/vm/DLHashTable.hpp: Auto merged storage/ndb/src/kernel/vm/DLHashTable2.hpp: Auto merged storage/ndb/src/kernel/vm/DLList.hpp: Auto merged storage/ndb/src/kernel/vm/DataBuffer.hpp: Auto merged storage/ndb/src/kernel/vm/Emulator.cpp: Auto merged storage/ndb/src/kernel/vm/Emulator.hpp: Auto merged storage/ndb/src/kernel/vm/FastScheduler.cpp: Auto merged storage/ndb/src/kernel/vm/FastScheduler.hpp: Auto merged storage/ndb/src/kernel/vm/GlobalData.hpp: Auto merged storage/ndb/src/kernel/vm/KeyDescriptor.hpp: Auto merged storage/ndb/src/kernel/vm/KeyTable.hpp: Auto merged storage/ndb/src/kernel/vm/KeyTable2.hpp: Auto merged storage/ndb/src/kernel/vm/LongSignal.hpp: Auto merged storage/ndb/src/kernel/vm/Mutex.cpp: Auto merged storage/ndb/src/kernel/vm/Mutex.hpp: Auto merged storage/ndb/src/kernel/vm/Prio.hpp: Auto merged storage/ndb/src/kernel/vm/RequestTracker.hpp: Auto merged storage/ndb/src/kernel/vm/SLList.hpp: Auto merged storage/ndb/src/kernel/vm/SafeCounter.cpp: Auto merged storage/ndb/src/kernel/vm/SafeCounter.hpp: Auto merged storage/ndb/src/kernel/vm/SectionReader.cpp: Auto merged storage/ndb/src/kernel/vm/SectionReader.hpp: Auto merged storage/ndb/src/kernel/vm/SignalCounter.hpp: Auto merged storage/ndb/src/kernel/vm/SimBlockList.hpp: Auto merged storage/ndb/src/kernel/vm/SimplePropertiesSection.cpp: Auto merged storage/ndb/src/kernel/vm/SimulatedBlock.cpp: Auto merged storage/ndb/src/kernel/vm/SimulatedBlock.hpp: Auto merged storage/ndb/src/kernel/vm/SuperPool.cpp: Auto merged storage/ndb/src/kernel/vm/SuperPool.hpp: Auto merged storage/ndb/src/kernel/vm/ThreadConfig.cpp: Auto merged storage/ndb/src/kernel/vm/ThreadConfig.hpp: Auto merged storage/ndb/src/kernel/vm/TimeQueue.cpp: Auto merged storage/ndb/src/kernel/vm/TimeQueue.hpp: Auto merged storage/ndb/src/kernel/vm/TransporterCallback.cpp: Auto merged storage/ndb/src/kernel/vm/VMSignal.cpp: Auto merged storage/ndb/src/kernel/vm/VMSignal.hpp: Auto merged storage/ndb/src/kernel/vm/WaitQueue.hpp: Auto merged storage/ndb/src/kernel/vm/WatchDog.cpp: Auto merged storage/ndb/src/kernel/vm/WatchDog.hpp: Auto merged storage/ndb/src/kernel/vm/al_test/arrayListTest.cpp: Auto merged storage/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp: Auto merged storage/ndb/src/kernel/vm/al_test/main.cpp: Auto merged storage/ndb/src/kernel/vm/ndbd_malloc.cpp: Auto merged storage/ndb/src/kernel/vm/ndbd_malloc.hpp: Auto merged storage/ndb/src/kernel/vm/pc.hpp: Auto merged storage/ndb/src/kernel/vm/testCopy/rr.cpp: Auto merged storage/ndb/src/kernel/vm/testCopy/testCopy.cpp: Auto merged storage/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp: Auto merged storage/ndb/src/kernel/vm/testLongSig/testLongSig.cpp: Auto merged storage/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp: Auto merged storage/ndb/src/kernel/vm/testSuperPool.cpp: Auto merged storage/ndb/src/mgmapi/LocalConfig.cpp: Auto merged storage/ndb/src/mgmapi/LocalConfig.hpp: Auto merged storage/ndb/src/mgmapi/mgmapi.cpp: Auto merged storage/ndb/src/mgmapi/mgmapi_configuration.hpp: Auto merged storage/ndb/src/mgmapi/mgmapi_internal.h: Auto merged storage/ndb/src/mgmapi/ndb_logevent.cpp: Auto merged storage/ndb/src/mgmapi/ndb_logevent.hpp: Auto merged storage/ndb/src/mgmapi/test/keso.c: Auto merged storage/ndb/src/mgmapi/test/mgmSrvApi.cpp: Auto merged storage/ndb/src/mgmclient/CommandInterpreter.cpp: Auto merged storage/ndb/src/mgmclient/main.cpp: Auto merged storage/ndb/src/mgmclient/ndb_mgmclient.hpp: Auto merged storage/ndb/src/mgmclient/ndb_mgmclient.h: Auto merged storage/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp: Auto merged storage/ndb/src/mgmsrv/Config.cpp: Auto merged storage/ndb/src/mgmsrv/Config.hpp: Auto merged storage/ndb/src/mgmsrv/ConfigInfo.cpp: Auto merged storage/ndb/src/mgmsrv/ConfigInfo.hpp: Auto merged storage/ndb/src/mgmsrv/InitConfigFileParser.cpp: Auto merged storage/ndb/src/mgmsrv/InitConfigFileParser.hpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.hpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp: Auto merged storage/ndb/src/mgmsrv/Services.cpp: Auto merged storage/ndb/src/mgmsrv/Services.hpp: Auto merged storage/ndb/src/mgmsrv/SignalQueue.cpp: Auto merged storage/ndb/src/mgmsrv/SignalQueue.hpp: Auto merged storage/ndb/src/mgmsrv/convertStrToInt.cpp: Auto merged storage/ndb/src/mgmsrv/convertStrToInt.hpp: Auto merged storage/ndb/src/mgmsrv/main.cpp: Auto merged storage/ndb/src/mgmsrv/mkconfig/mkconfig.cpp: Auto merged storage/ndb/src/ndbapi/API.hpp: Auto merged storage/ndb/src/ndbapi/ClusterMgr.cpp: Auto merged storage/ndb/src/ndbapi/ClusterMgr.hpp: Auto merged storage/ndb/src/ndbapi/DictCache.cpp: Auto merged storage/ndb/src/ndbapi/DictCache.hpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged storage/ndb/src/ndbapi/NdbApiSignal.cpp: Auto merged storage/ndb/src/ndbapi/NdbApiSignal.hpp: Auto merged storage/ndb/src/ndbapi/NdbBlob.cpp: Auto merged storage/ndb/src/ndbapi/NdbBlobImpl.hpp: Auto merged storage/ndb/src/ndbapi/NdbDictionary.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: Auto merged storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp: Auto merged storage/ndb/src/ndbapi/NdbErrorOut.cpp: Auto merged storage/ndb/src/ndbapi/NdbEventOperation.cpp: Auto merged storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: Auto merged storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp: Auto merged storage/ndb/src/ndbapi/NdbImpl.hpp: Auto merged storage/ndb/src/ndbapi/NdbIndexOperation.cpp: Auto merged storage/ndb/src/ndbapi/NdbLinHash.hpp: Auto merged storage/ndb/src/ndbapi/NdbOperation.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationDefine.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationExec.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationInt.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationScan.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationSearch.cpp: Auto merged storage/ndb/src/ndbapi/NdbPool.cpp: Auto merged storage/ndb/src/ndbapi/NdbPoolImpl.cpp: Auto merged storage/ndb/src/ndbapi/NdbPoolImpl.hpp: Auto merged storage/ndb/src/ndbapi/NdbRecAttr.cpp: Auto merged storage/ndb/src/ndbapi/NdbReceiver.cpp: Auto merged storage/ndb/src/ndbapi/NdbScanFilter.cpp: Auto merged storage/ndb/src/ndbapi/NdbScanOperation.cpp: Auto merged storage/ndb/src/ndbapi/NdbTransaction.cpp: Auto merged storage/ndb/src/ndbapi/NdbTransactionScan.cpp: Auto merged storage/ndb/src/ndbapi/NdbUtil.cpp: Auto merged storage/ndb/src/ndbapi/NdbUtil.hpp: Auto merged storage/ndb/src/ndbapi/NdbWaiter.hpp: Auto merged storage/ndb/src/ndbapi/Ndberr.cpp: Auto merged storage/ndb/src/ndbapi/Ndbif.cpp: Auto merged storage/ndb/src/ndbapi/Ndbinit.cpp: Auto merged storage/ndb/src/ndbapi/Ndblist.cpp: Auto merged storage/ndb/src/ndbapi/ObjectMap.hpp: Auto merged storage/ndb/src/ndbapi/SignalSender.cpp: Auto merged storage/ndb/src/ndbapi/SignalSender.hpp: Auto merged storage/ndb/src/ndbapi/TransporterFacade.cpp: Auto merged storage/ndb/src/ndbapi/TransporterFacade.hpp: Auto merged storage/ndb/src/ndbapi/ndb_cluster_connection.cpp: Auto merged storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp: Auto merged storage/ndb/src/ndbapi/ndberror.c: Auto merged storage/ndb/src/ndbapi/signal-sender/SignalSender.cpp: Auto merged storage/ndb/src/ndbapi/signal-sender/SignalSender.hpp: Auto merged storage/ndb/test/include/CpcClient.hpp: Auto merged storage/ndb/test/include/HugoAsynchTransactions.hpp: Auto merged storage/ndb/test/include/HugoCalculator.hpp: Auto merged storage/ndb/test/include/HugoOperations.hpp: Auto merged storage/ndb/test/include/HugoTransactions.hpp: Auto merged storage/ndb/test/include/NDBT.hpp: Auto merged storage/ndb/test/include/NDBT_DataSet.hpp: Auto merged storage/ndb/test/include/NDBT_DataSetTransaction.hpp: Auto merged storage/ndb/test/include/NDBT_Error.hpp: Auto merged storage/ndb/test/include/NDBT_Output.hpp: Auto merged storage/ndb/test/include/NDBT_ResultRow.hpp: Auto merged storage/ndb/test/include/NDBT_ReturnCodes.h: Auto merged storage/ndb/test/include/NDBT_Stats.hpp: Auto merged storage/ndb/test/include/NDBT_Table.hpp: Auto merged storage/ndb/test/include/NDBT_Tables.hpp: Auto merged storage/ndb/test/include/NDBT_Test.hpp: Auto merged storage/ndb/test/include/NdbBackup.hpp: Auto merged storage/ndb/test/include/NdbConfig.hpp: Auto merged storage/ndb/test/include/NdbGrep.hpp: Auto merged storage/ndb/test/include/NdbRestarter.hpp: Auto merged storage/ndb/test/include/NdbRestarts.hpp: Auto merged storage/ndb/test/include/NdbSchemaCon.hpp: Auto merged storage/ndb/test/include/NdbSchemaOp.hpp: Auto merged storage/ndb/test/include/NdbTest.hpp: Auto merged storage/ndb/test/include/NdbTimer.hpp: Auto merged storage/ndb/test/include/TestNdbEventOperation.hpp: Auto merged storage/ndb/test/include/UtilTransactions.hpp: Auto merged storage/ndb/test/include/getarg.h: Auto merged storage/ndb/test/ndbapi/InsertRecs.cpp: Auto merged storage/ndb/test/ndbapi/ScanFilter.hpp: Auto merged storage/ndb/test/ndbapi/ScanFunctions.hpp: Auto merged storage/ndb/test/ndbapi/ScanInterpretTest.hpp: Auto merged storage/ndb/test/ndbapi/TraceNdbApi.cpp: Auto merged storage/ndb/test/ndbapi/VerifyNdbApi.cpp: Auto merged storage/ndb/test/ndbapi/acid.cpp: Auto merged storage/ndb/test/ndbapi/acid2.cpp: Auto merged storage/ndb/test/ndbapi/adoInsertRecs.cpp: Auto merged storage/ndb/test/ndbapi/asyncGenerator.cpp: Auto merged storage/ndb/test/ndbapi/benchronja.cpp: Auto merged storage/ndb/test/ndbapi/bulk_copy.cpp: Auto merged storage/ndb/test/ndbapi/cdrserver.cpp: Auto merged storage/ndb/test/ndbapi/celloDb.cpp: Auto merged storage/ndb/test/ndbapi/create_all_tabs.cpp: Auto merged storage/ndb/test/ndbapi/create_tab.cpp: Auto merged storage/ndb/test/ndbapi/drop_all_tabs.cpp: Auto merged storage/ndb/test/ndbapi/flexAsynch.cpp: Auto merged storage/ndb/test/ndbapi/flexBench.cpp: Auto merged storage/ndb/test/ndbapi/flexHammer.cpp: Auto merged storage/ndb/test/ndbapi/flexScan.cpp: Auto merged storage/ndb/test/ndbapi/flexTT.cpp: Auto merged storage/ndb/test/ndbapi/flexTimedAsynch.cpp: Auto merged storage/ndb/test/ndbapi/flex_bench_mysql.cpp: Auto merged storage/ndb/test/ndbapi/index.cpp: Auto merged storage/ndb/test/ndbapi/index2.cpp: Auto merged storage/ndb/test/ndbapi/initronja.cpp: Auto merged storage/ndb/test/ndbapi/interpreterInTup.cpp: Auto merged storage/ndb/test/ndbapi/mainAsyncGenerator.cpp: Auto merged storage/ndb/test/ndbapi/msa.cpp: Auto merged storage/ndb/test/ndbapi/ndb_async1.cpp: Auto merged storage/ndb/test/ndbapi/ndb_async2.cpp: Auto merged storage/ndb/test/ndbapi/ndb_user_populate.cpp: Auto merged storage/ndb/test/ndbapi/ndb_user_transaction.cpp: Auto merged storage/ndb/test/ndbapi/ndb_user_transaction2.cpp: Auto merged storage/ndb/test/ndbapi/ndb_user_transaction3.cpp: Auto merged storage/ndb/test/ndbapi/ndb_user_transaction4.cpp: Auto merged storage/ndb/test/ndbapi/ndb_user_transaction5.cpp: Auto merged storage/ndb/test/ndbapi/ndb_user_transaction6.cpp: Auto merged storage/ndb/test/ndbapi/restarter.cpp: Auto merged storage/ndb/test/ndbapi/restarter2.cpp: Auto merged storage/ndb/test/ndbapi/restarts.cpp: Auto merged storage/ndb/test/ndbapi/size.cpp: Auto merged storage/ndb/test/ndbapi/testBackup.cpp: Auto merged storage/ndb/test/ndbapi/testBasic.cpp: Auto merged storage/ndb/test/ndbapi/testBasicAsynch.cpp: Auto merged storage/ndb/test/ndbapi/testBlobs.cpp: Auto merged storage/ndb/test/ndbapi/testDataBuffers.cpp: Auto merged storage/ndb/test/ndbapi/testDeadlock.cpp: Auto merged storage/ndb/test/ndbapi/testDict.cpp: Auto merged storage/ndb/test/ndbapi/testGrepVerify.cpp: Auto merged storage/ndb/test/ndbapi/testIndex.cpp: Auto merged storage/ndb/test/ndbapi/testInterpreter.cpp: Auto merged storage/ndb/test/ndbapi/testMgm.cpp: Auto merged storage/ndb/test/ndbapi/testNdbApi.cpp: Auto merged storage/ndb/test/ndbapi/testNodeRestart.cpp: Auto merged storage/ndb/test/ndbapi/testOIBasic.cpp: Auto merged storage/ndb/test/ndbapi/testOperations.cpp: Auto merged storage/ndb/test/ndbapi/testOrderedIndex.cpp: Auto merged storage/ndb/test/ndbapi/testPartitioning.cpp: Auto merged storage/ndb/test/ndbapi/testReadPerf.cpp: Auto merged storage/ndb/test/ndbapi/bank/Bank.cpp: Auto merged storage/ndb/test/ndbapi/bank/Bank.hpp: Auto merged storage/ndb/test/ndbapi/bank/BankLoad.cpp: Auto merged storage/ndb/test/ndbapi/bank/bankCreator.cpp: Auto merged storage/ndb/test/ndbapi/bank/bankMakeGL.cpp: Auto merged storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp: Auto merged storage/ndb/test/ndbapi/bank/bankTimer.cpp: Auto merged storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp: Auto merged storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp: Auto merged storage/ndb/test/ndbapi/bank/testBank.cpp: Auto merged storage/ndb/test/ndbapi/bench/asyncGenerator.cpp: Auto merged storage/ndb/test/ndbapi/bench/dbGenerator.h: Auto merged storage/ndb/test/ndbapi/bench/dbPopulate.cpp: Auto merged storage/ndb/test/ndbapi/bench/dbPopulate.h: Auto merged storage/ndb/test/ndbapi/bench/macros.h: Auto merged storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp: Auto merged storage/ndb/test/ndbapi/bench/mainPopulate.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_async1.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_async2.cpp: Auto merged storage/ndb/test/ndbapi/testRestartGci.cpp: Auto merged storage/ndb/test/ndbapi/testSRBank.cpp: Auto merged storage/ndb/test/ndbapi/testScan.cpp: Auto merged storage/ndb/test/ndbapi/testScanInterpreter.cpp: Auto merged storage/ndb/test/ndbapi/testScanPerf.cpp: Auto merged storage/ndb/test/ndbapi/testSystemRestart.cpp: Auto merged storage/ndb/test/ndbapi/testTimeout.cpp: Auto merged storage/ndb/test/ndbapi/testTransactions.cpp: Auto merged storage/ndb/test/ndbapi/test_event.cpp: Auto merged storage/ndb/test/ndbapi/test_event_merge.cpp: Auto merged storage/ndb/test/ndbapi/test_event_multi_table.cpp: Auto merged storage/ndb/test/ndbapi/userInterface.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_error.hpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_schema.hpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_user_transaction.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp: Auto merged storage/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp: Auto merged storage/ndb/test/ndbapi/bench/testData.h: Auto merged storage/ndb/test/ndbapi/bench/testDefinitions.h: Auto merged storage/ndb/test/ndbapi/bench/userInterface.cpp: Auto merged storage/ndb/test/ndbapi/bench/userInterface.h: Auto merged storage/ndb/test/newtonapi/basic_test/basic/basic.cpp: Auto merged storage/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp: Auto merged storage/ndb/test/newtonapi/basic_test/common.cpp: Auto merged storage/ndb/test/newtonapi/basic_test/common.hpp: Auto merged storage/ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp: Auto merged storage/ndb/test/newtonapi/basic_test/too_basic.cpp: Auto merged storage/ndb/test/newtonapi/perf_test/perf.cpp: Auto merged storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp: Auto merged storage/ndb/test/odbc/SQL99_test/SQL99_test.h: Auto merged storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp: Auto merged storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp: Auto merged storage/ndb/test/odbc/client/NDBT_SQLConnect.cpp: Auto merged storage/ndb/test/odbc/client/NDBT_SQLPrepare.cpp: Auto merged storage/ndb/test/odbc/client/SQLAllocEnvTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLAllocHandleTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp: Auto merged storage/ndb/test/odbc/client/SQLBindColTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLBindParameterTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLCancelTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLCloseCursorTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLColAttributeTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLColAttributeTest1.cpp: Auto merged storage/ndb/test/odbc/client/SQLColAttributeTest2.cpp: Auto merged storage/ndb/test/odbc/client/SQLColAttributeTest3.cpp: Auto merged storage/ndb/test/odbc/client/SQLConnectTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLCopyDescTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLDescribeColTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLDisconnectTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLDriverConnectTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLEndTranTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLErrorTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLExecDirectTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLExecuteTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLFetchScrollTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLFetchTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLFreeHandleTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLFreeStmtTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetCursorNameTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetDataTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetDescFieldTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetDescRecTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetDiagRecTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetFunctionsTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetInfoTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLMoreResultsTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLNumResultColsTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLParamDataTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLPrepareTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLPutDataTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLRowCountTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLSetCursorNameTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLSetDescFieldTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLSetDescRecTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLTablesTest.cpp: Auto merged storage/ndb/test/odbc/client/SQLTransactTest.cpp: Auto merged storage/ndb/test/odbc/client/common.hpp: Auto merged storage/ndb/test/odbc/client/main.cpp: Auto merged storage/ndb/test/odbc/driver/testOdbcDriver.cpp: Auto merged storage/ndb/test/odbc/test_compiler/test_compiler.cpp: Auto merged storage/ndb/test/run-test/main.cpp: Auto merged storage/ndb/test/run-test/run-test.hpp: Auto merged storage/ndb/test/src/CpcClient.cpp: Auto merged storage/ndb/test/src/HugoAsynchTransactions.cpp: Auto merged storage/ndb/test/src/HugoCalculator.cpp: Auto merged storage/ndb/test/src/HugoOperations.cpp: Auto merged storage/ndb/test/src/HugoTransactions.cpp: Auto merged storage/ndb/test/src/NDBT_Error.cpp: Auto merged storage/ndb/test/src/NDBT_Output.cpp: Auto merged storage/ndb/test/src/NDBT_ResultRow.cpp: Auto merged storage/ndb/test/src/NDBT_ReturnCodes.cpp: Auto merged storage/ndb/test/src/NDBT_Table.cpp: Auto merged storage/ndb/test/src/NDBT_Tables.cpp: Auto merged storage/ndb/test/src/NDBT_Test.cpp: Auto merged storage/ndb/test/src/NdbBackup.cpp: Auto merged storage/ndb/test/src/NdbConfig.cpp: Auto merged storage/ndb/test/src/NdbGrep.cpp: Auto merged storage/ndb/test/src/NdbRestarter.cpp: Auto merged storage/ndb/test/src/NdbRestarts.cpp: Auto merged storage/ndb/test/src/NdbSchemaCon.cpp: Auto merged storage/ndb/test/src/NdbSchemaOp.cpp: Auto merged storage/ndb/test/src/UtilTransactions.cpp: Auto merged storage/ndb/test/tools/copy_tab.cpp: Auto merged storage/ndb/test/tools/cpcc.cpp: Auto merged storage/ndb/test/tools/create_index.cpp: Auto merged storage/ndb/test/tools/hugoCalculator.cpp: Auto merged storage/ndb/test/tools/hugoFill.cpp: Auto merged storage/ndb/test/tools/hugoLoad.cpp: Auto merged storage/ndb/test/tools/hugoLockRecords.cpp: Auto merged storage/ndb/test/tools/hugoPkDelete.cpp: Auto merged storage/ndb/test/tools/hugoPkRead.cpp: Auto merged storage/ndb/test/tools/hugoPkReadRecord.cpp: Auto merged storage/ndb/test/tools/hugoPkUpdate.cpp: Auto merged storage/ndb/test/tools/hugoScanRead.cpp: Auto merged storage/ndb/test/tools/hugoScanUpdate.cpp: Auto merged storage/ndb/test/tools/restart.cpp: Auto merged storage/ndb/test/tools/transproxy.cpp: Auto merged storage/ndb/test/tools/verify_index.cpp: Auto merged storage/ndb/tools/delete_all.cpp: Auto merged storage/ndb/tools/desc.cpp: Auto merged storage/ndb/tools/drop_index.cpp: Auto merged storage/ndb/tools/drop_tab.cpp: Auto merged storage/ndb/tools/listTables.cpp: Auto merged storage/ndb/tools/ndb_condig.cpp: Auto merged storage/ndb/tools/ndb_test_platform.cpp: Auto merged storage/ndb/tools/ndbsql.cpp: Auto merged storage/ndb/tools/restore/Restore.cpp: Auto merged storage/ndb/tools/restore/Restore.hpp: Auto merged storage/ndb/tools/restore/consumer.cpp: Auto merged storage/ndb/tools/restore/consumer.hpp: Auto merged storage/ndb/tools/restore/consumer_printer.cpp: Auto merged storage/ndb/tools/restore/consumer_printer.hpp: Auto merged storage/ndb/tools/restore/consumer_restore.cpp: Auto merged storage/ndb/tools/restore/consumer_restore.hpp: Auto merged storage/ndb/tools/restore/consumer_restorem.cpp: Auto merged storage/ndb/tools/restore/restore_main.cpp: Auto merged storage/ndb/tools/select_all.cpp: Auto merged storage/ndb/tools/select_count.cpp: Auto merged storage/ndb/tools/waiter.cpp: Auto merged strings/Makefile.am: Auto merged strings/ctype-big5.c: Auto merged strings/ctype-bin.c: Auto merged strings/ctype-cp932.c: Auto merged strings/ctype-euc_kr.c: Auto merged strings/ctype-eucjpms.c: Auto merged strings/ctype-gb2312.c: Auto merged strings/ctype-gbk.c: Auto merged strings/ctype-latin1.c: Auto merged strings/ctype-mb.c: Auto merged strings/ctype-simple.c: Auto merged strings/ctype-sjis.c: Auto merged strings/ctype-tis620.c: Auto merged strings/ctype-ucs2.c: Auto merged strings/ctype-ujis.c: Auto merged strings/ctype-utf8.c: Auto merged strings/ctype-win1250ch.c: Auto merged strings/ctype.c: Auto merged strings/decimal.c: Auto merged strings/strxnmov.c: Auto merged strings/xml.c: Auto merged tests/Makefile.am: Auto merged tests/mysql_client_test.c: Auto merged vio/Makefile.am: Auto merged vio/vio.c: Auto merged vio/viosocket.c: Auto merged vio/viossl.c: Auto merged vio/viosslfactories.c: Auto merged zlib/Makefile.am: Auto merged
3041 lines
85 KiB
C++
3041 lines
85 KiB
C++
/* Copyright (C) 1995-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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
/**********************************************************************
|
|
This file contains the implementation of prepared statements.
|
|
|
|
When one prepares a statement:
|
|
|
|
- Server gets the query from client with command 'COM_STMT_PREPARE';
|
|
in the following format:
|
|
[COM_STMT_PREPARE:1] [query]
|
|
- Parse the query and recognize any parameter markers '?' and
|
|
store its information list in lex->param_list
|
|
- Allocate a new statement for this prepare; and keep this in
|
|
'thd->stmt_map'.
|
|
- Without executing the query, return back to client the total
|
|
number of parameters along with result-set metadata information
|
|
(if any) in the following format:
|
|
[STMT_ID:4]
|
|
[Column_count:2]
|
|
[Param_count:2]
|
|
[Params meta info (stubs only for now)] (if Param_count > 0)
|
|
[Columns meta info] (if Column_count > 0)
|
|
|
|
When one executes a statement:
|
|
|
|
- Server gets the command 'COM_STMT_EXECUTE' to execute the
|
|
previously prepared query. If there are any parameter markers, then the
|
|
client will send the data in the following format:
|
|
[COM_STMT_EXECUTE:1]
|
|
[STMT_ID:4]
|
|
[NULL_BITS:(param_count+7)/8)]
|
|
[TYPES_SUPPLIED_BY_CLIENT(0/1):1]
|
|
[[length]data]
|
|
[[length]data] .. [[length]data].
|
|
(Note: Except for string/binary types; all other types will not be
|
|
supplied with length field)
|
|
- If it is a first execute or types of parameters were altered by client,
|
|
then setup the conversion routines.
|
|
- Assign parameter items from the supplied data.
|
|
- Execute the query without re-parsing and send back the results
|
|
to client
|
|
|
|
When one supplies long data for a placeholder:
|
|
|
|
- Server gets the long data in pieces with command type
|
|
'COM_STMT_SEND_LONG_DATA'.
|
|
- The packet recieved will have the format as:
|
|
[COM_STMT_SEND_LONG_DATA:1][STMT_ID:4][parameter_number:2][data]
|
|
- data from the packet is appended to the long data value buffer for this
|
|
placeholder.
|
|
- It's up to the client to stop supplying data chunks at any point. The
|
|
server doesn't care; also, the server doesn't notify the client whether
|
|
it got the data or not; if there is any error, then it will be returned
|
|
at statement execute.
|
|
|
|
***********************************************************************/
|
|
|
|
#include "mysql_priv.h"
|
|
#include "sql_select.h" // for JOIN
|
|
#include "sql_cursor.h"
|
|
#include "sp_head.h"
|
|
#include "sp.h"
|
|
#include "sp_cache.h"
|
|
#ifdef EMBEDDED_LIBRARY
|
|
/* include MYSQL_BIND headers */
|
|
#include <mysql.h>
|
|
#else
|
|
#include <mysql_com.h>
|
|
#endif
|
|
|
|
/* A result class used to send cursor rows using the binary protocol. */
|
|
|
|
class Select_fetch_protocol_prep: public select_send
|
|
{
|
|
Protocol_prep protocol;
|
|
public:
|
|
Select_fetch_protocol_prep(THD *thd);
|
|
virtual bool send_fields(List<Item> &list, uint flags);
|
|
virtual bool send_data(List<Item> &items);
|
|
virtual bool send_eof();
|
|
#ifdef EMBEDDED_LIBRARY
|
|
void begin_dataset()
|
|
{
|
|
protocol.begin_dataset();
|
|
}
|
|
#endif
|
|
};
|
|
|
|
/******************************************************************************
|
|
Prepared_statement: a statement that can contain placeholders
|
|
******************************************************************************/
|
|
|
|
class Prepared_statement: public Statement
|
|
{
|
|
public:
|
|
enum flag_values
|
|
{
|
|
IS_IN_USE= 1
|
|
};
|
|
|
|
THD *thd;
|
|
Select_fetch_protocol_prep result;
|
|
Protocol *protocol;
|
|
Item_param **param_array;
|
|
uint param_count;
|
|
uint last_errno;
|
|
uint flags;
|
|
char last_error[MYSQL_ERRMSG_SIZE];
|
|
#ifndef EMBEDDED_LIBRARY
|
|
bool (*set_params)(Prepared_statement *st, uchar *data, uchar *data_end,
|
|
uchar *read_pos, String *expanded_query);
|
|
#else
|
|
bool (*set_params_data)(Prepared_statement *st, String *expanded_query);
|
|
#endif
|
|
bool (*set_params_from_vars)(Prepared_statement *stmt,
|
|
List<LEX_STRING>& varnames,
|
|
String *expanded_query);
|
|
public:
|
|
Prepared_statement(THD *thd_arg, Protocol *protocol_arg);
|
|
virtual ~Prepared_statement();
|
|
void setup_set_params();
|
|
virtual Query_arena::Type type() const;
|
|
virtual void cleanup_stmt();
|
|
bool set_name(LEX_STRING *name);
|
|
inline void close_cursor() { delete cursor; cursor= 0; }
|
|
|
|
bool prepare(const char *packet, uint packet_length);
|
|
bool execute(String *expanded_query, bool open_cursor);
|
|
/* Destroy this statement */
|
|
bool deallocate();
|
|
};
|
|
|
|
|
|
/******************************************************************************
|
|
Implementation
|
|
******************************************************************************/
|
|
|
|
|
|
inline bool is_param_null(const uchar *pos, ulong param_no)
|
|
{
|
|
return pos[param_no/8] & (1 << (param_no & 7));
|
|
}
|
|
|
|
/*
|
|
Find a prepared statement in the statement map by id.
|
|
|
|
SYNOPSIS
|
|
find_prepared_statement()
|
|
thd thread handle
|
|
id statement id
|
|
where the place from which this function is called (for
|
|
error reporting).
|
|
|
|
DESCRIPTION
|
|
Try to find a prepared statement and set THD error if it's not found.
|
|
|
|
RETURN VALUE
|
|
0 if the statement was not found, a pointer otherwise.
|
|
*/
|
|
|
|
static Prepared_statement *
|
|
find_prepared_statement(THD *thd, ulong id, const char *where)
|
|
{
|
|
/*
|
|
To strictly separate namespaces of SQL prepared statements and C API
|
|
prepared statements find() will return 0 if there is a named prepared
|
|
statement with such id.
|
|
*/
|
|
Statement *stmt= thd->stmt_map.find(id);
|
|
|
|
if (stmt == 0 || stmt->type() != Query_arena::PREPARED_STATEMENT)
|
|
{
|
|
char llbuf[22];
|
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0), sizeof(llbuf), llstr(id, llbuf),
|
|
where);
|
|
return 0;
|
|
}
|
|
return (Prepared_statement *) stmt;
|
|
}
|
|
|
|
|
|
/*
|
|
Send prepared statement id and metadata to the client after prepare.
|
|
|
|
SYNOPSIS
|
|
send_prep_stmt()
|
|
|
|
RETURN VALUE
|
|
0 in case of success, 1 otherwise
|
|
*/
|
|
|
|
#ifndef EMBEDDED_LIBRARY
|
|
static bool send_prep_stmt(Prepared_statement *stmt, uint columns)
|
|
{
|
|
NET *net= &stmt->thd->net;
|
|
char buff[12];
|
|
uint tmp;
|
|
DBUG_ENTER("send_prep_stmt");
|
|
|
|
buff[0]= 0; /* OK packet indicator */
|
|
int4store(buff+1, stmt->id);
|
|
int2store(buff+5, columns);
|
|
int2store(buff+7, stmt->param_count);
|
|
buff[9]= 0; // Guard against a 4.1 client
|
|
tmp= min(stmt->thd->total_warn_count, 65535);
|
|
int2store(buff+10, tmp);
|
|
|
|
/*
|
|
Send types and names of placeholders to the client
|
|
XXX: fix this nasty upcast from List<Item_param> to List<Item>
|
|
*/
|
|
DBUG_RETURN(my_net_write(net, buff, sizeof(buff)) ||
|
|
(stmt->param_count &&
|
|
stmt->thd->protocol_simple.send_fields((List<Item> *)
|
|
&stmt->lex->param_list,
|
|
Protocol::SEND_EOF)));
|
|
}
|
|
#else
|
|
static bool send_prep_stmt(Prepared_statement *stmt,
|
|
uint columns __attribute__((unused)))
|
|
{
|
|
THD *thd= stmt->thd;
|
|
|
|
thd->client_stmt_id= stmt->id;
|
|
thd->client_param_count= stmt->param_count;
|
|
thd->clear_error();
|
|
|
|
return 0;
|
|
}
|
|
#endif /*!EMBEDDED_LIBRARY*/
|
|
|
|
|
|
/*
|
|
Read the length of the parameter data and return it back to
|
|
the caller.
|
|
|
|
SYNOPSIS
|
|
get_param_length()
|
|
packet a pointer to the data
|
|
len remaining packet length
|
|
|
|
DESCRIPTION
|
|
Read data length, position the packet to the first byte after it,
|
|
and return the length to the caller.
|
|
|
|
RETURN VALUE
|
|
Length of data piece.
|
|
*/
|
|
|
|
#ifndef EMBEDDED_LIBRARY
|
|
static ulong get_param_length(uchar **packet, ulong len)
|
|
{
|
|
reg1 uchar *pos= *packet;
|
|
if (len < 1)
|
|
return 0;
|
|
if (*pos < 251)
|
|
{
|
|
(*packet)++;
|
|
return (ulong) *pos;
|
|
}
|
|
if (len < 3)
|
|
return 0;
|
|
if (*pos == 252)
|
|
{
|
|
(*packet)+=3;
|
|
return (ulong) uint2korr(pos+1);
|
|
}
|
|
if (len < 4)
|
|
return 0;
|
|
if (*pos == 253)
|
|
{
|
|
(*packet)+=4;
|
|
return (ulong) uint3korr(pos+1);
|
|
}
|
|
if (len < 5)
|
|
return 0;
|
|
(*packet)+=9; // Must be 254 when here
|
|
/*
|
|
In our client-server protocol all numbers bigger than 2^24
|
|
stored as 8 bytes with uint8korr. Here we always know that
|
|
parameter length is less than 2^4 so don't look at the second
|
|
4 bytes. But still we need to obey the protocol hence 9 in the
|
|
assignment above.
|
|
*/
|
|
return (ulong) uint4korr(pos+1);
|
|
}
|
|
#else
|
|
#define get_param_length(packet, len) len
|
|
#endif /*!EMBEDDED_LIBRARY*/
|
|
|
|
/*
|
|
Data conversion routines.
|
|
|
|
SYNOPSIS
|
|
set_param_xx()
|
|
param parameter item
|
|
pos input data buffer
|
|
len length of data in the buffer
|
|
|
|
DESCRIPTION
|
|
All these functions read the data from pos, convert it to requested
|
|
type and assign to param; pos is advanced to predefined length.
|
|
|
|
Make a note that the NULL handling is examined at first execution
|
|
(i.e. when input types altered) and for all subsequent executions
|
|
we don't read any values for this.
|
|
|
|
RETURN VALUE
|
|
none
|
|
*/
|
|
|
|
static void set_param_tiny(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (len < 1)
|
|
return;
|
|
#endif
|
|
int8 value= (int8) **pos;
|
|
param->set_int(param->unsigned_flag ? (longlong) ((uint8) value) :
|
|
(longlong) value, 4);
|
|
*pos+= 1;
|
|
}
|
|
|
|
static void set_param_short(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
int16 value;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (len < 2)
|
|
return;
|
|
value= sint2korr(*pos);
|
|
#else
|
|
shortget(value, *pos);
|
|
#endif
|
|
param->set_int(param->unsigned_flag ? (longlong) ((uint16) value) :
|
|
(longlong) value, 6);
|
|
*pos+= 2;
|
|
}
|
|
|
|
static void set_param_int32(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
int32 value;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (len < 4)
|
|
return;
|
|
value= sint4korr(*pos);
|
|
#else
|
|
longget(value, *pos);
|
|
#endif
|
|
param->set_int(param->unsigned_flag ? (longlong) ((uint32) value) :
|
|
(longlong) value, 11);
|
|
*pos+= 4;
|
|
}
|
|
|
|
static void set_param_int64(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
longlong value;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (len < 8)
|
|
return;
|
|
value= (longlong) sint8korr(*pos);
|
|
#else
|
|
longlongget(value, *pos);
|
|
#endif
|
|
param->set_int(value, 21);
|
|
*pos+= 8;
|
|
}
|
|
|
|
static void set_param_float(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
float data;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (len < 4)
|
|
return;
|
|
float4get(data,*pos);
|
|
#else
|
|
floatget(data, *pos);
|
|
#endif
|
|
param->set_double((double) data);
|
|
*pos+= 4;
|
|
}
|
|
|
|
static void set_param_double(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
double data;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (len < 8)
|
|
return;
|
|
float8get(data,*pos);
|
|
#else
|
|
doubleget(data, *pos);
|
|
#endif
|
|
param->set_double((double) data);
|
|
*pos+= 8;
|
|
}
|
|
|
|
static void set_param_decimal(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
ulong length= get_param_length(pos, len);
|
|
param->set_decimal((char*)*pos, length);
|
|
*pos+= length;
|
|
}
|
|
|
|
#ifndef EMBEDDED_LIBRARY
|
|
|
|
/*
|
|
Read date/time/datetime parameter values from network (binary
|
|
protocol). See writing counterparts of these functions in
|
|
libmysql.c (store_param_{time,date,datetime}).
|
|
*/
|
|
|
|
static void set_param_time(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
MYSQL_TIME tm;
|
|
ulong length= get_param_length(pos, len);
|
|
|
|
if (length >= 8)
|
|
{
|
|
uchar *to= *pos;
|
|
uint day;
|
|
|
|
tm.neg= (bool) to[0];
|
|
day= (uint) sint4korr(to+1);
|
|
tm.hour= (uint) to[5] + day * 24;
|
|
tm.minute= (uint) to[6];
|
|
tm.second= (uint) to[7];
|
|
tm.second_part= (length > 8) ? (ulong) sint4korr(to+8) : 0;
|
|
if (tm.hour > 838)
|
|
{
|
|
/* TODO: add warning 'Data truncated' here */
|
|
tm.hour= 838;
|
|
tm.minute= 59;
|
|
tm.second= 59;
|
|
}
|
|
tm.day= tm.year= tm.month= 0;
|
|
}
|
|
else
|
|
set_zero_time(&tm, MYSQL_TIMESTAMP_TIME);
|
|
param->set_time(&tm, MYSQL_TIMESTAMP_TIME,
|
|
MAX_TIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN);
|
|
*pos+= length;
|
|
}
|
|
|
|
static void set_param_datetime(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
MYSQL_TIME tm;
|
|
ulong length= get_param_length(pos, len);
|
|
|
|
if (length >= 4)
|
|
{
|
|
uchar *to= *pos;
|
|
|
|
tm.neg= 0;
|
|
tm.year= (uint) sint2korr(to);
|
|
tm.month= (uint) to[2];
|
|
tm.day= (uint) to[3];
|
|
if (length > 4)
|
|
{
|
|
tm.hour= (uint) to[4];
|
|
tm.minute= (uint) to[5];
|
|
tm.second= (uint) to[6];
|
|
}
|
|
else
|
|
tm.hour= tm.minute= tm.second= 0;
|
|
|
|
tm.second_part= (length > 7) ? (ulong) sint4korr(to+7) : 0;
|
|
}
|
|
else
|
|
set_zero_time(&tm, MYSQL_TIMESTAMP_DATETIME);
|
|
param->set_time(&tm, MYSQL_TIMESTAMP_DATETIME,
|
|
MAX_DATETIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN);
|
|
*pos+= length;
|
|
}
|
|
|
|
|
|
static void set_param_date(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
MYSQL_TIME tm;
|
|
ulong length= get_param_length(pos, len);
|
|
|
|
if (length >= 4)
|
|
{
|
|
uchar *to= *pos;
|
|
|
|
tm.year= (uint) sint2korr(to);
|
|
tm.month= (uint) to[2];
|
|
tm.day= (uint) to[3];
|
|
|
|
tm.hour= tm.minute= tm.second= 0;
|
|
tm.second_part= 0;
|
|
tm.neg= 0;
|
|
}
|
|
else
|
|
set_zero_time(&tm, MYSQL_TIMESTAMP_DATE);
|
|
param->set_time(&tm, MYSQL_TIMESTAMP_DATE,
|
|
MAX_DATE_WIDTH * MY_CHARSET_BIN_MB_MAXLEN);
|
|
*pos+= length;
|
|
}
|
|
|
|
#else/*!EMBEDDED_LIBRARY*/
|
|
void set_param_time(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
MYSQL_TIME tm= *((MYSQL_TIME*)*pos);
|
|
tm.hour+= tm.day * 24;
|
|
tm.day= tm.year= tm.month= 0;
|
|
if (tm.hour > 838)
|
|
{
|
|
/* TODO: add warning 'Data truncated' here */
|
|
tm.hour= 838;
|
|
tm.minute= 59;
|
|
tm.second= 59;
|
|
}
|
|
param->set_time(&tm, MYSQL_TIMESTAMP_TIME,
|
|
MAX_TIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN);
|
|
|
|
}
|
|
|
|
void set_param_datetime(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
MYSQL_TIME tm= *((MYSQL_TIME*)*pos);
|
|
tm.neg= 0;
|
|
|
|
param->set_time(&tm, MYSQL_TIMESTAMP_DATETIME,
|
|
MAX_DATETIME_WIDTH * MY_CHARSET_BIN_MB_MAXLEN);
|
|
}
|
|
|
|
void set_param_date(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
MYSQL_TIME *to= (MYSQL_TIME*)*pos;
|
|
|
|
param->set_time(to, MYSQL_TIMESTAMP_DATE,
|
|
MAX_DATE_WIDTH * MY_CHARSET_BIN_MB_MAXLEN);
|
|
}
|
|
#endif /*!EMBEDDED_LIBRARY*/
|
|
|
|
|
|
static void set_param_str(Item_param *param, uchar **pos, ulong len)
|
|
{
|
|
ulong length= get_param_length(pos, len);
|
|
param->set_str((const char *)*pos, length);
|
|
*pos+= length;
|
|
}
|
|
|
|
|
|
#undef get_param_length
|
|
|
|
static void setup_one_conversion_function(THD *thd, Item_param *param,
|
|
uchar param_type)
|
|
{
|
|
switch (param_type) {
|
|
case MYSQL_TYPE_TINY:
|
|
param->set_param_func= set_param_tiny;
|
|
param->item_type= Item::INT_ITEM;
|
|
param->item_result_type= INT_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_SHORT:
|
|
param->set_param_func= set_param_short;
|
|
param->item_type= Item::INT_ITEM;
|
|
param->item_result_type= INT_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_LONG:
|
|
param->set_param_func= set_param_int32;
|
|
param->item_type= Item::INT_ITEM;
|
|
param->item_result_type= INT_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_LONGLONG:
|
|
param->set_param_func= set_param_int64;
|
|
param->item_type= Item::INT_ITEM;
|
|
param->item_result_type= INT_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_FLOAT:
|
|
param->set_param_func= set_param_float;
|
|
param->item_type= Item::REAL_ITEM;
|
|
param->item_result_type= REAL_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_DOUBLE:
|
|
param->set_param_func= set_param_double;
|
|
param->item_type= Item::REAL_ITEM;
|
|
param->item_result_type= REAL_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_DECIMAL:
|
|
case MYSQL_TYPE_NEWDECIMAL:
|
|
param->set_param_func= set_param_decimal;
|
|
param->item_type= Item::DECIMAL_ITEM;
|
|
param->item_result_type= DECIMAL_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_TIME:
|
|
param->set_param_func= set_param_time;
|
|
param->item_type= Item::STRING_ITEM;
|
|
param->item_result_type= STRING_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_DATE:
|
|
param->set_param_func= set_param_date;
|
|
param->item_type= Item::STRING_ITEM;
|
|
param->item_result_type= STRING_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_DATETIME:
|
|
case MYSQL_TYPE_TIMESTAMP:
|
|
param->set_param_func= set_param_datetime;
|
|
param->item_type= Item::STRING_ITEM;
|
|
param->item_result_type= STRING_RESULT;
|
|
break;
|
|
case MYSQL_TYPE_TINY_BLOB:
|
|
case MYSQL_TYPE_MEDIUM_BLOB:
|
|
case MYSQL_TYPE_LONG_BLOB:
|
|
case MYSQL_TYPE_BLOB:
|
|
param->set_param_func= set_param_str;
|
|
param->value.cs_info.character_set_of_placeholder= &my_charset_bin;
|
|
param->value.cs_info.character_set_client=
|
|
thd->variables.character_set_client;
|
|
DBUG_ASSERT(thd->variables.character_set_client);
|
|
param->value.cs_info.final_character_set_of_str_value= &my_charset_bin;
|
|
param->item_type= Item::STRING_ITEM;
|
|
param->item_result_type= STRING_RESULT;
|
|
break;
|
|
default:
|
|
/*
|
|
The client library ensures that we won't get any other typecodes
|
|
except typecodes above and typecodes for string types. Marking
|
|
label as 'default' lets us to handle malformed packets as well.
|
|
*/
|
|
{
|
|
CHARSET_INFO *fromcs= thd->variables.character_set_client;
|
|
CHARSET_INFO *tocs= thd->variables.collation_connection;
|
|
uint32 dummy_offset;
|
|
|
|
param->value.cs_info.character_set_of_placeholder= fromcs;
|
|
param->value.cs_info.character_set_client= fromcs;
|
|
|
|
/*
|
|
Setup source and destination character sets so that they
|
|
are different only if conversion is necessary: this will
|
|
make later checks easier.
|
|
*/
|
|
param->value.cs_info.final_character_set_of_str_value=
|
|
String::needs_conversion(0, fromcs, tocs, &dummy_offset) ?
|
|
tocs : fromcs;
|
|
param->set_param_func= set_param_str;
|
|
/*
|
|
Exact value of max_length is not known unless data is converted to
|
|
charset of connection, so we have to set it later.
|
|
*/
|
|
param->item_type= Item::STRING_ITEM;
|
|
param->item_result_type= STRING_RESULT;
|
|
}
|
|
}
|
|
param->param_type= (enum enum_field_types) param_type;
|
|
}
|
|
|
|
#ifndef EMBEDDED_LIBRARY
|
|
/*
|
|
Routines to assign parameters from data supplied by the client.
|
|
|
|
DESCRIPTION
|
|
Update the parameter markers by reading data from the packet and
|
|
and generate a valid query for logging.
|
|
|
|
NOTES
|
|
This function, along with other _withlog functions is called when one of
|
|
binary, slow or general logs is open. Logging of prepared statements in
|
|
all cases is performed by means of conventional queries: if parameter
|
|
data was supplied from C API, each placeholder in the query is
|
|
replaced with its actual value; if we're logging a [Dynamic] SQL
|
|
prepared statement, parameter markers are replaced with variable names.
|
|
Example:
|
|
mysql_stmt_prepare("UPDATE t1 SET a=a*1.25 WHERE a=?")
|
|
--> general logs gets [Prepare] UPDATE t1 SET a*1.25 WHERE a=?"
|
|
mysql_stmt_execute(stmt);
|
|
--> general and binary logs get
|
|
[Execute] UPDATE t1 SET a*1.25 WHERE a=1"
|
|
If a statement has been prepared using SQL syntax:
|
|
PREPARE stmt FROM "UPDATE t1 SET a=a*1.25 WHERE a=?"
|
|
--> general log gets
|
|
[Query] PREPARE stmt FROM "UPDATE ..."
|
|
EXECUTE stmt USING @a
|
|
--> general log gets
|
|
[Query] EXECUTE stmt USING @a;
|
|
|
|
RETURN VALUE
|
|
0 if success, 1 otherwise
|
|
*/
|
|
|
|
static bool insert_params_withlog(Prepared_statement *stmt, uchar *null_array,
|
|
uchar *read_pos, uchar *data_end,
|
|
String *query)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
Item_param **begin= stmt->param_array;
|
|
Item_param **end= begin + stmt->param_count;
|
|
uint32 length= 0;
|
|
String str;
|
|
const String *res;
|
|
DBUG_ENTER("insert_params_withlog");
|
|
|
|
if (query->copy(stmt->query, stmt->query_length, default_charset_info))
|
|
DBUG_RETURN(1);
|
|
|
|
for (Item_param **it= begin; it < end; ++it)
|
|
{
|
|
Item_param *param= *it;
|
|
if (param->state != Item_param::LONG_DATA_VALUE)
|
|
{
|
|
if (is_param_null(null_array, it - begin))
|
|
param->set_null();
|
|
else
|
|
{
|
|
if (read_pos >= data_end)
|
|
DBUG_RETURN(1);
|
|
param->set_param_func(param, &read_pos, data_end - read_pos);
|
|
}
|
|
}
|
|
res= param->query_val_str(&str);
|
|
if (param->convert_str_value(thd))
|
|
DBUG_RETURN(1); /* out of memory */
|
|
|
|
if (query->replace(param->pos_in_query+length, 1, *res))
|
|
DBUG_RETURN(1);
|
|
|
|
length+= res->length()-1;
|
|
}
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
|
|
static bool insert_params(Prepared_statement *stmt, uchar *null_array,
|
|
uchar *read_pos, uchar *data_end,
|
|
String *expanded_query)
|
|
{
|
|
Item_param **begin= stmt->param_array;
|
|
Item_param **end= begin + stmt->param_count;
|
|
|
|
DBUG_ENTER("insert_params");
|
|
|
|
for (Item_param **it= begin; it < end; ++it)
|
|
{
|
|
Item_param *param= *it;
|
|
if (param->state != Item_param::LONG_DATA_VALUE)
|
|
{
|
|
if (is_param_null(null_array, it - begin))
|
|
param->set_null();
|
|
else
|
|
{
|
|
if (read_pos >= data_end)
|
|
DBUG_RETURN(1);
|
|
param->set_param_func(param, &read_pos, data_end - read_pos);
|
|
}
|
|
}
|
|
if (param->convert_str_value(stmt->thd))
|
|
DBUG_RETURN(1); /* out of memory */
|
|
}
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
|
|
static bool setup_conversion_functions(Prepared_statement *stmt,
|
|
uchar **data, uchar *data_end)
|
|
{
|
|
/* skip null bits */
|
|
uchar *read_pos= *data + (stmt->param_count+7) / 8;
|
|
|
|
DBUG_ENTER("setup_conversion_functions");
|
|
|
|
if (*read_pos++) //types supplied / first execute
|
|
{
|
|
/*
|
|
First execute or types altered by the client, setup the
|
|
conversion routines for all parameters (one time)
|
|
*/
|
|
Item_param **it= stmt->param_array;
|
|
Item_param **end= it + stmt->param_count;
|
|
THD *thd= stmt->thd;
|
|
for (; it < end; ++it)
|
|
{
|
|
ushort typecode;
|
|
const uint signed_bit= 1 << 15;
|
|
|
|
if (read_pos >= data_end)
|
|
DBUG_RETURN(1);
|
|
|
|
typecode= sint2korr(read_pos);
|
|
read_pos+= 2;
|
|
(**it).unsigned_flag= test(typecode & signed_bit);
|
|
setup_one_conversion_function(thd, *it, (uchar) (typecode & ~signed_bit));
|
|
}
|
|
}
|
|
*data= read_pos;
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
#else
|
|
|
|
/*
|
|
Embedded counterparts of parameter assignment routines.
|
|
|
|
DESCRIPTION
|
|
The main difference between the embedded library and the server is
|
|
that in embedded case we don't serialize/deserialize parameters data.
|
|
Additionally, for unknown reason, the client-side flag raised for
|
|
changed types of placeholders is ignored and we simply setup conversion
|
|
functions at each execute (TODO: fix).
|
|
*/
|
|
|
|
static bool emb_insert_params(Prepared_statement *stmt, String *expanded_query)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
Item_param **it= stmt->param_array;
|
|
Item_param **end= it + stmt->param_count;
|
|
MYSQL_BIND *client_param= stmt->thd->client_params;
|
|
|
|
DBUG_ENTER("emb_insert_params");
|
|
|
|
for (; it < end; ++it, ++client_param)
|
|
{
|
|
Item_param *param= *it;
|
|
setup_one_conversion_function(thd, param, client_param->buffer_type);
|
|
if (param->state != Item_param::LONG_DATA_VALUE)
|
|
{
|
|
if (*client_param->is_null)
|
|
param->set_null();
|
|
else
|
|
{
|
|
uchar *buff= (uchar*) client_param->buffer;
|
|
param->unsigned_flag= client_param->is_unsigned;
|
|
param->set_param_func(param, &buff,
|
|
client_param->length ?
|
|
*client_param->length :
|
|
client_param->buffer_length);
|
|
}
|
|
}
|
|
if (param->convert_str_value(thd))
|
|
DBUG_RETURN(1); /* out of memory */
|
|
}
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
|
|
static bool emb_insert_params_withlog(Prepared_statement *stmt, String *query)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
Item_param **it= stmt->param_array;
|
|
Item_param **end= it + stmt->param_count;
|
|
MYSQL_BIND *client_param= thd->client_params;
|
|
|
|
String str;
|
|
const String *res;
|
|
uint32 length= 0;
|
|
|
|
DBUG_ENTER("emb_insert_params_withlog");
|
|
|
|
if (query->copy(stmt->query, stmt->query_length, default_charset_info))
|
|
DBUG_RETURN(1);
|
|
|
|
for (; it < end; ++it, ++client_param)
|
|
{
|
|
Item_param *param= *it;
|
|
setup_one_conversion_function(thd, param, client_param->buffer_type);
|
|
if (param->state != Item_param::LONG_DATA_VALUE)
|
|
{
|
|
if (*client_param->is_null)
|
|
param->set_null();
|
|
else
|
|
{
|
|
uchar *buff= (uchar*)client_param->buffer;
|
|
param->unsigned_flag= client_param->is_unsigned;
|
|
param->set_param_func(param, &buff,
|
|
client_param->length ?
|
|
*client_param->length :
|
|
client_param->buffer_length);
|
|
}
|
|
}
|
|
res= param->query_val_str(&str);
|
|
if (param->convert_str_value(thd))
|
|
DBUG_RETURN(1); /* out of memory */
|
|
|
|
if (query->replace(param->pos_in_query+length, 1, *res))
|
|
DBUG_RETURN(1);
|
|
|
|
length+= res->length()-1;
|
|
}
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
#endif /*!EMBEDDED_LIBRARY*/
|
|
|
|
|
|
/*
|
|
Assign prepared statement parameters from user variables.
|
|
|
|
SYNOPSIS
|
|
insert_params_from_vars()
|
|
stmt Statement
|
|
varnames List of variables. Caller must ensure that number of variables
|
|
in the list is equal to number of statement parameters
|
|
query Ignored
|
|
*/
|
|
|
|
static bool insert_params_from_vars(Prepared_statement *stmt,
|
|
List<LEX_STRING>& varnames,
|
|
String *query __attribute__((unused)))
|
|
{
|
|
Item_param **begin= stmt->param_array;
|
|
Item_param **end= begin + stmt->param_count;
|
|
user_var_entry *entry;
|
|
LEX_STRING *varname;
|
|
List_iterator<LEX_STRING> var_it(varnames);
|
|
DBUG_ENTER("insert_params_from_vars");
|
|
|
|
for (Item_param **it= begin; it < end; ++it)
|
|
{
|
|
Item_param *param= *it;
|
|
varname= var_it++;
|
|
entry= (user_var_entry*)hash_search(&stmt->thd->user_vars,
|
|
(byte*) varname->str,
|
|
varname->length);
|
|
if (param->set_from_user_var(stmt->thd, entry) ||
|
|
param->convert_str_value(stmt->thd))
|
|
DBUG_RETURN(1);
|
|
}
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
|
|
/*
|
|
Do the same as insert_params_from_vars but also construct query text for
|
|
binary log.
|
|
|
|
SYNOPSIS
|
|
insert_params_from_vars()
|
|
stmt Prepared statement
|
|
varnames List of variables. Caller must ensure that number of variables
|
|
in the list is equal to number of statement parameters
|
|
query The query with parameter markers replaced with corresponding
|
|
user variables that were used to execute the query.
|
|
*/
|
|
|
|
static bool insert_params_from_vars_with_log(Prepared_statement *stmt,
|
|
List<LEX_STRING>& varnames,
|
|
String *query)
|
|
{
|
|
Item_param **begin= stmt->param_array;
|
|
Item_param **end= begin + stmt->param_count;
|
|
user_var_entry *entry;
|
|
LEX_STRING *varname;
|
|
List_iterator<LEX_STRING> var_it(varnames);
|
|
String buf;
|
|
const String *val;
|
|
uint32 length= 0;
|
|
|
|
DBUG_ENTER("insert_params_from_vars");
|
|
|
|
if (query->copy(stmt->query, stmt->query_length, default_charset_info))
|
|
DBUG_RETURN(1);
|
|
|
|
for (Item_param **it= begin; it < end; ++it)
|
|
{
|
|
Item_param *param= *it;
|
|
varname= var_it++;
|
|
if (get_var_with_binlog(stmt->thd, stmt->lex->sql_command,
|
|
*varname, &entry))
|
|
DBUG_RETURN(1);
|
|
|
|
if (param->set_from_user_var(stmt->thd, entry))
|
|
DBUG_RETURN(1);
|
|
/* Insert @'escaped-varname' instead of parameter in the query */
|
|
if (entry)
|
|
{
|
|
char *begin, *ptr;
|
|
buf.length(0);
|
|
if (buf.reserve(entry->name.length*2+3))
|
|
DBUG_RETURN(1);
|
|
|
|
begin= ptr= buf.c_ptr_quick();
|
|
*ptr++= '@';
|
|
*ptr++= '\'';
|
|
ptr+= escape_string_for_mysql(&my_charset_utf8_general_ci,
|
|
ptr, 0, entry->name.str,
|
|
entry->name.length);
|
|
*ptr++= '\'';
|
|
buf.length(ptr - begin);
|
|
val= &buf;
|
|
}
|
|
else
|
|
val= &my_null_string;
|
|
|
|
if (param->convert_str_value(stmt->thd))
|
|
DBUG_RETURN(1); /* out of memory */
|
|
|
|
if (query->replace(param->pos_in_query+length, 1, *val))
|
|
DBUG_RETURN(1);
|
|
length+= val->length()-1;
|
|
}
|
|
DBUG_RETURN(0);
|
|
}
|
|
|
|
/*
|
|
Validate INSERT statement.
|
|
|
|
SYNOPSIS
|
|
mysql_test_insert()
|
|
stmt prepared statement
|
|
tables global/local table list
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool mysql_test_insert(Prepared_statement *stmt,
|
|
TABLE_LIST *table_list,
|
|
List<Item> &fields,
|
|
List<List_item> &values_list,
|
|
List<Item> &update_fields,
|
|
List<Item> &update_values,
|
|
enum_duplicates duplic)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
LEX *lex= stmt->lex;
|
|
List_iterator_fast<List_item> its(values_list);
|
|
List_item *values;
|
|
DBUG_ENTER("mysql_test_insert");
|
|
|
|
if (insert_precheck(thd, table_list))
|
|
goto error;
|
|
|
|
/*
|
|
open temporary memory pool for temporary data allocated by derived
|
|
tables & preparation procedure
|
|
Note that this is done without locks (should not be needed as we will not
|
|
access any data here)
|
|
If we would use locks, then we have to ensure we are not using
|
|
TL_WRITE_DELAYED as having two such locks can cause table corruption.
|
|
*/
|
|
if (open_normal_and_derived_tables(thd, table_list, 0))
|
|
goto error;
|
|
|
|
if ((values= its++))
|
|
{
|
|
uint value_count;
|
|
ulong counter= 0;
|
|
Item *unused_conds= 0;
|
|
|
|
if (table_list->table)
|
|
{
|
|
// don't allocate insert_values
|
|
table_list->table->insert_values=(byte *)1;
|
|
}
|
|
|
|
if (mysql_prepare_insert(thd, table_list, table_list->table,
|
|
fields, values, update_fields, update_values,
|
|
duplic, &unused_conds, FALSE))
|
|
goto error;
|
|
|
|
value_count= values->elements;
|
|
its.rewind();
|
|
|
|
if (table_list->lock_type == TL_WRITE_DELAYED &&
|
|
!(table_list->table->file->ha_table_flags() & HA_CAN_INSERT_DELAYED))
|
|
{
|
|
my_error(ER_ILLEGAL_HA, MYF(0), (table_list->view ?
|
|
table_list->view_name.str :
|
|
table_list->table_name));
|
|
goto error;
|
|
}
|
|
while ((values= its++))
|
|
{
|
|
counter++;
|
|
if (values->elements != value_count)
|
|
{
|
|
my_error(ER_WRONG_VALUE_COUNT_ON_ROW, MYF(0), counter);
|
|
goto error;
|
|
}
|
|
if (setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, 0))
|
|
goto error;
|
|
}
|
|
}
|
|
DBUG_RETURN(FALSE);
|
|
|
|
error:
|
|
/* insert_values is cleared in open_table */
|
|
DBUG_RETURN(TRUE);
|
|
}
|
|
|
|
|
|
/*
|
|
Validate UPDATE statement
|
|
|
|
SYNOPSIS
|
|
mysql_test_update()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
|
|
RETURN VALUE
|
|
0 success
|
|
1 error, error message is set in THD
|
|
2 convert to multi_update
|
|
*/
|
|
|
|
static int mysql_test_update(Prepared_statement *stmt,
|
|
TABLE_LIST *table_list)
|
|
{
|
|
int res;
|
|
THD *thd= stmt->thd;
|
|
uint table_count= 0;
|
|
SELECT_LEX *select= &stmt->lex->select_lex;
|
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
|
uint want_privilege;
|
|
#endif
|
|
bool need_reopen;
|
|
DBUG_ENTER("mysql_test_update");
|
|
|
|
if (update_precheck(thd, table_list))
|
|
goto error;
|
|
|
|
for ( ; ; )
|
|
{
|
|
if (open_tables(thd, &table_list, &table_count, 0))
|
|
goto error;
|
|
|
|
if (table_list->multitable_view)
|
|
{
|
|
DBUG_ASSERT(table_list->view != 0);
|
|
DBUG_PRINT("info", ("Switch to multi-update"));
|
|
/* pass counter value */
|
|
thd->lex->table_count= table_count;
|
|
/* convert to multiupdate */
|
|
DBUG_RETURN(2);
|
|
}
|
|
|
|
if (!lock_tables(thd, table_list, table_count, &need_reopen))
|
|
break;
|
|
if (!need_reopen)
|
|
goto error;
|
|
close_tables_for_reopen(thd, &table_list);
|
|
}
|
|
|
|
/*
|
|
thd->fill_derived_tables() is false here for sure (because it is
|
|
preparation of PS, so we even do not check it).
|
|
*/
|
|
if (mysql_handle_derived(thd->lex, &mysql_derived_prepare))
|
|
goto error;
|
|
|
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
|
/* TABLE_LIST contain right privilages request */
|
|
want_privilege= table_list->grant.want_privilege;
|
|
#endif
|
|
|
|
if (mysql_prepare_update(thd, table_list, &select->where,
|
|
select->order_list.elements,
|
|
(ORDER *) select->order_list.first))
|
|
goto error;
|
|
|
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
|
table_list->grant.want_privilege= want_privilege;
|
|
table_list->table->grant.want_privilege= want_privilege;
|
|
table_list->register_want_access(want_privilege);
|
|
#endif
|
|
thd->lex->select_lex.no_wrap_view_item= TRUE;
|
|
res= setup_fields(thd, 0, select->item_list, MARK_COLUMNS_READ, 0, 0);
|
|
thd->lex->select_lex.no_wrap_view_item= FALSE;
|
|
if (res)
|
|
goto error;
|
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
|
/* Check values */
|
|
table_list->grant.want_privilege=
|
|
table_list->table->grant.want_privilege=
|
|
(SELECT_ACL & ~table_list->table->grant.privilege);
|
|
table_list->register_want_access(SELECT_ACL);
|
|
#endif
|
|
if (setup_fields(thd, 0, stmt->lex->value_list, MARK_COLUMNS_NONE, 0, 0))
|
|
goto error;
|
|
/* TODO: here we should send types of placeholders to the client. */
|
|
DBUG_RETURN(0);
|
|
error:
|
|
DBUG_RETURN(1);
|
|
}
|
|
|
|
|
|
/*
|
|
Validate DELETE statement.
|
|
|
|
SYNOPSIS
|
|
mysql_test_delete()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool mysql_test_delete(Prepared_statement *stmt,
|
|
TABLE_LIST *table_list)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
LEX *lex= stmt->lex;
|
|
DBUG_ENTER("mysql_test_delete");
|
|
|
|
if (delete_precheck(thd, table_list) ||
|
|
open_and_lock_tables(thd, table_list))
|
|
goto error;
|
|
|
|
if (!table_list->table)
|
|
{
|
|
my_error(ER_VIEW_DELETE_MERGE_VIEW, MYF(0),
|
|
table_list->view_db.str, table_list->view_name.str);
|
|
goto error;
|
|
}
|
|
|
|
DBUG_RETURN(mysql_prepare_delete(thd, table_list, &lex->select_lex.where));
|
|
error:
|
|
DBUG_RETURN(TRUE);
|
|
}
|
|
|
|
|
|
/*
|
|
Validate SELECT statement.
|
|
|
|
SYNOPSIS
|
|
mysql_test_select()
|
|
stmt prepared statement
|
|
tables list of tables used in the query
|
|
|
|
DESCRIPTION
|
|
In case of success, if this query is not EXPLAIN, send column list info
|
|
back to the client.
|
|
|
|
RETURN VALUE
|
|
0 success
|
|
1 error, error message is set in THD
|
|
2 success, and statement metadata has been sent
|
|
*/
|
|
|
|
static int mysql_test_select(Prepared_statement *stmt,
|
|
TABLE_LIST *tables, bool text_protocol)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
LEX *lex= stmt->lex;
|
|
SELECT_LEX_UNIT *unit= &lex->unit;
|
|
DBUG_ENTER("mysql_test_select");
|
|
|
|
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)
|
|
{
|
|
if (check_table_access(thd, privilege, tables,0))
|
|
goto error;
|
|
}
|
|
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))
|
|
{
|
|
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(select_send));
|
|
goto error;
|
|
}
|
|
|
|
if (open_and_lock_tables(thd, tables))
|
|
goto error;
|
|
|
|
thd->used_tables= 0; // Updated by setup_fields
|
|
|
|
/*
|
|
JOIN::prepare calls
|
|
It is not SELECT COMMAND for sure, so setup_tables will be called as
|
|
usual, and we pass 0 as setup_tables_done_option
|
|
*/
|
|
if (unit->prepare(thd, 0, 0))
|
|
goto error;
|
|
if (!lex->describe && !text_protocol)
|
|
{
|
|
/* Make copy of item list, as change_columns may change it */
|
|
List<Item> fields(lex->select_lex.item_list);
|
|
|
|
/* Change columns if a procedure like analyse() */
|
|
if (unit->last_procedure && unit->last_procedure->change_columns(fields))
|
|
goto error;
|
|
|
|
/*
|
|
We can use lex->result as it should've been prepared in
|
|
unit->prepare call above.
|
|
*/
|
|
if (send_prep_stmt(stmt, lex->result->field_count(fields)) ||
|
|
lex->result->send_fields(fields, Protocol::SEND_EOF) ||
|
|
thd->protocol->flush())
|
|
goto error;
|
|
DBUG_RETURN(2);
|
|
}
|
|
DBUG_RETURN(0);
|
|
error:
|
|
DBUG_RETURN(1);
|
|
}
|
|
|
|
|
|
/*
|
|
Validate and prepare for execution DO statement expressions.
|
|
|
|
SYNOPSIS
|
|
mysql_test_do_fields()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
values list of expressions
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool mysql_test_do_fields(Prepared_statement *stmt,
|
|
TABLE_LIST *tables,
|
|
List<Item> *values)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
|
|
DBUG_ENTER("mysql_test_do_fields");
|
|
if (tables && check_table_access(thd, SELECT_ACL, tables, 0))
|
|
DBUG_RETURN(TRUE);
|
|
|
|
if (open_and_lock_tables(thd, tables))
|
|
DBUG_RETURN(TRUE);
|
|
DBUG_RETURN(setup_fields(thd, 0, *values, MARK_COLUMNS_NONE, 0, 0));
|
|
}
|
|
|
|
|
|
/*
|
|
Validate and prepare for execution SET statement expressions
|
|
|
|
SYNOPSIS
|
|
mysql_test_set_fields()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
values list of expressions
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool mysql_test_set_fields(Prepared_statement *stmt,
|
|
TABLE_LIST *tables,
|
|
List<set_var_base> *var_list)
|
|
{
|
|
DBUG_ENTER("mysql_test_set_fields");
|
|
List_iterator_fast<set_var_base> it(*var_list);
|
|
THD *thd= stmt->thd;
|
|
set_var_base *var;
|
|
|
|
if (tables && check_table_access(thd, SELECT_ACL, tables, 0) ||
|
|
open_and_lock_tables(thd, tables))
|
|
goto error;
|
|
|
|
while ((var= it++))
|
|
{
|
|
if (var->light_check(thd))
|
|
goto error;
|
|
}
|
|
DBUG_RETURN(FALSE);
|
|
error:
|
|
DBUG_RETURN(TRUE);
|
|
}
|
|
|
|
|
|
/*
|
|
Check internal SELECT of the prepared command
|
|
|
|
SYNOPSIS
|
|
select_like_stmt_test()
|
|
stmt prepared statement
|
|
specific_prepare function of command specific prepare
|
|
setup_tables_done_option options to be passed to LEX::unit.prepare()
|
|
|
|
NOTE
|
|
This function won't directly open tables used in select. They should
|
|
be opened either by calling function (and in this case you probably
|
|
should use select_like_stmt_test_with_open_n_lock()) or by
|
|
"specific_prepare" call (like this happens in case of multi-update).
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool select_like_stmt_test(Prepared_statement *stmt,
|
|
bool (*specific_prepare)(THD *thd),
|
|
ulong setup_tables_done_option)
|
|
{
|
|
DBUG_ENTER("select_like_stmt_test");
|
|
THD *thd= stmt->thd;
|
|
LEX *lex= stmt->lex;
|
|
|
|
lex->select_lex.context.resolve_in_select_list= TRUE;
|
|
|
|
if (specific_prepare && (*specific_prepare)(thd))
|
|
DBUG_RETURN(TRUE);
|
|
|
|
thd->used_tables= 0; // Updated by setup_fields
|
|
|
|
/* Calls JOIN::prepare */
|
|
DBUG_RETURN(lex->unit.prepare(thd, 0, setup_tables_done_option));
|
|
}
|
|
|
|
/*
|
|
Check internal SELECT of the prepared command (with opening and
|
|
locking of used tables).
|
|
|
|
SYNOPSIS
|
|
select_like_stmt_test_with_open_n_lock()
|
|
stmt prepared statement
|
|
tables list of tables to be opened and locked
|
|
before calling specific_prepare function
|
|
specific_prepare function of command specific prepare
|
|
setup_tables_done_option options to be passed to LEX::unit.prepare()
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error
|
|
*/
|
|
|
|
static bool
|
|
select_like_stmt_test_with_open_n_lock(Prepared_statement *stmt,
|
|
TABLE_LIST *tables,
|
|
bool (*specific_prepare)(THD *thd),
|
|
ulong setup_tables_done_option)
|
|
{
|
|
DBUG_ENTER("select_like_stmt_test_with_open_n_lock");
|
|
|
|
/*
|
|
We should not call LEX::unit.cleanup() after this open_and_lock_tables()
|
|
call because we don't allow prepared EXPLAIN yet so derived tables will
|
|
clean up after themself.
|
|
*/
|
|
if (open_and_lock_tables(stmt->thd, tables))
|
|
DBUG_RETURN(TRUE);
|
|
|
|
DBUG_RETURN(select_like_stmt_test(stmt, specific_prepare,
|
|
setup_tables_done_option));
|
|
}
|
|
|
|
|
|
/*
|
|
Validate and prepare for execution CREATE TABLE statement
|
|
|
|
SYNOPSIS
|
|
mysql_test_create_table()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool mysql_test_create_table(Prepared_statement *stmt)
|
|
{
|
|
DBUG_ENTER("mysql_test_create_table");
|
|
THD *thd= stmt->thd;
|
|
LEX *lex= stmt->lex;
|
|
SELECT_LEX *select_lex= &lex->select_lex;
|
|
bool res= FALSE;
|
|
/* Skip first table, which is the table we are creating */
|
|
bool link_to_local;
|
|
TABLE_LIST *create_table= lex->unlink_first_table(&link_to_local);
|
|
TABLE_LIST *tables= lex->query_tables;
|
|
|
|
if (create_table_precheck(thd, tables, create_table))
|
|
DBUG_RETURN(TRUE);
|
|
|
|
if (select_lex->item_list.elements)
|
|
{
|
|
select_lex->context.resolve_in_select_list= TRUE;
|
|
res= select_like_stmt_test_with_open_n_lock(stmt, tables, 0, 0);
|
|
}
|
|
|
|
/* put tables back for PS rexecuting */
|
|
lex->link_first_table_back(create_table, link_to_local);
|
|
DBUG_RETURN(res);
|
|
}
|
|
|
|
|
|
/*
|
|
Validate and prepare for execution a multi update statement.
|
|
|
|
SYNOPSIS
|
|
mysql_test_multiupdate()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
converted converted to multi-update from usual update
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool mysql_test_multiupdate(Prepared_statement *stmt,
|
|
TABLE_LIST *tables,
|
|
bool converted)
|
|
{
|
|
/* if we switched from normal update, rights are checked */
|
|
if (!converted && multi_update_precheck(stmt->thd, tables))
|
|
return TRUE;
|
|
|
|
return select_like_stmt_test(stmt, &mysql_multi_update_prepare,
|
|
OPTION_SETUP_TABLES_DONE);
|
|
}
|
|
|
|
|
|
/*
|
|
Validate and prepare for execution a multi delete statement.
|
|
|
|
SYNOPSIS
|
|
mysql_test_multidelete()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message in THD is set.
|
|
*/
|
|
|
|
static bool mysql_test_multidelete(Prepared_statement *stmt,
|
|
TABLE_LIST *tables)
|
|
{
|
|
stmt->thd->lex->current_select= &stmt->thd->lex->select_lex;
|
|
if (add_item_to_list(stmt->thd, new Item_null()))
|
|
{
|
|
my_error(ER_OUTOFMEMORY, MYF(0), 0);
|
|
goto error;
|
|
}
|
|
|
|
if (multi_delete_precheck(stmt->thd, tables) ||
|
|
select_like_stmt_test_with_open_n_lock(stmt, tables,
|
|
&mysql_multi_delete_prepare,
|
|
OPTION_SETUP_TABLES_DONE))
|
|
goto error;
|
|
if (!tables->table)
|
|
{
|
|
my_error(ER_VIEW_DELETE_MERGE_VIEW, MYF(0),
|
|
tables->view_db.str, tables->view_name.str);
|
|
goto error;
|
|
}
|
|
return FALSE;
|
|
error:
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/*
|
|
Wrapper for mysql_insert_select_prepare, to make change of local tables
|
|
after open_and_lock_tables() call.
|
|
|
|
SYNOPSIS
|
|
mysql_insert_select_prepare_tester()
|
|
thd thread handle
|
|
|
|
NOTE
|
|
We need to remove the first local table after open_and_lock_tables,
|
|
because mysql_handle_derived uses local tables lists.
|
|
*/
|
|
|
|
static bool mysql_insert_select_prepare_tester(THD *thd)
|
|
{
|
|
TABLE_LIST *first;
|
|
bool res;
|
|
SELECT_LEX *first_select= &thd->lex->select_lex;
|
|
/* Skip first table, which is the table we are inserting in */
|
|
first_select->table_list.first= (byte*)(first=
|
|
((TABLE_LIST*)first_select->
|
|
table_list.first)->next_local);
|
|
res= mysql_insert_select_prepare(thd);
|
|
/*
|
|
insert/replace from SELECT give its SELECT_LEX for SELECT,
|
|
and item_list belong to SELECT
|
|
*/
|
|
thd->lex->select_lex.context.resolve_in_select_list= TRUE;
|
|
thd->lex->select_lex.context.table_list= first;
|
|
return res;
|
|
}
|
|
|
|
|
|
/*
|
|
Validate and prepare for execution INSERT ... SELECT statement.
|
|
|
|
SYNOPSIS
|
|
mysql_test_insert_select()
|
|
stmt prepared statement
|
|
tables list of tables used in this query
|
|
|
|
RETURN VALUE
|
|
FALSE success
|
|
TRUE error, error message is set in THD
|
|
*/
|
|
|
|
static bool mysql_test_insert_select(Prepared_statement *stmt,
|
|
TABLE_LIST *tables)
|
|
{
|
|
int res;
|
|
LEX *lex= stmt->lex;
|
|
TABLE_LIST *first_local_table;
|
|
|
|
if (tables->table)
|
|
{
|
|
// don't allocate insert_values
|
|
tables->table->insert_values=(byte *)1;
|
|
}
|
|
|
|
if (insert_precheck(stmt->thd, tables))
|
|
return 1;
|
|
|
|
/* store it, because mysql_insert_select_prepare_tester change it */
|
|
first_local_table= (TABLE_LIST *)lex->select_lex.table_list.first;
|
|
DBUG_ASSERT(first_local_table != 0);
|
|
|
|
res=
|
|
select_like_stmt_test_with_open_n_lock(stmt, tables,
|
|
&mysql_insert_select_prepare_tester,
|
|
OPTION_SETUP_TABLES_DONE);
|
|
/* revert changes made by mysql_insert_select_prepare_tester */
|
|
lex->select_lex.table_list.first= (byte*) first_local_table;
|
|
return res;
|
|
}
|
|
|
|
|
|
/*
|
|
Perform semantic analysis of the parsed tree and send a response packet
|
|
to the client.
|
|
|
|
SYNOPSIS
|
|
check_prepared_statement()
|
|
stmt prepared statement
|
|
|
|
DESCRIPTION
|
|
This function
|
|
- opens all tables and checks access rights
|
|
- validates semantics of statement columns and SQL functions
|
|
by calling fix_fields.
|
|
|
|
RETURN VALUE
|
|
FALSE success, statement metadata is sent to client
|
|
TRUE error, error message is set in THD (but not sent)
|
|
*/
|
|
|
|
static bool check_prepared_statement(Prepared_statement *stmt,
|
|
bool text_protocol)
|
|
{
|
|
THD *thd= stmt->thd;
|
|
LEX *lex= stmt->lex;
|
|
SELECT_LEX *select_lex= &lex->select_lex;
|
|
TABLE_LIST *tables;
|
|
enum enum_sql_command sql_command= lex->sql_command;
|
|
int res= 0;
|
|
DBUG_ENTER("check_prepared_statement");
|
|
DBUG_PRINT("enter",("command: %d, param_count: %u",
|
|
sql_command, stmt->param_count));
|
|
|
|
lex->first_lists_tables_same();
|
|
tables= lex->query_tables;
|
|
|
|
/* set context for commands which do not use setup_tables */
|
|
lex->select_lex.context.resolve_in_table_list_only(select_lex->
|
|
get_table_list());
|
|
|
|
switch (sql_command) {
|
|
case SQLCOM_REPLACE:
|
|
case SQLCOM_INSERT:
|
|
res= mysql_test_insert(stmt, tables, lex->field_list,
|
|
lex->many_values,
|
|
select_lex->item_list, lex->value_list,
|
|
lex->duplicates);
|
|
break;
|
|
|
|
case SQLCOM_UPDATE:
|
|
res= mysql_test_update(stmt, tables);
|
|
/* mysql_test_update returns 2 if we need to switch to multi-update */
|
|
if (res != 2)
|
|
break;
|
|
|
|
case SQLCOM_UPDATE_MULTI:
|
|
res= mysql_test_multiupdate(stmt, tables, res == 2);
|
|
break;
|
|
|
|
case SQLCOM_DELETE:
|
|
res= mysql_test_delete(stmt, tables);
|
|
break;
|
|
|
|
case SQLCOM_SELECT:
|
|
res= mysql_test_select(stmt, tables, text_protocol);
|
|
if (res == 2)
|
|
{
|
|
/* Statement and field info has already been sent */
|
|
DBUG_RETURN(FALSE);
|
|
}
|
|
break;
|
|
case SQLCOM_CREATE_TABLE:
|
|
res= mysql_test_create_table(stmt);
|
|
break;
|
|
|
|
case SQLCOM_DO:
|
|
res= mysql_test_do_fields(stmt, tables, lex->insert_list);
|
|
break;
|
|
|
|
case SQLCOM_SET_OPTION:
|
|
res= mysql_test_set_fields(stmt, tables, &lex->var_list);
|
|
break;
|
|
|
|
case SQLCOM_DELETE_MULTI:
|
|
res= mysql_test_multidelete(stmt, tables);
|
|
break;
|
|
|
|
case SQLCOM_INSERT_SELECT:
|
|
case SQLCOM_REPLACE_SELECT:
|
|
res= mysql_test_insert_select(stmt, tables);
|
|
break;
|
|
|
|
/*
|
|
Note that we don't need to have cases in this list if they are
|
|
marked with CF_STATUS_COMMAND in sql_command_flags
|
|
*/
|
|
case SQLCOM_SHOW_PROCESSLIST:
|
|
case SQLCOM_SHOW_STORAGE_ENGINES:
|
|
case SQLCOM_SHOW_PRIVILEGES:
|
|
case SQLCOM_SHOW_COLUMN_TYPES:
|
|
case SQLCOM_SHOW_ENGINE_LOGS:
|
|
case SQLCOM_SHOW_ENGINE_STATUS:
|
|
case SQLCOM_SHOW_ENGINE_MUTEX:
|
|
case SQLCOM_SHOW_CREATE_DB:
|
|
case SQLCOM_SHOW_GRANTS:
|
|
case SQLCOM_SHOW_BINLOG_EVENTS:
|
|
case SQLCOM_SHOW_MASTER_STAT:
|
|
case SQLCOM_SHOW_SLAVE_STAT:
|
|
case SQLCOM_SHOW_CREATE_PROC:
|
|
case SQLCOM_SHOW_CREATE_FUNC:
|
|
case SQLCOM_SHOW_CREATE_EVENT:
|
|
case SQLCOM_SHOW_CREATE:
|
|
case SQLCOM_SHOW_PROC_CODE:
|
|
case SQLCOM_SHOW_FUNC_CODE:
|
|
case SQLCOM_SHOW_AUTHORS:
|
|
case SQLCOM_SHOW_CONTRIBUTORS:
|
|
case SQLCOM_SHOW_WARNS:
|
|
case SQLCOM_SHOW_ERRORS:
|
|
case SQLCOM_SHOW_BINLOGS:
|
|
case SQLCOM_DROP_TABLE:
|
|
case SQLCOM_RENAME_TABLE:
|
|
case SQLCOM_ALTER_TABLE:
|
|
case SQLCOM_COMMIT:
|
|
case SQLCOM_CREATE_INDEX:
|
|
case SQLCOM_DROP_INDEX:
|
|
case SQLCOM_ROLLBACK:
|
|
case SQLCOM_TRUNCATE:
|
|
case SQLCOM_CALL:
|
|
case SQLCOM_CREATE_VIEW:
|
|
case SQLCOM_DROP_VIEW:
|
|
case SQLCOM_REPAIR:
|
|
case SQLCOM_ANALYZE:
|
|
case SQLCOM_OPTIMIZE:
|
|
case SQLCOM_CHANGE_MASTER:
|
|
case SQLCOM_RESET:
|
|
case SQLCOM_FLUSH:
|
|
case SQLCOM_SLAVE_START:
|
|
case SQLCOM_SLAVE_STOP:
|
|
case SQLCOM_INSTALL_PLUGIN:
|
|
case SQLCOM_UNINSTALL_PLUGIN:
|
|
case SQLCOM_CREATE_DB:
|
|
case SQLCOM_DROP_DB:
|
|
case SQLCOM_RENAME_DB:
|
|
case SQLCOM_CHECKSUM:
|
|
case SQLCOM_CREATE_USER:
|
|
case SQLCOM_RENAME_USER:
|
|
case SQLCOM_DROP_USER:
|
|
case SQLCOM_ASSIGN_TO_KEYCACHE:
|
|
case SQLCOM_PRELOAD_KEYS:
|
|
case SQLCOM_GRANT:
|
|
case SQLCOM_REVOKE:
|
|
case SQLCOM_KILL:
|
|
break;
|
|
|
|
default:
|
|
/*
|
|
Trivial check of all status commands. This is easier than having
|
|
things in the above case list, as it's less chance for mistakes.
|
|
*/
|
|
if (!(sql_command_flags[sql_command] & CF_STATUS_COMMAND))
|
|
{
|
|
/* All other statements are not supported yet. */
|
|
my_message(ER_UNSUPPORTED_PS, ER(ER_UNSUPPORTED_PS), MYF(0));
|
|
goto error;
|
|
}
|
|
break;
|
|
}
|
|
if (res == 0)
|
|
DBUG_RETURN(text_protocol? FALSE : (send_prep_stmt(stmt, 0) ||
|
|
thd->protocol->flush()));
|
|
error:
|
|
DBUG_RETURN(TRUE);
|
|
}
|
|
|
|
/*
|
|
Initialize array of parameters in statement from LEX.
|
|
(We need to have quick access to items by number in mysql_stmt_get_longdata).
|
|
This is to avoid using malloc/realloc in the parser.
|
|
*/
|
|
|
|
static bool init_param_array(Prepared_statement *stmt)
|
|
{
|
|
LEX *lex= stmt->lex;
|
|
if ((stmt->param_count= lex->param_list.elements))
|
|
{
|
|
if (stmt->param_count > (uint) UINT_MAX16)
|
|
{
|
|
/* Error code to be defined in 5.0 */
|
|
my_message(ER_PS_MANY_PARAM, ER(ER_PS_MANY_PARAM), MYF(0));
|
|
return TRUE;
|
|
}
|
|
Item_param **to;
|
|
List_iterator<Item_param> param_iterator(lex->param_list);
|
|
/* Use thd->mem_root as it points at statement mem_root */
|
|
stmt->param_array= (Item_param **)
|
|
alloc_root(stmt->thd->mem_root,
|
|
sizeof(Item_param*) * stmt->param_count);
|
|
if (!stmt->param_array)
|
|
return TRUE;
|
|
for (to= stmt->param_array;
|
|
to < stmt->param_array + stmt->param_count;
|
|
++to)
|
|
{
|
|
*to= param_iterator++;
|
|
}
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
/*
|
|
COM_STMT_PREPARE handler.
|
|
|
|
SYNOPSIS
|
|
mysql_stmt_prepare()
|
|
packet query to be prepared
|
|
packet_length query string length, including ignored
|
|
trailing NULL or quote char.
|
|
|
|
DESCRIPTION
|
|
Given a query string with parameter markers, create a prepared
|
|
statement from it and send PS info back to the client.
|
|
|
|
NOTES
|
|
This function parses the query and sends the total number of parameters
|
|
and resultset metadata information back to client (if any), without
|
|
executing the query i.e. without any log/disk writes. This allows the
|
|
queries to be re-executed without re-parsing during execute.
|
|
|
|
If parameter markers are found in the query, then store the information
|
|
using Item_param along with maintaining a list in lex->param_array, so
|
|
that a fast and direct retrieval can be made without going through all
|
|
field items.
|
|
|
|
RETURN VALUE
|
|
none: in case of success a new statement id and metadata is sent
|
|
to the client, otherwise an error message is set in THD.
|
|
*/
|
|
|
|
void mysql_stmt_prepare(THD *thd, const char *packet, uint packet_length)
|
|
{
|
|
Prepared_statement *stmt;
|
|
bool error;
|
|
DBUG_ENTER("mysql_stmt_prepare");
|
|
|
|
DBUG_PRINT("prep_query", ("%s", packet));
|
|
|
|
/* First of all clear possible warnings from the previous command */
|
|
mysql_reset_thd_for_next_command(thd);
|
|
|
|
if (! (stmt= new Prepared_statement(thd, &thd->protocol_prep)))
|
|
DBUG_VOID_RETURN; /* out of memory: error is set in Sql_alloc */
|
|
|
|
if (thd->stmt_map.insert(thd, stmt))
|
|
{
|
|
/*
|
|
The error is set in the insert. The statement itself
|
|
will be also deleted there (this is how the hash works).
|
|
*/
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
/* Reset warnings from previous command */
|
|
mysql_reset_errors(thd, 0);
|
|
sp_cache_flush_obsolete(&thd->sp_proc_cache);
|
|
sp_cache_flush_obsolete(&thd->sp_func_cache);
|
|
|
|
if (!(specialflag & SPECIAL_NO_PRIOR))
|
|
my_pthread_setprio(pthread_self(),QUERY_PRIOR);
|
|
|
|
error= stmt->prepare(packet, packet_length);
|
|
|
|
if (!(specialflag & SPECIAL_NO_PRIOR))
|
|
my_pthread_setprio(pthread_self(),WAIT_PRIOR);
|
|
|
|
if (error)
|
|
{
|
|
/* Statement map deletes statement on erase */
|
|
thd->stmt_map.erase(stmt);
|
|
}
|
|
else
|
|
{
|
|
const char *format= "[%lu] %.*b";
|
|
general_log_print(thd, COM_STMT_PREPARE, format, stmt->id,
|
|
stmt->query_length, stmt->query);
|
|
|
|
}
|
|
/* check_prepared_statemnt sends the metadata packet in case of success */
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
/*
|
|
SYNOPSIS
|
|
get_dynamic_sql_string()
|
|
lex in main lex
|
|
query_len out length of the SQL statement (is set only
|
|
in case of success)
|
|
|
|
DESCRIPTION
|
|
Get an SQL statement text from a user variable or from plain
|
|
text. If the statement is plain text, just assign the
|
|
pointers, otherwise allocate memory in thd->mem_root and copy
|
|
the contents of the variable, possibly with character
|
|
set conversion.
|
|
|
|
RETURN VALUE
|
|
non-zero success, 0 in case of error (out of memory)
|
|
*/
|
|
|
|
static const char *get_dynamic_sql_string(LEX *lex, uint *query_len)
|
|
{
|
|
THD *thd= lex->thd;
|
|
char *query_str= 0;
|
|
|
|
if (lex->prepared_stmt_code_is_varref)
|
|
{
|
|
/* This is PREPARE stmt FROM or EXECUTE IMMEDIATE @var. */
|
|
String str;
|
|
CHARSET_INFO *to_cs= thd->variables.collation_connection;
|
|
bool needs_conversion;
|
|
user_var_entry *entry;
|
|
String *var_value= &str;
|
|
uint32 unused, len;
|
|
/*
|
|
Convert @var contents to string in connection character set. Although
|
|
it is known that int/real/NULL value cannot be a valid query we still
|
|
convert it for error messages to be uniform.
|
|
*/
|
|
if ((entry=
|
|
(user_var_entry*)hash_search(&thd->user_vars,
|
|
(byte*)lex->prepared_stmt_code.str,
|
|
lex->prepared_stmt_code.length))
|
|
&& entry->value)
|
|
{
|
|
my_bool is_var_null;
|
|
var_value= entry->val_str(&is_var_null, &str, NOT_FIXED_DEC);
|
|
/*
|
|
NULL value of variable checked early as entry->value so here
|
|
we can't get NULL in normal conditions
|
|
*/
|
|
DBUG_ASSERT(!is_var_null);
|
|
if (!var_value)
|
|
goto end;
|
|
}
|
|
else
|
|
{
|
|
/*
|
|
variable absent or equal to NULL, so we need to set variable to
|
|
something reasonable to get a readable error message during parsing
|
|
*/
|
|
str.set(STRING_WITH_LEN("NULL"), &my_charset_latin1);
|
|
}
|
|
|
|
needs_conversion= String::needs_conversion(var_value->length(),
|
|
var_value->charset(), to_cs,
|
|
&unused);
|
|
|
|
len= (needs_conversion ? var_value->length() * to_cs->mbmaxlen :
|
|
var_value->length());
|
|
if (!(query_str= alloc_root(thd->mem_root, len+1)))
|
|
goto end;
|
|
|
|
if (needs_conversion)
|
|
{
|
|
uint dummy_errors;
|
|
len= copy_and_convert(query_str, len, to_cs, var_value->ptr(),
|
|
var_value->length(), var_value->charset(),
|
|
&dummy_errors);
|
|
}
|
|
else
|
|
memcpy(query_str, var_value->ptr(), var_value->length());
|
|
query_str[len]= '\0'; // Safety (mostly for debug)
|
|
*query_len= len;
|
|
}
|
|
else
|
|
{
|
|
query_str= lex->prepared_stmt_code.str;
|
|
*query_len= lex->prepared_stmt_code.length;
|
|
}
|
|
end:
|
|
return query_str;
|
|
}
|
|
|
|
|
|
/* Init PS/SP specific parse tree members. */
|
|
|
|
static void init_stmt_after_parse(LEX *lex)
|
|
{
|
|
SELECT_LEX *sl= lex->all_selects_list;
|
|
/*
|
|
Switch off a temporary flag that prevents evaluation of
|
|
subqueries in statement prepare.
|
|
*/
|
|
for (; sl; sl= sl->next_select_in_list())
|
|
sl->uncacheable&= ~UNCACHEABLE_PREPARE;
|
|
}
|
|
|
|
/*
|
|
SQLCOM_PREPARE implementation.
|
|
|
|
SYNOPSIS
|
|
mysql_sql_stmt_prepare()
|
|
thd thread handle
|
|
|
|
DESCRIPTION
|
|
Prepare an SQL prepared statement. This is called from
|
|
mysql_execute_command and should therefore behave like an
|
|
ordinary query (e.g. should not reset any global THD data).
|
|
|
|
RETURN VALUE
|
|
none: in case of success, OK packet is sent to the client,
|
|
otherwise an error message is set in THD
|
|
*/
|
|
|
|
void mysql_sql_stmt_prepare(THD *thd)
|
|
{
|
|
LEX *lex= thd->lex;
|
|
LEX_STRING *name= &lex->prepared_stmt_name;
|
|
Prepared_statement *stmt;
|
|
const char *query;
|
|
uint query_len;
|
|
DBUG_ENTER("mysql_sql_stmt_prepare");
|
|
DBUG_ASSERT(thd->protocol == &thd->protocol_simple);
|
|
|
|
if ((stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
|
|
{
|
|
/*
|
|
If there is a statement with the same name, remove it. It is ok to
|
|
remove old and fail to insert a new one at the same time.
|
|
*/
|
|
if (stmt->deallocate())
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
if (! (query= get_dynamic_sql_string(lex, &query_len)) ||
|
|
! (stmt= new Prepared_statement(thd, &thd->protocol_simple)))
|
|
{
|
|
DBUG_VOID_RETURN; /* out of memory */
|
|
}
|
|
|
|
/* Set the name first, insert should know that this statement has a name */
|
|
if (stmt->set_name(name))
|
|
{
|
|
delete stmt;
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
if (thd->stmt_map.insert(thd, stmt))
|
|
{
|
|
/* The statement is deleted and an error is set if insert fails */
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
if (stmt->prepare(query, query_len+1))
|
|
{
|
|
/* Statement map deletes the statement on erase */
|
|
thd->stmt_map.erase(stmt);
|
|
}
|
|
else
|
|
send_ok(thd, 0L, 0L, "Statement prepared");
|
|
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
/* Reinit prepared statement/stored procedure before execution */
|
|
|
|
void reinit_stmt_before_use(THD *thd, LEX *lex)
|
|
{
|
|
SELECT_LEX *sl= lex->all_selects_list;
|
|
DBUG_ENTER("reinit_stmt_before_use");
|
|
|
|
/*
|
|
We have to update "thd" pointer in LEX, all its units and in LEX::result,
|
|
since statements which belong to trigger body are associated with TABLE
|
|
object and because of this can be used in different threads.
|
|
*/
|
|
lex->thd= thd;
|
|
|
|
if (lex->empty_field_list_on_rset)
|
|
{
|
|
lex->empty_field_list_on_rset= 0;
|
|
lex->field_list.empty();
|
|
}
|
|
for (; sl; sl= sl->next_select_in_list())
|
|
{
|
|
if (!sl->first_execution)
|
|
{
|
|
/* remove option which was put by mysql_explain_union() */
|
|
sl->options&= ~SELECT_DESCRIBE;
|
|
|
|
/* see unique_table() */
|
|
sl->exclude_from_table_unique_test= FALSE;
|
|
|
|
/*
|
|
Copy WHERE, HAVING clause pointers to avoid damaging them
|
|
by optimisation
|
|
*/
|
|
if (sl->prep_where)
|
|
{
|
|
sl->where= sl->prep_where->copy_andor_structure(thd);
|
|
sl->where->cleanup();
|
|
}
|
|
if (sl->prep_having)
|
|
{
|
|
sl->having= sl->prep_having->copy_andor_structure(thd);
|
|
sl->having->cleanup();
|
|
}
|
|
DBUG_ASSERT(sl->join == 0);
|
|
ORDER *order;
|
|
/* Fix GROUP list */
|
|
for (order= (ORDER *)sl->group_list.first; order; order= order->next)
|
|
order->item= &order->item_ptr;
|
|
/* Fix ORDER list */
|
|
for (order= (ORDER *)sl->order_list.first; order; order= order->next)
|
|
order->item= &order->item_ptr;
|
|
}
|
|
{
|
|
SELECT_LEX_UNIT *unit= sl->master_unit();
|
|
unit->unclean();
|
|
unit->types.empty();
|
|
/* for derived tables & PS (which can't be reset by Item_subquery) */
|
|
unit->reinit_exec_mechanism();
|
|
unit->set_thd(thd);
|
|
}
|
|
}
|
|
|
|
/*
|
|
TODO: When the new table structure is ready, then have a status bit
|
|
to indicate the table is altered, and re-do the setup_*
|
|
and open the tables back.
|
|
*/
|
|
/*
|
|
NOTE: We should reset whole table list here including all tables added
|
|
by prelocking algorithm (it is not a problem for substatements since
|
|
they have their own table list).
|
|
*/
|
|
for (TABLE_LIST *tables= lex->query_tables;
|
|
tables;
|
|
tables= tables->next_global)
|
|
{
|
|
tables->reinit_before_use(thd);
|
|
}
|
|
/*
|
|
Cleanup of the special case of DELETE t1, t2 FROM t1, t2, t3 ...
|
|
(multi-delete). We do a full clean up, although at the moment all we
|
|
need to clean in the tables of MULTI-DELETE list is 'table' member.
|
|
*/
|
|
for (TABLE_LIST *tables= (TABLE_LIST*) lex->auxiliary_table_list.first;
|
|
tables;
|
|
tables= tables->next_global)
|
|
{
|
|
tables->reinit_before_use(thd);
|
|
}
|
|
lex->current_select= &lex->select_lex;
|
|
|
|
/* restore original list used in INSERT ... SELECT */
|
|
if (lex->leaf_tables_insert)
|
|
lex->select_lex.leaf_tables= lex->leaf_tables_insert;
|
|
|
|
if (lex->result)
|
|
{
|
|
lex->result->cleanup();
|
|
lex->result->set_thd(thd);
|
|
}
|
|
lex->allow_sum_func= 0;
|
|
lex->in_sum_func= NULL;
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
/*
|
|
Clears parameters from data left from previous execution or long data
|
|
|
|
SYNOPSIS
|
|
reset_stmt_params()
|
|
stmt prepared statement for which parameters should
|
|
be reset
|
|
*/
|
|
|
|
static void reset_stmt_params(Prepared_statement *stmt)
|
|
{
|
|
Item_param **item= stmt->param_array;
|
|
Item_param **end= item + stmt->param_count;
|
|
for (;item < end ; ++item)
|
|
(**item).reset();
|
|
}
|
|
|
|
|
|
/*
|
|
COM_STMT_EXECUTE handler: execute a previously prepared statement.
|
|
|
|
SYNOPSIS
|
|
mysql_stmt_execute()
|
|
thd current thread
|
|
packet parameter types and data, if any
|
|
packet_length packet length, including the terminator character.
|
|
|
|
DESCRIPTION
|
|
If there are any parameters, then replace parameter markers with the
|
|
data supplied from the client, and then execute the statement.
|
|
This function uses binary protocol to send a possible result set
|
|
to the client.
|
|
|
|
RETURN VALUE
|
|
none: in case of success OK packet or a result set is sent to the
|
|
client, otherwise an error message is set in THD.
|
|
*/
|
|
|
|
void mysql_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
|
|
{
|
|
uchar *packet= (uchar*)packet_arg; // GCC 4.0.1 workaround
|
|
ulong stmt_id= uint4korr(packet);
|
|
ulong flags= (ulong) ((uchar) packet[4]);
|
|
/* Query text for binary, general or slow log, if any of them is open */
|
|
String expanded_query;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
uchar *packet_end= (uchar *) packet + packet_length - 1;
|
|
#endif
|
|
Prepared_statement *stmt;
|
|
bool error;
|
|
DBUG_ENTER("mysql_stmt_execute");
|
|
|
|
packet+= 9; /* stmt_id + 5 bytes of flags */
|
|
|
|
/* First of all clear possible warnings from the previous command */
|
|
mysql_reset_thd_for_next_command(thd);
|
|
|
|
if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_execute")))
|
|
DBUG_VOID_RETURN;
|
|
|
|
DBUG_PRINT("exec_query", ("%s", stmt->query));
|
|
DBUG_PRINT("info",("stmt: 0x%lx", (long) stmt));
|
|
|
|
sp_cache_flush_obsolete(&thd->sp_proc_cache);
|
|
sp_cache_flush_obsolete(&thd->sp_func_cache);
|
|
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (stmt->param_count)
|
|
{
|
|
uchar *null_array= (uchar *) packet;
|
|
if (setup_conversion_functions(stmt, (uchar **) &packet, packet_end) ||
|
|
stmt->set_params(stmt, null_array, (uchar *) packet, packet_end,
|
|
&expanded_query))
|
|
goto set_params_data_err;
|
|
}
|
|
#else
|
|
/*
|
|
In embedded library we re-install conversion routines each time
|
|
we set params, and also we don't need to parse packet.
|
|
So we do it in one function.
|
|
*/
|
|
if (stmt->param_count && stmt->set_params_data(stmt, &expanded_query))
|
|
goto set_params_data_err;
|
|
#endif
|
|
if (!(specialflag & SPECIAL_NO_PRIOR))
|
|
my_pthread_setprio(pthread_self(),QUERY_PRIOR);
|
|
|
|
/*
|
|
If the free_list is not empty, we'll wrongly free some externally
|
|
allocated items when cleaning up after validation of the prepared
|
|
statement.
|
|
*/
|
|
DBUG_ASSERT(thd->free_list == NULL);
|
|
|
|
error= stmt->execute(&expanded_query,
|
|
test(flags & (ulong) CURSOR_TYPE_READ_ONLY));
|
|
if (!(specialflag & SPECIAL_NO_PRIOR))
|
|
my_pthread_setprio(pthread_self(), WAIT_PRIOR);
|
|
if (error == 0)
|
|
{
|
|
const char *format= "[%lu] %.*b";
|
|
general_log_print(thd, COM_STMT_EXECUTE, format, stmt->id,
|
|
thd->query_length, thd->query);
|
|
}
|
|
DBUG_VOID_RETURN;
|
|
|
|
set_params_data_err:
|
|
my_error(ER_WRONG_ARGUMENTS, MYF(0), "mysql_stmt_execute");
|
|
reset_stmt_params(stmt);
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
/*
|
|
SQLCOM_EXECUTE implementation.
|
|
|
|
SYNOPSIS
|
|
mysql_sql_stmt_execute()
|
|
thd thread handle
|
|
|
|
DESCRIPTION
|
|
Execute prepared statement using parameter values from
|
|
lex->prepared_stmt_params and send result to the client using
|
|
text protocol. This is called from mysql_execute_command and
|
|
therefore should behave like an ordinary query (e.g. not change
|
|
global THD data, such as warning count, server status, etc).
|
|
This function uses text protocol to send a possible result set.
|
|
|
|
RETURN
|
|
none: in case of success, OK (or result set) packet is sent to the
|
|
client, otherwise an error is set in THD
|
|
*/
|
|
|
|
void mysql_sql_stmt_execute(THD *thd)
|
|
{
|
|
LEX *lex= thd->lex;
|
|
Prepared_statement *stmt;
|
|
LEX_STRING *name= &lex->prepared_stmt_name;
|
|
/* Query text for binary, general or slow log, if any of them is open */
|
|
String expanded_query;
|
|
DBUG_ENTER("mysql_sql_stmt_execute");
|
|
DBUG_PRINT("info", ("EXECUTE: %.*s\n", name->length, name->str));
|
|
|
|
if (!(stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
|
|
{
|
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0),
|
|
name->length, name->str, "EXECUTE");
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
if (stmt->param_count != lex->prepared_stmt_params.elements)
|
|
{
|
|
my_error(ER_WRONG_ARGUMENTS, MYF(0), "EXECUTE");
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
DBUG_PRINT("info",("stmt: 0x%lx", (long) stmt));
|
|
|
|
/*
|
|
If the free_list is not empty, we'll wrongly free some externally
|
|
allocated items when cleaning up after validation of the prepared
|
|
statement.
|
|
*/
|
|
DBUG_ASSERT(thd->free_list == NULL);
|
|
|
|
if (stmt->set_params_from_vars(stmt, lex->prepared_stmt_params,
|
|
&expanded_query))
|
|
goto set_params_data_err;
|
|
|
|
(void) stmt->execute(&expanded_query, FALSE);
|
|
|
|
DBUG_VOID_RETURN;
|
|
|
|
set_params_data_err:
|
|
my_error(ER_WRONG_ARGUMENTS, MYF(0), "EXECUTE");
|
|
reset_stmt_params(stmt);
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
/*
|
|
COM_STMT_FETCH handler: fetches requested amount of rows from cursor
|
|
|
|
SYNOPSIS
|
|
mysql_stmt_fetch()
|
|
thd Thread handle
|
|
packet Packet from client (with stmt_id & num_rows)
|
|
packet_length Length of packet
|
|
*/
|
|
|
|
void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
|
|
{
|
|
/* assume there is always place for 8-16 bytes */
|
|
ulong stmt_id= uint4korr(packet);
|
|
ulong num_rows= uint4korr(packet+4);
|
|
Prepared_statement *stmt;
|
|
Statement stmt_backup;
|
|
Server_side_cursor *cursor;
|
|
DBUG_ENTER("mysql_stmt_fetch");
|
|
|
|
/* First of all clear possible warnings from the previous command */
|
|
mysql_reset_thd_for_next_command(thd);
|
|
statistic_increment(thd->status_var.com_stmt_fetch, &LOCK_status);
|
|
if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_fetch")))
|
|
DBUG_VOID_RETURN;
|
|
|
|
cursor= stmt->cursor;
|
|
if (!cursor)
|
|
{
|
|
my_error(ER_STMT_HAS_NO_OPEN_CURSOR, MYF(0), stmt_id);
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
thd->stmt_arena= stmt;
|
|
thd->set_n_backup_statement(stmt, &stmt_backup);
|
|
|
|
if (!(specialflag & SPECIAL_NO_PRIOR))
|
|
my_pthread_setprio(pthread_self(), QUERY_PRIOR);
|
|
|
|
cursor->fetch(num_rows);
|
|
|
|
if (!(specialflag & SPECIAL_NO_PRIOR))
|
|
my_pthread_setprio(pthread_self(), WAIT_PRIOR);
|
|
|
|
if (!cursor->is_open())
|
|
{
|
|
stmt->close_cursor();
|
|
thd->cursor= 0;
|
|
reset_stmt_params(stmt);
|
|
}
|
|
|
|
thd->restore_backup_statement(stmt, &stmt_backup);
|
|
thd->stmt_arena= thd;
|
|
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
/*
|
|
Reset a prepared statement in case there was a recoverable error.
|
|
SYNOPSIS
|
|
mysql_stmt_reset()
|
|
thd Thread handle
|
|
packet Packet with stmt id
|
|
|
|
DESCRIPTION
|
|
This function resets statement to the state it was right after prepare.
|
|
It can be used to:
|
|
- clear an error happened during mysql_stmt_send_long_data
|
|
- cancel long data stream for all placeholders without
|
|
having to call mysql_stmt_execute.
|
|
- close an open cursor
|
|
Sends 'OK' packet in case of success (statement was reset)
|
|
or 'ERROR' packet (unrecoverable error/statement not found/etc).
|
|
*/
|
|
|
|
void mysql_stmt_reset(THD *thd, char *packet)
|
|
{
|
|
/* There is always space for 4 bytes in buffer */
|
|
ulong stmt_id= uint4korr(packet);
|
|
Prepared_statement *stmt;
|
|
DBUG_ENTER("mysql_stmt_reset");
|
|
|
|
/* First of all clear possible warnings from the previous command */
|
|
mysql_reset_thd_for_next_command(thd);
|
|
|
|
statistic_increment(thd->status_var.com_stmt_reset, &LOCK_status);
|
|
if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_reset")))
|
|
DBUG_VOID_RETURN;
|
|
|
|
stmt->close_cursor();
|
|
|
|
/*
|
|
Clear parameters from data which could be set by
|
|
mysql_stmt_send_long_data() call.
|
|
*/
|
|
reset_stmt_params(stmt);
|
|
|
|
stmt->state= Query_arena::PREPARED;
|
|
|
|
send_ok(thd);
|
|
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
/*
|
|
Delete a prepared statement from memory.
|
|
Note: we don't send any reply to this command.
|
|
*/
|
|
|
|
void mysql_stmt_close(THD *thd, char *packet)
|
|
{
|
|
/* There is always space for 4 bytes in packet buffer */
|
|
ulong stmt_id= uint4korr(packet);
|
|
Prepared_statement *stmt;
|
|
DBUG_ENTER("mysql_stmt_close");
|
|
|
|
if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_close")))
|
|
DBUG_VOID_RETURN;
|
|
|
|
/*
|
|
The only way currently a statement can be deallocated when it's
|
|
in use is from within Dynamic SQL.
|
|
*/
|
|
DBUG_ASSERT(! (stmt->flags & (uint) Prepared_statement::IS_IN_USE));
|
|
(void) stmt->deallocate();
|
|
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
/*
|
|
SQLCOM_DEALLOCATE implementation.
|
|
|
|
DESCRIPTION
|
|
Close an SQL prepared statement. As this can be called from Dynamic
|
|
SQL, we should be careful to not close a statement that is currently
|
|
being executed.
|
|
|
|
RETURN VALUE
|
|
none: OK packet is sent in case of success, otherwise an error
|
|
message is set in THD
|
|
*/
|
|
|
|
void mysql_sql_stmt_close(THD *thd)
|
|
{
|
|
Prepared_statement* stmt;
|
|
LEX_STRING *name= &thd->lex->prepared_stmt_name;
|
|
DBUG_PRINT("info", ("DEALLOCATE PREPARE: %.*s\n", name->length, name->str));
|
|
|
|
if (! (stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
|
|
{
|
|
my_error(ER_UNKNOWN_STMT_HANDLER, MYF(0),
|
|
name->length, name->str, "DEALLOCATE PREPARE");
|
|
return;
|
|
}
|
|
|
|
if (stmt->deallocate() == 0)
|
|
send_ok(thd);
|
|
}
|
|
|
|
/*
|
|
Handle long data in pieces from client.
|
|
|
|
SYNOPSIS
|
|
mysql_stmt_get_longdata()
|
|
thd Thread handle
|
|
packet String to append
|
|
packet_length Length of string (including end \0)
|
|
|
|
DESCRIPTION
|
|
Get a part of a long data. To make the protocol efficient, we are
|
|
not sending any return packets here. If something goes wrong, then
|
|
we will send the error on 'execute' We assume that the client takes
|
|
care of checking that all parts are sent to the server. (No checking
|
|
that we get a 'end of column' in the server is performed).
|
|
*/
|
|
|
|
void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length)
|
|
{
|
|
ulong stmt_id;
|
|
uint param_number;
|
|
Prepared_statement *stmt;
|
|
Item_param *param;
|
|
char *packet_end= packet + packet_length - 1;
|
|
DBUG_ENTER("mysql_stmt_get_longdata");
|
|
|
|
statistic_increment(thd->status_var.com_stmt_send_long_data, &LOCK_status);
|
|
#ifndef EMBEDDED_LIBRARY
|
|
/* Minimal size of long data packet is 6 bytes */
|
|
if (packet_length <= MYSQL_LONG_DATA_HEADER)
|
|
{
|
|
my_error(ER_WRONG_ARGUMENTS, MYF(0), "mysql_stmt_send_long_data");
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
#endif
|
|
|
|
stmt_id= uint4korr(packet);
|
|
packet+= 4;
|
|
|
|
if (!(stmt=find_prepared_statement(thd, stmt_id,
|
|
"mysql_stmt_send_long_data")))
|
|
DBUG_VOID_RETURN;
|
|
|
|
param_number= uint2korr(packet);
|
|
packet+= 2;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (param_number >= stmt->param_count)
|
|
{
|
|
/* Error will be sent in execute call */
|
|
stmt->state= Query_arena::ERROR;
|
|
stmt->last_errno= ER_WRONG_ARGUMENTS;
|
|
sprintf(stmt->last_error, ER(ER_WRONG_ARGUMENTS),
|
|
"mysql_stmt_send_long_data");
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
#endif
|
|
|
|
param= stmt->param_array[param_number];
|
|
|
|
#ifndef EMBEDDED_LIBRARY
|
|
if (param->set_longdata(packet, (ulong) (packet_end - packet)))
|
|
#else
|
|
if (param->set_longdata(thd->extra_data, thd->extra_length))
|
|
#endif
|
|
{
|
|
stmt->state= Query_arena::ERROR;
|
|
stmt->last_errno= ER_OUTOFMEMORY;
|
|
sprintf(stmt->last_error, ER(ER_OUTOFMEMORY), 0);
|
|
}
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
/***************************************************************************
|
|
Select_fetch_protocol_prep
|
|
****************************************************************************/
|
|
|
|
Select_fetch_protocol_prep::Select_fetch_protocol_prep(THD *thd)
|
|
:protocol(thd)
|
|
{}
|
|
|
|
bool Select_fetch_protocol_prep::send_fields(List<Item> &list, uint flags)
|
|
{
|
|
bool rc;
|
|
Protocol *save_protocol= thd->protocol;
|
|
|
|
/*
|
|
Protocol::send_fields caches the information about column types:
|
|
this information is later used to send data. Therefore, the same
|
|
dedicated Protocol object must be used for all operations with
|
|
a cursor.
|
|
*/
|
|
thd->protocol= &protocol;
|
|
rc= select_send::send_fields(list, flags);
|
|
thd->protocol= save_protocol;
|
|
|
|
return rc;
|
|
}
|
|
|
|
bool Select_fetch_protocol_prep::send_eof()
|
|
{
|
|
Protocol *save_protocol= thd->protocol;
|
|
|
|
thd->protocol= &protocol;
|
|
::send_eof(thd);
|
|
thd->protocol= save_protocol;
|
|
return FALSE;
|
|
}
|
|
|
|
|
|
bool
|
|
Select_fetch_protocol_prep::send_data(List<Item> &fields)
|
|
{
|
|
Protocol *save_protocol= thd->protocol;
|
|
bool rc;
|
|
|
|
thd->protocol= &protocol;
|
|
rc= select_send::send_data(fields);
|
|
thd->protocol= save_protocol;
|
|
return rc;
|
|
}
|
|
|
|
/***************************************************************************
|
|
Prepared_statement
|
|
****************************************************************************/
|
|
|
|
Prepared_statement::Prepared_statement(THD *thd_arg, Protocol *protocol_arg)
|
|
:Statement(INITIALIZED, ++thd_arg->statement_id_counter,
|
|
thd_arg->variables.query_alloc_block_size,
|
|
thd_arg->variables.query_prealloc_size),
|
|
thd(thd_arg),
|
|
result(thd_arg),
|
|
protocol(protocol_arg),
|
|
param_array(0),
|
|
param_count(0),
|
|
last_errno(0),
|
|
flags((uint) IS_IN_USE)
|
|
{
|
|
*last_error= '\0';
|
|
}
|
|
|
|
|
|
void Prepared_statement::setup_set_params()
|
|
{
|
|
/* Setup binary logging */
|
|
if (mysql_bin_log.is_open() && is_update_query(lex->sql_command) ||
|
|
opt_log || opt_slow_log)
|
|
{
|
|
set_params_from_vars= insert_params_from_vars_with_log;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
set_params= insert_params_withlog;
|
|
#else
|
|
set_params_data= emb_insert_params_withlog;
|
|
#endif
|
|
}
|
|
else
|
|
{
|
|
set_params_from_vars= insert_params_from_vars;
|
|
#ifndef EMBEDDED_LIBRARY
|
|
set_params= insert_params;
|
|
#else
|
|
set_params_data= emb_insert_params;
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
DESCRIPTION
|
|
Destroy this prepared statement, cleaning up all used memory
|
|
and resources. This is called from ::deallocate() to
|
|
handle COM_STMT_CLOSE and DEALLOCATE PREPARE or when
|
|
THD ends and all prepared statements are freed.
|
|
*/
|
|
|
|
Prepared_statement::~Prepared_statement()
|
|
{
|
|
DBUG_ENTER("Prepared_statement::~Prepared_statement");
|
|
DBUG_PRINT("enter",("stmt: 0x%lx cursor: 0x%lx",
|
|
(long) this, (long) cursor));
|
|
delete cursor;
|
|
/*
|
|
We have to call free on the items even if cleanup is called as some items,
|
|
like Item_param, don't free everything until free_items()
|
|
*/
|
|
free_items();
|
|
delete lex->result;
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
Query_arena::Type Prepared_statement::type() const
|
|
{
|
|
return PREPARED_STATEMENT;
|
|
}
|
|
|
|
|
|
void Prepared_statement::cleanup_stmt()
|
|
{
|
|
DBUG_ENTER("Prepared_statement::cleanup_stmt");
|
|
DBUG_PRINT("enter",("stmt: 0x%lx", (long) this));
|
|
|
|
/* The order is important */
|
|
lex->unit.cleanup();
|
|
cleanup_items(free_list);
|
|
thd->cleanup_after_query();
|
|
close_thread_tables(thd);
|
|
thd->rollback_item_tree_changes();
|
|
|
|
DBUG_VOID_RETURN;
|
|
}
|
|
|
|
|
|
bool Prepared_statement::set_name(LEX_STRING *name_arg)
|
|
{
|
|
name.length= name_arg->length;
|
|
name.str= memdup_root(mem_root, (char*) name_arg->str, name_arg->length);
|
|
return name.str == 0;
|
|
}
|
|
|
|
/**************************************************************************
|
|
Common parts of mysql_[sql]_stmt_prepare, mysql_[sql]_stmt_execute.
|
|
Essentially, these functions do all the magic of preparing/executing
|
|
a statement, leaving network communication, input data handling and
|
|
global THD state management to the caller.
|
|
***************************************************************************/
|
|
|
|
/*
|
|
Parse statement text, validate the statement, and prepare it for execution.
|
|
|
|
SYNOPSIS
|
|
Prepared_statement::prepare()
|
|
packet statement text
|
|
packet_len
|
|
|
|
DESCRIPTION
|
|
You should not change global THD state in this function, if at all
|
|
possible: it may be called from any context, e.g. when executing
|
|
a COM_* command, and SQLCOM_* command, or a stored procedure.
|
|
|
|
NOTES
|
|
Precondition.
|
|
-------------
|
|
The caller must ensure that thd->change_list and thd->free_list
|
|
is empty: this function will not back them up but will free
|
|
in the end of its execution.
|
|
|
|
Postcondition.
|
|
--------------
|
|
thd->mem_root contains unused memory allocated during validation.
|
|
*/
|
|
|
|
bool Prepared_statement::prepare(const char *packet, uint packet_len)
|
|
{
|
|
bool error;
|
|
Statement stmt_backup;
|
|
Query_arena *old_stmt_arena;
|
|
DBUG_ENTER("Prepared_statement::prepare");
|
|
/*
|
|
If this is an SQLCOM_PREPARE, we also increase Com_prepare_sql.
|
|
However, it seems handy if com_stmt_prepare is increased always,
|
|
no matter what kind of prepare is processed.
|
|
*/
|
|
statistic_increment(thd->status_var.com_stmt_prepare, &LOCK_status);
|
|
|
|
/*
|
|
alloc_query() uses thd->memroot && thd->query, so we should call
|
|
both of backup_statement() and backup_query_arena() here.
|
|
*/
|
|
thd->set_n_backup_statement(this, &stmt_backup);
|
|
thd->set_n_backup_active_arena(this, &stmt_backup);
|
|
|
|
if (alloc_query(thd, packet, packet_len))
|
|
{
|
|
thd->restore_backup_statement(this, &stmt_backup);
|
|
thd->restore_active_arena(this, &stmt_backup);
|
|
DBUG_RETURN(TRUE);
|
|
}
|
|
|
|
old_stmt_arena= thd->stmt_arena;
|
|
thd->stmt_arena= this;
|
|
lex_start(thd, (uchar*) thd->query, thd->query_length);
|
|
lex->stmt_prepare_mode= TRUE;
|
|
|
|
error= MYSQLparse((void *)thd) || thd->is_fatal_error ||
|
|
thd->net.report_error || init_param_array(this);
|
|
|
|
/*
|
|
The first thing we do after parse error is freeing sp_head to
|
|
ensure that we have restored original memroot.
|
|
*/
|
|
if (error && lex->sphead)
|
|
{
|
|
delete lex->sphead;
|
|
lex->sphead= NULL;
|
|
}
|
|
|
|
lex->safe_to_cache_query= FALSE;
|
|
|
|
/*
|
|
While doing context analysis of the query (in check_prepared_statement)
|
|
we allocate a lot of additional memory: for open tables, JOINs, derived
|
|
tables, etc. Let's save a snapshot of current parse tree to the
|
|
statement and restore original THD. In cases when some tree
|
|
transformation can be reused on execute, we set again thd->mem_root from
|
|
stmt->mem_root (see setup_wild for one place where we do that).
|
|
*/
|
|
thd->restore_active_arena(this, &stmt_backup);
|
|
|
|
/*
|
|
If called from a stored procedure, ensure that we won't rollback
|
|
external changes when cleaning up after validation.
|
|
*/
|
|
DBUG_ASSERT(thd->change_list.is_empty());
|
|
|
|
/*
|
|
The only case where we should have items in the thd->free_list is
|
|
after stmt->set_params_from_vars(), which may in some cases create
|
|
Item_null objects.
|
|
*/
|
|
|
|
if (error == 0)
|
|
error= check_prepared_statement(this, name.str != 0);
|
|
|
|
/* Free sp_head if check_prepared_statement() failed. */
|
|
if (error && lex->sphead)
|
|
{
|
|
delete lex->sphead;
|
|
lex->sphead= NULL;
|
|
}
|
|
lex_end(lex);
|
|
cleanup_stmt();
|
|
thd->restore_backup_statement(this, &stmt_backup);
|
|
thd->stmt_arena= old_stmt_arena;
|
|
|
|
if (error == 0)
|
|
{
|
|
setup_set_params();
|
|
init_stmt_after_parse(lex);
|
|
state= Query_arena::PREPARED;
|
|
flags&= ~ (uint) IS_IN_USE;
|
|
}
|
|
DBUG_RETURN(error);
|
|
}
|
|
|
|
/*
|
|
Execute a prepared statement.
|
|
|
|
SYNOPSIS
|
|
Prepared_statement::execute()
|
|
expanded_query A query for binlogging which has all parameter
|
|
markers ('?') replaced with their actual values.
|
|
open_cursor True if an attempt to open a cursor should be made.
|
|
Currenlty used only in the binary protocol.
|
|
|
|
DESCRIPTION
|
|
You should not change global THD state in this function, if at all
|
|
possible: it may be called from any context, e.g. when executing
|
|
a COM_* command, and SQLCOM_* command, or a stored procedure.
|
|
|
|
NOTES
|
|
Preconditions, postconditions.
|
|
------------------------------
|
|
See the comment for Prepared_statement::prepare().
|
|
|
|
RETURN
|
|
FALSE ok
|
|
TRUE Error
|
|
*/
|
|
|
|
bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
|
{
|
|
Statement stmt_backup;
|
|
Query_arena *old_stmt_arena;
|
|
bool error= TRUE;
|
|
|
|
statistic_increment(thd->status_var.com_stmt_execute, &LOCK_status);
|
|
|
|
/* Check if we got an error when sending long data */
|
|
if (state == Query_arena::ERROR)
|
|
{
|
|
my_message(last_errno, last_error, MYF(0));
|
|
return TRUE;
|
|
}
|
|
if (flags & (uint) IS_IN_USE)
|
|
{
|
|
my_error(ER_PS_NO_RECURSION, MYF(0));
|
|
return TRUE;
|
|
}
|
|
|
|
/*
|
|
For SHOW VARIABLES lex->result is NULL, as it's a non-SELECT
|
|
command. For such queries we don't return an error and don't
|
|
open a cursor -- the client library will recognize this case and
|
|
materialize the result set.
|
|
For SELECT statements lex->result is created in
|
|
check_prepared_statement. lex->result->simple_select() is FALSE
|
|
in INSERT ... SELECT and similar commands.
|
|
*/
|
|
|
|
if (open_cursor && lex->result && !lex->result->simple_select())
|
|
{
|
|
DBUG_PRINT("info",("Cursor asked for not SELECT stmt"));
|
|
my_error(ER_SP_BAD_CURSOR_QUERY, MYF(0));
|
|
return TRUE;
|
|
}
|
|
|
|
/* In case the command has a call to SP which re-uses this statement name */
|
|
flags|= IS_IN_USE;
|
|
|
|
close_cursor();
|
|
|
|
/*
|
|
If the free_list is not empty, we'll wrongly free some externally
|
|
allocated items when cleaning up after execution of this statement.
|
|
*/
|
|
DBUG_ASSERT(thd->change_list.is_empty());
|
|
|
|
/*
|
|
The only case where we should have items in the thd->free_list is
|
|
after stmt->set_params_from_vars(), which may in some cases create
|
|
Item_null objects.
|
|
*/
|
|
|
|
thd->set_n_backup_statement(this, &stmt_backup);
|
|
if (expanded_query->length() &&
|
|
alloc_query(thd, (char*) expanded_query->ptr(),
|
|
expanded_query->length()+1))
|
|
{
|
|
my_error(ER_OUTOFMEMORY, 0, expanded_query->length());
|
|
goto error;
|
|
}
|
|
/*
|
|
Expanded query is needed for slow logging, so we want thd->query
|
|
to point at it even after we restore from backup. This is ok, as
|
|
expanded query was allocated in thd->mem_root.
|
|
*/
|
|
stmt_backup.query= thd->query;
|
|
stmt_backup.query_length= thd->query_length;
|
|
|
|
/*
|
|
At first execution of prepared statement we may perform logical
|
|
transformations of the query tree. Such changes should be performed
|
|
on the parse tree of current prepared statement and new items should
|
|
be allocated in its memory root. Set the appropriate pointer in THD
|
|
to the arena of the statement.
|
|
*/
|
|
old_stmt_arena= thd->stmt_arena;
|
|
thd->stmt_arena= this;
|
|
reinit_stmt_before_use(thd, lex);
|
|
|
|
thd->protocol= protocol; /* activate stmt protocol */
|
|
error= (open_cursor ?
|
|
mysql_open_cursor(thd, (uint) ALWAYS_MATERIALIZED_CURSOR,
|
|
&result, &cursor) :
|
|
mysql_execute_command(thd));
|
|
thd->protocol= &thd->protocol_simple; /* use normal protocol */
|
|
|
|
/* Assert that if an error, no cursor is open */
|
|
DBUG_ASSERT(! (error && cursor));
|
|
|
|
if (! cursor)
|
|
{
|
|
cleanup_stmt();
|
|
reset_stmt_params(this);
|
|
}
|
|
|
|
thd->set_statement(&stmt_backup);
|
|
thd->stmt_arena= old_stmt_arena;
|
|
|
|
if (state == Query_arena::PREPARED)
|
|
state= Query_arena::EXECUTED;
|
|
|
|
error:
|
|
flags&= ~ (uint) IS_IN_USE;
|
|
return error;
|
|
}
|
|
|
|
|
|
/* Common part of DEALLOCATE PREPARE and mysql_stmt_close */
|
|
|
|
bool Prepared_statement::deallocate()
|
|
{
|
|
/* We account deallocate in the same manner as mysql_stmt_close */
|
|
statistic_increment(thd->status_var.com_stmt_close, &LOCK_status);
|
|
if (flags & (uint) IS_IN_USE)
|
|
{
|
|
my_error(ER_PS_NO_RECURSION, MYF(0));
|
|
return TRUE;
|
|
}
|
|
/* Statement map calls delete stmt on erase */
|
|
thd->stmt_map.erase(this);
|
|
return FALSE;
|
|
}
|