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
fa5127e2
Commit
fa5127e2
authored
Jan 05, 2005
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
last go at enabling using const NdbDictionary didn't work
+ some docs update on events
parent
79fb236b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
19 deletions
+33
-19
ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp
ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp
+1
-2
ndb/include/ndbapi/NdbDictionary.hpp
ndb/include/ndbapi/NdbDictionary.hpp
+21
-10
ndb/src/ndbapi/NdbDictionary.cpp
ndb/src/ndbapi/NdbDictionary.cpp
+9
-5
ndb/tools/desc.cpp
ndb/tools/desc.cpp
+1
-1
ndb/tools/listTables.cpp
ndb/tools/listTables.cpp
+1
-1
No files found.
ndb/examples/ndbapi_simple_example/ndbapi_simple.cpp
View file @
fa5127e2
...
@@ -72,7 +72,7 @@ int main()
...
@@ -72,7 +72,7 @@ int main()
}
}
// Optionally connect and wait for the storage nodes (ndbd's)
// Optionally connect and wait for the storage nodes (ndbd's)
if
(
cluster_connection
.
wait_until_ready
(
30
,
30
)
)
if
(
cluster_connection
.
wait_until_ready
(
30
,
0
)
<
0
)
{
{
std
::
cout
<<
"Cluster was not ready within 30 secs.
\n
"
;
std
::
cout
<<
"Cluster was not ready within 30 secs.
\n
"
;
exit
(
-
1
);
exit
(
-
1
);
...
@@ -92,7 +92,6 @@ int main()
...
@@ -92,7 +92,6 @@ int main()
run_application
(
mysql
,
cluster_connection
);
run_application
(
mysql
,
cluster_connection
);
}
}
// ndb_end should not be called until all "Ndb" objects are deleted
ndb_end
(
0
);
ndb_end
(
0
);
std
::
cout
<<
"
\n
To drop created table use:
\n
"
std
::
cout
<<
"
\n
To drop created table use:
\n
"
...
...
ndb/include/ndbapi/NdbDictionary.hpp
View file @
fa5127e2
...
@@ -901,21 +901,32 @@ public:
...
@@ -901,21 +901,32 @@ public:
*/
*/
class
Event
:
public
Object
{
class
Event
:
public
Object
{
public:
public:
enum
TableEvent
{
TE_INSERT
=
1
,
TE_DELETE
=
2
,
TE_UPDATE
=
4
,
TE_ALL
=
7
};
enum
TableEvent
{
TE_INSERT
=
1
,
///< Insert event on table
TE_DELETE
=
2
,
///< Delete event on table
TE_UPDATE
=
4
,
///< Update event on table
TE_ALL
=
7
///< Any/all event on table (not relevant when
///< events are received)
};
enum
EventDurability
{
enum
EventDurability
{
ED_UNDEFINED
=
0
,
ED_UNDEFINED
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
=
0
#endif
#if 0 // not supported
#if 0 // not supported
ED_SESSION = 1,
,
ED_SESSION = 1,
// Only this API can use it
// Only this API can use it
// and it's deleted after api has disconnected or ndb has restarted
// and it's deleted after api has disconnected or ndb has restarted
ED_TEMPORARY = 2
,
ED_TEMPORARY = 2
// All API's can use it,
// All API's can use it,
// But's its removed when ndb is restarted
// But's its removed when ndb is restarted
#endif
#endif
ED_PERMANENT
=
3
,
ED_PERMANENT
///< All API's can use it,
// All API's can use it,
///< It's still defined after a restart
// It's still defined after a restart
#ifndef DOXYGEN_SHOULD_SKIP_INTERNAL
=
3
#endif
};
};
Event
(
const
char
*
name
);
Event
(
const
char
*
name
);
...
@@ -1010,7 +1021,7 @@ public:
...
@@ -1010,7 +1021,7 @@ public:
* Fetch list of all objects, optionally restricted to given type.
* Fetch list of all objects, optionally restricted to given type.
*/
*/
int
listObjects
(
List
&
list
,
Object
::
Type
type
=
Object
::
TypeUndefined
);
int
listObjects
(
List
&
list
,
Object
::
Type
type
=
Object
::
TypeUndefined
);
int
listObjects
(
const
List
&
list
,
int
listObjects
(
List
&
list
,
Object
::
Type
type
=
Object
::
TypeUndefined
)
const
;
Object
::
Type
type
=
Object
::
TypeUndefined
)
const
;
/**
/**
...
@@ -1050,7 +1061,7 @@ public:
...
@@ -1050,7 +1061,7 @@ public:
* @return 0 if successful, otherwise -1
* @return 0 if successful, otherwise -1
*/
*/
int
listIndexes
(
List
&
list
,
const
char
*
tableName
);
int
listIndexes
(
List
&
list
,
const
char
*
tableName
);
int
listIndexes
(
const
List
&
list
,
const
char
*
tableName
)
const
;
int
listIndexes
(
List
&
list
,
const
char
*
tableName
)
const
;
/** @} *******************************************************************/
/** @} *******************************************************************/
/**
/**
...
...
ndb/src/ndbapi/NdbDictionary.cpp
View file @
fa5127e2
...
@@ -824,10 +824,9 @@ NdbDictionary::Dictionary::listObjects(List& list, Object::Type type)
...
@@ -824,10 +824,9 @@ NdbDictionary::Dictionary::listObjects(List& list, Object::Type type)
}
}
int
int
NdbDictionary
::
Dictionary
::
listObjects
(
const
List
&
list
,
NdbDictionary
::
Dictionary
::
listObjects
(
List
&
list
,
Object
::
Type
type
)
const
Object
::
Type
type
)
const
{
{
return
m_impl
.
listObjects
(
*
(
List
*
)
&
list
,
type
);
return
m_impl
.
listObjects
(
list
,
type
);
}
}
int
int
...
@@ -842,10 +841,15 @@ NdbDictionary::Dictionary::listIndexes(List& list, const char * tableName)
...
@@ -842,10 +841,15 @@ NdbDictionary::Dictionary::listIndexes(List& list, const char * tableName)
}
}
int
int
NdbDictionary
::
Dictionary
::
listIndexes
(
const
List
&
list
,
NdbDictionary
::
Dictionary
::
listIndexes
(
List
&
list
,
const
char
*
tableName
)
const
const
char
*
tableName
)
const
{
{
return
listIndexes
(
*
(
List
*
)
&
list
,
tableName
);
const
NdbDictionary
::
Table
*
tab
=
getTable
(
tableName
);
if
(
tab
==
0
)
{
return
-
1
;
}
return
m_impl
.
listIndexes
(
list
,
tab
->
getTableId
());
}
}
const
struct
NdbError
&
const
struct
NdbError
&
...
...
ndb/tools/desc.cpp
View file @
fa5127e2
...
@@ -101,7 +101,7 @@ int main(int argc, char** argv){
...
@@ -101,7 +101,7 @@ int main(int argc, char** argv){
if
(
pTab
!=
0
){
if
(
pTab
!=
0
){
ndbout
<<
(
*
pTab
)
<<
endl
;
ndbout
<<
(
*
pTab
)
<<
endl
;
const
NdbDictionary
::
Dictionary
::
List
list
;
NdbDictionary
::
Dictionary
::
List
list
;
if
(
dict
->
listIndexes
(
list
,
argv
[
i
])
!=
0
){
if
(
dict
->
listIndexes
(
list
,
argv
[
i
])
!=
0
){
ndbout
<<
argv
[
i
]
<<
": "
<<
dict
->
getNdbError
()
<<
endl
;
ndbout
<<
argv
[
i
]
<<
": "
<<
dict
->
getNdbError
()
<<
endl
;
return
NDBT_ProgramExit
(
NDBT_FAILED
);
return
NDBT_ProgramExit
(
NDBT_FAILED
);
...
...
ndb/tools/listTables.cpp
View file @
fa5127e2
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
static
Ndb_cluster_connection
*
ndb_cluster_connection
=
0
;
static
Ndb_cluster_connection
*
ndb_cluster_connection
=
0
;
static
Ndb
*
ndb
=
0
;
static
Ndb
*
ndb
=
0
;
static
NdbDictionary
::
Dictionary
*
dic
=
0
;
static
const
NdbDictionary
::
Dictionary
*
dic
=
0
;
static
int
_unqualified
=
0
;
static
int
_unqualified
=
0
;
static
void
static
void
...
...
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