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

mysqldump error messages

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not a Bug
    • 10.2.10
    • N/A
    • Scripts & Clients
    • None

    Description

      Hello,
      I talked with a guy in Fedora, who pointed out interesting issue.
      I'd like to know your opinion and if positive, add it as a feature request.

      With following call:

      $ /usr/bin/mysqldump "" --add-locks -e --force -R --triggers --add-drop-table --hex-blob -h localhost test
       
      -- MySQL dump 10.16  Distrib 10.2.9-MariaDB, for Linux (x86_64)
      --
      -- Host: localhost    Database: 
      -- ------------------------------------------------------
      -- Server version	10.2.9-MariaDB
       
      /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
      /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
      /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
      /*!40101 SET NAMES utf8 */;
      /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
      /*!40103 SET TIME_ZONE='+00:00' */;
      /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
      /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
      /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
      /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
      mysqldump: Got error: 1046: "No database selected" when selecting the database
      /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
       
      /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
      /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
      /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
      /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
      /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
      /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
      /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
       
      -- Dump completed on 2017-11-20 15:02:20
      

      You can see the:
      "mysqldump: Got error: 1046: "No database selected" when selecting the database"
      in the middle.

      But that is basically nonsense, because the binary parsed an empty argument. Because DB name cannot be an empty string, it better should just skip the argument.

      This issue appears, when user use scripts for work with the database and at some point a "" (empty string) can be left inside the command, which is later parsed incorrectly.

      The question is, whether you consider it as a faulty user script design or if you agree, that emtpy argument should be skipped.

      A little messy - but complete - discussion can be seen here:
      https://bugzilla.redhat.com/show_bug.cgi?id=1320593

      Attachments

        Activity

          People

            serg Sergei Golubchik
            mschorm Michal Schorm
            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.