mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Fix for BUG#27592: stack overrun when storing datetime value
using prepared statements. sql/field.cc: Using MAX_DATETIME_WIDTH or MAX_DATETIME_COMPRESSED_WIDTH constants for the length of DATETIME fields. Using MAX_DATE_STRING_REP_LENGTH for allocating buffers for date/time/... string representation. sql/item_timefunc.cc: Using MAX_DATETIME_WIDTH or MAX_DATETIME_COMPRESSED_WIDTH constants for the length of DATETIME fields. Using MAX_DATE_STRING_REP_LENGTH for allocating buffers for date/time/... string representation. sql/unireg.h: Introduce a constant for length of datetime compressed format (YYYYMMDDHHMMSS).
This commit is contained in:
parent
e21076463c
commit
727757d299
3 changed files with 36 additions and 21 deletions
|
|
@ -71,6 +71,7 @@
|
|||
#define MAX_TIME_WIDTH 23 /* -DDDDDD HH:MM:SS.###### */
|
||||
#define MAX_DATETIME_FULL_WIDTH 29 /* YYYY-MM-DD HH:MM:SS.###### AM */
|
||||
#define MAX_DATETIME_WIDTH 19 /* YYYY-MM-DD HH:MM:SS */
|
||||
#define MAX_DATETIME_COMPRESSED_WIDTH 14 /* YYYYMMDDHHMMSS */
|
||||
|
||||
#define MAX_TABLES (sizeof(table_map)*8-3) /* Max tables in join */
|
||||
#define PARAM_TABLE_BIT (((table_map) 1) << (sizeof(table_map)*8-3))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue