I've installed Informix 11..70 from this binaries:
rw-rw-r- 1 openxs openxs 483799040 вер 11 17:31 iif.11.70.FC8DE.linux-x86_64.tar
and tried to use CONNECT engine via their ODBC driver to work with Informix table:
create table t1(id int, c1 int);
I'll skip installation details, odbs.ini and odbcinst.ini etc for now (available at request). Everything works until I try to create a table without providing columns:
MariaDB [test]> create table informix_t3(id int, c1 int) engine=connect table_type=ODBC tabname='t1' dbname='test' connection='dsn=inf';
|
Query OK, 0 rows affected (0,06 sec)
|
|
MariaDB [test]> select * from informix_t3;
|
+------+------+
|
| id | c1 |
|
+------+------+
|
| 1 | 2 |
|
+------+------+
|
1 row in set (0,03 sec)
|
|
MariaDB [test]> select version();
|
+-----------------+
|
| version() |
|
+-----------------+
|
| 10.2.19-MariaDB |
|
+-----------------+
|
1 row in set (0,00 sec)
|
|
MariaDB [test]> create table informix_t11 engine=connect table_type=ODBC tabname='T1' dbschema='TEST' connection='dsn=inf';
|
ERROR 2013 (HY000): Lost connection to MySQL server during query
|
MariaDB [test]>
|
In gdb I see the following backtrace:
(gdb) c
|
Continuing.
|
[New Thread 0x7f833d3f6700 (LWP 20265)]
|
|
Program received signal SIGSEGV, Segmentation fault.
|
[Switching to Thread 0x7f833d3f6700 (LWP 20265)]
|
__strncpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:2743
|
2743 ../sysdeps/x86_64/multiarch/strcpy-ssse3.S: No such file or directory.
|
(gdb) bt
|
#0 __strncpy_ssse3 () at ../sysdeps/x86_64/multiarch/strcpy-ssse3.S:2743
|
#1 0x00007f833e47d02b in strncpy (__len=18446744073709551615,
|
__src=<optimized out>, __dest=<optimized out>)
|
at /usr/include/x86_64-linux-gnu/bits/string3.h:120
|
#2 TYPVAL<char*>::SetValue_char (this=0x7f82d011dc70, cp=<optimized out>,
|
n=-1) at /home/openxs/git/server/storage/connect/value.cpp:1384
|
#3 0x00007f833e4a5d5a in ODBConn::GetCatInfo (this=this@entry=0x7f82cffff048,
|
cap=0x7f82d00baf08)
|
at /home/openxs/git/server/storage/connect/odbconn.cpp:2441
|
#4 0x00007f833e4a6cc4 in ODBCColumns (g=g@entry=0x7f82d403b610,
|
dsn=dsn@entry=0x7f82cffff018 "dsn=inf", db=db@entry=0x0,
|
table=table@entry=0x7f82d4039578 "", colpat=colpat@entry=0x0,
|
maxres=<optimized out>, maxres@entry=0, info=false,
|
sop=sop@entry=0x7f82cffff020)
|
at /home/openxs/git/server/storage/connect/odbconn.cpp:406
|
#5 0x00007f833e41ddfd in connect_assisted_discovery (thd=0x7f82d4016738,
|
table_s=0x7f833d3f3250, create_info=0x7f833d3f3d80)
|
at /home/openxs/git/server/storage/connect/ha_connect.cc:5781
|
#6 0x00007f83432bc2c8 in create_table_impl (thd=thd@entry=0x7f82d4016738,
|
orig_db=orig_db@entry=0x7f82d40204a0 "",
|
orig_table_name=orig_table_name@entry=0x7f82d401fe48 "",
|
db=db@entry=0x7f82d40204a0 "",
|
table_name=table_name@entry=0x7f82d401fe48 "",
|
path=path@entry=0x7f833d3f3920 "./test/informix_t1", options=...,
|
create_info=create_info@entry=0x7f833d3f3d80,
|
alter_info=alter_info@entry=0x7f833d3f3cd0,
|
create_table_mode=create_table_mode@entry=-3,
|
is_trans=is_trans@entry=0x7f833d3f3b9f,
|
key_info=key_info@entry=0x7f833d3f3908,
|
key_count=key_count@entry=0x7f833d3f3904, frm=frm@entry=0x7f833d3f3910)
|
at /home/openxs/git/server/sql/sql_table.cc:4875
|
#7 0x00007f83432bcb4a in mysql_create_table_no_lock (
|
thd=thd@entry=0x7f82d4016738, db=db@entry=0x7f82d40204a0 "",
|
table_name=table_name@entry=0x7f82d401fe48 "",
|
create_info=create_info@entry=0x7f833d3f3d80,
|
alter_info=alter_info@entry=0x7f833d3f3cd0,
|
is_trans=is_trans@entry=0x7f833d3f3b9f, create_table_mode=-3)
|
at /home/openxs/git/server/sql/sql_table.cc:5019
|
#8 0x00007f83432bcccf in mysql_create_table (thd=thd@entry=0x7f82d4016738,
|
create_table=create_table@entry=0x7f82d401fe90,
|
create_info=create_info@entry=0x7f833d3f3d80,
|
alter_info=alter_info@entry=0x7f833d3f3cd0)
|
at /home/openxs/git/server/sql/sql_table.cc:5082
|
#9 0x00007f8343242c2d in mysql_execute_command (thd=thd@entry=0x7f82d4016738)
|
at /home/openxs/git/server/sql/sql_parse.cc:3988
|
#10 0x00007f834324395f in mysql_parse (thd=0x7f82d4016738,
|
rawbuf=<optimized out>, length=<optimized out>,
|
parser_state=0x7f833d3f5260, is_com_multi=<optimized out>,
|
is_next_command=<optimized out>)
|
at /home/openxs/git/server/sql/sql_parse.cc:8011
|
#11 0x00007f8343246aa6 in dispatch_command (command=command@entry=COM_QUERY,
|
thd=thd@entry=0x7f82d4016738, packet=packet@entry=0x7f82d400a2f9 "",
|
packet_length=packet_length@entry=105,
|
is_com_multi=is_com_multi@entry=false,
|
is_next_command=is_next_command@entry=false)
|
at /home/openxs/git/server/sql/sql_parse.cc:1824
|
#12 0x00007f8343247418 in do_command (thd=0x7f82d4016738)
|
at /home/openxs/git/server/sql/sql_parse.cc:1378
|
#13 0x00007f83433029cc in do_handle_one_connection (
|
connect=connect@entry=0x7f83468f7b08)
|
at /home/openxs/git/server/sql/sql_connect.cc:1335
|
#14 0x00007f8343302ae4 in handle_one_connection (arg=0x7f83468f7b08)
|
at /home/openxs/git/server/sql/sql_connect.cc:1241
|
#15 0x00007f834126e184 in start_thread (arg=0x7f833d3f6700)
|
at pthread_create.c:312
|
#16 0x00007f834077b03d in clone ()
|
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
|
I think this is somewhat similar to MDEV-9414, but with other ODBC driver and database used.
{"report":{"fcp":1070.9000000953674,"ttfb":255.80000007152557,"pageVisibility":"visible","entityId":70058,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6d23d3e0-87a5-4527-81aa-f8acbfac144b","navigationType":0,"readyForUser":1152.6000000238419,"redirectCount":0,"resourceLoadedEnd":719.8000000715256,"resourceLoadedStart":262.3000000715256,"resourceTiming":[{"duration":188.69999992847443,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":262.3000000715256,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":262.3000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":451,"responseStart":0,"secureConnectionStart":0},{"duration":188.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":262.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":262.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":451.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":365.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":262.7000000476837,"connectEnd":262.7000000476837,"connectStart":262.7000000476837,"domainLookupEnd":262.7000000476837,"domainLookupStart":262.7000000476837,"fetchStart":262.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":453.8000000715256,"responseEnd":628.6000000238419,"responseStart":488.7000000476837,"secureConnectionStart":262.7000000476837},{"duration":456.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":262.90000009536743,"connectEnd":262.90000009536743,"connectStart":262.90000009536743,"domainLookupEnd":262.90000009536743,"domainLookupStart":262.90000009536743,"fetchStart":262.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":456.3000000715256,"responseEnd":719.8000000715256,"responseStart":492.10000002384186,"secureConnectionStart":262.90000009536743},{"duration":231.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":263,"connectEnd":263,"connectStart":263,"domainLookupEnd":263,"domainLookupStart":263,"fetchStart":263,"redirectEnd":0,"redirectStart":0,"requestStart":457,"responseEnd":494.7000000476837,"responseStart":491.60000002384186,"secureConnectionStart":263},{"duration":232.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":263.2000000476837,"connectEnd":263.2000000476837,"connectStart":263.2000000476837,"domainLookupEnd":263.2000000476837,"domainLookupStart":263.2000000476837,"fetchStart":263.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":457.10000002384186,"responseEnd":495.40000009536743,"responseStart":493.5,"secureConnectionStart":263.2000000476837},{"duration":231.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":263.5,"connectEnd":263.5,"connectStart":263.5,"domainLookupEnd":263.5,"domainLookupStart":263.5,"fetchStart":263.5,"redirectEnd":0,"redirectStart":0,"requestStart":457.8000000715256,"responseEnd":495.10000002384186,"responseStart":492.60000002384186,"secureConnectionStart":263.5},{"duration":193.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":263.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":263.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":456.8000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":236.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":263.8000000715256,"connectEnd":263.8000000715256,"connectStart":263.8000000715256,"domainLookupEnd":263.8000000715256,"domainLookupStart":263.8000000715256,"fetchStart":263.8000000715256,"redirectEnd":0,"redirectStart":0,"requestStart":459.90000009536743,"responseEnd":500.40000009536743,"responseStart":498.60000002384186,"secureConnectionStart":263.8000000715256},{"duration":194.80000007152557,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":264,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":264,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":458.8000000715256,"responseStart":0,"secureConnectionStart":0},{"duration":238.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":264.10000002384186,"connectEnd":264.10000002384186,"connectStart":264.10000002384186,"domainLookupEnd":264.10000002384186,"domainLookupStart":264.10000002384186,"fetchStart":264.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":462.40000009536743,"responseEnd":502.5,"responseStart":501.10000002384186,"secureConnectionStart":264.10000002384186},{"duration":434.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":265,"connectEnd":265,"connectStart":265,"domainLookupEnd":265,"domainLookupStart":265,"fetchStart":265,"redirectEnd":0,"redirectStart":0,"requestStart":502.8000000715256,"responseEnd":699.7000000476837,"responseStart":696.8000000715256,"secureConnectionStart":265},{"duration":449.1999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":269.40000009536743,"connectEnd":269.40000009536743,"connectStart":269.40000009536743,"domainLookupEnd":269.40000009536743,"domainLookupStart":269.40000009536743,"fetchStart":269.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":565.2000000476837,"responseEnd":718.6000000238419,"responseStart":716.3000000715256,"secureConnectionStart":269.40000009536743},{"duration":174.70000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":821.7000000476837,"connectEnd":821.7000000476837,"connectStart":821.7000000476837,"domainLookupEnd":821.7000000476837,"domainLookupStart":821.7000000476837,"fetchStart":821.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":959.7000000476837,"responseEnd":996.4000000953674,"responseStart":995.5,"secureConnectionStart":821.7000000476837}],"fetchStart":0,"domainLookupStart":28,"domainLookupEnd":34,"connectStart":34,"connectEnd":55,"secureConnectionStart":43,"requestStart":55,"responseStart":256,"responseEnd":260,"domLoading":259,"domInteractive":1221,"domContentLoadedEventStart":1221,"domContentLoadedEventEnd":1265,"domComplete":2253,"loadEventStart":2253,"loadEventEnd":2253,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1196.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1197},{"name":"bigPipe.activity-panel-pipe-id.start","time":1197.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1199},{"name":"activityTabFullyLoaded","time":1283.4000000953674}],"measures":[],"correlationId":"b0575fa3860374","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":106,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
On Windows after installing Informix and creating a 'Informix' DSN targetting the sysuser database for user informix, I could successfully create the table:
create table xuser
engine=CONNECT table_type=ODBC tabname=sysusers
connection='DSN=Informix';
No crash. The table was created as:
CREATE TABLE `xuser` (
`username` char(32) DEFAULT NULL,
`usertype` char(1) DEFAULT NULL,
`priority` smallint(5) DEFAULT NULL,
`password` char(16) DEFAULT NULL,
`defrole` char(32) DEFAULT NULL
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=Informix' `TABLE_TYPE`='ODBC' `TABNAME`='sysusers';
and
select * from xuser;
returned:
Now looking at your backtrace, I see that the TYPVAL<char>::SetValue_char function was called with its last parameter n=-1. This is very strange. this function is called from:
for (n = 0, crp = qrp->Colresp; crp; n++, crp = crp->Next) {
if (vlen[n] == SQL_NO_TOTAL)
ThrowDBX("Unexpected SQL_NO_TOTAL returned from SQLFetch");
else if (vlen[n] == SQL_NULL_DATA)
pval[n]->SetNull(true);
else if (crp->Type == TYPE_STRING)
pval[n]->SetValue_char(pbuf[n], (int)vlen[n]);
else
pval[n]->SetNull(false);
crp->Kdata->SetValue(pval[n], i);
cap->Vlen[n][i] = vlen[n];
} // endfor crp
In the IF statement, this parameter is the value of
vlen[n]
and when equal to -1 the TYPVAL<char>::SetValue_char function should not be called because SQL_NULL_DATA is defined to -1. The only way this could happen is if for some reason the value of SQL_NULL_DATA were different from -1 on your system.
I don't know whether you can check that on your system. Meanwhile I can't reproduce the error.