Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6a3fee21
Commit
6a3fee21
authored
Feb 01, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'refs/remotes/github/10.1' into 10.1
parents
b2ceedc9
edf34f38
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
145 additions
and
4 deletions
+145
-4
mysql-test/r/analyze_stmt.result
mysql-test/r/analyze_stmt.result
+10
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+57
-0
mysql-test/t/analyze_stmt.test
mysql-test/t/analyze_stmt.test
+11
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+61
-0
sql/sp_head.cc
sql/sp_head.cc
+5
-3
sql/sql_class.h
sql/sql_class.h
+1
-1
No files found.
mysql-test/r/analyze_stmt.result
View file @
6a3fee21
...
...
@@ -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;
mysql-test/r/sp.result
View file @
6a3fee21
...
...
@@ -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;
mysql-test/t/analyze_stmt.test
View file @
6a3fee21
...
...
@@ -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
;
mysql-test/t/sp.test
View file @
6a3fee21
...
...
@@ -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
;
sql/sp_head.cc
View file @
6a3fee21
...
...
@@ -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
;
...
...
sql/sql_class.h
View file @
6a3fee21
...
...
@@ -4116,7 +4116,7 @@ class select_send :public select_result {
virtual
bool
check_simple_select
()
const
{
return
FALSE
;
}
void
abort_result_set
();
virtual
void
cleanup
();
bool
is_result_interceptor
()
{
return
tru
e
;
}
bool
is_result_interceptor
()
{
return
fals
e
;
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment