You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Arrow Flight SQL] DDL statements via Flight SQL crash with getMysqlChannel RuntimeException after 4.0.5 CLIENT_DEPRECATE_EOF fix #62017
java.lang.RuntimeException: getMysqlChannel not in mysql connection
This is a regression introduced in 4.0.5 (works in 4.0.3). The root cause is commit 1a8590e0b22 ("fix Support CLIENT_DEPRECATE_EOF to fix empty result with MySQL driver 9.5.0 #61050 (#61062)").
Root Cause Analysis
The CLIENT_DEPRECATE_EOF fix added context.getMysqlChannel().clientDeprecatedEOF() calls in StmtExecutor.java at two locations (lines ~1537 and ~1587):
if (!context.getMysqlChannel().clientDeprecatedEOF()) {
// send EOF packet
}
These code paths are also traversed during Flight SQL DDL execution. However, FlightSqlConnectContext.getMysqlChannel() throws RuntimeException("getMysqlChannel not in mysql connection") (see FlightSqlConnectContext.java:54-56), because Flight SQL does not use MySQL channels.
The fix should add a connectType check before calling getMysqlChannel():
INTERNAL: [FlightSQL] get flight info statement failed, after executeQueryStatement handleQuery,
java.lang.RuntimeException: after executeQueryStatement handleQuery, error code: ERR_UNKNOWN_ERROR,
error msg: RuntimeException, msg: getMysqlChannel not in mysql connection (Internal; ExecuteQuery)
at org.apache.doris.service.arrowflight.sessions.FlightSqlConnectContext.getMysqlChannel(FlightSqlConnectContext.java:55)
at org.apache.doris.qe.StmtExecutor.sendFields(StmtExecutor.java:1537)
What you expected to happen
DDL statements should execute successfully via Arrow Flight SQL, as they did in 4.0.3.
How to reproduce
Connect to Doris 4.0.5 using ADBC Flight SQL client (e.g., adbc_driver_flightsql)
Execute any DDL statement:
importadbc_driver_flightsql.dbapiasflight_sqlconn=flight_sql.connect(uri="grpc://fe-host:8070", db_kwargs={"username": "root", "password": "pass"})
cursor=conn.cursor()
cursor.execute("CREATE DATABASE IF NOT EXISTS test_db") # CRASHES
Error: RuntimeException: getMysqlChannel not in mysql connection
Anything else
Workaround: Execute DDL statements via the HTTP SQL API (POST /api/query/{catalog}/{db}) instead of Flight SQL.
We're closing this issue because it hasn't been updated in a while.
If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!
Activity
[fix](arrow-flight) Fix DDL via Flight SQL crashing with getMysqlChan…
github-actions commentedon Sep 29, 2026
We're closing this issue because it hasn't been updated in a while.
If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!