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

DBUG_ASSERT on CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE

    XMLWordPrintable

Details

    • 10.2.1-5, 10.2.2-1, 10.2.2-2, 10.0.29

    Description

      This script makes the server crash on assert in debug builds:

      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT);
      INSERT INTO t1 VALUES (10);
      DROP VIEW IF EXISTS v1;
      CREATE VIEW v1 AS SELECT * FROM t1 FOR UPDATE;
      

      mysqld: /home/bar/maria-git/server.10.2/sql/table_cache.cc:853: bool tdc_remove_table(THD*, enum_tdc_remove_table_type, const char*, const char*, bool): Assertion `remove_type == TDC_RT_REMOVE_UNUSED || thd->mdl_context.is_lock_owner(MDL_key::TABLE, db, table_name, MDL_EXCLUSIVE)' failed.
       
      Program received signal SIGABRT, Aborted.
      [Switching to Thread 0x7ffff7f7cf00 (LWP 29487)]
      0x00007ffff5b9ea98 in __GI_raise (sig=sig@entry=6)
          at ../sysdeps/unix/sysv/linux/raise.c:55
      55	  return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
      

      FOR UPDATE should probably be disallowed in VIEWs.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              bar Alexander Barkov
              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.