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

View with inet6 fields

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Duplicate
    • 11.8.6
    • N/A
    • Backup
    • None
    • Not for Release Notes

    Description

      I have two views with inet6 fields and one view depends on the other. Creating a mariadb-dump and then importing the dump i got the error:

      ERROR 4078 (HY000) at line 81: Illegal parameter data types int and inet6 for operation 'coalesce'

      How to reproduce the error:

      MariaDB [(none)]> create database ipv6;
      Query OK, 1 row affected (0,003 sec)

      MariaDB [(none)]> create database ipv7;
      Query OK, 1 row affected (0,001 sec)

      MariaDB [(none)]> use ipv6;
      Database changed
      MariaDB [ipv6]> create table ips ( ID int unsigned not null default 0, ip inet6 default NULL, primary key(ID));
      Query OK, 0 rows affected (0,054 sec)

      MariaDB [ipv6]> create view v2 as select ID, min(ip) as ip from ips group by ID;
      Query OK, 0 rows affected (0,029 sec)

      MariaDB [ipv6]> create view v1 as select coalesce(v2.ip, ips.ip) as ip from ips left join v2 using(ID);
      Query OK, 0 rows affected (0,026 sec)

      MariaDB [ipv6]> exit
      Bye

      > mariadb-dump -u root -p ipv6 >dump.sql

      > mariadb -u root -p ipv7 <dump.sql

      --------------
      /*!50001 CREATE ALGORITHM=UNDEFINED */
      /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
      /*!50001 VIEW `v1` AS select coalesce(`v2`.`ip`,`ips`.`ip`) AS `ip` from (`ips` left join `v2` on(`ips`.`ID` = `v2`.`ID`)) */
      --------------

      ERROR 4078 (HY000) at line 81: Illegal parameter data types int and inet6 for operation 'coalesce'

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sandix Henning Sander
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.