summaryrefslogtreecommitdiff
path: root/include/config-win.h
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-09-19 17:47:52 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-09-19 17:47:52 +0300
commit717dba2422be48471b651e15cf621a7ec9d4afa3 (patch)
treed5f868ae014b7aa5f7b58db9865bfab77f2c0ded /include/config-win.h
parent55335f0dd2c46984b9295883c0b77e0e3053a6eb (diff)
downloadmariadb-git-717dba2422be48471b651e15cf621a7ec9d4afa3.tar.gz
Bug #30639: limit offset,rowcount wraps when rowcount >= 2^32 in windows
The parser uses ulonglong to store the LIMIT number. This number then is stored into a variable of type ha_rows. ha_rows is either 4 or 8 byte depending on the BIG_TABLES define from config.h So an overflow may occur (and LIMIT becomes zero) while storing an ulonglong value in ha_rows. Fixed by : 1. Using the maximum possible value for ha_rows on overflow 2. Defining BIG_TABLES for the windows builds (to match the others) include/config-win.h: Bug #30639: turn on BIG_TABLES for windows mysql-test/r/select.result: Bug #30639: test case mysql-test/t/select.test: Bug #30639: test case sql/sql_lex.cc: Bug #30639: Use the maximum possible number on overflow of LIMIT. This is valid because there won't be more rows anyway.
Diffstat (limited to 'include/config-win.h')
-rw-r--r--include/config-win.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/config-win.h b/include/config-win.h
index bc2ae60f137..2e64e165630 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -15,6 +15,8 @@
/* Defines for Win32 to make it compatible for MySQL */
+#define BIG_TABLES
+
#ifdef __WIN2000__
/* We have to do this define before including windows.h to get the AWE API
functions */