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

          hossamfc9 Hossam Abo-elsoud added a comment -

          hello, I think i'll start working on this one.

          hossamfc9 Hossam Abo-elsoud added a comment - hello, I think i'll start working on this one.
          Roel Roel Van de Paar added a comment -

          hossamfc9 Thank you! Please let us know if you run into any issues or have any questions.

          Roel Roel Van de Paar added a comment - hossamfc9 Thank you! Please let us know if you run into any issues or have any questions.
          Roel Roel Van de Paar added a comment - - edited

          Note: the MDEV-23818 implementation (in 12.0.0) makes no difference here and maintains the status quo.

          Roel Roel Van de Paar added a comment - - edited Note: the MDEV-23818 implementation (in 12.0.0) makes no difference here and maintains the status quo.

          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.