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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8a7acf8a
Commit
8a7acf8a
authored
Nov 12, 2002
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MONTHNAME() & DAYNAME() are now UCS2 compatible
parent
8fa71530
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
sql/item_timefunc.cc
sql/item_timefunc.cc
+9
-3
sql/item_timefunc.h
sql/item_timefunc.h
+12
-2
No files found.
sql/item_timefunc.cc
View file @
8a7acf8a
...
@@ -160,7 +160,10 @@ String* Item_func_monthname::val_str(String* str)
...
@@ -160,7 +160,10 @@ String* Item_func_monthname::val_str(String* str)
return
(
String
*
)
0
;
return
(
String
*
)
0
;
}
}
null_value
=
0
;
null_value
=
0
;
return
&
month_names
[
month
-
1
];
String
*
m
=&
month_names
[
month
-
1
];
str
->
copy
(
m
->
ptr
(),
m
->
length
(),
m
->
charset
(),
thd_charset
());
return
str
;
}
}
// Returns the quarter of the year
// Returns the quarter of the year
...
@@ -234,7 +237,10 @@ String* Item_func_dayname::val_str(String* str)
...
@@ -234,7 +237,10 @@ String* Item_func_dayname::val_str(String* str)
uint
weekday
=
(
uint
)
val_int
();
// Always Item_func_daynr()
uint
weekday
=
(
uint
)
val_int
();
// Always Item_func_daynr()
if
(
null_value
)
if
(
null_value
)
return
(
String
*
)
0
;
return
(
String
*
)
0
;
return
&
day_names
[
weekday
];
String
*
d
=&
day_names
[
weekday
];
str
->
copy
(
d
->
ptr
(),
d
->
length
(),
d
->
charset
(),
thd_charset
());
return
str
;
}
}
...
...
sql/item_timefunc.h
View file @
8a7acf8a
...
@@ -85,7 +85,12 @@ public:
...
@@ -85,7 +85,12 @@ public:
const
char
*
func_name
()
const
{
return
"monthname"
;
}
const
char
*
func_name
()
const
{
return
"monthname"
;
}
String
*
val_str
(
String
*
str
);
String
*
val_str
(
String
*
str
);
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
10
;
maybe_null
=
1
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
10
*
thd_charset
()
->
mbmaxlen
;
maybe_null
=
1
;
}
};
};
...
@@ -192,7 +197,12 @@ class Item_func_dayname :public Item_func_weekday
...
@@ -192,7 +197,12 @@ class Item_func_dayname :public Item_func_weekday
const
char
*
func_name
()
const
{
return
"dayname"
;
}
const
char
*
func_name
()
const
{
return
"dayname"
;
}
String
*
val_str
(
String
*
str
);
String
*
val_str
(
String
*
str
);
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
9
;
maybe_null
=
1
;
}
void
fix_length_and_dec
()
{
decimals
=
0
;
max_length
=
9
*
thd_charset
()
->
mbmaxlen
;
maybe_null
=
1
;
}
};
};
...
...
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