mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge
This commit is contained in:
@ -145,6 +145,14 @@ sub run_stress_test ()
|
||||
mtr_add_arg($args, "--stress-init-file=%", $::opt_stress_init_file);
|
||||
}
|
||||
|
||||
if ( !$::opt_stress_loop_count && !$::opt_stress_test_count &&
|
||||
!$::opt_stress_test_duration )
|
||||
{
|
||||
#Limit stress testing with 20 loops in case when any limit parameter
|
||||
#was specified
|
||||
$::opt_stress_test_count=20;
|
||||
}
|
||||
|
||||
if ( $::opt_stress_loop_count )
|
||||
{
|
||||
mtr_add_arg($args, "--loop-count=%s", $::opt_stress_loop_count);
|
||||
|
@ -277,9 +277,9 @@ our $opt_stress= "";
|
||||
our $opt_stress_suite= "main";
|
||||
our $opt_stress_mode= "random";
|
||||
our $opt_stress_threads= 5;
|
||||
our $opt_stress_test_count= 20;
|
||||
our $opt_stress_loop_count= "";
|
||||
our $opt_stress_test_duration= "";
|
||||
our $opt_stress_test_count= 0;
|
||||
our $opt_stress_loop_count= 0;
|
||||
our $opt_stress_test_duration= 0;
|
||||
our $opt_stress_init_file= "";
|
||||
our $opt_stress_test_file= "";
|
||||
|
||||
|
@ -280,7 +280,7 @@ DO_STRESS=""
|
||||
STRESS_SUITE="main"
|
||||
STRESS_MODE="random"
|
||||
STRESS_THREADS=5
|
||||
STRESS_TEST_COUNT=20
|
||||
STRESS_TEST_COUNT=""
|
||||
STRESS_LOOP_COUNT=""
|
||||
STRESS_TEST_DURATION=""
|
||||
STRESS_INIT_FILE=""
|
||||
@ -1917,7 +1917,7 @@ run_stress_test()
|
||||
--stress-basedir=$STRESS_BASEDIR \
|
||||
--server-logs-dir=$STRESS_BASEDIR \
|
||||
--stress-mode=$STRESS_MODE \
|
||||
--mysqltest=$BASEDIR/client/mysqltest \
|
||||
--mysqltest=$CLIENT_BINDIR/mysqltest \
|
||||
--threads=$STRESS_THREADS \
|
||||
--verbose \
|
||||
--cleanup \
|
||||
@ -1928,6 +1928,14 @@ run_stress_test()
|
||||
STRESS_TEST_ARGS="$STRESS_TEST_ARGS --stress-init-file=$STRESS_INIT_FILE"
|
||||
fi
|
||||
|
||||
if [ -z "$STRESS_LOOP_COUNT" -a -z "$STRESS_TEST_COUNT" -a
|
||||
-z "$STRESS_TEST_DURATION" ] ; then
|
||||
|
||||
#Limit stress testing with 20 loops in case when any limit parameter
|
||||
#was specified
|
||||
STRESS_TEST_COUNT=20
|
||||
fi
|
||||
|
||||
if [ -n "$STRESS_LOOP_COUNT" ] ; then
|
||||
STRESS_TEST_ARGS="$STRESS_TEST_ARGS --loop-count=$STRESS_LOOP_COUNT"
|
||||
fi
|
||||
|
@ -85,3 +85,27 @@ sec_to_time(time_to_sec(t))
|
||||
13:00:00
|
||||
09:00:00
|
||||
drop table t1;
|
||||
SELECT CAST(235959.123456 AS TIME);
|
||||
CAST(235959.123456 AS TIME)
|
||||
23:59:59.123456
|
||||
SELECT CAST(0.235959123456e+6 AS TIME);
|
||||
CAST(0.235959123456e+6 AS TIME)
|
||||
23:59:59.123456
|
||||
SELECT CAST(235959123456e-6 AS TIME);
|
||||
CAST(235959123456e-6 AS TIME)
|
||||
23:59:59.123456
|
||||
SELECT CAST(235959.1234567 AS TIME);
|
||||
CAST(235959.1234567 AS TIME)
|
||||
23:59:59.123456
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '235959.1234567'
|
||||
SELECT CAST(0.2359591234567e6 AS TIME);
|
||||
CAST(0.2359591234567e6 AS TIME)
|
||||
23:59:59.123456
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '235959.1234567'
|
||||
SELECT CAST(0.2359591234567e+30 AS TIME);
|
||||
CAST(0.2359591234567e+30 AS TIME)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect time value: '2.359591234567e+29'
|
||||
|
@ -21,4 +21,18 @@ select t, time_to_sec(t),sec_to_time(time_to_sec(t)) from t1;
|
||||
select sec_to_time(time_to_sec(t)) from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG #12440: Incorrect processing of time values containing
|
||||
# long fraction part and/or large exponent part.
|
||||
#
|
||||
# These must return normal result:
|
||||
SELECT CAST(235959.123456 AS TIME);
|
||||
SELECT CAST(0.235959123456e+6 AS TIME);
|
||||
SELECT CAST(235959123456e-6 AS TIME);
|
||||
# These must cut fraction part and produce warning:
|
||||
SELECT CAST(235959.1234567 AS TIME);
|
||||
SELECT CAST(0.2359591234567e6 AS TIME);
|
||||
# This must return NULL and produce warning:
|
||||
SELECT CAST(0.2359591234567e+30 AS TIME);
|
||||
|
||||
# End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user