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
1410ac22
Commit
1410ac22
authored
Sep 02, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bug handling in views (BUG#5276)
parent
36667b6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
2 deletions
+20
-2
mysql-test/r/view.result
mysql-test/r/view.result
+7
-0
mysql-test/t/view.test
mysql-test/t/view.test
+11
-0
sql/sql_base.cc
sql/sql_base.cc
+2
-2
No files found.
mysql-test/r/view.result
View file @
1410ac22
...
...
@@ -1246,3 +1246,10 @@ select * from v1;
cast(1 as char(3))
1
drop view v1;
create view v1 as select 'a',1;
create view v2 as select * from v1 union all select * from v1;
create view v3 as select * from v2 where 1 = (select `1` from v2);
create view v4 as select * from v3;
select * from v4;
ERROR 21000: Subquery returns more than 1 row
drop view v4, v3, v2, v1;
mysql-test/t/view.test
View file @
1410ac22
...
...
@@ -1196,3 +1196,14 @@ create view v1 as select cast(1 as char(3));
show create view v1;
select * from v1;
drop view v1;
#
# bug handlimg from VIEWs
#
create view v1 as select 'a',1;
create view v2 as select * from v1 union all select * from v1;
create view v3 as select * from v2 where 1 = (select `
1
`
from
v2
);
create
view
v4
as
select
*
from
v3
;
--
error
1242
select
*
from
v4
;
drop
view
v4
,
v3
,
v2
,
v1
;
sql/sql_base.cc
View file @
1410ac22
...
...
@@ -1761,9 +1761,9 @@ int open_and_lock_tables(THD *thd, TABLE_LIST *tables)
{
DBUG_ENTER
(
"open_and_lock_tables"
);
uint
counter
;
if
(
open_tables
(
thd
,
tables
,
&
counter
)
||
lock_tables
(
thd
,
tables
,
counter
))
if
(
open_tables
(
thd
,
tables
,
&
counter
)
||
lock_tables
(
thd
,
tables
,
counter
)
||
mysql_handle_derived
(
thd
->
lex
))
DBUG_RETURN
(
thd
->
net
.
report_error
?
-
1
:
1
);
/* purecov: inspected */
DBUG_RETURN
(
mysql_handle_derived
(
thd
->
lex
));
}
...
...
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