mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge remote-tracking branch 'refs/remotes/github/10.1' into 10.1
This commit is contained in:
@@ -293,3 +293,13 @@ analyze select * into outfile '../../tmp/data1.tmp' from t1;
|
||||
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 4 4 100.00 100.00
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-7024: Assertion `! is_set()' failed in
|
||||
# Diagnostics_area::set_eof_status on executing ANALYZE SELECT via PS
|
||||
#
|
||||
create table t1(a int);
|
||||
prepare stmt from "analyze select * from t1";
|
||||
execute stmt;
|
||||
id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||
drop table t1;
|
||||
|
@@ -7880,3 +7880,60 @@ DECLARE f2 VARCHAR(64) COLLATE latin1_german2_ci;
|
||||
RETURN 'str';
|
||||
END|
|
||||
DROP FUNCTION f|
|
||||
#
|
||||
# MDEV-7023: Error 2027: Malformed packet and assertion
|
||||
# `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_INT24 ||
|
||||
#field_types[field_pos] == MYSQL_TYPE_LONG' failure in
|
||||
#Protocol_text::store_long
|
||||
#
|
||||
create table t1 (i int);
|
||||
create table t2 (i int);
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze insert into t1 values (1);
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze insert t1 select * from t2;
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze delete from t1;
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze delete t1 from t1,t2;
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze update t1 set i=1;
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze update t1,t2 set i=1;
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze replace t1 set i=1;
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze replace t1 select * from t2;
|
||||
return 1;
|
||||
end |
|
||||
ERROR 0A000: Not allowed to return a result set from a function
|
||||
drop table t1,t2;
|
||||
|
@@ -233,3 +233,14 @@ analyze select * into outfile '../../tmp/data1.tmp' from t1;
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/data1.tmp
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-7024: Assertion `! is_set()' failed in
|
||||
--echo # Diagnostics_area::set_eof_status on executing ANALYZE SELECT via PS
|
||||
--echo #
|
||||
|
||||
create table t1(a int);
|
||||
prepare stmt from "analyze select * from t1";
|
||||
execute stmt;
|
||||
drop table t1;
|
||||
|
@@ -9324,3 +9324,64 @@ BEGIN
|
||||
END|
|
||||
DROP FUNCTION f|
|
||||
DELIMITER ;|
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-7023: Error 2027: Malformed packet and assertion
|
||||
--echo # `field_types == 0 || field_types[field_pos] == MYSQL_TYPE_INT24 ||
|
||||
--echo #field_types[field_pos] == MYSQL_TYPE_LONG' failure in
|
||||
--echo #Protocol_text::store_long
|
||||
--echo #
|
||||
create table t1 (i int);
|
||||
create table t2 (i int);
|
||||
--delimiter |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze insert into t1 values (1);
|
||||
return 1;
|
||||
end |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze insert t1 select * from t2;
|
||||
return 1;
|
||||
end |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze delete from t1;
|
||||
return 1;
|
||||
end |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze delete t1 from t1,t2;
|
||||
return 1;
|
||||
end |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze update t1 set i=1;
|
||||
return 1;
|
||||
end |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze update t1,t2 set i=1;
|
||||
return 1;
|
||||
end |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze replace t1 set i=1;
|
||||
return 1;
|
||||
end |
|
||||
--error ER_SP_NO_RETSET
|
||||
create function f() returns int
|
||||
begin
|
||||
analyze replace t1 select * from t2;
|
||||
return 1;
|
||||
end |
|
||||
--delimiter ;
|
||||
|
||||
drop table t1,t2;
|
||||
|
@@ -341,11 +341,13 @@ sp_get_flags_for_command(LEX *lex)
|
||||
case SQLCOM_DELETE_MULTI:
|
||||
{
|
||||
/*
|
||||
DELETE normally doesn't return resultset, but there are two exceptions:
|
||||
DELETE normally doesn't return resultset, but there are 3 exceptions:
|
||||
- DELETE ... RETURNING
|
||||
- EXPLAIN DELETE ...
|
||||
- ANALYZE DELETE ...
|
||||
*/
|
||||
if (lex->select_lex.item_list.is_empty() && !lex->describe)
|
||||
if (lex->select_lex.item_list.is_empty() &&
|
||||
!lex->describe && !lex->analyze_stmt)
|
||||
flags= 0;
|
||||
else
|
||||
flags= sp_head::MULTI_RESULTS;
|
||||
@@ -358,7 +360,7 @@ sp_get_flags_for_command(LEX *lex)
|
||||
case SQLCOM_REPLACE_SELECT:
|
||||
case SQLCOM_INSERT_SELECT:
|
||||
{
|
||||
if (!lex->describe)
|
||||
if (!lex->describe && !lex->analyze_stmt)
|
||||
flags= 0;
|
||||
else
|
||||
flags= sp_head::MULTI_RESULTS;
|
||||
|
@@ -4116,7 +4116,7 @@ public:
|
||||
virtual bool check_simple_select() const { return FALSE; }
|
||||
void abort_result_set();
|
||||
virtual void cleanup();
|
||||
bool is_result_interceptor() { return true; }
|
||||
bool is_result_interceptor() { return false; }
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user