Commit 03357ded authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.4 into 10.5

parents 066773e2 1fddccf6
Subproject commit 0cdc1656a70c52103b4329debf9ed02ccacfb3c2
Subproject commit 62427520a5ba20e42fe51f5045062a7a9cadb466
--- innodb_ext_key.result
+++ innodb_ext_key,off.result
@@ -9,7 +9,7 @@
explain
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 8 const,const 1 Using index
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
flush status;
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
count(*)
......@@ -12,7 +14,7 @@
Handler_read_key 1
Handler_read_last 0
-Handler_read_next 1
+Handler_read_next 5
+Handler_read_next 6
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
......@@ -93,7 +95,7 @@
where l_shipdate='1992-07-01' and l_orderkey=130;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
+1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
flush status;
select max(l_linenumber) from lineitem
where l_shipdate='1992-07-01' and l_orderkey=130;
......@@ -102,7 +104,7 @@
Handler_read_key 1
Handler_read_last 0
-Handler_read_next 0
+Handler_read_next 5
+Handler_read_next 6
Handler_read_prev 0
Handler_read_retry 0
Handler_read_rnd 0
......
......@@ -26,12 +26,12 @@ Handler_read_rnd 0
Handler_read_rnd_deleted 0
Handler_read_rnd_next 0
explain
select count(*) from lineitem
select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE lineitem const PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 8 const,const 1
1 SIMPLE lineitem const PRIMARY PRIMARY 8 const,const 1
flush status;
select count(*) from lineitem
select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
count(*)
1
......
......@@ -17,6 +17,7 @@ use dbt3_s001;
--disable_result_log
--disable_warnings
--source include/dbt3_s001.inc
ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES();
--enable_warnings
--enable_result_log
--enable_query_log
......@@ -28,10 +29,10 @@ select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
show status like 'handler_read%';
explain
select count(*) from lineitem
select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
flush status;
select count(*) from lineitem
select count(*) from lineitem use index(primary)
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
show status like 'handler_read%';
......
......@@ -314,7 +314,8 @@ class Static_binary_string : public Sql_alloc
}
void q_append(const char *data, size_t data_len)
{
memcpy(Ptr + str_length, data, data_len);
if (data_len)
memcpy(Ptr + str_length, data, data_len);
DBUG_ASSERT(str_length <= UINT_MAX32 - data_len);
str_length += (uint)data_len;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment