1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge 10.11 into 11.2

This commit is contained in:
Marko Mäkelä
2024-10-03 13:24:43 +03:00
548 changed files with 5714 additions and 1374 deletions

View File

@ -1384,7 +1384,7 @@ void do_handle_one_connection(CONNECT *connect, bool put_in_cache)
THD *thd;
if (!(thd= connect->create_thd(NULL)))
{
connect->close_and_delete();
connect->close_and_delete(0);
return;
}
@ -1459,7 +1459,7 @@ end_thread:
if (!(connect->create_thd(thd)))
{
/* Out of resources. Free thread to get more resources */
connect->close_and_delete();
connect->close_and_delete(0);
break;
}
delete connect;
@ -1488,9 +1488,11 @@ end_thread:
Close connection without error and delete the connect object
This and close_with_error are only called if we didn't manage to
create a new thd object.
Note: err can be 0 if unknown/not inportant
*/
void CONNECT::close_and_delete()
void CONNECT::close_and_delete(uint err)
{
DBUG_ENTER("close_and_delete");
@ -1504,7 +1506,11 @@ void CONNECT::close_and_delete()
vio_type= VIO_CLOSED;
--*scheduler->connection_count;
statistic_increment(connection_errors_internal, &LOCK_status);
if (err == ER_CON_COUNT_ERROR)
statistic_increment(connection_errors_max_connection, &LOCK_status);
else
statistic_increment(connection_errors_internal, &LOCK_status);
statistic_increment(aborted_connects,&LOCK_status);
delete this;
@ -1528,7 +1534,7 @@ void CONNECT::close_with_error(uint sql_errno,
delete thd;
set_current_thd(0);
}
close_and_delete();
close_and_delete(close_error);
}