summaryrefslogtreecommitdiff
path: root/include/ma_dyncol.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-11 02:41:02 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-11 02:41:02 +0300
commit052d1bfb1a215d927e31bbe521a7e29d5da8a384 (patch)
tree0181353047727b1dee0e785d3412f0d14d1e1757 /include/ma_dyncol.h
parent03483e7bfd21a61fca796a163376b77cd965870e (diff)
downloadmariadb-git-052d1bfb1a215d927e31bbe521a7e29d5da8a384.tar.gz
Fixed all reported bugs for dynamic columns.
Bugs fixed: - Added automatic detection of unsigned arguments to COLUMN_CREATE() - If string length is not know for COLUMN_GET() use MAX_DYNAMIC_COLUMN_LENGTH instead of MAX_FIELD_BLOBLENGTH - null_value flag was not propery reset for COLUMN_LIST() and COLUMN_CREATE() which could lead to crashes later: - lp:778905 Assertion `value->year <= 9999' failed in dynamic_column_date_store - lp:778912 Assertion `field_pos < field_count' failed in Protocol_text::store in maria-5.3-mwl34 include/ma_dyncol.h: Added define for max dynamic column length. mysql-test/r/cast.result: Added test of cast big unsigned int to signed (this test case was missing) mysql-test/r/dyncol.result: Added tests from reported bugs Added testing of automatic store of signed/unsigned integers mysql-test/t/cast.test: Added test of cast big unsigned int to signed (this test case was missing) mysql-test/t/dyncol.test: Added tests from reported bugs Added testing of automatic store of signed/unsigned integers sql/item.cc: Added assert to catch cases where null_value is not set properly sql/item_strfunc.cc: Added automatic detection of unsigned arguments to COLUMN_CREATE() COLUMN_GET() returned wrong value for illegal strings which lead to assert later null_value flag was not propery reset for COLUMN_LIST() and COLUMN_CREATE() which could lead to crashes later. sql/item_strfunc.h: If string length is not know for COLUMN_GET() use MAX_DYNAMIC_COLUMN_LENGTH
Diffstat (limited to 'include/ma_dyncol.h')
-rw-r--r--include/ma_dyncol.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/ma_dyncol.h b/include/ma_dyncol.h
index 23b77503a33..687823a4e73 100644
--- a/include/ma_dyncol.h
+++ b/include/ma_dyncol.h
@@ -33,6 +33,12 @@
#include <my_decimal_limits.h>
#include <mysql_time.h>
+/*
+ Max length for data in a dynamic colums. This comes from how the
+ how the offset are stored.
+*/
+#define MAX_DYNAMIC_COLUMN_LENGTH 0X1FFFFFFFL
+
/* NO and OK is the same used just to show semantics */
#define ER_DYNCOL_NO ER_DYNCOL_OK