I tried to make a CONNECT table to a local CSV file.
The command fails and server goes down every time.
I will attach the csv for reproduction test.
I wanted to set the primary key to the row "zip_code", so the column def was needed beforehand or the command would error.
The CONNECT table works properly only when no column definition is set or all existing columns are defined.
I want to request that PK can be set even where not all columns are known.
MariaDB [(none)]> SET SESSION connect_xtrace=1;
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [(none)]> show variables like 'connect_xtrace';
|
+----------------+-------+
|
| Variable_name | Value |
|
+----------------+-------+
|
| connect_xtrace | 1 |
|
+----------------+-------+
|
1 row in set (0.00 sec)
|
|
MariaDB [(none)]> use test;
|
Reading table information for completion of table and column names
|
You can turn off this feature to get a quicker startup with -A
|
|
Database changed
|
MariaDB [test]> CREATE OR REPLACE TABLE M_Zip (zip_code char(7) character set ascii collate ascii_bin NOT NULL, PRIMARY KEY(zip_code)) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='M_Zip.csv' HEADER=1 SEP_CHAR=',' QUOTED=3;
|
ERROR 2013 (HY000): Lost connection to MySQL server during query
|
MariaDB [test]> SHOW CREATE TABLE M_Zip;
|
ERROR 2006 (HY000): MySQL server has gone away
|
No connection. Trying to reconnect...
|
Connection id: 2
|
Current database: test
|
|
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| M_Zip | CREATE TABLE `M_Zip` (
|
`zip_code` char(7) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
PRIMARY KEY (`zip_code`)
|
) ENGINE=CONNECT DEFAULT CHARSET=utf8 `TABLE_TYPE`=CSV `FILE_NAME`='M_Zip.csv' `HEADER`=1 `SEP_CHAR`=',' `QUOTED`=3 |
|
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.01 sec)
|
The report of my.err is below.
New CONNECT 0x7fb0e1add820, table: M_Zip
|
create: this=0x7fb0e1add820 thd=0x7fb0e3a6e008 xp=0x7fb0e1a7d080 g=0x7fb0e1a69000 sqlcom=1 name=M_Zip
|
xchk=(nil) createas=0
|
Getting created index 1 info
|
XTAB: making new TABLE M_Zip (null)
|
Getting created index 1 info
|
GetFileLength: fn=/data/mysql/./test/M_Zip.csv h=43
|
File length=19028
|
GetFileLength: fn=/data/mysql/./test/M_Zip.csv h=43
|
File length=19028
|
Estimating lines len=19028 ending=1/nEstimatedLength: Fields=0 Columns=(nil)
|
avglen=1 MaxSize19028
|
ColDB: am=34 colname=zip_code tabname=M_Zip num=0
|
cdp(1).Name=zip_code cp=(nil)
|
making new CSVCOL C1 zip_code at 0x7fb047800590
|
colp=0x7fb047800590
|
DOS OpenDB: tdbp=0x7fb047800478 tdb=R1 use=2 mode=10
|
PlugOpenFile: fname=/data/mysql/./test/M_Zip.csv ftype=rb
|
dbuserp=0x7fb0e182b020
|
fop=0x7fb0e182ee80
|
fp=0x7fb0478006b0
|
returning fop=0x7fb0e182ee80
|
File /data/mysql/./test/M_Zip.csv open Stream=0x7fb0e182ee80 mode=rb
|
SubAllocating a buffer of 16 bytes
|
OpenDos: R1 mode=10 To_Line=0x7fb047800718
|
File length=19028
|
ColDB: am=34 colname=zip_code tabname=M_Zip num=0
|
cdp(1).Name=zip_code cp=0x7fb047800590
|
colp=0x7fb047800590
|
File length=19028
|
Estimating lines len=19028 ending=1/nEstimatedLength: Fields=1 Columns=0x7fb047800590
|
avglen=1 MaxSize19028
|
XINDEX Make: n=19028
|
KCOL(0x7fb047813210) Init: col=zip_code n=19028 type=1 sm=1
|
AVB: mp=0x7fb047813350 type=1 nval=19028 len=7 check=1 blank=1
|
170227 19:45:22 mysqld_safe Number of processes running now: 0
|
170227 19:45:22 mysqld_safe mysqld restarted
|
{"report":{"fcp":1126.800000011921,"ttfb":333.69999998807907,"pageVisibility":"visible","entityId":60361,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"07e88c9f-0897-48e3-8a00-cb3e875042d2","navigationType":0,"readyForUser":1216.5,"redirectCount":0,"resourceLoadedEnd":1497.1000000238419,"resourceLoadedStart":339.4000000357628,"resourceTiming":[{"duration":302.69999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":339.4000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":339.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":642.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":302.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":339.69999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":339.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":642.4000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":311.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":339.80000001192093,"connectEnd":339.80000001192093,"connectStart":339.80000001192093,"domainLookupEnd":339.80000001192093,"domainLookupStart":339.80000001192093,"fetchStart":339.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":339.80000001192093,"responseEnd":651.1999999880791,"responseStart":651.1999999880791,"secureConnectionStart":339.80000001192093},{"duration":374.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":340,"connectEnd":340,"connectStart":340,"domainLookupEnd":340,"domainLookupStart":340,"fetchStart":340,"redirectEnd":0,"redirectStart":0,"requestStart":340,"responseEnd":714.6000000238419,"responseStart":714.6000000238419,"secureConnectionStart":340},{"duration":377.69999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":340.10000002384186,"connectEnd":340.10000002384186,"connectStart":340.10000002384186,"domainLookupEnd":340.10000002384186,"domainLookupStart":340.10000002384186,"fetchStart":340.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":340.10000002384186,"responseEnd":717.8000000119209,"responseStart":717.8000000119209,"secureConnectionStart":340.10000002384186},{"duration":377.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":340.4000000357628,"connectEnd":340.4000000357628,"connectStart":340.4000000357628,"domainLookupEnd":340.4000000357628,"domainLookupStart":340.4000000357628,"fetchStart":340.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":340.4000000357628,"responseEnd":718.1999999880791,"responseStart":718.1999999880791,"secureConnectionStart":340.4000000357628},{"duration":378,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":340.5,"connectEnd":340.5,"connectStart":340.5,"domainLookupEnd":340.5,"domainLookupStart":340.5,"fetchStart":340.5,"redirectEnd":0,"redirectStart":0,"requestStart":340.5,"responseEnd":718.5,"responseStart":718.5,"secureConnectionStart":340.5},{"duration":453.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":340.80000001192093,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":340.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":794.3000000119209,"responseStart":0,"secureConnectionStart":0},{"duration":378.0999999642372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":340.9000000357628,"connectEnd":340.9000000357628,"connectStart":340.9000000357628,"domainLookupEnd":340.9000000357628,"domainLookupStart":340.9000000357628,"fetchStart":340.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":340.9000000357628,"responseEnd":719,"responseStart":719,"secureConnectionStart":340.9000000357628},{"duration":453.4000000357628,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":341,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":341,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":794.4000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":378.4000000357628,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":341.19999998807907,"connectEnd":341.19999998807907,"connectStart":341.19999998807907,"domainLookupEnd":341.19999998807907,"domainLookupStart":341.19999998807907,"fetchStart":341.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":341.19999998807907,"responseEnd":719.6000000238419,"responseStart":719.6000000238419,"secureConnectionStart":341.19999998807907},{"duration":520.3000000119209,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":346.60000002384186,"connectEnd":346.60000002384186,"connectStart":346.60000002384186,"domainLookupEnd":346.60000002384186,"domainLookupStart":346.60000002384186,"fetchStart":346.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":346.60000002384186,"responseEnd":866.9000000357628,"responseStart":866.9000000357628,"secureConnectionStart":346.60000002384186},{"duration":1150.4000000357628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":346.69999998807907,"connectEnd":346.69999998807907,"connectStart":346.69999998807907,"domainLookupEnd":346.69999998807907,"domainLookupStart":346.69999998807907,"fetchStart":346.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":346.69999998807907,"responseEnd":1497.1000000238419,"responseStart":1497.1000000238419,"secureConnectionStart":346.69999998807907},{"duration":61.299999952316284,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":805.9000000357628,"connectEnd":805.9000000357628,"connectStart":805.9000000357628,"domainLookupEnd":805.9000000357628,"domainLookupStart":805.9000000357628,"fetchStart":805.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":805.9000000357628,"responseEnd":867.1999999880791,"responseStart":867.1999999880791,"secureConnectionStart":805.9000000357628},{"duration":501.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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","startTime":1066.1000000238419,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1066.1000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1568,"responseStart":0,"secureConnectionStart":0},{"duration":482.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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","startTime":1067,"connectEnd":1067,"connectStart":1067,"domainLookupEnd":1067,"domainLookupStart":1067,"fetchStart":1067,"redirectEnd":0,"redirectStart":0,"requestStart":1067,"responseEnd":1549.5,"responseStart":1549.5,"secureConnectionStart":1067},{"duration":488,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/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","startTime":1067.4000000357628,"connectEnd":1067.4000000357628,"connectStart":1067.4000000357628,"domainLookupEnd":1067.4000000357628,"domainLookupStart":1067.4000000357628,"fetchStart":1067.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":1067.4000000357628,"responseEnd":1555.4000000357628,"responseStart":1555.4000000357628,"secureConnectionStart":1067.4000000357628}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":142,"responseStart":334,"responseEnd":344,"domLoading":337,"domInteractive":1522,"domContentLoadedEventStart":1522,"domContentLoadedEventEnd":1568,"domComplete":2102,"loadEventStart":2102,"loadEventEnd":2103,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1499},{"name":"bigPipe.sidebar-id.end","time":1499.9000000357628},{"name":"bigPipe.activity-panel-pipe-id.start","time":1500},{"name":"bigPipe.activity-panel-pipe-id.end","time":1501.9000000357628},{"name":"activityTabFullyLoaded","time":1586.300000011921}],"measures":[],"correlationId":"d6c4f21aaef21c","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":122,"dbReadsTimeInMs":12,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report and test case.
Also reproducible on the current 10.1 (88b5eedef2b).