|
Well this is just extension used when server started with debug variable.
MariaDB [test]> select @@debug;
|
+-----------------------------+
|
| @@debug |
|
+-----------------------------+
|
| d:i:o,/tmp/mariadbd.trace:t |
|
+-----------------------------+
|
1 row in set (0.001 sec)
|
|
MariaDB [test]> SET LOCAL query_cache_type= ON;
|
ERROR 1925 (HY000): Query cache is globally disabled and you can't enable it only for this session
|
MariaDB [test]> SET GLOBAL query_cache_type= ON;
|
Query OK, 0 rows affected (0.001 sec)
|
|
|
MariaDB [test]> SET LOCAL query_cache_type= ON;
|
Query OK, 0 rows affected (0.001 sec)
|
|
MariaDB [test]> drop table t1,t2,t3;
|
Query OK, 0 rows affected (0.003 sec)
|
|
MariaDB [test]> create table t1 (a int not null) ENGINE=MyISAM;
|
Query OK, 0 rows affected (0.002 sec)
|
|
MariaDB [test]> insert into t1 values (1),(2),(3);
|
Query OK, 3 rows affected (0.002 sec)
|
Records: 3 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> create table t2 (a int not null) ENGINE=MyISAM;
|
Query OK, 0 rows affected (0.010 sec)
|
|
MariaDB [test]> insert into t2 values (4),(5),(6);
|
Query OK, 3 rows affected (0.002 sec)
|
Records: 3 Duplicates: 0 Warnings: 0
|
|
MariaDB [test]> create table t3 (a int not null) engine=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
|
Query OK, 0 rows affected (0.007 sec)
|
|
MariaDB [test]> # insert
|
MariaDB [test]> select * from t3;
|
+---+
|
| a |
|
+---+
|
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
+---+
|
6 rows in set (0.002 sec)
|
|
MariaDB [test]> select * from t3;
|
+---+
|
| a |
|
+---+
|
| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
+---+
|
6 rows in set (0.000 sec)
|
|
MariaDB [test]> show status like "Qcache_hits";
|
+---------------+-------+
|
| Variable_name | Value |
|
+---------------+-------+
|
| Qcache_hits | 1 |
|
+---------------+-------+
|
1 row in set (0.003 sec)
|
|
MariaDB [test]> show status like "Qcache_queries_in_cache";
|
+-------------------------+-------+
|
| Variable_name | Value |
|
+-------------------------+-------+
|
| Qcache_queries_in_cache | 1 |
|
+-------------------------+-------+
|
1 row in set (0.003 sec)
|
|
Now inspecting the mariadb.trace file, we can get information about the simple change, used by patch from PR #1756:
$ cat /tmp/mariadbd.trace|grep extended
|
T@18 : | | | | qcache: long 1, 4.1: 1, eof: 0, extended: 1, bin_proto: 0, more results 0, pkt_nr: 1, CS client: 33, CS result: 33, CS conn: 33, limit: 18446744073709551615, TZ: 0x555690098d08, sql mode: 0x54200000, sort len: 1024, concat len: 1048576, div_precision: 4, def_week_frmt: 0, in_trans: 0, autocommit: 1
|
T@18 : | | | | | qcache: long 1, 4.1: 1, eof: 0, extended: 1, bin_proto: 0, more results 0, pkt_nr: 1, CS client: 33, CS result: 33, CS conn: 33, limit: 18446744073709551615, TZ: 0x555690098d08, sql mode: 0x54200000, sort len: 1024, concat len: 1048576, div_precision: 4, def_week_frmt: 0, in_trans: 0, autocommit: 1
|
T@18 : | | | | qcache: long 1, 4.1: 1, eof: 0, extended: 1, bin_proto: 0, more results 0, pkt_nr: 1, CS client: 33, CS result: 33, CS conn: 33, limit: 18446744073709551615, TZ: 0x555690098d08, sql mode: 0x54200000, sort len: 1024, concat len: 1048576, div_precision: 4, def_week_frmt: 0, in_trans: 0, autocommit: 1
|
Above example is used from query_qache.test, however the same patch doesn't have any outputs related to the trace file.
sanja only what can be done is to create debug test file with above commands, but there is no meaning, since it will not record trace file output.
|