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

mariadb-dump produces not loadable dump due to temporary view structure

    XMLWordPrintable

Details

    Description

      In the test case below, the original structures are valid: view_check_contains calls function st_contains with arguments of geometry type.

      However, when mariadb-dump produces a dump, it first creates a temporary placeholder for view_table_data with INT column, so when it attempts to create view_check_contains, it causes an error.

      create table t (f geometry);
      create view view_table_data AS select * from t;
      create view view_check_contains AS select st_contains(f,point(0,0)) from view_table_data;
       
      create database db;
       
      --exec $MYSQL_DUMP test | $MYSQL db
       
      # Cleanup
      drop database db;
      drop view view_check_contains;
      drop view view_table_data;
      drop table t;
      

      10.5 d64034770ef4e15c7f3599a57a2b060a042b10b6

      --------------
      /*!50001 CREATE ALGORITHM=UNDEFINED */
      /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
      /*!50001 VIEW `view_check_contains` AS select st_contains(`view_table_data`.`f`,point(0,0)) AS `st_contains(f,point(0,0))` from `view_table_data` */
      --------------
       
      ERROR 4079 (HY000) at line 75: Illegal parameter data type int for operation 'st_contains'
      mysqltest: At line 7: exec of '/mnt8t/bld/10.5-asan/client//mariadb-dump --defaults-file=/mnt8t/bld/10.5-asan/mysql-test/var/my.cnf --defaults-group-suffix=.1 test | /mnt8t/bld/10.5-asan/client//mariadb --defaults-file=/mnt8t/bld/10.5-asan/mysql-test/var/my.cnf db' failed, error: 256, status: 1, errno: 11
      

      It isn't necessarily limited to geometry only. At least the ROW type is likely to be affected, too; and VECTOR type, when it is released, as well.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.