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
f147ca40
Commit
f147ca40
authored
May 09, 2006
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stilled some valgrind memleak warnings
parent
6a538d0d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
4 deletions
+60
-4
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+49
-4
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+11
-0
No files found.
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
f147ca40
...
...
@@ -79,18 +79,26 @@ is_ndb_blob_table(const NdbTableImpl* t)
NdbColumnImpl
::
NdbColumnImpl
()
:
NdbDictionary
::
Column
(
*
this
),
m_attrId
(
-
1
),
m_facade
(
this
)
{
DBUG_ENTER
(
"NdbColumnImpl::NdbColumnImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
init
();
DBUG_VOID_RETURN
;
}
NdbColumnImpl
::
NdbColumnImpl
(
NdbDictionary
::
Column
&
f
)
:
NdbDictionary
::
Column
(
*
this
),
m_attrId
(
-
1
),
m_facade
(
&
f
)
{
DBUG_ENTER
(
"NdbColumnImpl::NdbColumnImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
init
();
DBUG_VOID_RETURN
;
}
NdbColumnImpl
&
NdbColumnImpl
::
operator
=
(
const
NdbColumnImpl
&
col
)
{
DBUG_ENTER
(
"NdbColumnImpl::operator="
);
DBUG_PRINT
(
"info"
,
(
"this: %x &col: %x"
,
this
,
&
col
));
m_attrId
=
col
.
m_attrId
;
m_name
=
col
.
m_name
;
m_type
=
col
.
m_type
;
...
...
@@ -112,13 +120,14 @@ NdbColumnImpl::operator=(const NdbColumnImpl& col)
if
(
col
.
m_blobTable
==
NULL
)
m_blobTable
=
NULL
;
else
{
m_blobTable
=
new
NdbTableImpl
();
if
(
m_blobTable
==
NULL
)
m_blobTable
=
new
NdbTableImpl
();
m_blobTable
->
assign
(
*
col
.
m_blobTable
);
}
m_column_no
=
col
.
m_column_no
;
// Do not copy m_facade !!
return
*
this
;
DBUG_RETURN
(
*
this
)
;
}
void
...
...
@@ -261,15 +270,19 @@ NdbColumnImpl::init(Type t)
NdbColumnImpl
::~
NdbColumnImpl
()
{
DBUG_ENTER
(
"NdbColumnImpl::~NdbColumnImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
if
(
m_blobTable
!=
NULL
)
delete
m_blobTable
;
m_blobTable
=
NULL
;
DBUG_VOID_RETURN
;
}
bool
NdbColumnImpl
::
equal
(
const
NdbColumnImpl
&
col
)
const
{
DBUG_ENTER
(
"NdbColumnImpl::equal"
);
DBUG_PRINT
(
"info"
,
(
"this: %x &col: %x"
,
this
,
&
col
));
if
(
strcmp
(
m_name
.
c_str
(),
col
.
m_name
.
c_str
())
!=
0
){
DBUG_RETURN
(
false
);
}
...
...
@@ -377,24 +390,33 @@ NdbTableImpl::NdbTableImpl()
:
NdbDictionary
::
Table
(
*
this
),
NdbDictObjectImpl
(
NdbDictionary
::
Object
::
UserTable
),
m_facade
(
this
)
{
DBUG_ENTER
(
"NdbTableImpl::NdbTableImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
init
();
DBUG_VOID_RETURN
;
}
NdbTableImpl
::
NdbTableImpl
(
NdbDictionary
::
Table
&
f
)
:
NdbDictionary
::
Table
(
*
this
),
NdbDictObjectImpl
(
NdbDictionary
::
Object
::
UserTable
),
m_facade
(
&
f
)
{
DBUG_ENTER
(
"NdbTableImpl::NdbTableImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
init
();
DBUG_VOID_RETURN
;
}
NdbTableImpl
::~
NdbTableImpl
()
{
DBUG_ENTER
(
"NdbTableImpl::~NdbTableImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
if
(
m_index
!=
0
)
{
delete
m_index
;
m_index
=
0
;
}
for
(
unsigned
i
=
0
;
i
<
m_columns
.
size
();
i
++
)
delete
m_columns
[
i
];
delete
m_columns
[
i
];
DBUG_VOID_RETURN
;
}
void
...
...
@@ -636,6 +658,8 @@ NdbTableImpl::equal(const NdbTableImpl& obj) const
void
NdbTableImpl
::
assign
(
const
NdbTableImpl
&
org
)
{
DBUG_ENTER
(
"NdbColumnImpl::assign"
);
DBUG_PRINT
(
"info"
,
(
"this: %x &org: %x"
,
this
,
&
org
));
/* m_changeMask intentionally not copied */
m_primaryTableId
=
org
.
m_primaryTableId
;
m_internalName
.
assign
(
org
.
m_internalName
);
...
...
@@ -662,7 +686,14 @@ NdbTableImpl::assign(const NdbTableImpl& org)
m_columnHashMask, m_columnHash, m_hashValueMask, m_hashpointerValue
is state calculated by computeAggregates and buildColumnHash
*/
for
(
unsigned
i
=
0
;
i
<
org
.
m_columns
.
size
();
i
++
){
unsigned
i
;
for
(
i
=
0
;
i
<
m_columns
.
size
();
i
++
)
{
delete
m_columns
[
i
];
}
m_columns
.
clear
();
for
(
i
=
0
;
i
<
org
.
m_columns
.
size
();
i
++
)
{
NdbColumnImpl
*
col
=
new
NdbColumnImpl
();
const
NdbColumnImpl
*
iorg
=
org
.
m_columns
[
i
];
(
*
col
)
=
(
*
iorg
);
...
...
@@ -702,6 +733,7 @@ NdbTableImpl::assign(const NdbTableImpl& org)
m_tablespace_name
=
org
.
m_tablespace_name
;
m_tablespace_id
=
org
.
m_tablespace_id
;
m_tablespace_version
=
org
.
m_tablespace_version
;
DBUG_VOID_RETURN
;
}
void
NdbTableImpl
::
setName
(
const
char
*
name
)
...
...
@@ -1085,14 +1117,20 @@ NdbEventImpl::NdbEventImpl() :
NdbDictionary
::
Event
(
*
this
),
NdbDictObjectImpl
(
NdbDictionary
::
Object
::
TypeUndefined
),
m_facade
(
this
)
{
DBUG_ENTER
(
"NdbEventImpl::NdbEventImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
init
();
DBUG_VOID_RETURN
;
}
NdbEventImpl
::
NdbEventImpl
(
NdbDictionary
::
Event
&
f
)
:
NdbDictionary
::
Event
(
*
this
),
NdbDictObjectImpl
(
NdbDictionary
::
Object
::
TypeUndefined
),
m_facade
(
&
f
)
{
DBUG_ENTER
(
"NdbEventImpl::NdbEventImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
init
();
DBUG_VOID_RETURN
;
}
void
NdbEventImpl
::
init
()
...
...
@@ -1108,10 +1146,13 @@ void NdbEventImpl::init()
NdbEventImpl
::~
NdbEventImpl
()
{
DBUG_ENTER
(
"NdbEventImpl::~NdbEventImpl"
);
DBUG_PRINT
(
"info"
,
(
"this: %x"
,
this
));
for
(
unsigned
i
=
0
;
i
<
m_columns
.
size
();
i
++
)
delete
m_columns
[
i
];
if
(
m_tableImpl
)
delete
m_tableImpl
;
DBUG_VOID_RETURN
;
}
void
NdbEventImpl
::
setName
(
const
char
*
name
)
...
...
@@ -1134,11 +1175,14 @@ NdbEventImpl::setTable(const NdbDictionary::Table& table)
void
NdbEventImpl
::
setTable
(
NdbTableImpl
*
tableImpl
)
{
DBUG_ENTER
(
"NdbEventImpl::setTable"
);
DBUG_PRINT
(
"info"
,
(
"this: %x tableImpl: %x"
,
this
,
tableImpl
));
DBUG_ASSERT
(
tableImpl
->
m_status
!=
NdbDictionary
::
Object
::
Invalid
);
if
(
!
m_tableImpl
)
m_tableImpl
=
new
NdbTableImpl
();
// Copy table, since event might be accessed from different threads
m_tableImpl
->
assign
(
*
tableImpl
);
DBUG_VOID_RETURN
;
}
const
NdbDictionary
::
Table
*
...
...
@@ -3944,6 +3988,7 @@ NdbDictionaryImpl::dropBlobEvents(const NdbEventImpl& evnt)
if
(
blob_evnt
==
NULL
)
continue
;
(
void
)
dropEvent
(
*
blob_evnt
);
delete
blob_evnt
;
}
}
else
{
// loop over MAX_ATTRIBUTES_IN_TABLE ...
...
...
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
View file @
f147ca40
...
...
@@ -189,6 +189,17 @@ NdbEventOperationImpl::~NdbEventOperationImpl()
// m_bufferHandle->dropSubscribeEvent(m_bufferId);
;
// ToDo? We should send stop signal here
if
(
theMainOp
==
NULL
)
{
NdbEventOperationImpl
*
tBlobOp
=
theBlobOpList
;
while
(
tBlobOp
!=
NULL
)
{
NdbEventOperationImpl
*
op
=
tBlobOp
;
tBlobOp
=
tBlobOp
->
m_next
;
delete
op
;
}
}
m_ndb
->
theImpl
->
theNdbObjectIdMap
.
unmap
(
m_oid
,
this
);
DBUG_PRINT
(
"exit"
,(
"this: %p/%p oid: %u main: %p"
,
this
,
m_facade
,
m_oid
,
theMainOp
));
...
...
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