@@ -2292,6 +2292,9 @@ when it try to get the value of TIME_ZONE global variable from master.";
2292
2292
if (unlikely (mysql_real_query (mysql,
2293
2293
STRING_WITH_LEN (" SET skip_replication=1" ))))
2294
2294
{
2295
+ if (check_io_slave_killed (mi, NULL ))
2296
+ goto slave_killed_err;
2297
+
2295
2298
err_code= mysql_errno (mysql);
2296
2299
if (is_network_error (err_code))
2297
2300
{
@@ -2336,6 +2339,9 @@ when it try to get the value of TIME_ZONE global variable from master.";
2336
2339
STRINGIFY_ARG (MARIA_SLAVE_CAPABILITY_MINE))));
2337
2340
if (unlikely (rc))
2338
2341
{
2342
+ if (check_io_slave_killed (mi, NULL ))
2343
+ goto slave_killed_err;
2344
+
2339
2345
err_code= mysql_errno (mysql);
2340
2346
if (is_network_error (err_code))
2341
2347
{
@@ -2377,6 +2383,9 @@ when it try to get the value of TIME_ZONE global variable from master.";
2377
2383
!(master_res= mysql_store_result (mysql)) ||
2378
2384
!(master_row= mysql_fetch_row (master_res)))
2379
2385
{
2386
+ if (check_io_slave_killed (mi, NULL ))
2387
+ goto slave_killed_err;
2388
+
2380
2389
err_code= mysql_errno (mysql);
2381
2390
if (is_network_error (err_code))
2382
2391
{
@@ -2412,6 +2421,9 @@ when it try to get the value of TIME_ZONE global variable from master.";
2412
2421
rc= mysql_real_query (mysql, query_str.ptr (), query_str.length ());
2413
2422
if (unlikely (rc))
2414
2423
{
2424
+ if (check_io_slave_killed (mi, NULL ))
2425
+ goto slave_killed_err;
2426
+
2415
2427
err_code= mysql_errno (mysql);
2416
2428
if (is_network_error (err_code))
2417
2429
{
@@ -2445,6 +2457,9 @@ when it try to get the value of TIME_ZONE global variable from master.";
2445
2457
rc= mysql_real_query (mysql, query_str.ptr (), query_str.length ());
2446
2458
if (unlikely (rc))
2447
2459
{
2460
+ if (check_io_slave_killed (mi, NULL ))
2461
+ goto slave_killed_err;
2462
+
2448
2463
err_code= mysql_errno (mysql);
2449
2464
if (is_network_error (err_code))
2450
2465
{
@@ -2478,6 +2493,9 @@ when it try to get the value of TIME_ZONE global variable from master.";
2478
2493
rc= mysql_real_query (mysql, query_str.ptr (), query_str.length ());
2479
2494
if (unlikely (rc))
2480
2495
{
2496
+ if (check_io_slave_killed (mi, NULL ))
2497
+ goto slave_killed_err;
2498
+
2481
2499
err_code= mysql_errno (mysql);
2482
2500
if (is_network_error (err_code))
2483
2501
{
@@ -2514,6 +2532,9 @@ when it try to get the value of TIME_ZONE global variable from master.";
2514
2532
rc= mysql_real_query (mysql, query_str.ptr (), query_str.length ());
2515
2533
if (unlikely (rc))
2516
2534
{
2535
+ if (check_io_slave_killed (mi, NULL ))
2536
+ goto slave_killed_err;
2537
+
2517
2538
err_code= mysql_errno (mysql);
2518
2539
if (is_network_error (err_code))
2519
2540
{
@@ -3658,7 +3679,7 @@ static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings,
3658
3679
}
3659
3680
else
3660
3681
{
3661
- if (!mi->rli .abort_slave )
3682
+ if (!( mi->rli .abort_slave || io_slave_killed (mi)) )
3662
3683
{
3663
3684
sql_print_error (" Error reading packet from server: %s (server_errno=%d)" ,
3664
3685
mysql_error (mysql), mysql_errno (mysql));
@@ -7432,7 +7453,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi,
7432
7453
mi->port , 0 , client_flag) == 0 ))
7433
7454
{
7434
7455
/* Don't repeat last error */
7435
- if ((int )mysql_errno (mysql) != last_errno)
7456
+ if ((int )mysql_errno (mysql) != last_errno && ! io_slave_killed (mi) )
7436
7457
{
7437
7458
last_errno=mysql_errno (mysql);
7438
7459
suppress_warnings= 0 ;
0 commit comments