MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
safe_set_to_maybe_ro_var.inc
1 # to mask out the error - never abort neither log in result file - in setting
2 # to read-only variable.
3 # It is assumed that the new value is equal to one the var was set to.
4 # Such situation happens particularily with binlog_format that becomes read-only
5 # with ndb default storage.
6 #
7 # when generate results always watch the file to find what is expected,
8 # the SET query may fail
9 
10 # script accepts $maybe_ro_var the var name and $val4var the value
11 
12 ### USAGE:
13 ### let $maybe_ro_var= ...
14 ### let $val4var= ...
15 ### include/safe_set_to_maybe_ro_var.inc
16 
17 --disable_result_log
18 --disable_abort_on_error
19 eval SET $maybe_ro_var = $val4var;
20 --enable_abort_on_error
21 --enable_result_log
22 
23 eval SELECT $maybe_ro_var;