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
86984d76
Commit
86984d76
authored
Sep 06, 2013
by
andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Match maria/10.0, files divergd on merge for some reason
parent
a25962a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
51 deletions
+40
-51
sql/handler.h
sql/handler.h
+3
-3
sql/item_func.cc
sql/item_func.cc
+0
-43
sql/item_func.h
sql/item_func.h
+37
-5
No files found.
sql/handler.h
View file @
86984d76
...
...
@@ -1212,9 +1212,9 @@ struct handlerton
/*
Optional clauses in the CREATE/ALTER TABLE
*/
const
ha_create_table_option
*
table_options
;
// table level options
const
ha_create_table_option
*
field_options
;
// these are specified per field
const
ha_create_table_option
*
index_options
;
// these are specified per index
ha_create_table_option
*
table_options
;
// table level options
ha_create_table_option
*
field_options
;
// these are specified per field
ha_create_table_option
*
index_options
;
// these are specified per index
/**
The list of extensions of files created for a single table in the
...
...
sql/item_func.cc
View file @
86984d76
...
...
@@ -3607,23 +3607,6 @@ void Item_udf_func::print(String *str, enum_query_type query_type)
}
longlong
Item_func_udf_float
::
val_int
()
{
DBUG_ASSERT
(
fixed
==
1
);
return
(
longlong
)
rint
(
Item_func_udf_float
::
val_real
());
}
my_decimal
*
Item_func_udf_float
::
val_decimal
(
my_decimal
*
dec_buf
)
{
double
res
=
val_real
();
if
(
null_value
)
return
NULL
;
double2my_decimal
(
E_DEC_FATAL_ERROR
,
res
,
dec_buf
);
return
dec_buf
;
}
double
Item_func_udf_float
::
val_real
()
{
double
res
;
...
...
@@ -3753,32 +3736,6 @@ String *Item_func_udf_str::val_str(String *str)
return
res
;
}
double
Item_func_udf_str
::
val_real
()
{
int
err_not_used
;
char
*
end_not_used
;
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
my_strntod
(
res
->
charset
(),(
char
*
)
res
->
ptr
(),
res
->
length
(),
&
end_not_used
,
&
err_not_used
)
:
0.0
;
}
longlong
Item_func_udf_str
::
val_int
()
{
int
err_not_used
;
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
my_strntoll
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),
10
,
(
char
**
)
0
,
&
err_not_used
)
:
(
longlong
)
0
;
}
my_decimal
*
Item_func_udf_str
::
val_decimal
(
my_decimal
*
dec_buf
)
{
String
*
res
=
val_str
(
&
str_value
);
if
(
!
res
)
return
NULL
;
string2my_decimal
(
E_DEC_FATAL_ERROR
,
res
,
dec_buf
);
return
dec_buf
;
}
/**
@note
...
...
sql/item_func.h
View file @
86984d76
...
...
@@ -1374,8 +1374,19 @@ class Item_func_udf_float :public Item_udf_func
Item_func_udf_float
(
udf_func
*
udf_arg
,
List
<
Item
>
&
list
)
:
Item_udf_func
(
udf_arg
,
list
)
{}
longlong
val_int
();
my_decimal
*
val_decimal
(
my_decimal
*
dec_buf
);
longlong
val_int
()
{
DBUG_ASSERT
(
fixed
==
1
);
return
(
longlong
)
rint
(
Item_func_udf_float
::
val_real
());
}
my_decimal
*
val_decimal
(
my_decimal
*
dec_buf
)
{
double
res
=
val_real
();
if
(
null_value
)
return
NULL
;
double2my_decimal
(
E_DEC_FATAL_ERROR
,
res
,
dec_buf
);
return
dec_buf
;
}
double
val_real
();
String
*
val_str
(
String
*
str
);
void
fix_length_and_dec
()
{
fix_num_length_and_dec
();
}
...
...
@@ -1422,9 +1433,30 @@ public:
Item_func_udf_str
(
udf_func
*
udf_arg
,
List
<
Item
>
&
list
)
:
Item_udf_func
(
udf_arg
,
list
)
{}
String
*
val_str
(
String
*
);
double
val_real
();
longlong
val_int
();
my_decimal
*
val_decimal
(
my_decimal
*
dec_buf
);
double
val_real
()
{
int
err_not_used
;
char
*
end_not_used
;
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
my_strntod
(
res
->
charset
(),(
char
*
)
res
->
ptr
(),
res
->
length
(),
&
end_not_used
,
&
err_not_used
)
:
0.0
;
}
longlong
val_int
()
{
int
err_not_used
;
String
*
res
;
res
=
val_str
(
&
str_value
);
return
res
?
my_strntoll
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),
10
,
(
char
**
)
0
,
&
err_not_used
)
:
(
longlong
)
0
;
}
my_decimal
*
val_decimal
(
my_decimal
*
dec_buf
)
{
String
*
res
=
val_str
(
&
str_value
);
if
(
!
res
)
return
NULL
;
string2my_decimal
(
E_DEC_FATAL_ERROR
,
res
,
dec_buf
);
return
dec_buf
;
}
enum
Item_result
result_type
()
const
{
return
STRING_RESULT
;
}
void
fix_length_and_dec
();
};
...
...
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