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
315e90d4
Commit
315e90d4
authored
Jun 02, 2011
by
Vinay Fisrekar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correcting "innodb_prefix_index_liftedlimit" failure for embedded mode run.
Separating out sub-test.
parent
f67de030
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
220 additions
and
178 deletions
+220
-178
mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result
...est/suite/innodb/r/innodb_prefix_index_liftedlimit.result
+1
-86
mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
.../suite/innodb/r/innodb_prefix_index_restart_server.result
+91
-0
mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
...-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
+3
-92
mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
...st/suite/innodb/t/innodb_prefix_index_restart_server.test
+125
-0
No files found.
mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result
View file @
315e90d4
set global innodb_file_format="Barracuda";
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
DROP TABLE IF EXISTS worklog5743;
CREATE TABLE worklog5743 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(3072))
...
...
@@ -874,92 +875,6 @@ COUNT(*)
COMMIT;
DROP TABLE worklog5743;
CREATE TABLE worklog5743 (
col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
PRIMARY KEY (col_1_text(3072))
) ROW_FORMAT=DYNAMIC, engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500));
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
"In connection 2"
START TRANSACTION;
INSERT INTO worklog5743 VALUES(REPEAT("b", 3500) , REPEAT("o", 3500));
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
START TRANSACTION;
"In connection default ....restarting the server"
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
START TRANSACTION;
INSERT INTO worklog5743 VALUES(REPEAT("b", 3500) , REPEAT("o", 3500));
DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 3500);
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection default ....restarting the server"
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
START TRANSACTION;
UPDATE worklog5743 SET col_1_text = REPEAT("b", 3500) WHERE col_1_text = REPEAT("a", 3500);
SELECT col_1_text = REPEAT("b", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("b", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection default ....restarting the server"
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
DROP TABLE worklog5743;
set global innodb_file_format="Barracuda";
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
CREATE TABLE worklog5743 (
col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) ,
PRIMARY KEY (col_1_varchar(3072))
) ROW_FORMAT=DYNAMIC, engine = innodb;
...
...
mysql-test/suite/innodb/r/innodb_prefix_index_restart_server.result
0 → 100644
View file @
315e90d4
set global innodb_file_format="Barracuda";
set global innodb_file_per_table=1;
set global innodb_large_prefix=1;
DROP TABLE IF EXISTS worklog5743;
CREATE TABLE worklog5743 (
col_1_text TEXT(4000) , col_2_text TEXT(4000) ,
PRIMARY KEY (col_1_text(3072))
) ROW_FORMAT=DYNAMIC, engine = innodb;
INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500));
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
"In connection 2"
START TRANSACTION;
INSERT INTO worklog5743 VALUES(REPEAT("b", 3500) , REPEAT("o", 3500));
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
START TRANSACTION;
"In connection default ....restarting the server"
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
START TRANSACTION;
INSERT INTO worklog5743 VALUES(REPEAT("b", 3500) , REPEAT("o", 3500));
DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 3500);
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection default ....restarting the server"
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection 1"
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
START TRANSACTION;
UPDATE worklog5743 SET col_1_text = REPEAT("b", 3500) WHERE col_1_text = REPEAT("a", 3500);
SELECT col_1_text = REPEAT("b", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("b", 3500) col_2_text = REPEAT("o", 3500)
1 1
"In connection default ....restarting the server"
SELECT COUNT(*) FROM worklog5743;
COUNT(*)
1
SELECT col_1_text = REPEAT("a", 3500) , col_2_text = REPEAT("o", 3500) FROM
worklog5743;
col_1_text = REPEAT("a", 3500) col_2_text = REPEAT("o", 3500)
1 1
DROP TABLE worklog5743;
SET GLOBAL innodb_file_format=Antelope;
SET GLOBAL innodb_file_per_table=0;
SET GLOBAL innodb_file_format_max=Antelope;
SET GLOBAL innodb_large_prefix=0;
mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test
View file @
315e90d4
...
...
@@ -26,7 +26,9 @@ set global innodb_file_format="Barracuda";
set
global
innodb_file_per_table
=
1
;
set
global
innodb_large_prefix
=
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
worklog5743
;
--
enable_warnings
#------------------------------------------------------------------------------
# Prefix index with VARCHAR data type , primary/secondary index and DML ops
CREATE
TABLE
worklog5743
(
...
...
@@ -848,97 +850,6 @@ COMMIT;
DROP
TABLE
worklog5743
;
#------------------------------------------------------------------------------
# Stop the server in between when prefix index are created and see if state is
# correct when server is restarted.
# Server is restarted at differnt points.
CREATE
TABLE
worklog5743
(
col_1_text
TEXT
(
4000
)
,
col_2_text
TEXT
(
4000
)
,
PRIMARY
KEY
(
col_1_text
(
3072
))
)
ROW_FORMAT
=
DYNAMIC
,
engine
=
innodb
;
INSERT
INTO
worklog5743
VALUES
(
REPEAT
(
"a"
,
3500
)
,
REPEAT
(
"o"
,
3500
));
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
echo
"In connection 1"
--
connect
(
con1
,
localhost
,
root
,,)
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
--
echo
"In connection 2"
--
connect
(
con2
,
localhost
,
root
,,)
START
TRANSACTION
;
INSERT
INTO
worklog5743
VALUES
(
REPEAT
(
"b"
,
3500
)
,
REPEAT
(
"o"
,
3500
));
--
echo
"In connection 1"
--
connection
con1
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
START
TRANSACTION
;
--
echo
"In connection default ....restarting the server"
--
connection
default
# Restart the server
--
source
include
/
restart_mysqld
.
inc
SELECT
COUNT
(
*
)
FROM
worklog5743
;
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
disconnect
con1
--
disconnect
con2
--
echo
"In connection 1"
--
connect
(
con1
,
localhost
,
root
,,)
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
START
TRANSACTION
;
INSERT
INTO
worklog5743
VALUES
(
REPEAT
(
"b"
,
3500
)
,
REPEAT
(
"o"
,
3500
));
DELETE
FROM
worklog5743
WHERE
col_1_text
=
REPEAT
(
"b"
,
3500
);
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
echo
"In connection default ....restarting the server"
--
connection
default
# Restart the server
--
source
include
/
restart_mysqld
.
inc
SELECT
COUNT
(
*
)
FROM
worklog5743
;
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
disconnect
con1
--
echo
"In connection 1"
--
connect
(
con2
,
localhost
,
root
,,)
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
START
TRANSACTION
;
UPDATE
worklog5743
SET
col_1_text
=
REPEAT
(
"b"
,
3500
)
WHERE
col_1_text
=
REPEAT
(
"a"
,
3500
);
SELECT
col_1_text
=
REPEAT
(
"b"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
echo
"In connection default ....restarting the server"
--
connection
default
# Restart the server
--
source
include
/
restart_mysqld
.
inc
SELECT
COUNT
(
*
)
FROM
worklog5743
;
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
DROP
TABLE
worklog5743
;
#------------------------------------------------------------------------------
# Reset variables at server was restarted in previous case
set
global
innodb_file_format
=
"Barracuda"
;
set
global
innodb_file_per_table
=
1
;
set
global
innodb_large_prefix
=
1
;
#------------------------------------------------------------------------------
# Select queries on prefix index column as index will be used in queries.
# Use few select functions , join condition , subqueries.
...
...
mysql-test/suite/innodb/t/innodb_prefix_index_restart_server.test
0 → 100644
View file @
315e90d4
######## suite/innodb/t/innodb_prefix_iindex_restart_server.test #####
# #
# Testcase for worklog WL#5743: Lift the limit of index key prefixes #
# Test scenario : Stop the server in between when prefix index are #
# created and see if state is preserved after restart #
# #
# Creation: #
# 2011-06-02 Implemented this test as part of WL#5743 #
# #
######################################################################
# Test restart the server and "shutdown_server" looks for pid file
# which is not there with embedded mode
--
source
include
/
not_embedded
.
inc
--
source
include
/
have_innodb
.
inc
# Save innodb variables
let
$innodb_file_format_orig
=
`select @@innodb_file_format`
;
let
$innodb_file_per_table_orig
=
`select @@innodb_file_per_table`
;
let
$innodb_file_format_max_orig
=
`select @@innodb_file_format_max`
;
let
$innodb_large_prefix_orig
=
`select @@innodb_large_prefix`
;
# Set Innodb file format as feature works for Barracuda file format
set
global
innodb_file_format
=
"Barracuda"
;
set
global
innodb_file_per_table
=
1
;
set
global
innodb_large_prefix
=
1
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
worklog5743
;
--
enable_warnings
#------------------------------------------------------------------------------
# Stop the server in between when prefix index are created and see if state is
# correct when server is restarted.
# Server is restarted at differnt points.
CREATE
TABLE
worklog5743
(
col_1_text
TEXT
(
4000
)
,
col_2_text
TEXT
(
4000
)
,
PRIMARY
KEY
(
col_1_text
(
3072
))
)
ROW_FORMAT
=
DYNAMIC
,
engine
=
innodb
;
INSERT
INTO
worklog5743
VALUES
(
REPEAT
(
"a"
,
3500
)
,
REPEAT
(
"o"
,
3500
));
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
echo
"In connection 1"
--
connect
(
con1
,
localhost
,
root
,,)
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
--
echo
"In connection 2"
--
connect
(
con2
,
localhost
,
root
,,)
START
TRANSACTION
;
INSERT
INTO
worklog5743
VALUES
(
REPEAT
(
"b"
,
3500
)
,
REPEAT
(
"o"
,
3500
));
--
echo
"In connection 1"
--
connection
con1
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
START
TRANSACTION
;
--
echo
"In connection default ....restarting the server"
--
connection
default
# Restart the server
--
source
include
/
restart_mysqld
.
inc
SELECT
COUNT
(
*
)
FROM
worklog5743
;
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
disconnect
con1
--
disconnect
con2
--
echo
"In connection 1"
--
connect
(
con1
,
localhost
,
root
,,)
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
START
TRANSACTION
;
INSERT
INTO
worklog5743
VALUES
(
REPEAT
(
"b"
,
3500
)
,
REPEAT
(
"o"
,
3500
));
DELETE
FROM
worklog5743
WHERE
col_1_text
=
REPEAT
(
"b"
,
3500
);
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
echo
"In connection default ....restarting the server"
--
connection
default
# Restart the server
--
source
include
/
restart_mysqld
.
inc
SELECT
COUNT
(
*
)
FROM
worklog5743
;
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
disconnect
con1
--
echo
"In connection 1"
--
connect
(
con2
,
localhost
,
root
,,)
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
SELECT
COUNT
(
*
)
FROM
worklog5743
;
START
TRANSACTION
;
UPDATE
worklog5743
SET
col_1_text
=
REPEAT
(
"b"
,
3500
)
WHERE
col_1_text
=
REPEAT
(
"a"
,
3500
);
SELECT
col_1_text
=
REPEAT
(
"b"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
--
echo
"In connection default ....restarting the server"
--
connection
default
# Restart the server
--
source
include
/
restart_mysqld
.
inc
SELECT
COUNT
(
*
)
FROM
worklog5743
;
SELECT
col_1_text
=
REPEAT
(
"a"
,
3500
)
,
col_2_text
=
REPEAT
(
"o"
,
3500
)
FROM
worklog5743
;
DROP
TABLE
worklog5743
;
#------------------------------------------------------------------------------
eval
SET
GLOBAL
innodb_file_format
=
$innodb_file_format_orig
;
eval
SET
GLOBAL
innodb_file_per_table
=
$innodb_file_per_table_orig
;
eval
SET
GLOBAL
innodb_file_format_max
=
$innodb_file_format_max_orig
;
eval
SET
GLOBAL
innodb_large_prefix
=
$innodb_large_prefix_orig
;
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