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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
903c4dcf
Commit
903c4dcf
authored
Oct 27, 2008
by
Sergey Glukhov
Browse files
Options
Browse Files
Download
Plain Diff
5.0-bugteam->5.1-bugteam merge(bug#39040)
parents
8d108cb5
380f1a84
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
5 deletions
+32
-5
mysql-test/r/view.result
mysql-test/r/view.result
+2
-0
mysql-test/t/view.test
mysql-test/t/view.test
+9
-0
sql/sql_view.cc
sql/sql_view.cc
+21
-5
No files found.
mysql-test/r/view.result
View file @
903c4dcf
...
...
@@ -3672,6 +3672,8 @@ DROP VIEW v1;
# -- End of test case for Bug#35193.
CREATE VIEW v1 AS SELECT 1;
DROP VIEW v1;
# -----------------------------------------------------------------
# -- End of 5.0 tests.
# -----------------------------------------------------------------
...
...
mysql-test/t/view.test
View file @
903c4dcf
...
...
@@ -3556,6 +3556,15 @@ DROP VIEW v1;
###########################################################################
#
# Bug#39040: valgrind errors/crash when creating views with binlog logging
# enabled
#
# Bug is visible only when running in valgrind with binary logging.
CREATE
VIEW
v1
AS
SELECT
1
;
DROP
VIEW
v1
;
--
echo
# -----------------------------------------------------------------
--
echo
# -- End of 5.0 tests.
--
echo
# -----------------------------------------------------------------
...
...
sql/sql_view.cc
View file @
903c4dcf
...
...
@@ -816,13 +816,24 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
DBUG_PRINT
(
"info"
,
(
"View: %s"
,
view_query
.
ptr
()));
/* fill structure */
view
->
select_stmt
.
str
=
view_query
.
c_ptr_safe
();
view
->
select_stmt
.
length
=
view_query
.
length
();
view
->
source
=
thd
->
lex
->
create_view_select
;
if
(
!
thd
->
make_lex_string
(
&
view
->
select_stmt
,
view_query
.
ptr
(),
view_query
.
length
(),
false
))
{
my_error
(
ER_OUT_OF_RESOURCES
,
MYF
(
0
));
error
=
-
1
;
goto
err
;
}
view
->
file_version
=
1
;
view
->
calc_md5
(
md5
);
view
->
md5
.
str
=
md5
;
if
(
!
(
view
->
md5
.
str
=
(
char
*
)
thd
->
memdup
(
md5
,
32
)))
{
my_error
(
ER_OUT_OF_RESOURCES
,
MYF
(
0
));
error
=
-
1
;
goto
err
;
}
view
->
md5
.
length
=
32
;
can_be_merged
=
lex
->
can_be_merged
();
if
(
lex
->
create_view_algorithm
==
VIEW_ALGORITHM_MERGE
&&
...
...
@@ -949,8 +960,13 @@ loop_out:
lex_string_set
(
&
view
->
view_connection_cl_name
,
view
->
view_creation_ctx
->
get_connection_cl
()
->
name
);
view
->
view_body_utf8
.
str
=
is_query
.
c_ptr_safe
();
view
->
view_body_utf8
.
length
=
is_query
.
length
();
if
(
!
thd
->
make_lex_string
(
&
view
->
view_body_utf8
,
is_query
.
ptr
(),
is_query
.
length
(),
false
))
{
my_error
(
ER_OUT_OF_RESOURCES
,
MYF
(
0
));
error
=
-
1
;
goto
err
;
}
/*
Check that table of main select do not used in subqueries.
...
...
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