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
2cf3e2ea
Commit
2cf3e2ea
authored
Sep 27, 2017
by
Alice Sherepa
Committed by
Sergey Vojtovich
Oct 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compressed columns tests (replication and partition)
parent
67eb1252
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3001 additions
and
0 deletions
+3001
-0
mysql-test/include/column_compression_rpl.inc
mysql-test/include/column_compression_rpl.inc
+260
-0
mysql-test/r/column_compression_parts.result
mysql-test/r/column_compression_parts.result
+293
-0
mysql-test/r/column_compression_rpl.result
mysql-test/r/column_compression_rpl.result
+2250
-0
mysql-test/t/column_compression_parts.test
mysql-test/t/column_compression_parts.test
+182
-0
mysql-test/t/column_compression_rpl.test
mysql-test/t/column_compression_rpl.test
+16
-0
No files found.
mysql-test/include/column_compression_rpl.inc
0 → 100644
View file @
2cf3e2ea
--
connection
slave
SET
@
saved_slave_type_conversions
=
@@
slave_type_conversions
;
SET
GLOBAL
SLAVE_TYPE_CONVERSIONS
=
'ALL_NON_LOSSY'
;
--
connection
master
if
(
!
$engine_type
)
{
let
$engine_type
=
`SELECT @@storage_engine`
;
let
$engine_type2
=
`SELECT @@storage_engine`
;}
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
--
enable_warnings
echo
--------------------------------------------------------------------------------------------------------------
;
echo
--------------------------------------------
COMPRESSED
TO
COMPRESSED
------------------------------------------
;
echo
--------------------------------------------------------------------------------------------------------------
;
--
sync_slave_with_master
eval
CREATE
TABLE
t1
(
a
BLOB
COMPRESSED
default
"1111111111"
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t2
(
a
TINYBLOB
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t3
(
a
MEDIUMBLOB
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t4
(
a
LONGBLOB
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t5
(
a
TEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t6
(
a
TINYTEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t7
(
a
MEDIUMTEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t8
(
a
LONGTEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t9
(
a
VARCHAR
(
10000
)
COMPRESSED
default
"0"
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t10
(
a
VARBINARY
(
10000
)
COMPRESSED
)
ENGINE
=
$engine_type2
;
--
connection
master
eval
CREATE
TABLE
t1
(
a
BLOB
COMPRESSED
default
"1111111111"
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t2
(
a
TINYBLOB
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t3
(
a
MEDIUMBLOB
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t4
(
a
LONGBLOB
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t5
(
a
TEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t6
(
a
TINYTEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t7
(
a
MEDIUMTEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t8
(
a
LONGTEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t9
(
a
VARCHAR
(
10000
)
COMPRESSED
default
"0"
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
t10
(
a
VARBINARY
(
10000
)
COMPRESSED
)
ENGINE
=
$engine_type
;
INSERT
INTO
t1
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
default
);
INSERT
INTO
t2
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
254
)),(
NULL
);
INSERT
INTO
t3
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
2000
)),(
"April"
),(
NULL
);
INSERT
INTO
t4
(
a
)
VALUES
(
REPEAT
(
'a'
,
10000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"00-00-00"
);
INSERT
INTO
t5
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
);
INSERT
INTO
t6
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
254
)),(
NULL
);
INSERT
INTO
t7
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
3000
)),(
NULL
);
INSERT
INTO
t8
(
a
)
VALUES
(
REPEAT
(
'a'
,
10000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"qwerty"
);
INSERT
INTO
t9
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"12-12-2009"
),(
default
);
INSERT
INTO
t10
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
2000
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),
(
""
);
echo
--------------------------------------------------
data
on
master
------------------------------------------------
;
let
$a
=
10
;
while
(
$a
)
{
--
sorted_result
eval
SELECT
LENGTH
(
a
),
SUBSTRING
(
a
,
1
,
10
),
"M,compressed"
from
t
$a
;
--
sorted_result
eval
SELECT
DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
't$a'
;
dec
$a
;
}
SELECT
*
FROM
INFORMATION_SCHEMA
.
SESSION_STATUS
WHERE
VARIABLE_NAME
IN
(
'Column_compressions'
,
'Column_decompressions'
);
echo
--------------------------------------------------
data
on
slave
-------------------------------------------------
;
--
sync_slave_with_master
let
$a
=
10
;
while
(
$a
)
{
--
sorted_result
eval
SELECT
LENGTH
(
a
),
SUBSTRING
(
a
,
1
,
10
),
"S,compressed"
from
t
$a
;
--
sorted_result
eval
SELECT
DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
't$a'
;
dec
$a
;
}
SELECT
*
FROM
INFORMATION_SCHEMA
.
SESSION_STATUS
WHERE
VARIABLE_NAME
IN
(
'Column_compressions'
,
'Column_decompressions'
);
--
connection
master
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
FLUSH
STATUS
;
echo
-----------------------------------------------------------------------------------------------------------------
;
echo
---------------------------------------
COMPRESSED
TO
NOT
COMPRESSED
----------------------------------------------
;
echo
-----------------------------------------------------------------------------------------------------------------
;
--
sync_slave_with_master
FLUSH
STATUS
;
eval
CREATE
TABLE
t1
(
a
BLOB
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t2
(
a
TINYBLOB
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t3
(
a
MEDIUMBLOB
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t4
(
a
LONGBLOB
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t5
(
a
TEXT
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t6
(
a
TINYTEXT
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t7
(
a
MEDIUMTEXT
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t8
(
a
LONGTEXT
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t9
(
a
VARCHAR
(
10000
))
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t10
(
a
VARBINARY
(
10000
))
ENGINE
=
$engine_type2
;
--
connection
master
eval
CREATE
TABLE
IF
NOT
EXISTS
t1
(
a
BLOB
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t2
(
a
TINYBLOB
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t3
(
a
MEDIUMBLOB
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t4
(
a
LONGBLOB
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t5
(
a
TEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t6
(
a
TINYTEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t7
(
a
MEDIUMTEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t8
(
a
LONGTEXT
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t9
(
a
VARCHAR
(
10000
)
COMPRESSED
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t10
(
a
VARBINARY
(
10000
)
COMPRESSED
)
ENGINE
=
$engine_type
;
INSERT
INTO
t1
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
);
INSERT
INTO
t2
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
254
)),(
NULL
);
INSERT
INTO
t3
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
2000
)),(
"April"
),(
NULL
);
INSERT
INTO
t4
(
a
)
VALUES
(
REPEAT
(
'a'
,
10000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"00-00-00"
);
INSERT
INTO
t5
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
);
INSERT
INTO
t6
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
254
)),(
NULL
);
INSERT
INTO
t7
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
3000
)),(
NULL
);
INSERT
INTO
t8
(
a
)
VALUES
(
REPEAT
(
'a'
,
10000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"qwerty"
);
INSERT
INTO
t9
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"12-12-2009"
);
INSERT
INTO
t10
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
2000
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),
(
""
);
echo
---------------------------------------
data
on
master
-----------------------------------------------------------
;
let
$a
=
10
;
while
(
$a
)
{
--
sorted_result
eval
SELECT
LENGTH
(
a
),
SUBSTRING
(
a
,
1
,
10
),
"M,compressed"
from
t
$a
;
--
sorted_result
eval
SELECT
DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
't$a'
;
dec
$a
;
}
SELECT
*
FROM
INFORMATION_SCHEMA
.
SESSION_STATUS
WHERE
VARIABLE_NAME
IN
(
'Column_compressions'
,
'Column_decompressions'
);
echo
---------------------------------------
data
on
slave
-------------------------------------------------------------
;
--
sync_slave_with_master
let
$a
=
10
;
while
(
$a
)
{
--
sorted_result
eval
SELECT
LENGTH
(
a
),
SUBSTRING
(
a
,
1
,
10
),
"S,not compressed"
from
t
$a
;
--
sorted_result
eval
SELECT
DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
't$a'
;
dec
$a
;
}
SELECT
*
FROM
INFORMATION_SCHEMA
.
SESSION_STATUS
WHERE
VARIABLE_NAME
IN
(
'Column_compressions'
,
'Column_decompressions'
);
--
connection
master
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
FLUSH
STATUS
;
echo
-----------------------------------------------------------------------------------------------------------------
;
echo
-----------------------------------
NOT
COMPRESSED
to
COMPRESSED
--------------------------------------------------
;
echo
-----------------------------------------------------------------------------------------------------------------
;
--
sync_slave_with_master
FLUSH
STATUS
;
eval
CREATE
TABLE
t1
(
a
BLOB
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t2
(
a
TINYBLOB
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t3
(
a
MEDIUMBLOB
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t4
(
a
LONGBLOB
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t5
(
a
TEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t6
(
a
TINYTEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t7
(
a
MEDIUMTEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t8
(
a
LONGTEXT
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t9
(
a
VARCHAR
(
10000
)
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t10
(
a
VARBINARY
(
10000
)
COMPRESSED
)
ENGINE
=
$engine_type2
;
--
connection
master
eval
CREATE
TABLE
IF
NOT
EXISTS
t1
(
a
BLOB
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t2
(
a
TINYBLOB
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t3
(
a
MEDIUMBLOB
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t4
(
a
LONGBLOB
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t5
(
a
TEXT
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t6
(
a
TINYTEXT
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t7
(
a
MEDIUMTEXT
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t8
(
a
LONGTEXT
)
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t9
(
a
VARCHAR
(
10000
))
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t10
(
a
VARBINARY
(
10000
))
ENGINE
=
$engine_type
;
INSERT
INTO
t1
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
);
INSERT
INTO
t2
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
254
)),(
NULL
);
INSERT
INTO
t3
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
2000
)),(
"April"
),(
NULL
);
INSERT
INTO
t4
(
a
)
VALUES
(
REPEAT
(
'a'
,
10000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"00-00-00"
);
INSERT
INTO
t5
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
);
INSERT
INTO
t6
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
254
)),(
NULL
);
INSERT
INTO
t7
(
a
)
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
3000
)),(
NULL
);
INSERT
INTO
t8
(
a
)
VALUES
(
REPEAT
(
'a'
,
10000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"qwerty"
);
INSERT
INTO
t9
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
200
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),(
"12-12-2009"
);
INSERT
INTO
t10
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
)),(
REPEAT
(
'v'
,
2000
)),(
REPEAT
(
'r'
,
300
)),(
NULL
),
(
""
);
echo
-----------------------------------
data
on
master
---------------------------------------------------------------
;
let
$a
=
10
;
while
(
$a
)
{
--
sorted_result
eval
SELECT
LENGTH
(
a
),
SUBSTRING
(
a
,
1
,
10
),
"M,not compressed"
from
t
$a
;
--
sorted_result
eval
SELECT
DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
't$a'
;
dec
$a
;
}
SELECT
*
FROM
INFORMATION_SCHEMA
.
SESSION_STATUS
WHERE
VARIABLE_NAME
IN
(
'Column_compressions'
,
'Column_decompressions'
);
echo
-----------------------------------
data
on
slave
-----------------------------------------------------------------
;
--
sync_slave_with_master
let
$a
=
10
;
while
(
$a
)
{
--
sorted_result
eval
SELECT
LENGTH
(
a
),
SUBSTRING
(
a
,
1
,
10
),
"S,compressed"
from
t
$a
;
--
sorted_result
eval
SELECT
DATA_LENGTH
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_SCHEMA
=
'test'
AND
TABLE_NAME
=
't$a'
;
dec
$a
;
}
SELECT
*
FROM
INFORMATION_SCHEMA
.
SESSION_STATUS
WHERE
VARIABLE_NAME
IN
(
'Column_compressions'
,
'Column_decompressions'
);
--
connection
master
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
,
t10
;
echo
-----------------------------------------------------------------------------------------------------------------
;
echo
------
varchar
(
1000
)
->
varchar
(
999
)
compressed
,
varchar
(
1000
)
compressed
->
varchar
(
999
)
----------------------------
;
echo
-----------------------------------------------------------------------------------------------------------------
;
--
sync_slave_with_master
eval
CREATE
TABLE
t1
(
a
VARCHAR
(
999
)
COMPRESSED
)
ENGINE
=
$engine_type2
;
eval
CREATE
TABLE
t2
(
a
VARCHAR
(
999
))
ENGINE
=
$engine_type2
;
show
warnings
;
call
mtr
.
add_suppression
(
"Slave: Data too long for column 'a' at row 1 Error_code: 1406"
);
call
mtr
.
add_suppression
(
"Slave: Table 't2' already exists Error_code: 1050"
);
--
connection
master
eval
CREATE
TABLE
IF
NOT
EXISTS
t1
(
a
VARCHAR
(
1000
))
ENGINE
=
$engine_type
;
eval
CREATE
TABLE
IF
NOT
EXISTS
t2
(
a
VARCHAR
(
1000
)
COMPRESSED
)
ENGINE
=
$engine_type
;
INSERT
INTO
t1
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
));
--
connection
slave
--
let
$slave_sql_errno
=
1406
,
1677
--
source
include
/
wait_for_slave_sql_error_and_skip
.
inc
show
warnings
;
--
connection
master
INSERT
INTO
t2
(
a
)
VALUES
(
REPEAT
(
'a'
,
1000
));
--
connection
slave
--
let
$slave_sql_errno
=
1406
,
1677
--
source
include
/
wait_for_slave_sql_error_and_skip
.
inc
show
warnings
;
SET
GLOBAL
SLAVE_TYPE_CONVERSIONS
=
@
saved_slave_type_conversions
;
--
connection
master
DROP
TABLE
t1
,
t2
;
--
sync_slave_with_master
mysql-test/r/column_compression_parts.result
0 → 100644
View file @
2cf3e2ea
DROP TABLE IF EXISTS t1,t2,t3,t4;
FLUSH STATUS;
---------------------------------------by range------------------------------------------
CREATE TABLE t1 (i int, a VARCHAR(1000) COMPRESSED DEFAULT "AAA")
PARTITION BY RANGE COLUMNS (a)(
PARTITION p0 VALUES LESS THAN ('g') COMMENT "p0",
PARTITION p1 VALUES LESS THAN ('m'),
PARTITION p2 VALUES LESS THAN ('t'),
PARTITION p3 VALUES LESS THAN ('w'));
ALTER TABLE t1 ADD PARTITION (PARTITION p4 VALUES LESS THAN (MAXVALUE));
INSERT INTO t1 VALUES (1,REPEAT('a',100)),(2,REPEAT('v',200)),(3,REPEAT('r',300)),(4,NULL);
INSERT INTO t1 VALUES (5,REPEAT('k',500)),(6,'April'),(7,7),(8,""),(9,"M"),(10,DEFAULT);
ALTER TABLE t1 ANALYZE PARTITION p1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
ALTER TABLE t1 CHECK PARTITION p2;
Table Op Msg_type Msg_text
test.t1 check status OK
SELECT i,SUBSTRING(a,1,10) FROM t1 PARTITION (p2) ORDER BY i;
i SUBSTRING(a,1,10)
3 rrrrrrrrrr
9 M
SELECT i,SUBSTRING(a,1,10) FROM t1 where length(a)>=300 ORDER BY i;
i SUBSTRING(a,1,10)
3 rrrrrrrrrr
5 kkkkkkkkkk
SELECT i,SUBSTRING(a,1,10) FROM t1 where a like "%k" ORDER BY i;
i SUBSTRING(a,1,10)
5 kkkkkkkkkk
DELETE FROM t1 where a="";
DELETE FROM t1 where a=(REPEAT('a',100));
DELETE FROM t1 where a like "%v";
SELECT i,SUBSTRING(a,1,10) FROM t1 ORDER BY i;
i SUBSTRING(a,1,10)
3 rrrrrrrrrr
4 NULL
5 kkkkkkkkkk
6 April
7 7
9 M
10 AAA
SELECT i,SUBSTRING(a,1,10) FROM t1 where a not like "%k" ORDER BY i;
i SUBSTRING(a,1,10)
3 rrrrrrrrrr
6 April
7 7
9 M
10 AAA
SELECT i,SUBSTRING(a,1,10) FROM t1 where (a>'m') ORDER BY i;
i SUBSTRING(a,1,10)
3 rrrrrrrrrr
SELECT i,SUBSTRING(a,1,10) FROM t1 where (a between 'h' and 'z') and (i=9) ORDER BY i;
i SUBSTRING(a,1,10)
9 M
EXPLAIN PARTITIONS SELECT i,SUBSTRING(a,1,10) FROM t1 where (a>'m');
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p2,p3,p4 ALL NULL NULL NULL NULL 2 Using where
EXPLAIN PARTITIONS SELECT i,SUBSTRING(a,1,10) FROM t1 where (a<'w');
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0,p1,p2,p3 ALL NULL NULL NULL NULL 7 Using where
ALTER TABLE t1 TRUNCATE PARTITION p2;
ALTER TABLE t1 DROP PARTITION p0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL,
`a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT 'AAA'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE COLUMNS(`a`)
(PARTITION `p1` VALUES LESS THAN ('m') ENGINE = MyISAM,
PARTITION `p2` VALUES LESS THAN ('t') ENGINE = MyISAM,
PARTITION `p3` VALUES LESS THAN ('w') ENGINE = MyISAM,
PARTITION `p4` VALUES LESS THAN (MAXVALUE) ENGINE = MyISAM)
ALTER TABLE t1 MODIFY COLUMN a VARCHAR(1000);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL,
`a` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE COLUMNS(`a`)
(PARTITION `p1` VALUES LESS THAN ('m') ENGINE = MyISAM,
PARTITION `p2` VALUES LESS THAN ('t') ENGINE = MyISAM,
PARTITION `p3` VALUES LESS THAN ('w') ENGINE = MyISAM,
PARTITION `p4` VALUES LESS THAN (MAXVALUE) ENGINE = MyISAM)
DROP TABLE t1;
---------------------------------------------------------------------------------------------
CREATE TABLE t1 (a VARCHAR(1000) COMPRESSED NOT NULL, id INT)
PARTITION BY RANGE COLUMNS(id,a)(
PARTITION p0 VALUES LESS THAN (100,'sss'),
PARTITION p1 VALUES LESS THAN (MAXVALUE,MAXVALUE));
INSERT INTO t1 VALUES (REPEAT('a',100), 23),(REPEAT('v',100),123),(REPEAT('z',100),24),(REPEAT('k',100),124);
SELECT id,SUBSTRING(a,1,10) FROM t1 order by id;
id SUBSTRING(a,1,10)
23 aaaaaaaaaa
24 zzzzzzzzzz
123 vvvvvvvvvv
124 kkkkkkkkkk
SELECT * from t1 partition (p0);
a id
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 23
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz 24
SELECT * from t1 partition (p1);
a id
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 123
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk 124
INSERT INTO t1 VALUES (REPEAT('a',100),101);
SELECT * from t1 partition (p0);
a id
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 23
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz 24
SELECT * from t1 partition (p1);
a id
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv 123
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk 124
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 101
ALTER TABLE t1 DROP PARTITION p1;
SELECT id,SUBSTRING(a,1,10) FROM t1 WHERE id<50 order by id;
id SUBSTRING(a,1,10)
23 aaaaaaaaaa
24 zzzzzzzzzz
INSERT INTO t1 VALUES (REPEAT('a',100),101);
ERROR HY000: Table has no partition for value from column_list
ALTER TABLE t1 ALTER COLUMN a SET DEFAULT 'qwerty';
ALTER TABLE t1 ALTER COLUMN a DROP DEFAULT;
ALTER TABLE t1 MODIFY COLUMN a VARCHAR(1000);
ALTER TABLE t1 ALTER COLUMN a DROP DEFAULT;
INSERT INTO t1 VALUES (REPEAT('b',100),11);
INSERT INTO t1 VALUES (default,10);
ERROR HY000: Field 'a' doesn't have a default value
ALTER TABLE t1 MODIFY COLUMN a VARCHAR(1000) COMPRESSED;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT NULL,
`id` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE COLUMNS(`id`,`a`)
(PARTITION `p0` VALUES LESS THAN (100,'sss') ENGINE = MyISAM)
SELECT * from t1 ORDER BY id;
a id
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 11
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 23
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz 24
DROP TABLE t1;
----------------------------1 partition--------------------------------------------------
CREATE TABLE t1 (a VARCHAR(1000) COMPRESSED DEFAULT "10-12-2010")
PARTITION BY RANGE COLUMNS (a) (partition p0 VALUES LESS THAN (MAXVALUE));
INSERT INTO t1 VALUES (REPEAT('a',100)), (REPEAT('v',200)), (REPEAT('Z',300)),(NULL),(DEFAULT);
INSERT INTO t1 VALUES (DEFAULT),(REPEAT('b',200)),(REPEAT('q',300)),(DEFAULT),("MAY");
SELECT SUBSTRING(a,1,10) FROM t1;
SUBSTRING(a,1,10)
10-12-2010
10-12-2010
10-12-2010
MAY
NULL
ZZZZZZZZZZ
aaaaaaaaaa
bbbbbbbbbb
qqqqqqqqqq
vvvvvvvvvv
-----------------------------------------by key------------------------------------------
ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 6;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT '10-12-2010'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (`a`)
PARTITIONS 6
UPDATE t1 SET a="NEW" where length(a)<20;
SELECT SUBSTRING(a,1,10) FROM t1;
SUBSTRING(a,1,10)
NEW
NEW
NEW
NEW
NULL
ZZZZZZZZZZ
aaaaaaaaaa
bbbbbbbbbb
qqqqqqqqqq
vvvvvvvvvv
CREATE TABLE t2 (a VARBINARY(1000) COMPRESSED)
PARTITION BY KEY(a) PARTITIONS 3;
ALTER TABLE t2 PARTITION BY LINEAR KEY ALGORITHM=2 (a) PARTITIONS 32;
INSERT INTO t2 VALUES (REPEAT('a',100)),(REPEAT('v',6)),(REPEAT('z',13)),(REPEAT('k',900));
SELECT SUBSTRING(a,1,10) FROM t2;
SUBSTRING(a,1,10)
aaaaaaaaaa
kkkkkkkkkk
vvvvvv
zzzzzzzzzz
CREATE TABLE t3 ( a VARCHAR(1000) COMPRESSED DEFAULT NULL)
PARTITION BY LINEAR KEY(a) PARTITIONS 3;
INSERT INTO t3 VALUES (REPEAT('a',100)),(REPEAT('v',100)),(NULL),(REPEAT('k',100)),(DEFAULT);
SELECT SUBSTRING(a,1,10) FROM t3 where a<>NULL;
SUBSTRING(a,1,10)
CREATE TABLE t4 (a VARBINARY(1000) COMPRESSED NOT NULL DEFAULT 0 COMMENT "QQ")
PARTITION BY LINEAR KEY(a)
PARTITIONS 3;
INSERT INTO t4 VALUES (REPEAT('a',100)),('0'),(DEFAULT),(DEFAULT),(REPEAT('v',100)),(REPEAT('k',100));
SELECT SUBSTRING(a,1,10) FROM t4 where length(a)>3;
SUBSTRING(a,1,10)
aaaaaaaaaa
kkkkkkkkkk
vvvvvvvvvv
DROP TABLE t1,t2,t3,t4;
-----------------------------------subpartitions------------------------------------------
CREATE TABLE t1 (a VARCHAR(1000) COMPRESSED, id INT NOT NULL)
PARTITION BY RANGE(id)
SUBPARTITION BY KEY(a) SUBPARTITIONS 4
(PARTITION p0 VALUES LESS THAN (5),
PARTITION p1 VALUES LESS THAN (MAXVALUE));
INSERT INTO t1 VALUES (REPEAT('a',100),23),(REPEAT('v',100),123),(REPEAT('z',100),24),(REPEAT('k',100),124);
SELECT id,SUBSTRING(a,1,10) FROM t1 where a=(REPEAT('k',100)) order by id;
id SUBSTRING(a,1,10)
124 kkkkkkkkkk
DROP TABLE t1;
-------------------------------------------------------------------------------------------
CREATE TABLE t1 (a BLOB COMPRESSED)
PARTITION BY KEY(a) partitions 30;
ERROR HY000: A BLOB field is not allowed in partition function
CREATE TABLE t1 (a VARCHAR(200) COMPRESSED) PARTITION BY KEY(a) partitions 30;
ALTER TABLE t1 COALESCE PARTITION 20;
ALTER TABLE t1 ADD PARTITION (PARTITION pm);
CREATE TABLE t2 like t1;
ALTER TABLE t2 REMOVE PARTITIONING;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(200) /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY KEY (`a`)
(PARTITION `p0` ENGINE = MyISAM,
PARTITION `p1` ENGINE = MyISAM,
PARTITION `p2` ENGINE = MyISAM,
PARTITION `p3` ENGINE = MyISAM,
PARTITION `p4` ENGINE = MyISAM,
PARTITION `p5` ENGINE = MyISAM,
PARTITION `p6` ENGINE = MyISAM,
PARTITION `p7` ENGINE = MyISAM,
PARTITION `p8` ENGINE = MyISAM,
PARTITION `p9` ENGINE = MyISAM,
PARTITION `pm` ENGINE = MyISAM)
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`a` varchar(200) /*!100301 COMPRESSED*/ DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 EXCHANGE PARTITION pm WITH TABLE t2;
DROP TABLE t1,t2;
-------------------------------------------------------------------------------------------
CREATE TABLE t1 (a BLOB COMPRESSED default 5,i int);
INSERT INTO t1 VALUES (REPEAT('a',100),1),(REPEAT('v',100),2),(REPEAT('z',100),3),(REPEAT('k',100),2),(2,2);
ALTER TABLE t1 PARTITION BY KEY(a) partitions 3;
ERROR HY000: A BLOB field is not allowed in partition function
ALTER TABLE t1 PARTITION BY HASH(i) PARTITIONS 8;
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (
PARTITION s0 VALUES LESS THAN (1960),
PARTITION s1 VALUES LESS THAN (1970)
);
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` blob /*!100301 COMPRESSED*/ DEFAULT 5,
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY HASH (`i`)
PARTITIONS 8
ALTER TABLE t1 REMOVE PARTITIONING;
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(500) COMPRESSED default 5,i int)
PARTITION BY RANGE COLUMNS(i)(
PARTITION p0 VALUES LESS THAN (10),
PARTITION p1 VALUES LESS THAN (100),
PARTITION p2 VALUES LESS THAN (1000));
INSERT INTO t1 VALUES (REPEAT('a',100),1),("one",21),(REPEAT('3',100),34),(REPEAT('k',100),267),(2,278);
ALTER TABLE t1 REORGANIZE PARTITION p2 INTO (PARTITION p22 VALUES LESS THAN (MAXVALUE));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` varchar(500) /*!100301 COMPRESSED*/ DEFAULT '5',
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
PARTITION BY RANGE COLUMNS(`i`)
(PARTITION `p0` VALUES LESS THAN (10) ENGINE = MyISAM,
PARTITION `p1` VALUES LESS THAN (100) ENGINE = MyISAM,
PARTITION `p22` VALUES LESS THAN (MAXVALUE) ENGINE = MyISAM)
ALTER TABLE t1 REBUILD PARTITION p22;
DROP TABLE t1;
mysql-test/r/column_compression_rpl.result
0 → 100644
View file @
2cf3e2ea
include/master-slave.inc
[connection
master]
connection slave;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
connection master;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
--------------------------------------------------------------------------------------------------------------
--------------------------------------------COMPRESSED TO COMPRESSED------------------------------------------
--------------------------------------------------------------------------------------------------------------
connection slave;
CREATE TABLE t1 (a BLOB COMPRESSED default "1111111111") ENGINE=innodb;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED default "0") ENGINE=innodb;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=innodb;
connection master;
CREATE TABLE t1 (a BLOB COMPRESSED default "1111111111") ENGINE=myisam;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED default "0") ENGINE=myisam;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),(default);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009"),(default);
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
--------------------------------------------------data on master------------------------------------------------
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
0 M,compressed
1000 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
108
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1 0 M,compressed
10 12-12-2009 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
6 qwerty M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
3000 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
92
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
84
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
8 00-00-00 M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
5 April M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
88
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10 1111111111 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
104
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 29
COLUMN_DECOMPRESSIONS 58
--------------------------------------------------data on slave-------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
0 S,compressed
1000 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
108
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1 0 S,compressed
10 12-12-2009 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
6 qwerty S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
3000 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
92
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
84
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
8 00-00-00 S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
5 April S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
88
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10 1111111111 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
104
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 58
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
FLUSH STATUS;
-----------------------------------------------------------------------------------------------------------------
---------------------------------------COMPRESSED TO NOT COMPRESSED----------------------------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
FLUSH STATUS;
CREATE TABLE t1 (a BLOB) ENGINE=innodb;
CREATE TABLE t2 (a TINYBLOB) ENGINE=innodb;
CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=innodb;
CREATE TABLE t4 (a LONGBLOB) ENGINE=innodb;
CREATE TABLE t5 (a TEXT) ENGINE=innodb;
CREATE TABLE t6 (a TINYTEXT) ENGINE=innodb;
CREATE TABLE t7 (a MEDIUMTEXT) ENGINE=innodb;
CREATE TABLE t8 (a LONGTEXT) ENGINE=innodb;
CREATE TABLE t9 (a VARCHAR(10000)) ENGINE=innodb;
CREATE TABLE t10 (a VARBINARY(10000)) ENGINE=innodb;
connection master;
CREATE TABLE IF NOT EXISTS t1 (a BLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t2 (a TINYBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t3 (a MEDIUMBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t4 (a LONGBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t5 (a TEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t6 (a TINYTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t7 (a MEDIUMTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t8 (a LONGTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t9 (a VARCHAR(10000) COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t10 (a VARBINARY(10000) COMPRESSED) ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009");
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
---------------------------------------data on master-----------------------------------------------------------
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
0 M,compressed
1000 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
108
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10 12-12-2009 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
100
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
6 qwerty M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
120
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
3000 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
92
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
80
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
84
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
8 00-00-00 M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
120
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
5 April M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
88
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
80
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
84
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 29
COLUMN_DECOMPRESSIONS 58
---------------------------------------data on slave-------------------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
0 S,not compressed
1000 aaaaaaaaaa S,not compressed
2000 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10 12-12-2009 S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
6 qwerty S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
3000 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
254 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
8 00-00-00 S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
2000 vvvvvvvvvv S,not compressed
5 April S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
254 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 0
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
FLUSH STATUS;
-----------------------------------------------------------------------------------------------------------------
-----------------------------------NOT COMPRESSED to COMPRESSED--------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
FLUSH STATUS;
CREATE TABLE t1 (a BLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED) ENGINE=innodb;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=innodb;
connection master;
CREATE TABLE IF NOT EXISTS t1 (a BLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t2 (a TINYBLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t3 (a MEDIUMBLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t4 (a LONGBLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t5 (a TEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t6 (a TINYTEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t7 (a MEDIUMTEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t8 (a LONGTEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t9 (a VARCHAR(10000)) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t10 (a VARBINARY(10000)) ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009");
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
-----------------------------------data on master---------------------------------------------------------------
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
0 M,not compressed
1000 aaaaaaaaaa M,not compressed
2000 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
3364
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10 12-12-2009 M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
1564
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
6 qwerty M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
10576
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
3000 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
3344
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
254 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
596
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
1544
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
8 00-00-00 M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
10576
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
2000 vvvvvvvvvv M,not compressed
5 April M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
2156
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
254 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
596
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
1544
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 0
-----------------------------------data on slave-----------------------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
0 S,compressed
1000 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10 12-12-2009 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
6 qwerty S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
3000 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
8 00-00-00 S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
5 April S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 58
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-----------------------------------------------------------------------------------------------------------------
------varchar(1000)->varchar(999) compressed, varchar(1000) compressed->varchar(999) ----------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
CREATE TABLE t1 (a VARCHAR(999) COMPRESSED) ENGINE=innodb;
CREATE TABLE t2 (a VARCHAR(999)) ENGINE=innodb;
show warnings;
Level Code Message
call mtr.add_suppression("Slave: Data too long for column 'a' at row 1 Error_code: 1406");
call mtr.add_suppression("Slave: Table 't2' already exists Error_code: 1050");
connection master;
CREATE TABLE IF NOT EXISTS t1 (a VARCHAR(1000))ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t2 (a VARCHAR(1000) COMPRESSED)ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000));
connection slave;
include/wait_for_slave_sql_error_and_skip.inc [errno=1406,1677]
show warnings;
Level Code Message
connection master;
INSERT INTO t2(a) VALUES(REPEAT('a',1000));
connection slave;
include/wait_for_slave_sql_error_and_skip.inc [errno=1406,1677]
show warnings;
Level Code Message
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
connection master;
DROP TABLE t1,t2;
connection slave;
connection slave;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
connection master;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
--------------------------------------------------------------------------------------------------------------
--------------------------------------------COMPRESSED TO COMPRESSED------------------------------------------
--------------------------------------------------------------------------------------------------------------
connection slave;
CREATE TABLE t1 (a BLOB COMPRESSED default "1111111111") ENGINE=innodb;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED default "0") ENGINE=innodb;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=innodb;
connection master;
CREATE TABLE t1 (a BLOB COMPRESSED default "1111111111") ENGINE=innodb;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED default "0") ENGINE=innodb;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=innodb;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),(default);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009"),(default);
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
--------------------------------------------------data on master------------------------------------------------
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
0 M,compressed
1000 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1 0 M,compressed
10 12-12-2009 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
6 qwerty M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
3000 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
8 00-00-00 M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
5 April M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10 1111111111 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 30
COLUMN_DECOMPRESSIONS 58
--------------------------------------------------data on slave-------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
0 S,compressed
1000 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1 0 S,compressed
10 12-12-2009 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
6 qwerty S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
3000 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
8 00-00-00 S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
5 April S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10 1111111111 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 116
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
FLUSH STATUS;
-----------------------------------------------------------------------------------------------------------------
---------------------------------------COMPRESSED TO NOT COMPRESSED----------------------------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
FLUSH STATUS;
CREATE TABLE t1 (a BLOB) ENGINE=innodb;
CREATE TABLE t2 (a TINYBLOB) ENGINE=innodb;
CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=innodb;
CREATE TABLE t4 (a LONGBLOB) ENGINE=innodb;
CREATE TABLE t5 (a TEXT) ENGINE=innodb;
CREATE TABLE t6 (a TINYTEXT) ENGINE=innodb;
CREATE TABLE t7 (a MEDIUMTEXT) ENGINE=innodb;
CREATE TABLE t8 (a LONGTEXT) ENGINE=innodb;
CREATE TABLE t9 (a VARCHAR(10000)) ENGINE=innodb;
CREATE TABLE t10 (a VARBINARY(10000)) ENGINE=innodb;
connection master;
CREATE TABLE IF NOT EXISTS t1 (a BLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t2 (a TINYBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t3 (a MEDIUMBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t4 (a LONGBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t5 (a TEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t6 (a TINYTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t7 (a MEDIUMTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t8 (a LONGTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t9 (a VARCHAR(10000) COMPRESSED) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t10 (a VARBINARY(10000) COMPRESSED) ENGINE=innodb;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009");
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
---------------------------------------data on master-----------------------------------------------------------
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
0 M,compressed
1000 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10 12-12-2009 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
6 qwerty M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
3000 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
8 00-00-00 M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
5 April M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 29
COLUMN_DECOMPRESSIONS 58
---------------------------------------data on slave-------------------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
0 S,not compressed
1000 aaaaaaaaaa S,not compressed
2000 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10 12-12-2009 S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
6 qwerty S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
3000 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
254 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
8 00-00-00 S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
2000 vvvvvvvvvv S,not compressed
5 April S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
254 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 0
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
FLUSH STATUS;
-----------------------------------------------------------------------------------------------------------------
-----------------------------------NOT COMPRESSED to COMPRESSED--------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
FLUSH STATUS;
CREATE TABLE t1 (a BLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=innodb;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=innodb;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED) ENGINE=innodb;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=innodb;
connection master;
CREATE TABLE IF NOT EXISTS t1 (a BLOB) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t2 (a TINYBLOB) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t3 (a MEDIUMBLOB) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t4 (a LONGBLOB) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t5 (a TEXT) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t6 (a TINYTEXT) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t7 (a MEDIUMTEXT) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t8 (a LONGTEXT) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t9 (a VARCHAR(10000)) ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t10 (a VARBINARY(10000)) ENGINE=innodb;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009");
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
-----------------------------------data on master---------------------------------------------------------------
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
0 M,not compressed
1000 aaaaaaaaaa M,not compressed
2000 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10 12-12-2009 M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
6 qwerty M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
3000 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
254 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
8 00-00-00 M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
2000 vvvvvvvvvv M,not compressed
5 April M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
254 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 0
-----------------------------------data on slave-----------------------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
0 S,compressed
1000 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10 12-12-2009 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
6 qwerty S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
3000 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
8 00-00-00 S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
5 April S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
16384
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
16384
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 58
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-----------------------------------------------------------------------------------------------------------------
------varchar(1000)->varchar(999) compressed, varchar(1000) compressed->varchar(999) ----------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
CREATE TABLE t1 (a VARCHAR(999) COMPRESSED) ENGINE=innodb;
CREATE TABLE t2 (a VARCHAR(999)) ENGINE=innodb;
show warnings;
Level Code Message
call mtr.add_suppression("Slave: Data too long for column 'a' at row 1 Error_code: 1406");
call mtr.add_suppression("Slave: Table 't2' already exists Error_code: 1050");
connection master;
CREATE TABLE IF NOT EXISTS t1 (a VARCHAR(1000))ENGINE=innodb;
CREATE TABLE IF NOT EXISTS t2 (a VARCHAR(1000) COMPRESSED)ENGINE=innodb;
INSERT INTO t1(a) VALUES(REPEAT('a',1000));
connection slave;
include/wait_for_slave_sql_error_and_skip.inc [errno=1406,1677]
show warnings;
Level Code Message
connection master;
INSERT INTO t2(a) VALUES(REPEAT('a',1000));
connection slave;
include/wait_for_slave_sql_error_and_skip.inc [errno=1406,1677]
show warnings;
Level Code Message
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
connection master;
DROP TABLE t1,t2;
connection slave;
connection slave;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
connection master;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
--------------------------------------------------------------------------------------------------------------
--------------------------------------------COMPRESSED TO COMPRESSED------------------------------------------
--------------------------------------------------------------------------------------------------------------
connection slave;
CREATE TABLE t1 (a BLOB COMPRESSED default "1111111111") ENGINE=myisam;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED default "0") ENGINE=myisam;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=myisam;
connection master;
CREATE TABLE t1 (a BLOB COMPRESSED default "1111111111") ENGINE=myisam;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED default "0") ENGINE=myisam;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),(default);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009"),(default);
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
--------------------------------------------------data on master------------------------------------------------
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
0 M,compressed
1000 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
108
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1 0 M,compressed
10 12-12-2009 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
6 qwerty M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
3000 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
92
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
84
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
8 00-00-00 M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
5 April M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
88
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "M,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10 1111111111 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
104
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 30
COLUMN_DECOMPRESSIONS 58
--------------------------------------------------data on slave-------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
0 S,compressed
1000 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
108
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1 0 S,compressed
10 12-12-2009 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
6 qwerty S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
3000 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
92
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
84
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
8 00-00-00 S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
5 April S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
88
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10 1111111111 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
104
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 116
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
FLUSH STATUS;
-----------------------------------------------------------------------------------------------------------------
---------------------------------------COMPRESSED TO NOT COMPRESSED----------------------------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
FLUSH STATUS;
CREATE TABLE t1 (a BLOB) ENGINE=myisam;
CREATE TABLE t2 (a TINYBLOB) ENGINE=myisam;
CREATE TABLE t3 (a MEDIUMBLOB) ENGINE=myisam;
CREATE TABLE t4 (a LONGBLOB) ENGINE=myisam;
CREATE TABLE t5 (a TEXT) ENGINE=myisam;
CREATE TABLE t6 (a TINYTEXT) ENGINE=myisam;
CREATE TABLE t7 (a MEDIUMTEXT) ENGINE=myisam;
CREATE TABLE t8 (a LONGTEXT) ENGINE=myisam;
CREATE TABLE t9 (a VARCHAR(10000)) ENGINE=myisam;
CREATE TABLE t10 (a VARBINARY(10000)) ENGINE=myisam;
connection master;
CREATE TABLE IF NOT EXISTS t1 (a BLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t2 (a TINYBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t3 (a MEDIUMBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t4 (a LONGBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t5 (a TEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t6 (a TINYTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t7 (a MEDIUMTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t8 (a LONGTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t9 (a VARCHAR(10000) COMPRESSED) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t10 (a VARBINARY(10000) COMPRESSED) ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009");
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
---------------------------------------data on master-----------------------------------------------------------
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
0 M,compressed
1000 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
108
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10 12-12-2009 M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
100
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
6 qwerty M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
120
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
3000 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
92
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
80
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
84
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
10000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
8 00-00-00 M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
120
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
2000 vvvvvvvvvv M,compressed
5 April M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
88
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
100 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
254 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
80
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,compressed
1000 aaaaaaaaaa M,compressed
200 vvvvvvvvvv M,compressed
300 rrrrrrrrrr M,compressed
NULL NULL M,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
84
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 29
COLUMN_DECOMPRESSIONS 58
---------------------------------------data on slave-------------------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
0 S,not compressed
1000 aaaaaaaaaa S,not compressed
2000 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
3364
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10 12-12-2009 S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
1564
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
6 qwerty S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
10576
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
3000 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
3344
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
254 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
596
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
1544
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
10000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
8 00-00-00 S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
10576
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
2000 vvvvvvvvvv S,not compressed
5 April S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
2156
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
100 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
254 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
596
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,not compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,not compressed
1000 aaaaaaaaaa S,not compressed
200 vvvvvvvvvv S,not compressed
300 rrrrrrrrrr S,not compressed
NULL NULL S,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
1544
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 0
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
FLUSH STATUS;
-----------------------------------------------------------------------------------------------------------------
-----------------------------------NOT COMPRESSED to COMPRESSED--------------------------------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
FLUSH STATUS;
CREATE TABLE t1 (a BLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t2 (a TINYBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t3 (a MEDIUMBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t4 (a LONGBLOB COMPRESSED) ENGINE=myisam;
CREATE TABLE t5 (a TEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t6 (a TINYTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t7 (a MEDIUMTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t8 (a LONGTEXT COMPRESSED) ENGINE=myisam;
CREATE TABLE t9 (a VARCHAR(10000) COMPRESSED) ENGINE=myisam;
CREATE TABLE t10 (a VARBINARY(10000) COMPRESSED) ENGINE=myisam;
connection master;
CREATE TABLE IF NOT EXISTS t1 (a BLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t2 (a TINYBLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t3 (a MEDIUMBLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t4 (a LONGBLOB) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t5 (a TEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t6 (a TINYTEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t7 (a MEDIUMTEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t8 (a LONGTEXT) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t9 (a VARCHAR(10000)) ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t10 (a VARBINARY(10000)) ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t2(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t3(a) VALUES(REPEAT('a',100)),(REPEAT('v',2000)),("April"),(NULL);
INSERT INTO t4(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("00-00-00");
INSERT INTO t5(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL);
INSERT INTO t6(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',254)),(NULL);
INSERT INTO t7(a) VALUES(REPEAT('a',100)),(REPEAT('v',200)),(REPEAT('r',3000)),(NULL);
INSERT INTO t8(a) VALUES(REPEAT('a',10000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("qwerty");
INSERT INTO t9(a) VALUES(REPEAT('a',1000)),(REPEAT('v',200)),(REPEAT('r',300)),(NULL),("12-12-2009");
INSERT INTO t10(a) VALUES(REPEAT('a',1000)),(REPEAT('v',2000)),(REPEAT('r',300)),(NULL), ("");
-----------------------------------data on master---------------------------------------------------------------
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
0 M,not compressed
1000 aaaaaaaaaa M,not compressed
2000 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
3364
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10 12-12-2009 M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
1564
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
6 qwerty M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
10576
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
3000 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
3344
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
254 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
596
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
1544
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
10000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
8 00-00-00 M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
10576
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
2000 vvvvvvvvvv M,not compressed
5 April M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
2156
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
100 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
254 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
596
SELECT LENGTH(a),SUBSTRING(a,1,10), "M,not compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) M,not compressed
1000 aaaaaaaaaa M,not compressed
200 vvvvvvvvvv M,not compressed
300 rrrrrrrrrr M,not compressed
NULL NULL M,not compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
1544
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 0
-----------------------------------data on slave-----------------------------------------------------------------
connection slave;
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t10;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
0 S,compressed
1000 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t10';
DATA_LENGTH
108
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t9;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10 12-12-2009 S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t9';
DATA_LENGTH
100
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t8;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
6 qwerty S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t8';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t7;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
3000 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t7';
DATA_LENGTH
92
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t6;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t6';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t5;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t5';
DATA_LENGTH
84
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t4;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
10000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
8 00-00-00 S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t4';
DATA_LENGTH
120
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t3;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
2000 vvvvvvvvvv S,compressed
5 April S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t3';
DATA_LENGTH
88
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t2;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
100 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
254 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t2';
DATA_LENGTH
80
SELECT LENGTH(a), SUBSTRING(a,1,10), "S,compressed" from t1;
LENGTH(a) SUBSTRING(a,1,10) S,compressed
1000 aaaaaaaaaa S,compressed
200 vvvvvvvvvv S,compressed
300 rrrrrrrrrr S,compressed
NULL NULL S,compressed
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
DATA_LENGTH
84
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
VARIABLE_NAME VARIABLE_VALUE
COLUMN_COMPRESSIONS 0
COLUMN_DECOMPRESSIONS 58
connection master;
DROP TABLE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10;
-----------------------------------------------------------------------------------------------------------------
------varchar(1000)->varchar(999) compressed, varchar(1000) compressed->varchar(999) ----------------------------
-----------------------------------------------------------------------------------------------------------------
connection slave;
CREATE TABLE t1 (a VARCHAR(999) COMPRESSED) ENGINE=myisam;
CREATE TABLE t2 (a VARCHAR(999)) ENGINE=myisam;
show warnings;
Level Code Message
call mtr.add_suppression("Slave: Data too long for column 'a' at row 1 Error_code: 1406");
call mtr.add_suppression("Slave: Table 't2' already exists Error_code: 1050");
connection master;
CREATE TABLE IF NOT EXISTS t1 (a VARCHAR(1000))ENGINE=myisam;
CREATE TABLE IF NOT EXISTS t2 (a VARCHAR(1000) COMPRESSED)ENGINE=myisam;
INSERT INTO t1(a) VALUES(REPEAT('a',1000));
connection slave;
include/wait_for_slave_sql_error_and_skip.inc [errno=1406,1677]
show warnings;
Level Code Message
connection master;
INSERT INTO t2(a) VALUES(REPEAT('a',1000));
connection slave;
include/wait_for_slave_sql_error_and_skip.inc [errno=1406,1677]
show warnings;
Level Code Message
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
connection master;
DROP TABLE t1,t2;
connection slave;
include/rpl_end.inc
mysql-test/t/column_compression_parts.test
0 → 100644
View file @
2cf3e2ea
--
source
include
/
have_partition
.
inc
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
,
t2
,
t3
,
t4
;
--
enable_warnings
FLUSH
STATUS
;
echo
---------------------------------------
by
range
------------------------------------------
;
CREATE
TABLE
t1
(
i
int
,
a
VARCHAR
(
1000
)
COMPRESSED
DEFAULT
"AAA"
)
PARTITION
BY
RANGE
COLUMNS
(
a
)(
PARTITION
p0
VALUES
LESS
THAN
(
'g'
)
COMMENT
"p0"
,
PARTITION
p1
VALUES
LESS
THAN
(
'm'
),
PARTITION
p2
VALUES
LESS
THAN
(
't'
),
PARTITION
p3
VALUES
LESS
THAN
(
'w'
));
ALTER
TABLE
t1
ADD
PARTITION
(
PARTITION
p4
VALUES
LESS
THAN
(
MAXVALUE
));
INSERT
INTO
t1
VALUES
(
1
,
REPEAT
(
'a'
,
100
)),(
2
,
REPEAT
(
'v'
,
200
)),(
3
,
REPEAT
(
'r'
,
300
)),(
4
,
NULL
);
INSERT
INTO
t1
VALUES
(
5
,
REPEAT
(
'k'
,
500
)),(
6
,
'April'
),(
7
,
7
),(
8
,
""
),(
9
,
"M"
),(
10
,
DEFAULT
);
ALTER
TABLE
t1
ANALYZE
PARTITION
p1
;
ALTER
TABLE
t1
CHECK
PARTITION
p2
;
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
PARTITION
(
p2
)
ORDER
BY
i
;
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
length
(
a
)
>=
300
ORDER
BY
i
;
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
a
like
"%k"
ORDER
BY
i
;
DELETE
FROM
t1
where
a
=
""
;
DELETE
FROM
t1
where
a
=
(
REPEAT
(
'a'
,
100
));
DELETE
FROM
t1
where
a
like
"%v"
;
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
ORDER
BY
i
;
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
a
not
like
"%k"
ORDER
BY
i
;
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
(
a
>
'm'
)
ORDER
BY
i
;
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
(
a
between
'h'
and
'z'
)
and
(
i
=
9
)
ORDER
BY
i
;
EXPLAIN
PARTITIONS
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
(
a
>
'm'
);
EXPLAIN
PARTITIONS
SELECT
i
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
(
a
<
'w'
);
ALTER
TABLE
t1
TRUNCATE
PARTITION
p2
;
ALTER
TABLE
t1
DROP
PARTITION
p0
;
SHOW
CREATE
TABLE
t1
;
ALTER
TABLE
t1
MODIFY
COLUMN
a
VARCHAR
(
1000
);
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
echo
---------------------------------------------------------------------------------------------
;
CREATE
TABLE
t1
(
a
VARCHAR
(
1000
)
COMPRESSED
NOT
NULL
,
id
INT
)
PARTITION
BY
RANGE
COLUMNS
(
id
,
a
)(
PARTITION
p0
VALUES
LESS
THAN
(
100
,
'sss'
),
PARTITION
p1
VALUES
LESS
THAN
(
MAXVALUE
,
MAXVALUE
));
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
100
),
23
),(
REPEAT
(
'v'
,
100
),
123
),(
REPEAT
(
'z'
,
100
),
24
),(
REPEAT
(
'k'
,
100
),
124
);
SELECT
id
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
order
by
id
;
SELECT
*
from
t1
partition
(
p0
);
SELECT
*
from
t1
partition
(
p1
);
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
100
),
101
);
SELECT
*
from
t1
partition
(
p0
);
SELECT
*
from
t1
partition
(
p1
);
ALTER
TABLE
t1
DROP
PARTITION
p1
;
SELECT
id
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
WHERE
id
<
50
order
by
id
;
--
error
ER_NO_PARTITION_FOR_GIVEN_VALUE
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
100
),
101
);
ALTER
TABLE
t1
ALTER
COLUMN
a
SET
DEFAULT
'qwerty'
;
ALTER
TABLE
t1
ALTER
COLUMN
a
DROP
DEFAULT
;
ALTER
TABLE
t1
MODIFY
COLUMN
a
VARCHAR
(
1000
);
ALTER
TABLE
t1
ALTER
COLUMN
a
DROP
DEFAULT
;
INSERT
INTO
t1
VALUES
(
REPEAT
(
'b'
,
100
),
11
);
--
error
ER_NO_DEFAULT_FOR_FIELD
INSERT
INTO
t1
VALUES
(
default
,
10
);
ALTER
TABLE
t1
MODIFY
COLUMN
a
VARCHAR
(
1000
)
COMPRESSED
;
SHOW
CREATE
TABLE
t1
;
SELECT
*
from
t1
ORDER
BY
id
;
DROP
TABLE
t1
;
echo
----------------------------
1
partition
--------------------------------------------------
;
CREATE
TABLE
t1
(
a
VARCHAR
(
1000
)
COMPRESSED
DEFAULT
"10-12-2010"
)
PARTITION
BY
RANGE
COLUMNS
(
a
)
(
partition
p0
VALUES
LESS
THAN
(
MAXVALUE
));
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
100
)),
(
REPEAT
(
'v'
,
200
)),
(
REPEAT
(
'Z'
,
300
)),(
NULL
),(
DEFAULT
);
INSERT
INTO
t1
VALUES
(
DEFAULT
),(
REPEAT
(
'b'
,
200
)),(
REPEAT
(
'q'
,
300
)),(
DEFAULT
),(
"MAY"
);
--
sorted_result
SELECT
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
;
echo
-----------------------------------------
by
key
------------------------------------------
;
ALTER
TABLE
t1
PARTITION
BY
KEY
(
a
)
PARTITIONS
6
;
SHOW
CREATE
TABLE
t1
;
UPDATE
t1
SET
a
=
"NEW"
where
length
(
a
)
<
20
;
--
sorted_result
SELECT
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
;
CREATE
TABLE
t2
(
a
VARBINARY
(
1000
)
COMPRESSED
)
PARTITION
BY
KEY
(
a
)
PARTITIONS
3
;
ALTER
TABLE
t2
PARTITION
BY
LINEAR
KEY
ALGORITHM
=
2
(
a
)
PARTITIONS
32
;
INSERT
INTO
t2
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
6
)),(
REPEAT
(
'z'
,
13
)),(
REPEAT
(
'k'
,
900
));
--
sorted_result
SELECT
SUBSTRING
(
a
,
1
,
10
)
FROM
t2
;
CREATE
TABLE
t3
(
a
VARCHAR
(
1000
)
COMPRESSED
DEFAULT
NULL
)
PARTITION
BY
LINEAR
KEY
(
a
)
PARTITIONS
3
;
INSERT
INTO
t3
VALUES
(
REPEAT
(
'a'
,
100
)),(
REPEAT
(
'v'
,
100
)),(
NULL
),(
REPEAT
(
'k'
,
100
)),(
DEFAULT
);
--
sorted_result
SELECT
SUBSTRING
(
a
,
1
,
10
)
FROM
t3
where
a
<>
NULL
;
CREATE
TABLE
t4
(
a
VARBINARY
(
1000
)
COMPRESSED
NOT
NULL
DEFAULT
0
COMMENT
"QQ"
)
PARTITION
BY
LINEAR
KEY
(
a
)
PARTITIONS
3
;
INSERT
INTO
t4
VALUES
(
REPEAT
(
'a'
,
100
)),(
'0'
),(
DEFAULT
),(
DEFAULT
),(
REPEAT
(
'v'
,
100
)),(
REPEAT
(
'k'
,
100
));
--
sorted_result
SELECT
SUBSTRING
(
a
,
1
,
10
)
FROM
t4
where
length
(
a
)
>
3
;
DROP
TABLE
t1
,
t2
,
t3
,
t4
;
echo
-----------------------------------
subpartitions
------------------------------------------
;
CREATE
TABLE
t1
(
a
VARCHAR
(
1000
)
COMPRESSED
,
id
INT
NOT
NULL
)
PARTITION
BY
RANGE
(
id
)
SUBPARTITION
BY
KEY
(
a
)
SUBPARTITIONS
4
(
PARTITION
p0
VALUES
LESS
THAN
(
5
),
PARTITION
p1
VALUES
LESS
THAN
(
MAXVALUE
));
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
100
),
23
),(
REPEAT
(
'v'
,
100
),
123
),(
REPEAT
(
'z'
,
100
),
24
),(
REPEAT
(
'k'
,
100
),
124
);
SELECT
id
,
SUBSTRING
(
a
,
1
,
10
)
FROM
t1
where
a
=
(
REPEAT
(
'k'
,
100
))
order
by
id
;
DROP
TABLE
t1
;
echo
-------------------------------------------------------------------------------------------
;
--
error
ER_BLOB_FIELD_IN_PART_FUNC_ERROR
CREATE
TABLE
t1
(
a
BLOB
COMPRESSED
)
PARTITION
BY
KEY
(
a
)
partitions
30
;
CREATE
TABLE
t1
(
a
VARCHAR
(
200
)
COMPRESSED
)
PARTITION
BY
KEY
(
a
)
partitions
30
;
ALTER
TABLE
t1
COALESCE
PARTITION
20
;
#ALTER TABLE t1 ADD PARTITION (PARTITION pm TABLESPACE = `innodb_file_per_table`); --mdev MDEV-13584
ALTER
TABLE
t1
ADD
PARTITION
(
PARTITION
pm
);
CREATE
TABLE
t2
like
t1
;
ALTER
TABLE
t2
REMOVE
PARTITIONING
;
SHOW
CREATE
TABLE
t1
;
SHOW
CREATE
TABLE
t2
;
ALTER
TABLE
t1
EXCHANGE
PARTITION
pm
WITH
TABLE
t2
;
DROP
TABLE
t1
,
t2
;
echo
-------------------------------------------------------------------------------------------
;
CREATE
TABLE
t1
(
a
BLOB
COMPRESSED
default
5
,
i
int
);
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
100
),
1
),(
REPEAT
(
'v'
,
100
),
2
),(
REPEAT
(
'z'
,
100
),
3
),(
REPEAT
(
'k'
,
100
),
2
),(
2
,
2
);
--
error
ER_BLOB_FIELD_IN_PART_FUNC_ERROR
ALTER
TABLE
t1
PARTITION
BY
KEY
(
a
)
partitions
3
;
ALTER
TABLE
t1
PARTITION
BY
HASH
(
i
)
PARTITIONS
8
;
--
error
ER_PARTITION_WRONG_VALUES_ERROR
ALTER
TABLE
t1
REORGANIZE
PARTITION
p0
INTO
(
PARTITION
s0
VALUES
LESS
THAN
(
1960
),
PARTITION
s1
VALUES
LESS
THAN
(
1970
)
);
SHOW
CREATE
TABLE
t1
;
ALTER
TABLE
t1
REMOVE
PARTITIONING
;
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
a
VARCHAR
(
500
)
COMPRESSED
default
5
,
i
int
)
PARTITION
BY
RANGE
COLUMNS
(
i
)(
PARTITION
p0
VALUES
LESS
THAN
(
10
),
PARTITION
p1
VALUES
LESS
THAN
(
100
),
PARTITION
p2
VALUES
LESS
THAN
(
1000
));
INSERT
INTO
t1
VALUES
(
REPEAT
(
'a'
,
100
),
1
),(
"one"
,
21
),(
REPEAT
(
'3'
,
100
),
34
),(
REPEAT
(
'k'
,
100
),
267
),(
2
,
278
);
ALTER
TABLE
t1
REORGANIZE
PARTITION
p2
INTO
(
PARTITION
p22
VALUES
LESS
THAN
(
MAXVALUE
));
SHOW
CREATE
TABLE
t1
;
ALTER
TABLE
t1
REBUILD
PARTITION
p22
;
DROP
TABLE
t1
;
\ No newline at end of file
mysql-test/t/column_compression_rpl.test
0 → 100644
View file @
2cf3e2ea
--
source
include
/
have_innodb
.
inc
--
source
include
/
master
-
slave
.
inc
--
let
$engine_type
=
myisam
--
let
$engine_type2
=
innodb
--
source
include
/
column_compression_rpl
.
inc
--
let
$engine_type
=
innodb
--
let
$engine_type2
=
innodb
--
source
include
/
column_compression_rpl
.
inc
--
let
$engine_type
=
myisam
--
let
$engine_type2
=
myisam
--
source
include
/
column_compression_rpl
.
inc
--
source
include
/
rpl_end
.
inc
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