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
943601fb
Commit
943601fb
authored
May 18, 2007
by
kostja@vajra.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge vajra.(none):/opt/local/work/mysql-5.0-runtime
into vajra.(none):/opt/local/work/mysql-5.1-runtime
parents
e4a3189c
1016aa36
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
13 deletions
+64
-13
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+3
-3
mysql-test/r/sp-prelocking.result
mysql-test/r/sp-prelocking.result
+13
-0
mysql-test/r/trigger.result
mysql-test/r/trigger.result
+2
-2
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+3
-3
mysql-test/t/sp-prelocking.test
mysql-test/t/sp-prelocking.test
+31
-0
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+2
-2
sql/sql_base.cc
sql/sql_base.cc
+10
-3
No files found.
mysql-test/r/sp-error.result
View file @
943601fb
...
@@ -1030,7 +1030,7 @@ select bug12329();
...
@@ -1030,7 +1030,7 @@ select bug12329();
bug12329()
bug12329()
101
101
execute stmt1;
execute stmt1;
ERROR
HY000: Table 't2' was not locked with LOCK TABLES
ERROR
42S02: Table 'test.t2' doesn't exist
deallocate prepare stmt1;
deallocate prepare stmt1;
drop function bug12329;
drop function bug12329;
drop table t1, t2;
drop table t1, t2;
...
@@ -1152,12 +1152,12 @@ create trigger t1_ai after insert on t1 for each row insert into t2 values (new.
...
@@ -1152,12 +1152,12 @@ create trigger t1_ai after insert on t1 for each row insert into t2 values (new.
create view v1 as select * from t1;
create view v1 as select * from t1;
drop table t2;
drop table t2;
insert into v1 values (1);
insert into v1 values (1);
ERROR
HY000: Table 't2' was not locked with LOCK TABLES
ERROR
42S02: Table 'test.t2' doesn't exist
drop trigger t1_ai;
drop trigger t1_ai;
create function bug11555_1() returns int return (select max(i) from t2);
create function bug11555_1() returns int return (select max(i) from t2);
create trigger t1_ai after insert on t1 for each row set @a:=bug11555_1();
create trigger t1_ai after insert on t1 for each row set @a:=bug11555_1();
insert into v1 values (2);
insert into v1 values (2);
ERROR
HY000: Table 't2' was not locked with LOCK TABLES
ERROR
42S02: Table 'test.t2' doesn't exist
drop function bug11555_1;
drop function bug11555_1;
drop table t1;
drop table t1;
drop view v1;
drop view v1;
...
...
mysql-test/r/sp-prelocking.result
View file @
943601fb
...
@@ -254,4 +254,17 @@ execute stmt;
...
@@ -254,4 +254,17 @@ execute stmt;
deallocate prepare stmt;
deallocate prepare stmt;
drop function bug19634;
drop function bug19634;
drop table t1, t2, t3;
drop table t1, t2, t3;
drop table if exists bug_27907_logs;
drop table if exists bug_27907_t1;
create table bug_27907_logs (a int);
create table bug_27907_t1 (a int);
create trigger bug_27907_t1_ai after insert on bug_27907_t1
for each row
begin
insert into bug_27907_logs (a) values (1);
end|
drop table bug_27907_logs;
insert into bug_27907_t1(a) values (1);
ERROR 42S02: Table 'test.bug_27907_logs' doesn't exist
drop table bug_27907_t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/r/trigger.result
View file @
943601fb
...
@@ -820,9 +820,9 @@ call p1();
...
@@ -820,9 +820,9 @@ call p1();
drop trigger t1_bi;
drop trigger t1_bi;
create trigger t1_bi after insert on t1 for each row insert into t3 values (new.id);
create trigger t1_bi after insert on t1 for each row insert into t3 values (new.id);
execute stmt1;
execute stmt1;
ERROR
HY000: Table 't3' was not locked with LOCK TABLES
ERROR
42S02: Table 'test.t3' doesn't exist
call p1();
call p1();
ERROR
HY000: Table 't3' was not locked with LOCK TABLES
ERROR
42S02: Table 'test.t3' doesn't exist
deallocate prepare stmt1;
deallocate prepare stmt1;
drop procedure p1;
drop procedure p1;
drop table t1, t2, t3;
drop table t1, t2, t3;
...
...
mysql-test/t/sp-error.test
View file @
943601fb
...
@@ -1458,7 +1458,7 @@ select bug12329();
...
@@ -1458,7 +1458,7 @@ select bug12329();
# Until we implement proper mechanism for invalidation of PS/SP when table
# Until we implement proper mechanism for invalidation of PS/SP when table
# or SP's are changed the following statement will fail with 'Table ... was
# or SP's are changed the following statement will fail with 'Table ... was
# not locked' error (this mechanism should be based on the new TDC).
# not locked' error (this mechanism should be based on the new TDC).
--
error
1100
--
error
ER_NO_SUCH_TABLE
execute
stmt1
;
execute
stmt1
;
deallocate
prepare
stmt1
;
deallocate
prepare
stmt1
;
drop
function
bug12329
;
drop
function
bug12329
;
...
@@ -1643,13 +1643,13 @@ create trigger t1_ai after insert on t1 for each row insert into t2 values (new.
...
@@ -1643,13 +1643,13 @@ create trigger t1_ai after insert on t1 for each row insert into t2 values (new.
create
view
v1
as
select
*
from
t1
;
create
view
v1
as
select
*
from
t1
;
drop
table
t2
;
drop
table
t2
;
# Limitation, the desired error is ER_VIEW_INVALID
# Limitation, the desired error is ER_VIEW_INVALID
--
error
ER_
TABLE_NOT_LOCKED
--
error
ER_
NO_SUCH_TABLE
insert
into
v1
values
(
1
);
insert
into
v1
values
(
1
);
drop
trigger
t1_ai
;
drop
trigger
t1_ai
;
create
function
bug11555_1
()
returns
int
return
(
select
max
(
i
)
from
t2
);
create
function
bug11555_1
()
returns
int
return
(
select
max
(
i
)
from
t2
);
create
trigger
t1_ai
after
insert
on
t1
for
each
row
set
@
a
:=
bug11555_1
();
create
trigger
t1_ai
after
insert
on
t1
for
each
row
set
@
a
:=
bug11555_1
();
# Limitation, the desired error is ER_VIEW_INVALID
# Limitation, the desired error is ER_VIEW_INVALID
--
error
ER_
TABLE_NOT_LOCKED
--
error
ER_
NO_SUCH_TABLE
insert
into
v1
values
(
2
);
insert
into
v1
values
(
2
);
drop
function
bug11555_1
;
drop
function
bug11555_1
;
drop
table
t1
;
drop
table
t1
;
...
...
mysql-test/t/sp-prelocking.test
View file @
943601fb
...
@@ -301,5 +301,36 @@ deallocate prepare stmt;
...
@@ -301,5 +301,36 @@ deallocate prepare stmt;
drop
function
bug19634
;
drop
function
bug19634
;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
#
# Bug #27907 Misleading error message when opening/locking tables
#
--
disable_warnings
drop
table
if
exists
bug_27907_logs
;
drop
table
if
exists
bug_27907_t1
;
--
enable_warnings
create
table
bug_27907_logs
(
a
int
);
create
table
bug_27907_t1
(
a
int
);
delimiter
|
;
create
trigger
bug_27907_t1_ai
after
insert
on
bug_27907_t1
for
each
row
begin
insert
into
bug_27907_logs
(
a
)
values
(
1
);
end
|
delimiter
;
|
drop
table
bug_27907_logs
;
#
# was failing before with error ER_NOT_LOCKED
#
--
error
ER_NO_SUCH_TABLE
insert
into
bug_27907_t1
(
a
)
values
(
1
);
drop
table
bug_27907_t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
mysql-test/t/trigger.test
View file @
943601fb
...
@@ -1000,9 +1000,9 @@ create trigger t1_bi after insert on t1 for each row insert into t3 values (new.
...
@@ -1000,9 +1000,9 @@ create trigger t1_bi after insert on t1 for each row insert into t3 values (new.
# Until we implement proper mechanism for invalidation of PS/SP when table
# Until we implement proper mechanism for invalidation of PS/SP when table
# or SP's are changed these two statements will fail with 'Table ... was
# or SP's are changed these two statements will fail with 'Table ... was
# not locked' error (this mechanism should be based on the new TDC).
# not locked' error (this mechanism should be based on the new TDC).
--
error
1100
#ER_TABLE_NOT_LOCKED
--
error
ER_NO_SUCH_TABLE
execute
stmt1
;
execute
stmt1
;
--
error
1100
#ER_TABLE_NOT_LOCKED
--
error
ER_NO_SUCH_TABLE
call
p1
();
call
p1
();
deallocate
prepare
stmt1
;
deallocate
prepare
stmt1
;
drop
procedure
p1
;
drop
procedure
p1
;
...
...
sql/sql_base.cc
View file @
943601fb
...
@@ -2393,10 +2393,17 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
...
@@ -2393,10 +2393,17 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
VOID
(
pthread_mutex_unlock
(
&
LOCK_open
));
}
}
}
}
if
((
thd
->
locked_tables
)
&&
(
thd
->
locked_tables
->
lock_count
>
0
))
/*
my_error
(
ER_TABLE_NOT_LOCKED
,
MYF
(
0
),
alias
);
No table in the locked tables list. In case of explicit LOCK TABLES
else
this can happen if a user did not include the able into the list.
In case of pre-locked mode locked tables list is generated automatically,
so we may only end up here if the table did not exist when
locked tables list was created.
*/
if
(
thd
->
prelocked_mode
==
PRELOCKED
)
my_error
(
ER_NO_SUCH_TABLE
,
MYF
(
0
),
table_list
->
db
,
table_list
->
alias
);
my_error
(
ER_NO_SUCH_TABLE
,
MYF
(
0
),
table_list
->
db
,
table_list
->
alias
);
else
my_error
(
ER_TABLE_NOT_LOCKED
,
MYF
(
0
),
alias
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
...
...
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