From fda74fceaf899b75cfa170386cafcb83f84007f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 7 Aug 2022 20:36:35 +0200 Subject: [PATCH] Use VARCHAR for string fields up to 65535 characters maximum length. [GB.DB.MYSQL] * BUG: Use VARCHAR for string fields up to 65535 characters maximum length. --- gb.db.mysql/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gb.db.mysql/src/main.c b/gb.db.mysql/src/main.c index db1a76e8a..8cbbd7848 100644 --- a/gb.db.mysql/src/main.c +++ b/gb.db.mysql/src/main.c @@ -1952,7 +1952,7 @@ static int table_create(DB_DATABASE *db, const char *table, DB_FIELD *fields, ch case GB_T_DATE: type = "DATETIME"; break; case GB_T_STRING: - if (fp->length <= 0 || fp->length > 255) //mysql supports upto 255 as varchar + if (fp->length <= 0 || fp->length > 65535) type = "MEDIUMTEXT"; else {