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
4e4d6186
Commit
4e4d6186
authored
Jan 30, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catch accesses to deleted objects
double delete bug fixed
parent
f0f9e0d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
sql/sql_list.h
sql/sql_list.h
+8
-2
sql/sql_union.cc
sql/sql_union.cc
+1
-0
No files found.
sql/sql_list.h
View file @
4e4d6186
...
@@ -21,6 +21,12 @@
...
@@ -21,6 +21,12 @@
/* mysql standard class memoryallocator */
/* mysql standard class memoryallocator */
#ifdef PEDANTIC_SAFEMALLOC
#define TRASH(XX,YY) bfill((XX), (YY), 0x8F)
#else
#define TRASH(XX,YY)
/* no-op */
#endif
class
Sql_alloc
class
Sql_alloc
{
{
public:
public:
...
@@ -34,8 +40,8 @@ public:
...
@@ -34,8 +40,8 @@ public:
}
}
static
void
*
operator
new
(
size_t
size
,
MEM_ROOT
*
mem_root
)
static
void
*
operator
new
(
size_t
size
,
MEM_ROOT
*
mem_root
)
{
return
(
void
*
)
alloc_root
(
mem_root
,
(
uint
)
size
);
}
{
return
(
void
*
)
alloc_root
(
mem_root
,
(
uint
)
size
);
}
static
void
operator
delete
(
void
*
ptr
,
size_t
size
)
{
}
/*lint -e715 */
static
void
operator
delete
(
void
*
ptr
,
size_t
size
)
{
TRASH
(
ptr
,
size
);
}
static
void
operator
delete
[](
void
*
ptr
,
size_t
size
)
{}
static
void
operator
delete
[](
void
*
ptr
,
size_t
size
)
{
TRASH
(
ptr
,
size
);
}
#ifdef HAVE_purify
#ifdef HAVE_purify
bool
dummy
;
bool
dummy
;
inline
Sql_alloc
()
:
dummy
(
0
)
{}
inline
Sql_alloc
()
:
dummy
(
0
)
{}
...
...
sql/sql_union.cc
View file @
4e4d6186
...
@@ -445,6 +445,7 @@ int st_select_lex_unit::cleanup()
...
@@ -445,6 +445,7 @@ int st_select_lex_unit::cleanup()
if
(
union_result
)
if
(
union_result
)
{
{
delete
union_result
;
delete
union_result
;
union_result
=
0
;
// Safety
if
(
table
)
if
(
table
)
free_tmp_table
(
thd
,
table
);
free_tmp_table
(
thd
,
table
);
table
=
0
;
// Safety
table
=
0
;
// Safety
...
...
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