-
Venkatesh Duggirala authored
Problem: WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS, WAIT_FOR_EXECUTED_GTID_SET and MASTER_POS_WAIT functions take an optional "timeout" parameter. When supplied with a timeout parameter that is anything other than a positive integer or zero, the server behaves oddly. Analysis: The timeout parameter was treated and read as positive integer. i.e., -1 became '0', 0.4 became '0', 1.4 becomes '1'. Hence the server was behaving wrongly with the negative and fractional timeout values. Fix: For negative values, > If SQL_MODE is strict mode then it will throw ER_WRONG_PARAMETERS error. > If SQL_MODE is non-strict value then it returns NULL immediately without doing any wait and generates ER_WRONG_PARAMETERS warning. For fractional value, > it is read as it is and no rounding off to near by integer i.e., 1.3 will be read as 1.3 and it will wait for 1.3 seconds.
Venkatesh Duggirala authoredProblem: WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS, WAIT_FOR_EXECUTED_GTID_SET and MASTER_POS_WAIT functions take an optional "timeout" parameter. When supplied with a timeout parameter that is anything other than a positive integer or zero, the server behaves oddly. Analysis: The timeout parameter was treated and read as positive integer. i.e., -1 became '0', 0.4 became '0', 1.4 becomes '1'. Hence the server was behaving wrongly with the negative and fractional timeout values. Fix: For negative values, > If SQL_MODE is strict mode then it will throw ER_WRONG_PARAMETERS error. > If SQL_MODE is non-strict value then it returns NULL immediately without doing any wait and generates ER_WRONG_PARAMETERS warning. For fractional value, > it is read as it is and no rounding off to near by integer i.e., 1.3 will be read as 1.3 and it will wait for 1.3 seconds.
Loading