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
7827a898
Commit
7827a898
authored
Feb 17, 2006
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge pnousiainen@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/space/pekka/ndb/version/my51
parents
649d64d7
6cfe0463
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
60 deletions
+36
-60
mysql-test/t/disabled.def
mysql-test/t/disabled.def
+1
-1
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+2
-2
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.cc
+0
-17
storage/ndb/include/ndbapi/NdbDictionary.hpp
storage/ndb/include/ndbapi/NdbDictionary.hpp
+0
-1
storage/ndb/src/ndbapi/DictCache.cpp
storage/ndb/src/ndbapi/DictCache.cpp
+14
-2
storage/ndb/src/ndbapi/NdbDictionary.cpp
storage/ndb/src/ndbapi/NdbDictionary.cpp
+0
-6
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
+18
-28
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
+1
-3
No files found.
mysql-test/t/disabled.def
View file @
7827a898
...
...
@@ -42,6 +42,6 @@ rpl_sp : Bug#16456
rpl_until : Unstable test case, bug#15886
sp-goto : GOTO is currently is disabled - will be fixed in the future
subselect : Bug#15706 (ps mode) [PATCH PENDING]
rpl_ndb_blob : Bug #17505
#
rpl_ndb_blob : Bug #17505
rpl_ndb_blob2 : Bug #17505
rpl_ndb_log : results are not deterministic
sql/ha_ndbcluster.cc
View file @
7827a898
...
...
@@ -5525,7 +5525,7 @@ int ndbcluster_find_all_files(THD *thd)
{
NDBDICT
::
List
::
Element
&
elmt
=
list
.
elements
[
i
];
int
do_handle_table
=
0
;
if
(
IS_TMP_PREFIX
(
elmt
.
name
))
if
(
IS_TMP_PREFIX
(
elmt
.
name
)
||
IS_NDB_BLOB_PREFIX
(
elmt
.
name
)
)
{
DBUG_PRINT
(
"info"
,
(
"Skipping %s.%s in NDB"
,
elmt
.
database
,
elmt
.
name
));
continue
;
...
...
@@ -5662,7 +5662,7 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
for
(
i
=
0
;
i
<
list
.
count
;
i
++
)
{
NDBDICT
::
List
::
Element
&
elmt
=
list
.
elements
[
i
];
if
(
IS_TMP_PREFIX
(
elmt
.
name
))
if
(
IS_TMP_PREFIX
(
elmt
.
name
)
||
IS_NDB_BLOB_PREFIX
(
elmt
.
name
)
)
{
DBUG_PRINT
(
"info"
,
(
"Skipping %s.%s in NDB"
,
elmt
.
database
,
elmt
.
name
));
continue
;
...
...
sql/ha_ndbcluster_binlog.cc
View file @
7827a898
...
...
@@ -2082,23 +2082,6 @@ ndbcluster_create_event_ops(NDB_SHARE *share, const NDBTAB *ndbtab,
if
(
share
->
flags
&
NSF_BLOB_FLAG
)
op
->
mergeEvents
(
true
);
// currently not inherited from event
if
(
share
->
flags
&
NSF_BLOB_FLAG
)
{
/*
* Given servers S1 S2, following results in out-of-date
* event->m_tableImpl and column->m_blobTable.
*
* S1: create table t1(a int primary key);
* S2: drop table t1;
* S1: create table t2(a int primary key, b blob);
* S1: alter table t2 add x int;
* S1: alter table t2 drop x;
*
* TODO fix at right place before we get here
*/
ndb
->
getDictionary
()
->
fix_blob_events
(
ndbtab
,
event_name
);
}
int
n_columns
=
ndbtab
->
getNoOfColumns
();
int
n_fields
=
table
?
table
->
s
->
fields
:
0
;
// XXX ???
for
(
int
j
=
0
;
j
<
n_columns
;
j
++
)
...
...
storage/ndb/include/ndbapi/NdbDictionary.hpp
View file @
7827a898
...
...
@@ -1783,7 +1783,6 @@ public:
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
const
Table
*
getTable
(
const
char
*
name
,
void
**
data
)
const
;
void
set_local_table_data_size
(
unsigned
sz
);
void
fix_blob_events
(
const
Table
*
table
,
const
char
*
ev_name
);
#endif
};
};
...
...
storage/ndb/src/ndbapi/DictCache.cpp
View file @
7827a898
...
...
@@ -159,11 +159,16 @@ GlobalDictCache::get(const char * name)
switch
(
ver
->
m_status
){
case
OK
:
ver
->
m_refCount
++
;
DBUG_PRINT
(
"info"
,
(
"Table OK version=%x.%x refCount=%u"
,
ver
->
m_impl
->
m_version
&
0xFFFFFF
,
ver
->
m_impl
->
m_version
>>
24
,
ver
->
m_refCount
));
DBUG_RETURN
(
ver
->
m_impl
);
case
DROPPED
:
retreive
=
true
;
// Break loop
break
;
case
RETREIVING
:
DBUG_PRINT
(
"info"
,
(
"Wait for retrieving thread"
));
NdbCondition_WaitTimeout
(
m_waitForTableCondition
,
m_mutex
,
waitTime
);
continue
;
}
...
...
@@ -178,6 +183,7 @@ GlobalDictCache::get(const char * name)
tmp
.
m_status
=
RETREIVING
;
tmp
.
m_refCount
=
1
;
// The one retreiving it
versions
->
push_back
(
tmp
);
DBUG_PRINT
(
"info"
,
(
"No table found"
));
DBUG_RETURN
(
0
);
}
...
...
@@ -185,8 +191,11 @@ NdbTableImpl *
GlobalDictCache
::
put
(
const
char
*
name
,
NdbTableImpl
*
tab
)
{
DBUG_ENTER
(
"GlobalDictCache::put"
);
DBUG_PRINT
(
"enter"
,
(
"name: %s, internal_name: %s"
,
name
,
tab
?
tab
->
m_internalName
.
c_str
()
:
"tab NULL"
));
DBUG_PRINT
(
"enter"
,
(
"name: %s, internal_name: %s version: %x.%x"
,
name
,
tab
?
tab
->
m_internalName
.
c_str
()
:
"tab NULL"
,
tab
?
tab
->
m_version
&
0xFFFFFF
:
0
,
tab
?
tab
->
m_version
>>
24
:
0
));
const
Uint32
len
=
strlen
(
name
);
Vector
<
TableVersion
>
*
vers
=
m_tableHash
.
getData
(
name
,
len
);
...
...
@@ -218,12 +227,14 @@ GlobalDictCache::put(const char * name, NdbTableImpl * tab)
vers
->
erase
(
sz
-
1
);
}
else
if
(
ver
.
m_impl
==
0
)
{
DBUG_PRINT
(
"info"
,
(
"Table OK"
));
ver
.
m_impl
=
tab
;
ver
.
m_version
=
tab
->
m_version
;
ver
.
m_status
=
OK
;
}
else
if
(
ver
.
m_impl
==
&
f_invalid_table
)
{
DBUG_PRINT
(
"info"
,
(
"Table DROPPED invalid"
));
ver
.
m_impl
=
tab
;
ver
.
m_version
=
tab
->
m_version
;
ver
.
m_status
=
DROPPED
;
...
...
@@ -231,6 +242,7 @@ GlobalDictCache::put(const char * name, NdbTableImpl * tab)
}
else
if
(
ver
.
m_impl
==
&
f_altered_table
)
{
DBUG_PRINT
(
"info"
,
(
"Table DROPPED altered"
));
ver
.
m_impl
=
tab
;
ver
.
m_version
=
tab
->
m_version
;
ver
.
m_status
=
DROPPED
;
...
...
storage/ndb/src/ndbapi/NdbDictionary.cpp
View file @
7827a898
...
...
@@ -1502,12 +1502,6 @@ NdbDictionary::Dictionary::getNdbError() const {
return
m_impl
.
getNdbError
();
}
void
NdbDictionary
::
Dictionary
::
fix_blob_events
(
const
Table
*
table
,
const
char
*
ev_name
)
{
m_impl
.
fix_blob_events
(
table
,
ev_name
);
}
// printers
NdbOut
&
...
...
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
View file @
7827a898
...
...
@@ -2767,16 +2767,28 @@ NdbDictInterface::execDROP_TABLE_REF(NdbApiSignal * signal,
}
int
NdbDictionaryImpl
::
invalidateObject
(
NdbTableImpl
&
impl
)
NdbDictionaryImpl
::
invalidateObject
(
NdbTableImpl
&
impl
,
bool
lock
)
{
const
char
*
internalTableName
=
impl
.
m_internalName
.
c_str
();
DBUG_ENTER
(
"NdbDictionaryImpl::invalidateObject"
);
DBUG_PRINT
(
"enter"
,
(
"internal_name: %s"
,
internalTableName
));
if
(
lock
)
m_globalHash
->
lock
();
if
(
impl
.
m_noOfBlobs
!=
0
)
{
for
(
uint
i
=
0
;
i
<
impl
.
m_columns
.
size
();
i
++
)
{
NdbColumnImpl
&
c
=
*
impl
.
m_columns
[
i
];
if
(
!
c
.
getBlobType
()
||
c
.
getPartSize
()
==
0
)
continue
;
assert
(
c
.
m_blobTable
!=
NULL
);
invalidateObject
(
*
c
.
m_blobTable
,
false
);
}
}
m_localHash
.
drop
(
internalTableName
);
m_globalHash
->
lock
();
impl
.
m_status
=
NdbDictionary
::
Object
::
Invalid
;
m_globalHash
->
drop
(
&
impl
);
m_globalHash
->
unlock
();
if
(
lock
)
m_globalHash
->
unlock
();
DBUG_RETURN
(
0
);
}
...
...
@@ -2784,6 +2796,8 @@ int
NdbDictionaryImpl
::
removeCachedObject
(
NdbTableImpl
&
impl
,
bool
lock
)
{
const
char
*
internalTableName
=
impl
.
m_internalName
.
c_str
();
DBUG_ENTER
(
"NdbDictionaryImpl::removeCachedObject"
);
DBUG_PRINT
(
"enter"
,
(
"internal_name: %s"
,
internalTableName
));
if
(
lock
)
m_globalHash
->
lock
();
...
...
@@ -2800,7 +2814,7 @@ NdbDictionaryImpl::removeCachedObject(NdbTableImpl & impl, bool lock)
m_globalHash
->
release
(
&
impl
);
if
(
lock
)
m_globalHash
->
unlock
();
return
0
;
DBUG_RETURN
(
0
)
;
}
/*****************************************************************
...
...
@@ -4709,30 +4723,6 @@ NdbDictInterface::parseFileInfo(NdbFileImpl &dst,
return
0
;
}
// XXX temp
void
NdbDictionaryImpl
::
fix_blob_events
(
const
NdbDictionary
::
Table
*
table
,
const
char
*
ev_name
)
{
const
NdbTableImpl
&
t
=
table
->
m_impl
;
const
NdbEventImpl
*
ev
=
getEvent
(
ev_name
);
assert
(
ev
!=
NULL
);
Uint32
i
;
for
(
i
=
0
;
i
<
t
.
m_columns
.
size
();
i
++
)
{
assert
(
t
.
m_columns
[
i
]
!=
NULL
);
const
NdbColumnImpl
&
c
=
*
t
.
m_columns
[
i
];
if
(
!
c
.
getBlobType
()
||
c
.
getPartSize
()
==
0
)
continue
;
char
bename
[
200
];
NdbBlob
::
getBlobEventName
(
bename
,
ev
,
&
c
);
// following fixes dict cache blob table
NdbEventImpl
*
bev
=
getEvent
(
bename
);
if
(
c
.
m_blobTable
!=
bev
->
m_tableImpl
)
{
// XXX const violation
((
NdbColumnImpl
*
)
&
c
)
->
m_blobTable
=
bev
->
m_tableImpl
;
}
}
}
template
class
Vector
<
int
>;
template
class
Vector
<
Uint16
>;
template
class
Vector
<
Uint32
>;
...
...
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp
View file @
7827a898
...
...
@@ -546,7 +546,7 @@ public:
int
dropTable
(
const
char
*
name
);
int
dropTable
(
NdbTableImpl
&
);
int
dropBlobTables
(
NdbTableImpl
&
);
int
invalidateObject
(
NdbTableImpl
&
);
int
invalidateObject
(
NdbTableImpl
&
,
bool
lock
=
true
);
int
removeCachedObject
(
NdbTableImpl
&
,
bool
lock
=
true
);
int
createIndex
(
NdbIndexImpl
&
ix
);
...
...
@@ -604,8 +604,6 @@ public:
NdbDictInterface
m_receiver
;
Ndb
&
m_ndb
;
// XXX temp
void
fix_blob_events
(
const
NdbDictionary
::
Table
*
table
,
const
char
*
ev_name
);
private:
NdbIndexImpl
*
getIndexImpl
(
const
char
*
name
,
const
BaseString
&
internalName
);
...
...
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