08 Dec '21
revision-id: aa9b8132f374e508246499d3ae4338241a08049d (mariadb-10.4.13-181-gaa9b8132f37)
parent(s): caa727fd7134e23bf2244e734434014e70c95e27
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-08 23:44:09 +0300
message:
MDEV-27149: Add rocksdb_ignore_datadic_errors
Add a --rocksdb_ignore_datadic_errors plugin option for MyRocks.
The default is 0, and this means MyRocks will call abort() if it detects
a DDL mismatch.
Setting rocksdb_ignore_datadic_errors=1 makes MyRocks to try to ignore the
errors and allow to start the server for repairs.
---
storage/rocksdb/ha_rocksdb.cc | 35 +++++++++++++++++++++-
storage/rocksdb/ha_rocksdb.h | 2 ++
.../rocksdb/mysql-test/rocksdb/r/rocksdb.result | 1 +
.../r/rocksdb_ignore_datadic_errors.result | 7 +++++
.../t/rocksdb_ignore_datadic_errors.test | 6 ++++
storage/rocksdb/rdb_datadic.cc | 6 ++++
6 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 938be7030bb..452b670883a 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -638,6 +638,8 @@ static my_bool rocksdb_large_prefix = 0;
static my_bool rocksdb_allow_to_start_after_corruption = 0;
static char* rocksdb_git_hash;
+uint32_t rocksdb_ignore_datadic_errors = 0;
+
char *compression_types_val=
const_cast<char*>(get_rocksdb_supported_compression_types());
static unsigned long rocksdb_write_policy =
@@ -1908,6 +1910,15 @@ static MYSQL_SYSVAR_UINT(
nullptr, nullptr, 1 /* default value */, 0 /* min value */,
2 /* max value */, 0);
+static MYSQL_SYSVAR_UINT(
+ ignore_datadic_errors, rocksdb_ignore_datadic_errors,
+ PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
+ "Ignore MyRocks' data directory errors. "
+ "(CAUTION: Use only to start the server and perform repairs. Do NOT use "
+ "for regular operation)",
+ nullptr, nullptr, 0 /* default value */, 0 /* min value */,
+ 1 /* max value */, 0);
+
static MYSQL_SYSVAR_STR(datadir, rocksdb_datadir,
PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
"RocksDB data directory", nullptr, nullptr,
@@ -2143,6 +2154,8 @@ static struct st_mysql_sys_var *rocksdb_system_variables[] = {
MYSQL_SYSVAR(rollback_on_timeout),
MYSQL_SYSVAR(enable_insert_with_update_caching),
+
+ MYSQL_SYSVAR(ignore_datadic_errors),
nullptr};
static rocksdb::WriteOptions rdb_get_rocksdb_write_options(
@@ -5205,6 +5218,13 @@ static int rocksdb_init_func(void *const p) {
DBUG_RETURN(1);
}
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_information(
+ "CAUTION: Running with rocksdb_ignore_datadic_errors=1. "
+ " This should only be used to perform repairs");
+ }
+
if (rdb_check_rocksdb_corruption()) {
// NO_LINT_DEBUG
sql_print_error(
@@ -5636,7 +5656,14 @@ static int rocksdb_init_func(void *const p) {
if (ddl_manager.init(&dict_manager, &cf_manager, rocksdb_validate_tables)) {
// NO_LINT_DEBUG
sql_print_error("RocksDB: Failed to initialize DDL manager.");
- DBUG_RETURN(HA_EXIT_FAILURE);
+
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ }
+ else
+ DBUG_RETURN(HA_EXIT_FAILURE);
}
Rdb_sst_info::init(rdb);
@@ -11613,6 +11640,12 @@ void Rdb_drop_index_thread::run() {
"from cf id %u. MyRocks data dictionary may "
"get corrupted.",
d.cf_id);
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ continue;
+ }
abort();
}
rocksdb::ColumnFamilyHandle *cfh = cf_manager.get_cf(d.cf_id);
diff --git a/storage/rocksdb/ha_rocksdb.h b/storage/rocksdb/ha_rocksdb.h
index 448900c5a91..8d0ace707f8 100644
--- a/storage/rocksdb/ha_rocksdb.h
+++ b/storage/rocksdb/ha_rocksdb.h
@@ -1062,6 +1062,8 @@ const int MYROCKS_MARIADB_PLUGIN_MATURITY_LEVEL= MariaDB_PLUGIN_MATURITY_STABLE;
extern bool prevent_myrocks_loading;
+extern uint32_t rocksdb_ignore_datadic_errors;
+
void sql_print_verbose_info(const char *format, ...);
} // namespace myrocks
diff --git a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
index f2f9adebf46..865fbf33b8d 100644
--- a/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
+++ b/storage/rocksdb/mysql-test/rocksdb/r/rocksdb.result
@@ -932,6 +932,7 @@ rocksdb_force_flush_memtable_now OFF
rocksdb_force_index_records_in_range 0
rocksdb_git_hash #
rocksdb_hash_index_allow_collision ON
+rocksdb_ignore_datadic_errors 0
rocksdb_ignore_unknown_options ON
rocksdb_index_type kBinarySearch
rocksdb_info_log_level error_level
diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors.result b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors.result
new file mode 100644
index 00000000000..daa70a80683
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/r/rocksdb_ignore_datadic_errors.result
@@ -0,0 +1,7 @@
+SET @start_global_value = @@global.ROCKSDB_IGNORE_DATADIC_ERRORS;
+SELECT @start_global_value;
+@start_global_value
+0
+"Trying to set variable @@global.ROCKSDB_IGNORE_DATADIC_ERRORS to 444. It should fail because it is readonly."
+SET @@global.ROCKSDB_IGNORE_DATADIC_ERRORS = 444;
+ERROR HY000: Variable 'rocksdb_ignore_datadic_errors' is a read only variable
diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors.test b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors.test
new file mode 100644
index 00000000000..b412a018869
--- /dev/null
+++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_ignore_datadic_errors.test
@@ -0,0 +1,6 @@
+--source include/have_rocksdb.inc
+
+--let $sys_var=ROCKSDB_IGNORE_DATADIC_ERRORS
+--let $read_only=1
+--let $session=0
+--source include/rocksdb_sys_var.inc
diff --git a/storage/rocksdb/rdb_datadic.cc b/storage/rocksdb/rdb_datadic.cc
index 3d07a3d2516..c624bd15d20 100644
--- a/storage/rocksdb/rdb_datadic.cc
+++ b/storage/rocksdb/rdb_datadic.cc
@@ -5263,6 +5263,12 @@ void Rdb_dict_manager::log_start_drop_index(GL_INDEX_ID gl_index_id,
"from index id (%u,%u). MyRocks data dictionary may "
"get corrupted.",
gl_index_id.cf_id, gl_index_id.index_id);
+ if (rocksdb_ignore_datadic_errors)
+ {
+ sql_print_error("RocksDB: rocksdb_ignore_datadic_errors=1, "
+ "trying to continue");
+ return;
+ }
abort();
}
}
1
0
08 Dec '21
revision-id: caa727fd7134e23bf2244e734434014e70c95e27 (mariadb-10.4.13-180-gcaa727fd713)
parent(s): 98e9f790e6e216e2298d6e7a04117b52e4a0cbd3
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-08 22:08:18 +0300
message:
Avoid a crash on MyRocks data inconsistency.
In ha_rocksdb::open(), check if the number of indexes seen from the
SQL layer matches the number of indexes in the internal MyRocks data
dictionary.
Produce an error if there is a mismatch. (If we don't produce this error,
we are likely to crash as soon as we attempt to use an index)
---
storage/rocksdb/ha_rocksdb.cc | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 1f4b53029b8..938be7030bb 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -6708,6 +6708,17 @@ int ha_rocksdb::open(const char *const name, int mode, uint test_if_locked) {
"dictionary");
DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE);
}
+ if (m_tbl_def->m_key_count != table->s->keys + has_hidden_pk(table)? 1:0)
+ {
+ sql_print_error("MyRocks: DDL mismatch: .frm file has %u indexes, "
+ "MyRocks has %u (%s hidden pk)",
+ table->s->keys, m_tbl_def->m_key_count,
+ has_hidden_pk(table)? "1" : "no");
+ my_error(ER_INTERNAL_ERROR, MYF(0),
+ "MyRocks: DDL mismatch. Check the error log for details");
+ DBUG_RETURN(HA_ERR_ROCKSDB_INVALID_TABLE);
+ }
+
m_lock_rows = RDB_LOCK_NONE;
m_key_descr_arr = m_tbl_def->m_key_descr_arr;
1
0
revision-id: 98cb4351e141dcf65ea5a30f9f8c4bd352e374ea (mariadb-10.6.1-327-g98cb4351e14)
parent(s): 103949d566d0652b781a17ce414ed07e7210ef07
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-03 20:26:37 +0300
message:
Fix compilation on Windows
---
sql/opt_histogram_json.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index dfac0dd3f2f..5d92c9535a4 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -182,7 +182,7 @@ class Histogram_json_builder : public Histogram_builder
curtime.tm_hour,
curtime.tm_min,
curtime.tm_sec,
- curtime.tm_zone);
+ system_time_zone);
writer.add_member("target_histogram_size").add_ull(hist_width);
writer.add_member("collected_at").add_str(buf);
1
0
[Commits] 103949d566d: MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned characters
by psergey 03 Dec '21
by psergey 03 Dec '21
03 Dec '21
revision-id: 103949d566d0652b781a17ce414ed07e7210ef07 (mariadb-10.6.1-326-g103949d566d)
parent(s): 5fb922bea0c7f70b6c912946464c43b8c6a007d5
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-03 20:13:43 +0300
message:
MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned characters
Encode such characters in hex.
---
mysql-test/main/statistics_json.result | 32 ++++++++++-
mysql-test/main/statistics_json.test | 7 ++-
sql/opt_histogram_json.cc | 100 +++++++++++++++++++++++++++------
sql/opt_histogram_json.h | 13 ++++-
4 files changed, 130 insertions(+), 22 deletions(-)
diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result
index 1948d5acb4e..50a79d8f834 100644
--- a/mysql-test/main/statistics_json.result
+++ b/mysql-test/main/statistics_json.result
@@ -7896,16 +7896,41 @@ a
drop table t1;
#
# Another testcase: use a character that cannot be represented in utf8:
+# Also, now it's testcase for:
+# MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned characters
#
create table t1 ( a varchar(100) character set cp1251);
-insert into t1 values ( _cp1251 x'88'),( _cp1251 x'98');
+insert into t1 values ( _cp1251 x'88'),( _cp1251 x'88'), ( _cp1251 x'88');
+insert into t1 values ( _cp1251 x'98'),( _cp1251 x'98');
analyze table t1 persistent for all;
Table Op Msg_type Msg_text
-test.t1 analyze status Operation failed
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
select hist_type, histogram
from mysql.column_stats
where db_name=database() and table_name='t1';
hist_type histogram
+JSON_HB {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
+ "histogram_hb": [
+ {
+ "start": "€",
+ "size": 0.6,
+ "ndv": 1
+ },
+ {
+ "start_hex": "98",
+ "end_hex": "98",
+ "size": 0.4,
+ "ndv": 1
+ }
+ ]
+}
+analyze select * from t1 where a=_cp1251 x'88';
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 5 5.00 60.00 60.00 Using where
drop table t1;
#
# ASAN use-after-poison my_strnxfrm_simple_internal / Histogram_json_hb::range_selectivity ...
@@ -8102,7 +8127,8 @@ set histogram_type= JSON_HB, histogram_size= 1;
insert into t1 values ('foo'),(unhex('9C'));
analyze table t1 persistent for all;
Table Op Msg_type Msg_text
-test.t1 analyze status Operation failed
+test.t1 analyze status Engine-independent statistics collected
+test.t1 analyze status OK
select * from t1;
a
foo
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test
index bcc80093891..b67df41d9ba 100644
--- a/mysql-test/main/statistics_json.test
+++ b/mysql-test/main/statistics_json.test
@@ -227,9 +227,12 @@ drop table t1;
--echo #
--echo # Another testcase: use a character that cannot be represented in utf8:
+--echo # Also, now it's testcase for:
+--echo # MDEV-26764: JSON_HB Histograms: handle BINARY and unassigned characters
--echo #
create table t1 ( a varchar(100) character set cp1251);
-insert into t1 values ( _cp1251 x'88'),( _cp1251 x'98');
+insert into t1 values ( _cp1251 x'88'),( _cp1251 x'88'), ( _cp1251 x'88');
+insert into t1 values ( _cp1251 x'98'),( _cp1251 x'98');
analyze table t1 persistent for all;
--source include/histogram_replaces.inc
@@ -237,6 +240,8 @@ select hist_type, histogram
from mysql.column_stats
where db_name=database() and table_name='t1';
+analyze select * from t1 where a=_cp1251 x'88';
+
drop table t1;
--echo #
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index 023e69b83aa..dfac0dd3f2f 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -70,11 +70,11 @@ static bool json_unescape_to_string(const char *val, int val_len, String* out)
succeeds.
*/
-static bool json_escape_to_string(const String *str, String* out)
+static int json_escape_to_string(const String *str, String* out)
{
// Make sure 'out' has some memory allocated.
if (!out->alloced_length() && out->alloc(128))
- return true;
+ return JSON_ERROR_OUT_OF_SPACE;
while (1)
{
@@ -90,15 +90,15 @@ static bool json_escape_to_string(const String *str, String* out)
if (res >= 0)
{
out->length(res);
- return false; // Ok
+ return 0; // Ok
}
if (res != JSON_ERROR_OUT_OF_SPACE)
- return true; // Some conversion error
+ return res; // Some conversion error
// Out of space error. Try with a bigger buffer
if (out->alloc(out->alloced_length()*2))
- return true;
+ return JSON_ERROR_OUT_OF_SPACE;
}
}
@@ -208,8 +208,7 @@ class Histogram_json_builder : public Histogram_builder
*/
bool finalize_bucket_with_end_value(void *elem)
{
- writer.add_member("end");
- if (append_column_value(elem))
+ if (append_column_value(elem, false))
return true;
finalize_bucket();
return false;
@@ -224,19 +223,18 @@ class Histogram_json_builder : public Histogram_builder
{
DBUG_ASSERT(bucket.size == 0);
writer.start_object();
- writer.add_member("start");
- if (append_column_value(elem))
+ if (append_column_value(elem, true))
return true;
bucket.ndv= 1;
bucket.size= cnt;
return false;
}
-
+
/*
Append the passed value into the JSON writer as string value
*/
- bool append_column_value(void *elem)
+ bool append_column_value(void *elem, bool is_start)
{
StringBuffer<MAX_FIELD_WIDTH> val;
@@ -246,12 +244,21 @@ class Histogram_json_builder : public Histogram_builder
// Escape the value for JSON
StringBuffer<MAX_FIELD_WIDTH> escaped_val;
- if (json_escape_to_string(str, &escaped_val))
- return true;
-
- // Note: The Json_writer does NOT do escapes (perhaps this should change?)
- writer.add_str(escaped_val.c_ptr_safe());
- return false;
+ int rc= json_escape_to_string(str, &escaped_val);
+ if (!rc)
+ {
+ writer.add_member(is_start? "start": "end");
+ writer.add_str(escaped_val.c_ptr_safe());
+ return false;
+ }
+ if (rc == JSON_ERROR_ILLEGAL_SYMBOL)
+ {
+ escaped_val.set_hex(val.ptr(), val.length());
+ writer.add_member(is_start? "start_hex": "end_hex");
+ writer.add_str(escaped_val.c_ptr_safe());
+ return false;
+ }
+ return true;
}
/*
@@ -496,6 +503,41 @@ bool read_bucket_endpoint(json_engine_t *je, Field *field, String *out,
}
+bool read_hex_bucket_endpoint(json_engine_t *je, Field *field, String *out,
+ const char **err)
+{
+ if (json_read_value(je))
+ return true;
+
+ if (je->value_type != JSON_VALUE_STRING || je->value_escaped ||
+ (je->value_len & 1))
+ {
+ *err= "Expected a hex string";
+ return true;
+ }
+ StringBuffer<128> buf;
+
+ for (auto pc= je->value; pc < je->value + je->value_len; pc+=2)
+ {
+ int hex_char1= hexchar_to_int(pc[0]);
+ int hex_char2= hexchar_to_int(pc[1]);
+ if (hex_char1 == -1 || hex_char2 == -1)
+ {
+ *err= "Expected a hex string";
+ return true;
+ }
+ buf.append((hex_char1 << 4) | hex_char2);
+ }
+
+ field->store_text(buf.ptr(), buf.length(), field->charset());
+ out->alloc(field->pack_length());
+ uint bytes= field->get_key_image((uchar*)out->ptr(),
+ field->key_length(), Field::itRAW);
+ out->length(bytes);
+ return false;
+}
+
+
/*
@brief Parse a JSON reprsentation for one histogram bucket
@@ -619,6 +661,30 @@ int Histogram_json_hb::parse_bucket(json_engine_t *je, Field *field,
}
save1.restore_to(je);
+ // Less common endoints:
+ Json_string start_hex_str("start_hex");
+ if (json_key_matches(je, start_hex_str.get()))
+ {
+ if (read_hex_bucket_endpoint(je, field, &value_buf, err))
+ return 1;
+
+ have_start= true;
+ continue;
+ }
+ save1.restore_to(je);
+
+ Json_string end_hex_str("end_hex");
+ if (json_key_matches(je, end_hex_str.get()))
+ {
+ if (read_hex_bucket_endpoint(je, field, &value_buf, err))
+ return 1;
+ last_bucket_end_endp.assign(value_buf.ptr(), value_buf.length());
+ *assigned_last_end= true;
+ continue;
+ }
+ save1.restore_to(je);
+
+
// Some unknown member. Skip it.
if (json_skip_key(je))
return 1;
diff --git a/sql/opt_histogram_json.h b/sql/opt_histogram_json.h
index a2f8bdd37a5..327c852db98 100644
--- a/sql/opt_histogram_json.h
+++ b/sql/opt_histogram_json.h
@@ -32,12 +32,18 @@
"histogram_hb": [
{ "start": "value", "size":nnn.nn, "ndv": nnn },
...
- { "start": "value", "size":nnn.nn, "ndv": nnn, "end": "value"}
+
+ // Optionally, start and/or end can be replaced with _hex variant
+ { "start_hex: "value", "size":nnn.nn, "ndv":nnn},
+
+ ...
+ { "start": "value", "size":nnn.nn, "ndv": nnn, "end": "value"},
]
}
The histogram is an object with single member named Histogram_json_hb::
JSON_NAME. The value of that member is an array of buckets.
+
Each bucket is an object with these members:
"start" - the first value in the bucket.
"size" - fraction of table rows that is contained in the bucket.
@@ -51,6 +57,11 @@
The exception is single-point buckets where last value is the same as the
first value.
+
+ start/end can be replaced with start_hex/end_hex. In _hex variant, the
+ constant is encoded in hex. This encoding is used to handle so called
+ "unassigned characters": some non-UTF8 charsets have byte combinations that
+ are not mapped to any UTF8 character.
*/
class Histogram_json_hb : public Histogram_base
1
0
revision-id: 5fb922bea0c7f70b6c912946464c43b8c6a007d5 (mariadb-10.6.1-325-g5fb922bea0c)
parent(s): 99e762c7fafea895fcd2dbdd4fcf6cba75d80e5e
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-03 19:03:42 +0300
message:
More test coverage
---
mysql-test/main/statistics_json.result | 22 ++++++++++++++++++++++
mysql-test/main/statistics_json.test | 22 ++++++++++++++++++++++
sql/opt_histogram_json.cc | 2 --
3 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result
index 127ac6feb4b..1948d5acb4e 100644
--- a/mysql-test/main/statistics_json.result
+++ b/mysql-test/main/statistics_json.result
@@ -8146,3 +8146,25 @@ analyze select * from t1 where a >= 0;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 100 100.00 100.00 100.00 Using where
drop table t1;
+#
+# More test coverage
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
+create table t2 (a int);
+insert into t2 select 1 from t1;
+insert into t2 select (a+1)*10 from t0;
+insert into t2 values (0);
+analyze table t2 persistent for all;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status OK
+analyze select * from t2 where a < 1;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1011 1011.00 8.33 0.10 Using where
+analyze select * from t2 where a =100;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 1011 1011.00 0.10 0.10 Using where
+drop table t0,t1,t2;
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test
index 2b2a93f5465..bcc80093891 100644
--- a/mysql-test/main/statistics_json.test
+++ b/mysql-test/main/statistics_json.test
@@ -353,3 +353,25 @@ analyze select * from t1 where a < 0;
analyze select * from t1 where a > 0;
analyze select * from t1 where a >= 0;
drop table t1;
+
+
+--echo #
+--echo # More test coverage
+--echo #
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 from t0 A, t0 B, t0 C;
+
+create table t2 (a int);
+insert into t2 select 1 from t1;
+insert into t2 select (a+1)*10 from t0;
+insert into t2 values (0);
+
+analyze table t2 persistent for all;
+analyze select * from t2 where a < 1;
+analyze select * from t2 where a =100;
+
+drop table t0,t1,t2;
+
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index 572a65bc2ed..023e69b83aa 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -914,7 +914,6 @@ double Histogram_json_hb::range_selectivity(Field *field, key_range *min_endp,
/*
The range is "col > $CONST" and we've found a bucket that contains
only the value $CONST. Move to the next bucket.
- TODO: what if the last value in the histogram is a popular one?
*/
idx++;
}
@@ -948,7 +947,6 @@ double Histogram_json_hb::range_selectivity(Field *field, key_range *min_endp,
/*
The range is "col < $CONST" and we've found a bucket starting with
$CONST. Move to the previous bucket.
- TODO: what if the first value is the popular one?
*/
idx--;
}
1
0
revision-id: 99e762c7fafea895fcd2dbdd4fcf6cba75d80e5e (mariadb-10.6.1-324-g99e762c7faf)
parent(s): 154e9c29bdebba50d693da353695d7f877f9092b
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-03 18:08:10 +0300
message:
MDEV-26519: Improved histograms
Save extra information in the histogram:
"target_histogram_size": nnn,
"collected_at": "(date and time)",
"collected_by": "(server version)",
---
mysql-test/include/histogram_replaces.inc | 1 +
mysql-test/include/json_hb_histogram.inc | 3 +
mysql-test/main/statistics.result | 16 +-
mysql-test/main/statistics.test | 22 +-
mysql-test/main/statistics_json.result | 457 +++++++++++++++++++++++++++++-
mysql-test/main/statistics_json.test | 9 +-
sql/opt_histogram_json.cc | 114 ++++++--
sql/opt_histogram_json.h | 5 +
8 files changed, 576 insertions(+), 51 deletions(-)
diff --git a/mysql-test/include/histogram_replaces.inc b/mysql-test/include/histogram_replaces.inc
new file mode 100644
index 00000000000..4cea1b05709
--- /dev/null
+++ b/mysql-test/include/histogram_replaces.inc
@@ -0,0 +1 @@
+--source include/json_hb_histogram.inc
diff --git a/mysql-test/include/json_hb_histogram.inc b/mysql-test/include/json_hb_histogram.inc
new file mode 100644
index 00000000000..0805a7f0e53
--- /dev/null
+++ b/mysql-test/include/json_hb_histogram.inc
@@ -0,0 +1,3 @@
+# The time on ANALYSE FORMAT=JSON is rather variable
+
+--replace_regex /("(collected_at|collected_by)": )"[^"]*"/\1"REPLACED"/
diff --git a/mysql-test/main/statistics.result b/mysql-test/main/statistics.result
index 313e9b843b3..43b28f464e1 100644
--- a/mysql-test/main/statistics.result
+++ b/mysql-test/main/statistics.result
@@ -1487,7 +1487,7 @@ set histogram_size=254;
set histogram_type=@DOUBLE_PREC_TYPE;
ANALYZE TABLE City;
FLUSH TABLES;
-select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';;
+select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';;
UPPER(db_name) WORLD
UPPER(table_name) COUNTRYLANGUAGE
UPPER(column_name) PERCENTAGE
@@ -1498,9 +1498,8 @@ avg_length 4.0000
avg_frequency 2.7640
hist_size 100
hist_type SINGLE_PREC_HB
-hex(histogram) 0000000000000000000000000101010101010101010202020303030304040404050505050606070707080809090A0A0B0C0D0D0E0E0F10111213131415161718191B1C1E202224292A2E33373B4850575F6A76818C9AA7B9C4CFDADFE5EBF0F4F8FAFCFF
decode_histogram(hist_type,histogram) 0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.000,0.004,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.000,0.000,0.004,0.000,0.004,0.000,0.000,0.004,0.000,0.004,0.000,0.004,0.000,0.004,0.004,0.004,0.000,0.004,0.000,0.004,0.004,0.004,0.004,0.004,0.000,0.004,0.004,0.004,0.004,0.004,0.004,0.008,0.004,0.008,0.008,0.008,0.008,0.020,0.004,0.016,0.020,0.016,0.016,0.051,0.031,0.027,0.031,0.043,0.047,0.043,0.043,0.055,0.051,0.071,0.043,0.043,0.043,0.020,0.024,0.024,0.020,0.016,0.016,0.008,0.008,0.012,0.000
-select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';;
+select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';;
UPPER(db_name) WORLD
UPPER(table_name) CITY
UPPER(column_name) POPULATION
@@ -1511,7 +1510,6 @@ avg_length 4.0000
avg_frequency 1.0467
hist_size 254
hist_type DOUBLE_PREC_HB
-hex(histogram) 1F00A1002B023002350238023F02430249024E02520258025D02630268026E02720276027B02800285028C02920297029D02A102A802AC02B402BC02C402CC02D302DA02E302EA02F102F802010305030C03120319031F03290333033D0343034F03590363036D037803840390039A03A603B303C303D103E003F203020412042404330440045304600472047F049104A204B804C804DE04F2040A0526053F0558056F058E05B305D905F4051306380667068406AB06DA06020731075C079407C507F8072E085E08A508DF0824096909CC092E0A760AD50A400BA90B150CAD0C310D240E130F0E103B11B9126B14F0166B192F1CB71FFF240630483FC567
decode_histogram(hist_type,histogram) 0.00047,0.00198,0.00601,0.00008,0.00008,0.00005,0.00011,0.00006,0.00009,0.00008,0.00006,0.00009,0.00008,0.00009,0.00008,0.00009,0.00006,0.00006,0.00008,0.00008,0.00008,0.00011,0.00009,0.00008,0.00009,0.00006,0.00011,0.00006,0.00012,0.00012,0.00012,0.00012,0.00011,0.00011,0.00014,0.00011,0.00011,0.00011,0.00014,0.00006,0.00011,0.00009,0.00011,0.00009,0.00015,0.00015,0.00015,0.00009,0.00018,0.00015,0.00015,0.00015,0.00017,0.00018,0.00018,0.00015,0.00018,0.00020,0.00024,0.00021,0.00023,0.00027,0.00024,0.00024,0.00027,0.00023,0.00020,0.00029,0.00020,0.00027,0.00020,0.00027,0.00026,0.00034,0.00024,0.00034,0.00031,0.00037,0.00043,0.00038,0.00038,0.00035,0.00047,0.00056,0.00058,0.00041,0.00047,0.00056,0.00072,0.00044,0.00060,0.00072,0.00061,0.00072,0.00066,0.00085,0.00075,0.00078,0.00082,0.00073,0.00108,0.00089,0.00105,0.00105,0.00151,0.00150,0.00110,0.00145,0.00163,0.00160,0.00165,0.00232,0.00201,0.00371,0.00365,0.00383,0.00459,0.00583,0.00662,0.00984
,0.00969,0.01080,0.01379,0.02063,0.04308,0.05960,0.15816,0.59464
set histogram_type=@SINGLE_PREC_TYPE;
set histogram_size=0;
@@ -1648,10 +1646,10 @@ test.t2 analyze status OK
select db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
-hist_size, hist_type, HEX(histogram)
+hist_size, hist_type, decode_histogram(hist_type,histogram)
FROM mysql.column_stats;
-db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
-test t2 id 1 1024 0.0000 8.0000 63 SINGLE_PREC_HB 03070B0F13171B1F23272B2F33373B3F43474B4F53575B5F63676B6F73777B7F83878B8F93979B9FA3A7ABAFB3B7BBBFC3C7CBCFD3D7DBDFE3E7EBEFF3F7FB
+db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
+test t2 id 1 1024 0.0000 8.0000 63 SINGLE_PREC_HB 0.012,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016,0.016
set histogram_size=0;
drop table t1, t2;
set use_stat_tables=@save_use_stat_tables;
@@ -1669,9 +1667,9 @@ Level Code Message
select db_name, table_name, column_name,
HEX(min_value), HEX(max_value),
nulls_ratio, avg_frequency,
-hist_size, hist_type, HEX(histogram)
+hist_size, hist_type, decode_histogram(hist_type,histogram)
FROM mysql.column_stats;
-db_name table_name column_name HEX(min_value) HEX(max_value) nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
+db_name table_name column_name HEX(min_value) HEX(max_value) nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a D879626AF872675F73E662F8 D879626AF872675F73E662F8 0.0000 1.0000 0 NULL NULL
drop table t1;
#
diff --git a/mysql-test/main/statistics.test b/mysql-test/main/statistics.test
index 5fde72cdbfa..1d431237e82 100644
--- a/mysql-test/main/statistics.test
+++ b/mysql-test/main/statistics.test
@@ -91,6 +91,7 @@ SELECT * FROM mysql.index_stats;
SELECT COUNT(*) FROM t1;
+
SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='a';
SELECT MIN(t1.a), MAX(t1.a),
@@ -187,6 +188,7 @@ DELETE FROM mysql.column_stats;
set histogram_size=4;
ANALYZE TABLE t1;
+--source include/histogram_replaces.inc
SELECT db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
@@ -200,6 +202,7 @@ set histogram_size=8;
set histogram_type=@DOUBLE_PREC_TYPE;
ANALYZE TABLE t1;
+--source include/histogram_replaces.inc
SELECT db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
@@ -668,8 +671,10 @@ ANALYZE TABLE City;
FLUSH TABLES;
--enable_result_log
---query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';
---query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';
+--source include/histogram_replaces.inc
+--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';
+--source include/histogram_replaces.inc
+--query_vertical select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';
set histogram_type=@SINGLE_PREC_TYPE;
set histogram_size=0;
@@ -715,6 +720,7 @@ set histogram_size=10;
analyze table t1 persistent for all;
+--source include/histogram_replaces.inc
select db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
@@ -741,6 +747,7 @@ show variables like 'histogram%';
analyze table t1 persistent for all;
+--source include/histogram_replaces.inc
select db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
@@ -786,10 +793,11 @@ set histogram_size=63;
analyze table t2 persistent for all;
+--source include/histogram_replaces.inc
select db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
- hist_size, hist_type, HEX(histogram)
+ hist_size, hist_type, decode_histogram(hist_type,histogram)
FROM mysql.column_stats;
set histogram_size=0;
@@ -807,10 +815,11 @@ insert into t1 values(unhex('D879626AF872675F73E662F8'));
analyze table t1 persistent for all;
show warnings;
+--source include/histogram_replaces.inc
select db_name, table_name, column_name,
HEX(min_value), HEX(max_value),
nulls_ratio, avg_frequency,
- hist_size, hist_type, HEX(histogram)
+ hist_size, hist_type, decode_histogram(hist_type,histogram)
FROM mysql.column_stats;
drop table t1;
@@ -974,6 +983,7 @@ INSERT INTO t1 SELECT id+9192 FROM t1;
--echo # This query will should show a full table scan analysis.
--echo #
ANALYZE TABLE t1;
+--source include/histogram_replaces.inc
select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
@@ -984,6 +994,7 @@ set analyze_sample_percentage=0.1;
--echo # This query will show an innacurate avg_frequency value.
--echo #
ANALYZE TABLE t1;
+--source include/histogram_replaces.inc
select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
@@ -993,6 +1004,7 @@ from mysql.column_stats;
--echo #
set analyze_sample_percentage=25;
ANALYZE TABLE t1;
+--source include/histogram_replaces.inc
select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
@@ -1003,6 +1015,7 @@ set analyze_sample_percentage=0;
--echo # Test self adjusting sampling level.
--echo #
ANALYZE TABLE t1;
+--source include/histogram_replaces.inc
select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
@@ -1014,6 +1027,7 @@ explain select * from t1;
set analyze_sample_percentage=100;
ANALYZE TABLE t1;
+--source include/histogram_replaces.inc
select table_name, column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency,
DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result
index 7ad6827711b..127ac6feb4b 100644
--- a/mysql-test/main/statistics_json.result
+++ b/mysql-test/main/statistics_json.result
@@ -234,6 +234,9 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 0 49 0.0000 1.0000 4 JSON_HB {
+ "target_histogram_size": 4,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0",
@@ -259,6 +262,9 @@ test t1 a 0 49 0.0000 1.0000 4 JSON_HB {
]
}
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 4 JSON_HB {
+ "target_histogram_size": 4,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "vvvvvvvvvvvvv",
@@ -284,6 +290,9 @@ test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 4 JSON_HB {
]
}
test t1 c aaaa dddddddd 0.1250 7.0000 4 JSON_HB {
+ "target_histogram_size": 4,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "aaaa",
@@ -309,6 +318,9 @@ test t1 c aaaa dddddddd 0.1250 7.0000 4 JSON_HB {
]
}
test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 3 JSON_HB {
+ "target_histogram_size": 4,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1989-03-12",
@@ -329,6 +341,9 @@ test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 3 JSON_HB {
]
}
test t1 e 0.01 0.112 0.2250 6.2000 4 JSON_HB {
+ "target_histogram_size": 4,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0.01",
@@ -354,6 +369,9 @@ test t1 e 0.01 0.112 0.2250 6.2000 4 JSON_HB {
]
}
test t1 f 1 5 0.2000 6.4000 4 JSON_HB {
+ "target_histogram_size": 4,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "\u0001",
@@ -393,6 +411,9 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 0 49 0.0000 1.0000 7 JSON_HB {
+ "target_histogram_size": 8,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0",
@@ -433,6 +454,9 @@ test t1 a 0 49 0.0000 1.0000 7 JSON_HB {
]
}
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 5 JSON_HB {
+ "target_histogram_size": 8,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "vvvvvvvvvvvvv",
@@ -463,6 +487,9 @@ test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 5 JSON_HB {
]
}
test t1 c aaaa dddddddd 0.1250 7.0000 5 JSON_HB {
+ "target_histogram_size": 8,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "aaaa",
@@ -493,6 +520,9 @@ test t1 c aaaa dddddddd 0.1250 7.0000 5 JSON_HB {
]
}
test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 4 JSON_HB {
+ "target_histogram_size": 8,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1989-03-12",
@@ -518,6 +548,9 @@ test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 4 JSON_HB {
]
}
test t1 e 0.01 0.112 0.2250 6.2000 5 JSON_HB {
+ "target_histogram_size": 8,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0.01",
@@ -548,6 +581,9 @@ test t1 e 0.01 0.112 0.2250 6.2000 5 JSON_HB {
]
}
test t1 f 1 5 0.2000 6.4000 5 JSON_HB {
+ "target_histogram_size": 8,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "\u0001",
@@ -1811,7 +1847,7 @@ set histogram_size=254;
set histogram_type=@DOUBLE_PREC_TYPE;
ANALYZE TABLE City;
FLUSH TABLES;
-select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';;
+select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='COUNTRYLANGUAGE' and UPPER(column_name) = 'PERCENTAGE';;
UPPER(db_name) WORLD
UPPER(table_name) COUNTRYLANGUAGE
UPPER(column_name) PERCENTAGE
@@ -1822,8 +1858,10 @@ avg_length 4.0000
avg_frequency 2.7640
hist_size 85
hist_type JSON_HB
-hex(histogram) 7B0A202022686973746F6772616D5F6862223A205B0A202020207B0A202020202020227374617274223A2022302E30222C0A2020202020202273697A65223A20302E3036363035363931312C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E31222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E32222C0A2020202020202273697A65223A20302E3032323335373732342C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E33222C0A2020202020202273697A65223A20302E3031373237363432332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E34222C0A2020202020202273697A65223A20302E3032353430363530342C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E35222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A20
2020202020227374617274223A2022302E36222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E37222C0A2020202020202273697A65223A20302E3031373237363432332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E33222C0A2020202020202273697A65223A20302
E3031323139353132322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E34222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E35222C0A2020202020202273697A65223A20302E3030353038313330312C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E36222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020
207B0A202020202020227374617274223A2022322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022322E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E38222C0A2020202020202273697A652
23A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C
0A202020207B0A202020202020227374617274223A2022342E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022342E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022342E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022342E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022352E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022352E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022352E37222C0A202020202020227
3697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022362E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022362E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022362E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022372E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022372E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022372E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A2020
20207D2C0A202020207B0A202020202020227374617274223A2022382E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022382E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022382E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022392E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022392E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A202231302E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231302E38222C0A202
0202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231312E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231322E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231322E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202231332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231342E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231362E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A2020202020
20226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231372E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202231392E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202232302E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202232322E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202232332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202232392E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227
374617274223A202233322E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202233342E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202233392E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202234342E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202234392E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202235322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202235382E34222C0A2020202020202273697A65223A20
302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202236342E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202236392E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202237362E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202238302E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202238352E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202238372E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A2
02020207D2C0A202020207B0A202020202020227374617274223A202238392E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202239322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239332E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202239352E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239362E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239382E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A20223939
2E30222C0A2020202020202273697A65223A20302E3030363039373536312C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A202239392E39222C0A20202020202022656E64223A202239392E39222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D0A20205D0A7D
decode_histogram(hist_type,histogram) {
+ "target_histogram_size": 100,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0.0",
@@ -2253,7 +2291,7 @@ decode_histogram(hist_type,histogram) {
}
]
}
-select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,hex(histogram),decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';;
+select UPPER(db_name),UPPER(table_name),UPPER(column_name),min_value,max_value,nulls_ratio,avg_length,avg_frequency,hist_size,hist_type,decode_histogram(hist_type,histogram) from mysql.column_stats where UPPER(db_name)='WORLD' and UPPER(table_name)='CITY' and UPPER(column_name) = 'POPULATION';;
UPPER(db_name) WORLD
UPPER(table_name) CITY
UPPER(column_name) POPULATION
@@ -2264,8 +2302,10 @@ avg_length 4.0000
avg_frequency 1.0467
hist_size 240
hist_type JSON_HB
-hex(histogram) 7B0A202022686973746F6772616D5F6862223A205B0A202020207B0A202020202020227374617274223A20223432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231363336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202235383038222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223136323433222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223239303334222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223731303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A20
2020207D2C0A202020207B0A202020202020227374617274223A20223839323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223839343437222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A20223930303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031310A202020207D2C0A202020207B0A202020202020227374617274223A20223930353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223930383134222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223931313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A2020202020202
27374617274223A20223931373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223932303434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223932353734222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223932393838222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223933333432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223933393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223934323030222C0A20
20202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223934373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223935303532222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223935353231222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A20223936313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223936363236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A20223936393338222C0A2020202020202273697A65223A20302E3030343
136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223937333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223937393239222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223938323933222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223938363430222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223939333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223939373831222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E647622
3A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313030313138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313030343930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313030393234222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031320A202020207D2C0A202020207B0A202020202020227374617274223A2022313031323935222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313031363630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313032313231222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A2
02020207B0A202020202020227374617274223A2022313032333739222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313032383230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313033333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313033363533222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313034343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313035303830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A20202020202022
7374617274223A2022313035353330222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313036303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313036343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313036393936222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313037333239222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313037373730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223130383
23534222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313038363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313039323235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313039363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313130303334222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313130373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313131343534222C0A20202020202022
73697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031320A202020207D2C0A202020207B0A202020202020227374617274223A2022313132303037222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313132363733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313133343934222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313134303635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313134383135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313135343833222C0A2020202020202273697A65223A20302E3030343
136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313136313332222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313136363935222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313137323538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313138303830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313138383135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313139333931222C0A2020202020202273697A65223A20302E3030343136373638382C0A2020202020
20226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313139393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313230373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313231313937222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313231383432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313232343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313233323733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202
020207D2C0A202020207B0A202020202020227374617274223A2022313233373736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313234303732222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313234363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313235323336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313235373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313236323832222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A20
2020202020227374617274223A2022313236383732222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313237333530222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313237383938222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313238363531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313239363838222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A2022313330323135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223
A2022313331313439222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313332313237222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313332383230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313333343433222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313333393336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313334383335222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313336303632222C0A20
20202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313337303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313337373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313338343138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313339333537222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313430313639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A2022313431313332222C0A2020202020202273697A65223A2
0302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313432313730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313432393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313434313236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313435313530222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313436313035222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313437313234222C0A2020202020202273697A65223A20302E3030343136373638382C
0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313437393339222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313438383637222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313439393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313531303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313532313934222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313533333434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223
A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313534393830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313535393431222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313537333538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313538373230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313630333539222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313631353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A20
2020207B0A202020202020227374617274223A2022313633313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313634333637222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313635353833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313637313833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313638393533222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313730313233222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227
374617274223A2022313731333633222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313732363438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313733383738222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313734393834222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313736353736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313738323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231373932
3538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313830343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313832313438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313833323631222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313834353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313835393531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313837353537222C0A202020202020227
3697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313839303336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313930323535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313932353039222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313934313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313935343638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313937303030222C0A2020202020202273697A65223A20302E30303431
36373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313939303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323030393031222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323032343531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323034393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323036333338222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323038303534222C0A2020202020202273697A65223A20302E3030343136373638382C0A20202020202
0226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323131303638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323133323731222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323135333733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323137343939222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323139373631222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323232303330222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A2020
20207D2C0A202020207B0A202020202020227374617274223A2022323234303434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323236353733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323239323132222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323332383131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323335373630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323339313234222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202
020202020227374617274223A2022323431373639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323433383235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323436353335222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323439323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323533353837222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323535363137222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A
2022323539353337222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323632393437222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323635323131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323639333933222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323732303538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323735393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323738383239222C0A202
0202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323832313937222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323836383438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323931303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022323934313235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323939313138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333031353034222C0A2020202020202273697A65223A20
302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333035363939222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333131323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333135303833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333139333733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333234363632222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333238373131222C0A2020202020202273697A65223A20302E3030343136373638382C0
A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333332383030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333337393636222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333432323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333438313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333533343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333538363633222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A
2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333632343730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333636373132222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333735303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333831373235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333836323336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333935343032222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202
020207B0A202020202020227374617274223A2022343033313531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343131353432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343139303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343235353739222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343333313830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343431363439222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A2020202020202273
74617274223A2022343530313830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022343539383834222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343639353333222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343736363638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343833313535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343935353430222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353130303
030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353230303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022353330393635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353534363336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353638383535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022353837323131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363036393332222C0A2020202020202273
697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363234323639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363530313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363639313831222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373031383237222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373238303630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373632303030222C0A2020202020202273697A65223A20302E303034313
6373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373934323436222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022383330303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022383739303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393437343833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231303032323339222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231303630323537222C0A2020202020202273697A65223A20302E3030343136373638382C0A20202020
2020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231313139313137222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231313836393236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231323438373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231333436313736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231343538343833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231363135333639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E64762
23A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231383631323635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232313137353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232353030303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232383936303136222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202234303137373333222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202236373538383435222C0A20202020202022656E64223A20223130353030303030222C0A2020202020202273697A65223A20302E303033
39323235332C0A202020202020226E6476223A2031360A202020207D0A20205D0A7D
decode_histogram(hist_type,histogram) {
+ "target_histogram_size": 254,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "42",
@@ -3542,6 +3582,9 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 1 3 0.0000 1.0000 3 JSON_HB {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -3587,6 +3630,9 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 1 5 0.0000 1.0000 5 JSON_HB {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -3653,10 +3699,332 @@ test.t2 analyze status OK
select db_name, table_name, column_name,
min_value, max_value,
nulls_ratio, avg_frequency,
-hist_size, hist_type, HEX(histogram)
+hist_size, hist_type, decode_histogram(hist_type,histogram)
FROM mysql.column_stats;
-db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
-test t2 id 1 1024 0.0000 8.0000 63 JSON_HB 7B0A202022686973746F6772616D5F6862223A205B0A202020207B0A202020202020227374617274223A202231222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223137222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223333222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A20223530222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223636222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223832222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A20
2020207D2C0A202020207B0A202020202020227374617274223A20223939222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313135222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313332222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313438222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313634222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022313831222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223139372
22C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323133222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022323330222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323436222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323633222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323739222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323935222C0A2020202020202273697A65223A20302E3031353939313231312C0A20
2020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022333132222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333238222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333434222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022333631222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333737222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333934222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A20202
0202020227374617274223A2022343130222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343236222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022343433222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343539222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343735222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022343932222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353038222C0A2020202020202273697A65
223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353235222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353431222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353537222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022353734222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353930222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363036222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A20313
80A202020207D2C0A202020207B0A202020202020227374617274223A2022363233222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363339222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363536222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363732222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363838222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022373035222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022
373231222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373337222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022373534222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373730222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373837222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383033222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383139222C0A2020202020202273697A65223A20302E30313539393132313
12C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022383336222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383532222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383638222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022383835222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393031222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393138222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B
0A202020202020227374617274223A2022393334222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393530222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022393637222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393833222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393939222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A202231303136222C0A20202020202022656E64223A202231303234222C0A2020202020202273697A65223A20302E3030383534343932322C0A202020202020226E6476223A20390A202020207D0A20205D0A7D
+db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
+test t2 id 1 1024 0.0000 8.0000 63 JSON_HB {
+ "target_histogram_size": 63,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
+ "histogram_hb": [
+ {
+ "start": "1",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "17",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "33",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "50",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "66",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "82",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "99",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "115",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "132",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "148",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "164",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "181",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "197",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "213",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "230",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "246",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "263",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "279",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "295",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "312",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "328",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "344",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "361",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "377",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "394",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "410",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "426",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "443",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "459",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "475",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "492",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "508",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "525",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "541",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "557",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "574",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "590",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "606",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "623",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "639",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "656",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "672",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "688",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "705",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "721",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "737",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "754",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "770",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "787",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "803",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "819",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "836",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "852",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "868",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "885",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "901",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "918",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "934",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "950",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "967",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "983",
+ "size": 0.015991211,
+ "ndv": 17
+ },
+ {
+ "start": "999",
+ "size": 0.015991211,
+ "ndv": 18
+ },
+ {
+ "start": "1016",
+ "end": "1024",
+ "size": 0.008544922,
+ "ndv": 9
+ }
+ ]
+}
set histogram_size=0;
drop table t1, t2;
set use_stat_tables=@save_use_stat_tables;
@@ -3674,9 +4042,9 @@ Level Code Message
select db_name, table_name, column_name,
HEX(min_value), HEX(max_value),
nulls_ratio, avg_frequency,
-hist_size, hist_type, HEX(histogram)
+hist_size, hist_type, decode_histogram(hist_type,histogram)
FROM mysql.column_stats;
-db_name table_name column_name HEX(min_value) HEX(max_value) nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
+db_name table_name column_name HEX(min_value) HEX(max_value) nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a D879626AF872675F73E662F8 D879626AF872675F73E662F8 0.0000 1.0000 0 NULL NULL
drop table t1;
#
@@ -3817,6 +4185,9 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 14.0000 {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -3884,6 +4255,9 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 111 17026 0.0000 4.0000 10.4739 {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "111",
@@ -3951,6 +4325,9 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 14.0401 {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -4018,6 +4395,9 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 13.9812 {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -4091,6 +4471,9 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 14.0000 {
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -4189,6 +4572,9 @@ test.t1_json analyze status OK
select * from mysql.column_stats where table_name='t1_json';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1_json a a-0 a-9 0.0000 3.0000 1.0000 10 JSON_HB {
+ "target_histogram_size": 100,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "a-0",
@@ -4336,7 +4722,7 @@ explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: Histogram must have at least one bucket at offset 18.
+Warning 4186 Failed to parse histogram for table test.t1_json: Histogram must have at least one bucket at offset 19.
create table t2 (
city varchar(100)
);
@@ -4381,6 +4767,9 @@ ANALYZE TABLE Country, City, CountryLanguage persistent for all;
SELECT column_name, min_value, max_value, hist_size, hist_type, histogram FROM mysql.column_stats;
column_name min_value max_value hist_size hist_type histogram
Code ABW ZWE 48 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "ABW",
@@ -4626,6 +5015,9 @@ Code ABW ZWE 48 JSON_HB {
]
}
Country ABW ZWE 39 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "ABW",
@@ -4826,6 +5218,9 @@ Country ABW ZWE 39 JSON_HB {
]
}
Name Afghanistan Zimbabwe 48 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "Afghanistan",
@@ -5071,6 +5466,9 @@ Name Afghanistan Zimbabwe 48 JSON_HB {
]
}
SurfaceArea 0.40 17075400.00 48 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0.40",
@@ -5316,6 +5714,9 @@ SurfaceArea 0.40 17075400.00 48 JSON_HB {
]
}
Population 0 1277558000 48 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0",
@@ -5561,6 +5962,9 @@ Population 0 1277558000 48 JSON_HB {
]
}
Capital 1 4074 47 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -5801,6 +6205,9 @@ Capital 1 4074 47 JSON_HB {
]
}
ID 1 4079 50 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -6056,6 +6463,9 @@ ID 1 4079 50 JSON_HB {
]
}
Name A Coruña (La Coruña) Ürgenc 50 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "A Coruña (La Coruña)",
@@ -6311,6 +6721,9 @@ Name A Coruña (La Coruña) Ürgenc 50 JSON_HB {
]
}
Population 42 10500000 50 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "42",
@@ -6566,6 +6979,9 @@ Population 42 10500000 50 JSON_HB {
]
}
Country ABW ZWE 50 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "ABW",
@@ -6821,6 +7237,9 @@ Country ABW ZWE 50 JSON_HB {
]
}
Language Abhyasi [South]Mande 48 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "Abhyasi",
@@ -7066,6 +7485,9 @@ Language Abhyasi [South]Mande 48 JSON_HB {
]
}
Percentage 0.0 99.9 47 JSON_HB {
+ "target_histogram_size": 50,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0.0",
@@ -7342,6 +7764,9 @@ select histogram
from mysql.column_stats where table_name='t10' and db_name=database();
histogram
{
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "Berlin",
@@ -7391,6 +7816,9 @@ SELECT DECODE_HISTOGRAM(hist_type, histogram) from mysql.column_stats;
DECODE_HISTOGRAM(hist_type, histogram)
NULL
{
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -7450,6 +7878,9 @@ from mysql.column_stats
where db_name=database() and table_name='t1';
decode_histogram(hist_type, histogram)
{
+ "target_histogram_size": 10,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "Ñ",
@@ -7512,6 +7943,9 @@ test.t1 analyze status OK
select histogram from mysql.column_stats where table_name = 't1';
histogram
{
+ "target_histogram_size": 4,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "1",
@@ -7584,6 +8018,9 @@ test.t1 analyze status OK
select * from mysql.column_stats where table_name='t1';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 a 0 900 0.0000 4.0000 100.0000 10 JSON_HB {
+ "target_histogram_size": 254,
+ "collected_at": "REPLACED",
+ "collected_by": "REPLACED",
"histogram_hb": [
{
"start": "0",
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test
index 21d8ebc3829..2b2a93f5465 100644
--- a/mysql-test/main/statistics_json.test
+++ b/mysql-test/main/statistics_json.test
@@ -8,7 +8,6 @@ let $histogram_type_override='JSON_HB';
--source include/have_innodb.inc
--source include/have_stat_tables.inc
--source include/have_sequence.inc
---source include/analyze-format.inc
--disable_warnings
drop table if exists t1;
--enable_warnings
@@ -33,6 +32,7 @@ set histogram_type=json_hb;
create table t1_json (a varchar(255));
insert into t1_json select concat('a-', a) from ten;
analyze table t1_json persistent for all;
+--source include/json_hb_histogram.inc
select * from mysql.column_stats where table_name='t1_json';
explain extended select * from t1_json where a between 'a-3a' and 'zzzzzzzzz';
analyze select * from t1_json where a between 'a-3a' and 'zzzzzzzzz';
@@ -134,6 +134,7 @@ set histogram_size=50;
ANALYZE TABLE Country, City, CountryLanguage persistent for all;
--enable_result_log
+--source include/histogram_replaces.inc
SELECT column_name, min_value, max_value, hist_size, hist_type, histogram FROM mysql.column_stats;
analyze select * from Country use index () where Code between 'BBC' and 'GGG';
analyze select * from Country use index () where Code < 'BBC';
@@ -161,6 +162,7 @@ from mysql.column_stats where table_name='t10' and db_name=database();
insert into t10 values ('Berlin'),('Paris'),('Rome');
set histogram_size=10, histogram_type='json_hb';
analyze table t10 persistent for all;
+--source include/histogram_replaces.inc
select histogram
from mysql.column_stats where table_name='t10' and db_name=database();
drop table t10;
@@ -184,6 +186,7 @@ CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (NULL,1), (NULL,2);
SET histogram_type = JSON_HB;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
+--source include/histogram_replaces.inc
SELECT DECODE_HISTOGRAM(hist_type, histogram) from mysql.column_stats;
drop table t1;
@@ -214,6 +217,7 @@ select hex(a) from t1;
set histogram_type='json_hb';
analyze table t1 persistent for all;
+--source include/histogram_replaces.inc
select decode_histogram(hist_type, histogram)
from mysql.column_stats
where db_name=database() and table_name='t1';
@@ -228,6 +232,7 @@ create table t1 ( a varchar(100) character set cp1251);
insert into t1 values ( _cp1251 x'88'),( _cp1251 x'98');
analyze table t1 persistent for all;
+--source include/histogram_replaces.inc
select hist_type, histogram
from mysql.column_stats
where db_name=database() and table_name='t1';
@@ -265,6 +270,7 @@ insert into t1 select 6 from seq_1_to_25;
set histogram_size=4, histogram_type=JSON_HB;
analyze table t1 persistent for all;
+--source include/json_hb_histogram.inc
select histogram from mysql.column_stats where table_name = 't1';
drop table t1;
@@ -299,6 +305,7 @@ insert into t1 select 100*A.a from t0 A, t0 B, t0 C;
select a, count(*) from t1 group by a order by a;
set histogram_type=json_hb, histogram_size=default;
analyze table t1 persistent for all;
+--source include/json_hb_histogram.inc
select * from mysql.column_stats where table_name='t1';
analyze select * from t1 where a=0;
analyze select * from t1 where a=50;
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index faf5ec314ab..572a65bc2ed 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -22,7 +22,13 @@
/*
- Un-escape a JSON string and save it into *out.
+ @brief
+ Un-escape a JSON string and save it into *out.
+
+ @detail
+ There's no way to tell how much space is needed for the output.
+ Start with a small string and increase its size until json_unescape()
+ succeeds.
*/
static bool json_unescape_to_string(const char *val, int val_len, String* out)
@@ -55,7 +61,13 @@ static bool json_unescape_to_string(const char *val, int val_len, String* out)
/*
- Escape a JSON string and save it into *out.
+ @brief
+ Escape a JSON string and save it into *out.
+
+ @detail
+ There's no way to tell how much space is needed for the output.
+ Start with a small string and increase its size until json_escape()
+ succeeds.
*/
static bool json_escape_to_string(const String *str, String* out)
@@ -145,6 +157,8 @@ class Histogram_json_builder : public Histogram_builder
bucket.size= 0;
writer.start_object();
+ append_histogram_params();
+
writer.add_member(Histogram_json_hb::JSON_NAME).start_array();
}
@@ -153,6 +167,27 @@ class Histogram_json_builder : public Histogram_builder
private:
bool bucket_is_empty() { return bucket.ndv == 0; }
+ void append_histogram_params()
+ {
+ char buf[128];
+
+ time_t cur_time_t= my_time(0);
+ struct tm curtime;
+ localtime_r(&cur_time_t, &curtime);
+
+ my_snprintf(buf, sizeof(buf), "%d-%02d-%02d %2d:%02d:%02d %s",
+ curtime.tm_year + 1900,
+ curtime.tm_mon+1,
+ curtime.tm_mday,
+ curtime.tm_hour,
+ curtime.tm_min,
+ curtime.tm_sec,
+ curtime.tm_zone);
+
+ writer.add_member("target_histogram_size").add_ull(hist_width);
+ writer.add_member("collected_at").add_str(buf);
+ writer.add_member("collected_by").add_str(server_version);
+ }
/*
Flush the current bucket out (to JSON output), and set it to be empty.
*/
@@ -423,6 +458,15 @@ class Json_saved_parser_state
};
+/*
+ @brief
+ Read a constant from JSON document and save it in *out.
+
+ @detail
+ The JSON document stores constant in text form, we need to save it in
+ KeyTupleFormat. String constants in JSON may be escaped.
+*/
+
bool read_bucket_endpoint(json_engine_t *je, Field *field, String *out,
const char **err)
{
@@ -508,8 +552,9 @@ int Histogram_json_hb::parse_bucket(json_engine_t *je, Field *field,
double size_d;
longlong ndv_ll;
StringBuffer<128> value_buf;
+ int rc;
- while (!json_scan_next(je) && je->state != JST_OBJ_END)
+ while (!(rc= json_scan_next(je)) && je->state != JST_OBJ_END)
{
Json_saved_parser_state save1(je);
Json_string start_str("start");
@@ -579,6 +624,9 @@ int Histogram_json_hb::parse_bucket(json_engine_t *je, Field *field,
return 1;
}
+ if (rc)
+ return 1;
+
if (!have_start)
{
*err= "\"start\" element not present";
@@ -625,13 +673,12 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name,
json_engine_t je;
int rc;
const char *err= "JSON parse error";
- double total_size= 0.0;
- int end_element= -1;
+ double total_size;
+ int end_element;
bool end_assigned;
DBUG_ENTER("Histogram_json_hb::parse");
DBUG_ASSERT(type_arg == JSON_HB);
- Json_string hist_key_name(JSON_NAME);
json_scan_start(&je, &my_charset_utf8mb4_bin,
(const uchar*)hist_data,
(const uchar*)hist_data+hist_data_len);
@@ -645,32 +692,45 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name,
goto err;
}
- if (json_scan_next(&je))
- goto err;
-
- if (je.state != JST_KEY || !json_key_matches(&je, hist_key_name.get()))
+ while (1)
{
- err= "Root element must be histogram_hb";
- goto err;
- }
+ if (json_scan_next(&je))
+ goto err;
+ if (je.state == JST_OBJ_END)
+ break; // End of object
- if (json_scan_next(&je))
- goto err;
+ if (je.state != JST_KEY)
+ goto err; // Can' really have this: JSON object has keys in it
- if (je.state != JST_ARRAY_START)
- {
- err= "histogram_hb must contain an array";
- goto err;
- }
+ Json_string hist_key_name(JSON_NAME);
+ if (json_key_matches(&je, hist_key_name.get()))
+ {
+ total_size= 0.0;
+ end_element= -1;
+ if (json_scan_next(&je))
+ goto err;
- while (!(rc= parse_bucket(&je, field, &total_size, &end_assigned, &err)))
- {
- if (end_assigned && end_element != -1)
- end_element= (int)buckets.size();
- }
+ if (je.state != JST_ARRAY_START)
+ {
+ err= "histogram_hb must contain an array";
+ goto err;
+ }
- if (rc > 0) // Got error other than EOF
- goto err;
+ while (!(rc= parse_bucket(&je, field, &total_size, &end_assigned, &err)))
+ {
+ if (end_assigned && end_element != -1)
+ end_element= (int)buckets.size();
+ }
+ if (rc > 0) // Got error other than EOF
+ goto err;
+ }
+ else
+ {
+ // Some unknown member. Skip it.
+ if (json_skip_key(&je))
+ return 1;
+ }
+ }
if (buckets.size() < 1)
{
diff --git a/sql/opt_histogram_json.h b/sql/opt_histogram_json.h
index 347abcdf3bb..a2f8bdd37a5 100644
--- a/sql/opt_histogram_json.h
+++ b/sql/opt_histogram_json.h
@@ -24,6 +24,11 @@
Histogram format in JSON:
{
+ // The next three are saved but not currently analyzed:
+ "target_histogram_size": nnn,
+ "collected_at": "(date and time)",
+ "collected_by": "(server version)",
+
"histogram_hb": [
{ "start": "value", "size":nnn.nn, "ndv": nnn },
...
1
0
[Commits] 086a212: MDEV-27159 Re-design the upper level of handling DML commands
by IgorBabaev 03 Dec '21
by IgorBabaev 03 Dec '21
03 Dec '21
revision-id: 086a212d96b7693d1bacf67e3ad14627fb802269 (mariadb-10.6.1-49-g086a212)
parent(s): 593885f785440358028999cb8d2c47d4b0a1e917
author: Igor Babaev
committer: Igor Babaev
timestamp: 2021-12-02 21:51:14 -0800
message:
MDEV-27159 Re-design the upper level of handling DML commands
This is the first commit for the task. This patch allows to execute only
single-table and multi-table UPDATE statements using the method
Sql_cmd_dml::execute(). The code that handles DELETE and INSERT statements
has not been touched.
Moreover, these are not the final changes to handle UPDATE statements.
All tests from the main suite passed. With --ps-protocol one test from
opt_trace_security returns not the same result. This will be fixed soon.
---
mysql-test/main/analyze_stmt_privileges2.result | 9 +-
mysql-test/main/analyze_stmt_privileges2.test | 15 +-
.../main/myisam_explain_non_select_all.result | 86 +----
mysql-test/main/mysqlbinlog_row_minimal.test | 1 -
mysql-test/main/opt_trace.test | 1 -
mysql-test/main/order_by.result | 8 +-
mysql-test/main/partition_explicit_prune.result | 1 -
mysql-test/main/sp.result | 2 +-
mysql-test/main/update.result | 2 +-
mysql-test/main/update_use_source.result | 7 +-
mysql-test/main/update_use_source.test | 2 +-
mysql-test/main/view_grant.result | 1 +
mysql-test/main/view_grant.test | 1 +
sql/opt_subselect.cc | 11 +
sql/opt_trace.cc | 3 +-
sql/sql_base.cc | 26 +-
sql/sql_base.h | 15 +
sql/sql_class.h | 1 +
sql/sql_cmd.h | 151 ++++++++-
sql/sql_delete.h | 24 ++
sql/sql_lex.cc | 9 +
sql/sql_lex.h | 26 ++
sql/sql_parse.cc | 128 +-------
sql/sql_prepare.cc | 143 +--------
sql/sql_select.cc | 138 +++++++-
sql/sql_update.cc | 352 ++++++++++++---------
sql/sql_update.h | 40 +++
sql/sql_yacc.yy | 9 +
28 files changed, 698 insertions(+), 514 deletions(-)
diff --git a/mysql-test/main/analyze_stmt_privileges2.result b/mysql-test/main/analyze_stmt_privileges2.result
index f269aaf..d40dd63 100644
--- a/mysql-test/main/analyze_stmt_privileges2.result
+++ b/mysql-test/main/analyze_stmt_privileges2.result
@@ -3034,6 +3034,7 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE UPDATE v1 SET a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
UPDATE v1 SET a = a + 1;
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v1'
EXPLAIN UPDATE v1 SET a = a + 1;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE UPDATE v1 SET a = a + 1;
@@ -4767,6 +4768,7 @@ ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for unde
ANALYZE UPDATE v2 SET a = 10;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
UPDATE v2 SET a = a + 1;
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v2'
EXPLAIN UPDATE v2 SET a = a + 1;
ERROR HY000: ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table
ANALYZE UPDATE v2 SET a = a + 1;
@@ -4865,12 +4867,11 @@ ANALYZE UPDATE v2 SET a = 10;
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 43 43.00 100.00 6.98 Using where
UPDATE v2 SET a = a + 1;
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v2'
EXPLAIN UPDATE v2 SET a = a + 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 43 Using where
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v2'
ANALYZE UPDATE v2 SET a = a + 1;
-id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 43 43.00 100.00 6.98 Using where
+ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v2'
UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
ERROR 42000: SELECT command denied to user 'privtest'@'localhost' for column 'a' in table 'v2'
EXPLAIN UPDATE v2, t2 SET v2.a = v2.a + 1 WHERE v2.a = t2.a;
diff --git a/mysql-test/main/analyze_stmt_privileges2.test b/mysql-test/main/analyze_stmt_privileges2.test
index a0f1f49..8b011c2 100644
--- a/mysql-test/main/analyze_stmt_privileges2.test
+++ b/mysql-test/main/analyze_stmt_privileges2.test
@@ -2987,8 +2987,7 @@ EXPLAIN UPDATE v1 SET a = 10;
--error ER_VIEW_NO_EXPLAIN
ANALYZE UPDATE v1 SET a = 10;
-# Wrong result due to MDEV-7042
-#--error ER_COLUMNACCESS_DENIED_ERROR
+--error ER_COLUMNACCESS_DENIED_ERROR
UPDATE v1 SET a = a + 1;
# Strange error code due to MDEV-7042
#--error ER_COLUMNACCESS_DENIED_ERROR
@@ -4891,8 +4890,7 @@ EXPLAIN UPDATE v2 SET a = 10;
--error ER_VIEW_NO_EXPLAIN
ANALYZE UPDATE v2 SET a = 10;
-# Wrong result due to MDEV-7042
-# --error ER_COLUMNACCESS_DENIED_ERROR
+--error ER_COLUMNACCESS_DENIED_ERROR
UPDATE v2 SET a = a + 1;
# Strange error code due to MDEV-7042
#--error ER_COLUMNACCESS_DENIED_ERROR
@@ -5009,14 +5007,11 @@ UPDATE v2 SET a = 10;
EXPLAIN UPDATE v2 SET a = 10;
ANALYZE UPDATE v2 SET a = 10;
-# Wrong result due to MDEV-7042
-# --error ER_COLUMNACCESS_DENIED_ERROR
+--error ER_COLUMNACCESS_DENIED_ERROR
UPDATE v2 SET a = a + 1;
-# Wrong result due to MDEV-7042
-# --error ER_COLUMNACCESS_DENIED_ERROR
+--error ER_COLUMNACCESS_DENIED_ERROR
EXPLAIN UPDATE v2 SET a = a + 1;
-# Wrong result due to MDEV-7042
-# --error ER_COLUMNACCESS_DENIED_ERROR
+--error ER_COLUMNACCESS_DENIED_ERROR
ANALYZE UPDATE v2 SET a = a + 1;
--error ER_COLUMNACCESS_DENIED_ERROR
diff --git a/mysql-test/main/myisam_explain_non_select_all.result b/mysql-test/main/myisam_explain_non_select_all.result
index 2ff966f..36231c3 100644
--- a/mysql-test/main/myisam_explain_non_select_all.result
+++ b/mysql-test/main/myisam_explain_non_select_all.result
@@ -19,7 +19,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a < 10;
@@ -38,7 +37,6 @@ Handler_read_key 2
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 2
Handler_read_rnd_next 4
Handler_update 3
@@ -152,7 +150,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE t1.a = 1;
@@ -172,7 +169,6 @@ Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd_next 8
Handler_update 1
@@ -202,7 +198,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a = 1;
@@ -222,7 +217,6 @@ Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd_next 12
Handler_update 1
@@ -240,18 +234,16 @@ Warnings:
Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
EXPLAIN UPDATE t1 SET a = 10 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3);
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 Using where
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED UPDATE t1 SET a = 10 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3);
id select_type table type possible_keys key key_len ref rows filtered Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
2 SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
-Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE 1 IN (SELECT 1 FROM t2 WHERE t2.b < 3);
@@ -272,7 +264,6 @@ Handler_read_key 5
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd_next 5
Handler_update 3
@@ -302,7 +293,6 @@ Warnings:
Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 WHERE t1.a < 3);
@@ -323,7 +313,6 @@ Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd_next 7
Handler_update 2
@@ -355,7 +344,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a IN (SELECT b FROM t2 WHERE t2.b < 3);
@@ -377,7 +365,7 @@ Handler_read_key 7
Handler_read_rnd_next 12
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
+Handler_read_key 3
Handler_read_rnd_next 16
Handler_update 2
@@ -407,7 +395,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12;
@@ -427,7 +414,6 @@ Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd 3
Handler_read_rnd_deleted 1
Handler_read_rnd_next 24
@@ -459,7 +445,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 2
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -482,7 +467,6 @@ Handler_read_key 2
Handler_read_rnd_next 5
# Status of testing query execution:
Variable_name Value
-Handler_read_key 2
Handler_read_rnd 3
Handler_read_rnd_next 9
Handler_update 3
@@ -513,7 +497,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 t11, (SELECT * FROM t2) t12 WHERE t11.a > 1;
@@ -533,7 +516,6 @@ Handler_read_key 4
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd_next 16
Handler_update 2
@@ -995,7 +977,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 3 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT a FROM t2);
@@ -1016,7 +997,6 @@ Handler_read_key 7
Handler_read_rnd_next 8
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd_next 10
Handler_update 3
@@ -1134,7 +1114,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1;
@@ -1153,7 +1132,6 @@ Handler_read_key 3
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
-Handler_read_key 3
Handler_read_rnd_next 6
Handler_update 5
@@ -1917,7 +1895,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1936,7 +1913,7 @@ Handler_read_key 5
Handler_read_next 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 5
+Handler_read_key 1
Handler_read_next 4
Handler_read_rnd 5
Handler_update 5
@@ -1965,7 +1942,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
@@ -1987,7 +1963,6 @@ Sort_rows 5
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
Handler_read_rnd 5
Handler_read_rnd_next 27
Handler_update 5
@@ -2019,7 +1994,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -2041,7 +2015,6 @@ Sort_rows 1
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Handler_update 1
@@ -2074,7 +2047,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 15 NULL 5 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -2095,7 +2067,6 @@ Handler_read_next 4
# Status of testing query execution:
Variable_name Value
Handler_read_first 1
-Handler_read_key 8
Handler_read_next 4
Handler_read_rnd 5
Handler_update 5
@@ -2124,7 +2095,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -2146,7 +2116,6 @@ Sort_rows 1
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -2178,7 +2147,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 8
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
@@ -2201,7 +2169,6 @@ Sort_rows 1
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 8
Handler_read_rnd 1
Handler_read_rnd_next 27
Sort_priority_queue_sorts 1
@@ -2233,7 +2200,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index_merge key1,key2 key1,key2 5,5 NULL 7 100.00 Using sort_union(key1,key2); Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
@@ -2255,7 +2221,7 @@ Sort_range 1
Sort_rows 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 8
+Handler_read_key 2
Handler_read_next 7
Handler_read_rnd 8
Handler_update 4
@@ -2286,7 +2252,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 5 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
@@ -2305,7 +2270,7 @@ Handler_read_key 5
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 5
+Handler_read_key 1
Handler_read_prev 4
Handler_read_rnd 5
Handler_update 5
@@ -2334,7 +2299,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a, b DESC LIMIT 5;
@@ -2356,7 +2320,6 @@ Sort_rows 5
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 6
Handler_read_rnd 5
Handler_read_rnd_next 27
Handler_update 4
@@ -2389,7 +2352,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t2 index NULL a 6 NULL 5 100.00 Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t2 ORDER BY a DESC, b DESC LIMIT 5;
@@ -2409,7 +2371,6 @@ Handler_read_last 1
Handler_read_prev 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 6
Handler_read_last 1
Handler_read_prev 4
Handler_read_rnd 5
@@ -2441,7 +2402,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range c1_idx c1_idx 2 NULL 2 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 6
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE c1_idx = 'y' ORDER BY pk DESC LIMIT 2;
@@ -2463,7 +2423,7 @@ Sort_range 1
Sort_rows 2
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
+Handler_read_key 1
Handler_read_next 2
Handler_read_rnd 2
Handler_update 2
@@ -2536,7 +2496,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a > 34;
@@ -2555,7 +2514,7 @@ Handler_read_key 4
Handler_read_next 2
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
+Handler_read_key 1
Handler_read_next 2
Handler_read_rnd 2
Handler_update 2
@@ -2583,7 +2542,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 7
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -2605,7 +2563,6 @@ Handler_read_key 7
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
Handler_read_rnd_next 4
#
@@ -2626,7 +2583,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 7
Handler_read_rnd_next 1
FLUSH STATUS;
FLUSH TABLES;
@@ -2648,7 +2604,6 @@ Handler_read_key 7
Handler_read_rnd_next 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
Handler_read_rnd_next 4
DROP TABLE t1, t2;
@@ -2678,7 +2633,6 @@ Warnings:
Note 1276 Field or reference 'test.t1.f1' of SELECT #2 was resolved in SELECT #1
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 7
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT (SELECT MAX(t2.f4) FROM t2 WHERE t2.f3=t1.f1) FROM t1;
@@ -2699,7 +2653,6 @@ Handler_read_key 9
Handler_read_rnd_next 9
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
Handler_read_rnd_next 9
Handler_update 2
@@ -2723,9 +2676,9 @@ DROP TABLE t1;
#57
CREATE TABLE t1(f1 INT);
EXPLAIN EXTENDED UPDATE t1 SET f2=1 ORDER BY f2;
-ERROR 42S22: Unknown column 'f2' in 'order clause'
+ERROR 42S22: Unknown column 'f2' in 'field list'
UPDATE t1 SET f2=1 ORDER BY f2;
-ERROR 42S22: Unknown column 'f2' in 'order clause'
+ERROR 42S22: Unknown column 'f2' in 'field list'
DROP TABLE t1;
#62
CREATE TABLE t1 (a INT);
@@ -2749,7 +2702,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM v1 WHERE a > 0;
@@ -2769,7 +2721,6 @@ Handler_read_key 2
Handler_read_rnd_next 6
# Status of testing query execution:
Variable_name Value
-Handler_read_key 2
Handler_read_rnd 1
Handler_read_rnd_deleted 1
Handler_read_rnd_next 8
@@ -2794,7 +2745,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t12 ALL NULL NULL NULL NULL 2 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 2
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, v1 WHERE t1.a = v1.a;
@@ -2815,7 +2765,6 @@ Handler_read_key 2
Handler_read_rnd_next 9
# Status of testing query execution:
Variable_name Value
-Handler_read_key 2
Handler_read_rnd 2
Handler_read_rnd_deleted 1
Handler_read_rnd_next 18
@@ -3086,7 +3035,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
@@ -3110,7 +3058,7 @@ Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
+Handler_read_key 3
Handler_read_rnd_next 8
Handler_update 1
Sort_priority_queue_sorts 1
@@ -3139,7 +3087,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00 Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, t2 WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
@@ -3164,7 +3111,7 @@ Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
+Handler_read_key 3
Handler_read_rnd_next 8
Sort_priority_queue_sorts 1
Sort_rows 3
@@ -3194,7 +3141,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DERIVED t2 ALL NULL NULL NULL NULL 3 100.00
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 4
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT * FROM t1, (SELECT * FROM t2) y WHERE a IN (SELECT * FROM (SELECT b FROM t2 ORDER BY b LIMIT 2,2) x);
@@ -3219,7 +3165,7 @@ Sort_rows 3
Sort_scan 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 7
+Handler_read_key 3
Handler_read_rnd_next 8
Sort_priority_queue_sorts 1
Sort_rows 3
@@ -3271,7 +3217,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using buffer
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10;
@@ -3289,7 +3234,7 @@ Variable_name Value
Handler_read_key 4
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
+Handler_read_key 1
# used key is modified & Using filesort
#
@@ -3308,7 +3253,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 100.00 Using where; Using filesort
# Status of EXPLAIN EXTENDED query
Variable_name Value
-Handler_read_key 3
FLUSH STATUS;
FLUSH TABLES;
EXPLAIN EXTENDED SELECT a t1 FROM t1 WHERE a>10 ORDER BY a+20;
@@ -3327,7 +3271,7 @@ Handler_read_key 4
Sort_range 1
# Status of testing query execution:
Variable_name Value
-Handler_read_key 4
+Handler_read_key 1
Sort_range 1
DROP TABLE t1;
diff --git a/mysql-test/main/mysqlbinlog_row_minimal.test b/mysql-test/main/mysqlbinlog_row_minimal.test
index 67fa7b9..0f64bba 100644
--- a/mysql-test/main/mysqlbinlog_row_minimal.test
+++ b/mysql-test/main/mysqlbinlog_row_minimal.test
@@ -99,4 +99,3 @@ FLUSH BINARY LOGS;
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog --start-position=$binlog_pos --stop-position=$binlog_end
DROP TABLE t1,t2;
-
diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test
index e0c6572..a73988c 100644
--- a/mysql-test/main/opt_trace.test
+++ b/mysql-test/main/opt_trace.test
@@ -1,6 +1,5 @@
--source include/not_embedded.inc
--source include/have_sequence.inc
---source include/protocol.inc
SELECT table_name, column_name FROM information_schema.columns where table_name="OPTIMIZER_TRACE";
show variables like 'optimizer_trace';
set optimizer_trace="enabled=on";
diff --git a/mysql-test/main/order_by.result b/mysql-test/main/order_by.result
index e9f4b1d..c383eb1 100644
--- a/mysql-test/main/order_by.result
+++ b/mysql-test/main/order_by.result
@@ -982,13 +982,13 @@ ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET val = MissingCol ORDER BY MissingCol;
ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
UPDATE bug25126 SET MissingCol = 1 ORDER BY val, MissingCol;
-ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+ERROR 42S22: Unknown column 'MissingCol' in 'field list'
UPDATE bug25126 SET MissingCol = 1 ORDER BY MissingCol;
-ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+ERROR 42S22: Unknown column 'MissingCol' in 'field list'
UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol;
-ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+ERROR 42S22: Unknown column 'MissingCol' in 'field list'
UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol;
-ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+ERROR 42S22: Unknown column 'MissingCol' in 'field list'
DROP TABLE bug25126;
CREATE TABLE t1 (a int);
SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
diff --git a/mysql-test/main/partition_explicit_prune.result b/mysql-test/main/partition_explicit_prune.result
index 5b3049c..a0b7db8 100644
--- a/mysql-test/main/partition_explicit_prune.result
+++ b/mysql-test/main/partition_explicit_prune.result
@@ -777,7 +777,6 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
VARIABLE_NAME VARIABLE_VALUE
HANDLER_COMMIT 1
-HANDLER_READ_KEY 8
HANDLER_READ_RND_NEXT 2
HANDLER_TMP_WRITE 24
HANDLER_UPDATE 2
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index c460eca..fcb7e3e 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -7731,7 +7731,7 @@ UPDATE t1 SET a = '+' WHERE daynum=tdn();
SHOW STATUS LIKE '%Handler_read%';
Variable_name Value
Handler_read_first 0
-Handler_read_key 9
+Handler_read_key 2
Handler_read_last 0
Handler_read_next 4097
Handler_read_prev 0
diff --git a/mysql-test/main/update.result b/mysql-test/main/update.result
index f5edf1c..15efd7e 100644
--- a/mysql-test/main/update.result
+++ b/mysql-test/main/update.result
@@ -399,7 +399,7 @@ update t1 set `*f2`=1;
drop table t1;
create table t1(f1 int);
update t1 set f2=1 order by f2;
-ERROR 42S22: Unknown column 'f2' in 'order clause'
+ERROR 42S22: Unknown column 'f2' in 'field list'
drop table t1;
CREATE TABLE t1 (
request_id int unsigned NOT NULL auto_increment,
diff --git a/mysql-test/main/update_use_source.result b/mysql-test/main/update_use_source.result
index 9e43b54..c70c975 100644
--- a/mysql-test/main/update_use_source.result
+++ b/mysql-test/main/update_use_source.result
@@ -316,7 +316,7 @@ rollback;
#
explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where
+1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using index condition; Using where
2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 4 Using index
start transaction;
update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3;
@@ -557,7 +557,7 @@ rollback;
#
explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where
+1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using index condition; Using where
2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 1 Using index
start transaction;
update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3;
@@ -799,7 +799,7 @@ rollback;
#
explain update t1 set c1=0 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 > 3;
id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using where
+1 PRIMARY t1 range t1_c2 t1_c2 5 NULL 2 Using index condition; Using where
2 DEPENDENT SUBQUERY a ref t1_c2 t1_c2 5 test.t1.c2 1 Using index
start transaction;
update t1 set c1=c1+10 where exists (select 'X' from t1 a where a.c2 = t1.c2) and c2 >= 3;
@@ -1195,7 +1195,6 @@ create table t1 (c1 integer) engine=InnoDb;
create table t2 (c1 integer) engine=InnoDb;
create view v1 as select t1.c1 as "t1c1" ,t2.c1 as "t2c1" from t1,t2 where t1.c1=t2.c1;
update v1 set t1c1=2 order by 1;
-ERROR 42S22: Unknown column '1' in 'order clause'
update v1 set t1c1=2 limit 1;
drop table t1;
drop table t2;
diff --git a/mysql-test/main/update_use_source.test b/mysql-test/main/update_use_source.test
index 7ed5f95..832c03d 100644
--- a/mysql-test/main/update_use_source.test
+++ b/mysql-test/main/update_use_source.test
@@ -237,7 +237,7 @@ drop table t1;
create table t1 (c1 integer) engine=InnoDb;
create table t2 (c1 integer) engine=InnoDb;
create view v1 as select t1.c1 as "t1c1" ,t2.c1 as "t2c1" from t1,t2 where t1.c1=t2.c1;
---error ER_BAD_FIELD_ERROR
+# --error ER_BAD_FIELD_ERROR
update v1 set t1c1=2 order by 1;
update v1 set t1c1=2 limit 1;
drop table t1;
diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result
index c31ba88..6167c1f 100644
--- a/mysql-test/main/view_grant.result
+++ b/mysql-test/main/view_grant.result
@@ -681,6 +681,7 @@ ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_t
UPDATE mysqltest1.v_ts SET x= 200;
ERROR 42000: UPDATE command denied to user 'readonly'@'localhost' for table 'v_ts'
UPDATE mysqltest1.v_tu SET x= 200 WHERE x = 100;
+ERROR 42000: SELECT command denied to user 'readonly'@'localhost' for column 'x' in table 'v_tu'
UPDATE mysqltest1.v_tus SET x= 200 WHERE x = 100;
UPDATE mysqltest1.v_tu SET x= 200;
DELETE FROM mysqltest1.v_ts WHERE x= 200;
diff --git a/mysql-test/main/view_grant.test b/mysql-test/main/view_grant.test
index 83bbeb3..538342c 100644
--- a/mysql-test/main/view_grant.test
+++ b/mysql-test/main/view_grant.test
@@ -810,6 +810,7 @@ INSERT INTO mysqltest1.v_ti VALUES (100);
UPDATE mysqltest1.v_ts SET x= 200 WHERE x = 100;
--error ER_TABLEACCESS_DENIED_ERROR
UPDATE mysqltest1.v_ts SET x= 200;
+--error ER_COLUMNACCESS_DENIED_ERROR
UPDATE mysqltest1.v_tu SET x= 200 WHERE x = 100;
UPDATE mysqltest1.v_tus SET x= 200 WHERE x = 100;
UPDATE mysqltest1.v_tu SET x= 200;
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 859ee5f..09a2bd2 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -693,6 +693,8 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
!join->having && !select_lex->with_sum_func && // 4
in_subs->emb_on_expr_nest && // 5
select_lex->outer_select()->join && // 6
+ (!thd->lex->m_sql_cmd ||
+ thd->lex->m_sql_cmd->sql_command_code() == SQLCOM_UPDATE_MULTI) &&
parent_unit->first_select()->leaf_tables.elements && // 7
!in_subs->has_strategy() && // 8
select_lex->outer_select()->table_list.first && // 9
@@ -717,6 +719,15 @@ int check_and_do_in_subquery_rewrites(JOIN *join)
if (arena)
thd->restore_active_arena(arena, &backup);
in_subs->is_registered_semijoin= TRUE;
+ }
+
+ /*
+ Print the transformation into trace. Do it when we've just set
+ is_registered_semijoin=TRUE above, and also do it when we've already
+ had it set.
+ */
+ if (in_subs->is_registered_semijoin)
+ {
OPT_TRACE_TRANSFORM(thd, trace_wrapper, trace_transform,
select_lex->select_number,
"IN (SELECT)", "semijoin");
diff --git a/sql/opt_trace.cc b/sql/opt_trace.cc
index ba9220c..80c51eb 100644
--- a/sql/opt_trace.cc
+++ b/sql/opt_trace.cc
@@ -489,7 +489,8 @@ Opt_trace_start::Opt_trace_start(THD *thd, TABLE_LIST *tbl,
!list_has_optimizer_trace_table(tbl) &&
!sets_var_optimizer_trace(sql_command, set_vars) &&
!thd->system_thread &&
- !ctx->disable_tracing_if_required())
+ !ctx->disable_tracing_if_required() &&
+ !(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_PREPARE))
{
ctx->start(thd, tbl, sql_command, query, query_length, query_charset,
thd->variables.optimizer_trace_max_mem_size);
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index ac22a63..65b1b92 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1067,7 +1067,9 @@ TABLE_LIST* find_dup_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list,
(table->table equal to 0) and right names is in current TABLE_LIST
object.
*/
- if (table->table)
+ if (table->table &&
+ thd->lex->sql_command != SQLCOM_UPDATE &&
+ thd->lex->sql_command != SQLCOM_UPDATE_MULTI)
{
/* All MyISAMMRG children are plain MyISAM tables. */
DBUG_ASSERT(table->table->file->ht->db_type != DB_TYPE_MRG_MYISAM);
@@ -5380,6 +5382,28 @@ bool open_tables_only_view_structure(THD *thd, TABLE_LIST *table_list,
}
+bool open_tables_for_query(THD *thd, TABLE_LIST *tables,
+ uint *table_count, uint flags,
+ DML_prelocking_strategy *prelocking_strategy)
+{
+ MDL_savepoint mdl_savepoint = thd->mdl_context.mdl_savepoint();
+
+ DBUG_ASSERT(tables == thd->lex->query_tables);
+
+ if (open_tables(thd, &tables, table_count,
+ thd->stmt_arena->is_stmt_prepare() ? MYSQL_OPEN_FORCE_SHARED_MDL : 0,
+ prelocking_strategy))
+ {
+ close_thread_tables(thd);
+ /* Don't keep locks for a failed statement. */
+ thd->mdl_context.rollback_to_savepoint(mdl_savepoint);
+ return true;
+ }
+
+ return false;
+}
+
+
/*
Mark all real tables in the list as free for reuse.
diff --git a/sql/sql_base.h b/sql/sql_base.h
index cafb596..ae3fb62 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -28,6 +28,7 @@ struct Name_resolution_context;
class Open_table_context;
class Open_tables_state;
class Prelocking_strategy;
+class DML_prelocking_strategy;
struct TABLE_LIST;
class THD;
struct handlerton;
@@ -287,6 +288,9 @@ bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags,
bool open_tables_only_view_structure(THD *thd, TABLE_LIST *tables,
bool can_deadlock);
bool open_and_lock_internal_tables(TABLE *table, bool lock);
+bool open_tables_for_query(THD *thd, TABLE_LIST *tables,
+ uint *table_count, uint flags,
+ DML_prelocking_strategy *prelocking_strategy);
bool lock_tables(THD *thd, TABLE_LIST *tables, uint counter, uint flags);
int decide_logging_format(THD *thd, TABLE_LIST *tables);
void close_thread_table(THD *thd, TABLE **table_ptr);
@@ -429,6 +433,17 @@ class DML_prelocking_strategy : public Prelocking_strategy
};
+
+class Multiupdate_prelocking_strategy : public DML_prelocking_strategy
+{
+ bool done;
+ bool has_prelocking_list;
+public:
+ void reset(THD *thd);
+ bool handle_end(THD *thd);
+};
+
+
/**
A strategy for prelocking algorithm to be used for LOCK TABLES
statement.
diff --git a/sql/sql_class.h b/sql/sql_class.h
index bc9bb82..2dd584e 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -7000,6 +7000,7 @@ class multi_update :public select_result_interceptor
enum_duplicates handle_duplicates, bool ignore);
~multi_update();
bool init(THD *thd);
+ bool init_for_single_table(THD *thd);
int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
int send_data(List<Item> &items);
bool initialize_tables (JOIN *join);
diff --git a/sql/sql_cmd.h b/sql/sql_cmd.h
index ce34852..a5557c6 100644
--- a/sql/sql_cmd.h
+++ b/sql/sql_cmd.h
@@ -118,6 +118,7 @@ enum enum_sql_command {
SQLCOM_END
};
+class TABLE_LIST;
class Storage_engine_name
{
@@ -144,6 +145,8 @@ class Storage_engine_name
};
+class Prepared_statement;
+
/**
@class Sql_cmd - Representation of an SQL command.
@@ -179,6 +182,25 @@ class Sql_cmd : public Sql_alloc
*/
virtual enum_sql_command sql_command_code() const = 0;
+ /// @return true if this statement is prepared
+ bool is_prepared() const { return m_prepared; }
+
+ /**
+ Prepare this SQL statement.
+ @param thd the current thread
+ @returns false if success, true if error
+ @retval false on success.
+ @retval true on error
+ */
+
+ virtual bool prepare(THD *thd)
+ {
+ /* Default behavior for a statement is to have no preparation code. */
+ DBUG_ASSERT(!is_prepared());
+ set_prepared();
+ return false;
+ }
+
/**
Execute this SQL statement.
@param thd the current thread.
@@ -192,8 +214,28 @@ class Sql_cmd : public Sql_alloc
return NULL;
}
+ /// Set the owning prepared statement
+ void set_owner(Prepared_statement *stmt) { m_owner = stmt; }
+
+ /// Get the owning prepared statement
+ Prepared_statement *get_owner() { return m_owner; }
+
+ /// @return true if SQL command is a DML statement
+ virtual bool is_dml() const { return false; }
+
+ /**
+ Temporary function used to "unprepare" a prepared statement after
+ preparation, so that a subsequent execute statement will reprepare it.
+ This is done because UNIT::cleanup() will un-resolve all resolved QBs.
+ */
+ virtual void unprepare(THD *thd)
+ {
+ DBUG_ASSERT(is_prepared());
+ m_prepared = false;
+ }
+
protected:
- Sql_cmd()
+ Sql_cmd() : m_prepared(false)
{}
virtual ~Sql_cmd()
@@ -206,8 +248,115 @@ class Sql_cmd : public Sql_alloc
*/
DBUG_ASSERT(FALSE);
}
+
+ /// Set this statement as prepared
+ void set_prepared() { m_prepared = true; }
+
+ private:
+ Prepared_statement
+ *m_owner; /// Owning prepared statement, nullptr if non-prep.
+ bool m_prepared; /// True when statement has been prepared
+
+};
+
+class LEX;
+class select_result;
+class Prelocking_strategy;
+class DML_prelocking_strategy;
+
+class Sql_cmd_dml : public Sql_cmd
+{
+public:
+ /// @return true if data change statement, false if not (SELECT statement)
+ virtual bool is_data_change_stmt() const { return true; }
+
+ /**
+ Command-specific resolving (doesn't include LEX::prepare())
+
+ @param thd Current THD.
+ @returns false on success, true on error
+ */
+ virtual bool prepare(THD *thd);
+
+ /**
+ Execute this query once
+
+ @param thd Thread handler
+ @returns false on success, true on error
+ */
+ virtual bool execute(THD *thd);
+
+ virtual bool is_dml() const { return true; }
+
+protected:
+ Sql_cmd_dml()
+ : Sql_cmd(), lex(nullptr), result(nullptr), m_empty_query(false) {}
+
+ /// @return true if query is guaranteed to return no data
+ /**
+ @todo Also check this for the following cases:
+ - Empty source for multi-table UPDATE and DELETE.
+ - Check empty query expression for INSERT
+ */
+ bool is_empty_query() const
+ {
+ DBUG_ASSERT(is_prepared());
+ return m_empty_query;
+ }
+
+ /// Set statement as returning no data
+ void set_empty_query() { m_empty_query = true; }
+
+ /**
+ Perform a precheck of table privileges for the specific operation.
+
+ @details
+ Check that user has some relevant privileges for all tables involved in
+ the statement, e.g. SELECT privileges for tables selected from, INSERT
+ privileges for tables inserted into, etc. This function will also populate
+ TABLE_LIST::grant with all privileges the user has for each table, which
+ is later used during checking of column privileges.
+ Note that at preparation time, views are not expanded yet. Privilege
+ checking is thus rudimentary and must be complemented with later calls to
+ SELECT_LEX::check_view_privileges().
+ The reason to call this function at such an early stage is to be able to
+ quickly reject statements for which the user obviously has insufficient
+ privileges.
+
+ @param thd thread handler
+ @returns false if success, true if false
+ */
+ virtual bool precheck(THD *thd) = 0;
+
+ /**
+ Perform the command-specific parts of DML command preparation,
+ to be called from prepare()
+
+ @param thd the current thread
+ @returns false if success, true if error
+ */
+ virtual bool prepare_inner(THD *thd) = 0;
+
+ /**
+ The inner parts of query optimization and execution.
+ Single-table DML operations needs to reimplement this.
+
+ @param thd Thread handler
+ @returns false on success, true on error
+ */
+ virtual bool execute_inner(THD *thd);
+
+ virtual DML_prelocking_strategy *get_dml_prelocking_strategy() = 0;
+
+ uint table_count;
+
+ protected:
+ LEX *lex; ///< Pointer to LEX for this statement
+ select_result *result; ///< Pointer to object for handling of the result
+ bool m_empty_query; ///< True if query will produce no rows
};
+
class Sql_cmd_show_slave_status: public Sql_cmd
{
protected:
diff --git a/sql/sql_delete.h b/sql/sql_delete.h
index 520524c..dabcafb 100644
--- a/sql/sql_delete.h
+++ b/sql/sql_delete.h
@@ -32,4 +32,28 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
SQL_I_List<ORDER> *order, ha_rows rows,
ulonglong options, select_result *result);
+class Sql_cmd_delete final : public Sql_cmd_dml
+{
+public:
+ Sql_cmd_delete(bool multitable_arg)
+ : multitable(multitable_arg) {}
+
+ enum_sql_command sql_command_code() const override
+ {
+ return multitable ? SQLCOM_DELETE_MULTI : SQLCOM_DELETE;
+ }
+
+protected:
+ bool precheck(THD *thd) override;
+
+ bool prepare_inner(THD *thd) override;
+
+ bool execute_inner(THD *thd) override;
+
+ private:
+ bool delete_from_single_table(THD *thd);
+
+ bool multitable;
+
+};
#endif /* SQL_DELETE_INCLUDED */
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index c3f97fb..47d9479 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1321,6 +1321,8 @@ void LEX::start(THD *thd_arg)
wild= 0;
exchange= 0;
+ table_count= 0;
+
DBUG_VOID_RETURN;
}
@@ -3051,6 +3053,7 @@ void st_select_lex::init_select()
curr_tvc_name= 0;
versioned_tables= 0;
nest_flags= 0;
+ item_list_usage= MARK_COLUMNS_READ;
}
/*
@@ -4115,6 +4118,12 @@ bool LEX::can_not_use_merged(bool no_update_or_delete)
return TRUE;
/* Fall through */
+ case SQLCOM_UPDATE:
+ if (no_update_or_delete && m_sql_cmd &&
+ (m_sql_cmd->sql_command_code() == SQLCOM_UPDATE_MULTI ||
+ query_tables->is_multitable()))
+ return TRUE;
+
default:
return FALSE;
}
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 0d82519..8f46e9f 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -36,6 +36,7 @@
#include "sql_limit.h" // Select_limit_counters
#include "json_table.h" // Json_table_column
#include "sql_schema.h"
+#include "sql_class.h" // enum enum_column_usage
/* Used for flags of nesting constructs */
#define SELECT_NESTING_MAP_SIZE 64
@@ -874,6 +875,8 @@ class st_select_lex_unit: public st_select_lex_node {
{
}
+ void set_query_result(select_result *res) { result= res; }
+
TABLE *table; /* temporary table using for appending UNION results */
select_result *result;
st_select_lex *pre_last_parse;
@@ -1006,6 +1009,7 @@ class st_select_lex_unit: public st_select_lex_node {
bool add_fake_select_lex(THD *thd);
void init_prepare_fake_select_lex(THD *thd, bool first_execution);
+ void set_prepared() { prepared = true; }
inline bool is_prepared() { return prepared; }
bool change_result(select_result_interceptor *result,
select_result_interceptor *old_result);
@@ -1121,6 +1125,7 @@ class st_select_lex: public st_select_lex_node
Item *prep_having;/* saved HAVING clause for prepared statement processing */
Item *cond_pushed_into_where; /* condition pushed into WHERE */
Item *cond_pushed_into_having; /* condition pushed into HAVING */
+ Item *where_cond_after_prepare;
/*
nest_levels are local to the query or VIEW,
@@ -1229,6 +1234,7 @@ class st_select_lex: public st_select_lex_node
List<List_item> save_many_values;
List<Item> *save_insert_list;
+ enum_column_usage item_list_usage;
bool is_item_list_lookup:1;
/*
Needed to correctly generate 'PRIMARY' or 'SIMPLE' for select_type column
@@ -1759,6 +1765,25 @@ class Query_tables_list
uint sroutines_list_own_elements;
/**
+ Locking state of tables in this particular statement.
+
+ If we under LOCK TABLES or in prelocked mode we consider tables
+ for the statement to be "locked" if there was a call to lock_tables()
+ (which called handler::start_stmt()) for tables of this statement
+ and there was no matching close_thread_tables() call.
+
+ As result this state may differ significantly from one represented
+ by Open_tables_state::lock/locked_tables_mode more, which are always
+ "on" under LOCK TABLES or in prelocked mode.
+ */
+ enum enum_lock_tables_state { LTS_NOT_LOCKED = 0, LTS_LOCKED };
+ enum_lock_tables_state lock_tables_state;
+ bool is_query_tables_locked() const
+ {
+ return (lock_tables_state == LTS_LOCKED);
+ }
+
+ /**
Number of tables which were open by open_tables() and to be locked
by lock_tables().
Note that we set this member only in some cases, when this value
@@ -3398,6 +3423,7 @@ struct LEX: public Query_tables_list
bool default_used:1; /* using default() function */
bool with_rownum:1; /* Using rownum() function */
bool is_lex_started:1; /* If lex_start() did run. For debugging. */
+
/*
This variable is used in post-parse stage to declare that sum-functions,
or functions which have sense only if GROUP BY is present, are allowed.
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 2c6df6d..47d42f9 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -3445,7 +3445,6 @@ int
mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
{
int res= 0;
- int up_result= 0;
LEX *lex= thd->lex;
/* first SELECT_LEX (have special meaning for many of non-SELECTcommands) */
SELECT_LEX *select_lex= lex->first_select_lex();
@@ -3457,7 +3456,6 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
SELECT_LEX_UNIT *unit= &lex->unit;
#ifdef HAVE_REPLICATION
/* have table map for update for multi-update statement (BUG#37051) */
- bool have_table_map_for_update= FALSE;
/* */
Rpl_filter *rpl_filter;
#endif
@@ -3579,7 +3577,6 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
if (lex->sql_command == SQLCOM_UPDATE_MULTI &&
thd->table_map_for_update)
{
- have_table_map_for_update= TRUE;
table_map table_map_for_update= thd->table_map_for_update;
uint nr= 0;
TABLE_LIST *table;
@@ -4385,130 +4382,13 @@ mysql_execute_command(THD *thd, bool is_called_from_prepared_stmt)
break;
}
case SQLCOM_UPDATE:
- {
- WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
- ha_rows found= 0, updated= 0;
- DBUG_ASSERT(first_table == all_tables && first_table != 0);
- WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
-
- if (update_precheck(thd, all_tables))
- break;
-
- /*
- UPDATE IGNORE can be unsafe. We therefore use row based
- logging if mixed or row based logging is available.
- TODO: Check if the order of the output of the select statement is
- deterministic. Waiting for BUG#42415
- */
- if (lex->ignore)
- lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_UPDATE_IGNORE);
-
- DBUG_ASSERT(select_lex->limit_params.offset_limit == 0);
- unit->set_limit(select_lex);
- MYSQL_UPDATE_START(thd->query());
- res= up_result= mysql_update(thd, all_tables,
- select_lex->item_list,
- lex->value_list,
- select_lex->where,
- select_lex->order_list.elements,
- select_lex->order_list.first,
- unit->lim.get_select_limit(),
- lex->ignore, &found, &updated);
- MYSQL_UPDATE_DONE(res, found, updated);
- /* mysql_update return 2 if we need to switch to multi-update */
- if (up_result != 2)
- break;
- if (thd->lex->period_conditions.is_set())
- {
- DBUG_ASSERT(0); // Should never happen
- goto error;
- }
- }
- /* fall through */
case SQLCOM_UPDATE_MULTI:
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
- /* if we switched from normal update, rights are checked */
- if (up_result != 2)
- {
- WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_UPDATE_DELETE);
- if ((res= multi_update_precheck(thd, all_tables)))
- break;
- }
- else
- res= 0;
-
- unit->set_limit(select_lex);
- /*
- We can not use mysql_explain_union() because of parameters of
- mysql_select in mysql_multi_update so just set the option if needed
- */
- if (thd->lex->describe)
- {
- select_lex->set_explain_type(FALSE);
- select_lex->options|= SELECT_DESCRIBE;
- }
-
- res= mysql_multi_update_prepare(thd);
-
-#ifdef HAVE_REPLICATION
- /* Check slave filtering rules */
- if (unlikely(thd->slave_thread && !have_table_map_for_update))
- {
- if (all_tables_not_ok(thd, all_tables))
- {
- if (res!= 0)
- {
- res= 0; /* don't care of prev failure */
- thd->clear_error(); /* filters are of highest prior */
- }
- /* we warn the slave SQL thread */
- my_error(ER_SLAVE_IGNORED_TABLE, MYF(0));
- break;
- }
- if (res)
- break;
- }
- else
- {
-#endif /* HAVE_REPLICATION */
- if (res)
- break;
- if (opt_readonly &&
- !(thd->security_ctx->master_access & PRIV_IGNORE_READ_ONLY) &&
- some_non_temp_table_to_be_updated(thd, all_tables))
- {
- my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
- break;
- }
-#ifdef HAVE_REPLICATION
- } /* unlikely */
-#endif
- {
- multi_update *result_obj;
- MYSQL_MULTI_UPDATE_START(thd->query());
- res= mysql_multi_update(thd, all_tables,
- &select_lex->item_list,
- &lex->value_list,
- select_lex->where,
- select_lex->options,
- lex->duplicates,
- lex->ignore,
- unit,
- select_lex,
- &result_obj);
- if (result_obj)
- {
- MYSQL_MULTI_UPDATE_DONE(res, result_obj->num_found(),
- result_obj->num_updated());
- res= FALSE; /* Ignore errors here */
- delete result_obj;
- }
- else
- {
- MYSQL_MULTI_UPDATE_DONE(1, 0, 0);
- }
- }
+ DBUG_ASSERT(lex->m_sql_cmd != NULL);
+ thd->abort_on_warning= !thd->lex->ignore && thd->is_strict_mode();
+ res = lex->m_sql_cmd->execute(thd);
+ thd->abort_on_warning= 0;
break;
}
case SQLCOM_REPLACE:
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index e7d02aa..87ee207 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -98,7 +98,6 @@ When one supplies long data for a placeholder:
#include "sql_delete.h" // mysql_prepare_delete
#include "sql_select.h" // for JOIN
#include "sql_insert.h" // upgrade_lock_type_for_insert, mysql_prepare_insert
-#include "sql_update.h" // mysql_prepare_update
#include "sql_db.h" // mysql_opt_change_db, mysql_change_db
#include "sql_derived.h" // mysql_derived_prepare,
// mysql_handle_derived
@@ -1398,110 +1397,6 @@ static bool mysql_test_insert(Prepared_statement *stmt,
/**
- Validate UPDATE statement.
-
- @param stmt prepared statement
- @param tables list of tables used in this query
-
- @todo
- - here we should send types of placeholders to the client.
-
- @retval
- 0 success
- @retval
- 1 error, error message is set in THD
- @retval
- 2 convert to multi_update
-*/
-
-static int mysql_test_update(Prepared_statement *stmt,
- TABLE_LIST *table_list)
-{
- int res;
- THD *thd= stmt->thd;
- uint table_count= 0;
- TABLE_LIST *update_source_table;
- SELECT_LEX *select= stmt->lex->first_select_lex();
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- privilege_t want_privilege(NO_ACL);
-#endif
- DBUG_ENTER("mysql_test_update");
-
- if (update_precheck(thd, table_list) ||
- open_tables(thd, &table_list, &table_count, MYSQL_OPEN_FORCE_SHARED_MDL))
- goto error;
-
- if (mysql_handle_derived(thd->lex, DT_INIT))
- goto error;
-
- if (((update_source_table= unique_table(thd, table_list,
- table_list->next_global, 0)) ||
- table_list->is_multitable()))
- {
- DBUG_ASSERT(update_source_table || table_list->view != 0);
- DBUG_PRINT("info", ("Switch to multi-update"));
- /* pass counter value */
- thd->lex->table_count= table_count;
- /* convert to multiupdate */
- DBUG_RETURN(2);
- }
-
- /*
- thd->fill_derived_tables() is false here for sure (because it is
- preparation of PS, so we even do not check it).
- */
- if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT))
- goto error;
- if (table_list->handle_derived(thd->lex, DT_PREPARE))
- goto error;
-
- if (!table_list->single_table_updatable())
- {
- my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias.str, "UPDATE");
- goto error;
- }
-
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- /* Force privilege re-checking for views after they have been opened. */
- want_privilege= (table_list->view ? UPDATE_ACL :
- table_list->grant.want_privilege);
-#endif
-
- if (mysql_prepare_update(thd, table_list, &select->where,
- select->order_list.elements,
- select->order_list.first))
- goto error;
-
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- table_list->grant.want_privilege= want_privilege;
- table_list->table->grant.want_privilege= want_privilege;
- table_list->register_want_access(want_privilege);
-#endif
- thd->lex->first_select_lex()->no_wrap_view_item= TRUE;
- res= setup_fields(thd, Ref_ptr_array(),
- select->item_list, MARK_COLUMNS_READ, 0, NULL, 0);
- thd->lex->first_select_lex()->no_wrap_view_item= FALSE;
- if (res)
- goto error;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- /* Check values */
- table_list->grant.want_privilege=
- table_list->table->grant.want_privilege=
- (SELECT_ACL & ~table_list->table->grant.privilege);
- table_list->register_want_access(SELECT_ACL);
-#endif
- if (setup_fields(thd, Ref_ptr_array(),
- stmt->lex->value_list, COLUMNS_READ, 0, NULL, 0) ||
- check_unique_table(thd, table_list))
- goto error;
- /* TODO: here we should send types of placeholders to the client. */
- DBUG_RETURN(0);
-error:
- DBUG_RETURN(1);
-}
-
-
-/**
Validate DELETE statement.
@param stmt prepared statement
@@ -2128,32 +2023,6 @@ static bool mysql_test_create_view(Prepared_statement *stmt)
}
-/*
- Validate and prepare for execution a multi update statement.
-
- @param stmt prepared statement
- @param tables list of tables used in this query
- @param converted converted to multi-update from usual update
-
- @retval
- FALSE success
- @retval
- TRUE error, error message is set in THD
-*/
-
-static bool mysql_test_multiupdate(Prepared_statement *stmt,
- TABLE_LIST *tables,
- bool converted)
-{
- /* if we switched from normal update, rights are checked */
- if (!converted && multi_update_precheck(stmt->thd, tables))
- return TRUE;
-
- return select_like_stmt_test(stmt, &mysql_multi_update_prepare,
- OPTION_SETUP_TABLES_DONE);
-}
-
-
/**
Validate and prepare for execution a multi delete statement.
@@ -2473,13 +2342,10 @@ static bool check_prepared_statement(Prepared_statement *stmt)
break;
case SQLCOM_UPDATE:
- res= mysql_test_update(stmt, tables);
- /* mysql_test_update returns 2 if we need to switch to multi-update */
- if (res != 2)
- break;
- /* fall through */
case SQLCOM_UPDATE_MULTI:
- res= mysql_test_multiupdate(stmt, tables, res == 2);
+ res = lex->m_sql_cmd->prepare(thd);
+ if (!res)
+ lex->m_sql_cmd->unprepare(thd);
break;
case SQLCOM_DELETE:
@@ -4347,6 +4213,9 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len)
thd->is_error() ||
init_param_array(this));
+ if (lex->m_sql_cmd)
+ lex->m_sql_cmd->set_owner(this);
+
if (thd->security_ctx->password_expired &&
lex->sql_command != SQLCOM_SET_OPTION &&
lex->sql_command != SQLCOM_PREPARE &&
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 80d9cafe..47ac7c8 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -1393,7 +1393,7 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num,
}
}
- if (setup_fields(thd, ref_ptrs, fields_list, MARK_COLUMNS_READ,
+ if (setup_fields(thd, ref_ptrs, fields_list, select_lex->item_list_usage,
&all_fields, &select_lex->pre_fix, 1))
DBUG_RETURN(-1);
thd->lex->current_select->context_analysis_place= save_place;
@@ -1683,6 +1683,8 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num,
if (!procedure && result && result->prepare(fields_list, unit_arg))
goto err; /* purecov: inspected */
+ select_lex->where_cond_after_prepare= conds;
+
unit= unit_arg;
if (prepare_stage2())
goto err;
@@ -30152,6 +30154,140 @@ static bool process_direct_rownum_comparison(THD *thd, SELECT_LEX_UNIT *unit,
}
+bool Sql_cmd_dml::prepare(THD *thd)
+{
+ lex= thd->lex;
+ SELECT_LEX_UNIT *unit= &lex->unit;
+
+ DBUG_ASSERT(!is_prepared());
+
+ // Perform a coarse statement-specific privilege check.
+ if (precheck(thd))
+ goto err;
+
+ lex->context_analysis_only|= CONTEXT_ANALYSIS_ONLY_DERIVED;
+
+ if (open_tables_for_query(thd, lex->query_tables, &table_count, 0,
+ get_dml_prelocking_strategy()))
+ {
+ if (thd->is_error())
+ goto err;
+ (void)unit->cleanup();
+ return true;
+ }
+
+ if (prepare_inner(thd))
+ goto err;
+
+ lex->context_analysis_only&= ~CONTEXT_ANALYSIS_ONLY_DERIVED;
+
+ set_prepared();
+ unit->set_prepared();
+
+ return false;
+
+err:
+ DBUG_ASSERT(thd->is_error());
+ DBUG_PRINT("info", ("report_error: %d", thd->is_error()));
+
+ (void)unit->cleanup();
+
+ return true;
+}
+
+bool Sql_cmd_dml::execute(THD *thd)
+{
+ lex = thd->lex;
+ bool res;
+
+ SELECT_LEX_UNIT *unit = &lex->unit;
+ SELECT_LEX *select_lex= lex->first_select_lex();
+
+ if (!is_prepared())
+ {
+ if (prepare(thd))
+ goto err;
+ }
+ else
+ {
+ if (precheck(thd))
+ goto err;
+ if (open_tables_for_query(thd, lex->query_tables, &table_count, 0,
+ get_dml_prelocking_strategy()))
+ goto err;
+ }
+
+ THD_STAGE_INFO(thd, stage_init);
+
+ DBUG_ASSERT(!lex->is_query_tables_locked());
+ /*
+ Locking of tables is done after preparation but before optimization.
+ This allows to do better partition pruning and avoid locking unused
+ partitions. As a consequence, in such a case, prepare stage can rely only
+ on metadata about tables used and not data from them.
+ */
+ if (!is_empty_query())
+ {
+ if (lock_tables(thd, lex->query_tables, table_count, 0))
+ goto err;
+ }
+
+ unit->set_limit(select_lex);
+
+ // Perform statement-specific execution
+ res = execute_inner(thd);
+
+ if (res)
+ goto err;
+
+ res= unit->cleanup();
+
+ // "unprepare" this object since unit->cleanup actually unprepares
+ unprepare(thd);
+
+ THD_STAGE_INFO(thd, stage_end);
+
+ return res;
+
+err:
+ DBUG_ASSERT(thd->is_error() || thd->killed);
+ THD_STAGE_INFO(thd, stage_end);
+ (void)unit->cleanup();
+
+ return thd->is_error();
+}
+
+
+bool Sql_cmd_dml::execute_inner(THD *thd)
+{
+ SELECT_LEX_UNIT *unit = &lex->unit;
+ SELECT_LEX *select_lex= unit->first_select();
+ JOIN *join= select_lex->join;
+
+ if (join->optimize())
+ goto err;
+
+ if (thd->lex->describe & DESCRIBE_EXTENDED)
+ {
+ join->conds_history= join->conds;
+ join->having_history= (join->having?join->having:join->tmp_having);
+ }
+
+ if (unlikely(thd->is_error()))
+ goto err;
+
+ join->exec();
+
+ if (thd->lex->describe & DESCRIBE_EXTENDED)
+ {
+ select_lex->where= join->conds_history;
+ select_lex->having= join->having_history;
+ }
+
+err:
+ return join->error;
+}
+
/**
@} (end of group Query_Optimizer)
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index 0717148..1877194 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -339,36 +339,19 @@ int cut_fields_for_portion_of_time(THD *thd, TABLE *table,
return res;
}
-/*
- Process usual UPDATE
-
- SYNOPSIS
- mysql_update()
- thd thread handler
- fields fields for update
- values values of fields for update
- conds WHERE clause expression
- order_num number of elemen in ORDER BY clause
- order ORDER BY clause list
- limit limit clause
-
- RETURN
- 0 - OK
- 2 - privilege check and openning table passed, but we need to convert to
- multi-update because of view substitution
- 1 - error
-*/
-int mysql_update(THD *thd,
- TABLE_LIST *table_list,
- List<Item> &fields,
- List<Item> &values,
- COND *conds,
- uint order_num, ORDER *order,
- ha_rows limit,
- bool ignore,
- ha_rows *found_return, ha_rows *updated_return)
+bool Sql_cmd_update::update_single_table(THD *thd)
{
+ SELECT_LEX_UNIT *unit = &lex->unit;
+ SELECT_LEX *select_lex= unit->first_select();
+ TABLE_LIST *const table_list = select_lex->get_table_list();
+ List<Item> *fields= &select_lex->item_list;
+ List<Item> *values= &lex->value_list;
+ COND *conds= select_lex->where_cond_after_prepare;
+ ORDER *order= select_lex->order_list.first;
+ ha_rows limit= unit->lim.get_select_limit();
+ bool ignore= lex->ignore;
+
bool using_limit= limit != HA_POS_ERROR;
bool safe_update= thd->variables.option_bits & OPTION_SAFE_UPDATES;
bool used_key_is_modified= FALSE, transactional_table;
@@ -379,76 +362,39 @@ int mysql_update(THD *thd,
ha_rows dup_key_found;
bool need_sort= TRUE;
bool reverse= FALSE;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- privilege_t want_privilege(NO_ACL);
-#endif
- uint table_count= 0;
ha_rows updated, updated_or_same, found;
key_map old_covering_keys;
- TABLE *table;
+ TABLE *table;
SQL_SELECT *select= NULL;
SORT_INFO *file_sort= 0;
READ_RECORD info;
- SELECT_LEX *select_lex= thd->lex->first_select_lex();
ulonglong id;
List<Item> all_fields;
killed_state killed_status= NOT_KILLED;
bool has_triggers, binlog_is_row, do_direct_update= FALSE;
Update_plan query_plan(thd->mem_root);
Explain_update *explain;
- TABLE_LIST *update_source_table;
query_plan.index= MAX_KEY;
query_plan.using_filesort= FALSE;
// For System Versioning (may need to insert new fields to a table).
ha_rows rows_inserted= 0;
- DBUG_ENTER("mysql_update");
+ DBUG_ENTER("Sql_cmd_update::update_single_table");
+ THD_STAGE_INFO(thd, stage_init_update);
create_explain_query(thd->lex, thd->mem_root);
- if (open_tables(thd, &table_list, &table_count, 0))
- DBUG_RETURN(1);
- /* Prepare views so they are handled correctly */
- if (mysql_handle_derived(thd->lex, DT_INIT))
- DBUG_RETURN(1);
-
- if (table_list->has_period() && table_list->is_view_or_derived())
- {
- my_error(ER_IT_IS_A_VIEW, MYF(0), table_list->table_name.str);
- DBUG_RETURN(TRUE);
- }
+ thd->table_map_for_update= 0;
- if (((update_source_table=unique_table(thd, table_list,
- table_list->next_global, 0)) ||
- table_list->is_multitable()))
- {
- DBUG_ASSERT(update_source_table || table_list->view != 0);
- DBUG_PRINT("info", ("Switch to multi-update"));
- /* pass counter value */
- thd->lex->table_count= table_count;
- if (thd->lex->period_conditions.is_set())
- {
- my_error(ER_NOT_SUPPORTED_YET, MYF(0),
- "updating and querying the same temporal periods table");
-
- DBUG_RETURN(1);
- }
-
- /* convert to multiupdate */
- DBUG_RETURN(2);
- }
- if (lock_tables(thd, table_list, table_count, 0))
- DBUG_RETURN(1);
-
- (void) read_statistics_for_tables_if_needed(thd, table_list);
-
- THD_STAGE_INFO(thd, stage_init_update);
if (table_list->handle_derived(thd->lex, DT_MERGE_FOR_INSERT))
DBUG_RETURN(1);
if (table_list->handle_derived(thd->lex, DT_PREPARE))
DBUG_RETURN(1);
+ if (setup_ftfuncs(select_lex))
+ DBUG_RETURN(-1);
+
table= table_list->table;
if (!table_list->single_table_updatable())
@@ -457,85 +403,26 @@ int mysql_update(THD *thd,
DBUG_RETURN(1);
}
- /* Calculate "table->covering_keys" based on the WHERE */
- table->covering_keys= table->s->keys_in_use;
table->opt_range_keys.clear_all();
query_plan.select_lex= thd->lex->first_select_lex();
query_plan.table= table;
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- /* Force privilege re-checking for views after they have been opened. */
- want_privilege= (table_list->view ? UPDATE_ACL :
- table_list->grant.want_privilege);
-#endif
thd->lex->promote_select_describe_flag_if_needed();
- if (mysql_prepare_update(thd, table_list, &conds, order_num, order))
- DBUG_RETURN(1);
-
- if (table_list->has_period())
- {
- if (!table_list->period_conditions.start.item->const_item()
- || !table_list->period_conditions.end.item->const_item())
- {
- my_error(ER_NOT_CONSTANT_EXPRESSION, MYF(0), "FOR PORTION OF");
- DBUG_RETURN(true);
- }
- table->no_cache= true;
- }
-
old_covering_keys= table->covering_keys; // Keys used in WHERE
- /* Check the fields we are going to modify */
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- table_list->grant.want_privilege= table->grant.want_privilege= want_privilege;
- table_list->register_want_access(want_privilege);
-#endif
- /* 'Unfix' fields to allow correct marking by the setup_fields function. */
- if (table_list->is_view())
- unfix_fields(fields);
- if (setup_fields_with_no_wrap(thd, Ref_ptr_array(),
- fields, MARK_COLUMNS_WRITE, 0, 0))
- DBUG_RETURN(1); /* purecov: inspected */
- if (check_fields(thd, table_list, fields, table_list->view))
- {
- DBUG_RETURN(1);
- }
- bool has_vers_fields= table->vers_check_update(fields);
- if (check_key_in_view(thd, table_list))
- {
- my_error(ER_NON_UPDATABLE_TABLE, MYF(0), table_list->alias.str, "UPDATE");
- DBUG_RETURN(1);
- }
+ bool has_vers_fields= table->vers_check_update(*fields);
if (table->default_field)
table->mark_default_fields_for_write(false);
-#ifndef NO_EMBEDDED_ACCESS_CHECKS
- /* Check values */
- table_list->grant.want_privilege= table->grant.want_privilege=
- (SELECT_ACL & ~table->grant.privilege);
-#endif
- if (setup_fields(thd, Ref_ptr_array(), values, MARK_COLUMNS_READ, 0, NULL, 0))
- {
- free_underlaid_joins(thd, select_lex);
- DBUG_RETURN(1); /* purecov: inspected */
- }
-
- if (check_unique_table(thd, table_list))
- DBUG_RETURN(TRUE);
-
- switch_to_nullable_trigger_fields(fields, table);
- switch_to_nullable_trigger_fields(values, table);
+ switch_to_nullable_trigger_fields(*fields, table);
+ switch_to_nullable_trigger_fields(*values, table);
/* Apply the IN=>EXISTS transformation to all subqueries and optimize them */
if (select_lex->optimize_unflattened_subqueries(false))
DBUG_RETURN(TRUE);
- if (select_lex->inner_refs_list.elements &&
- fix_inner_refs(thd, all_fields, select_lex, select_lex->ref_pointer_array))
- DBUG_RETURN(1);
-
if (conds)
{
Item::cond_result cond_value;
@@ -764,7 +651,7 @@ int mysql_update(THD *thd,
if (!table->file->info_push(INFO_KIND_UPDATE_FIELDS, &fields) &&
!table->file->info_push(INFO_KIND_UPDATE_VALUES, &values) &&
- !table->file->direct_update_rows_init(&fields))
+ !table->file->direct_update_rows_init(fields))
{
do_direct_update= TRUE;
@@ -1013,7 +900,7 @@ int mysql_update(THD *thd,
cut_fields_for_portion_of_time(thd, table,
table_list->period_conditions);
- if (fill_record_n_invoke_before_triggers(thd, table, fields, values, 0,
+ if (fill_record_n_invoke_before_triggers(thd, table, *fields, *values, 0,
TRG_EVENT_UPDATE))
break; /* purecov: inspected */
@@ -1346,9 +1233,6 @@ int mysql_update(THD *thd,
thd->lex->current_select->save_leaf_tables(thd);
thd->lex->current_select->first_cond_optimization= 0;
}
- *found_return= found;
- *updated_return= updated;
-
if (unlikely(thd->lex->analyze_stmt))
goto emit_explain_and_leave;
@@ -1676,15 +1560,6 @@ static bool multi_update_check_table_access(THD *thd, TABLE_LIST *table,
}
-class Multiupdate_prelocking_strategy : public DML_prelocking_strategy
-{
- bool done;
- bool has_prelocking_list;
-public:
- void reset(THD *thd);
- bool handle_end(THD *thd);
-};
-
void Multiupdate_prelocking_strategy::reset(THD *thd)
{
done= false;
@@ -1921,7 +1796,7 @@ int mysql_multi_update_prepare(THD *thd)
if (lex->save_prep_leaf_tables())
DBUG_RETURN(TRUE);
-
+
DBUG_RETURN (FALSE);
}
@@ -2015,6 +1890,19 @@ bool multi_update::init(THD *thd)
}
+bool multi_update::init_for_single_table(THD *thd)
+{
+ List_iterator_fast<TABLE_LIST> li(*leaves);
+ TABLE_LIST *tbl;
+ while ((tbl =li++))
+ {
+ if (updated_leaves.push_back(tbl, thd->mem_root))
+ return true;
+ }
+ return false;
+}
+
+
/*
Connect fields with tables and create list of tables that are updated
*/
@@ -2088,7 +1976,8 @@ int multi_update::prepare(List<Item> ¬_used_values,
{
table->read_set= &table->def_read_set;
bitmap_union(table->read_set, &table->tmp_set);
- table->file->prepare_for_insert(1);
+ if (!(thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_PREPARE))
+ table->file->prepare_for_insert(1);
}
}
if (unlikely(error))
@@ -3106,3 +2995,166 @@ bool multi_update::send_eof()
}
DBUG_RETURN(FALSE);
}
+
+
+bool Sql_cmd_update::precheck(THD *thd)
+{
+ if (!multitable)
+ {
+ if (update_precheck(thd, lex->query_tables))
+ return true;
+ }
+ else
+ {
+ if (multi_update_precheck(thd, lex->query_tables))
+ return true;
+ }
+ return false;
+}
+
+
+bool Sql_cmd_update::prepare_inner(THD *thd)
+{
+ JOIN *join;
+ int err= 0;
+ // uint table_cnt= 0;
+ SELECT_LEX *const select_lex = thd->lex->first_select_lex();
+ TABLE_LIST *const table_list = select_lex->get_table_list();
+ ulonglong select_options= select_lex->options;
+ bool free_join= 1;
+ // bool orig_multitable= multitable;
+ DBUG_ENTER("Sql_cmd_update::prepare_inner");
+
+ if (!multitable)
+ {
+ TABLE_LIST *update_source_table= 0;
+
+ if (mysql_handle_derived(lex, DT_INIT))
+ DBUG_RETURN(TRUE);
+
+ if (table_list->has_period() && table_list->is_view_or_derived())
+ {
+ my_error(ER_IT_IS_A_VIEW, MYF(0), table_list->table_name.str);
+ DBUG_RETURN(TRUE);
+ }
+
+ if (((update_source_table=unique_table(thd, table_list,
+ table_list->next_global, 0)) ||
+ table_list->is_multitable()))
+ {
+ DBUG_ASSERT(update_source_table || table_list->view != 0);
+ if (thd->lex->period_conditions.is_set())
+ {
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0),
+ "updating and querying the same temporal periods table");
+ DBUG_RETURN(TRUE);
+ }
+ multitable= true;
+ }
+ }
+
+ if(!multitable)
+ {
+ if (table_list->is_view_or_derived() &&
+ select_lex->leaf_tables.elements > 1)
+ multitable = true;
+ }
+
+ if (!multitable)
+ {
+ if (lex->ignore)
+ lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_UPDATE_IGNORE);
+ }
+
+ if (!(result= new (thd->mem_root) multi_update(thd, table_list,
+ &select_lex->leaf_tables,
+ &select_lex->item_list,
+ &lex->value_list,
+ lex->duplicates,
+ lex->ignore)))
+ {
+ DBUG_RETURN(TRUE);
+ }
+
+ if (((multi_update *)result)->init(thd))
+ DBUG_RETURN(TRUE);
+
+ if (setup_tables(thd, &select_lex->context, &select_lex->top_join_list,
+ table_list, select_lex->leaf_tables, false, false))
+ DBUG_RETURN(TRUE);
+
+ if (select_lex->vers_setup_conds(thd, table_list))
+ DBUG_RETURN(TRUE);
+
+ {
+ if (thd->lex->describe)
+ select_options|= SELECT_DESCRIBE;
+
+ /*
+ When in EXPLAIN, delay deleting the joins so that they are still
+ available when we're producing EXPLAIN EXTENDED warning text.
+ */
+ if (select_options & SELECT_DESCRIBE)
+ free_join= 0;
+
+ select_options|=
+ SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK | OPTION_SETUP_TABLES_DONE;
+
+ if (!(join= new (thd->mem_root) JOIN(thd, select_lex->item_list,
+ select_options, result)))
+ DBUG_RETURN(TRUE);
+ THD_STAGE_INFO(thd, stage_init);
+ select_lex->join= join;
+ thd->lex->used_tables=0;
+ select_lex->item_list_usage= MARK_COLUMNS_WRITE;
+ if ((err= join->prepare(table_list, select_lex->where,
+ select_lex->order_list.elements,
+ select_lex->order_list.first,
+ false, NULL, NULL, NULL,
+ select_lex, &lex->unit)))
+ {
+ goto err;
+ }
+
+ }
+
+ free_join= false;
+
+err:
+
+ if (free_join)
+ {
+ THD_STAGE_INFO(thd, stage_end);
+ err|= (int)(select_lex->cleanup());
+ DBUG_RETURN(err || thd->is_error());
+ }
+ DBUG_RETURN(err);
+
+}
+
+
+bool Sql_cmd_update::execute_inner(THD *thd)
+{
+ bool res= multitable ? Sql_cmd_dml::execute_inner(thd)
+ : update_single_table(thd);
+
+ res|= thd->is_error();
+ if (multitable)
+ {
+ if (unlikely(res))
+ result->abort_result_set();
+ else
+ {
+ if (thd->lex->describe || thd->lex->analyze_stmt)
+ res= thd->lex->explain->send_explain(thd);
+ }
+ }
+
+ if (result)
+ {
+ res= false;
+ delete result;
+ }
+
+ return res;
+}
diff --git a/sql/sql_update.h b/sql/sql_update.h
index 65e44d1..e52d3cd 100644
--- a/sql/sql_update.h
+++ b/sql/sql_update.h
@@ -17,6 +17,8 @@
#define SQL_UPDATE_INCLUDED
#include "sql_class.h" /* enum_duplicates */
+#include "sql_cmd.h" // Sql_cmd_dml
+#include "sql_base.h"
class Item;
struct TABLE_LIST;
@@ -41,4 +43,42 @@ bool mysql_multi_update(THD *thd, TABLE_LIST *table_list,
bool records_are_comparable(const TABLE *table);
bool compare_record(const TABLE *table);
+
+class Sql_cmd_update final : public Sql_cmd_dml
+{
+public:
+ Sql_cmd_update(bool multitable_arg)
+ : multitable(multitable_arg)
+ { }
+
+ enum_sql_command sql_command_code() const override
+ {
+ return multitable ? SQLCOM_UPDATE_MULTI : SQLCOM_UPDATE;
+ }
+
+ DML_prelocking_strategy *get_dml_prelocking_strategy()
+ {
+ return &multiupdate_prelocking_strategy;
+ }
+
+protected:
+ bool precheck(THD *thd) override;
+
+ bool prepare_inner(THD *thd) override;
+
+ bool execute_inner(THD *thd) override;
+
+private:
+ bool update_single_table(THD *thd);
+
+ bool multitable;
+
+ DML_prelocking_strategy dml_prelocking_strategy;
+ Multiupdate_prelocking_strategy multiupdate_prelocking_strategy;
+
+ public:
+ List<Item> *update_value_list;
+
+};
+
#endif /* SQL_UPDATE_INCLUDED */
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index dc2eb44..9d112c9 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -69,6 +69,7 @@
#include "my_base.h"
#include "sql_type_json.h"
#include "json_table.h"
+#include "sql_update.h"
/* this is to get the bison compilation windows warnings out */
#ifdef _MSC_VER
@@ -13481,9 +13482,14 @@ update:
opt_low_priority opt_ignore update_table_list
SET update_list
{
+ bool is_multiupdate= false;
+ LEX *lex= Lex;
SELECT_LEX *slex= Lex->first_select_lex();
if (slex->table_list.elements > 1)
+ {
Lex->sql_command= SQLCOM_UPDATE_MULTI;
+ is_multiupdate= true;
+ }
else if (slex->get_table_list()->derived)
{
/* it is single table update and it is update of derived table */
@@ -13491,6 +13497,9 @@ update:
slex->get_table_list()->alias.str, "UPDATE");
MYSQL_YYABORT;
}
+ if (!(lex->m_sql_cmd=
+ new (thd->mem_root) Sql_cmd_update(is_multiupdate)))
+ MYSQL_YYABORT;
/*
In case of multi-update setting write lock for all tables may
be too pessimistic. We will decrease lock level if possible in
1
0
[Commits] 154e9c29bde: MDEV-26519: Improved histograms: Better error reporting, test coverage
by psergey 02 Dec '21
by psergey 02 Dec '21
02 Dec '21
revision-id: 154e9c29bdebba50d693da353695d7f877f9092b (mariadb-10.6.1-323-g154e9c29bde)
parent(s): ada9235816057cf778f4f6fb3e82978a3616b470
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-02 20:47:08 +0300
message:
MDEV-26519: Improved histograms: Better error reporting, test coverage
Also report JSON histogram load errors into error log, like it is already
done with other histogram/statistics load errors.
Add test coverage to see what happens if one upgrades but does NOT run
mysql_upgrade.
---
mysql-test/main/statistics_json.result | 1 +
mysql-test/main/statistics_json.test | 1 +
mysql-test/main/statistics_upgrade_not_done.result | 44 +++++++++++++++++
mysql-test/main/statistics_upgrade_not_done.test | 57 ++++++++++++++++++++++
sql/opt_histogram_json.cc | 4 ++
5 files changed, 107 insertions(+)
diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result
index 43fd61b4203..7ad6827711b 100644
--- a/mysql-test/main/statistics_json.result
+++ b/mysql-test/main/statistics_json.result
@@ -4157,6 +4157,7 @@ set @@global.histogram_size=@save_histogram_size;
drop table if exists t1;
set @save_histogram_type=@@histogram_type;
set @save_histogram_size=@@histogram_size;
+call mtr.add_suppression("Failed to parse histogram for table .*");
create table ten(a int primary key);
insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
set histogram_size=100;
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test
index e90df83f9c9..21d8ebc3829 100644
--- a/mysql-test/main/statistics_json.test
+++ b/mysql-test/main/statistics_json.test
@@ -16,6 +16,7 @@ drop table if exists t1;
set @save_histogram_type=@@histogram_type;
set @save_histogram_size=@@histogram_size;
+call mtr.add_suppression("Failed to parse histogram for table .*");
create table ten(a int primary key);
insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
diff --git a/mysql-test/main/statistics_upgrade_not_done.result b/mysql-test/main/statistics_upgrade_not_done.result
new file mode 100644
index 00000000000..902bf25c242
--- /dev/null
+++ b/mysql-test/main/statistics_upgrade_not_done.result
@@ -0,0 +1,44 @@
+# Create the old-version of the table
+call mtr.add_suppression(".*Incorrect definition of table mysql.column_stats:.*");
+alter table mysql.column_stats rename test.t1;
+CREATE TABLE mysql.column_stats (
+`db_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
+`table_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
+`column_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
+`min_value` varbinary(255) DEFAULT NULL,
+`max_value` varbinary(255) DEFAULT NULL,
+`nulls_ratio` decimal(12,4) DEFAULT NULL,
+`avg_length` decimal(12,4) DEFAULT NULL,
+`avg_frequency` decimal(12,4) DEFAULT NULL,
+`hist_size` tinyint(3) unsigned DEFAULT NULL,
+`hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8mb3_bin DEFAULT NULL,
+`histogram` varbinary(255) DEFAULT NULL,
+PRIMARY KEY (`db_name`,`table_name`,`column_name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns';
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO mysql.column_stats VALUES
+('test','t0','a','0','9',0.0000,4.0000,1.0000,5,'DOUBLE_PREC_HB', x'5555AAAA00');
+flush tables;
+analyze select * from t0 where a<3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 10 10.00 100.00 30.00 Using where
+# restart
+select hex(histogram) from mysql.column_stats where table_name='t0' and db_name='test';
+hex(histogram)
+5555AAAA00
+analyze select * from t0 where a<3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 10 10.00 100.00 30.00 Using where
+create table t2 (a int);
+# This currently just pretends that the histogram was collected.
+analyze table t2 persistent for all;
+Table Op Msg_type Msg_text
+test.t2 analyze status Engine-independent statistics collected
+test.t2 analyze status Table is already up to date
+select * from mysql.column_stats where table_name='t2' and db_name='test';
+db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
+analyze select * from t0 where a<3;
+id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 10 10.00 33.33 30.00 Using where
+drop table t0, t1, t2;
diff --git a/mysql-test/main/statistics_upgrade_not_done.test b/mysql-test/main/statistics_upgrade_not_done.test
new file mode 100644
index 00000000000..a74a5f35d83
--- /dev/null
+++ b/mysql-test/main/statistics_upgrade_not_done.test
@@ -0,0 +1,57 @@
+--source include/not_embedded.inc
+--source include/mysql_upgrade_preparation.inc
+--source include/have_innodb.inc
+
+#
+# This is like the upgrade test in statistics_upgrade.test, except that we also
+# check what happens if one doesn't do the upgrade and attempts to use the new
+# server with the old mysql.column_stats table
+#
+--echo # Create the old-version of the table
+
+call mtr.add_suppression(".*Incorrect definition of table mysql.column_stats:.*");
+
+alter table mysql.column_stats rename test.t1;
+
+CREATE TABLE mysql.column_stats (
+ `db_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
+ `table_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
+ `column_name` varchar(64) COLLATE utf8mb3_bin NOT NULL,
+ `min_value` varbinary(255) DEFAULT NULL,
+ `max_value` varbinary(255) DEFAULT NULL,
+ `nulls_ratio` decimal(12,4) DEFAULT NULL,
+ `avg_length` decimal(12,4) DEFAULT NULL,
+ `avg_frequency` decimal(12,4) DEFAULT NULL,
+ `hist_size` tinyint(3) unsigned DEFAULT NULL,
+ `hist_type` enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8mb3_bin DEFAULT NULL,
+ `histogram` varbinary(255) DEFAULT NULL,
+ PRIMARY KEY (`db_name`,`table_name`,`column_name`)
+) ENGINE=Aria DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 COMMENT='Statistics on Columns';
+
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+INSERT INTO mysql.column_stats VALUES
+('test','t0','a','0','9',0.0000,4.0000,1.0000,5,'DOUBLE_PREC_HB', x'5555AAAA00');
+
+flush tables;
+analyze select * from t0 where a<3;
+
+# Restart the server
+
+--source include/restart_mysqld.inc
+
+select hex(histogram) from mysql.column_stats where table_name='t0' and db_name='test';
+analyze select * from t0 where a<3;
+
+create table t2 (a int);
+-- echo # This currently just pretends that the histogram was collected.
+analyze table t2 persistent for all;
+select * from mysql.column_stats where table_name='t2' and db_name='test';
+
+--exec $MYSQL_UPGRADE --upgrade-system-tables --force --silent 2>&1
+let $MYSQLD_DATADIR= `select @@datadir`;
+--file_exists $MYSQLD_DATADIR/mysql_upgrade_info
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+
+analyze select * from t0 where a<3;
+drop table t0, t1, t2;
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index 8e04931b71c..faf5ec314ab 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -696,6 +696,10 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name,
ER_THD(thd, ER_JSON_HISTOGRAM_PARSE_FAILED),
db_name, table_name,
err, (je.s.c_str - (const uchar*)hist_data));
+ sql_print_error(ER_THD(thd, ER_JSON_HISTOGRAM_PARSE_FAILED),
+ db_name, table_name, err,
+ (je.s.c_str - (const uchar*)hist_data));
+
DBUG_RETURN(true);
}
1
0
revision-id: ada9235816057cf778f4f6fb3e82978a3616b470 (mariadb-10.6.1-322-gada92358160)
parent(s): 1b9072b140f73815367d01d0efcd144b0ffbb49c
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-02 14:38:51 +0300
message:
Rename histogram_hb_v2 -> histogram_hb
---
mysql-test/main/statistics_json.result | 114 ++++++++++++++++-----------------
mysql-test/main/statistics_json.test | 16 ++---
sql/opt_histogram_json.cc | 4 +-
sql/opt_histogram_json.h | 4 +-
4 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result
index 13239c7e513..43fd61b4203 100644
--- a/mysql-test/main/statistics_json.result
+++ b/mysql-test/main/statistics_json.result
@@ -234,7 +234,7 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 0 49 0.0000 1.0000 4 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0",
"size": 0.275,
@@ -259,7 +259,7 @@ test t1 a 0 49 0.0000 1.0000 4 JSON_HB {
]
}
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 4 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "vvvvvvvvvvvvv",
"size": 0.28125,
@@ -284,7 +284,7 @@ test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 4 JSON_HB {
]
}
test t1 c aaaa dddddddd 0.1250 7.0000 4 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "aaaa",
"size": 0.257142857,
@@ -309,7 +309,7 @@ test t1 c aaaa dddddddd 0.1250 7.0000 4 JSON_HB {
]
}
test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 3 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1989-03-12",
"size": 0.323529412,
@@ -329,7 +329,7 @@ test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 3 JSON_HB {
]
}
test t1 e 0.01 0.112 0.2250 6.2000 4 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0.01",
"size": 0.387096774,
@@ -354,7 +354,7 @@ test t1 e 0.01 0.112 0.2250 6.2000 4 JSON_HB {
]
}
test t1 f 1 5 0.2000 6.4000 4 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "\u0001",
"size": 0.28125,
@@ -393,7 +393,7 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 0 49 0.0000 1.0000 7 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0",
"size": 0.15,
@@ -433,7 +433,7 @@ test t1 a 0 49 0.0000 1.0000 7 JSON_HB {
]
}
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 5 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "vvvvvvvvvvvvv",
"size": 0.25,
@@ -463,7 +463,7 @@ test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 5 JSON_HB {
]
}
test t1 c aaaa dddddddd 0.1250 7.0000 5 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "aaaa",
"size": 0.257142857,
@@ -493,7 +493,7 @@ test t1 c aaaa dddddddd 0.1250 7.0000 5 JSON_HB {
]
}
test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 4 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1989-03-12",
"size": 0.323529412,
@@ -518,7 +518,7 @@ test t1 d 1989-03-12 1999-07-23 0.1500 8.5000 4 JSON_HB {
]
}
test t1 e 0.01 0.112 0.2250 6.2000 5 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0.01",
"size": 0.387096774,
@@ -548,7 +548,7 @@ test t1 e 0.01 0.112 0.2250 6.2000 5 JSON_HB {
]
}
test t1 f 1 5 0.2000 6.4000 5 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "\u0001",
"size": 0.125,
@@ -1822,9 +1822,9 @@ avg_length 4.0000
avg_frequency 2.7640
hist_size 85
hist_type JSON_HB
-hex(histogram) 7B0A202022686973746F6772616D5F68625F7632223A205B0A202020207B0A202020202020227374617274223A2022302E30222C0A2020202020202273697A65223A20302E3036363035363931312C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E31222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E32222C0A2020202020202273697A65223A20302E3032323335373732342C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E33222C0A2020202020202273697A65223A20302E3031373237363432332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E34222C0A2020202020202273697A65223A20302E3032353430363530342C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E35222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A20202020
7B0A202020202020227374617274223A2022302E36222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E37222C0A2020202020202273697A65223A20302E3031373237363432332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E33222C0A2020202020202273697A65223
A20302E3031323139353132322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E34222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E35222C0A2020202020202273697A65223A20302E3030353038313330312C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E36222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A
202020207B0A202020202020227374617274223A2022322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022322E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E38222C0A20202020202022736
97A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020
207D2C0A202020207B0A202020202020227374617274223A2022342E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022342E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022342E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022342E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022352E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022352E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022352E37222C0A202020202
0202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022362E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022362E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022362E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022372E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022372E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022372E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2033
0A202020207D2C0A202020207B0A202020202020227374617274223A2022382E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022382E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022382E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022392E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022392E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A202231302E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231302E38222
C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231312E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231322E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231322E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202231332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231342E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231362E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A2020
20202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231372E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202231392E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202232302E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202232322E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202232332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202232392E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202
020227374617274223A202233322E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202233342E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202233392E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202234342E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202234392E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202235322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202235382E34222C0A2020202020202273697A65
223A20302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202236342E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202236392E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202237362E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202238302E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202238352E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202238372E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2
0390A202020207D2C0A202020207B0A202020202020227374617274223A202238392E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202239322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239332E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202239352E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239362E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239382E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A20
2239392E30222C0A2020202020202273697A65223A20302E3030363039373536312C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A202239392E39222C0A20202020202022656E64223A202239392E39222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D0A20205D0A7D
+hex(histogram) 7B0A202022686973746F6772616D5F6862223A205B0A202020207B0A202020202020227374617274223A2022302E30222C0A2020202020202273697A65223A20302E3036363035363931312C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E31222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E32222C0A2020202020202273697A65223A20302E3032323335373732342C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E33222C0A2020202020202273697A65223A20302E3031373237363432332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E34222C0A2020202020202273697A65223A20302E3032353430363530342C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E35222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A20
2020202020227374617274223A2022302E36222C0A2020202020202273697A65223A20302E3032303332353230332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E37222C0A2020202020202273697A65223A20302E3031373237363432332C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022302E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E33222C0A2020202020202273697A65223A20302
E3031323139353132322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E34222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E35222C0A2020202020202273697A65223A20302E3030353038313330312C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E36222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20310A202020207D2C0A202020207B0A202020202020227374617274223A2022312E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022312E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020
207B0A202020202020227374617274223A2022322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022322E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022322E38222C0A2020202020202273697A652
23A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022332E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C
0A202020207B0A202020202020227374617274223A2022342E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022342E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022342E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20320A202020207D2C0A202020207B0A202020202020227374617274223A2022342E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022352E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022352E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022352E37222C0A202020202020227
3697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022362E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022362E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022362E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20350A202020207D2C0A202020207B0A202020202020227374617274223A2022372E32222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022372E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022372E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A2020
20207D2C0A202020207B0A202020202020227374617274223A2022382E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022382E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20330A202020207D2C0A202020207B0A202020202020227374617274223A2022382E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022392E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A2022392E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A202231302E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231302E38222C0A202
0202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231312E34222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231322E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231322E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202231332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20360A202020207D2C0A202020207B0A202020202020227374617274223A202231342E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231362E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A2020202020
20226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202231372E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202231392E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202232302E33222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202232322E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202232332E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202232392E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227
374617274223A202233322E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202233342E38222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202233392E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202234342E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202234392E31222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202235322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202235382E34222C0A2020202020202273697A65223A20
302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202236342E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A202020207D2C0A202020207B0A202020202020227374617274223A202236392E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A202237362E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202238302E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202238352E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202238372E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20390A2
02020207D2C0A202020207B0A202020202020227374617274223A202238392E35222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202239322E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239332E36222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20380A202020207D2C0A202020207B0A202020202020227374617274223A202239352E37222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239362E39222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A202239382E30222C0A2020202020202273697A65223A20302E3031303136323630322C0A202020202020226E6476223A20370A202020207D2C0A202020207B0A202020202020227374617274223A20223939
2E30222C0A2020202020202273697A65223A20302E3030363039373536312C0A202020202020226E6476223A20340A202020207D2C0A202020207B0A202020202020227374617274223A202239392E39222C0A20202020202022656E64223A202239392E39222C0A2020202020202273697A65223A20302E3031353234333930322C0A202020202020226E6476223A20310A202020207D0A20205D0A7D
decode_histogram(hist_type,histogram) {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0.0",
"size": 0.066056911,
@@ -2264,9 +2264,9 @@ avg_length 4.0000
avg_frequency 1.0467
hist_size 240
hist_type JSON_HB
-hex(histogram) 7B0A202022686973746F6772616D5F68625F7632223A205B0A202020207B0A202020202020227374617274223A20223432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231363336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202235383038222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223136323433222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223239303334222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223731303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031
350A202020207D2C0A202020207B0A202020202020227374617274223A20223839323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223839343437222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A20223930303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031310A202020207D2C0A202020207B0A202020202020227374617274223A20223930353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223930383134222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223931313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A2020202
02020227374617274223A20223931373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223932303434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223932353734222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223932393838222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223933333432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223933393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A2022393432303022
2C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223934373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223935303532222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223935353231222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A20223936313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223936363236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A20223936393338222C0A2020202020202273697A65223A20302E3
030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223937333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223937393239222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223938323933222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223938363430222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223939333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223939373831222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E
6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313030313138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313030343930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313030393234222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031320A202020207D2C0A202020207B0A202020202020227374617274223A2022313031323935222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313031363630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313032313231222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207
D2C0A202020207B0A202020202020227374617274223A2022313032333739222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313032383230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313033333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313033363533222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313034343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313035303830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A20202020
2020227374617274223A2022313035353330222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313036303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313036343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313036393936222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313037333239222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313037373730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223
13038323534222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313038363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313039323235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313039363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313130303334222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313130373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313131343534222C0A20202020
20202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031320A202020207D2C0A202020207B0A202020202020227374617274223A2022313132303037222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313132363733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313133343934222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313134303635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313134383135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313135343833222C0A2020202020202273697A65223A20302E3
030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313136313332222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313136363935222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313137323538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313138303830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313138383135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313139333931222C0A2020202020202273697A65223A20302E3030343136373638382C0A2020
20202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313139393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313230373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313231313937222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313231383432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313232343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313233323733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A20313
50A202020207D2C0A202020207B0A202020202020227374617274223A2022313233373736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313234303732222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313234363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313235323336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313235373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313236323832222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A20202020
7B0A202020202020227374617274223A2022313236383732222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313237333530222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313237383938222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313238363531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313239363838222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A2022313330323135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617
274223A2022313331313439222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313332313237222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313332383230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313333343433222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313333393336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313334383335222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231333630363222
2C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313337303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313337373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313338343138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313339333537222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313430313639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A2022313431313332222C0A2020202020202273697A6
5223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313432313730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313432393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313434313236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313435313530222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313436313035222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313437313234222C0A2020202020202273697A65223A20302E30303431363736
38382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313437393339222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313438383637222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313439393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313531303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313532313934222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313533333434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6
476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313534393830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313535393431222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313537333538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313538373230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313630333539222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313631353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D
2C0A202020207B0A202020202020227374617274223A2022313633313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313634333637222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313635353833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313637313833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313638393533222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313730313233222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202
020227374617274223A2022313731333633222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313732363438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313733383738222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313734393834222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313736353736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313738323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231
3739323538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313830343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313832313438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313833323631222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313834353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313835393531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313837353537222C0A202020202
0202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313839303336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313930323535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313932353039222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313934313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313935343638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313937303030222C0A2020202020202273697A65223A20302E30
30343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313939303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323030393031222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323032343531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323034393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323036333338222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323038303534222C0A2020202020202273697A65223A20302E3030343136373638382C0A20202
0202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323131303638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323133323731222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323135333733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323137343939222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323139373631222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323232303330222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A203137
0A202020207D2C0A202020207B0A202020202020227374617274223A2022323234303434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323236353733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323239323132222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323332383131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323335373630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323339313234222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207
B0A202020202020227374617274223A2022323431373639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323433383235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323436353335222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323439323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323533353837222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323535363137222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A2020202020202273746172
74223A2022323539353337222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323632393437222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323635323131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323639333933222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323732303538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323735393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323738383239222
C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323832313937222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323836383438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323931303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022323934313235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323939313138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333031353034222C0A2020202020202273697A65
223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333035363939222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333131323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333135303833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333139333733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333234363632222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333238373131222C0A2020202020202273697A65223A20302E303034313637363
8382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333332383030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333337393636222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333432323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333438313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333533343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333538363633222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E64
76223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333632343730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333636373132222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333735303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333831373235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333836323336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333935343032222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2
C0A202020207B0A202020202020227374617274223A2022343033313531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343131353432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343139303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343235353739222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343333313830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343431363439222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A2020202020
20227374617274223A2022343530313830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022343539383834222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343639353333222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343736363638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343833313535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343935353430222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353
130303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353230303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022353330393635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353534363336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353638383535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022353837323131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363036393332222C0A2020202020
202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363234323639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363530313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363639313831222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373031383237222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373238303630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373632303030222C0A2020202020202273697A65223A20302E303
0343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373934323436222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022383330303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022383739303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393437343833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231303032323339222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231303630323537222C0A2020202020202273697A65223A20302E3030343136373638382C0A20
2020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231313139313137222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231313836393236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231323438373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231333436313736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231343538343833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231363135333639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226
E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231383631323635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232313137353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232353030303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232383936303136222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202234303137373333222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202236373538383435222C0A20202020202022656E64223A20223130353030303030222C0A2020202020202273697A65223A20302E
30303339323235332C0A202020202020226E6476223A2031360A202020207D0A20205D0A7D
+hex(histogram) 7B0A202022686973746F6772616D5F6862223A205B0A202020207B0A202020202020227374617274223A20223432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231363336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202235383038222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223136323433222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223239303334222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223731303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A20
2020207D2C0A202020207B0A202020202020227374617274223A20223839323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223839343437222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031300A202020207D2C0A202020207B0A202020202020227374617274223A20223930303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031310A202020207D2C0A202020207B0A202020202020227374617274223A20223930353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223930383134222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223931313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A2020202020202
27374617274223A20223931373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223932303434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223932353734222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223932393838222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223933333432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223933393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A20223934323030222C0A20
20202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223934373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223935303532222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223935353231222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A20223936313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223936363236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A20223936393338222C0A2020202020202273697A65223A20302E3030343
136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A20223937333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223937393239222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223938323933222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223938363430222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223939333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223939373831222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E647622
3A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313030313138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313030343930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313030393234222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031320A202020207D2C0A202020207B0A202020202020227374617274223A2022313031323935222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313031363630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313032313231222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A2
02020207B0A202020202020227374617274223A2022313032333739222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313032383230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313033333030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313033363533222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313034343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313035303830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A20202020202022
7374617274223A2022313035353330222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313036303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313036343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313036393936222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313037333239222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313037373730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A20223130383
23534222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313038363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313039323235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313039363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313130303334222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313130373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313131343534222C0A20202020202022
73697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031320A202020207D2C0A202020207B0A202020202020227374617274223A2022313132303037222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313132363733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313133343934222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313134303635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313134383135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313135343833222C0A2020202020202273697A65223A20302E3030343
136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313136313332222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313136363935222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313137323538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313138303830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313138383135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313139333931222C0A2020202020202273697A65223A20302E3030343136373638382C0A2020202020
20226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313139393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313230373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313231313937222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313231383432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313232343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313233323733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202
020207D2C0A202020207B0A202020202020227374617274223A2022313233373736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313234303732222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313234363030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313235323336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313235373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313236323832222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A20
2020202020227374617274223A2022313236383732222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313237333530222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313237383938222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313238363531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313239363838222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A2022313330323135222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223
A2022313331313439222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313332313237222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313332383230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313333343433222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313333393336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313334383335222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313336303632222C0A20
20202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313337303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313337373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313338343138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313339333537222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313430313639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031330A202020207D2C0A202020207B0A202020202020227374617274223A2022313431313332222C0A2020202020202273697A65223A2
0302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313432313730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313432393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313434313236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313435313530222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313436313035222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313437313234222C0A2020202020202273697A65223A20302E3030343136373638382C
0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313437393339222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031340A202020207D2C0A202020207B0A202020202020227374617274223A2022313438383637222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313439393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313531303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313532313934222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313533333434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223
A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313534393830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313535393431222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313537333538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313538373230222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313630333539222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313631353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A20
2020207B0A202020202020227374617274223A2022313633313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313634333637222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313635353833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313637313833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313638393533222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313730313233222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227
374617274223A2022313731333633222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313732363438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313733383738222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313734393834222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313736353736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313738323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231373932
3538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313830343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313832313438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313833323631222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313834353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313835393531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313837353537222C0A202020202020227
3697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313839303336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313930323535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313932353039222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022313934313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022313935343638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313937303030222C0A2020202020202273697A65223A20302E30303431
36373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313939303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323030393031222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323032343531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323034393030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323036333338222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323038303534222C0A2020202020202273697A65223A20302E3030343136373638382C0A20202020202
0226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323131303638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323133323731222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323135333733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323137343939222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323139373631222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323232303330222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A2020
20207D2C0A202020207B0A202020202020227374617274223A2022323234303434222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323236353733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323239323132222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323332383131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323335373630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323339313234222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202
020202020227374617274223A2022323431373639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323433383235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323436353335222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323439323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323533353837222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323535363137222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A
2022323539353337222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323632393437222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323635323131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323639333933222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323732303538222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323735393930222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323738383239222C0A202
0202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323832313937222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323836383438222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323931303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022323934313235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022323939313138222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333031353034222C0A2020202020202273697A65223A20
302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333035363939222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333131323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333135303833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333139333733222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333234363632222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333238373131222C0A2020202020202273697A65223A20302E3030343136373638382C0
A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333332383030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333337393636222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333432323030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333438313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333533343030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333538363633222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A
2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333632343730222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333636373132222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333735303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333831373235222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022333836323336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333935343032222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202
020207B0A202020202020227374617274223A2022343033313531222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343131353432222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343139303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343235353739222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343333313830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343431363439222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A2020202020202273
74617274223A2022343530313830222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022343539383834222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343639353333222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343736363638222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343833313535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343935353430222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353130303
030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353230303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031350A202020207D2C0A202020207B0A202020202020227374617274223A2022353330393635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353534363336222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353638383535222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022353837323131222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363036393332222C0A2020202020202273
697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363234323639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363530313030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363639313831222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373031383237222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373238303630222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373632303030222C0A2020202020202273697A65223A20302E303034313
6373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373934323436222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022383330303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A2022383739303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393437343833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231303032323339222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231303630323537222C0A2020202020202273697A65223A20302E3030343136373638382C0A20202020
2020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231313139313137222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231313836393236222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231323438373030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231333436313736222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031360A202020207D2C0A202020207B0A202020202020227374617274223A202231343538343833222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231363135333639222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E64762
23A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202231383631323635222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232313137353030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232353030303030222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202232383936303136222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202234303137373333222C0A2020202020202273697A65223A20302E3030343136373638382C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A202236373538383435222C0A20202020202022656E64223A20223130353030303030222C0A2020202020202273697A65223A20302E303033
39323235332C0A202020202020226E6476223A2031360A202020207D0A20205D0A7D
decode_histogram(hist_type,histogram) {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "42",
"size": 0.004167688,
@@ -3542,7 +3542,7 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 1 3 0.0000 1.0000 3 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.333333333,
@@ -3587,7 +3587,7 @@ FROM mysql.column_stats
ORDER BY db_name, table_name, column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type decode_histogram(hist_type,histogram)
test t1 a 1 5 0.0000 1.0000 5 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.2,
@@ -3656,7 +3656,7 @@ nulls_ratio, avg_frequency,
hist_size, hist_type, HEX(histogram)
FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
-test t2 id 1 1024 0.0000 8.0000 63 JSON_HB 7B0A202022686973746F6772616D5F68625F7632223A205B0A202020207B0A202020202020227374617274223A202231222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223137222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223333222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A20223530222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223636222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223832222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031
380A202020207D2C0A202020207B0A202020202020227374617274223A20223939222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313135222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313332222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313438222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313634222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022313831222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223
13937222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323133222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022323330222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323436222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323633222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323739222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323935222C0A2020202020202273697A65223A20302E303135393931323131
2C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022333132222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333238222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333434222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022333631222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333737222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333934222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0
A202020202020227374617274223A2022343130222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343236222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022343433222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343539222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343735222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022343932222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353038222C0A2020202020202273
697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353235222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353431222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353537222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022353734222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353930222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363036222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223
A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022363233222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363339222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363536222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363732222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363838222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022373035222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A20202020202022737461727422
3A2022373231222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373337222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022373534222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373730222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373837222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383033222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383139222C0A2020202020202273697A65223A20302E30313539393
13231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022383336222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383532222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383638222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022383835222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393031222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393138222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A2020
20207B0A202020202020227374617274223A2022393334222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393530222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022393637222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393833222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393939222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A202231303136222C0A20202020202022656E64223A202231303234222C0A2020202020202273697A65223A20302E3030383534343932322C0A202020202020226E6476223A20390A202020207D0A20205D0A7D
+test t2 id 1 1024 0.0000 8.0000 63 JSON_HB 7B0A202022686973746F6772616D5F6862223A205B0A202020207B0A202020202020227374617274223A202231222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223137222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223333222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A20223530222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223636222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223832222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A20
2020207D2C0A202020207B0A202020202020227374617274223A20223939222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313135222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313332222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313438222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022313634222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022313831222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A20223139372
22C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323133222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022323330222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323436222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323633222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323739222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022323935222C0A2020202020202273697A65223A20302E3031353939313231312C0A20
2020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022333132222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333238222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333434222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022333631222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333737222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022333934222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A20202
0202020227374617274223A2022343130222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343236222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022343433222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343539222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022343735222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022343932222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353038222C0A2020202020202273697A65
223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353235222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353431222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353537222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022353734222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022353930222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363036222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A20313
80A202020207D2C0A202020207B0A202020202020227374617274223A2022363233222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363339222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363536222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363732222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022363838222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022373035222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022
373231222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373337222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022373534222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373730222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022373837222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383033222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383139222C0A2020202020202273697A65223A20302E30313539393132313
12C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022383336222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383532222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022383638222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022383835222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393031222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393138222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B
0A202020202020227374617274223A2022393334222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393530222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A2022393637222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393833222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031370A202020207D2C0A202020207B0A202020202020227374617274223A2022393939222C0A2020202020202273697A65223A20302E3031353939313231312C0A202020202020226E6476223A2031380A202020207D2C0A202020207B0A202020202020227374617274223A202231303136222C0A20202020202022656E64223A202231303234222C0A2020202020202273697A65223A20302E3030383534343932322C0A202020202020226E6476223A20390A202020207D0A20205D0A7D
set histogram_size=0;
drop table t1, t2;
set use_stat_tables=@save_use_stat_tables;
@@ -3817,7 +3817,7 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 14.0000 {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.100001744,
@@ -3884,7 +3884,7 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 111 17026 0.0000 4.0000 10.4739 {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "111",
"size": 0.103773585,
@@ -3951,7 +3951,7 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 14.0401 {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.100015657,
@@ -4018,7 +4018,7 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 13.9812 {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.100007372,
@@ -4091,7 +4091,7 @@ DECODE_HISTOGRAM(hist_type, histogram)
from mysql.column_stats;
table_name column_name min_value max_value nulls_ratio avg_length avg_frequency DECODE_HISTOGRAM(hist_type, histogram)
t1 id 1 17384 0.0000 4.0000 14.0000 {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.100001744,
@@ -4188,7 +4188,7 @@ test.t1_json analyze status OK
select * from mysql.column_stats where table_name='t1_json';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1_json a a-0 a-9 0.0000 3.0000 1.0000 10 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "a-0",
"size": 0.1,
@@ -4268,74 +4268,74 @@ id select_type table type possible_keys key key_len ref rows Extra
Warnings:
Warning 4186 Failed to parse histogram for table test.t1_json: Root JSON element must be a JSON object at offset 1.
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;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: histogram_hb_v2 must contain an array at offset 35.
+Warning 4186 Failed to parse histogram for table test.t1_json: histogram_hb must contain an array at offset 32.
UPDATE mysql.column_stats
-SET histogram='{"histogram_hb_v2":["not-a-bucket"]}'
+SET histogram='{"histogram_hb":["not-a-bucket"]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: Expected an object in the buckets array at offset 35.
+Warning 4186 Failed to parse histogram for table test.t1_json: Expected an object in the buckets array at offset 32.
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: "start" element not present at offset 45.
+Warning 4186 Failed to parse histogram for table test.t1_json: "start" element not present at offset 42.
UPDATE mysql.column_stats
-SET histogram='{"histogram_hb_v2":[{"start":{}}]}'
+SET histogram='{"histogram_hb":[{"start":{}}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: "size" element not present at offset 31.
+Warning 4186 Failed to parse histogram for table test.t1_json: "size" element not present at offset 28.
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: "ndv" element not present at offset 60.
+Warning 4186 Failed to parse histogram for table test.t1_json: "ndv" element not present at offset 57.
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: "ndv" element not present at offset 48.
+Warning 4186 Failed to parse histogram for table test.t1_json: "ndv" element not present at offset 45.
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
UPDATE mysql.column_stats
-SET histogram='{"histogram_hb_v2":[]}'
+SET histogram='{"histogram_hb":[]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
Warnings:
-Warning 4186 Failed to parse histogram for table test.t1_json: Histogram must have at least one bucket at offset 21.
+Warning 4186 Failed to parse histogram for table test.t1_json: Histogram must have at least one bucket at offset 18.
create table t2 (
city varchar(100)
);
@@ -4380,7 +4380,7 @@ ANALYZE TABLE Country, City, CountryLanguage persistent for all;
SELECT column_name, min_value, max_value, hist_size, hist_type, histogram FROM mysql.column_stats;
column_name min_value max_value hist_size hist_type histogram
Code ABW ZWE 48 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "ABW",
"size": 0.020920502,
@@ -4625,7 +4625,7 @@ Code ABW ZWE 48 JSON_HB {
]
}
Country ABW ZWE 39 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "ABW",
"size": 0.020102966,
@@ -4825,7 +4825,7 @@ Country ABW ZWE 39 JSON_HB {
]
}
Name Afghanistan Zimbabwe 48 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "Afghanistan",
"size": 0.020920502,
@@ -5070,7 +5070,7 @@ Name Afghanistan Zimbabwe 48 JSON_HB {
]
}
SurfaceArea 0.40 17075400.00 48 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0.40",
"size": 0.020920502,
@@ -5315,7 +5315,7 @@ SurfaceArea 0.40 17075400.00 48 JSON_HB {
]
}
Population 0 1277558000 48 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0",
"size": 0.029288703,
@@ -5560,7 +5560,7 @@ Population 0 1277558000 48 JSON_HB {
]
}
Capital 1 4074 47 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.021551724,
@@ -5800,7 +5800,7 @@ Capital 1 4074 47 JSON_HB {
]
}
ID 1 4079 50 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.020102966,
@@ -6055,7 +6055,7 @@ ID 1 4079 50 JSON_HB {
]
}
Name A Coruña (La Coruña) Ürgenc 50 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "A Coruña (La Coruña)",
"size": 0.020102966,
@@ -6310,7 +6310,7 @@ Name A Coruña (La Coruña) Ürgenc 50 JSON_HB {
]
}
Population 42 10500000 50 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "42",
"size": 0.020102966,
@@ -6565,7 +6565,7 @@ Population 42 10500000 50 JSON_HB {
]
}
Country ABW ZWE 50 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "ABW",
"size": 0.020325203,
@@ -6820,7 +6820,7 @@ Country ABW ZWE 50 JSON_HB {
]
}
Language Abhyasi [South]Mande 48 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "Abhyasi",
"size": 0.020325203,
@@ -7065,7 +7065,7 @@ Language Abhyasi [South]Mande 48 JSON_HB {
]
}
Percentage 0.0 99.9 47 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0.0",
"size": 0.066056911,
@@ -7341,7 +7341,7 @@ select histogram
from mysql.column_stats where table_name='t10' and db_name=database();
histogram
{
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "Berlin",
"size": 0.333333333,
@@ -7390,7 +7390,7 @@ SELECT DECODE_HISTOGRAM(hist_type, histogram) from mysql.column_stats;
DECODE_HISTOGRAM(hist_type, histogram)
NULL
{
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.5,
@@ -7449,7 +7449,7 @@ from mysql.column_stats
where db_name=database() and table_name='t1';
decode_histogram(hist_type, histogram)
{
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "Ñ",
"end": "Ñ",
@@ -7511,7 +7511,7 @@ test.t1 analyze status OK
select histogram from mysql.column_stats where table_name = 't1';
histogram
{
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "1",
"size": 0.253164557,
@@ -7583,7 +7583,7 @@ test.t1 analyze status OK
select * from mysql.column_stats where table_name='t1';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
test t1 a 0 900 0.0000 4.0000 100.0000 10 JSON_HB {
- "histogram_hb_v2": [
+ "histogram_hb": [
{
"start": "0",
"size": 0.1,
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test
index b0a1795c235..e90df83f9c9 100644
--- a/mysql-test/main/statistics_json.test
+++ b/mysql-test/main/statistics_json.test
@@ -49,48 +49,48 @@ FLUSH TABLES;
explain select * from t1_json limit 1;
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;
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
-SET histogram='{"histogram_hb_v2":["not-a-bucket"]}'
+SET histogram='{"histogram_hb":["not-a-bucket"]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
-SET histogram='{"histogram_hb_v2":[{"start":{}}]}'
+SET histogram='{"histogram_hb":[{"start":{}}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
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';
FLUSH TABLES;
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
-SET histogram='{"histogram_hb_v2":[]}'
+SET histogram='{"histogram_hb":[]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index 4439b6d5075..8e04931b71c 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -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()))
{
- err= "Root element must be histogram_hb_v2";
+ err= "Root element must be histogram_hb";
goto err;
}
@@ -659,7 +659,7 @@ bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name,
if (je.state != JST_ARRAY_START)
{
- err= "histogram_hb_v2 must contain an array";
+ err= "histogram_hb must contain an array";
goto err;
}
diff --git a/sql/opt_histogram_json.h b/sql/opt_histogram_json.h
index a59100f42dd..347abcdf3bb 100644
--- a/sql/opt_histogram_json.h
+++ b/sql/opt_histogram_json.h
@@ -24,7 +24,7 @@
Histogram format in JSON:
{
- "histogram_hb_v2": [
+ "histogram_hb": [
{ "start": "value", "size":nnn.nn, "ndv": nnn },
...
{ "start": "value", "size":nnn.nn, "ndv": nnn, "end": "value"}
@@ -74,7 +74,7 @@ class Histogram_json_hb : public Histogram_base
std::string last_bucket_end_endp;
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,
Field *field, Histogram_type type_arg,
1
0
[Commits] 1b9072b140f: MDEV-26519: Improved histograms: Make JSON parser efficient
by psergey 02 Dec '21
by psergey 02 Dec '21
02 Dec '21
revision-id: 1b9072b140f73815367d01d0efcd144b0ffbb49c (mariadb-10.6.1-321-g1b9072b140f)
parent(s): 0492890653685ea8e405467033cfe92f16a7cc18
author: Sergei Petrunia
committer: Sergei Petrunia
timestamp: 2021-12-02 12:30:40 +0300
message:
MDEV-26519: Improved histograms: Make JSON parser efficient
Previous JSON parser was using an API which made the parsing
inefficient: the same JSON contents was parsed again and again.
Switch to using a lower-level parsing API which allows to do
parsing in an efficient way.
---
mysql-test/main/statistics_json.result | 43 +++-
mysql-test/main/statistics_json.test | 9 -
sql/opt_histogram_json.cc | 454 ++++++++++++++++++++++-----------
sql/opt_histogram_json.h | 6 +-
sql/share/errmsg-utf8.txt | 2 +-
sql/sql_statistics.cc | 9 +-
sql/sql_statistics.h | 9 +-
7 files changed, 351 insertions(+), 181 deletions(-)
diff --git a/mysql-test/main/statistics_json.result b/mysql-test/main/statistics_json.result
index 762f869fae5..13239c7e513 100644
--- a/mysql-test/main/statistics_json.result
+++ b/mysql-test/main/statistics_json.result
@@ -4263,54 +4263,79 @@ UPDATE mysql.column_stats
SET histogram='["not-what-you-expect"]' WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: Root JSON element must be a JSON object at offset 0.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: Root JSON element must be a JSON object at offset 1.
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":"not-histogram"}' WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: A JSON array expected at offset 0.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: histogram_hb_v2 must contain an array at offset 35.
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":["not-a-bucket"]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: Object expected at offset 19.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: Expected an object in the buckets array at offset 35.
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"no-expected-members":1}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: .start member must be present and be a scalar at offset 20.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: "start" element not present at offset 45.
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":{}}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: .start member must be present and be a scalar at offset 20.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: "size" element not present at offset 31.
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":"not-an-integer"}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: .size member must be present and be a scalar at offset 20.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: "ndv" element not present at offset 60.
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":0.25}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: .ndv member must be present and be a scalar at offset 20.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: "ndv" element not present at offset 48.
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":0.25, "ndv":1}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: .end must be present in the last bucket and only there at offset 0.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[]}'
WHERE table_name='t1_json';
FLUSH TABLES;
explain select * from t1_json limit 1;
-ERROR HY000: Failed to parse histogram: .end must be present in the last bucket and only there at offset 0.
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1_json ALL NULL NULL NULL NULL 10
+Warnings:
+Warning 4186 Failed to parse histogram for table test.t1_json: Histogram must have at least one bucket at offset 21.
create table t2 (
city varchar(100)
);
diff --git a/mysql-test/main/statistics_json.test b/mysql-test/main/statistics_json.test
index 23e5e7395a7..b0a1795c235 100644
--- a/mysql-test/main/statistics_json.test
+++ b/mysql-test/main/statistics_json.test
@@ -46,62 +46,53 @@ drop table ten;
UPDATE mysql.column_stats
SET histogram='["not-what-you-expect"]' WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":"not-histogram"}' WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":["not-a-bucket"]}'
WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"no-expected-members":1}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":{}}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":"not-an-integer"}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":0.25}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[{"start":"aaa", "size":0.25, "ndv":1}]}'
WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
UPDATE mysql.column_stats
SET histogram='{"histogram_hb_v2":[]}'
WHERE table_name='t1_json';
FLUSH TABLES;
---error ER_JSON_HISTOGRAM_PARSE_FAILED
explain select * from t1_json limit 1;
--source include/have_sequence.inc
diff --git a/sql/opt_histogram_json.cc b/sql/opt_histogram_json.cc
index 842f9a5ce67..4439b6d5075 100644
--- a/sql/opt_histogram_json.cc
+++ b/sql/opt_histogram_json.cc
@@ -367,189 +367,335 @@ void Histogram_json_hb::init_for_collection(MEM_ROOT *mem_root,
/*
- @brief
- Parse the histogram from its on-disk representation
+ A syntax sugar interface to json_string_t
+*/
+class Json_string
+{
+ json_string_t str;
+public:
+ explicit Json_string(const char *name)
+ {
+ json_string_set_str(&str, (const uchar*)name,
+ (const uchar*)name + strlen(name));
+ json_string_set_cs(&str, system_charset_info);
+ }
+ json_string_t *get() { return &str; }
+};
- @return
- false OK
- True Error
+
+/*
+ This [partially] saves the JSON parser state and then can rollback the parser
+ to it.
+
+ The goal of this is to be able to make multiple json_key_matches() calls:
+
+ Json_saved_parser_state save(je);
+ if (json_key_matches(je, KEY_NAME_1)) {
+ ...
+ return;
+ }
+ save.restore_to(je);
+ if (json_key_matches(je, KEY_NAME_2)) {
+ ...
+ }
+
+ This allows one to parse JSON objects where [optional] members come in any
+ order.
*/
-bool Histogram_json_hb::parse(MEM_ROOT *mem_root, Field *field,
- Histogram_type type_arg, const char *hist_data,
- size_t hist_data_len)
+class Json_saved_parser_state
{
- const char *err;
- DBUG_ENTER("Histogram_json_hb::parse");
- DBUG_ASSERT(type_arg == JSON_HB);
- const char *err_pos= hist_data;
- const char *obj1;
- int obj1_len;
- double cumulative_size= 0.0;
- size_t end_member_index= (size_t)-1;
- StringBuffer<128> value_buf;
- StringBuffer<128> unescape_buf;
+ const uchar *c_str;
+ my_wc_t c_next;
+ int state;
+public:
+ explicit Json_saved_parser_state(const json_engine_t *je) :
+ c_str(je->s.c_str),
+ c_next(je->s.c_next),
+ state(je->state)
+ {}
+ void restore_to(json_engine_t *je)
+ {
+ je->s.c_str= c_str;
+ je->s.c_next= c_next;
+ je->state= state;
+ }
+};
- if (JSV_OBJECT != json_type(hist_data, hist_data + hist_data_len,
- &obj1, &obj1_len))
+
+bool read_bucket_endpoint(json_engine_t *je, Field *field, String *out,
+ const char **err)
+{
+ if (json_read_value(je))
+ return true;
+
+ const char* je_value= (const char*)je->value;
+ if (je->value_type == JSON_VALUE_STRING && je->value_escaped)
{
- err= "Root JSON element must be a JSON object";
- err_pos= hist_data;
- goto error;
+ StringBuffer<128> unescape_buf;
+ if (json_unescape_to_string(je_value, je->value_len, &unescape_buf))
+ {
+ *err= "Un-escape error";
+ return true;
+ }
+ field->store_text(unescape_buf.ptr(), unescape_buf.length(),
+ unescape_buf.charset());
}
+ else
+ field->store_text(je_value, je->value_len, &my_charset_utf8mb4_bin);
- const char *hist_array;
- int hist_array_len;
- if (JSV_ARRAY != json_get_object_key(obj1, obj1 + obj1_len,
- JSON_NAME, &hist_array,
- &hist_array_len))
+ out->alloc(field->pack_length());
+ uint bytes= field->get_key_image((uchar*)out->ptr(),
+ field->key_length(), Field::itRAW);
+ out->length(bytes);
+ return false;
+}
+
+
+/*
+ @brief Parse a JSON reprsentation for one histogram bucket
+
+ @param je The JSON parser object
+ @param field Table field we are using histogram (used to convert
+ endpoints from text representation to binary)
+ @param total_size INOUT Fraction of the table rows in the buckets parsed so
+ far.
+ @param assigned_last_end OUT TRUE<=> The bucket had "end" members, the
+ function has saved it in
+ this->last_bucket_end_endp
+ @param err OUT If function returns 1, this *may* be set to point to text
+ describing the error.
+
+ @detail
+
+ Parse a JSON object in this form:
+
+ { "start": "value", "size":nnn.nn, "ndv": nnn, "end": "value"}
+
+ Unknown members are ignored.
+
+ @return
+ 0 OK
+ 1 Parse Error
+ -1 EOF
+*/
+int Histogram_json_hb::parse_bucket(json_engine_t *je, Field *field,
+ double *total_size,
+ bool *assigned_last_end,
+ const char **err)
+{
+ *assigned_last_end= false;
+ if (json_scan_next(je))
+ return 1;
+ if (je->state != JST_VALUE)
{
- err_pos= obj1;
- err= "A JSON array expected";
- goto error;
+ if (je->state == JST_ARRAY_END)
+ return -1; // EOF
+ else
+ return 1; // An error
}
- for (int i= 0;; i++)
+ if (json_scan_next(je) || je->state != JST_OBJ_START)
{
- const char *bucket_info;
- int bucket_info_len;
- enum json_types ret= json_get_array_item(hist_array, hist_array+hist_array_len,
- i, &bucket_info,
- &bucket_info_len);
- if (ret == JSV_NOTHING)
- break;
- if (ret == JSV_BAD_JSON)
- {
- err_pos= hist_array;
- err= "JSON parse error";
- goto error;
- }
- if (ret != JSV_OBJECT)
- {
- err_pos= hist_array;
- err= "Object expected";
- goto error;
- }
+ *err= "Expected an object in the buckets array";
+ return 1;
+ }
- // Ok, now we are parsing the JSON object describing the bucket
- // Read the "start" field.
- const char *val;
- int val_len;
- ret= json_get_object_key(bucket_info, bucket_info+bucket_info_len,
- "start", &val, &val_len);
- if (ret != JSV_STRING && ret != JSV_NUMBER)
- {
- err_pos= bucket_info;
- err= ".start member must be present and be a scalar";
- goto error;
- }
+ bool have_start= false;
+ bool have_size= false;
+ bool have_ndv= false;
- // Read the "size" field.
- const char *size;
- int size_len;
- ret= json_get_object_key(bucket_info, bucket_info+bucket_info_len,
- "size", &size, &size_len);
- if (ret != JSV_NUMBER)
- {
- err_pos= bucket_info;
- err= ".size member must be present and be a scalar";
- goto error;
- }
+ double size_d;
+ longlong ndv_ll;
+ StringBuffer<128> value_buf;
- int conv_err;
- char *size_end= (char*)size + size_len;
- double size_d= my_strtod(size, &size_end, &conv_err);
- if (conv_err)
- {
- err_pos= size;
- err= ".size member must be a floating-point value";
- goto error;
- }
- cumulative_size += size_d;
-
- // Read the "ndv" field
- const char *ndv;
- int ndv_len;
- ret= json_get_object_key(bucket_info, bucket_info+bucket_info_len,
- "ndv", &ndv, &ndv_len);
- if (ret != JSV_NUMBER)
- {
- err_pos= bucket_info;
- err= ".ndv member must be present and be a scalar";
- goto error;
- }
- char *ndv_end= (char*)ndv + ndv_len;
- longlong ndv_ll= my_strtoll10(ndv, &ndv_end, &conv_err);
- if (conv_err)
+ while (!json_scan_next(je) && je->state != JST_OBJ_END)
+ {
+ Json_saved_parser_state save1(je);
+ Json_string start_str("start");
+ if (json_key_matches(je, start_str.get()))
{
- err_pos= ndv;
- err= ".ndv member must be an integer value";
- goto error;
- }
+ if (read_bucket_endpoint(je, field, &value_buf, err))
+ return 1;
- unescape_buf.set_charset(field->charset());
- uint len_to_copy= field->key_length();
- if (json_unescape_to_string(val, val_len, &unescape_buf))
- {
- err_pos= ndv;
- err= "Out of memory";
- goto error;
+ have_start= true;
+ continue;
}
- field->store_text(unescape_buf.ptr(), unescape_buf.length(),
- unescape_buf.charset());
- value_buf.alloc(field->pack_length());
- uint bytes= field->get_key_image((uchar*)value_buf.ptr(), len_to_copy,
- Field::itRAW);
- buckets.push_back({std::string(value_buf.ptr(), bytes), cumulative_size,
- ndv_ll});
-
- // Read the "end" field
- const char *end_val;
- int end_val_len;
- ret= json_get_object_key(bucket_info, bucket_info+bucket_info_len,
- "end", &end_val, &end_val_len);
- if (ret != JSV_NOTHING && ret != JSV_STRING && ret !=JSV_NUMBER)
+ save1.restore_to(je);
+
+ Json_string size_str("size");
+ if (json_key_matches(je, size_str.get()))
{
- err_pos= bucket_info;
- err= ".end member must be a scalar";
- goto error;
+ if (json_read_value(je))
+ return 1;
+
+ const char *size= (const char*)je->value_begin;
+ char *size_end= (char*)je->value_end;
+ int conv_err;
+ size_d= my_strtod(size, &size_end, &conv_err);
+ if (conv_err)
+ {
+ *err= ".size member must be a floating-point value";
+ return 1;
+ }
+ have_size= true;
+ continue;
}
- if (ret != JSV_NOTHING)
+ save1.restore_to(je);
+
+ Json_string ndv_str("ndv");
+ if (json_key_matches(je, ndv_str.get()))
{
- if (json_unescape_to_string(end_val, end_val_len, &unescape_buf))
+ if (json_read_value(je))
+ return 1;
+
+ const char *ndv= (const char*)je->value_begin;
+ char *ndv_end= (char*)je->value_end;
+ int conv_err;
+ ndv_ll= my_strtoll10(ndv, &ndv_end, &conv_err);
+ if (conv_err)
{
- err_pos= bucket_info;
- err= "Out of memory";
- goto error;
+ *err= ".ndv member must be an integer value";
+ return 1;
}
- field->store_text(unescape_buf.ptr(), unescape_buf.length(),
- &my_charset_bin);
- value_buf.alloc(field->pack_length());
- uint bytes= field->get_key_image((uchar*)value_buf.ptr(), len_to_copy,
- Field::itRAW);
- last_bucket_end_endp.assign(value_buf.ptr(), bytes);
- if (end_member_index == (size_t)-1)
- end_member_index= buckets.size();
+ have_ndv= true;
+ continue;
+ }
+ save1.restore_to(je);
+
+ Json_string end_str("end");
+ if (json_key_matches(je, end_str.get()))
+ {
+ if (read_bucket_endpoint(je, field, &value_buf, err))
+ return 1;
+ last_bucket_end_endp.assign(value_buf.ptr(), value_buf.length());
+ *assigned_last_end= true;
+ continue;
}
+ save1.restore_to(je);
+
+ // Some unknown member. Skip it.
+ if (json_skip_key(je))
+ return 1;
+ }
+
+ if (!have_start)
+ {
+ *err= "\"start\" element not present";
+ return 1;
+ }
+ if (!have_size)
+ {
+ *err= "\"size\" element not present";
+ return 1;
+ }
+ if (!have_ndv)
+ {
+ *err= "\"ndv\" element not present";
+ return 1;
+ }
+
+ *total_size += size_d;
+
+ buckets.push_back({std::string(value_buf.ptr(), value_buf.length()),
+ *total_size, ndv_ll});
+
+ return 0; // Ok, continue reading
+}
+
+
+/*
+ @brief
+ Parse the histogram from its on-disk JSON representation
+
+ @detail
+ See opt_histogram_json.h, class Histogram_json_hb for description of the
+ data format.
+
+ @return
+ false OK
+ True Error
+*/
+
+bool Histogram_json_hb::parse(MEM_ROOT *mem_root, const char *db_name,
+ const char *table_name, Field *field,
+ Histogram_type type_arg,
+ const char *hist_data, size_t hist_data_len)
+{
+ json_engine_t je;
+ int rc;
+ const char *err= "JSON parse error";
+ double total_size= 0.0;
+ int end_element= -1;
+ bool end_assigned;
+ DBUG_ENTER("Histogram_json_hb::parse");
+ DBUG_ASSERT(type_arg == JSON_HB);
+
+ Json_string hist_key_name(JSON_NAME);
+ json_scan_start(&je, &my_charset_utf8mb4_bin,
+ (const uchar*)hist_data,
+ (const uchar*)hist_data+hist_data_len);
+
+ if (json_scan_next(&je))
+ goto err;
+
+ if (je.state != JST_OBJ_START)
+ {
+ err= "Root JSON element must be a JSON object";
+ goto err;
+ }
+
+ if (json_scan_next(&je))
+ goto err;
+
+ if (je.state != JST_KEY || !json_key_matches(&je, hist_key_name.get()))
+ {
+ err= "Root element must be histogram_hb_v2";
+ goto err;
+ }
+
+ if (json_scan_next(&je))
+ goto err;
+
+ if (je.state != JST_ARRAY_START)
+ {
+ err= "histogram_hb_v2 must contain an array";
+ goto err;
+ }
+
+ while (!(rc= parse_bucket(&je, field, &total_size, &end_assigned, &err)))
+ {
+ if (end_assigned && end_element != -1)
+ end_element= (int)buckets.size();
+ }
+
+ if (rc > 0) // Got error other than EOF
+ goto err;
+
+ if (buckets.size() < 1)
+ {
+ err= "Histogram must have at least one bucket";
+ goto err;
}
- size= buckets.size();
- if (end_member_index != buckets.size())
+ if (end_element == -1)
{
- err= ".end must be present in the last bucket and only there";
- err_pos= hist_data;
- goto error;
+ buckets.back().start_value= last_bucket_end_endp;
}
- if (!buckets.size())
+ else if (end_element < (int)buckets.size())
{
- err= ".end member is allowed only in last bucket";
- err_pos= hist_data;
- goto error;
+ err= ".end is only allowed in the last bucket";
+ goto err;
}
- DBUG_RETURN(false);
-error:
- my_error(ER_JSON_HISTOGRAM_PARSE_FAILED, MYF(0), err, err_pos - hist_data);
+ DBUG_RETURN(false); // Ok
+err:
+ THD *thd= current_thd;
+ push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
+ ER_JSON_HISTOGRAM_PARSE_FAILED,
+ ER_THD(thd, ER_JSON_HISTOGRAM_PARSE_FAILED),
+ db_name, table_name,
+ err, (je.s.c_str - (const uchar*)hist_data));
DBUG_RETURN(true);
}
@@ -683,7 +829,7 @@ double Histogram_json_hb::range_selectivity(Field *field, key_range *min_endp,
{
double min, max;
- if (min_endp && !(field->null_ptr && min_endp->key[0]))
+ if (min_endp && !(field->real_maybe_null() && min_endp->key[0]))
{
bool exclusive_endp= (min_endp->flag == HA_READ_AFTER_KEY)? true: false;
const uchar *min_key= min_endp->key;
@@ -721,7 +867,7 @@ double Histogram_json_hb::range_selectivity(Field *field, key_range *min_endp,
if (max_endp)
{
// The right endpoint cannot be NULL
- DBUG_ASSERT(!(field->null_ptr && max_endp->key[0]));
+ DBUG_ASSERT(!(field->real_maybe_null() && max_endp->key[0]));
bool inclusive_endp= (max_endp->flag == HA_READ_AFTER_KEY)? true: false;
const uchar *max_key= max_endp->key;
uint max_key_len= max_endp->length;
diff --git a/sql/opt_histogram_json.h b/sql/opt_histogram_json.h
index a5499917971..a59100f42dd 100644
--- a/sql/opt_histogram_json.h
+++ b/sql/opt_histogram_json.h
@@ -76,7 +76,8 @@ class Histogram_json_hb : public Histogram_base
public:
static constexpr const char* JSON_NAME="histogram_hb_v2";
- bool parse(MEM_ROOT *mem_root, Field *field, Histogram_type type_arg,
+ bool parse(MEM_ROOT *mem_root, const char *db_name, const char *table_name,
+ Field *field, Histogram_type type_arg,
const char *hist_data, size_t hist_data_len) override;
void serialize(Field *field) override;
@@ -122,6 +123,9 @@ class Histogram_json_hb : public Histogram_base
}
private:
+ int parse_bucket(json_engine_t *je, Field *field, double *cumulative_size,
+ bool *assigned_last_end, const char **err);
+
double get_left_fract(int idx);
std::string& get_end_value(int idx);
int find_bucket(const Field *field, const uchar *lookup_val, bool *equal);
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index b5b3e970f79..c2bd266cdd2 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7997,4 +7997,4 @@ ER_PARTITION_CONVERT_SUBPARTITIONED
ER_PROVIDER_NOT_LOADED
eng "MariaDB tried to use the %s, but its provider plugin is not loaded"
ER_JSON_HISTOGRAM_PARSE_FAILED
- eng "Failed to parse histogram: %s at offset %d."
+ eng "Failed to parse histogram for table %s.%s: %s at offset %d."
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 8d08875e183..6b3ea834628 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -1233,7 +1233,8 @@ class Column_stat: public Stat_table
if (!(hist= create_histogram(mem_root, hist_type, NULL)))
return NULL;
Field *field= table->field[table_field->field_index];
- if (!hist->parse(mem_root, field, hist_type,
+ if (!hist->parse(mem_root, db_name->str, table_name->str,
+ field, hist_type,
val.ptr(), val.length()))
{
table_field->read_stats->histogram= hist;
@@ -1247,9 +1248,9 @@ class Column_stat: public Stat_table
};
-bool Histogram_binary::parse(MEM_ROOT *mem_root, Field*,
- Histogram_type type_arg, const char *hist_data,
- size_t hist_data_len)
+bool Histogram_binary::parse(MEM_ROOT *mem_root, const char*, const char*,
+ Field*, Histogram_type type_arg,
+ const char *hist_data, size_t hist_data_len)
{
/* On-disk an in-memory formats are the same. Just copy the data. */
type= type_arg;
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h
index c5b1aa54399..14877417072 100644
--- a/sql/sql_statistics.h
+++ b/sql/sql_statistics.h
@@ -154,7 +154,9 @@ class Histogram_builder;
class Histogram_base
{
public:
- virtual bool parse(MEM_ROOT *mem_root, Field *field, Histogram_type type_arg,
+ virtual bool parse(MEM_ROOT *mem_root,
+ const char *db_name, const char *table_name,
+ Field *field, Histogram_type type_arg,
const char *hist_data, size_t hist_data_len)= 0;
virtual void serialize(Field *to_field)= 0;
@@ -311,8 +313,9 @@ class Histogram_binary : public Histogram_base
Histogram_type get_type() override { return type; }
- bool parse(MEM_ROOT *mem_root, Field *, Histogram_type type_arg,
- const char *hist_data, size_t hist_data_len) override;
+ bool parse(MEM_ROOT *mem_root, const char*, const char*, Field*,
+ Histogram_type type_arg, const char *hist_data,
+ size_t hist_data_len) override;
void serialize(Field *to_field) override;
void init_for_collection(MEM_ROOT *mem_root, Histogram_type htype_arg,
ulonglong size) override;
1
0