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
27e61d15
Commit
27e61d15
authored
Jul 22, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after merge fixes 2
parent
aa35efd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
mysql-test/r/variables.result
mysql-test/r/variables.result
+1
-1
mysql-test/r/view.result
mysql-test/r/view.result
+2
-2
mysql-test/t/view.test
mysql-test/t/view.test
+20
-20
No files found.
mysql-test/r/variables.result
View file @
27e61d15
...
@@ -364,7 +364,7 @@ set sql_log_bin=1;
...
@@ -364,7 +364,7 @@ set sql_log_bin=1;
set sql_log_off=1;
set sql_log_off=1;
set sql_log_update=1;
set sql_log_update=1;
Warnings:
Warnings:
Note 131
3
The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
Note 131
4
The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
set sql_low_priority_updates=1;
set sql_low_priority_updates=1;
set sql_max_join_size=200;
set sql_max_join_size=200;
select @@sql_max_join_size,@@max_join_size;
select @@sql_max_join_size,@@max_join_size;
...
...
mysql-test/r/view.result
View file @
27e61d15
...
@@ -761,7 +761,7 @@ set sql_updatable_view_key=LIMIT1;
...
@@ -761,7 +761,7 @@ set sql_updatable_view_key=LIMIT1;
update v1 set x=x+1;
update v1 set x=x+1;
update v2 set x=x+1;
update v2 set x=x+1;
Warnings:
Warnings:
Note 135
3
View being update does not have complete key of underlying table in it
Note 135
4
View being update does not have complete key of underlying table in it
update v1 set x=x+1 limit 1;
update v1 set x=x+1 limit 1;
update v2 set x=x+1 limit 1;
update v2 set x=x+1 limit 1;
ERROR HY000: The target table v2 of the UPDATE is not updatable
ERROR HY000: The target table v2 of the UPDATE is not updatable
...
@@ -769,7 +769,7 @@ set sql_updatable_view_key=NO;
...
@@ -769,7 +769,7 @@ set sql_updatable_view_key=NO;
update v1 set x=x+1 limit 1;
update v1 set x=x+1 limit 1;
update v2 set x=x+1 limit 1;
update v2 set x=x+1 limit 1;
Warnings:
Warnings:
Note 135
3
View being update does not have complete key of underlying table in it
Note 135
4
View being update does not have complete key of underlying table in it
set sql_updatable_view_key=DEFAULT;
set sql_updatable_view_key=DEFAULT;
select * from t1;
select * from t1;
a b c
a b c
...
...
mysql-test/t/view.test
View file @
27e61d15
...
@@ -15,7 +15,7 @@ create view v1 (c,d) as select a,b from t1;
...
@@ -15,7 +15,7 @@ create view v1 (c,d) as select a,b from t1;
create
temporary
table
t1
(
a
int
,
b
int
);
create
temporary
table
t1
(
a
int
,
b
int
);
#view on temporary table
#view on temporary table
--
error
135
0
--
error
135
1
create
view
v1
(
c
)
as
select
b
+
1
from
t1
;
create
view
v1
(
c
)
as
select
b
+
1
from
t1
;
drop
table
t1
;
drop
table
t1
;
...
@@ -23,7 +23,7 @@ create table t1 (a int, b int);
...
@@ -23,7 +23,7 @@ create table t1 (a int, b int);
insert
into
t1
values
(
1
,
2
),
(
1
,
3
),
(
2
,
4
),
(
2
,
5
),
(
3
,
10
);
insert
into
t1
values
(
1
,
2
),
(
1
,
3
),
(
2
,
4
),
(
2
,
5
),
(
3
,
10
);
#view with variable
#view with variable
--
error
13
49
--
error
13
50
create
view
v1
(
c
,
d
)
as
select
a
,
b
+@@
global
.
max_user_connections
from
t1
;
create
view
v1
(
c
,
d
)
as
select
a
,
b
+@@
global
.
max_user_connections
from
t1
;
# simple view
# simple view
...
@@ -38,7 +38,7 @@ select * from t1;
...
@@ -38,7 +38,7 @@ select * from t1;
select
c
from
v1
;
select
c
from
v1
;
show
create
table
v1
;
show
create
table
v1
;
show
create
view
v1
;
show
create
view
v1
;
--
error
134
5
--
error
134
6
show
create
view
t1
;
show
create
view
t1
;
drop
table
t1
;
drop
table
t1
;
...
@@ -131,7 +131,7 @@ show grants for test@localhost;
...
@@ -131,7 +131,7 @@ show grants for test@localhost;
drop
view
v100
;
drop
view
v100
;
#try to drop table with DROP VIEW
#try to drop table with DROP VIEW
--
error
134
5
--
error
134
6
drop
view
t1
;
drop
view
t1
;
#try to drop VIEW with DROP TABLE
#try to drop VIEW with DROP TABLE
...
@@ -265,21 +265,21 @@ select c from mysqltest.v4;
...
@@ -265,21 +265,21 @@ select c from mysqltest.v4;
show
columns
from
mysqltest
.
v1
;
show
columns
from
mysqltest
.
v1
;
show
columns
from
mysqltest
.
v2
;
show
columns
from
mysqltest
.
v2
;
# but explain/show do not
# but explain/show do not
--
error
134
3
--
error
134
4
explain
select
c
from
mysqltest
.
v1
;
explain
select
c
from
mysqltest
.
v1
;
--
error
134
3
--
error
134
4
show
create
table
mysqltest
.
v1
;
show
create
table
mysqltest
.
v1
;
--
error
134
3
--
error
134
4
explain
select
c
from
mysqltest
.
v2
;
explain
select
c
from
mysqltest
.
v2
;
--
error
134
3
--
error
134
4
show
create
table
mysqltest
.
v2
;
show
create
table
mysqltest
.
v2
;
--
error
134
3
--
error
134
4
explain
select
c
from
mysqltest
.
v3
;
explain
select
c
from
mysqltest
.
v3
;
--
error
134
3
--
error
134
4
show
create
table
mysqltest
.
v3
;
show
create
table
mysqltest
.
v3
;
--
error
134
3
--
error
134
4
explain
select
c
from
mysqltest
.
v4
;
explain
select
c
from
mysqltest
.
v4
;
--
error
134
3
--
error
134
4
show
create
table
mysqltest
.
v4
;
show
create
table
mysqltest
.
v4
;
# allow to see one of underlaing table
# allow to see one of underlaing table
...
@@ -292,13 +292,13 @@ show create table mysqltest.v1;
...
@@ -292,13 +292,13 @@ show create table mysqltest.v1;
explain
select
c
from
mysqltest
.
v2
;
explain
select
c
from
mysqltest
.
v2
;
show
create
table
mysqltest
.
v2
;
show
create
table
mysqltest
.
v2
;
# but other EXPLAINs do not
# but other EXPLAINs do not
--
error
134
3
--
error
134
4
explain
select
c
from
mysqltest
.
v3
;
explain
select
c
from
mysqltest
.
v3
;
--
error
134
3
--
error
134
4
show
create
table
mysqltest
.
v3
;
show
create
table
mysqltest
.
v3
;
--
error
134
3
--
error
134
4
explain
select
c
from
mysqltest
.
v4
;
explain
select
c
from
mysqltest
.
v4
;
--
error
134
3
--
error
134
4
show
create
table
mysqltest
.
v4
;
show
create
table
mysqltest
.
v4
;
# allow to see any view in mysqltest database
# allow to see any view in mysqltest database
...
@@ -445,7 +445,7 @@ insert into t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
...
@@ -445,7 +445,7 @@ insert into t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
create
view
v1
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
create
view
v1
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
create
algorithm
=
temptable
view
v2
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
create
algorithm
=
temptable
view
v2
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
# try to update expression
# try to update expression
--
error
134
6
--
error
134
7
update
v1
set
c
=
a
+
c
;
update
v1
set
c
=
a
+
c
;
# try to update VIEW with forced TEMPORARY TABLE algorithm
# try to update VIEW with forced TEMPORARY TABLE algorithm
--
error
1288
--
error
1288
...
@@ -467,7 +467,7 @@ insert into t2 values (10), (20);
...
@@ -467,7 +467,7 @@ insert into t2 values (10), (20);
create
view
v1
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
create
view
v1
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
create
algorithm
=
temptable
view
v2
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
create
algorithm
=
temptable
view
v2
(
a
,
c
)
as
select
a
,
b
+
1
from
t1
;
# try to update expression
# try to update expression
--
error
134
6
--
error
134
7
update
t2
,
v1
set
v1
.
c
=
v1
.
a
+
v1
.
c
where
t2
.
x
=
v1
.
a
;
update
t2
,
v1
set
v1
.
c
=
v1
.
a
+
v1
.
c
where
t2
.
x
=
v1
.
a
;
# try to update VIEW with forced TEMPORARY TABLE algorithm
# try to update VIEW with forced TEMPORARY TABLE algorithm
--
error
1288
--
error
1288
...
@@ -888,10 +888,10 @@ create table t1 (col1 char(5),col2 char(5));
...
@@ -888,10 +888,10 @@ create table t1 (col1 char(5),col2 char(5));
create
view
v1
as
select
*
from
t1
;
create
view
v1
as
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
create
table
t1
(
col1
char
(
5
),
newcol2
char
(
5
));
create
table
t1
(
col1
char
(
5
),
newcol2
char
(
5
));
--
error
135
4
--
error
135
5
insert
into
v1
values
(
'a'
,
'aa'
);
insert
into
v1
values
(
'a'
,
'aa'
);
drop
table
t1
;
drop
table
t1
;
--
error
135
4
--
error
135
5
select
*
from
v1
;
select
*
from
v1
;
drop
view
v1
;
drop
view
v1
;
...
...
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