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

mysqldump should exit with an error when used with wrong parameter "-flush-logs"

    XMLWordPrintable

Details

    Description

      When mysqldump is used with flush-logs switch, but with one single dash no error is returned at all:

      root@centos-6-5-tckt-8873:[Wed Aug 19 09:51:24][/etc]$ mysqldump -ignore-table=mysql.user --single-transaction --master-data=2 --flush-logs --delete-master-logs --hex-blob --all-databases 
      mysqldump: unknown option '-g'
      root@centos-6-5-tckt-8873:[Wed Aug 19 09:53:35][/etc]$ echo $?
      2
      root@centos-6-5-tckt-8873:[Wed Aug 19 09:53:40][/etc]$ mysqldump --ignore-table=mysql.user --single-transaction --master-data=2 -flush-logs --delete-master-logs --hex-blob --all-databases 
      -- MySQL dump 10.15  Distrib 10.0.20-MariaDB, for Linux (x86_64)
      --
      -- Host: localhost    Database: 
      -- ------------------------------------------------------
      -- Server version       10.0.20-MariaDB-log
       
      /*!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 */;
      /*!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 2015-08-19  9:54:09
      root@centos-6-5-tckt-8873:[Wed Aug 19 09:54:09][/etc]$ echo $?
      0
      root@centos-6-5-tckt-8873:[Wed Aug 19 09:54:11][/etc]$ 
       

      Attachments

        Activity

          People

            serg Sergei Golubchik
            ivan.stoykov@skysql.com Stoykov (Inactive)
            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.