Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2373133f
Commit
2373133f
authored
Jun 16, 2021
by
Michael Okoko
Committed by
Sergei Petrunia
Jan 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
record statistics_json test
Signed-off-by:
Michael Okoko
<
okokomichaels@outlook.com
>
parent
79cdb535
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
mysql-test/main/statistics_json.result
mysql-test/main/statistics_json.result
+38
-0
No files found.
mysql-test/main/statistics_json.result
0 → 100644
View file @
2373133f
#
# Test that JSON is a valid histogram type and we can store JSON strings in mysql.column_stats
#
drop table if exists t1;
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;
@@histogram_type
JSON
INSERT INTO t1 VALUES
(7, 'xxxxxxxxxxxxxxxxxxxxxxxxxx'),
(17, 'vvvvvvvvvvvvv');
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES();
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
DESCRIBE mysql.column_stats;
Field Type Null Key Default Extra
db_name varchar(64) NO PRI NULL
table_name varchar(64) NO PRI NULL
column_name varchar(64) NO PRI NULL
min_value varbinary(255) YES NULL
max_value varbinary(255) YES NULL
nulls_ratio decimal(12,4) YES NULL
avg_length decimal(12,4) YES NULL
avg_frequency decimal(12,4) YES NULL
hist_size tinyint(3) unsigned YES NULL
hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON') YES NULL
histogram blob YES NULL
SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 b vvvvvvvvvvvvv xxxxxxxxxxxxxxxxxxxxxxxxxx 0.0000 19.5000 1.0000 254 JSON {'hello': 'world'}
set histogram_type=@save_histogram_type;
DROP TABLE t1;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment