Commit a0f93f43 authored by Sergei Petrunia's avatar Sergei Petrunia

Rename histogram_hb_v2 -> histogram_hb

parent 1d14176e
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -49,48 +49,48 @@ FLUSH TABLES; ...@@ -49,48 +49,48 @@ FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":"not-histogram"}' WHERE table_name='t1_json'; SET histogram='{"histogram_hb":"not-histogram"}' WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":["not-a-bucket"]}' SET histogram='{"histogram_hb":["not-a-bucket"]}'
WHERE table_name='t1_json'; WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"no-expected-members":1}]}' SET histogram='{"histogram_hb":[{"no-expected-members":1}]}'
WHERE table_name='t1_json'; WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":{}}]}' SET histogram='{"histogram_hb":[{"start":{}}]}'
WHERE table_name='t1_json'; WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":"not-an-integer"}]}' SET histogram='{"histogram_hb":[{"start":"aaa", "size":"not-an-integer"}]}'
WHERE table_name='t1_json'; WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":0.25}]}' SET histogram='{"histogram_hb":[{"start":"aaa", "size":0.25}]}'
WHERE table_name='t1_json'; WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":0.25, "ndv":1}]}' SET histogram='{"histogram_hb":[{"start":"aaa", "size":0.25, "ndv":1}]}'
WHERE table_name='t1_json'; WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
UPDATE mysql.column_stats UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[]}' SET histogram='{"histogram_hb":[]}'
WHERE table_name='t1_json'; WHERE table_name='t1_json';
FLUSH TABLES; FLUSH TABLES;
explain select * from t1_json limit 1; explain select * from t1_json limit 1;
......
...@@ -650,7 +650,7 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name, ...@@ -650,7 +650,7 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name,
if (je.state != JST_KEY || !json_key_matches(&je, hist_key_name.get())) if (je.state != JST_KEY || !json_key_matches(&je, hist_key_name.get()))
{ {
err= "Root element must be histogram_hb_v2"; err= "Root element must be histogram_hb";
goto err; goto err;
} }
...@@ -659,7 +659,7 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name, ...@@ -659,7 +659,7 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name,
if (je.state != JST_ARRAY_START) if (je.state != JST_ARRAY_START)
{ {
err= "histogram_hb_v2 must contain an array"; err= "histogram_hb must contain an array";
goto err; goto err;
} }
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
Histogram format in JSON: Histogram format in JSON:
{ {
"histogram_hb_v2": [ "histogram_hb": [
{ "start": "value", "size":nnn.nn, "ndv": nnn }, { "start": "value", "size":nnn.nn, "ndv": nnn },
... ...
{ "start": "value", "size":nnn.nn, "ndv": nnn, "end": "value"} { "start": "value", "size":nnn.nn, "ndv": nnn, "end": "value"}
...@@ -74,7 +74,7 @@ class Histogram_json_hb : public Histogram_base ...@@ -74,7 +74,7 @@ class Histogram_json_hb : public Histogram_base
std::string last_bucket_end_endp; std::string last_bucket_end_endp;
public: public:
static constexpr const char* JSON_NAME="histogram_hb_v2"; static constexpr const char* JSON_NAME="histogram_hb";
bool parse(MEM_ROOT *mem_root, const char *db_name, const char *table_name, bool parse(MEM_ROOT *mem_root, const char *db_name, const char *table_name,
Field *field, Histogram_type type_arg, Field *field, Histogram_type type_arg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment