Skip to content

Commit e4688a2

Browse files
committed
Bug#26625542 Fix locking issue when server closes connection
1 parent b4888b8 commit e4688a2

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

cdk/foundation/connection_yassl.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ bool TLS::Read_op::common_read()
378378

379379
int result = yaSSL::SSL_read(impl.m_tls, data, buffer_size);
380380

381+
if (result == -1)
382+
throw IO_error(yaSSL::SSL_get_error(impl.m_tls,0));
383+
381384
if (result > 0)
382385
{
383386
m_currentBufferOffset += result;

xapi/tests/xapi_crud-t.cc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,3 +2572,21 @@ TEST_F(xapi, test_decimal_type)
25722572

25732573
mysqlx_schema_drop(get_session(), "xapi_dec_test");
25742574
}
2575+
2576+
TEST_F(xapi_bugs, session_invalid_password_deadlock)
2577+
{
2578+
SKIP_IF_NO_XPLUGIN
2579+
2580+
char conn_error[MYSQLX_MAX_ERROR_LEN] = { 0 };
2581+
int conn_err_code;
2582+
2583+
auto sess = mysqlx_get_session(m_xplugin_host,
2584+
m_port,
2585+
m_xplugin_usr,
2586+
"bal_xplugin_pwd",
2587+
NULL,
2588+
conn_error,
2589+
&conn_err_code);
2590+
2591+
EXPECT_EQ(NULL, sess);
2592+
}

0 commit comments

Comments
 (0)