Repository navigation
Commit eca9d59
committed
[fix](arrow-flight) Fix DDL via Flight SQL crashing with getMysqlChannel RuntimeException
Problem:
DDL statements (CREATE DATABASE, CREATE TABLE, etc.) executed via Arrow
Flight SQL crash with RuntimeException: 'getMysqlChannel not in mysql
connection'. This is a regression in 4.0.5 caused by commit 1a8590e
which added context.getMysqlChannel().clientDeprecatedEOF() calls in
sendFields() without checking connectType.
Root cause:
FlightSqlConnectContext.getMysqlChannel() throws RuntimeException because
Flight SQL does not use MySQL channels. The CLIENT_DEPRECATE_EOF fix
(apache#61050/apache#61062) added getMysqlChannel() calls to code paths shared with
Flight SQL DDL execution:
- sendFields() at line 1728
- sendMetaData() at line 1614
- sendStmtPrepareOK() at line 1647
Fix:
Replace Preconditions.checkState(connectType == MYSQL) with early return
for non-MySQL connections. This follows the existing pattern used in
handleQueryStmt() (line 1259) and InsertIntoTableCommand (line 383).
Fixes apache#620171 parent 5ff9558 commit eca9d59
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1611 | 1611 | | |
1612 | 1612 | | |
1613 | 1613 | | |
1614 | | - | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
1615 | 1617 | | |
1616 | 1618 | | |
1617 | 1619 | | |
| |||
1644 | 1646 | | |
1645 | 1647 | | |
1646 | 1648 | | |
1647 | | - | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1648 | 1652 | | |
1649 | 1653 | | |
1650 | 1654 | | |
| |||
1725 | 1729 | | |
1726 | 1730 | | |
1727 | 1731 | | |
1728 | | - | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
1729 | 1735 | | |
1730 | 1736 | | |
1731 | 1737 | | |
| |||
0 commit comments