@@ -289,7 +289,7 @@ my_bool opt_enable_named_pipe= 0;
289289my_bool opt_local_infile, opt_external_locking, opt_slave_compressed_protocol;
290290uint delay_key_write_options= (uint) DELAY_KEY_WRITE_ON;
291291
292- static bool opt_do_pstack = 0 ;
292+ static my_bool opt_do_pstack = 0 ;
293293static ulong opt_specialflag=SPECIAL_ENGLISH;
294294
295295static ulong opt_myisam_block_size;
@@ -306,6 +306,7 @@ my_bool opt_safe_user_create = 0, opt_no_mix_types = 0;
306306my_bool lower_case_table_names, opt_old_rpl_compat;
307307my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0 ;
308308my_bool opt_log_slave_updates= 0 , opt_console= 0 ;
309+ my_bool opt_readonly = 0 ;
309310
310311volatile bool mqh_used = 0 ;
311312FILE *bootstrap_file=0 ;
@@ -376,7 +377,7 @@ const char *localhost=LOCAL_HOST;
376377const char *delayed_user=" DELAYED" ;
377378uint master_port = MYSQL_PORT, master_connect_retry = 60 ;
378379uint report_port = MYSQL_PORT;
379- bool master_ssl = 0 ;
380+ my_bool master_ssl = 0 ;
380381
381382ulong master_retry_count=0 ;
382383ulong bytes_sent = 0L , bytes_received = 0L ;
@@ -404,8 +405,7 @@ ulong slow_launch_threads = 0;
404405char mysql_real_data_home[FN_REFLEN],
405406 language[LIBLEN],reg_ext[FN_EXTLEN],
406407 mysql_charsets_dir[FN_REFLEN], *charsets_list,
407- blob_newline,f_fyllchar,max_sort_char,*mysqld_user,*mysqld_chroot,
408- *opt_init_file;
408+ max_sort_char,*mysqld_user,*mysqld_chroot, *opt_init_file;
409409char *language_ptr= language;
410410char mysql_data_home_buff[2 ], *mysql_data_home=mysql_real_data_home;
411411#ifndef EMBEDDED_LIBRARY
@@ -3143,6 +3143,7 @@ enum options {
31433143 OPT_QUERY_CACHE_TYPE, OPT_RECORD_BUFFER,
31443144 OPT_RECORD_RND_BUFFER, OPT_RELAY_LOG_SPACE_LIMIT,
31453145 OPT_SLAVE_NET_TIMEOUT, OPT_SLAVE_COMPRESSED_PROTOCOL, OPT_SLOW_LAUNCH_TIME,
3146+ OPT_READONLY,
31463147 OPT_SORT_BUFFER, OPT_TABLE_CACHE,
31473148 OPT_THREAD_CONCURRENCY, OPT_THREAD_CACHE_SIZE,
31483149 OPT_TMP_TABLE_SIZE, OPT_THREAD_STACK,
@@ -3927,6 +3928,11 @@ replicating a LOAD DATA INFILE command",
39273928 " Number of seconds to wait for more data from a master/slave connection before aborting the read." ,
39283929 (gptr*) &slave_net_timeout, (gptr*) &slave_net_timeout, 0 ,
39293930 GET_ULONG, REQUIRED_ARG, SLAVE_NET_TIMEOUT, 1 , LONG_TIMEOUT, 0 , 1 , 0 },
3931+ {" read-only" , OPT_READONLY,
3932+ " Make all tables readonly, with the expections for replications (slave) threads and users with the SUPER privilege" ,
3933+ (gptr*) &opt_readonly,
3934+ (gptr*) &opt_readonly,
3935+ 0 , GET_BOOL, NO_ARG, 0 , 0 , 1 , 0 , 1 , 0 },
39303936 {" slow_launch_time" , OPT_SLOW_LAUNCH_TIME,
39313937 " If creating the thread takes longer than this value (in seconds), the Slow_launch_threads counter will be incremented." ,
39323938 (gptr*) &slow_launch_time, (gptr*) &slow_launch_time, 0 , GET_ULONG,
0 commit comments