mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 15:54:37 +01:00
37b5cbdc30
invocations of LAST_INSERT_ID. Reding of LAST_INSERT_ID inside stored function wasn't noted by caller, and no LAST_INSERT_ID_EVENT was issued for binary log. The solution is to add THD::last_insert_id_used_bin_log, which is much like THD::last_insert_id_used, but is reset only for upper-level statements. This new variable is used to issue LAST_INSERT_ID_EVENT. mysql-test/r/rpl_insert_id.result: For bug#21726, add result for statement-based replication of function calls. mysql-test/t/rpl_insert_id.test: For bug#21726, add test case for statement-based replication of function calls. sql/item_func.cc: Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT. sql/log.cc: Issue LAST_INSERT_ID_EVENT if THD::last_insert_id_used_bin_log is set. sql/set_var.cc: Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT. sql/sql_class.cc: Initialize THD::last_insert_id_used_bin_log. Fix typo, add whitespace. sql/sql_class.h: Add THD::last_insert_id_used_bin_log. sql/sql_parse.cc: Reset THD::last_insert_id_used_bin_log for upper-level statements. sql/sql_select.cc: Set THD::last_insert_id_used_bin_log for issuing of LAST_INSERT_ID_EVENT.
11 lines
472 B
Text
11 lines
472 B
Text
#################################
|
|
# Wrapper for rpl_insert_id.test#
|
|
#################################
|
|
########################################################
|
|
# By JBM 2005-02-15 Wrapped to allow reuse of test code#
|
|
# Added to skip if ndb is default #
|
|
########################################################
|
|
-- source include/not_ndb_default.inc
|
|
-- source include/have_innodb.inc
|
|
let $engine_type=innodb;
|
|
-- source extra/rpl_tests/rpl_insert_id.test
|