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

Document HANDLER auto-creation of aliases

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • Documentation
    • None

    Description

      Please update https://mariadb.com/kb/en/handler-commands/ with some information and perhaps an example of how HANDLER will auto-create aliases, even when AS is not used. While not buggy (ref the error below), this can easily lead to confusion when DB names are used. Example:

      11.2.5-dbg>CREATE DATABASE db1;
      Query OK, 1 row affected (0.000 sec)
       
      11.2.5-dbg>CREATE TABLE db1.t1 (a INT, b INT);
      Query OK, 0 rows affected (0.008 sec)
       
      11.2.5-dbg>HANDLER db1.t1 OPEN;
      Query OK, 0 rows affected (0.000 sec)
       
      11.2.5-dbg>HANDLER t1 READ NEXT LIMIT 2;   # Note the available 't1' alias
      Empty set (0.000 sec)
       
      11.2.5-dbg>CREATE DATABASE db2;
      Query OK, 1 row affected (0.002 sec)
       
      11.2.5-dbg>CREATE TABLE db2.t1 (a INT, b INT);
      Query OK, 0 rows affected (0.008 sec)
       
      11.2.5-dbg>HANDLER db2.t1 OPEN;
      ERROR 1066 (42000): Not unique table/alias: 't1'
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            Roel Roel Van de Paar
            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.