mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-13232: Assertion `(&(&share->intern_lock)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&share->intern_lock)->m_mutex)->thread)' failed in _ma_state_info_write
Limit length of result of "negative" operation to something reasonable
This commit is contained in:
@ -2500,5 +2500,19 @@ t2 CREATE TABLE `t2` (
|
|||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-13232: Assertion `(&(&share->intern_lock)->m_mutex)->count > 0 &&
|
||||||
|
# pthread_equal(pthread_self(), (&(&share->intern_lock)->m_mutex)->
|
||||||
|
# thread)' failed in _ma_state_info_write
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (c1 CHAR(8));
|
||||||
|
INSERT INTO t1 VALUES ('10'),('-10');
|
||||||
|
CREATE TABLE t2 (c2 CHAR);
|
||||||
|
SET @a= CAST('10' AS CHAR);
|
||||||
|
SELECT c1 FROM t1 UNION SELECT - @a FROM t2;
|
||||||
|
c1
|
||||||
|
10
|
||||||
|
-10
|
||||||
|
drop table t1,t2;
|
||||||
|
#
|
||||||
# End of 10.3 tests
|
# End of 10.3 tests
|
||||||
#
|
#
|
||||||
|
@ -1745,6 +1745,21 @@ SHOW CREATE TABLE t2;
|
|||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-13232: Assertion `(&(&share->intern_lock)->m_mutex)->count > 0 &&
|
||||||
|
--echo # pthread_equal(pthread_self(), (&(&share->intern_lock)->m_mutex)->
|
||||||
|
--echo # thread)' failed in _ma_state_info_write
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (c1 CHAR(8));
|
||||||
|
INSERT INTO t1 VALUES ('10'),('-10');
|
||||||
|
|
||||||
|
CREATE TABLE t2 (c2 CHAR);
|
||||||
|
SET @a= CAST('10' AS CHAR);
|
||||||
|
|
||||||
|
SELECT c1 FROM t1 UNION SELECT - @a FROM t2;
|
||||||
|
|
||||||
|
drop table t1,t2;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.3 tests
|
--echo # End of 10.3 tests
|
||||||
|
@ -1935,6 +1935,9 @@ void Item_func_neg::fix_length_and_dec_double()
|
|||||||
set_handler(&type_handler_double);
|
set_handler(&type_handler_double);
|
||||||
decimals= args[0]->decimals; // Preserve NOT_FIXED_DEC
|
decimals= args[0]->decimals; // Preserve NOT_FIXED_DEC
|
||||||
max_length= args[0]->max_length + 1;
|
max_length= args[0]->max_length + 1;
|
||||||
|
// Limit length with something reasonable
|
||||||
|
uint32 mlen= type_handler()->max_display_length(this);
|
||||||
|
set_if_smaller(max_length, mlen);
|
||||||
unsigned_flag= false;
|
unsigned_flag= false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user