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

Improve error handling in the source command

Details

    Description

      When a directory name is accidentally used with the source command, the client does not print the actual error message, the same thing happens with a non-existent script file.

      10.5.29-opt>source data
      ERROR: Can't initialize batch_readline
      10.5.29-opt>
       
      MariaDB [(none)]> source foo
      ERROR: Failed to open file 'foo', error: 2
      MariaDB [(none)]> 
      

      Error message looks good when we provide the directory name as the input file to the mariadb client.

      $ ./bin/mariadb -uroot -S/test/MD110325-mariadb-10.5.29-linux-x86_64-opt/socket.sock  < data
      ERROR: Can't initialize batch_readline - may be the input source is a directory or a block device.
      $ 
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.