Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
3.0.5
-
None
Description
Driver somehow returns 0 colmns for this query. Same query works correctly with MySQL 8.0/MySQL ODBC Connector 8.0
with x as ( |
select 1 as `val` |
union all |
select 2 as `val` |
union all |
select 3 as `val` |
)
|
select repeat(cast(x.val as nchar), x.val * 12000) as `string` |
, repeat(cast(x.val as char), x.val * 12000) as `c_string` |
, cast(repeat(char(x.val), x.val * 12000) as binary) as `binary` |
, x.val as `index` |
from x; |
Relevant part of the trace log:
[ODBC][459][1531695923.138711][SQLExecDirectW.c][177]
|
Entry:
|
Statement = 0x7f4e0a6d9700
|
SQL = [
|
with x as (
|
select 1 as `val`
|
union all
|
...][length = 594]
|
[ODBC][459][1531695923.140973][SQLExecDirectW.c][445]
|
Exit:[SQL_SUCCESS]
|
[ODBC][459][1531695923.140991][SQLNumResultCols.c][156]
|
Entry:
|
Statement = 0x7f4e0a6d9700
|
Column Count = 0x7f4e0a5fa5d4
|
[ODBC][459][1531695923.140999][SQLNumResultCols.c][251]
|
Exit:[SQL_SUCCESS]
|
Count = 0x7f4e0a5fa5d4 -> 0
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Driver somehow returns 0 colmns for this query. Same query works correctly with MySQL 8.0/MySQL ODBC Connector 8.0
{code:sql} with x as ( select 1 as `val` union all select 2 as `val` union all select 3 as `val` ) select repeat(cast(x.val as nchar), x.val * 12000) as `string` , repeat(cast(x.val as char), x.val * 12000) as `c_string` , cast(repeat(char(x.val), x.val * 12000) as binary) as `binary` , x.val as `index` from x; {code} [ODBC][459][1531695923.140991][SQLNumResultCols.c][156] Entry: Statement = 0x7f4e0a6d9700 Column Count = 0x7f4e0a5fa5d4 [ODBC][459][1531695923.140999][SQLNumResultCols.c][251] Exit:[SQL_SUCCESS] Count = 0x7f4e0a5fa5d4 -> 0 |
Driver somehow returns 0 colmns for this query. Same query works correctly with MySQL 8.0/MySQL ODBC Connector 8.0
{code:sql} with x as ( select 1 as `val` union all select 2 as `val` union all select 3 as `val` ) select repeat(cast(x.val as nchar), x.val * 12000) as `string` , repeat(cast(x.val as char), x.val * 12000) as `c_string` , cast(repeat(char(x.val), x.val * 12000) as binary) as `binary` , x.val as `index` from x; {code} Relevant part of the trace log: {code} [ODBC][459][1531695923.138711][SQLExecDirectW.c][177] Entry: Statement = 0x7f4e0a6d9700 SQL = [ with x as ( select 1 as `val` union all ...][length = 594] [ODBC][459][1531695923.140973][SQLExecDirectW.c][445] Exit:[SQL_SUCCESS] [ODBC][459][1531695923.140991][SQLNumResultCols.c][156] Entry: Statement = 0x7f4e0a6d9700 Column Count = 0x7f4e0a5fa5d4 [ODBC][459][1531695923.140999][SQLNumResultCols.c][251] Exit:[SQL_SUCCESS] Count = 0x7f4e0a5fa5d4 -> 0 {code} |
Priority | Major [ 3 ] | Critical [ 2 ] |
issue.field.resolutiondate | 2018-07-17 12:39:23.0 | 2018-07-17 12:39:23.754 |
Component/s | General [ 14302 ] | |
Fix Version/s | 3.0.6 [ 23133 ] | |
Fix Version/s | 2.0.17 [ 23002 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 88429 ] | MariaDB v4 [ 135476 ] |
Thank you for your bug report.
The fix and the testcase have been pushed to odbc-3.0 and master as f0cd063
and are yet to be merged into odbc-2.0
The problem was that connector misinterpreted type of the WITH statement