Details
-
Type:
Task
-
Status: Closed
-
Priority:
Major
-
Resolution: Not a Bug
-
Fix Version/s: N/A
-
Component/s: Scripts & Clients
-
Labels:None
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]$
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
in case of "-flush-logs", with a single instead of a double dash, all letters following the dash are interpreted as "short" single letter options, and "f" is the short option for
So the "--force" behavior should maybe be changed to only take effect after option parsing has been completed, not right away as soon as the option is seen?