Skip to content

Commit 6d5633f

Browse files
committed
Use constant instead of comment in MySQL2Adapter
1 parent bc601a9 commit 6d5633f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def perform_query(raw_connection, sql, binds, type_casted_binds, prepare:, notif
7070
# but the client doesn't know it.
7171
# But we know that this error is safe to retry, so we do so after
7272
# getting rid of the originally cached statement.
73-
if error.error_number == 1243 # ER_UNKNOWN_STMT_HANDLER
73+
if error.error_number == ER_UNKNOWN_STMT_HANDLER
7474
if retry_count.positive?
7575
retry_count -= 1
7676
retry

activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class Mysql2Adapter < AbstractMysqlAdapter
1313
ER_BAD_DB_ERROR = 1049
1414
ER_DBACCESS_DENIED_ERROR = 1044
1515
ER_ACCESS_DENIED_ERROR = 1045
16+
ER_UNKNOWN_STMT_HANDLER = 1243
1617
ER_CONN_HOST_ERROR = 2003
1718
ER_UNKNOWN_HOST_ERROR = 2005
1819

0 commit comments

Comments
 (0)