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
fed7ddde
Commit
fed7ddde
authored
Mar 23, 2010
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portability fix for vcol.vcol_partition_myisam test
parent
ce73ebb4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
56 deletions
+50
-56
mysql-test/suite/vcol/inc/vcol_partition.inc
mysql-test/suite/vcol/inc/vcol_partition.inc
+6
-39
mysql-test/suite/vcol/r/vcol_partition_innodb.result
mysql-test/suite/vcol/r/vcol_partition_innodb.result
+22
-0
mysql-test/suite/vcol/r/vcol_partition_myisam.result
mysql-test/suite/vcol/r/vcol_partition_myisam.result
+22
-17
No files found.
mysql-test/suite/vcol/inc/vcol_partition.inc
View file @
fed7ddde
...
...
@@ -36,27 +36,14 @@ insert into t1 values ('2007-01-01',default);
insert
into
t1
values
(
'2005-01-01'
,
default
);
select
*
from
t1
;
# Specifically for MyISAM, check that data is written into correct
# $MYSQLTEST_VARDIR/mysqld.1/data/test/t1*p?.MYD files
let
$myisam_engine
=
`select @@session.storage_engine='myisam'`
;
if
(
$myisam_engine
)
{
--
echo
# Check how data is physically partitioned.
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
du
-
b
$MYSQLTEST_VARDIR
/
mysqld
.
1
/
data
/
test
/
t1
*
p
?.
MYD
}
select
partition_name
,
table_rows
,
data_length
from
information_schema
.
partitions
where
table_name
=
't1'
;
--
echo
# Modify the expression of virtual column b
ALTER
TABLE
t1
modify
b
int
as
(
year
(
a
)
-
1
);
select
*
from
t1
;
if
(
$myisam_engine
)
{
--
echo
# Check how data is physically partitioned.
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
du
-
b
$MYSQLTEST_VARDIR
/
mysqld
.
1
/
data
/
test
/
t1
*
p
?.
MYD
}
select
partition_name
,
table_rows
,
data_length
from
information_schema
.
partitions
where
table_name
=
't1'
;
drop
table
t1
;
...
...
@@ -67,12 +54,7 @@ PARTITION BY LIST (a+1)
(
PARTITION
p1
VALUES
IN
(
1
),
PARTITION
p2
VALUES
IN
(
2
));
insert
into
t1
values
(
1
,
default
);
if
(
$myisam_engine
)
{
--
echo
# Check how data is physically partitioned.
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
du
-
b
$MYSQLTEST_VARDIR
/
mysqld
.
1
/
data
/
test
/
t1
*
p
?.
MYD
}
select
partition_name
,
table_rows
,
data_length
from
information_schema
.
partitions
where
table_name
=
't1'
;
select
*
from
t1
;
#
...
...
@@ -115,12 +97,7 @@ select * from t1;
#alter table t1 change b b int as ((a % 3)+1) persistent;
#--error ER_NO_PARTITION_FOR_GIVEN_VALUE
#alter table t1 change b b int as (a % 2) persistent;
#if ($myisam_engine)
#{
# --echo # Check how data is physically partitioned.
# --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
# --exec du -b $MYSQLTEST_VARDIR/mysqld.1/data/test/t1*p?.MYD
#}
#select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
select
*
from
t1
;
...
...
@@ -138,23 +115,13 @@ insert into t1 values ('2005-01-01',default);
insert
into
t1
values
(
'2006-01-01'
,
default
);
select
*
from
t1
;
if
(
$myisam_engine
)
{
--
echo
# Check how data is physically partitioned.
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
du
-
b
$MYSQLTEST_VARDIR
/
mysqld
.
1
/
data
/
test
/
t1
*
p
?.
MYD
}
select
partition_name
,
table_rows
,
data_length
from
information_schema
.
partitions
where
table_name
=
't1'
;
--
echo
# Modify the expression of virtual column b
ALTER
TABLE
t1
modify
b
int
as
(
year
(
a
)
-
1
);
select
*
from
t1
;
if
(
$myisam_engine
)
{
--
echo
# Check how data is physically partitioned.
--
replace_result
$MYSQLTEST_VARDIR
MYSQLTEST_VARDIR
--
exec
du
-
b
$MYSQLTEST_VARDIR
/
mysqld
.
1
/
data
/
test
/
t1
*
p
?.
MYD
}
select
partition_name
,
table_rows
,
data_length
from
information_schema
.
partitions
where
table_name
=
't1'
;
drop
table
t1
;
mysql-test/suite/vcol/r/vcol_partition_innodb.result
View file @
fed7ddde
...
...
@@ -17,6 +17,10 @@ a b
2005-01-01 2005
2006-01-01 2006
2007-01-01 2007
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 1 16384
p2 2 16384
# Modify the expression of virtual column b
ALTER TABLE t1 modify b int as (year(a)-1);
select * from t1;
...
...
@@ -24,12 +28,20 @@ a b
2005-01-01 2004
2006-01-01 2005
2007-01-01 2006
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 2 16384
p2 1 16384
drop table t1;
# Case 2. Partitioning by LIST based on a stored virtual column.
CREATE TABLE t1 (a int, b int as (a % 3 ) persistent)
PARTITION BY LIST (a+1)
(PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
insert into t1 values (1,default);
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p1 0 16384
p2 1 16384
select * from t1;
a b
1 1
...
...
@@ -49,10 +61,20 @@ select * from t1;
a b
2005-01-01 2005
2006-01-01 2006
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 0 16384
p1 1 16384
p2 1 16384
# Modify the expression of virtual column b
ALTER TABLE t1 modify b int as (year(a)-1);
select * from t1;
a b
2005-01-01 2004
2006-01-01 2005
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 1 16384
p1 1 16384
p2 0 16384
drop table t1;
mysql-test/suite/vcol/r/vcol_partition_myisam.result
View file @
fed7ddde
...
...
@@ -17,9 +17,10 @@ a b
2005-01-01 2005
2006-01-01 2006
2007-01-01 2007
# Check how data is physically partitioned.
7 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p0.MYD
14 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p2.MYD
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 1 7
p2 2 14
# Modify the expression of virtual column b
ALTER TABLE t1 modify b int as (year(a)-1);
select * from t1;
...
...
@@ -27,18 +28,20 @@ a b
2005-01-01 2004
2006-01-01 2005
2007-01-01 2006
# Check how data is physically partitioned.
14 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p0.MYD
7 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p2.MYD
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 2 14
p2 1 7
drop table t1;
# Case 2. Partitioning by LIST based on a stored virtual column.
CREATE TABLE t1 (a int, b int as (a % 3 ) persistent)
PARTITION BY LIST (a+1)
(PARTITION p1 VALUES IN (1), PARTITION p2 VALUES IN (2));
insert into t1 values (1,default);
# Check how data is physically partitioned.
0 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p1.MYD
9 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p2.MYD
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p1 0 0
p2 1 9
select * from t1;
a b
1 1
...
...
@@ -58,18 +61,20 @@ select * from t1;
a b
2005-01-01 2005
2006-01-01 2006
# Check how data is physically partitioned.
0 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p0.MYD
7 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p1.MYD
7 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p2.MYD
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 0 0
p1 1 7
p2 1 7
# Modify the expression of virtual column b
ALTER TABLE t1 modify b int as (year(a)-1);
select * from t1;
a b
2005-01-01 2004
2006-01-01 2005
# Check how data is physically partitioned.
7 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p0.MYD
7 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p1.MYD
0 MYSQLTEST_VARDIR/mysqld.1/data/test/t1#P#p2.MYD
select partition_name,table_rows,data_length from information_schema.partitions where table_name = 't1';
partition_name table_rows data_length
p0 1 7
p1 1 7
p2 0 0
drop table t1;
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