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
fa94e538
Commit
fa94e538
authored
Aug 04, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
069fb89b
b9da4176
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
20 deletions
+48
-20
mysql-test/include/not_windows.inc
mysql-test/include/not_windows.inc
+2
-2
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+9
-9
mysql-test/r/type_datetime.result
mysql-test/r/type_datetime.result
+10
-0
mysql-test/t/packet.test
mysql-test/t/packet.test
+3
-0
mysql-test/t/query_cache.test
mysql-test/t/query_cache.test
+3
-3
mysql-test/t/rpl_flush_tables.test
mysql-test/t/rpl_flush_tables.test
+4
-1
mysql-test/t/type_datetime.test
mysql-test/t/type_datetime.test
+10
-0
sql-common/my_time.c
sql-common/my_time.c
+7
-5
No files found.
mysql-test/include/not_windows.inc
View file @
fa94e538
--
require
r
/
true
.
require
--
disable_query_log
;
disable_query_log
;
select
convert
(
@@
version_compile_os
using
latin1
)
NOT
IN
(
"Win32"
,
"Win64"
,
"Windows"
)
as
"TRUE"
;
--
enable_query_log
;
enable_query_log
;
mysql-test/r/query_cache.result
View file @
fa94e538
...
...
@@ -941,24 +941,24 @@ KEY `date` (`date`)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('20050326');
INSERT INTO t1 VALUES ('20050325');
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327
0:0:0
';
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327
invalid
';
COUNT(*)
0
Warnings:
Warning 1292 Incorrect datetime value: '20050327
0:0:0
' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050327
0:0:0
' for column 'date' at row 1
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328
0:0:0
';
Warning 1292 Incorrect datetime value: '20050327
invalid
' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050327
invalid
' for column 'date' at row 1
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328
invalid
';
COUNT(*)
0
Warnings:
Warning 1292 Incorrect datetime value: '20050328
0:0:0
' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050328
0:0:0
' for column 'date' at row 1
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327
0:0:0
';
Warning 1292 Incorrect datetime value: '20050328
invalid
' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050328
invalid
' for column 'date' at row 1
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327
invalid
';
COUNT(*)
0
Warnings:
Warning 1292 Incorrect datetime value: '20050327
0:0:0
' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050327
0:0:0
' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050327
invalid
' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050327
invalid
' for column 'date' at row 1
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
...
...
mysql-test/r/type_datetime.result
View file @
fa94e538
...
...
@@ -153,3 +153,13 @@ dt
0000-00-00 00:00:00
0000-00-00 00:00:00
drop table t1;
create table t1 (dt datetime);
insert into t1 values ("20010101T010101");
insert into t1 values ("2001-01-01T01:01:01");
insert into t1 values ("2001-1-1T1:01:01");
select * from t1;
dt
2001-01-01 01:01:01
2001-01-01 01:01:01
2001-01-01 01:01:01
drop table t1;
mysql-test/t/packet.test
View file @
fa94e538
# Embedded server doesn't support external clients
--
source
include
/
not_embedded
.
inc
# Windows fails because it disconnects on too-large packets instead of just
# swallowing them and returning an error
--
source
include
/
not_windows
.
inc
#
# Check protocol handling
...
...
mysql-test/t/query_cache.test
View file @
fa94e538
...
...
@@ -709,9 +709,9 @@ CREATE TABLE t1 (
INSERT
INTO
t1
VALUES
(
'20050326'
);
INSERT
INTO
t1
VALUES
(
'20050325'
);
SELECT
COUNT
(
*
)
FROM
t1
WHERE
date
BETWEEN
'20050326'
AND
'20050327
0:0:0
'
;
SELECT
COUNT
(
*
)
FROM
t1
WHERE
date
BETWEEN
'20050326'
AND
'20050328
0:0:0
'
;
SELECT
COUNT
(
*
)
FROM
t1
WHERE
date
BETWEEN
'20050326'
AND
'20050327
0:0:0
'
;
SELECT
COUNT
(
*
)
FROM
t1
WHERE
date
BETWEEN
'20050326'
AND
'20050327
invalid
'
;
SELECT
COUNT
(
*
)
FROM
t1
WHERE
date
BETWEEN
'20050326'
AND
'20050328
invalid
'
;
SELECT
COUNT
(
*
)
FROM
t1
WHERE
date
BETWEEN
'20050326'
AND
'20050327
invalid
'
;
show
status
like
"Qcache_queries_in_cache"
;
show
status
like
"Qcache_inserts"
;
show
status
like
"Qcache_hits"
;
...
...
mysql-test/t/rpl_flush_tables.test
View file @
fa94e538
...
...
@@ -3,7 +3,10 @@
# RENAME TABLE work with MERGE tables on the slave.
# Test of FLUSH NO_WRITE_TO_BINLOG by the way.
#
source
include
/
master
-
slave
.
inc
;
--
source
include
/
master
-
slave
.
inc
# Skipped on Windows because it can't handle a table underlying an open
# merge table getting renamed.
--
source
include
/
not_windows
.
inc
create
table
t1
(
a
int
);
insert
into
t1
values
(
10
);
...
...
mysql-test/t/type_datetime.test
View file @
fa94e538
...
...
@@ -102,4 +102,14 @@ insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
select
*
from
t1
;
drop
table
t1
;
#
# Bug #7308: ISO-8601 date format not handled correctly
#
create
table
t1
(
dt
datetime
);
insert
into
t1
values
(
"20010101T010101"
);
insert
into
t1
values
(
"2001-01-01T01:01:01"
);
insert
into
t1
values
(
"2001-1-1T1:01:01"
);
select
*
from
t1
;
drop
table
t1
;
# End of 4.1 tests
sql-common/my_time.c
View file @
fa94e538
...
...
@@ -207,7 +207,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
{
/* Found date in internal format (only numbers like YYYYMMDD) */
year_length
=
(
digits
==
4
||
digits
==
8
||
digits
>=
14
)
?
4
:
2
;
field_length
=
year_length
-
1
;
field_length
=
year_length
;
is_internal_format
=
1
;
format_position
=
internal_format_positions
;
}
...
...
@@ -237,6 +237,8 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
start_loop
=
5
;
/* Start with first date part */
}
}
field_length
=
format_position
[
0
]
==
0
?
4
:
2
;
}
/*
...
...
@@ -261,7 +263,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
const
char
*
start
=
str
;
ulong
tmp_value
=
(
uint
)
(
uchar
)
(
*
str
++
-
'0'
);
while
(
str
!=
end
&&
my_isdigit
(
&
my_charset_latin1
,
str
[
0
])
&&
(
!
is_internal_format
||
field_length
--
)
)
--
field_length
)
{
tmp_value
=
tmp_value
*
10
+
(
ulong
)
(
uchar
)
(
*
str
-
'0'
);
str
++
;
...
...
@@ -275,8 +277,8 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
date
[
i
]
=
tmp_value
;
not_zero_date
|=
tmp_value
;
/* Length
-1
of next field */
field_length
=
format_position
[
i
+
1
]
==
0
?
3
:
1
;
/* Length of next field */
field_length
=
format_position
[
i
+
1
]
==
0
?
4
:
2
;
if
((
last_field_pos
=
str
)
==
end
)
{
...
...
@@ -294,7 +296,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
if
(
*
str
==
'.'
)
/* Followed by part seconds */
{
str
++
;
field_length
=
5
;
/* 5 digits after first (=6)
*/
field_length
=
6
;
/* 6 digits
*/
}
continue
;
...
...
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