Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c1a52878
Commit
c1a52878
authored
Dec 18, 2005
by
kent@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
32c76f4b
63b4ce72
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
102 additions
and
33 deletions
+102
-33
BUILD/Makefile.am
BUILD/Makefile.am
+21
-2
mysql-test/lib/mtr_stress.pl
mysql-test/lib/mtr_stress.pl
+8
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+3
-3
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+10
-2
mysql-test/r/type_time.result
mysql-test/r/type_time.result
+24
-0
mysql-test/t/type_time.test
mysql-test/t/type_time.test
+14
-0
sql-common/my_time.c
sql-common/my_time.c
+22
-6
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+0
-19
sql/sql_class.h
sql/sql_class.h
+0
-1
No files found.
BUILD/Makefile.am
View file @
c1a52878
...
...
@@ -21,27 +21,46 @@ EXTRA_DIST = FINISH.sh \
SETUP.sh
\
autorun.sh
\
check-cpu
\
cleanup
\
compile-alpha
\
compile-alpha-ccc
\
compile-alpha-cxx
\
compile-alpha-debug
\
compile-amd64-debug-max
\
compile-amd64-max
\
compile-darwin-mwcc
\
compile-dist
\
compile-hpux11-parisc2-aCC
\
compile-ia64-debug-max
\
compile-irix-mips64-mipspro
\
compile-pentium
\
compile-pentium-debug
\
compile-pentium-debug-max
\
compile-pentium-debug-max-no-embedded
\
compile-pentium-debug-max-no-ndb
\
compile-pentium-debug-no-bdb
\
compile-pentium-debug-openssl
\
compile-pentium-debug-yassl
\
compile-pentium-gcov
\
compile-pentium-gprof
\
compile-pentium-icc
\
compile-pentium-icc-valgrind-max
\
compile-pentium-icc-yassl
\
compile-pentium-max
\
compile-pentium-myodbc
\
compile-pentium-mysqlfs-debug
\
compile-pentium-pgcc
\
compile-pentium-valgrind-max
\
compile-pentium64-debug
\
compile-pentium64-debug-max
\
compile-pentium64-valgrind-max
\
compile-ppc
\
compile-ppc-debug
\
compile-ppc-debug-max
\
compile-ppc-debug-max-no-ndb
\
compile-ppc-max
\
compile-solaris-sparc
\
compile-solaris-sparc-debug
\
compile-irix-mips64-mipspro
\
compile-hpux11-parisc2-aCC
\
compile-solaris-sparc-forte
\
compile-solaris-sparc-purify
...
...
mysql-test/lib/mtr_stress.pl
View file @
c1a52878
...
...
@@ -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
);
...
...
mysql-test/mysql-test-run.pl
View file @
c1a52878
...
...
@@ -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
=
2
0
;
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
=
"";
...
...
mysql-test/mysql-test-run.sh
View file @
c1a52878
...
...
@@ -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
...
...
mysql-test/r/type_time.result
View file @
c1a52878
...
...
@@ -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'
mysql-test/t/type_time.test
View file @
c1a52878
...
...
@@ -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
(
235959123456
e
-
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
sql-common/my_time.c
View file @
c1a52878
...
...
@@ -575,19 +575,35 @@ my_bool str_to_time(const char *str, uint length, MYSQL_TIME *l_time,
/* Get fractional second part */
if
((
end
-
str
)
>=
2
&&
*
str
==
'.'
&&
my_isdigit
(
&
my_charset_latin1
,
str
[
1
]))
{
uint
field_length
=
5
;
int
field_length
=
5
;
str
++
;
value
=
(
uint
)
(
uchar
)
(
*
str
-
'0'
);
while
(
++
str
!=
end
&&
my_isdigit
(
&
my_charset_latin1
,
str
[
0
])
&&
field_length
--
)
value
=
value
*
10
+
(
uint
)
(
uchar
)
(
*
str
-
'0'
);
if
(
field_length
)
while
(
++
str
!=
end
&&
my_isdigit
(
&
my_charset_latin1
,
*
str
))
{
if
(
field_length
--
>
0
)
value
=
value
*
10
+
(
uint
)
(
uchar
)
(
*
str
-
'0'
);
}
if
(
field_length
>
0
)
value
*=
(
long
)
log_10_int
[
field_length
];
else
if
(
field_length
<
0
)
*
was_cut
=
1
;
date
[
4
]
=
value
;
}
else
date
[
4
]
=
0
;
/* Check for exponent part: E<gigit> | E<sign><digit> */
/* (may occur as result of %g formatting of time value) */
if
((
end
-
str
)
>
1
&&
(
*
str
==
'e'
||
*
str
==
'E'
)
&&
(
my_isdigit
(
&
my_charset_latin1
,
str
[
1
])
||
((
str
[
1
]
==
'-'
||
str
[
1
]
==
'+'
)
&&
(
end
-
str
)
>
2
&&
my_isdigit
(
&
my_charset_latin1
,
str
[
2
]))))
{
*
was_cut
=
1
;
return
1
;
}
if
(
internal_format_positions
[
7
]
!=
255
)
{
/* Read a possible AM/PM */
...
...
sql/ha_ndbcluster.cc
View file @
c1a52878
...
...
@@ -3014,25 +3014,6 @@ void ha_ndbcluster::position(const byte *record)
}
*
buff
++=
0
;
}
size_t
len
=
key_part
->
length
;
const
byte
*
ptr
=
record
+
key_part
->
offset
;
Field
*
field
=
key_part
->
field
;
if
((
field
->
type
()
==
MYSQL_TYPE_VARCHAR
)
&&
((
Field_varstring
*
)
field
)
->
length_bytes
==
1
)
{
/**
* Keys always use 2 bytes length
*/
buff
[
0
]
=
ptr
[
0
];
buff
[
1
]
=
0
;
memcpy
(
buff
+
2
,
ptr
+
1
,
len
);
len
+=
2
;
}
else
{
memcpy
(
buff
,
ptr
,
len
);
}
buff
+=
len
;
}
}
else
...
...
sql/sql_class.h
View file @
c1a52878
...
...
@@ -218,7 +218,6 @@ class MYSQL_LOG: public TC_LOG
uint
file_id
;
uint
open_count
;
// For replication
int
readers_count
;
bool
reset_pending
;
bool
write_error
,
inited
;
bool
need_start_event
;
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment