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":845.1999998092651,"ttfb":214.19999980926514,"pageVisibility":"visible","entityId":70058,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"b96d522c-f160-437b-b848-43548960642b","navigationType":0,"readyForUser":951.8999996185303,"redirectCount":0,"resourceLoadedEnd":1005,"resourceLoadedStart":220.39999961853027,"resourceTiming":[{"duration":33.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":220.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":220.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":254.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":34.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":220.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":220.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":255.29999923706055,"responseStart":0,"secureConnectionStart":0},{"duration":96.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":220.79999923706055,"connectEnd":220.79999923706055,"connectStart":220.79999923706055,"domainLookupEnd":220.79999923706055,"domainLookupStart":220.79999923706055,"fetchStart":220.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":220.79999923706055,"responseEnd":317.5999994277954,"responseStart":317.5999994277954,"secureConnectionStart":220.79999923706055},{"duration":197.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":221,"connectEnd":221,"connectStart":221,"domainLookupEnd":221,"domainLookupStart":221,"fetchStart":221,"redirectEnd":0,"redirectStart":0,"requestStart":221,"responseEnd":418.5999994277954,"responseStart":418.5999994277954,"secureConnectionStart":221},{"duration":201.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":221.19999980926514,"connectEnd":221.19999980926514,"connectStart":221.19999980926514,"domainLookupEnd":221.19999980926514,"domainLookupStart":221.19999980926514,"fetchStart":221.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":221.19999980926514,"responseEnd":422.5999994277954,"responseStart":422.5999994277954,"secureConnectionStart":221.19999980926514},{"duration":201.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":221.39999961853027,"connectEnd":221.39999961853027,"connectStart":221.39999961853027,"domainLookupEnd":221.39999961853027,"domainLookupStart":221.39999961853027,"fetchStart":221.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":221.39999961853027,"responseEnd":423.19999980926514,"responseStart":423.19999980926514,"secureConnectionStart":221.39999961853027},{"duration":202,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":221.5999994277954,"connectEnd":221.5999994277954,"connectStart":221.5999994277954,"domainLookupEnd":221.5999994277954,"domainLookupStart":221.5999994277954,"fetchStart":221.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":221.5999994277954,"responseEnd":423.5999994277954,"responseStart":423.5999994277954,"secureConnectionStart":221.5999994277954},{"duration":242.4000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":221.79999923706055,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":221.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":464.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":202.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":221.89999961853027,"connectEnd":221.89999961853027,"connectStart":221.89999961853027,"domainLookupEnd":221.89999961853027,"domainLookupStart":221.89999961853027,"fetchStart":221.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":221.89999961853027,"responseEnd":424.0999994277954,"responseStart":424.0999994277954,"secureConnectionStart":221.89999961853027},{"duration":242.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":222.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":464.29999923706055,"responseStart":0,"secureConnectionStart":0},{"duration":202.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":222.29999923706055,"connectEnd":222.29999923706055,"connectStart":222.29999923706055,"domainLookupEnd":222.29999923706055,"domainLookupStart":222.29999923706055,"fetchStart":222.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":222.29999923706055,"responseEnd":424.69999980926514,"responseStart":424.69999980926514,"secureConnectionStart":222.29999923706055},{"duration":323.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":227.79999923706055,"connectEnd":227.79999923706055,"connectStart":227.79999923706055,"domainLookupEnd":227.79999923706055,"domainLookupStart":227.79999923706055,"fetchStart":227.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":227.79999923706055,"responseEnd":550.8999996185303,"responseStart":550.7999992370605,"secureConnectionStart":227.79999923706055},{"duration":598.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":229.19999980926514,"connectEnd":229.19999980926514,"connectStart":229.19999980926514,"domainLookupEnd":229.19999980926514,"domainLookupStart":229.19999980926514,"fetchStart":229.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":229.19999980926514,"responseEnd":827.6999998092651,"responseStart":827.6999998092651,"secureConnectionStart":229.19999980926514},{"duration":74.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":476.69999980926514,"connectEnd":476.69999980926514,"connectStart":476.69999980926514,"domainLookupEnd":476.69999980926514,"domainLookupStart":476.69999980926514,"fetchStart":476.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":476.69999980926514,"responseEnd":551.3999996185303,"responseStart":551.3999996185303,"secureConnectionStart":476.69999980926514},{"duration":233.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":757.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":757.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":990.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":240.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":758.0999994277954,"connectEnd":758.0999994277954,"connectStart":758.0999994277954,"domainLookupEnd":758.0999994277954,"domainLookupStart":758.0999994277954,"fetchStart":758.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":758.0999994277954,"responseEnd":998.2999992370605,"responseStart":998.2999992370605,"secureConnectionStart":758.0999994277954},{"duration":193.30000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":837.7999992370605,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":837.7999992370605,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1031.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":246.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":758.5,"connectEnd":758.5,"connectStart":758.5,"domainLookupEnd":758.5,"domainLookupStart":758.5,"fetchStart":758.5,"redirectEnd":0,"redirectStart":0,"requestStart":758.5,"responseEnd":1005,"responseStart":1005,"secureConnectionStart":758.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":44,"responseStart":214,"responseEnd":229,"domLoading":218,"domInteractive":1038,"domContentLoadedEventStart":1038,"domContentLoadedEventEnd":1101,"domComplete":1305,"loadEventStart":1305,"loadEventEnd":1306,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1003.1999998092651},{"name":"bigPipe.sidebar-id.end","time":1004.0999994277954},{"name":"bigPipe.activity-panel-pipe-id.start","time":1004.1999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1006.0999994277954},{"name":"activityTabFullyLoaded","time":1118.2999992370605}],"measures":[],"correlationId":"788b94a0cff07f","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":14,"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.