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

CREATE OR REPLACE only drops InnoDB table used by OQGRAPH

    XMLWordPrintable

Details

    Description

      1) create & populate an InnoDB table
      2) create an OQGRAPH table based on the prev table
      3) select from the second table at least once
      4) CREATE OR REPLACE first table
      Result: first table is dropped but not recreated, misleading error is shown.

      CREATE TABLE t (
      	a INT NOT NULL,
      	b INT NOT NULL
      ) ENGINE = InnoDB;
       
      INSERT INTO t (a, b) VALUES (1, 10), (2, 10), (3, 10);
       
      CREATE TABLE oq (
        latch VARCHAR(32) NULL,
        origid BIGINT UNSIGNED NULL,
        destid BIGINT UNSIGNED NULL,
        weight DOUBLE NULL,
        seq BIGINT UNSIGNED NULL,
        linkid BIGINT UNSIGNED NULL,
        KEY (latch, origid, destid) USING HASH,
        KEY (latch, destid, origid) USING HASH
      ) 
      	ENGINE = OQGRAPH 
      	DATA_TABLE = 't'
      	ORIGID = 'a'
      	DESTID = 'b';
       
      SELECT *
      	FROM oq
      	WHERE latch = 'dijkstras'
      		AND origid = 1
      		AND destid = 10;
       
      CREATE OR REPLACE TABLE t (
      	a INT,
      	b INT
      ) ENGINE = InnoDB;
       
      SELECT * FROM t;

      Attachments

        Issue Links

          Activity

            People

              andymc73 Andrew McDonnell
              f_razzoli Federico Razzoli
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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