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
50a1629f
Commit
50a1629f
authored
Apr 07, 2011
by
Sunanda Menon
Browse files
Options
Browse Files
Download
Plain Diff
Merge from mysql-5.5.11-release
parents
c04a6bcb
6d849b93
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
254 additions
and
195 deletions
+254
-195
mysql-test/r/innodb_mysql_lock.result
mysql-test/r/innodb_mysql_lock.result
+22
-0
mysql-test/r/innodb_mysql_sync.result
mysql-test/r/innodb_mysql_sync.result
+4
-71
mysql-test/r/plugin_auth.result
mysql-test/r/plugin_auth.result
+47
-0
mysql-test/t/innodb_mysql_lock.test
mysql-test/t/innodb_mysql_lock.test
+32
-0
mysql-test/t/innodb_mysql_sync.test
mysql-test/t/innodb_mysql_sync.test
+126
-122
mysql-test/t/plugin_auth.test
mysql-test/t/plugin_auth.test
+22
-0
scripts/mysql_system_tables_fix.sql
scripts/mysql_system_tables_fix.sql
+1
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+0
-2
No files found.
mysql-test/r/innodb_mysql_lock.result
View file @
50a1629f
...
...
@@ -148,3 +148,25 @@ COMMIT;
# Connection default
DROP TABLE t1, t2;
DROP VIEW v1;
#
# Bug#11815600 [ERROR] INNODB COULD NOT FIND INDEX PRIMARY
# KEY NO 0 FOR TABLE IN ERROR LOG
#
DROP TABLE IF EXISTS t1;
# Connection default
CREATE TABLE t1 (id INT PRIMARY KEY, value INT) ENGINE = InnoDB;
INSERT INTO t1 VALUES (1, 12345);
START TRANSACTION;
SELECT * FROM t1;
id value
1 12345
# Connection con1
SET lock_wait_timeout=1;
ALTER TABLE t1 ADD INDEX idx(value);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
# Connection default
SELECT * FROM t1;
id value
1 12345
COMMIT;
DROP TABLE t1;
mysql-test/r/innodb_mysql_sync.result
View file @
50a1629f
...
...
@@ -94,74 +94,7 @@ SET DEBUG_SYNC= 'RESET';
# Bug#42230 during add index, cannot do queries on storage engines
# that implement add_index
#
DROP DATABASE IF EXISTS db1;
DROP TABLE IF EXISTS t1;
# Test 1: Secondary index, should not block reads (original test case).
# Connection default
CREATE DATABASE db1;
CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb;
INSERT INTO db1.t1(value) VALUES (1), (2);
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
# Sending:
ALTER TABLE db1.t1 ADD INDEX(value);
# Connection con1
SET DEBUG_SYNC= "now WAIT_FOR manage";
USE db1;
SELECT * FROM t1;
id value
1 1
2 2
SET DEBUG_SYNC= "now SIGNAL query";
# Connection default
# Reaping: ALTER TABLE db1.t1 ADD INDEX(value)
DROP DATABASE db1;
# Test 2: Primary index (implicit), should block reads.
CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
# Sending:
ALTER TABLE t1 ADD UNIQUE INDEX(a);
# Connection con1
SET DEBUG_SYNC= "now WAIT_FOR manage";
USE test;
# Sending:
SELECT * FROM t1;
# Connection con2
# Waiting for SELECT to be blocked by the metadata lock on t1
SET DEBUG_SYNC= "now SIGNAL query";
# Connection default
# Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
# Connection con1
# Reaping: SELECT * FROM t1
a b
# Test 3: Primary index (explicit), should block reads.
# Connection default
ALTER TABLE t1 DROP INDEX a;
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
# Sending:
ALTER TABLE t1 ADD PRIMARY KEY (a);
# Connection con1
SET DEBUG_SYNC= "now WAIT_FOR manage";
# Sending:
SELECT * FROM t1;
# Connection con2
# Waiting for SELECT to be blocked by the metadata lock on t1
SET DEBUG_SYNC= "now SIGNAL query";
# Connection default
# Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
# Connection con1
# Reaping: SELECT * FROM t1
a b
# Test 4: Secondary unique index, should not block reads.
# Connection default
SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
# Sending:
ALTER TABLE t1 ADD UNIQUE (b);
# Connection con1
SET DEBUG_SYNC= "now WAIT_FOR manage";
SELECT * FROM t1;
a b
SET DEBUG_SYNC= "now SIGNAL query";
# Connection default
# Reaping: ALTER TABLE t1 ADD UNIQUE (b)
SET DEBUG_SYNC= "RESET";
DROP TABLE t1;
#
# DISABLED due to Bug#11815600
#
mysql-test/r/plugin_auth.result
View file @
50a1629f
...
...
@@ -400,4 +400,51 @@ ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME
YES authentication_string
YES plugin
#
# Bug #11936829: diff. between mysql.user (authentication_string)
# in fresh and upgraded 5.5.11
#
SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND
COLUMN_NAME IN ('plugin', 'authentication_string')
ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME
YES authentication_string
YES plugin
ALTER TABLE mysql.user MODIFY plugin char(64) DEFAULT '' NOT NULL;
ALTER TABLE mysql.user MODIFY authentication_string TEXT NOT NULL;
Run mysql_upgrade on a 5.5.10 external authentication column layout
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA= 'mysql' AND TABLE_NAME= 'user' AND
COLUMN_NAME IN ('plugin', 'authentication_string')
ORDER BY COLUMN_NAME;
IS_NULLABLE COLUMN_NAME
YES authentication_string
YES plugin
End of 5.5 tests
mysql-test/t/innodb_mysql_lock.test
View file @
50a1629f
...
...
@@ -279,6 +279,38 @@ disconnect con2;
disconnect
con3
;
--
echo
#
--
echo
# Bug#11815600 [ERROR] INNODB COULD NOT FIND INDEX PRIMARY
--
echo
# KEY NO 0 FOR TABLE IN ERROR LOG
--
echo
#
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
--
connect
(
con1
,
localhost
,
root
)
--
echo
# Connection default
connection
default
;
CREATE
TABLE
t1
(
id
INT
PRIMARY
KEY
,
value
INT
)
ENGINE
=
InnoDB
;
INSERT
INTO
t1
VALUES
(
1
,
12345
);
START
TRANSACTION
;
SELECT
*
FROM
t1
;
--
echo
# Connection con1
--
connection
con1
SET
lock_wait_timeout
=
1
;
--
error
ER_LOCK_WAIT_TIMEOUT
ALTER
TABLE
t1
ADD
INDEX
idx
(
value
);
--
echo
# Connection default
--
connection
default
SELECT
*
FROM
t1
;
COMMIT
;
DROP
TABLE
t1
;
disconnect
con1
;
# Check that all connections opened by test cases in this file are really
# gone so execution of other tests won't be affected by their presence.
--
source
include
/
wait_until_count_sessions
.
inc
mysql-test/t/innodb_mysql_sync.test
View file @
50a1629f
...
...
@@ -152,129 +152,133 @@ disconnect con1;
--
echo
# that implement add_index
--
echo
#
--
disable_warnings
DROP
DATABASE
IF
EXISTS
db1
;
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
connect
(
con1
,
localhost
,
root
);
connect
(
con2
,
localhost
,
root
);
--
echo
# Test 1: Secondary index, should not block reads (original test case).
--
echo
# Connection default
connection
default
;
CREATE
DATABASE
db1
;
CREATE
TABLE
db1
.
t1
(
id
INT
NOT
NULL
AUTO_INCREMENT
PRIMARY
KEY
,
value
INT
)
engine
=
innodb
;
INSERT
INTO
db1
.
t1
(
value
)
VALUES
(
1
),
(
2
);
SET
DEBUG_SYNC
=
"alter_table_manage_keys SIGNAL manage WAIT_FOR query"
;
--
echo
# Sending:
--
send
ALTER
TABLE
db1
.
t1
ADD
INDEX
(
value
)
--
echo
# Connection con1
connection
con1
;
SET
DEBUG_SYNC
=
"now WAIT_FOR manage"
;
# Neither of these two statements should be blocked
USE
db1
;
SELECT
*
FROM
t1
;
SET
DEBUG_SYNC
=
"now SIGNAL query"
;
--
echo
# Connection default
connection
default
;
--
echo
# Reaping: ALTER TABLE db1.t1 ADD INDEX(value)
--
reap
DROP
DATABASE
db1
;
--
echo
# Test 2: Primary index (implicit), should block reads.
CREATE
TABLE
t1
(
a
INT
NOT
NULL
,
b
INT
NOT
NULL
)
engine
=
innodb
;
SET
DEBUG_SYNC
=
"alter_table_manage_keys SIGNAL manage WAIT_FOR query"
;
--
echo
# Sending:
--
send
ALTER
TABLE
t1
ADD
UNIQUE
INDEX
(
a
)
--
echo
# Connection con1
connection
con1
;
SET
DEBUG_SYNC
=
"now WAIT_FOR manage"
;
USE
test
;
--
echo
# Sending:
--
send
SELECT
*
FROM
t1
--
echo
# Connection con2
connection
con2
;
--
echo
# Waiting for SELECT to be blocked by the metadata lock on t1
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
information_schema
.
processlist
WHERE
state
=
'Waiting for table metadata lock'
AND
info
=
'SELECT * FROM t1'
;
--
source
include
/
wait_condition
.
inc
SET
DEBUG_SYNC
=
"now SIGNAL query"
;
--
echo
# Connection default
connection
default
;
--
echo
# Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
--
reap
--
echo
# Connection con1
connection
con1
;
--
echo
# Reaping: SELECT * FROM t1
--
reap
--
echo
# Test 3: Primary index (explicit), should block reads.
--
echo
# Connection default
connection
default
;
ALTER
TABLE
t1
DROP
INDEX
a
;
SET
DEBUG_SYNC
=
"alter_table_manage_keys SIGNAL manage WAIT_FOR query"
;
--
echo
# Sending:
--
send
ALTER
TABLE
t1
ADD
PRIMARY
KEY
(
a
)
--
echo
# Connection con1
connection
con1
;
SET
DEBUG_SYNC
=
"now WAIT_FOR manage"
;
--
echo
# Sending:
--
send
SELECT
*
FROM
t1
--
echo
# Connection con2
connection
con2
;
--
echo
# Waiting for SELECT to be blocked by the metadata lock on t1
let
$wait_condition
=
SELECT
COUNT
(
*
)
=
1
FROM
information_schema
.
processlist
WHERE
state
=
'Waiting for table metadata lock'
AND
info
=
'SELECT * FROM t1'
;
--
source
include
/
wait_condition
.
inc
SET
DEBUG_SYNC
=
"now SIGNAL query"
;
--
echo
# Connection default
connection
default
;
--
echo
# Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
--
reap
--
echo
# Connection con1
connection
con1
;
--
echo
# Reaping: SELECT * FROM t1
--
reap
--
echo
# Test 4: Secondary unique index, should not block reads.
--
echo
# Connection default
connection
default
;
SET
DEBUG_SYNC
=
"alter_table_manage_keys SIGNAL manage WAIT_FOR query"
;
--
echo
# Sending:
--
send
ALTER
TABLE
t1
ADD
UNIQUE
(
b
)
--
echo
# Connection con1
connection
con1
;
SET
DEBUG_SYNC
=
"now WAIT_FOR manage"
;
SELECT
*
FROM
t1
;
SET
DEBUG_SYNC
=
"now SIGNAL query"
;
--
echo
# Connection default
connection
default
;
--
echo
# Reaping: ALTER TABLE t1 ADD UNIQUE (b)
--
reap
--
echo
#
--
echo
# DISABLED due to Bug#11815600
--
echo
#
disconnect
con1
;
disconnect
con2
;
SET
DEBUG_SYNC
=
"RESET"
;
DROP
TABLE
t1
;
#--disable_warnings
#DROP DATABASE IF EXISTS db1;
#DROP TABLE IF EXISTS t1;
#--enable_warnings
#
#connect(con1,localhost,root);
#connect(con2,localhost,root);
#
#--echo # Test 1: Secondary index, should not block reads (original test case).
#
#--echo # Connection default
#connection default;
#CREATE DATABASE db1;
#CREATE TABLE db1.t1(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, value INT) engine=innodb;
#INSERT INTO db1.t1(value) VALUES (1), (2);
#SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
#--echo # Sending:
#--send ALTER TABLE db1.t1 ADD INDEX(value)
#
#--echo # Connection con1
#connection con1;
#SET DEBUG_SYNC= "now WAIT_FOR manage";
# # Neither of these two statements should be blocked
#USE db1;
#SELECT * FROM t1;
#SET DEBUG_SYNC= "now SIGNAL query";
#
#--echo # Connection default
#connection default;
#--echo # Reaping: ALTER TABLE db1.t1 ADD INDEX(value)
#--reap
#DROP DATABASE db1;
#
#--echo # Test 2: Primary index (implicit), should block reads.
#
#CREATE TABLE t1(a INT NOT NULL, b INT NOT NULL) engine=innodb;
#SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
#--echo # Sending:
#--send ALTER TABLE t1 ADD UNIQUE INDEX(a)
#
#--echo # Connection con1
#connection con1;
#SET DEBUG_SYNC= "now WAIT_FOR manage";
#USE test;
#--echo # Sending:
#--send SELECT * FROM t1
#
#--echo # Connection con2
#connection con2;
#--echo # Waiting for SELECT to be blocked by the metadata lock on t1
#let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
# WHERE state= 'Waiting for table metadata lock'
# AND info='SELECT * FROM t1';
#--source include/wait_condition.inc
#SET DEBUG_SYNC= "now SIGNAL query";
#
#--echo # Connection default
#connection default;
#--echo # Reaping: ALTER TABLE t1 ADD UNIQUE INDEX(a)
#--reap
#
#--echo # Connection con1
#connection con1;
#--echo # Reaping: SELECT * FROM t1
#--reap
#
#--echo # Test 3: Primary index (explicit), should block reads.
#
#--echo # Connection default
#connection default;
#ALTER TABLE t1 DROP INDEX a;
#SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
#--echo # Sending:
#--send ALTER TABLE t1 ADD PRIMARY KEY (a)
#
#--echo # Connection con1
#connection con1;
#SET DEBUG_SYNC= "now WAIT_FOR manage";
#--echo # Sending:
#--send SELECT * FROM t1
#
#--echo # Connection con2
#connection con2;
#--echo # Waiting for SELECT to be blocked by the metadata lock on t1
#let $wait_condition= SELECT COUNT(*)= 1 FROM information_schema.processlist
# WHERE state= 'Waiting for table metadata lock'
# AND info='SELECT * FROM t1';
#--source include/wait_condition.inc
#SET DEBUG_SYNC= "now SIGNAL query";
#
#--echo # Connection default
#connection default;
#--echo # Reaping: ALTER TABLE t1 ADD PRIMARY KEY (a)
#--reap
#
#--echo # Connection con1
#connection con1;
#--echo # Reaping: SELECT * FROM t1
#--reap
#
#--echo # Test 4: Secondary unique index, should not block reads.
#
#--echo # Connection default
#connection default;
#SET DEBUG_SYNC= "alter_table_manage_keys SIGNAL manage WAIT_FOR query";
#--echo # Sending:
#--send ALTER TABLE t1 ADD UNIQUE (b)
#
#--echo # Connection con1
#connection con1;
#SET DEBUG_SYNC= "now WAIT_FOR manage";
#SELECT * FROM t1;
#SET DEBUG_SYNC= "now SIGNAL query";
#
#--echo # Connection default
#connection default;
#--echo # Reaping: ALTER TABLE t1 ADD UNIQUE (b)
#--reap
#
#disconnect con1;
#disconnect con2;
#SET DEBUG_SYNC= "RESET";
#DROP TABLE t1;
# Check that all connections opened by test cases in this file are really
...
...
mysql-test/t/plugin_auth.test
View file @
50a1629f
...
...
@@ -490,4 +490,26 @@ SELECT IS_NULLABLE, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_SCHEMA
=
'mysql'
ORDER
BY
COLUMN_NAME
;
--
echo
#
--
echo
# Bug #11936829: diff. between mysql.user (authentication_string)
--
echo
# in fresh and upgraded 5.5.11
--
echo
#
SELECT
IS_NULLABLE
,
COLUMN_NAME
FROM
INFORMATION_SCHEMA
.
COLUMNS
WHERE
TABLE_SCHEMA
=
'mysql'
AND
TABLE_NAME
=
'user'
AND
COLUMN_NAME
IN
(
'plugin'
,
'authentication_string'
)
ORDER
BY
COLUMN_NAME
;
ALTER
TABLE
mysql
.
user
MODIFY
plugin
char
(
64
)
DEFAULT
''
NOT
NULL
;
ALTER
TABLE
mysql
.
user
MODIFY
authentication_string
TEXT
NOT
NULL
;
--
echo
Run
mysql_upgrade
on
a
5.5
.
10
external
authentication
column
layout
--
exec
$MYSQL_UPGRADE
--
skip
-
verbose
--
force
2
>&
1
SELECT
IS_NULLABLE
,
COLUMN_NAME
FROM
INFORMATION_SCHEMA
.
COLUMNS
WHERE
TABLE_SCHEMA
=
'mysql'
AND
TABLE_NAME
=
'user'
AND
COLUMN_NAME
IN
(
'plugin'
,
'authentication_string'
)
ORDER
BY
COLUMN_NAME
;
--
echo
End
of
5.5
tests
scripts/mysql_system_tables_fix.sql
View file @
50a1629f
...
...
@@ -642,6 +642,7 @@ drop procedure mysql.die;
ALTER
TABLE
user
ADD
plugin
char
(
64
)
DEFAULT
''
,
ADD
authentication_string
TEXT
;
ALTER
TABLE
user
MODIFY
plugin
char
(
64
)
DEFAULT
''
;
ALTER
TABLE
user
MODIFY
authentication_string
TEXT
;
-- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from
-- older versions
...
...
storage/innobase/handler/ha_innodb.cc
View file @
50a1629f
...
...
@@ -2607,10 +2607,8 @@ innobase_alter_table_flags(
uint
flags
)
{
return
(
HA_INPLACE_ADD_INDEX_NO_READ_WRITE
|
HA_INPLACE_ADD_INDEX_NO_WRITE
|
HA_INPLACE_DROP_INDEX_NO_READ_WRITE
|
HA_INPLACE_ADD_UNIQUE_INDEX_NO_READ_WRITE
|
HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE
|
HA_INPLACE_DROP_UNIQUE_INDEX_NO_READ_WRITE
|
HA_INPLACE_ADD_PK_INDEX_NO_READ_WRITE
);
}
...
...
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