|
|
|
@ -1452,7 +1452,6 @@ static Sys_var_ulong Sys_read_buff_size( |
|
|
|
VALID_RANGE(IO_SIZE*2, INT_MAX32), DEFAULT(128*1024), |
|
|
|
BLOCK_SIZE(IO_SIZE)); |
|
|
|
|
|
|
|
static my_bool read_only; |
|
|
|
static bool check_read_only(sys_var *self, THD *thd, set_var *var) |
|
|
|
{ |
|
|
|
/* Prevent self dead-lock */ |
|
|
|
@ -1536,6 +1535,16 @@ static bool fix_read_only(sys_var *self, THD *thd, enum_var_type type) |
|
|
|
read_only= opt_readonly; |
|
|
|
DBUG_RETURN(result); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
The read_only boolean is always equal to the opt_readonly boolean except |
|
|
|
during fix_read_only(); when that function is entered, opt_readonly is |
|
|
|
the pre-update value and read_only is the post-update value. |
|
|
|
fix_read_only() compares them and runs needed operations for the |
|
|
|
transition (especially when transitioning from false to true) and |
|
|
|
synchronizes both booleans in the end. |
|
|
|
*/ |
|
|
|
static Sys_var_mybool Sys_readonly( |
|
|
|
"read_only", |
|
|
|
"Make all non-temporary tables read-only, with the exception for " |
|
|
|
|