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
12621f34
Commit
12621f34
authored
May 09, 2005
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg9913
parents
1ad41d37
8ee6d33b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
0 deletions
+29
-0
sql/item_func.cc
sql/item_func.cc
+15
-0
sql/item_func.h
sql/item_func.h
+1
-0
sql/item_sum.cc
sql/item_sum.cc
+11
-0
sql/item_sum.h
sql/item_sum.h
+1
-0
sql/sql_udf.h
sql/sql_udf.h
+1
-0
No files found.
sql/item_func.cc
View file @
12621f34
...
@@ -1691,6 +1691,13 @@ longlong Item_func_bit_count::val_int()
...
@@ -1691,6 +1691,13 @@ longlong Item_func_bit_count::val_int()
#ifdef HAVE_DLOPEN
#ifdef HAVE_DLOPEN
udf_handler
::~
udf_handler
()
udf_handler
::~
udf_handler
()
{
/* Everything should be properly cleaned up by this moment. */
DBUG_ASSERT
(
not_original
||
!
(
initialized
||
buffers
));
}
void
udf_handler
::
cleanup
()
{
{
if
(
!
not_original
)
if
(
!
not_original
)
{
{
...
@@ -1703,9 +1710,11 @@ udf_handler::~udf_handler()
...
@@ -1703,9 +1710,11 @@ udf_handler::~udf_handler()
(
*
deinit
)(
&
initid
);
(
*
deinit
)(
&
initid
);
}
}
free_udf
(
u_d
);
free_udf
(
u_d
);
initialized
=
FALSE
;
}
}
if
(
buffers
)
// Because of bug in ecc
if
(
buffers
)
// Because of bug in ecc
delete
[]
buffers
;
delete
[]
buffers
;
buffers
=
0
;
}
}
}
}
...
@@ -1945,6 +1954,12 @@ String *udf_handler::val_str(String *str,String *save_str)
...
@@ -1945,6 +1954,12 @@ String *udf_handler::val_str(String *str,String *save_str)
}
}
void
Item_udf_func
::
cleanup
()
{
udf
.
cleanup
();
Item_func
::
cleanup
();
}
double
Item_func_udf_float
::
val
()
double
Item_func_udf_float
::
val
()
{
{
...
...
sql/item_func.h
View file @
12621f34
...
@@ -783,6 +783,7 @@ public:
...
@@ -783,6 +783,7 @@ public:
fixed
=
1
;
fixed
=
1
;
return
res
;
return
res
;
}
}
void
cleanup
();
Item_result
result_type
()
const
{
return
udf
.
result_type
();
}
Item_result
result_type
()
const
{
return
udf
.
result_type
();
}
table_map
not_null_tables
()
const
{
return
0
;
}
table_map
not_null_tables
()
const
{
return
0
;
}
};
};
...
...
sql/item_sum.cc
View file @
12621f34
...
@@ -1449,6 +1449,17 @@ bool Item_udf_sum::add()
...
@@ -1449,6 +1449,17 @@ bool Item_udf_sum::add()
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
}
}
void
Item_udf_sum
::
cleanup
()
{
/*
udf_handler::cleanup() nicely handles case when we have not
original item but one created by copy_or_same() method.
*/
udf
.
cleanup
();
Item_sum
::
cleanup
();
}
Item
*
Item_sum_udf_float
::
copy_or_same
(
THD
*
thd
)
Item
*
Item_sum_udf_float
::
copy_or_same
(
THD
*
thd
)
{
{
return
new
(
thd
->
mem_root
)
Item_sum_udf_float
(
thd
,
this
);
return
new
(
thd
->
mem_root
)
Item_sum_udf_float
(
thd
,
this
);
...
...
sql/item_sum.h
View file @
12621f34
...
@@ -550,6 +550,7 @@ public:
...
@@ -550,6 +550,7 @@ public:
bool
add
();
bool
add
();
void
reset_field
()
{};
void
reset_field
()
{};
void
update_field
()
{};
void
update_field
()
{};
void
cleanup
();
};
};
...
...
sql/sql_udf.h
View file @
12621f34
...
@@ -67,6 +67,7 @@ class udf_handler :public Sql_alloc
...
@@ -67,6 +67,7 @@ class udf_handler :public Sql_alloc
bool
get_arguments
();
bool
get_arguments
();
bool
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tlist
,
Item_result_field
*
item
,
bool
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tlist
,
Item_result_field
*
item
,
uint
arg_count
,
Item
**
args
);
uint
arg_count
,
Item
**
args
);
void
cleanup
();
double
val
(
my_bool
*
null_value
)
double
val
(
my_bool
*
null_value
)
{
{
if
(
get_arguments
())
if
(
get_arguments
())
...
...
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