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

Unknown commands in the mariadb client do not terminate input processing

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.7
    • None
    • Scripts & Clients
    • None

    Description

      All unknown characters, including multi-byte unicode ones, after the initial backslash appear to not interrupt the input processing like known commands do.

      MariaDB [test]> \a
      ERROR: Unknown command '\a'.
          -> \s
      --------------
      mysql  Ver 15.1 Distrib 10.6.7-MariaDB, for Linux (x86_64) using  EditLine wrapper
       
      Connection id:		23
      Current database:	test
      Current user:		maxuser@127.0.0.1
      SSL:			Not in use
      Current pager:		stdout
      Using outfile:		''
      Using delimiter:	;
      Server:			MariaDB
      Server version:		10.6.5-MariaDB-1:10.6.5+maria~focal-log mariadb.org binary distribution
      Protocol version:	10
      Connection:		127.0.0.1 via TCP/IP
      Server characterset:	utf8mb4
      Db     characterset:	utf8mb4
      Client characterset:	utf8mb3
      Conn.  characterset:	utf8mb3
      TCP port:		3000
      Uptime:			21 min 7 sec
       
      Threads: 7  Questions: 1042  Slow queries: 0  Opens: 39  Open tables: 33  Queries per second avg: 0.822
      --------------
       
          -> ;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\a' at line 1
      

      Even more interestingly, it seems to keep both collecting the result as well as parse it for any new commands:

      MariaDB [test]> \a
      ERROR: Unknown command '\a'.
          -> \p
      --------------
      \a
      --------------
       
          -> \p
      --------------
      \a
       
      --------------
       
          -> \p
      --------------
      \a
       
       
      --------------
       
          -> \p
      --------------
      \a
       
       
       
      --------------
       
          -> ;
      ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '\a' at line 1
      

      This results in some confusing situations where you don't know why the client expects more input when normally it would stop after a backslash command.

      Attachments

        Activity

          People

            Unassigned Unassigned
            markus makela markus makela
            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.