-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-28105 Return error in ha_spider::write_row() if info(HA_STATUS_A…
…UTO) fails Spider calls info with HA_STATUS_AUTO to update auto increment info, which may attempt to connect the data node. If the connection fails, it may emit an error and return the same error. This error should not be of lower priority than any possible error from the later call to handler::update_auto_increment(). Without this change, certain errors from update_auto_increment() such as HA_ERR_AUTOINC_ERANGE may get ignored, causing my_insert() to call my_ok(), which fails the assertion because the error was emitted in the info() call (Diagnostics_area::is_set() returns true).
- Loading branch information
1 parent
a6ae1c2
commit fd76746
Showing
4 changed files
with
25 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
storage/spider/mysql-test/spider/bugfix/r/mdev_28105.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
install soname 'ha_spider'; | ||
Warnings: | ||
Warning 1105 Cannot enable tc-log at run-time. XA features of SPIDER are disabled | ||
SET @@insert_id=128; | ||
CREATE TABLE t(c TINYINT AUTO_INCREMENT KEY) ENGINE=Spider; | ||
INSERT IGNORE INTO t VALUES(0); | ||
ERROR HY000: Unable to connect to foreign data source: localhost | ||
drop table t; | ||
Warnings: | ||
Warning 1620 Plugin is busy and will be uninstalled on shutdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--skip-log-bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
install soname 'ha_spider'; | ||
SET @@insert_id=128; # 127 does not crash | ||
CREATE TABLE t(c TINYINT AUTO_INCREMENT KEY) ENGINE=Spider; | ||
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE | ||
INSERT IGNORE INTO t VALUES(0); | ||
drop table t; | ||
--disable_query_log | ||
--source ../../include/clean_up_spider.inc |