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

ORDER BY does not always work in ZIP CONNECT tables

    Details

      Description

      A table is created from 2 zip files ( 1.zip and 2.zip, attached, each contain one simple CSV file) and it shows error "Can't find record" while using ORDER BY clause.
      But it works, if I add DISTINCT to my select.

      --------------
      CREATE TABLE `c1` (
      	`n1` varchar(255)  NOT NULL,
       	`n2` varchar(255)  NOT NULL,
       	`n3` varchar(255)  NOT NULL,
       	`n4` varchar(255)  NOT NULL,
       	`n5` varchar(255)  NOT NULL
      ) ENGINE=CONNECT  `table_type`=CSV `file_name`='/home/alice/Downloads/*.zip' zipped=1 sep_char="-" MULTIPLE=1 header=1
      --------------
      Query OK, 0 rows affected (0.05 sec)
       
      --------------
      select  * from c1 order by n4  limit 5
      --------------
       
      ERROR 1032 (HY000) at line 13 in file: '/home/alice/t/c.sql': Can't find record in 'c1'
      --------------
      select DISTINCT * from c1 order by n4  limit 5
      --------------
       
      +--------+------------+-------+---------+---------+
      | n1     | n2         | n3    | n4      | n5      |
      +--------+------------+-------+---------+---------+
      | Amos   | "(972) 845 | 8251" | Aaron   | Jakeem  |
      | Armand | "(318) 908 | 8237" | Aaron   | Wallace |
      | Ali    | "(351) 986 | 2800" | Abdul   | Zachary |
      | Upton  | "(410) 693 | 5824" | Abdul   | Ryder   |
      | Paul   | "(816) 747 | 5961" | Abraham | Alan    |
      +--------+------------+-------+---------+---------+
      5 rows in set (0.00 sec)
      

        Attachments

        1. 1.zip
          3 kB
        2. 2.zip
          3 kB

          Issue Links

            Activity

              People

              • Assignee:
                bertrandop Olivier Bertrand
                Reporter:
                alice Alice Sherepa
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: