[MDEV-5389] ConnectSE: ODBC: crash if no DSN specified Created: 2013-12-05  Updated: 2013-12-10  Resolved: 2013-12-10

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.6
Fix Version/s: 10.0.7

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None


 Description   

If a user erroneously doesn't specify a DSN name in the connection string, e.g. like this:

drop table if exists t1;
create table t1 engine=connect  table_type=odbc connection='' catfunc=Tables;
select * from t1;

It crashes with the following stack trace:

#0  0x00000037cbc4fb06 in _getUIPluginName () from /lib64/libodbc.so.2
#1  0x00000037cbc52c00 in _SQLDriverConnectPrompt () from /lib64/libodbc.so.2
#2  0x00000037cbc14523 in SQLDriverConnect () from /lib64/libodbc.so.2
#3  0x0000000000d1c11c in ODBConn::Connect (this=0x7fffaf000458, Options=2)
    at /home/bar/maria-bzr/maria-10.0-connect/storage/connect/odbconn.cpp:1133
#4  0x0000000000d1bdd6 in ODBConn::Open (this=0x7fffaf000458, 
    ConnectString=0x7fffaf000380 "", options=2)
    at /home/bar/maria-bzr/maria-10.0-connect/storage/connect/odbconn.cpp:1023
#5  0x0000000000d1b253 in ODBCTables (g=0x7fffb4507000, dsn=0x7fffaf000380 "", 
    tabpat=0x0, info=false)
    at /home/bar/maria-bzr/maria-10.0-connect/storage/connect/odbconn.cpp:557
  ...



 Comments   
Comment by Alexander Barkov [ 2013-12-10 ]

Fix problem was fixed by Olivier in 10.0-connect.
revno: 3918
message: Suppress eventual prompting when connecting to an ODBC source

Tests added in:
revno:3919
message: Adding basic ODBC tests that do not need a DSN

Comment by Alexander Barkov [ 2013-12-10 ]

s/Fix problem/This problem

Generated at Thu Feb 08 07:03:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.