mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.6 into 10.11
This commit is contained in:
@ -5976,14 +5976,20 @@ int connect_n_handle_errors(struct st_command *command,
|
||||
stay clear of trying to work out which exact user-limit was
|
||||
exceeded.
|
||||
*/
|
||||
auto my_err= mysql_errno(con);
|
||||
if(my_err == 0)
|
||||
{
|
||||
/* Workaround client library bug, not indicating connection error. */
|
||||
my_err= CR_SERVER_LOST;
|
||||
}
|
||||
|
||||
if (((mysql_errno(con) == ER_TOO_MANY_USER_CONNECTIONS) ||
|
||||
(mysql_errno(con) == ER_USER_LIMIT_REACHED)) &&
|
||||
if (((my_err == ER_TOO_MANY_USER_CONNECTIONS) ||
|
||||
(my_err == ER_USER_LIMIT_REACHED)) &&
|
||||
(failed_attempts++ < opt_max_connect_retries))
|
||||
{
|
||||
int i;
|
||||
|
||||
i= match_expected_error(command, mysql_errno(con), mysql_sqlstate(con));
|
||||
i= match_expected_error(command, my_err, mysql_sqlstate(con));
|
||||
|
||||
if (i >= 0)
|
||||
goto do_handle_error; /* expected error, handle */
|
||||
@ -5993,8 +5999,8 @@ int connect_n_handle_errors(struct st_command *command,
|
||||
}
|
||||
|
||||
do_handle_error:
|
||||
var_set_errno(mysql_errno(con));
|
||||
handle_error(command, mysql_errno(con), mysql_error(con),
|
||||
var_set_errno(my_err);
|
||||
handle_error(command, my_err, mysql_error(con),
|
||||
mysql_sqlstate(con), ds);
|
||||
return 0; /* Not connected */
|
||||
}
|
||||
|
@ -398,7 +398,8 @@ sub collect_suite_name($$)
|
||||
{
|
||||
my @dirs = my_find_dir(dirname($::glob_mysql_test_dir),
|
||||
["mysql-test/suite", @plugin_suitedirs ],
|
||||
$suitename);
|
||||
$suitename,
|
||||
$::opt_skip_not_found ? NOT_REQUIRED : undef);
|
||||
#
|
||||
# if $suitename contained wildcards, we'll have many suites and
|
||||
# their overlays here. Let's group them appropriately.
|
||||
|
@ -1158,7 +1158,9 @@ SELECT JSON_REMOVE('{"A": { "B": 1 }}', '$.A.B.C.D');
|
||||
SET @save_collation_connection= @@collation_connection;
|
||||
|
||||
SET collation_connection='utf16_bin';
|
||||
--disable_service_connection
|
||||
SELECT JSON_EXTRACT('{"a": 1,"b": 2}','$.a');
|
||||
--enable_service_connection
|
||||
|
||||
SET @@collation_connection= @save_collation_connection;
|
||||
|
||||
|
@ -3205,6 +3205,15 @@ static void start_signal_handler(void)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/** Called only from signal_hand function. */
|
||||
static void* exit_signal_handler()
|
||||
{
|
||||
my_thread_end();
|
||||
signal_thread_in_use= 0;
|
||||
pthread_exit(0); // Safety
|
||||
return nullptr; // Avoid compiler warnings
|
||||
}
|
||||
|
||||
|
||||
/** This threads handles all signals and alarms. */
|
||||
/* ARGSUSED */
|
||||
@ -3265,10 +3274,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
|
||||
if (abort_loop)
|
||||
{
|
||||
DBUG_PRINT("quit",("signal_handler: calling my_thread_end()"));
|
||||
my_thread_end();
|
||||
signal_thread_in_use= 0;
|
||||
pthread_exit(0); // Safety
|
||||
return 0; // Avoid compiler warnings
|
||||
return exit_signal_handler();
|
||||
}
|
||||
switch (sig) {
|
||||
case SIGTERM:
|
||||
@ -3287,6 +3293,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused)))
|
||||
PSI_CALL_delete_current_thread();
|
||||
my_sigset(sig, SIG_IGN);
|
||||
break_connect_loop(); // MIT THREAD has a alarm thread
|
||||
return exit_signal_handler();
|
||||
}
|
||||
break;
|
||||
case SIGHUP:
|
||||
|
@ -0,0 +1,9 @@
|
||||
INSTALL PLUGIN Spider SONAME 'ha_spider.so';
|
||||
CREATE TABLE t (c DATE, c2 VARCHAR(1025) CHARACTER SET utf8mb3, UNIQUE KEY k(c2)) ENGINE=SPIDER;
|
||||
UPDATE t SET c='2';
|
||||
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
|
||||
Note 1305 PLUGIN SPIDER_ALLOC_MEM does not exist
|
||||
Note 1305 PLUGIN SPIDER_WRAPPER_PROTOCOLS does not exist
|
@ -0,0 +1,7 @@
|
||||
INSTALL PLUGIN Spider SONAME 'ha_spider.so';
|
||||
CREATE TABLE t (c DATE, c2 VARCHAR(1025) CHARACTER SET utf8mb3, UNIQUE KEY k(c2)) ENGINE=SPIDER;
|
||||
--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE
|
||||
UPDATE t SET c='2';
|
||||
drop table t;
|
||||
--disable_query_log
|
||||
--source ../../include/clean_up_spider.inc
|
@ -1109,8 +1109,8 @@ public:
|
||||
spider_db_share *db_share;
|
||||
int first_link_idx;
|
||||
SPIDER_LINK_IDX_CHAIN *link_idx_chain;
|
||||
bool strict_group_by;
|
||||
bool no_where_cond;
|
||||
bool strict_group_by= false;
|
||||
bool no_where_cond= false;
|
||||
spider_db_handler(ha_spider *spider, spider_db_share *db_share) :
|
||||
dbton_id(db_share->dbton_id), spider(spider), db_share(db_share),
|
||||
first_link_idx(-1) {}
|
||||
|
Reference in New Issue
Block a user