Debian Codegraph @

mysql-test/suite/sys_vars/t/general_log_file_func.test

raw
1 ############## mysql-test\t\general_log_file_func.test #########################
2 # #
3 # Variable Name: general_log_file #
4 # Scope: GLOBAL #
5 # Access Type: Dynamic #
6 # Data Type: Boolean #
7 # Default Value: filename #
8 # Valid Values: #
9 # #
10 # #
11 # Creation Date: 2008-03-17 #
12 # Author: Salman Rawala #
13 # #
14 # Description: Test Cases of Dynamic System Variable "general_log_file" #
15 # that checks functionality of this variable #
16 # #
17 # Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
18 # server-system-variables.html#option_mysqld_general_log_file #
19 # #
20 ################################################################################
21
22
23 --disable_warnings
24 DROP TABLE IF EXISTS t1;
25 --enable_warnings
26
27 #########################
28 # Creating new table #
29 #########################
30
31 --echo ## Creating new table ##
32 CREATE TABLE t1
33 (
34 id INT NOT NULL AUTO_INCREMENT,
35 PRIMARY KEY (id),
36 name VARCHAR(30)
37 );
38
39 --echo '#--------------------FN_DYNVARS_018_01-------------------------#'
40 ####################################################################
41 # Verifying general log as we have initialized in opt file #
42 ####################################################################
43 SELECT @@general_log_file;
44
45 INSERT INTO t1(name) VALUES('Record_1');
46 INSERT INTO t1(name) VALUES('Record_2');
47 INSERT INTO t1(name) VALUES('Record_3');
48 INSERT INTO t1(name) VALUES('Record_4');
49
50 --echo ## Verifying general log file ##
51 let $MYSQLD_DATADIR= `select @@datadir`;
52 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
53 --file_exists $MYSQLD_DATADIR/mysql-test.log
54
55 --echo ## Dropping table ##
56 DROP TABLE t1;