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
47ba5523
Commit
47ba5523
authored
Sep 24, 2021
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "MDEV-24978 : SIGABRT in __libc_message"
This reverts commit
30dea459
.
parent
88a4be75
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
94 deletions
+21
-94
mysql-test/suite/galera/r/galera_fulltext.result
mysql-test/suite/galera/r/galera_fulltext.result
+0
-28
mysql-test/suite/galera/t/galera_fulltext.test
mysql-test/suite/galera/t/galera_fulltext.test
+0
-23
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+21
-43
No files found.
mysql-test/suite/galera/r/galera_fulltext.result
View file @
47ba5523
...
@@ -36,34 +36,6 @@ DROP TABLE t1;
...
@@ -36,34 +36,6 @@ DROP TABLE t1;
DROP TABLE ten;
DROP TABLE ten;
connection node_1;
connection node_1;
SET @value=REPEAT (1,5001);
SET @value=REPEAT (1,5001);
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb;
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_2;
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_1;
DROP TABLE t;
CREATE TABLE t (a VARCHAR(5000)) engine=innodb;
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_2;
SELECT COUNT(*) FROM t;
COUNT(*)
1
connection node_1;
DROP TABLE t;
connection node_1;
SET @value=REPEAT (1,5001);
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb DEFAULT CHARSET=utf8;
CREATE TABLE t (a VARCHAR(5000),FULLTEXT (a)) engine=innodb DEFAULT CHARSET=utf8;
INSERT IGNORE INTO t VALUES(@value);
INSERT IGNORE INTO t VALUES(@value);
Warnings:
Warnings:
...
...
mysql-test/suite/galera/t/galera_fulltext.test
View file @
47ba5523
...
@@ -60,29 +60,6 @@ SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
...
@@ -60,29 +60,6 @@ SELECT COUNT(f1) = 1000 FROM t1 WHERE MATCH(f1) AGAINST ('abcdefjhk');
DROP
TABLE
t1
;
DROP
TABLE
t1
;
DROP
TABLE
ten
;
DROP
TABLE
ten
;
#
# MDEV-24978 : SIGABRT in __libc_message
#
--
connection
node_1
SET
@
value
=
REPEAT
(
1
,
5001
);
CREATE
TABLE
t
(
a
VARCHAR
(
5000
),
FULLTEXT
(
a
))
engine
=
innodb
;
INSERT
IGNORE
INTO
t
VALUES
(
@
value
);
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_2
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_1
DROP
TABLE
t
;
CREATE
TABLE
t
(
a
VARCHAR
(
5000
))
engine
=
innodb
;
INSERT
IGNORE
INTO
t
VALUES
(
@
value
);
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_2
SELECT
COUNT
(
*
)
FROM
t
;
--
connection
node_1
DROP
TABLE
t
;
#
#
# Case 2: UTF-8
# Case 2: UTF-8
...
...
storage/innobase/handler/ha_innodb.cc
View file @
47ba5523
...
@@ -6727,8 +6727,8 @@ wsrep_innobase_mysql_sort(
...
@@ -6727,8 +6727,8 @@ wsrep_innobase_mysql_sort(
case
MYSQL_TYPE_LONG_BLOB
:
case
MYSQL_TYPE_LONG_BLOB
:
case
MYSQL_TYPE_VARCHAR
:
case
MYSQL_TYPE_VARCHAR
:
{
{
uchar
*
tmp_str
;
uchar
tmp_str
[
REC_VERSION_56_MAX_INDEX_COL_LEN
]
=
{
'\0'
}
;
uint
tmp_length
;
uint
tmp_length
=
REC_VERSION_56_MAX_INDEX_COL_LEN
;
/* Use the charset number to pick the right charset struct for
/* Use the charset number to pick the right charset struct for
the comparison. Since the MySQL function get_charset may be
the comparison. Since the MySQL function get_charset may be
...
@@ -6751,12 +6751,7 @@ wsrep_innobase_mysql_sort(
...
@@ -6751,12 +6751,7 @@ wsrep_innobase_mysql_sort(
}
}
}
}
// Note that strnxfrm may change length of string
ut_a
(
str_length
<=
tmp_length
);
tmp_length
=
charset
->
coll
->
strnxfrmlen
(
charset
,
str_length
);
tmp_length
=
tmp_length
*
charset
->
mbmaxlen
;
tmp_length
=
ut_max
(
str_length
,
tmp_length
)
+
charset
->
mbmaxlen
;
tmp_str
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
tmp_length
));
ut_ad
(
str_length
<=
tmp_length
);
memcpy
(
tmp_str
,
str
,
str_length
);
memcpy
(
tmp_str
,
str
,
str_length
);
tmp_length
=
charset
->
coll
->
strnxfrm
(
charset
,
str
,
str_length
,
tmp_length
=
charset
->
coll
->
strnxfrm
(
charset
,
str
,
str_length
,
...
@@ -6780,7 +6775,6 @@ wsrep_innobase_mysql_sort(
...
@@ -6780,7 +6775,6 @@ wsrep_innobase_mysql_sort(
ret_length
=
tmp_length
;
ret_length
=
tmp_length
;
}
}
ut_free
(
tmp_str
);
break
;
break
;
}
}
case
MYSQL_TYPE_DECIMAL
:
case
MYSQL_TYPE_DECIMAL
:
...
@@ -7132,7 +7126,7 @@ wsrep_store_key_val_for_row(
...
@@ -7132,7 +7126,7 @@ wsrep_store_key_val_for_row(
THD
*
thd
,
THD
*
thd
,
TABLE
*
table
,
TABLE
*
table
,
uint
keynr
,
/*!< in: key number */
uint
keynr
,
/*!< in: key number */
u
char
*
buff
,
/*!< in/out: buffer for the key value (in MySQL
char
*
buff
,
/*!< in/out: buffer for the key value (in MySQL
format) */
format) */
uint
buff_len
,
/*!< in: buffer length */
uint
buff_len
,
/*!< in: buffer length */
const
uchar
*
record
,
const
uchar
*
record
,
...
@@ -7141,7 +7135,7 @@ wsrep_store_key_val_for_row(
...
@@ -7141,7 +7135,7 @@ wsrep_store_key_val_for_row(
KEY
*
key_info
=
table
->
key_info
+
keynr
;
KEY
*
key_info
=
table
->
key_info
+
keynr
;
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
KEY_PART_INFO
*
key_part
=
key_info
->
key_part
;
KEY_PART_INFO
*
end
=
key_part
+
key_info
->
user_defined_key_parts
;
KEY_PART_INFO
*
end
=
key_part
+
key_info
->
user_defined_key_parts
;
u
char
*
buff_start
=
buff
;
char
*
buff_start
=
buff
;
enum_field_types
mysql_type
;
enum_field_types
mysql_type
;
Field
*
field
;
Field
*
field
;
uint
buff_space
=
buff_len
;
uint
buff_space
=
buff_len
;
...
@@ -7153,8 +7147,7 @@ wsrep_store_key_val_for_row(
...
@@ -7153,8 +7147,7 @@ wsrep_store_key_val_for_row(
for
(;
key_part
!=
end
;
key_part
++
)
{
for
(;
key_part
!=
end
;
key_part
++
)
{
uchar
*
sorted
=
NULL
;
uchar
sorted
[
REC_VERSION_56_MAX_INDEX_COL_LEN
]
=
{
'\0'
};
uint
max_len
=
0
;
ibool
part_is_null
=
FALSE
;
ibool
part_is_null
=
FALSE
;
if
(
key_part
->
null_bit
)
{
if
(
key_part
->
null_bit
)
{
...
@@ -7233,14 +7226,10 @@ wsrep_store_key_val_for_row(
...
@@ -7233,14 +7226,10 @@ wsrep_store_key_val_for_row(
true_len
=
key_len
;
true_len
=
key_len
;
}
}
max_len
=
true_len
;
sorted
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
max_len
+
1
));
memcpy
(
sorted
,
data
,
true_len
);
memcpy
(
sorted
,
data
,
true_len
);
true_len
=
wsrep_innobase_mysql_sort
(
true_len
=
wsrep_innobase_mysql_sort
(
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
max_len
);
REC_VERSION_56_MAX_INDEX_COL_LEN
);
ut_ad
(
true_len
<=
max_len
);
if
(
wsrep_protocol_version
>
1
)
{
if
(
wsrep_protocol_version
>
1
)
{
/* Note that we always reserve the maximum possible
/* Note that we always reserve the maximum possible
length of the true VARCHAR in the key value, though
length of the true VARCHAR in the key value, though
...
@@ -7325,13 +7314,11 @@ wsrep_store_key_val_for_row(
...
@@ -7325,13 +7314,11 @@ wsrep_store_key_val_for_row(
true_len
=
key_len
;
true_len
=
key_len
;
}
}
max_len
=
true_len
;
sorted
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
max_len
+
1
));
memcpy
(
sorted
,
blob_data
,
true_len
);
memcpy
(
sorted
,
blob_data
,
true_len
);
true_len
=
wsrep_innobase_mysql_sort
(
true_len
=
wsrep_innobase_mysql_sort
(
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
max_len
);
REC_VERSION_56_MAX_INDEX_COL_LEN
);
ut_ad
(
true_len
<=
max_len
);
/* Note that we always reserve the maximum possible
/* Note that we always reserve the maximum possible
length of the BLOB prefix in the key value. */
length of the BLOB prefix in the key value. */
...
@@ -7407,14 +7394,10 @@ wsrep_store_key_val_for_row(
...
@@ -7407,14 +7394,10 @@ wsrep_store_key_val_for_row(
cs
->
mbmaxlen
),
cs
->
mbmaxlen
),
&
error
);
&
error
);
}
}
max_len
=
true_len
;
sorted
=
static_cast
<
uchar
*>
(
ut_malloc_nokey
(
max_len
+
1
));
memcpy
(
sorted
,
src_start
,
true_len
);
memcpy
(
sorted
,
src_start
,
true_len
);
true_len
=
wsrep_innobase_mysql_sort
(
true_len
=
wsrep_innobase_mysql_sort
(
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
mysql_type
,
cs
->
number
,
sorted
,
true_len
,
max_len
);
REC_VERSION_56_MAX_INDEX_COL_LEN
);
ut_ad
(
true_len
<=
max_len
);
if
(
true_len
>
buff_space
)
{
if
(
true_len
>
buff_space
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
...
@@ -7429,11 +7412,6 @@ wsrep_store_key_val_for_row(
...
@@ -7429,11 +7412,6 @@ wsrep_store_key_val_for_row(
buff
+=
true_len
;
buff
+=
true_len
;
buff_space
-=
true_len
;
buff_space
-=
true_len
;
}
}
if
(
sorted
)
{
ut_free
(
sorted
);
sorted
=
NULL
;
}
}
}
ut_a
(
buff
<=
buff_start
+
buff_len
);
ut_a
(
buff
<=
buff_start
+
buff_len
);
...
@@ -10510,7 +10488,7 @@ wsrep_append_key(
...
@@ -10510,7 +10488,7 @@ wsrep_append_key(
trx_t
*
trx
,
trx_t
*
trx
,
TABLE_SHARE
*
table_share
,
TABLE_SHARE
*
table_share
,
TABLE
*
table
,
TABLE
*
table
,
const
u
char
*
key
,
const
char
*
key
,
uint16_t
key_len
,
uint16_t
key_len
,
wsrep_key_type
key_type
/*!< in: access type of this key
wsrep_key_type
key_type
/*!< in: access type of this key
(shared, exclusive, semi...) */
(shared, exclusive, semi...) */
...
@@ -10614,8 +10592,8 @@ ha_innobase::wsrep_append_keys(
...
@@ -10614,8 +10592,8 @@ ha_innobase::wsrep_append_keys(
if
(
wsrep_protocol_version
==
0
)
{
if
(
wsrep_protocol_version
==
0
)
{
uint
len
;
uint
len
;
u
char
keyval
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
char
keyval
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
u
char
*
key
=
&
keyval
[
0
];
char
*
key
=
&
keyval
[
0
];
ibool
is_null
;
ibool
is_null
;
len
=
wsrep_store_key_val_for_row
(
len
=
wsrep_store_key_val_for_row
(
...
@@ -10647,18 +10625,18 @@ ha_innobase::wsrep_append_keys(
...
@@ -10647,18 +10625,18 @@ ha_innobase::wsrep_append_keys(
for
(
i
=
0
;
i
<
table
->
s
->
keys
;
++
i
)
{
for
(
i
=
0
;
i
<
table
->
s
->
keys
;
++
i
)
{
uint
len
;
uint
len
;
u
char
keyval0
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
char
keyval0
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
u
char
keyval1
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
char
keyval1
[
WSREP_MAX_SUPPORTED_KEY_LENGTH
+
1
]
=
{
'\0'
};
u
char
*
key0
=
&
keyval0
[
1
];
char
*
key0
=
&
keyval0
[
1
];
u
char
*
key1
=
&
keyval1
[
1
];
char
*
key1
=
&
keyval1
[
1
];
KEY
*
key_info
=
table
->
key_info
+
i
;
KEY
*
key_info
=
table
->
key_info
+
i
;
ibool
is_null
;
ibool
is_null
;
dict_index_t
*
idx
=
innobase_get_index
(
i
);
dict_index_t
*
idx
=
innobase_get_index
(
i
);
dict_table_t
*
tab
=
(
idx
)
?
idx
->
table
:
NULL
;
dict_table_t
*
tab
=
(
idx
)
?
idx
->
table
:
NULL
;
keyval0
[
0
]
=
(
u
char
)
i
;
keyval0
[
0
]
=
(
char
)
i
;
keyval1
[
0
]
=
(
u
char
)
i
;
keyval1
[
0
]
=
(
char
)
i
;
if
(
!
tab
)
{
if
(
!
tab
)
{
WSREP_WARN
(
"MariaDB-InnoDB key mismatch %s %s"
,
WSREP_WARN
(
"MariaDB-InnoDB key mismatch %s %s"
,
...
@@ -10716,7 +10694,7 @@ ha_innobase::wsrep_append_keys(
...
@@ -10716,7 +10694,7 @@ ha_innobase::wsrep_append_keys(
wsrep_calc_row_hash
(
digest
,
record0
,
table
,
m_prebuilt
,
thd
);
wsrep_calc_row_hash
(
digest
,
record0
,
table
,
m_prebuilt
,
thd
);
if
((
rcode
=
wsrep_append_key
(
thd
,
trx
,
table_share
,
table
,
if
((
rcode
=
wsrep_append_key
(
thd
,
trx
,
table_share
,
table
,
(
const
u
char
*
)
digest
,
16
,
(
const
char
*
)
digest
,
16
,
key_type
)))
{
key_type
)))
{
DBUG_RETURN
(
rcode
);
DBUG_RETURN
(
rcode
);
}
}
...
@@ -10726,7 +10704,7 @@ ha_innobase::wsrep_append_keys(
...
@@ -10726,7 +10704,7 @@ ha_innobase::wsrep_append_keys(
digest
,
record1
,
table
,
m_prebuilt
,
thd
);
digest
,
record1
,
table
,
m_prebuilt
,
thd
);
if
((
rcode
=
wsrep_append_key
(
thd
,
trx
,
table_share
,
if
((
rcode
=
wsrep_append_key
(
thd
,
trx
,
table_share
,
table
,
table
,
(
const
u
char
*
)
digest
,
(
const
char
*
)
digest
,
16
,
key_type
)))
{
16
,
key_type
)))
{
DBUG_RETURN
(
rcode
);
DBUG_RETURN
(
rcode
);
}
}
...
...
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