summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t/galera_log_output_csv.test
blob: 00009396f6a4a35e7ad3e2a6c91f3a3b16309172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# Test that --log-output=FILE works with Galera.
# The relevant options are set using a -master.opt file
# wsrep_replicate_myisam is not used as it crashes in MTR with mysql-wsrep#14
#

--source include/galera_cluster.inc
--source include/have_innodb.inc

CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);

SELECT COUNT(*) > 0 FROM mysql.general_log;

SELECT 1 = 1 FROM t1;
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1';

--connection node_2

# CREATE TABLE from master is also present in the slave query log, but is logged twice, mysql-wsrep#44
SELECT COUNT(*) > 0 FROM mysql.general_log WHERE argument = 'CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB';

SELECT 2 = 2 FROM t1;
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';

--connection node_1
DROP TABLE t1;