Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.9
    • Fix Version/s: 10.0.11
    • Component/s: None
    • Labels:

      Description

      Should CONNECT support CHAR(0)? I tried with a CONNECT csv table and it doesn't work. However, with CSV engine it works.

      CONNECT:

      MariaDB [test]> CREATE TABLE ttt (a CHAR(0) NOT NULL) ENGINE=CONNECT TABLE_TYPE=CSV FILE_NAME='ttt.csv';
      Query OK, 0 rows affected (0.13 sec)
      
      MariaDB [test]> INSERT INTO ttt VALUES ('');
      ERROR 1296 (HY000): Got error 3 'Invalid type CHAR for column a' from CONNECT
      

      (if it isn't supported, in my opinion, a more correct error is expected on CREATE TABLE)

      CSV:

      MariaDB [test]> CREATE TABLE ttt (a CHAR(0) NOT NULL) ENGINE=CSV;Query OK, 0 rows affected (0.15 sec)
      
      MariaDB [test]> INSERT INTO ttt VALUES ('');
      Query OK, 1 row affected (0.10 sec)
      
      MariaDB [test]> SELECT * FROM ttt;
      +---+
      | a |
      +---+
      |   |
      +---+
      1 row in set (0.00 sec)
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            bertrandop Olivier Bertrand added a comment -

            I chose to reject a 0 length char column in CREATE TABLE. Is that the best? Personally I don't see the usefulness of such a column but you may think differently. Let me know.

            Show
            bertrandop Olivier Bertrand added a comment - I chose to reject a 0 length char column in CREATE TABLE. Is that the best? Personally I don't see the usefulness of such a column but you may think differently. Let me know.
            Hide
            f_razzoli Federico Razzoli added a comment -

            Other engines allow this, but probably it would be useless for CONNECT (particularly if TABLE_TYPE does not allow NULLs). I just suggest that a proper error is shown

            Show
            f_razzoli Federico Razzoli added a comment - Other engines allow this, but probably it would be useless for CONNECT (particularly if TABLE_TYPE does not allow NULLs). I just suggest that a proper error is shown

              People

              • Assignee:
                bertrandop Olivier Bertrand
                Reporter:
                f_razzoli Federico Razzoli
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h