-
unknown authored
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.
0d0d804f