mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
add json statistics test and change histogram column type to blob
This commit is contained in:
committed by
Sergei Petrunia
parent
2aca7b0c33
commit
79cdb535da
28
mysql-test/main/statistics_json.test
Normal file
28
mysql-test/main/statistics_json.test
Normal file
@ -0,0 +1,28 @@
|
||||
--source include/have_stat_tables.inc
|
||||
--echo #
|
||||
--echo # Test that JSON is a valid histogram type and we can store JSON strings in mysql.column_stats
|
||||
--echo #
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
set @save_histogram_type=@@histogram_type;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a int NOT NULL PRIMARY KEY,
|
||||
b varchar(32)
|
||||
) ENGINE=MYISAM;
|
||||
|
||||
SET histogram_type='JSON';
|
||||
SELECT @@histogram_type;
|
||||
|
||||
INSERT INTO t1 VALUES
|
||||
(7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx'),
|
||||
(17, 'vvvvvvvvvvvvv');
|
||||
|
||||
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES();
|
||||
DESCRIBE mysql.column_stats;
|
||||
SELECT * FROM mysql.column_stats;
|
||||
|
||||
set histogram_type=@save_histogram_type;
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user