| 1 |
drop table if exists t1; |
| 2 |
## Creating new table ## |
| 3 |
CREATE TABLE t1 |
| 4 |
( |
| 5 |
id INT NOT NULL auto_increment, |
| 6 |
PRIMARY KEY (id), |
| 7 |
name VARCHAR(30) |
| 8 |
); |
| 9 |
'#--------------------FN_DYNVARS_018_01-------------------------#' |
| 10 |
## Setting initial value of variable to OFF ## |
| 11 |
SET @@global.general_log = OFF; |
| 12 |
SELECT @@general_log; |
| 13 |
@@general_log |
| 14 |
0 |
| 15 |
flush logs; |
| 16 |
SET @@global.general_log = ON; |
| 17 |
flush logs; |
| 18 |
SET @@global.general_log = OFF; |
| 19 |
## Inserting some Records & Verifying output in log ## |
| 20 |
INSERT into t1(name) values('Record_1'); |
| 21 |
INSERT into t1(name) values('Record_2'); |
| 22 |
## There should be no difference, case should pass ## |
| 23 |
'#--------------------FN_DYNVARS_018_01-------------------------#' |
| 24 |
## Setting initial value of variable to OFF ## |
| 25 |
SET @@global.general_log = ON; |
| 26 |
SELECT @@general_log; |
| 27 |
@@general_log |
| 28 |
1 |
| 29 |
## Inserting some Records & Verifying output in log ## |
| 30 |
INSERT into t1(name) values('Record_3'); |
| 31 |
INSERT into t1(name) values('Record_4'); |
| 32 |
## old log is a proper prefix of the new log ## |
| 33 |
SET @orig_file= load_file('MYSQLD_LOGFILE.orig'); |
| 34 |
SET @copy_file= load_file('MYSQLD_LOGFILE.copy'); |
| 35 |
SELECT @orig_file > @copy_file, left(@orig_file, length(@copy_file)) = @copy_file; |
| 36 |
@orig_file > @copy_file left(@orig_file, length(@copy_file)) = @copy_file |
| 37 |
1 1 |
| 38 |
## Dropping tables ## |
| 39 |
DROP TABLE t1; |