Bug #72259 - Filesystem read-only detector #24
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello, I'm developer from Baku, Azerbaijan. I became an OCA member next week and i feel good :) I will try to write many usefull codes to develope MySQL in the future. Now I want to write about these changes. My friend found that when the file system is read-only, MySQL does not show exact error message about it. He reported this bug - http://bugs.mysql.com/bug.php?id=72259 . And I decided to fix this bug myself. I wrote a function - int is_filesystem_read_only(char const* path) - this function detects if filesystem is read-only and return an integer. In mysqld_main function I catch --datadir option, get it's value and path to my new function. If file system is read-only I send an error message like this "Filesystem ([datadir path]) is read-only. Thats all :) I hope you will appreciate my first code for MySQL. Thanks a lot
I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.