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

The SQL error plugin prints (null) as database if the mariadb client is not using any database to execute the SQL.

Details

    Description

      The SQL error plugin prints (null) as database if the mariadb client is not using any database to execute the SQL. I think it should print an empty string if the client is not using any database

      MariaDB [(none)]> drop database db;
      ERROR 1008 (HY000): Can't drop database 'db'; database doesn't exist
      MariaDB [(none)]> 
       
      $ cat data/sql_errors.log 
      5 (null) 2023-11-29  5:53:31 root[root] @ localhost [] ERROR 1008: Can't drop database 'db'; database doesn't exist : drop database db 
      $
      

      Attachments

        Issue Links

          Activity

            rucha174 Rucha Deodhar added a comment - Patch: https://github.com/MariaDB/server/commit/8421cc2232d0316903f72b468cede688f26e66d8
            rucha174 Rucha Deodhar added a comment -

            We do want NULL ( NULL is better instead of (null) ) because when no database is selected, SELECT DATABASE prints NULL ). But we do need something. Because if user wants to parse the log then having something (more meaningful) there instead of nothing can help.

            rucha174 Rucha Deodhar added a comment - We do want NULL ( NULL is better instead of (null) ) because when no database is selected, SELECT DATABASE prints NULL ). But we do need something. Because if user wants to parse the log then having something (more meaningful) there instead of nothing can help.

            OK to push after increasing major version of the plugin

            sanja Oleksandr Byelkin added a comment - OK to push after increasing major version of the plugin
            rucha174 Rucha Deodhar added a comment -

            pushed to 10.6

            rucha174 Rucha Deodhar added a comment - pushed to 10.6

            People

              rucha174 Rucha Deodhar
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.