1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-31005: Make working cursor-protocol

Updated tests: cases with bugs or which cannot be run
with the cursor-protocol were excluded with
"--disable_cursor_protocol"/"--enable_cursor_protocol"

Fix for v.10.5
This commit is contained in:
Lena Startseva
2024-05-23 08:54:14 +07:00
parent ab569524dc
commit 0a5e4a0191
366 changed files with 1799 additions and 30 deletions

View File

@@ -18,7 +18,9 @@ select plugin_status from information_schema.plugins where plugin_name='feedback
# so lets get back to it if it ever happens.
# Lets say the plugin was used X times before this SELECT
--disable_cursor_protocol
SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used';
--enable_cursor_protocol
# Now $feedback_used == X+1, and 'FEEDBACK used' is also X+1. And variable_value is increased again when we run the next SELECT
SELECT variable_value = @feedback_used + 1 as 'MUST BE 1' FROM information_schema.feedback where variable_name = 'FEEDBACK used';

View File

@@ -4,10 +4,12 @@ set @save_query_cache_size=@@global.query_cache_size;
# test that hits are correctly incremented
reset query cache;
--disable_cursor_protocol
--disable_ps2_protocol
select * from t1;
select * from t1;
--enable_ps2_protocol
--enable_cursor_protocol
select hits, statement_text from information_schema.query_cache_info;
drop table t1;

View File

@@ -9,11 +9,14 @@ set global query_cache_size=1355776;
create table t1 (a int not null);
insert into t1 values (1),(2),(3);
--disable_cursor_protocol
--disable_ps2_protocol
select * from t1;
--enable_ps2_protocol
--enable_cursor_protocol
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
--disable_cursor_protocol
select @@time_zone into @time_zone;
select @@default_week_format into @default_week_format;
select @@character_set_client into @character_set_client;
@@ -32,6 +35,7 @@ select * from t1;
--enable_ps2_protocol
--enable_result_log
set time_zone= @time_zone, default_week_format= @default_week_format, character_set_client= @character_set_client,character_set_results= @character_set_results, sql_mode= @sql_mode, div_precision_increment= @div_precision_increment, lc_time_names= @lc_time_names, autocommit= @autocommit, group_concat_max_len= @group_concat_max_len, max_sort_length= @max_sort_length;
--enable_cursor_protocol
--sorted_result
--replace_column 5 # 20 # 24 #