• gkodinov/kgeorge@magare.gmz's avatar
    Bug #30639: limit offset,rowcount wraps when rowcount >= 2^32 in windows · c2abf960
    gkodinov/kgeorge@magare.gmz 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) 
    c2abf960
select.result 114 KB