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
1b2d46c8
Commit
1b2d46c8
authored
Apr 24, 2006
by
osku
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
From MySQL:
Updates to innodb.[test|result].
parent
af84ccc3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
0 deletions
+135
-0
mysql-test/innodb.result
mysql-test/innodb.result
+64
-0
mysql-test/innodb.test
mysql-test/innodb.test
+71
-0
No files found.
mysql-test/innodb.result
View file @
1b2d46c8
...
...
@@ -1632,6 +1632,30 @@ t2 CREATE TABLE `t2` (
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
)
ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t2, t1;
flush status;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 0
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 1
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
begin;
delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 2
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
drop table t1;
create table t1 (c char(10), index (c,c)) engine=innodb;
ERROR 42S21: Duplicate column name 'c'
create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
...
...
@@ -3204,6 +3228,46 @@ UPDATE t1 SET field1 = 'other' WHERE field2 = 'somevalu';
ERROR 23000: Upholding foreign key constraints for table 't1', entry 'other-somevalu', key 1 would lead to a duplicate entry
DROP TABLE t2;
DROP TABLE t1;
create table t1 (
c1 bigint not null,
c2 bigint not null,
primary key (c1),
unique key (c2)
)
engine=innodb;
create table t2 (
c1 bigint not null,
primary key (c1)
)
engine=innodb;
alter table t1 add constraint c2_fk foreign key (c2)
references t2(c1) on delete cascade;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) NOT NULL,
`c2` bigint(20) NOT NULL,
PRIMARY KEY (`c1`),
UNIQUE KEY `c2` (`c2`),
CONSTRAINT `c2_fk` FOREIGN KEY (`c2`) REFERENCES `t2` (`c1`) ON DELETE CASCADE
)
ENGINE=InnoDB DEFAULT CHARSET=latin1
alter table t1 drop foreign key c2_fk;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` bigint(20) NOT NULL,
`c2` bigint(20) NOT NULL,
PRIMARY KEY (`c1`),
UNIQUE KEY `c2` (`c2`)
)
ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1(a date) engine=innodb;
create table t2(a date, key(a)) engine=innodb;
insert into t1 values('2005-10-01');
insert into t2 values('2005-10-01');
select * from t1, t2
where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
a a
2005-10-01 2005-10-01
drop table t1, t2;
create table t1 (id int not null, f_id int not null, f int not null,
primary key(f_id, id)) engine=innodb;
create table t2 (id int not null,s_id int not null,s varchar(200),
...
...
mysql-test/innodb.test
View file @
1b2d46c8
...
...
@@ -1133,6 +1133,41 @@ show create table t2;
drop
table
t2
,
t1
;
#
# Let us test binlog_cache_use and binlog_cache_disk_use status vars.
# Actually this test has nothing to do with innodb per se, it just requires
# transactional table.
#
flush
status
;
show
status
like
"binlog_cache_use"
;
show
status
like
"binlog_cache_disk_use"
;
create
table
t1
(
a
int
)
engine
=
innodb
;
# Now we are going to create transaction which is long enough so its
# transaction binlog will be flushed to disk...
let
$
1
=
2000
;
disable_query_log
;
begin
;
while
(
$
1
)
{
eval
insert
into
t1
values
(
$
1
);
dec
$
1
;
}
commit
;
enable_query_log
;
show
status
like
"binlog_cache_use"
;
show
status
like
"binlog_cache_disk_use"
;
# Transaction which should not be flushed to disk and so should not
# increase binlog_cache_disk_use.
begin
;
delete
from
t1
;
commit
;
show
status
like
"binlog_cache_use"
;
show
status
like
"binlog_cache_disk_use"
;
drop
table
t1
;
#
# Bug #6126: Duplicate columns in keys gives misleading error message
#
...
...
@@ -2106,6 +2141,42 @@ UPDATE t1 SET field1 = 'other' WHERE field2 = 'somevalu';
DROP
TABLE
t2
;
DROP
TABLE
t1
;
#
# Bug#18477 - MySQL/InnoDB Ignoring Foreign Keys in ALTER TABLE
#
create
table
t1
(
c1
bigint
not
null
,
c2
bigint
not
null
,
primary
key
(
c1
),
unique
key
(
c2
)
)
engine
=
innodb
;
#
create
table
t2
(
c1
bigint
not
null
,
primary
key
(
c1
)
)
engine
=
innodb
;
#
alter
table
t1
add
constraint
c2_fk
foreign
key
(
c2
)
references
t2
(
c1
)
on
delete
cascade
;
show
create
table
t1
;
#
alter
table
t1
drop
foreign
key
c2_fk
;
show
create
table
t1
;
#
drop
table
t1
,
t2
;
#
# Bug #14360: problem with intervals
#
create
table
t1
(
a
date
)
engine
=
innodb
;
create
table
t2
(
a
date
,
key
(
a
))
engine
=
innodb
;
insert
into
t1
values
(
'2005-10-01'
);
insert
into
t2
values
(
'2005-10-01'
);
select
*
from
t1
,
t2
where
t2
.
a
between
t1
.
a
-
interval
2
day
and
t1
.
a
+
interval
2
day
;
drop
table
t1
,
t2
;
create
table
t1
(
id
int
not
null
,
f_id
int
not
null
,
f
int
not
null
,
primary
key
(
f_id
,
id
))
engine
=
innodb
;
create
table
t2
(
id
int
not
null
,
s_id
int
not
null
,
s
varchar
(
200
),
...
...
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