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
8dcb41d8
Commit
8dcb41d8
authored
Mar 09, 2004
by
jani@ua72d24.elisa.omakaista.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Bug#3115. CAST AS DATE with malformed string returns NULL but IS NULL
is false.
parent
c3920549
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
18 deletions
+32
-18
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/create.result
mysql-test/r/create.result
+7
-7
mysql-test/r/func_sapdb.result
mysql-test/r/func_sapdb.result
+5
-5
sql/item_timefunc.h
sql/item_timefunc.h
+19
-6
No files found.
BitKeeper/etc/logging_ok
View file @
8dcb41d8
...
...
@@ -59,6 +59,7 @@ jani@rhols221.arenanet.fi
jani@ua126d19.elisa.omakaista.fi
jani@ua141d10.elisa.omakaista.fi
jani@ua167d18.elisa.omakaista.fi
jani@ua72d24.elisa.omakaista.fi
jcole@abel.spaceapes.com
jcole@main.burghcom.com
jcole@mugatu.spaceapes.com
...
...
mysql-test/r/create.result
View file @
8dcb41d8
...
...
@@ -104,9 +104,9 @@ drop table t2;
create table t2 select CAST("2001-12-29" AS DATE) as d, CAST("20:45:11" AS TIME) as t, CAST("2001-12-29 20:45:11" AS DATETIME) as dt;
describe t2;
Field Type Null Key Default Extra
d date
0000-00-00
t time
00:00:00
dt datetime
0000-00-00 00:00:00
d date
YES NULL
t time
YES NULL
dt datetime
YES NULL
drop table t1,t2;
create table t1 (a tinyint);
create table t2 (a int) select * from t1;
...
...
@@ -396,12 +396,12 @@ Field Type Null Key Default Extra
a int(11) YES NULL
b bigint(11) 0
c bigint(10) 0
d date
0000-00-00
d date
YES NULL
e char(1)
f datetime
0000-00-00 00:00:00
g time
00:00:00
f datetime
YES NULL
g time
YES NULL
h longblob
dd time
00:00:00
dd time
YES NULL
select * from t2;
a b c d e f g h dd
1 -7 7 2000-01-01 b 2000-01-01 00:00:00 05:04:03 yet another binary data 02:00:00
...
...
mysql-test/r/func_sapdb.result
View file @
8dcb41d8
...
...
@@ -159,14 +159,14 @@ time("1997-12-31 23:59:59.000001") as f9;
describe t1;
Field Type Null Key Default Extra
f1 date 0000-00-00
f2 datetime
0000-00-00 00:00:00
f3 time
00:00:00
f2 datetime
YES NULL
f3 time
YES NULL
f4 time 00:00:00
f5 time 00:00:00
f6 time 00:00:00
f7 datetime
0000-00-00 00:00:00
f8 date
0000-00-00
f9 time
00:00:00
f7 datetime
YES NULL
f8 date
YES NULL
f9 time
YES NULL
select * from t1;
f1 f2 f3 f4 f5 f6 f7 f8 f9
1997-01-01 1998-01-02 01:01:00 49:01:01 46:58:57 -23:59:59 10:11:12 2001-12-01 01:01:01 1997-12-31 23:59:59
...
...
sql/item_timefunc.h
View file @
8dcb41d8
...
...
@@ -610,6 +610,19 @@ class Item_typecast :public Item_str_func
};
class
Item_typecast_maybe_null
:
public
Item_typecast
{
public:
Item_typecast_maybe_null
(
Item
*
a
)
:
Item_typecast
(
a
)
{}
void
fix_length_and_dec
()
{
collation
.
set
(
&
my_charset_bin
);
max_length
=
args
[
0
]
->
max_length
;
maybe_null
=
1
;
}
};
class
Item_char_typecast
:
public
Item_typecast
{
int
cast_length
;
...
...
@@ -626,10 +639,10 @@ class Item_char_typecast :public Item_typecast
};
class
Item_date_typecast
:
public
Item_typecast
class
Item_date_typecast
:
public
Item_typecast
_maybe_null
{
public:
Item_date_typecast
(
Item
*
a
)
:
Item_typecast
(
a
)
{}
Item_date_typecast
(
Item
*
a
)
:
Item_typecast
_maybe_null
(
a
)
{}
String
*
val_str
(
String
*
str
);
bool
get_date
(
TIME
*
ltime
,
uint
fuzzy_date
);
const
char
*
cast_type
()
const
{
return
"date"
;
}
...
...
@@ -641,10 +654,10 @@ class Item_date_typecast :public Item_typecast
};
class
Item_time_typecast
:
public
Item_typecast
class
Item_time_typecast
:
public
Item_typecast
_maybe_null
{
public:
Item_time_typecast
(
Item
*
a
)
:
Item_typecast
(
a
)
{}
Item_time_typecast
(
Item
*
a
)
:
Item_typecast
_maybe_null
(
a
)
{}
String
*
val_str
(
String
*
str
);
bool
get_time
(
TIME
*
ltime
);
const
char
*
cast_type
()
const
{
return
"time"
;
}
...
...
@@ -656,10 +669,10 @@ class Item_time_typecast :public Item_typecast
};
class
Item_datetime_typecast
:
public
Item_typecast
class
Item_datetime_typecast
:
public
Item_typecast
_maybe_null
{
public:
Item_datetime_typecast
(
Item
*
a
)
:
Item_typecast
(
a
)
{}
Item_datetime_typecast
(
Item
*
a
)
:
Item_typecast
_maybe_null
(
a
)
{}
String
*
val_str
(
String
*
str
);
const
char
*
cast_type
()
const
{
return
"datetime"
;
}
enum_field_types
field_type
()
const
{
return
MYSQL_TYPE_DATETIME
;
}
...
...
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