Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7030

CONNECT Engine: Errors in Path Substitution, when using file_name option

    XMLWordPrintable

    Details

      Description

      I tried Mariadb 10.0.14 and 10.1.1 on Windows 7
      i want to read a csv file via CONNECT Engine , but i couldn't specify a correct Path for the file.
      The ouput of my tests:

      D:\Maria\TEST>dir
       
      23.10.2014  15:42    <DIR>          .
      23.10.2014  15:42    <DIR>          ..
      22.10.2014  11:56             3.484 F80_wochenverlauf.csv
      23.10.2014  15:42               616 testcsv.sql

      create table shu.csvtest ( 
        KALWOCHE char(8) NOT NULL,
        SUMME    int(7) NOT NULL,
        AVGDAY    int(6) NOT NULL,
        AVGHOUR   int(6) NOT NULL,    
        MAXPERHOUR int(6) NOT NULL,
        AVGTIME    double  NOT NULL,
        DAYS       int NOT NULL             
      ) engine=CONNECT table_type=CSV file_name="D:\Maria\TEST\F80_wochenverlauf.csv" header=0 sep_char=';';

      select * from shu.csvtest;
      -> Open(rt) error 2 on D:MariaTESTF80_wochenverlauf.csv: No such file or directory

      ) engine=CONNECT table_type=CSV file_name='D:\\Maria\\TEST\\F80_wochenverlauf.csv' header=0 sep_char=';';
      select * from shu.csvtest;
      /* SQL Fehler (1296): Got error 122 'ftell error for recd=0: Bad file descriptor' from CONNECT */

      ) engine=CONNECT table_type=CSV file_name='D:/Maria/TEST/F80_wochenverlauf.csv' header=0 sep_char=';';
      select * from shu.csvtest;
      /* SQL Fehler (1296): Got error 122 'ftell error for recd=0: Bad file descriptor' from CONNECT */

      ) engine=CONNECT table_type=CSV file_name="\\Maria\\TEST\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from csvtest;
      /* SQL Fehler (1296): Got error 122 'ftell error for recd=0: No such file or directory' from CONNECT */

      ) engine=CONNECT table_type=CSV file_name="\Maria\\TEST\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from shu.csvtest;
      Open(rt) error 2 on D:\Maria\data\shu\Maria\TEST\F80_wochenverlauf.csv: No such file or directory

      ) engine=CONNECT table_type=CSV file_name="\Maria\\..\\..\\TEST\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from shu.csvtest;
      Open(rt) error 2 on D:\Maria\data\TEST\F80_wochenverlauf.csv: No such file or directory

      ) engine=CONNECT table_type=CSV file_name="\Maria\\..\\..\\..\\TEST\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from csvtest;
      /* SQL Fehler (1296): Got error 122 'ftell error for recd=0: Bad file descriptor' from CONNECT */

      Next try: copying the file to DATA_DIR:

      D:\Maria\data\shu>dir
       
      06.11.2014  08:54    <DIR>          .
      06.11.2014  08:54    <DIR>          ..
      23.10.2014  07:56                61 db.opt
      24.10.2014  11:56             3.484 F80_wochenverlauf.csv

      ) engine=CONNECT table_type=CSV file_name='F80_wochenverlauf.csv' header=0 sep_char=';';
      select * from shu.csvtest;
      /* SQL Fehler (1296): Got error 122 'ftell error for recd=0: No such file or directory' from CONNECT */

      ) engine=CONNECT table_type=CSV file_name='.\F80_wochenverlauf.csv' header=0 sep_char=';';
      select * from shu.csvtest;
      Open(rt) error 2 on D:\Maria\data\shu\.F80_wochenverlauf.csv: No such file or directory

      ) engine=CONNECT table_type=CSV file_name="..\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from csvtest;
      /* SQL Fehler (1296): Got error 122 'ftell error for recd=0: Bad file descriptor' from CONNECT */

      ) engine=CONNECT table_type=CSV file_name="\Maria\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from shu.csvtest;
      Open(rt) error 2 on D:\Maria\data\shu\Maria\F80_wochenverlauf.csv: No such file or directory

      ) engine=CONNECT table_type=CSV file_name="\Maria\\..\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from csvtest;
      /* SQL Fehler (1296): Got error 122 'ftell error for recd=0: No such file or directory' from CONNECT */

       engine=CONNECT table_type=CSV file_name="\\F80_wochenverlauf.csv" header=0 sep_char=';';
      select * from csvtest;
      Open(rt) error 2 on D:\F80_wochenverlauf.csv: No such file or directory

        Attachments

          Activity

            People

            Assignee:
            bertrandop Olivier Bertrand
            Reporter:
            matthias Schumacher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: