summaryrefslogtreecommitdiff
path: root/mysql-test/main/opt_trace_ucs2.test
diff options
context:
space:
mode:
authorVarun <varun.gupta@mariadb.com>2019-06-10 15:56:36 +0530
committerVarun <varun.gupta@mariadb.com>2019-06-11 15:44:58 +0530
commita0cb7551a4467fbce74f3ced78549bf92866c11f (patch)
treea06c13af6dd33cf207d636276ca213e106e95299 /mysql-test/main/opt_trace_ucs2.test
parent40ff8019d2a00071f533bb3210b4d3a552e95bc8 (diff)
downloadmariadb-git-a0cb7551a4467fbce74f3ced78549bf92866c11f.tar.gz
MDEV-18880: Optimizer trace prints date in hexadecimal
Introduced a print_key_value function to makes sure that the trace prints data in readable format for readable characters and the rest of the characters are printed as hexadecimal.
Diffstat (limited to 'mysql-test/main/opt_trace_ucs2.test')
-rw-r--r--mysql-test/main/opt_trace_ucs2.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/main/opt_trace_ucs2.test b/mysql-test/main/opt_trace_ucs2.test
new file mode 100644
index 00000000000..827dc403d58
--- /dev/null
+++ b/mysql-test/main/opt_trace_ucs2.test
@@ -0,0 +1,10 @@
+--source include/not_embedded.inc
+--source include/have_ucs2.inc
+
+create or replace table t1 (col1 char(10) character set ucs2, filler char(100), key(col1)) ;
+insert into t1 values ('a', 'a');
+insert into t1 values ('a', 'a');
+set optimizer_trace=1;
+explain format=json select * from t1 force index(col1) where col1 >='a';
+select JSON_DETAILED(JSON_EXTRACT(trace, '$**.analyzing_range_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE;
+drop table t1;