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
d4d53980
Commit
d4d53980
authored
Jul 02, 2021
by
Michael Okoko
Committed by
Sergei Petrunia
Jan 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix garbage null values at end of histogram json
Signed-off-by:
Michael Okoko
<
okokomichaels@outlook.com
>
parent
a3787358
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
16 deletions
+17
-16
mysql-test/main/statistics_json.result
mysql-test/main/statistics_json.result
+15
-15
sql/sql_statistics.cc
sql/sql_statistics.cc
+2
-1
No files found.
mysql-test/main/statistics_json.result
View file @
d4d53980
...
...
@@ -30,7 +30,7 @@ test t1 a 1 25 0.0000 4.0000 1.0000 10 JSON [
"19",
"21",
"23"
]
]
test t1 b 1 9 0.0000 1.6400 1.0000 10 JSON [
"11",
"13",
...
...
@@ -42,7 +42,7 @@ test t1 b 1 9 0.0000 1.6400 1.0000 10 JSON [
"3",
"5",
"7"
]
]
test t1 c 1 9 0.0000 2.0000 1.0000 10 JSON [
"11",
"13",
...
...
@@ -54,7 +54,7 @@ test t1 c 1 9 0.0000 2.0000 1.0000 10 JSON [
"3",
"5",
"7"
]
]
test t1 d 1 25 0.0000 8.0000 1.0000 10 JSON [
"3",
"5",
...
...
@@ -66,7 +66,7 @@ test t1 d 1 25 0.0000 8.0000 1.0000 10 JSON [
"19",
"21",
"23"
]
e
]
DELETE FROM mysql.column_stats;
DROP TABLE t1;
create schema world;
...
...
@@ -102,7 +102,7 @@ Code ABW ZWE 25 JSON [
"TMP",
"UKR",
"VIR"
]
0
]
Name Afghanistan Zimbabwe 25 JSON [
"Argentina",
"Barbados",
...
...
@@ -129,7 +129,7 @@ Name Afghanistan Zimbabwe 25 JSON [
"Togo",
"Uganda",
"Venezuela"
]
a
]
SurfaceArea 0.40 17075400.00 25 JSON [
"36.00",
"151.00",
...
...
@@ -156,7 +156,7 @@ SurfaceArea 0.40 17075400.00 25 JSON [
"1104300.00",
"1648195.00",
"2724900.00"
]
]
Population 0 1277558000 25 JSON [
"1000",
"8000",
...
...
@@ -183,7 +183,7 @@ Population 0 1277558000 25 JSON [
"40377000",
"61399000",
"111506000"
]
]
Capital 1 4074 25 JSON [
"62",
"149",
...
...
@@ -210,7 +210,7 @@ Capital 1 4074 25 JSON [
"3336",
"3426",
"3538"
]
]
ID 1 4079 10 JSON [
"371",
"742",
...
...
@@ -222,7 +222,7 @@ ID 1 4079 10 JSON [
"2967",
"3338",
"3709"
]
]
Name A Coruña (La Coruña) Århus 10 JSON [
"Berdytšiv",
"Clermont-Ferrand",
...
...
@@ -234,7 +234,7 @@ Name A Coruña (La Coruña) Århus 10 JSON [
"Roanoke",
"Split",
"Ulsan"
]
]
Country ABW ZWE 10 JSON [
"BRA",
"CHN",
...
...
@@ -246,7 +246,7 @@ Country ABW ZWE 10 JSON [
"PHL",
"RUS",
"USA"
]
]
Population 42 10500000 10 JSON [
"96002",
"105819",
...
...
@@ -258,7 +258,7 @@ Population 42 10500000 10 JSON [
"288173",
"398300",
"670208"
]
]
Country ABW ZWE 10 JSON [
"BGD",
"CMR",
...
...
@@ -270,7 +270,7 @@ Country ABW ZWE 10 JSON [
"PNG",
"SVK",
"UGA"
]
]
Language Abhyasi [South]Mande 10 JSON [
"Bariba",
"Creole English",
...
...
@@ -294,7 +294,7 @@ Percentage 0.0 99.9 10 JSON [
"17.7",
"45.5",
"87.5"
]
q
]
set histogram_type=@save_histogram_type;
set histogram_size=@save_histogram_size;
DROP SCHEMA world;
sql/sql_statistics.cc
View file @
d4d53980
...
...
@@ -1643,7 +1643,8 @@ std::vector<std::string> bucket_bounds;
}
writer
->
end_array
();
histogram
->
set_size
(
bucket_bounds
.
size
());
histogram
->
set_values
((
uchar
*
)
writer
->
output
.
get_string
()
->
ptr
());
Binary_string
*
json_string
=
(
Binary_string
*
)
writer
->
output
.
get_string
();
histogram
->
set_values
((
uchar
*
)
json_string
->
c_ptr
());
}
};
...
...
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