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
f4cf4cbd
Commit
f4cf4cbd
authored
Jul 19, 2007
by
kostja@bodhi.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bodhi.(none):/opt/local/work/mysql-5.0-runtime
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
parents
0d027edd
198b97a6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
118 additions
and
3 deletions
+118
-3
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+1
-1
mysql-test/r/sp-prelocking.result
mysql-test/r/sp-prelocking.result
+22
-0
mysql-test/r/trigger.result
mysql-test/r/trigger.result
+28
-0
mysql-test/t/create.test
mysql-test/t/create.test
+19
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+1
-1
mysql-test/t/sp-prelocking.test
mysql-test/t/sp-prelocking.test
+23
-0
mysql-test/t/trigger.test
mysql-test/t/trigger.test
+23
-0
sql/sql_class.h
sql/sql_class.h
+1
-1
No files found.
mysql-test/r/innodb.result
View file @
f4cf4cbd
...
...
@@ -1640,7 +1640,7 @@ t2 CREATE TABLE `t2` (
)
ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t2;
create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
ERROR
HY000: Can't create table 'test.t2' (errno: 150)
ERROR
42000: Incorrect foreign key definition for 't1_id_fk': Key reference and table reference don't match
create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
show create table t2;
Table Create Table
...
...
mysql-test/r/sp-prelocking.result
View file @
f4cf4cbd
...
...
@@ -267,4 +267,26 @@ 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;
Bug#22427 create table if not exists + stored function results in
inconsistent behavior
Add a test case, the bug itself was fixed by the patch for
Bug#20662
drop table if exists t1;
drop function if exists f_bug22427;
create table t1 (i int);
insert into t1 values (1);
create function f_bug22427() returns int return (select max(i) from t1);
select f_bug22427();
f_bug22427()
1
create table if not exists t1 select f_bug22427() as i;
Warnings:
Note 1050 Table 't1' already exists
create table t1 select f_bug22427() as i;
ERROR 42S01: Table 't1' already exists
drop table t1;
drop function f_bug22427;
End of 5.0 tests
mysql-test/r/trigger.result
View file @
f4cf4cbd
...
...
@@ -1933,6 +1933,34 @@ Before UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi
After UPDATE, new=multi-UPDATE, SET for t2, but the trigger is fired, old=multi-UPDATE
drop view v1;
drop table t1, t2, t1_op_log;
Bug#27248 Triggers: error if insert affects temporary table
The bug was fixed by the fix for Bug#26141
drop table if exists t1;
drop temporary table if exists t2;
create table t1 (s1 int);
create temporary table t2 (s1 int);
create trigger t1_bi before insert on t1 for each row insert into t2 values (0);
create trigger t1_bd before delete on t1 for each row delete from t2;
insert into t1 values (0);
insert into t1 values (0);
select * from t1;
s1
0
0
select * from t2;
s1
0
0
delete from t1;
select * from t1;
s1
select * from t2;
s1
drop table t1;
drop temporary table t2;
End of 5.0 tests
drop table if exists table_25411_a;
drop table if exists table_25411_b;
...
...
mysql-test/t/create.test
View file @
f4cf4cbd
...
...
@@ -1122,6 +1122,25 @@ show create table t1;
drop
table
t1
;
--
echo
--
echo
Bug
#26104 Bug on foreign key class constructor
--
echo
--
echo
Check
that
ref_columns
is
initalized
correctly
in
the
constructor
--
echo
and
semantic
checks
in
mysql_prepare_table
work
.
--
echo
--
echo
We
do
not
need
a
storage
engine
that
supports
foreign
keys
--
echo
for
this
test
,
as
the
checks
are
purely
syntax
-
based
,
and
the
--
echo
syntax
is
supported
for
all
engines
.
--
echo
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
--
enable_warnings
create
table
t1
(
a
int
not
null
,
b
int
not
null
,
primary
key
(
a
,
b
));
--
error
ER_WRONG_FK_DEF
create
table
t2
(
a
int
not
null
,
b
int
not
null
,
c
int
not
null
,
primary
key
(
a
),
foreign
key
fk_bug26104
(
b
,
c
)
references
t1
(
a
));
drop
table
t1
;
--
echo
End
of
5.0
tests
...
...
mysql-test/t/innodb.test
View file @
f4cf4cbd
...
...
@@ -1178,7 +1178,7 @@ drop table t2;
# Clean up filename -- embedded server reports whole path without .frm,
# regular server reports relative path with .frm (argh!)
--
replace_result
\\
/
$MYSQL_TEST_DIR
.
/
var
/
master
-
data
/
/
t2
.
frm
t2
--
error
1005
--
error
ER_WRONG_FK_DEF
create
table
t2
(
id
int
(
11
)
not
null
,
id2
int
(
11
)
not
null
,
constraint
t1_id_fk
foreign
key
(
id2
,
id
)
references
t1
(
id
))
engine
=
innodb
;
# bug#3749
...
...
mysql-test/t/sp-prelocking.test
View file @
f4cf4cbd
...
...
@@ -333,4 +333,27 @@ insert into bug_27907_t1(a) values (1);
drop
table
bug_27907_t1
;
--
echo
--
echo
Bug
#22427 create table if not exists + stored function results in
--
echo
inconsistent
behavior
--
echo
--
echo
Add
a
test
case
,
the
bug
itself
was
fixed
by
the
patch
for
--
echo
Bug
#20662
--
echo
--
disable_warnings
drop
table
if
exists
t1
;
drop
function
if
exists
f_bug22427
;
--
enable_warnings
create
table
t1
(
i
int
);
insert
into
t1
values
(
1
);
create
function
f_bug22427
()
returns
int
return
(
select
max
(
i
)
from
t1
);
select
f_bug22427
();
# Until this bug was fixed, the following emitted error
# ERROR 1213: Deadlock found when trying to get lock
create
table
if
not
exists
t1
select
f_bug22427
()
as
i
;
--
error
ER_TABLE_EXISTS_ERROR
create
table
t1
select
f_bug22427
()
as
i
;
drop
table
t1
;
drop
function
f_bug22427
;
--
echo
End
of
5.0
tests
mysql-test/t/trigger.test
View file @
f4cf4cbd
...
...
@@ -2194,6 +2194,29 @@ drop table t1, t2, t1_op_log;
#
# TODO: test LOAD DATA INFILE
#
--
echo
--
echo
Bug
#27248 Triggers: error if insert affects temporary table
--
echo
--
echo
The
bug
was
fixed
by
the
fix
for
Bug
#26141
--
echo
--
disable_warnings
drop
table
if
exists
t1
;
drop
temporary
table
if
exists
t2
;
--
enable_warnings
create
table
t1
(
s1
int
);
create
temporary
table
t2
(
s1
int
);
create
trigger
t1_bi
before
insert
on
t1
for
each
row
insert
into
t2
values
(
0
);
create
trigger
t1_bd
before
delete
on
t1
for
each
row
delete
from
t2
;
insert
into
t1
values
(
0
);
insert
into
t1
values
(
0
);
select
*
from
t1
;
select
*
from
t2
;
delete
from
t1
;
select
*
from
t1
;
select
*
from
t2
;
drop
table
t1
;
drop
temporary
table
t2
;
--
echo
End
of
5.0
tests
#
...
...
sql/sql_class.h
View file @
f4cf4cbd
...
...
@@ -177,7 +177,7 @@ class Foreign_key: public Key {
Table_ident
*
table
,
List
<
Key_part_spec
>
&
ref_cols
,
uint
delete_opt_arg
,
uint
update_opt_arg
,
uint
match_opt_arg
)
:
Key
(
FOREIGN_KEY
,
name_arg
,
&
default_key_create_info
,
0
,
cols
),
ref_table
(
table
),
ref_columns
(
cols
),
ref_table
(
table
),
ref_columns
(
ref_
cols
),
delete_opt
(
delete_opt_arg
),
update_opt
(
update_opt_arg
),
match_opt
(
match_opt_arg
)
{}
...
...
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