mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#37719: Crash if rename Archive table to same name with different
case and then select Problem was that the archive share was using a case insensitive charset when comparing table names Solution was to use a case sensitive char set when the table names are case sensitive mysql-test/suite/parts/r/partition_mgm_lc0_archive.result: Bug#37719: Crash if rename Archive table to same name with different case and then select Updated to correct result. storage/archive/ha_archive.cc: Bug#37719: Crash if rename Archive table to same name with different case and then select system_charset_info is case insensitive, table_alias_charset depends on the filesystem/lower_case_table_names variable. since there could be two tables that used the same share, unpredicted things could happen.
This commit is contained in:
@ -157,22 +157,10 @@ tablea
|
|||||||
SELECT * FROM tablea;
|
SELECT * FROM tablea;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
10
|
||||||
10
|
|
||||||
11
|
|
||||||
12
|
|
||||||
2
|
2
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE tablea;
|
SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -185,7 +173,6 @@ ALTER TABLE TableA REMOVE PARTITIONING;
|
|||||||
SELECT * FROM TableA;
|
SELECT * FROM TableA;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
10
|
||||||
11
|
11
|
||||||
12
|
12
|
||||||
@ -195,10 +182,7 @@ a
|
|||||||
5
|
5
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
7
|
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE TableA;
|
SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -372,22 +356,10 @@ tablea
|
|||||||
SELECT * FROM tablea;
|
SELECT * FROM tablea;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
10
|
||||||
10
|
|
||||||
11
|
|
||||||
12
|
|
||||||
2
|
2
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE tablea;
|
SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -400,21 +372,16 @@ ALTER TABLE TableA REMOVE PARTITIONING;
|
|||||||
SELECT * FROM TableA;
|
SELECT * FROM TableA;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
|
||||||
10
|
10
|
||||||
11
|
11
|
||||||
12
|
12
|
||||||
2
|
2
|
||||||
2
|
|
||||||
3
|
3
|
||||||
4
|
4
|
||||||
5
|
5
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE TableA;
|
SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -580,22 +547,10 @@ tablea
|
|||||||
SELECT * FROM tablea;
|
SELECT * FROM tablea;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
10
|
||||||
10
|
|
||||||
11
|
|
||||||
12
|
|
||||||
2
|
2
|
||||||
2
|
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE tablea;
|
SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -608,22 +563,16 @@ ALTER TABLE TableA REMOVE PARTITIONING;
|
|||||||
SELECT * FROM TableA;
|
SELECT * FROM TableA;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
|
||||||
10
|
10
|
||||||
11
|
11
|
||||||
12
|
12
|
||||||
2
|
2
|
||||||
2
|
|
||||||
3
|
3
|
||||||
4
|
4
|
||||||
5
|
5
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
7
|
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE TableA;
|
SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -783,19 +732,10 @@ tablea
|
|||||||
SELECT * FROM tablea;
|
SELECT * FROM tablea;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
10
|
||||||
12
|
|
||||||
2
|
2
|
||||||
3
|
|
||||||
4
|
|
||||||
5
|
|
||||||
6
|
|
||||||
7
|
|
||||||
7
|
7
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE tablea;
|
SHOW CREATE TABLE tablea;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
@ -808,19 +748,13 @@ ALTER TABLE TableA REMOVE PARTITIONING;
|
|||||||
SELECT * FROM TableA;
|
SELECT * FROM TableA;
|
||||||
a
|
a
|
||||||
1
|
1
|
||||||
1
|
|
||||||
10
|
|
||||||
12
|
12
|
||||||
2
|
|
||||||
3
|
3
|
||||||
4
|
4
|
||||||
5
|
5
|
||||||
6
|
6
|
||||||
7
|
7
|
||||||
7
|
|
||||||
8
|
8
|
||||||
8
|
|
||||||
9
|
|
||||||
9
|
9
|
||||||
SHOW CREATE TABLE TableA;
|
SHOW CREATE TABLE TableA;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
|
@ -171,7 +171,7 @@ int archive_db_init(void *p)
|
|||||||
|
|
||||||
if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST))
|
if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST))
|
||||||
goto error;
|
goto error;
|
||||||
if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
|
if (hash_init(&archive_open_tables, table_alias_charset, 32, 0, 0,
|
||||||
(hash_get_key) archive_get_key, 0, 0))
|
(hash_get_key) archive_get_key, 0, 0))
|
||||||
{
|
{
|
||||||
VOID(pthread_mutex_destroy(&archive_mutex));
|
VOID(pthread_mutex_destroy(&archive_mutex));
|
||||||
|
Reference in New Issue
Block a user