[MDEV-6159] Odd fnx error when creating CSV tables with index Created: 2014-04-24  Updated: 2014-04-28  Resolved: 2014-04-28

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.10
Fix Version/s: 10.0.11

Type: Bug Priority: Major
Reporter: Colin Charles Assignee: Olivier Bertrand
Resolution: Fixed Votes: 0
Labels: connect-engine
Environment:

CentOS 6.5, MariaDB 10 from the repository provided at downloads.mariadb.org



 Description   

CSV files are simple:

test1.csv
test;2342

test2.csv
test2;34134

MariaDB [cleanconnect]> CREATE TABLE `test_all` (
    ->   name varchar(10) not NULL,
    ->   price bigint
    -> ) ENGINE=CONNECT 
    -> DEFAULT CHARSET=utf8 
    -> `table_type`=CSV 
    -> `file_name`='/tmp/test*.csv' 
    -> `sep_char`=';' `compress`=0 `multiple`=1;
Query OK, 0 rows affected (0.02 sec)

MariaDB [cleanconnect]> CREATE TABLE `test_all2` (
    ->   name varchar(10) not NULL,
    ->   price bigint,
    ->   key (name)
    -> ) ENGINE=CONNECT 
    -> DEFAULT CHARSET=utf8 
    -> `table_type`=CSV 
    -> `file_name`='/tmp/test*.csv' 
    -> `sep_char`=';' `compress`=0 `multiple`=1;
Query OK, 0 rows affected, 1 warning (0.00 sec)
 
MariaDB [cleanconnect]> show warnings;
+---------+------+-----------------------------+
| Level   | Code | Message                     |
+---------+------+-----------------------------+
| Warning | 1105 | This table is not indexable |
+---------+------+-----------------------------+
1 row in set (0.00 sec)

MariaDB [cleanconnect]> select count(*) from test_all;
+----------+
| count(*) |
+----------+
|        2 |
+----------+
1 row in set (0.00 sec)
 
MariaDB [cleanconnect]> select count(*) from test_all2;
ERROR 1296 (HY000): Got error 122 'Open error 2 in mode rb on /tmp/test*.fnx: No such file or directory' from CONNECT



 Comments   
Comment by Olivier Bertrand [ 2014-04-25 ]

This was concerning all Multiple and Compressed tables, not only CSV.

Fixed by raising an error when trying to index a table not indexable because it is Multiple or Compressed.

Generated at Thu Feb 08 07:09:48 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.