[MDEV-5343] ConnectSE: ODBC: CATFUNC=Tables and CATFUNC=Columns crash when running against a data source with many tables Created: 2013-11-26 Updated: 2013-12-05 Resolved: 2013-12-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This is a stack trace:
The crash happens because pval[i] is NULL at this point:
|
| Comments |
| Comment by Alexander Barkov [ 2013-11-26 ] |
|
The same problem is repeatable with an MS SQL Server data source. |
| Comment by Olivier Bertrand [ 2013-11-27 ] |
|
Your create table is incorrect: "create table t1 (a varchar(10)) engine=connect table_type=odbc connection='DSN=oraodbc;UID=system;PWD=manager' catfunc=Columns;" The column definition is for a catfunc table, it is not the one of the table that is queried. The simpler is to leave CONNECT define them by not specifying it: create table ct1 engine=connect table_type=odbc tabname='t1' connection='DSN=oraodbc;UID=system;PWD=manager' catfunc=Columns; CREATE TABLE `ct1` ( and "select * from ct1;" returns: Table_Qualif Table_Owner Table_Name Column_Name Data_Type Type_Name Precision Length Scale Radix Nullable Remarks Note 1: On windows the wrong catfunc table does not cause a "lost connection" but returns an error message saying: Note 2: The Oracle t1 table was created as "create table t1 (a int)". Oracle makes a DECIMAL 38 column a. This is probably the cause of the Note 3: This obviously applies also to any data source including MS SQL Server. |
| Comment by Alexander Barkov [ 2013-11-27 ] |
|
This query without a table definition crashes with Oracle with the same symptoms: drop table if exists t1; ERROR 2013 (HY000): Lost connection to MySQL server during query |
| Comment by Alexander Barkov [ 2013-12-05 ] |
|
The problem is repeatable with any data source having many tables (400+). |
| Comment by Alexander Barkov [ 2013-12-05 ] |
|
Fixed in 10.0-connect. |