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
a03d5ad9
Commit
a03d5ad9
authored
Apr 11, 2006
by
marty@linux.site
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added --p for producing output parsable by LOAD TABLE INFILE
parent
950e258f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
storage/ndb/tools/listTables.cpp
storage/ndb/tools/listTables.cpp
+24
-7
No files found.
storage/ndb/tools/listTables.cpp
View file @
a03d5ad9
...
...
@@ -31,6 +31,7 @@ static Ndb_cluster_connection *ndb_cluster_connection= 0;
static
Ndb
*
ndb
=
0
;
static
const
NdbDictionary
::
Dictionary
*
dic
=
0
;
static
int
_unqualified
=
0
;
static
int
_parsable
=
0
;
static
void
fatal
(
char
const
*
fmt
,
...)
...
...
@@ -76,10 +77,13 @@ list(const char * tabname,
if
(
dic
->
listIndexes
(
list
,
tabname
)
==
-
1
)
fatal_dict
(
"listIndexes"
);
}
if
(
!
_parsable
)
{
if
(
ndb
->
usingFullyQualifiedNames
())
ndbout_c
(
"%-5s %-20s %-8s %-7s %-12s %-8s %s"
,
"id"
,
"type"
,
"state"
,
"logging"
,
"database"
,
"schema"
,
"name"
);
else
ndbout_c
(
"%-5s %-20s %-8s %-7s %s"
,
"id"
,
"type"
,
"state"
,
"logging"
,
"name"
);
}
for
(
unsigned
i
=
0
;
i
<
list
.
count
;
i
++
)
{
NdbDictionary
::
Dictionary
::
List
::
Element
&
elt
=
list
.
elements
[
i
];
char
type
[
100
];
...
...
@@ -170,10 +174,20 @@ list(const char * tabname,
}
}
if
(
ndb
->
usingFullyQualifiedNames
())
{
if
(
_parsable
)
ndbout_c
(
"%d
\t
'%s'
\t
'%s'
\t
'%s'
\t
'%s'
\t
'%s'
\t
'%s'"
,
elt
.
id
,
type
,
state
,
store
,
(
elt
.
database
)
?
elt
.
database
:
""
,
(
elt
.
schema
)
?
elt
.
schema
:
""
,
elt
.
name
);
else
ndbout_c
(
"%-5d %-20s %-8s %-7s %-12s %-8s %s"
,
elt
.
id
,
type
,
state
,
store
,
(
elt
.
database
)
?
elt
.
database
:
""
,
(
elt
.
schema
)
?
elt
.
schema
:
""
,
elt
.
name
);
}
else
{
if
(
_parsable
)
ndbout_c
(
"%d
\t
'%s'
\t
'%s'
\t
'%s'
\t
'%s'"
,
elt
.
id
,
type
,
state
,
store
,
elt
.
name
);
else
ndbout_c
(
"%-5d %-20s %-8s %-7s %s"
,
elt
.
id
,
type
,
state
,
store
,
elt
.
name
);
}
}
}
NDB_STD_OPTS_VARS
;
...
...
@@ -196,6 +210,9 @@ static struct my_option my_long_options[] =
{
"unqualified"
,
'u'
,
"Use unqualified table names"
,
(
gptr
*
)
&
_unqualified
,
(
gptr
*
)
&
_unqualified
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"parsable"
,
'p'
,
"Return output suitable for mysql LOAD DATA INFILE"
,
(
gptr
*
)
&
_parsable
,
(
gptr
*
)
&
_parsable
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
};
static
void
usage
()
...
...
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