[MDEV-12142] server goes down when creating CONNECT table Created: 2017-02-27 Updated: 2017-03-11 Resolved: 2017-03-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - Connect |
| Affects Version/s: | 10.1.17, 10.1 |
| Fix Version/s: | 10.1.22, 10.2.5, 10.0.31 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Takuya Aoki (Inactive) | Assignee: | Olivier Bertrand |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Amazon Linux AMI release 2016.03 |
||
| Attachments: |
|
| Description |
|
I tried to make a CONNECT table to a local CSV file. 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 report of my.err is below.
|
| Comments |
| Comment by Elena Stepanova [ 2017-03-03 ] | |||||
|
Thanks for the report and test case. Also reproducible on the current 10.1 (88b5eedef2b). | |||||
| Comment by Olivier Bertrand [ 2017-03-03 ] | |||||
|
There is a bug indeed causing a crash in case of wrong declaration. Here there are two problems:
This cannot be calculated when all columns are not declared and must be specified.
Waiting for a fix for erroneous cases, this should work as a turnaround. | |||||
| Comment by Takuya Aoki (Inactive) [ 2017-03-06 ] | |||||
|
Thank you, table was successfully created. | |||||
| Comment by Takuya Aoki (Inactive) [ 2017-03-08 ] | |||||
|
By the way, is it possible for the CREATE TABLE ENGINE=CONNECT to work like CREATE TABLE SELECT. | |||||
| Comment by Olivier Bertrand [ 2017-03-08 ] | |||||
|
Yes, CREATE TABLE SELECT works for CONNECT tables. However, I am not sure to understand your second question. Why not trying it and tell me what happen? | |||||
| Comment by Takuya Aoki (Inactive) [ 2017-03-09 ] | |||||
|
Sorry, my request was confusing. Can the command work so "jis_x0401x402" column (column not defined in command) is created automatically? | |||||
| Comment by Olivier Bertrand [ 2017-03-09 ] | |||||
|
No. Retrieving column definitions is done using the MariaDB discovery feature. However, the handler assisted_discovery function_ is called from MariaDB only when no column definition is provided. Meanwhile you can create your table giving no column definition, then make all index you want using create index or alter table. |