Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-346

Support UNION for ALTER TABLE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 0.6
    • 0.5.2
    • mysql-connector
    • None

      ALTER TABLE with UNION is not parseable - see https://dev.mysql.com/doc/refman/5.7/en/alter-table.html

      Test SQL

      CREATE DATABASE IF NOT EXISTS `test_schema`;
      
      USE `test_schema`;
      
      CREATE TABLE `merge_table` (
        `id` int(11) NOT NULL,
        `name` varchar(45) DEFAULT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1;
      
      CREATE TABLE IF NOT EXISTS `table1` (
        `id` int(11) NOT NULL,
        `name` varchar(45) DEFAULT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
      
      
      CREATE TABLE  IF NOT EXISTS`table2` (
        `id` int(11) NOT NULL,
        `name` varchar(45) DEFAULT NULL,
        PRIMARY KEY (`id`)
      ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
      
      ALTER TABLE `merge_table` UNION = (`table1`,`table2`);
      

      Communication context - https://gitter.im/debezium/user?at=59aae737ba0f0f6e380d7cbb

              jpechane Jiri Pechanec
              jpechane Jiri Pechanec
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: