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 @@ @@ -9,7 +9,7 @@
explain explain
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; 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 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 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; flush status;
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
count(*) count(*)
...@@ -12,7 +14,7 @@ ...@@ -12,7 +14,7 @@
Handler_read_key 1 Handler_read_key 1
Handler_read_last 0 Handler_read_last 0
-Handler_read_next 1 -Handler_read_next 1
+Handler_read_next 5 +Handler_read_next 6
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0 Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
...@@ -93,7 +95,7 @@ ...@@ -93,7 +95,7 @@
where l_shipdate='1992-07-01' and l_orderkey=130; where l_shipdate='1992-07-01' and l_orderkey=130;
id select_type table type possible_keys key key_len ref rows Extra 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 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; flush status;
select max(l_linenumber) from lineitem select max(l_linenumber) from lineitem
where l_shipdate='1992-07-01' and l_orderkey=130; where l_shipdate='1992-07-01' and l_orderkey=130;
...@@ -102,7 +104,7 @@ ...@@ -102,7 +104,7 @@
Handler_read_key 1 Handler_read_key 1
Handler_read_last 0 Handler_read_last 0
-Handler_read_next 0 -Handler_read_next 0
+Handler_read_next 5 +Handler_read_next 6
Handler_read_prev 0 Handler_read_prev 0
Handler_read_retry 0 Handler_read_retry 0
Handler_read_rnd 0 Handler_read_rnd 0
......
...@@ -26,12 +26,12 @@ Handler_read_rnd 0 ...@@ -26,12 +26,12 @@ Handler_read_rnd 0
Handler_read_rnd_deleted 0 Handler_read_rnd_deleted 0
Handler_read_rnd_next 0 Handler_read_rnd_next 0
explain 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'; 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 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; 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'; where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
count(*) count(*)
1 1
......
...@@ -17,6 +17,7 @@ use dbt3_s001; ...@@ -17,6 +17,7 @@ use dbt3_s001;
--disable_result_log --disable_result_log
--disable_warnings --disable_warnings
--source include/dbt3_s001.inc --source include/dbt3_s001.inc
ANALYZE TABLE lineitem PERSISTENT FOR COLUMNS() INDEXES();
--enable_warnings --enable_warnings
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
...@@ -28,10 +29,10 @@ select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01'; ...@@ -28,10 +29,10 @@ select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
show status like 'handler_read%'; show status like 'handler_read%';
explain 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'; where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
flush status; 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'; where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
show status like 'handler_read%'; show status like 'handler_read%';
......
...@@ -314,7 +314,8 @@ class Static_binary_string : public Sql_alloc ...@@ -314,7 +314,8 @@ class Static_binary_string : public Sql_alloc
} }
void q_append(const char *data, size_t data_len) 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); DBUG_ASSERT(str_length <= UINT_MAX32 - data_len);
str_length += (uint)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