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
402c08f1
Commit
402c08f1
authored
May 07, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/local/home/marty/MySQL/mysql-4.1
parents
b97df100
cf926981
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
ndb/src/ndbapi/Ndb.cpp
ndb/src/ndbapi/Ndb.cpp
+6
-5
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+4
-0
No files found.
ndb/src/ndbapi/Ndb.cpp
View file @
402c08f1
...
...
@@ -730,7 +730,7 @@ Ndb::getAutoIncrementValue(const char* aTableName, Uint32 cacheSize)
DBUG_RETURN
(
~
(
Uint64
)
0
);
const
NdbTableImpl
*
table
=
info
->
m_table_impl
;
Uint64
tupleId
=
getTupleIdFromNdb
(
table
->
m_tableId
,
cacheSize
);
DBUG_PRINT
(
"info"
,
(
"value %u
"
,
tupleId
));
DBUG_PRINT
(
"info"
,
(
"value %u
l"
,
(
ulong
)
tupleId
));
DBUG_RETURN
(
tupleId
);
}
...
...
@@ -742,7 +742,7 @@ Ndb::getAutoIncrementValue(const NdbDictionary::Table * aTable, Uint32 cacheSize
DBUG_RETURN
(
~
(
Uint64
)
0
);
const
NdbTableImpl
*
table
=
&
NdbTableImpl
::
getImpl
(
*
aTable
);
Uint64
tupleId
=
getTupleIdFromNdb
(
table
->
m_tableId
,
cacheSize
);
DBUG_PRINT
(
"info"
,
(
"value %u
"
,
tupleId
));
DBUG_PRINT
(
"info"
,
(
"value %u
l"
,
(
ulong
)
tupleId
));
DBUG_RETURN
(
tupleId
);
}
...
...
@@ -762,7 +762,8 @@ Ndb::getTupleIdFromNdb(Uint32 aTableId, Uint32 cacheSize)
if
(
theFirstTupleId
[
aTableId
]
!=
theLastTupleId
[
aTableId
]
)
{
theFirstTupleId
[
aTableId
]
++
;
DBUG_PRINT
(
"info"
,
(
"next cached value %u"
,
theFirstTupleId
[
aTableId
]));
DBUG_PRINT
(
"info"
,
(
"next cached value %ul"
,
(
ulong
)
theFirstTupleId
[
aTableId
]));
DBUG_RETURN
(
theFirstTupleId
[
aTableId
]);
}
else
// theFirstTupleId == theLastTupleId
...
...
@@ -783,7 +784,7 @@ Ndb::readAutoIncrementValue(const char* aTableName)
DBUG_RETURN
(
~
(
Uint64
)
0
);
}
Uint64
tupleId
=
readTupleIdFromNdb
(
table
->
m_tableId
);
DBUG_PRINT
(
"info"
,
(
"value %u
"
,
tupleId
));
DBUG_PRINT
(
"info"
,
(
"value %u
l"
,
(
ulong
)
tupleId
));
DBUG_RETURN
(
tupleId
);
}
...
...
@@ -795,7 +796,7 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable)
DBUG_RETURN
(
~
(
Uint64
)
0
);
const
NdbTableImpl
*
table
=
&
NdbTableImpl
::
getImpl
(
*
aTable
);
Uint64
tupleId
=
readTupleIdFromNdb
(
table
->
m_tableId
);
DBUG_PRINT
(
"info"
,
(
"value %u
"
,
tupleId
));
DBUG_PRINT
(
"info"
,
(
"value %u
l"
,
(
ulong
)
tupleId
));
DBUG_RETURN
(
tupleId
);
}
...
...
sql/ha_ndbcluster.cc
View file @
402c08f1
...
...
@@ -3003,8 +3003,10 @@ void ha_ndbcluster::start_bulk_insert(ha_rows rows)
m_rows_inserted
=
(
ha_rows
)
0
;
if
(
rows
==
(
ha_rows
)
0
)
{
/* We don't know how many will be inserted, guess */
m_rows_to_insert
=
m_autoincrement_prefetch
;
}
else
m_rows_to_insert
=
rows
;
...
...
@@ -4021,8 +4023,10 @@ longlong ha_ndbcluster::get_auto_increment()
Ndb
*
ndb
=
get_ndb
();
if
(
m_rows_inserted
>
m_rows_to_insert
)
{
/* We guessed too low */
m_rows_to_insert
+=
m_autoincrement_prefetch
;
}
int
cache_size
=
(
int
)
(
m_rows_to_insert
-
m_rows_inserted
<
m_autoincrement_prefetch
)
?
...
...
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