1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

increase max field name

Signed-off-by: Weijun-H <huangweijun1001@gmail.com>
This commit is contained in:
Weijun-H
2022-11-23 09:36:28 +00:00
committed by Nikita Malyavin
parent da03d8d99f
commit bbabdaef31
5 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,9 @@
#
# MDEV-29387: Period name with more than 32 symbols crashes the server
#
# test 34 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890` (s,e));
drop table t2;
# test 64 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890123456789012345678901234567890` (s,e));
drop table t2;

View File

@ -0,0 +1,11 @@
--echo #
--echo # MDEV-29387: Period name with more than 32 symbols crashes the server
--echo #
--echo # test 34 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890` (s,e));
drop table t2;
--echo # test 64 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890123456789012345678901234567890` (s,e));
drop table t2;

View File

@ -100,3 +100,11 @@ show status like "Feature_application_time_periods";
Variable_name Value
Feature_application_time_periods 6
drop table t;
# MDEV-29387: Period name with more than 32 symbols crashes the server
#
# test 34 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890` (s,e));
drop table t2;
# test 64 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890123456789012345678901234567890` (s,e));
drop table t2;

View File

@ -85,3 +85,14 @@ insert t values (2, '2001-01-01', '2001-01-01');
show status like "Feature_application_time_periods";
drop table t;
--echo # MDEV-29387: Period name with more than 32 symbols crashes the server
--echo #
--echo # test 34 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890` (s,e));
drop table t2;
--echo # test 64 symbols
create table t2 (s date, e date, period for `abcd123456789012345678901234567890123456789012345678901234567890` (s,e));
drop table t2;

View File

@ -29,7 +29,7 @@
/* extra 4+4 bytes for slave tmp tables */
#define MAX_DBKEY_LENGTH (NAME_LEN*2+1+1+4+4)
#define MAX_ALIAS_NAME 256
#define MAX_FIELD_NAME 34 /* Max colum name length +2 */
#define MAX_FIELD_NAME (NAME_LEN+1) /* Max colum name length +2 */
#define MAX_SYS_VAR_LENGTH 32
#define MAX_KEY MAX_INDEXES /* Max used keys */
#define MAX_REF_PARTS 32 /* Max parts used as ref */