Bug #3413 | mysqld: strange interpretation of --defaults-file option | ||
---|---|---|---|
Submitted: | 7 Apr 2004 7:42 | Modified: | 28 Apr 2004 19:18 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 4.0 , 4.1 | OS: | |
Assigned to: | Michael Widenius | CPU Architecture: | Any |
[7 Apr 2004 7:42]
Matthias Leich
[7 Apr 2004 8:36]
Matthias Leich
The same strange behaviour will also occur if somebody uses the --defaults-file option in connection with command line tools like 'mysql'. Here may arise a big risk. Let's assume the following szenario: Somebody starts such a tool and expects!! that he affects the database assigned by the defaults-file option. But if he makes my small typo in the filename, he will will affect the database running in <source-distribution>/var, listening on port:3306 ... If that database is the important production database, he is able to produce expensive damages (DROP TABLE, DELETE ..).
[27 Apr 2004 8:51]
Michael Widenius
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: I don't think it's 100 % safe to do this in 4.0 as some users may depend on the old behaviour. The orginal idea was just that --defaults-file would be a rename of the original option file and in this context the old behaviour was ok. I have however in 4.1 changed this so that if you use --defaults-file, the given option file must exists. The fix will be in 4.1.2