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
b2c69639
Commit
b2c69639
authored
Sep 21, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#5591
parent
ce218b9b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
5 deletions
+29
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+29
-5
No files found.
sql/ha_ndbcluster.cc
View file @
b2c69639
...
@@ -175,7 +175,7 @@ void ha_ndbcluster::records_update()
...
@@ -175,7 +175,7 @@ void ha_ndbcluster::records_update()
DBUG_PRINT
(
"info"
,
(
"id=%d, no_uncommitted_rows_count=%d"
,
DBUG_PRINT
(
"info"
,
(
"id=%d, no_uncommitted_rows_count=%d"
,
((
const
NDBTAB
*
)
m_table
)
->
getTableId
(),
((
const
NDBTAB
*
)
m_table
)
->
getTableId
(),
info
->
no_uncommitted_rows_count
));
info
->
no_uncommitted_rows_count
));
if
(
info
->
records
==
~
(
ha_rows
)
0
)
//
if (info->records == ~(ha_rows)0)
{
{
Uint64
rows
;
Uint64
rows
;
if
(
ndb_get_table_statistics
(
m_ndb
,
m_tabname
,
&
rows
,
0
)
==
0
){
if
(
ndb_get_table_statistics
(
m_ndb
,
m_tabname
,
&
rows
,
0
)
==
0
){
...
@@ -607,7 +607,7 @@ int ha_ndbcluster::get_metadata(const char *path)
...
@@ -607,7 +607,7 @@ int ha_ndbcluster::get_metadata(const char *path)
DBUG_ENTER
(
"get_metadata"
);
DBUG_ENTER
(
"get_metadata"
);
DBUG_PRINT
(
"enter"
,
(
"m_tabname: %s, path: %s"
,
m_tabname
,
path
));
DBUG_PRINT
(
"enter"
,
(
"m_tabname: %s, path: %s"
,
m_tabname
,
path
));
if
(
!
(
tab
=
dict
->
getTable
(
m_tabname
,
&
m_table_info
)))
if
(
!
(
tab
=
dict
->
getTable
(
m_tabname
)))
ERR_RETURN
(
dict
->
getNdbError
());
ERR_RETURN
(
dict
->
getNdbError
());
DBUG_PRINT
(
"info"
,
(
"Table schema version: %d"
,
tab
->
getObjectVersion
()));
DBUG_PRINT
(
"info"
,
(
"Table schema version: %d"
,
tab
->
getObjectVersion
()));
...
@@ -655,8 +655,8 @@ int ha_ndbcluster::get_metadata(const char *path)
...
@@ -655,8 +655,8 @@ int ha_ndbcluster::get_metadata(const char *path)
if
(
error
)
if
(
error
)
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
// All checks OK, lets use the table
m_table
=
NULL
;
m_table
=
(
void
*
)
tab
;
m_table
_info
=
NULL
;
DBUG_RETURN
(
build_index_list
(
table
,
ILBP_OPEN
));
DBUG_RETURN
(
build_index_list
(
table
,
ILBP_OPEN
));
}
}
...
@@ -771,6 +771,7 @@ void ha_ndbcluster::release_metadata()
...
@@ -771,6 +771,7 @@ void ha_ndbcluster::release_metadata()
DBUG_PRINT
(
"enter"
,
(
"m_tabname: %s"
,
m_tabname
));
DBUG_PRINT
(
"enter"
,
(
"m_tabname: %s"
,
m_tabname
));
m_table
=
NULL
;
m_table
=
NULL
;
m_table_info
=
NULL
;
// Release index list
// Release index list
for
(
i
=
0
;
i
<
MAX_KEY
;
i
++
)
for
(
i
=
0
;
i
<
MAX_KEY
;
i
++
)
...
@@ -2394,8 +2395,18 @@ void ha_ndbcluster::info(uint flag)
...
@@ -2394,8 +2395,18 @@ void ha_ndbcluster::info(uint flag)
if
(
flag
&
HA_STATUS_VARIABLE
)
if
(
flag
&
HA_STATUS_VARIABLE
)
{
{
DBUG_PRINT
(
"info"
,
(
"HA_STATUS_VARIABLE"
));
DBUG_PRINT
(
"info"
,
(
"HA_STATUS_VARIABLE"
));
if
(
m_table_info
)
{
records_update
();
records_update
();
}
}
else
{
Uint64
rows
;
if
(
ndb_get_table_statistics
(
m_ndb
,
m_tabname
,
&
rows
,
0
)
==
0
){
records
=
rows
;
}
}
}
if
(
flag
&
HA_STATUS_ERRKEY
)
if
(
flag
&
HA_STATUS_ERRKEY
)
{
{
DBUG_PRINT
(
"info"
,
(
"HA_STATUS_ERRKEY"
));
DBUG_PRINT
(
"info"
,
(
"HA_STATUS_ERRKEY"
));
...
@@ -2781,6 +2792,16 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -2781,6 +2792,16 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
// Start of transaction
// Start of transaction
retrieve_all_fields
=
FALSE
;
retrieve_all_fields
=
FALSE
;
ops_pending
=
0
;
ops_pending
=
0
;
{
NDBDICT
*
dict
=
m_ndb
->
getDictionary
();
const
NDBTAB
*
tab
;
void
*
tab_info
;
if
(
!
(
tab
=
dict
->
getTable
(
m_tabname
,
&
tab_info
)))
ERR_RETURN
(
dict
->
getNdbError
());
DBUG_PRINT
(
"info"
,
(
"Table schema version: %d"
,
tab
->
getObjectVersion
()));
m_table
=
(
void
*
)
tab
;
m_table_info
=
tab_info
;
}
no_uncommitted_rows_init
(
thd
);
no_uncommitted_rows_init
(
thd
);
}
}
else
else
...
@@ -2803,6 +2824,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
...
@@ -2803,6 +2824,8 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type)
thd
->
transaction
.
stmt
.
ndb_tid
=
0
;
thd
->
transaction
.
stmt
.
ndb_tid
=
0
;
}
}
}
}
m_table
=
NULL
;
m_table_info
=
NULL
;
if
(
m_active_trans
)
if
(
m_active_trans
)
DBUG_PRINT
(
"warning"
,
(
"m_active_trans != NULL"
));
DBUG_PRINT
(
"warning"
,
(
"m_active_trans != NULL"
));
if
(
m_active_cursor
)
if
(
m_active_cursor
)
...
@@ -3288,6 +3311,7 @@ int ha_ndbcluster::alter_table_name(const char *from, const char *to)
...
@@ -3288,6 +3311,7 @@ int ha_ndbcluster::alter_table_name(const char *from, const char *to)
ERR_RETURN
(
dict
->
getNdbError
());
ERR_RETURN
(
dict
->
getNdbError
());
m_table
=
NULL
;
m_table
=
NULL
;
m_table_info
=
NULL
;
DBUG_RETURN
(
0
);
DBUG_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