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
4f122ed9
Commit
4f122ed9
authored
Sep 08, 2006
by
mikael/pappa@dator5.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge dator5.(none):/home/pappa/clean-mysql-5.1
into dator5.(none):/home/pappa/bug21210
parents
1ac47c95
5c43cc86
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
149 additions
and
138 deletions
+149
-138
mysql-test/r/partition.result
mysql-test/r/partition.result
+0
-37
mysql-test/r/partition_error.result
mysql-test/r/partition_error.result
+0
-24
mysql-test/r/partition_innodb.result
mysql-test/r/partition_innodb.result
+71
-0
mysql-test/r/partition_range.result
mysql-test/r/partition_range.result
+0
-10
mysql-test/t/partition-master.opt
mysql-test/t/partition-master.opt
+1
-0
mysql-test/t/partition.test
mysql-test/t/partition.test
+0
-37
mysql-test/t/partition_error.test
mysql-test/t/partition_error.test
+0
-17
mysql-test/t/partition_innodb.test
mysql-test/t/partition_innodb.test
+68
-0
mysql-test/t/partition_range.test
mysql-test/t/partition_range.test
+0
-12
sql/ha_partition.cc
sql/ha_partition.cc
+9
-1
No files found.
mysql-test/r/partition.result
View file @
4f122ed9
...
@@ -21,32 +21,6 @@ partition by key(a)
...
@@ -21,32 +21,6 @@ partition by key(a)
partitions 1e+300;
partitions 1e+300;
ERROR 42000: Only normal integers allowed as number here near '1e+300' at line 3
ERROR 42000: Only normal integers allowed as number here near '1e+300' at line 3
create table t1 (a int)
create table t1 (a int)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (0), (1), (2), (3);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 4 4096 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int auto_increment primary key)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 4 4096 16384 0 0 0 5 NULL NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 8 2048 16384 0 0 0 9 NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
partition by key (a)
partition by key (a)
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
ERROR 42000: Incorrect table name 'part-data'
ERROR 42000: Incorrect table name 'part-data'
...
@@ -1042,17 +1016,6 @@ set session sql_mode='';
...
@@ -1042,17 +1016,6 @@ set session sql_mode='';
drop table t1;
drop table t1;
create table t1 (a int)
create table t1 (a int)
partition by key (a)
partition by key (a)
(partition p1 engine = innodb);
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
drop table t1;
create table t1 (a int)
partition by key (a)
(partition p0 engine = MERGE);
(partition p0 engine = MERGE);
ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables
ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables
create table t1 (a varchar(1))
create table t1 (a varchar(1))
...
...
mysql-test/r/partition_error.result
View file @
4f122ed9
drop table if exists t1;
drop table if exists t1;
create table t1 (a int)
engine = x
partition by key (a);
Warnings:
Error 1286 Unknown table engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) */
drop table t1;
create table t1 (a int)
engine = innodb
partition by list (a)
(partition p0 values in (0));
alter table t1 engine = x;
Warnings:
Error 1286 Unknown table engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB) */
drop table t1;
partition by list (a)
partition by list (a)
partitions 3
partitions 3
(partition x1 values in (1,2,9,4) tablespace ts1,
(partition x1 values in (1,2,9,4) tablespace ts1,
...
...
mysql-test/r/partition_innodb.result
View file @
4f122ed9
...
@@ -3,3 +3,74 @@ show table status like 't1';
...
@@ -3,3 +3,74 @@ show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
drop table t1;
create table t1 (a int)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (0), (1), (2), (3);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 4 4096 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int auto_increment primary key)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 2 8192 16384 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 4 4096 16384 0 0 0 5 NULL NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 InnoDB 10 Compact 8 2048 16384 0 0 0 9 NULL NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
partition by key (a)
(partition p1 engine = innodb);
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
alter table t1 rebuild partition p1;
drop table t1;
create table t1 (a date)
engine = innodb
partition by range (year(a))
(partition p0 values less than (2006),
partition p1 values less than (2007));
explain partitions select * from t1
where a between '2006-01-01' and '2007-06-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 2 Using where
drop table t1;
create table t1 (a int)
engine = x
partition by key (a);
Warnings:
Error 1286 Unknown table engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) */
drop table t1;
create table t1 (a int)
engine = innodb
partition by list (a)
(partition p0 values in (0));
alter table t1 engine = x;
Warnings:
Error 1286 Unknown table engine 'x'
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB) */
drop table t1;
mysql-test/r/partition_range.result
View file @
4f122ed9
drop table if exists t1;
drop table if exists t1;
create table t1 (a date)
engine = innodb
partition by range (year(a))
(partition p0 values less than (2006),
partition p1 values less than (2007));
explain partitions select * from t1
where a between '2006-01-01' and '2007-06-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1 ALL NULL NULL NULL NULL 2 Using where
drop table t1;
create table t1 (a int unsigned)
create table t1 (a int unsigned)
partition by range (a)
partition by range (a)
(partition pnull values less than (0),
(partition pnull values less than (0),
...
...
mysql-test/t/partition-master.opt
0 → 100644
View file @
4f122ed9
--symbolic-links=1
mysql-test/t/partition.test
View file @
4f122ed9
...
@@ -42,27 +42,6 @@ create table t1 (a int)
...
@@ -42,27 +42,6 @@ create table t1 (a int)
partition
by
key
(
a
)
partition
by
key
(
a
)
partitions
1
e
+
300
;
partitions
1
e
+
300
;
#
# Bug 21173: SHOW TABLE STATUS crashes server in InnoDB
#
create
table
t1
(
a
int
)
engine
=
innodb
partition
by
key
(
a
);
show
table
status
;
insert
into
t1
values
(
0
),
(
1
),
(
2
),
(
3
);
show
table
status
;
drop
table
t1
;
create
table
t1
(
a
int
auto_increment
primary
key
)
engine
=
innodb
partition
by
key
(
a
);
show
table
status
;
insert
into
t1
values
(
NULL
),
(
NULL
),
(
NULL
),
(
NULL
);
show
table
status
;
insert
into
t1
values
(
NULL
),
(
NULL
),
(
NULL
),
(
NULL
);
show
table
status
;
drop
table
t1
;
#
#
# Bug 21350: Data Directory problems
# Bug 21350: Data Directory problems
#
#
...
@@ -1193,22 +1172,6 @@ show create table t1;
...
@@ -1193,22 +1172,6 @@ show create table t1;
set
session
sql_mode
=
''
;
set
session
sql_mode
=
''
;
drop
table
t1
;
drop
table
t1
;
#
# BUG 19122 Crash after ALTER TABLE t1 REBUILD PARTITION p1
#
create
table
t1
(
a
int
)
partition
by
key
(
a
)
(
partition
p1
engine
=
innodb
);
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
drop
table
t1
;
#
#
# BUG 19304 Partitions: MERGE handler not allowed in partitioned tables
# BUG 19304 Partitions: MERGE handler not allowed in partitioned tables
#
#
...
...
mysql-test/t/partition_error.test
View file @
4f122ed9
...
@@ -8,23 +8,6 @@
...
@@ -8,23 +8,6 @@
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
--
enable_warnings
--
enable_warnings
#
# Bug 20397: Partitions: Crash when using non-existing engine
#
create
table
t1
(
a
int
)
engine
=
x
partition
by
key
(
a
);
show
create
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
)
engine
=
innodb
partition
by
list
(
a
)
(
partition
p0
values
in
(
0
));
alter
table
t1
engine
=
x
;
show
create
table
t1
;
drop
table
t1
;
#
#
# Partition by key stand-alone error
# Partition by key stand-alone error
...
...
mysql-test/t/partition_innodb.test
View file @
4f122ed9
...
@@ -8,3 +8,71 @@ create table t1 (a int) engine=innodb partition by hash(a) ;
...
@@ -8,3 +8,71 @@ create table t1 (a int) engine=innodb partition by hash(a) ;
show
table
status
like
't1'
;
show
table
status
like
't1'
;
drop
table
t1
;
drop
table
t1
;
#
# Bug 21173: SHOW TABLE STATUS crashes server in InnoDB
#
create
table
t1
(
a
int
)
engine
=
innodb
partition
by
key
(
a
);
show
table
status
;
insert
into
t1
values
(
0
),
(
1
),
(
2
),
(
3
);
show
table
status
;
drop
table
t1
;
create
table
t1
(
a
int
auto_increment
primary
key
)
engine
=
innodb
partition
by
key
(
a
);
show
table
status
;
insert
into
t1
values
(
NULL
),
(
NULL
),
(
NULL
),
(
NULL
);
show
table
status
;
insert
into
t1
values
(
NULL
),
(
NULL
),
(
NULL
),
(
NULL
);
show
table
status
;
drop
table
t1
;
#
# BUG 19122 Crash after ALTER TABLE t1 REBUILD PARTITION p1
#
create
table
t1
(
a
int
)
partition
by
key
(
a
)
(
partition
p1
engine
=
innodb
);
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
alter
table
t1
rebuild
partition
p1
;
drop
table
t1
;
#
# Bug 21339: Crash in Explain Partitions
#
create
table
t1
(
a
date
)
engine
=
innodb
partition
by
range
(
year
(
a
))
(
partition
p0
values
less
than
(
2006
),
partition
p1
values
less
than
(
2007
));
explain
partitions
select
*
from
t1
where
a
between
'2006-01-01'
and
'2007-06-01'
;
drop
table
t1
;
#
# Bug 20397: Partitions: Crash when using non-existing engine
#
create
table
t1
(
a
int
)
engine
=
x
partition
by
key
(
a
);
show
create
table
t1
;
drop
table
t1
;
create
table
t1
(
a
int
)
engine
=
innodb
partition
by
list
(
a
)
(
partition
p0
values
in
(
0
));
alter
table
t1
engine
=
x
;
show
create
table
t1
;
drop
table
t1
;
mysql-test/t/partition_range.test
View file @
4f122ed9
...
@@ -9,18 +9,6 @@
...
@@ -9,18 +9,6 @@
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
--
enable_warnings
--
enable_warnings
#
# Bug 21339: Crash in Explain Partitions
#
create
table
t1
(
a
date
)
engine
=
innodb
partition
by
range
(
year
(
a
))
(
partition
p0
values
less
than
(
2006
),
partition
p1
values
less
than
(
2007
));
explain
partitions
select
*
from
t1
where
a
between
'2006-01-01'
and
'2007-06-01'
;
drop
table
t1
;
#
#
# More checks for partition pruning
# More checks for partition pruning
#
#
...
...
sql/ha_partition.cc
View file @
4f122ed9
...
@@ -1360,6 +1360,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
...
@@ -1360,6 +1360,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
i
=
0
;
i
=
0
;
part_count
=
0
;
part_count
=
0
;
orig_count
=
0
;
orig_count
=
0
;
first
=
TRUE
;
part_it
.
rewind
();
part_it
.
rewind
();
do
do
{
{
...
@@ -1387,9 +1388,16 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
...
@@ -1387,9 +1388,16 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
DBUG_RETURN
(
ER_OUTOFMEMORY
);
DBUG_RETURN
(
ER_OUTOFMEMORY
);
}
}
}
while
(
++
j
<
no_subparts
);
}
while
(
++
j
<
no_subparts
);
if
(
part_elem
->
part_state
==
PART_CHANGED
)
orig_count
+=
no_subparts
;
else
if
(
temp_partitions
&&
first
)
{
orig_count
+=
(
no_subparts
*
temp_partitions
);
first
=
FALSE
;
}
}
}
}
while
(
++
i
<
no_parts
);
}
while
(
++
i
<
no_parts
);
first
=
FALSE
;
/*
/*
Step 5:
Step 5:
Create the new partitions and also open, lock and call external_lock
Create the new partitions and also open, lock and call external_lock
...
...
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