diff options
author | unknown <anozdrin/alik@ibm.> | 2007-06-07 13:50:22 +0400 |
---|---|---|
committer | unknown <anozdrin/alik@ibm.> | 2007-06-07 13:50:22 +0400 |
commit | 727757d299c2476488543c5758f50ae6e15d4211 (patch) | |
tree | 42589384c4f4a48c1770c087d523b020f2ce80bb /sql/unireg.h | |
parent | e21076463c4c1721bfd7150ff2350d634009755a (diff) | |
download | mariadb-git-727757d299c2476488543c5758f50ae6e15d4211.tar.gz |
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).
Diffstat (limited to 'sql/unireg.h')
-rw-r--r-- | sql/unireg.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/unireg.h b/sql/unireg.h index 886b3d99212..0f7c1709c6c 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -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)) |