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

CONNECT PIVOT impossible when columns contain NULL

    XMLWordPrintable

Details

    Description

      mysql 10.0.10-MariaDB (root) [test]> show create table t1\G
      *************************** 1. row ***************************
             Table: t1
      Create Table: CREATE TABLE `t1` (
        `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
        `c1` char(32) DEFAULT NULL,
        `c2` char(32) DEFAULT NULL,
        `c3` char(32) DEFAULT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
      1 row in set (0.00 sec)
       
      mysql 10.0.10-MariaDB (root) [test]> select * from t1;
      +----+------+------+------+
      | id | c1   | c2   | c3   |
      +----+------+------+------+
      |  1 | a    | NULL | c    |
      +----+------+------+------+
      1 row in set (0.00 sec)
       
      mysql 10.0.10-MariaDB (root) [test]> create table t1_pivot engine=connect table_type=pivot tabname=t1;
      ERROR 1939 (HY000): Engine CONNECT failed to discover table `test`.`t1_pivot` with 'CREATE TABLE whatever (`id` INT(10) NOT NULL,`c1` CHAR(32) NOT NULL,`` CHAR(32) NOT NULL FLAG=1) TABLE_TYPE='pivot' TABNAME='t1''

      This should work differently, or it should be documented and should give a better error message.

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            kolbe Kolbe Kegel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.