|
| 1 | +CREATE TABLE valid_values (value varchar(255)) ENGINE=myisam; |
| 2 | +INSERT INTO valid_values VALUES(10); |
| 3 | +INSERT INTO valid_values VALUES(20); |
| 4 | +CREATE TABLE invalid_values (value varchar(255)) ENGINE=myisam; |
| 5 | +INSERT INTO invalid_values VALUES('\'aaa\''); |
| 6 | +SET @start_global_value = @@global.rocksdb_max_intrinsic_tmp_table_write_count; |
| 7 | +SELECT @start_global_value; |
| 8 | +@start_global_value |
| 9 | +1000 |
| 10 | +'# Setting to valid values in global scope#' |
| 11 | +"Trying to set variable @@global.rocksdb_max_intrinsic_tmp_table_write_count to 10" |
| 12 | +SET @@global.rocksdb_max_intrinsic_tmp_table_write_count = 10; |
| 13 | +SELECT @@global.rocksdb_max_intrinsic_tmp_table_write_count; |
| 14 | +@@global.rocksdb_max_intrinsic_tmp_table_write_count |
| 15 | +10 |
| 16 | +"Setting the global scope variable back to default" |
| 17 | +SET @@global.rocksdb_max_intrinsic_tmp_table_write_count = DEFAULT; |
| 18 | +SELECT @@global.rocksdb_max_intrinsic_tmp_table_write_count; |
| 19 | +@@global.rocksdb_max_intrinsic_tmp_table_write_count |
| 20 | +1000 |
| 21 | +"Trying to set variable @@global.rocksdb_max_intrinsic_tmp_table_write_count to 20" |
| 22 | +SET @@global.rocksdb_max_intrinsic_tmp_table_write_count = 20; |
| 23 | +SELECT @@global.rocksdb_max_intrinsic_tmp_table_write_count; |
| 24 | +@@global.rocksdb_max_intrinsic_tmp_table_write_count |
| 25 | +20 |
| 26 | +"Setting the global scope variable back to default" |
| 27 | +SET @@global.rocksdb_max_intrinsic_tmp_table_write_count = DEFAULT; |
| 28 | +SELECT @@global.rocksdb_max_intrinsic_tmp_table_write_count; |
| 29 | +@@global.rocksdb_max_intrinsic_tmp_table_write_count |
| 30 | +1000 |
| 31 | +"Trying to set variable @@session.rocksdb_max_intrinsic_tmp_table_write_count to 444. It should fail because it is not session." |
| 32 | +SET @@session.rocksdb_max_intrinsic_tmp_table_write_count = 444; |
| 33 | +ERROR HY000: Variable 'rocksdb_max_intrinsic_tmp_table_write_count' is a GLOBAL variable and should be set with SET GLOBAL |
| 34 | +'# Testing with invalid values in global scope #' |
| 35 | +"Trying to set variable @@global.rocksdb_max_intrinsic_tmp_table_write_count to 'aaa'" |
| 36 | +SET @@global.rocksdb_max_intrinsic_tmp_table_write_count = 'aaa'; |
| 37 | +Got one of the listed errors |
| 38 | +SELECT @@global.rocksdb_max_intrinsic_tmp_table_write_count; |
| 39 | +@@global.rocksdb_max_intrinsic_tmp_table_write_count |
| 40 | +1000 |
| 41 | +SET @@global.rocksdb_max_intrinsic_tmp_table_write_count = @start_global_value; |
| 42 | +SELECT @@global.rocksdb_max_intrinsic_tmp_table_write_count; |
| 43 | +@@global.rocksdb_max_intrinsic_tmp_table_write_count |
| 44 | +1000 |
| 45 | +DROP TABLE valid_values; |
| 46 | +DROP TABLE invalid_values; |
0 commit comments