Loading mysql-test/r/ndb_read_multi_range.result +17 −0 Original line number Diff line number Diff line Loading @@ -442,3 +442,20 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); id tag doc type sakila 1 Some text goes here text DROP TABLE t1; CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2; mysql-test/t/ndb_read_multi_range.test +29 −0 Original line number Diff line number Diff line Loading @@ -272,3 +272,32 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); DROP TABLE t1; #bug#25522 CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; DELIMITER |; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| DELIMITER ;| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2; sql/ha_ndbcluster.cc +3 −2 Original line number Diff line number Diff line Loading @@ -4347,11 +4347,10 @@ int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type) ERR_RETURN(ndb->getNdbError()); no_uncommitted_rows_reset(thd); thd_ndb->stmt= trans; thd_ndb->query_state&= NDB_QUERY_NORMAL; trans_register_ha(thd, FALSE, ndbcluster_hton); } thd_ndb->query_state&= NDB_QUERY_NORMAL; m_active_trans= trans; // Start of statement m_ops_pending= 0; thd->set_current_stmt_binlog_row_based_if_mixed(); Loading Loading @@ -8292,6 +8291,8 @@ ha_ndbcluster::read_multi_range_next(KEY_MULTI_RANGE ** multi_range_found_p) if (multi_range_curr == multi_range_end) { DBUG_MULTI_RANGE(16); Thd_ndb *thd_ndb= get_thd_ndb(current_thd); thd_ndb->query_state&= NDB_QUERY_NORMAL; DBUG_RETURN(HA_ERR_END_OF_FILE); } Loading sql/ha_ndbcluster_binlog.cc +2 −2 Original line number Diff line number Diff line Loading @@ -3924,9 +3924,9 @@ pthread_handler_t ndb_binlog_thread_func(void *arg) "%ld(%d e/s), total time %ld(%d e/s)", (ulong)gci, event_count, write_timer.elapsed_ms(), event_count / write_timer.elapsed_ms(), (1000*event_count) / write_timer.elapsed_ms(), gci_timer.elapsed_ms(), event_count / gci_timer.elapsed_ms()); (1000*event_count) / gci_timer.elapsed_ms()); #endif } } Loading sql/log_event.cc +20 −3 Original line number Diff line number Diff line Loading @@ -5716,10 +5716,27 @@ int Rows_log_event::exec_event(st_relay_log_info *rli) rli->tables_to_lock_count, &need_reopen))) { if (!need_reopen) { if (thd->query_error || thd->is_fatal_error) { /* Error reporting borrowed from Query_log_event with many excessive simplifications (we don't honour --slave-skip-errors) */ uint actual_error= thd->net.last_errno; slave_print_msg(ERROR_LEVEL, rli, actual_error, "Error '%s' in %s event: when locking tables", (actual_error ? thd->net.last_error : "unexpected success or fatal error"), get_type_str()); thd->is_fatal_error= 1; } else { slave_print_msg(ERROR_LEVEL, rli, error, "Error in %s event: when locking tables", get_type_str()); } rli->clear_tables_to_lock(); DBUG_RETURN(error); } Loading Loading
mysql-test/r/ndb_read_multi_range.result +17 −0 Original line number Diff line number Diff line Loading @@ -442,3 +442,20 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); id tag doc type sakila 1 Some text goes here text DROP TABLE t1; CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2;
mysql-test/t/ndb_read_multi_range.test +29 −0 Original line number Diff line number Diff line Loading @@ -272,3 +272,32 @@ SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','orka'); SELECT id, tag, doc, type FROM t1 WHERE id IN ('flipper','sakila'); DROP TABLE t1; #bug#25522 CREATE TABLE t1 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=ndbcluster DEFAULT CHARSET=ascii CHECKSUM=1; CREATE TABLE t2 ( var1 int(2) NOT NULL, var2 int(2) NOT NULL, PRIMARY KEY (var1) ) ENGINE=MyISAM DEFAULT CHARSET=ascii CHECKSUM=1; DELIMITER |; CREATE TRIGGER testtrigger AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.var1 = NEW.var1;END| DELIMITER ;| INSERT INTO t1 VALUES (1,1),(2,2),(3,3); UPDATE t1 SET var2 = 9 WHERE var1 IN(1,2,3); DROP TRIGGER testtrigger; DROP TABLE t1, t2;
sql/ha_ndbcluster.cc +3 −2 Original line number Diff line number Diff line Loading @@ -4347,11 +4347,10 @@ int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type) ERR_RETURN(ndb->getNdbError()); no_uncommitted_rows_reset(thd); thd_ndb->stmt= trans; thd_ndb->query_state&= NDB_QUERY_NORMAL; trans_register_ha(thd, FALSE, ndbcluster_hton); } thd_ndb->query_state&= NDB_QUERY_NORMAL; m_active_trans= trans; // Start of statement m_ops_pending= 0; thd->set_current_stmt_binlog_row_based_if_mixed(); Loading Loading @@ -8292,6 +8291,8 @@ ha_ndbcluster::read_multi_range_next(KEY_MULTI_RANGE ** multi_range_found_p) if (multi_range_curr == multi_range_end) { DBUG_MULTI_RANGE(16); Thd_ndb *thd_ndb= get_thd_ndb(current_thd); thd_ndb->query_state&= NDB_QUERY_NORMAL; DBUG_RETURN(HA_ERR_END_OF_FILE); } Loading
sql/ha_ndbcluster_binlog.cc +2 −2 Original line number Diff line number Diff line Loading @@ -3924,9 +3924,9 @@ pthread_handler_t ndb_binlog_thread_func(void *arg) "%ld(%d e/s), total time %ld(%d e/s)", (ulong)gci, event_count, write_timer.elapsed_ms(), event_count / write_timer.elapsed_ms(), (1000*event_count) / write_timer.elapsed_ms(), gci_timer.elapsed_ms(), event_count / gci_timer.elapsed_ms()); (1000*event_count) / gci_timer.elapsed_ms()); #endif } } Loading
sql/log_event.cc +20 −3 Original line number Diff line number Diff line Loading @@ -5716,10 +5716,27 @@ int Rows_log_event::exec_event(st_relay_log_info *rli) rli->tables_to_lock_count, &need_reopen))) { if (!need_reopen) { if (thd->query_error || thd->is_fatal_error) { /* Error reporting borrowed from Query_log_event with many excessive simplifications (we don't honour --slave-skip-errors) */ uint actual_error= thd->net.last_errno; slave_print_msg(ERROR_LEVEL, rli, actual_error, "Error '%s' in %s event: when locking tables", (actual_error ? thd->net.last_error : "unexpected success or fatal error"), get_type_str()); thd->is_fatal_error= 1; } else { slave_print_msg(ERROR_LEVEL, rli, error, "Error in %s event: when locking tables", get_type_str()); } rli->clear_tables_to_lock(); DBUG_RETURN(error); } Loading