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
66581f5d
Commit
66581f5d
authored
Feb 02, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug, added error handling to information_schema files
parent
d8acfecb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
24 deletions
+46
-24
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+46
-24
No files found.
sql/ha_ndbcluster.cc
View file @
66581f5d
...
@@ -9608,10 +9608,14 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
...
@@ -9608,10 +9608,14 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
Ndb
*
ndb
=
check_ndb_in_thd
(
thd
);
Ndb
*
ndb
=
check_ndb_in_thd
(
thd
);
NdbDictionary
::
Dictionary
*
dict
=
ndb
->
getDictionary
();
NdbDictionary
::
Dictionary
*
dict
=
ndb
->
getDictionary
();
NdbDictionary
::
Dictionary
::
List
dflist
;
NdbDictionary
::
Dictionary
::
List
dflist
;
NdbError
ndberr
;
dict
->
listObjects
(
dflist
,
NdbDictionary
::
Object
::
Datafile
);
dict
->
listObjects
(
dflist
,
NdbDictionary
::
Object
::
Datafile
);
ndberr
=
dict
->
getNdbError
();
if
(
ndberr
.
classification
!=
ndberror_cl_none
)
return
0
;
for
(
unsigned
i
=
0
;
i
<
dflist
.
count
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
dflist
.
count
;
i
++
)
{
{
NdbDictionary
::
Dictionary
::
List
::
Element
&
elt
=
dflist
.
elements
[
i
];
NdbDictionary
::
Dictionary
::
List
::
Element
&
elt
=
dflist
.
elements
[
i
];
Ndb_cluster_connection_node_iter
iter
;
Ndb_cluster_connection_node_iter
iter
;
...
@@ -9619,21 +9623,28 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
...
@@ -9619,21 +9623,28 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
g_ndb_cluster_connection
->
init_get_next_node
(
iter
);
g_ndb_cluster_connection
->
init_get_next_node
(
iter
);
while
(
id
=
g_ndb_cluster_connection
->
get_next_node
(
iter
))
while
(
id
=
g_ndb_cluster_connection
->
get_next_node
(
iter
))
{
{
NdbDictionary
::
Datafile
df
=
dict
->
getDatafile
(
id
,
elt
.
name
);
NdbDictionary
::
Datafile
df
=
dict
->
getDatafile
(
id
,
elt
.
name
);
int
c
=
0
;
ndberr
=
dict
->
getNdbError
();
if
(
ndberr
.
classification
!=
ndberror_cl_none
)
continue
;
NdbDictionary
::
Tablespace
ts
=
dict
->
getTablespace
(
df
.
getTablespace
());
ndberr
=
dict
->
getNdbError
();
if
(
ndberr
.
classification
!=
ndberror_cl_none
)
continue
;
int
c
=
0
;
table
->
field
[
c
++
]
->
set_null
();
// FILE_ID
table
->
field
[
c
++
]
->
set_null
();
// FILE_ID
table
->
field
[
c
++
]
->
store
(
elt
.
name
,
strlen
(
elt
.
name
),
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
elt
.
name
,
strlen
(
elt
.
name
),
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
"DATAFILE"
,
8
,
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
"DATAFILE"
,
8
,
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
df
.
getTablespace
(),
strlen
(
df
.
getTablespace
()),
table
->
field
[
c
++
]
->
store
(
df
.
getTablespace
(),
strlen
(
df
.
getTablespace
()),
system_charset_info
);
system_charset_info
);
table
->
field
[
c
++
]
->
set_null
();
// TABLE_CATALOG
table
->
field
[
c
++
]
->
set_null
();
// TABLE_CATALOG
table
->
field
[
c
++
]
->
set_null
();
// TABLE_SCHEMA
table
->
field
[
c
++
]
->
set_null
();
// TABLE_SCHEMA
table
->
field
[
c
++
]
->
set_null
();
// TABLE_NAME
table
->
field
[
c
++
]
->
set_null
();
// TABLE_NAME
NdbDictionary
::
Tablespace
ts
=
dict
->
getTablespace
(
df
.
getTablespace
());
// LOGFILE_GROUP_NAME
// LOGFILE_GROUP_NAME
table
->
field
[
c
++
]
->
store
(
ts
.
getDefaultLogfileGroup
(),
table
->
field
[
c
++
]
->
store
(
ts
.
getDefaultLogfileGroup
(),
strlen
(
ts
.
getDefaultLogfileGroup
()),
strlen
(
ts
.
getDefaultLogfileGroup
()),
...
@@ -9662,7 +9673,7 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
...
@@ -9662,7 +9673,7 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
table
->
field
[
c
++
]
->
store
(
df
.
getObjectVersion
());
// VERSION
table
->
field
[
c
++
]
->
store
(
df
.
getObjectVersion
());
// VERSION
table
->
field
[
c
++
]
->
store
(
"FIXED"
,
5
,
system_charset_info
);
// ROW_FORMAT
table
->
field
[
c
++
]
->
store
(
"FIXED"
,
5
,
system_charset_info
);
// ROW_FORMAT
table
->
field
[
c
++
]
->
set_null
();
// TABLE_ROWS
table
->
field
[
c
++
]
->
set_null
();
// TABLE_ROWS
table
->
field
[
c
++
]
->
set_null
();
// AVG_ROW_LENGTH
table
->
field
[
c
++
]
->
set_null
();
// AVG_ROW_LENGTH
...
@@ -9675,40 +9686,50 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
...
@@ -9675,40 +9686,50 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
table
->
field
[
c
++
]
->
set_null
();
// CHECK_TIME
table
->
field
[
c
++
]
->
set_null
();
// CHECK_TIME
table
->
field
[
c
++
]
->
set_null
();
// CHECKSUM
table
->
field
[
c
++
]
->
set_null
();
// CHECKSUM
table
->
field
[
c
++
]
->
store
(
"NORMAL"
,
6
,
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
"NORMAL"
,
6
,
system_charset_info
);
char
extra
[
30
];
char
extra
[
30
];
int
len
=
my_snprintf
(
extra
,
sizeof
(
extra
),
"CLUSTER_NODE=%u"
,
id
);
int
len
=
my_snprintf
(
extra
,
sizeof
(
extra
),
"CLUSTER_NODE=%u"
,
id
);
table
->
field
[
c
]
->
store
(
extra
,
len
,
system_charset_info
);
table
->
field
[
c
]
->
store
(
extra
,
len
,
system_charset_info
);
schema_table_store_record
(
thd
,
table
);
schema_table_store_record
(
thd
,
table
);
}
}
}
}
dict
->
listObjects
(
dflist
,
NdbDictionary
::
Object
::
Undofile
);
dict
->
listObjects
(
dflist
,
NdbDictionary
::
Object
::
Undofile
);
ndberr
=
dict
->
getNdbError
();
if
(
ndberr
.
classification
!=
ndberror_cl_none
)
return
0
;
for
(
unsigned
i
=
0
;
i
<
dflist
.
count
;
i
++
)
for
(
unsigned
i
=
0
;
i
<
dflist
.
count
;
i
++
)
{
{
NdbDictionary
::
Dictionary
::
List
::
Element
&
elt
=
dflist
.
elements
[
i
];
NdbDictionary
::
Dictionary
::
List
::
Element
&
elt
=
dflist
.
elements
[
i
];
Ndb_cluster_connection_node_iter
iter
;
Ndb_cluster_connection_node_iter
iter
;
unsigned
id
;
unsigned
id
;
g_ndb_cluster_connection
->
init_get_next_node
(
iter
);
g_ndb_cluster_connection
->
init_get_next_node
(
iter
);
while
(
id
=
g_ndb_cluster_connection
->
get_next_node
(
iter
))
while
(
id
=
g_ndb_cluster_connection
->
get_next_node
(
iter
))
{
{
NdbDictionary
::
Undofile
uf
=
dict
->
getUndofile
(
id
,
elt
.
name
);
NdbDictionary
::
Undofile
uf
=
dict
->
getUndofile
(
id
,
elt
.
name
);
int
c
=
0
;
ndberr
=
dict
->
getNdbError
();
if
(
ndberr
.
classification
!=
ndberror_cl_none
)
continue
;
NdbDictionary
::
LogfileGroup
lfg
=
dict
->
getLogfileGroup
(
uf
.
getLogfileGroup
());
ndberr
=
dict
->
getNdbError
();
if
(
ndberr
.
classification
!=
ndberror_cl_none
)
continue
;
int
c
=
0
;
table
->
field
[
c
++
]
->
set_null
();
// FILE_ID
table
->
field
[
c
++
]
->
set_null
();
// FILE_ID
table
->
field
[
c
++
]
->
store
(
elt
.
name
,
strlen
(
elt
.
name
),
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
elt
.
name
,
strlen
(
elt
.
name
),
table
->
field
[
c
++
]
->
store
(
"UNDO LOG"
,
8
,
system_charset_info
);
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
"UNDO LOG"
,
8
,
system_charset_info
);
table
->
field
[
c
++
]
->
set_null
();
// TABLESPACE NAME
table
->
field
[
c
++
]
->
set_null
();
// TABLESPACE NAME
table
->
field
[
c
++
]
->
set_null
();
// TABLE_CATALOG
table
->
field
[
c
++
]
->
set_null
();
// TABLE_CATALOG
table
->
field
[
c
++
]
->
set_null
();
// TABLE_SCHEMA
table
->
field
[
c
++
]
->
set_null
();
// TABLE_SCHEMA
table
->
field
[
c
++
]
->
set_null
();
// TABLE_NAME
table
->
field
[
c
++
]
->
set_null
();
// TABLE_NAME
NdbDictionary
::
LogfileGroup
lfg
=
dict
->
getLogfileGroup
(
uf
.
getLogfileGroup
());
// LOGFILE_GROUP_NAME
// LOGFILE_GROUP_NAME
table
->
field
[
c
++
]
->
store
(
uf
.
getLogfileGroup
(),
table
->
field
[
c
++
]
->
store
(
uf
.
getLogfileGroup
(),
strlen
(
uf
.
getLogfileGroup
()),
strlen
(
uf
.
getLogfileGroup
()),
...
@@ -9750,12 +9771,13 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
...
@@ -9750,12 +9771,13 @@ static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond)
table
->
field
[
c
++
]
->
set_null
();
// CHECK_TIME
table
->
field
[
c
++
]
->
set_null
();
// CHECK_TIME
table
->
field
[
c
++
]
->
set_null
();
// CHECKSUM
table
->
field
[
c
++
]
->
set_null
();
// CHECKSUM
table
->
field
[
c
++
]
->
store
(
"NORMAL"
,
6
,
system_charset_info
);
table
->
field
[
c
++
]
->
store
(
"NORMAL"
,
6
,
system_charset_info
);
char
extra
[
30
];
char
extra
[
30
];
int
len
=
my_snprintf
(
extra
,
sizeof
(
extra
),
"CLUSTER_NODE=%u"
,
id
);
int
len
=
my_snprintf
(
extra
,
sizeof
(
extra
),
"CLUSTER_NODE=%u"
,
id
);
table
->
field
[
c
]
->
store
(
extra
,
len
,
system_charset_info
);
table
->
field
[
c
]
->
store
(
extra
,
len
,
system_charset_info
);
schema_table_store_record
(
thd
,
table
);
schema_table_store_record
(
thd
,
table
);
}
}
}
}
return
0
;
}
}
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