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":943.9000000953674,"ttfb":270.2000000476837,"pageVisibility":"visible","entityId":60361,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"026129ee-4b55-429a-916c-8596209bb215","navigationType":0,"readyForUser":1034.5999999046326,"redirectCount":0,"resourceLoadedEnd":623,"resourceLoadedStart":278.90000009536743,"resourceTiming":[{"duration":28.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":278.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":278.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":307.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":29.09999990463257,"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":279.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":279.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":308.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":179.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":279.40000009536743,"connectEnd":279.40000009536743,"connectStart":279.40000009536743,"domainLookupEnd":279.40000009536743,"domainLookupStart":279.40000009536743,"fetchStart":279.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":310.7000000476837,"responseEnd":459.09999990463257,"responseStart":325.59999990463257,"secureConnectionStart":279.40000009536743},{"duration":315.19999980926514,"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":279.90000009536743,"connectEnd":279.90000009536743,"connectStart":279.90000009536743,"domainLookupEnd":279.90000009536743,"domainLookupStart":279.90000009536743,"fetchStart":279.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":311.7999999523163,"responseEnd":595.0999999046326,"responseStart":330.40000009536743,"secureConnectionStart":279.90000009536743},{"duration":58.299999952316284,"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":280.2000000476837,"connectEnd":280.2000000476837,"connectStart":280.2000000476837,"domainLookupEnd":280.2000000476837,"domainLookupStart":280.2000000476837,"fetchStart":280.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":314.90000009536743,"responseEnd":338.5,"responseStart":335.90000009536743,"secureConnectionStart":280.2000000476837},{"duration":51.09999990463257,"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":280.40000009536743,"connectEnd":280.40000009536743,"connectStart":280.40000009536743,"domainLookupEnd":280.40000009536743,"domainLookupStart":280.40000009536743,"fetchStart":280.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":314.59999990463257,"responseEnd":331.5,"responseStart":329.40000009536743,"secureConnectionStart":280.40000009536743},{"duration":58.200000047683716,"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":280.5,"connectEnd":280.5,"connectStart":280.5,"domainLookupEnd":280.5,"domainLookupStart":280.5,"fetchStart":280.5,"redirectEnd":0,"redirectStart":0,"requestStart":316,"responseEnd":338.7000000476837,"responseStart":336.40000009536743,"secureConnectionStart":280.5},{"duration":33.200000047683716,"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":280.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":280.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":314,"responseStart":0,"secureConnectionStart":0},{"duration":61.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":280.7999999523163,"connectEnd":280.7999999523163,"connectStart":280.7999999523163,"domainLookupEnd":280.7999999523163,"domainLookupStart":280.7999999523163,"fetchStart":280.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":318.09999990463257,"responseEnd":342.2000000476837,"responseStart":339,"secureConnectionStart":280.7999999523163},{"duration":34.200000047683716,"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":281.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":281.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":315.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":61.59999990463257,"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":281.2000000476837,"connectEnd":281.2000000476837,"connectStart":281.2000000476837,"domainLookupEnd":281.2000000476837,"domainLookupStart":281.2000000476837,"fetchStart":281.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":318.59999990463257,"responseEnd":342.7999999523163,"responseStart":340.2999999523163,"secureConnectionStart":281.2000000476837},{"duration":336.90000009536743,"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":285.5,"connectEnd":285.5,"connectStart":285.5,"domainLookupEnd":285.5,"domainLookupStart":285.5,"fetchStart":285.5,"redirectEnd":0,"redirectStart":0,"requestStart":398.2000000476837,"responseEnd":622.4000000953674,"responseStart":615.4000000953674,"secureConnectionStart":285.5},{"duration":337.40000009536743,"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":285.59999990463257,"connectEnd":285.59999990463257,"connectStart":285.59999990463257,"domainLookupEnd":285.59999990463257,"domainLookupStart":285.59999990463257,"fetchStart":285.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":469,"responseEnd":623,"responseStart":616.7000000476837,"secureConnectionStart":285.59999990463257},{"duration":92.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":607,"connectEnd":607,"connectStart":607,"domainLookupEnd":607,"domainLookupStart":607,"fetchStart":607,"redirectEnd":0,"redirectStart":0,"requestStart":664.2999999523163,"responseEnd":699.7999999523163,"responseStart":697.7999999523163,"secureConnectionStart":607},{"duration":263.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":835.5999999046326,"connectEnd":835.5999999046326,"connectStart":835.5999999046326,"domainLookupEnd":835.5999999046326,"domainLookupStart":835.5999999046326,"fetchStart":835.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1065.7999999523163,"responseEnd":1099.4000000953674,"responseStart":1097.7000000476837,"secureConnectionStart":835.5999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":76,"responseStart":270,"responseEnd":285,"domLoading":273,"domInteractive":1108,"domContentLoadedEventStart":1108,"domContentLoadedEventEnd":1161,"domComplete":1491,"loadEventStart":1491,"loadEventEnd":1491,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1081.5999999046326},{"name":"bigPipe.sidebar-id.end","time":1082.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1082.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1084.5999999046326},{"name":"activityTabFullyLoaded","time":1179.7000000476837}],"measures":[],"correlationId":"5138aed0985f9e","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":111,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks for the report and test case.
Also reproducible on the current 10.1 (88b5eedef2b).