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
7daf98db
Commit
7daf98db
authored
May 26, 2005
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move function from header file to make it easier to debug
parent
dac499ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
14 deletions
+17
-14
sql/item.cc
sql/item.cc
+16
-0
sql/item.h
sql/item.h
+1
-14
No files found.
sql/item.cc
View file @
7daf98db
...
...
@@ -297,6 +297,22 @@ longlong Item::val_int_from_decimal()
}
void
*
Item
::
operator
new
(
size_t
size
,
Item
*
reuse
,
uint
*
rsize
)
{
if
(
reuse
&&
size
<=
reuse
->
rsize
)
{
reuse
->
cleanup
();
TRASH
((
void
*
)
reuse
,
size
);
if
(
rsize
)
(
*
rsize
)
=
reuse
->
rsize
;
return
(
void
*
)
reuse
;
}
if
(
rsize
)
(
*
rsize
)
=
size
;
return
(
void
*
)
sql_alloc
((
uint
)
size
);
}
Item
::
Item
()
:
rsize
(
0
),
name
(
0
),
orig_name
(
0
),
name_length
(
0
),
fixed
(
0
),
collation
(
&
my_charset_bin
,
DERIVATION_COERCIBLE
)
...
...
sql/item.h
View file @
7daf98db
...
...
@@ -233,20 +233,7 @@ class Item {
static
void
*
operator
new
(
size_t
size
,
MEM_ROOT
*
mem_root
)
{
return
(
void
*
)
alloc_root
(
mem_root
,
(
uint
)
size
);
}
/* Special for SP local variable assignment - reusing slots */
static
void
*
operator
new
(
size_t
size
,
Item
*
reuse
,
uint
*
rsize
)
{
if
(
reuse
&&
size
<=
reuse
->
rsize
)
{
reuse
->
cleanup
();
TRASH
((
void
*
)
reuse
,
size
);
if
(
rsize
)
(
*
rsize
)
=
reuse
->
rsize
;
return
(
void
*
)
reuse
;
}
if
(
rsize
)
(
*
rsize
)
=
size
;
return
(
void
*
)
sql_alloc
((
uint
)
size
);
}
static
void
*
operator
new
(
size_t
size
,
Item
*
reuse
,
uint
*
rsize
);
static
void
operator
delete
(
void
*
ptr
,
size_t
size
)
{
TRASH
(
ptr
,
size
);
}
static
void
operator
delete
(
void
*
ptr
,
MEM_ROOT
*
mem_root
)
{}
...
...
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