Merge lp:~sergei.glushchenko/percona-server/disable-flashcache into lp:percona-server/5.1
Proposed by
Sergei Glushchenko
Status: | Merged |
---|---|
Approved by: | Alexey Kopytov |
Approved revision: | no longer in the source branch. |
Merged at revision: | 480 |
Proposed branch: | lp:~sergei.glushchenko/percona-server/disable-flashcache |
Merge into: | lp:percona-server/5.1 |
Diff against target: |
227 lines (+71/-15) 9 files modified
Percona-Server/mysql-test/include/have_flashcache.inc (+7/-0) Percona-Server/mysql-test/r/have_flashcache.require (+2/-0) Percona-Server/mysql-test/r/percona_bug747032.result (+1/-0) Percona-Server/mysql-test/r/percona_server_variables_debug.result (+1/-0) Percona-Server/mysql-test/r/percona_server_variables_release.result (+1/-0) Percona-Server/mysql-test/t/percona_bug747032.test (+32/-0) Percona-Server/sql/mysql_priv.h (+1/-0) Percona-Server/sql/mysqld.cc (+25/-15) Percona-Server/sql/set_var.cc (+1/-0) |
To merge this branch: | bzr merge lp:~sergei.glushchenko/percona-server/disable-flashcache |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Approve | ||
Review via email: mp+121389@code.launchpad.net |
Description of the change
Bug #747032: Flashcache throws an error on startup when flashcache is not used
New boolean option --flashcache was introduced. When set to 0, flashcache
checks are disabled. Default is to disable checks.
Also error message been made more verbose including errno and system error
message.
http://
To post a comment you must log in.
Sergei,
- since after this fix flashcache is disabled by default, failure to print_error( ) rather than sql_print_ information( )
set it up when it's _explicitly_ enabled should be a fatal error
- the above also means the error should be printed with
sql_
- that also means the code printing the "Flashcache bypass" message
does not have to check if initialization was successful (it should
just say "flashcache support initialized successfully")
- strerror() is not portable. which is not that important in this
case, of course, but I would use sql_perror() for consistency.
- the command line option is available only on Linux, whereas the
test case includes "not_windows.inc". Which is not the same set of
platforms, it will fail on all non-Windows platforms except Linux
- the test case dependency on external utilities like grep and sed is
redundant, even though it might work in most cases (since this is a
Linux-specific test).
I think a clean way to implement the test case would be to add have_flashcache .inc' (which would also require a separate log_warnings_ suppress. test for an example).
'include/
status variable). So you can easily check if the code you are going
to test is present in the binary. You should also test only the
--flashcache=0 case (i.e. the default) and make sure the
initialization message is not present in the error log. Then you only
need a few lines in Perl to implement that (see
percona_