According to mysql, the default for this value is 4294967295, meaning
1) you have more than 4 billion reservation and user rows
or 2) the default value for this setting was changed
One thing we can try is reorganizing the query to limit the results more efficiently. Lines 56-70 of lib/db/scheduledb.class.php should look like this:
$sql = 'SELECT res.*, res_users.*, login.fname, login.lname, participant.memberid as participantid, participant.owner'
. ' FROM ' . $this->get_table(TBL_RESERVATIONS) . ' as res'
. ' INNER JOIN ' . $this->get_table(TBL_RESERVATION_USERS) . ' as res_users ON res.resid = res_users.resid'
. ' INNER JOIN ' . $this->get_table(TBL_LOGIN) . ' as login ON res_users.memberid = login.memberid'
. ' LEFT JOIN ' . $this->get_table(TBL_RESERVATION_USERS) . ' as participant ON res.resid = participant.resid AND participant.memberid = ? AND participant.invited = 0'
. ' WHERE ( '
. '( '
. '(start_date >= ? AND start_date <= ?)'
. ' OR '
. '(end_date >= ? AND end_date <= ?)'
. ' )'
. ' OR '
. '(start_date <= ? AND end_date >= ?)'
. ' )'
. ' AND res_users.owner=1';
Try changing it to this:
$sql = 'SELECT res.*, res_users.*, login.fname, login.lname, participant.memberid as participantid, participant.owner'
. ' FROM ' . $this->get_table(TBL_RESERVATIONS) . ' as res'
. ' INNER JOIN ' . $this->get_table(TBL_RESERVATION_USERS) . ' as res_users ON res.resid = res_users.resid AND res_users.owner=1'
. ' INNER JOIN ' . $this->get_table(TBL_LOGIN) . ' as login ON res_users.memberid = login.memberid'
. ' LEFT JOIN ' . $this->get_table(TBL_RESERVATION_USERS) . ' as participant ON res.resid = participant.resid AND participant.memberid = ? AND participant.invited = 0'
. ' WHERE ( '
. '( '
. '(start_date >= ? AND start_date <= ?)'
. ' OR '
. '(end_date >= ? AND end_date <= ?)'
. ' )'
. ' OR '
. '(start_date <= ? AND end_date >= ?)'
. ' )';