Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-01 08:05:45+01:00, tomas@stripped +5 -0
wl#2679 ndb support for batched delete
- remove not needed no_commit
mysql-test/suite/ndb/r/ndb_bulk_delete.result@stripped, 2007-11-01 08:05:42+01:00,
tomas@stripped +4 -4
wl#2679 ndb support for batched delete
- remove not needed no_commit
mysql-test/suite/ndb/r/ndb_update_no_read.result@stripped, 2007-11-01 08:05:42+01:00,
tomas@stripped +8 -8
wl#2679 ndb support for batched delete
- remove not needed no_commit
mysql-test/suite/ndb/t/ndb_bulk_delete.test@stripped, 2007-11-01 08:05:42+01:00,
tomas@stripped +3 -3
wl#2679 ndb support for batched delete
- remove not needed no_commit
mysql-test/suite/ndb/t/ndb_update_no_read.test@stripped, 2007-11-01 08:05:42+01:00,
tomas@stripped +6 -6
wl#2679 ndb support for batched delete
- remove not needed no_commit
sql/ha_ndbcluster.cc@stripped, 2007-11-01 08:05:42+01:00, tomas@stripped +6
-2
wl#2679 ndb support for batched delete
- remove not needed no_commit
diff -Nrup a/mysql-test/suite/ndb/r/ndb_bulk_delete.result
b/mysql-test/suite/ndb/r/ndb_bulk_delete.result
--- a/mysql-test/suite/ndb/r/ndb_bulk_delete.result 2007-10-26 20:21:26 +02:00
+++ b/mysql-test/suite/ndb/r/ndb_bulk_delete.result 2007-11-01 08:05:42 +01:00
@@ -11,13 +11,13 @@ insert into t1 select a+64 from t1;
insert into t1 select a+128 from t1;
# test: simple delete of multiple pk's
-# expected result 4 roundtrips
+# expected result 3 roundtrips
# 1 - info call
# 1 - read the rows
-# 1 - delete the rows (without bulk update this is 5)
-# 1 - commit the transaction
+# 0 - delete the rows (without bulk update this is 5 + 1 for execute no commit)
+# 1 - delete the row + commit the transaction
delete from t1 where a in (1,7, 90, 100, 130);
@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
-4
+3
drop table t1;
diff -Nrup a/mysql-test/suite/ndb/r/ndb_update_no_read.result
b/mysql-test/suite/ndb/r/ndb_update_no_read.result
--- a/mysql-test/suite/ndb/r/ndb_update_no_read.result 2007-10-29 19:57:57 +01:00
+++ b/mysql-test/suite/ndb/r/ndb_update_no_read.result 2007-11-01 08:05:42 +01:00
@@ -24,16 +24,16 @@ a b c
1 20 111
affected rows: 1
-# expected result 4 roundtrips
+# expected result 3 roundtrips
# 1 - info call
# 1 - read the row
-# 1 - delete the row
-# 1 - commit the transaction
+# 0 - delete the row (deferred to commit)
+# 1 - delete + commit the transaction
delete from t1 where a = 1;
affected rows: 1
@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
-4
+3
affected rows: 1
select * from t1 where a = 1 order by a;
a b c
@@ -55,16 +55,16 @@ select * from t1 where b = 2 order by a;
a b c
affected rows: 0
-# expected result 4 roundtrips
+# expected result 3 roundtrips
# 1 - info call
# 1 - read the row
-# 1 - delete the row
-# 1 - commit the transaction
+# 0 - delete the row (deferred to commit)
+# 1 - delete and commit the transaction
delete from t1 where b = 19;
affected rows: 1
@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
-4
+3
affected rows: 1
select * from t1 where b = 19 order by a;
a b c
diff -Nrup a/mysql-test/suite/ndb/t/ndb_bulk_delete.test
b/mysql-test/suite/ndb/t/ndb_bulk_delete.test
--- a/mysql-test/suite/ndb/t/ndb_bulk_delete.test 2007-10-26 20:21:26 +02:00
+++ b/mysql-test/suite/ndb/t/ndb_bulk_delete.test 2007-11-01 08:05:42 +01:00
@@ -22,11 +22,11 @@ insert into t1 select a+128 from t1;
--echo
--echo # test: simple delete of multiple pk's
---echo # expected result 4 roundtrips
+--echo # expected result 3 roundtrips
--echo # 1 - info call
--echo # 1 - read the rows
---echo # 1 - delete the rows (without bulk update this is 5)
---echo # 1 - commit the transaction
+--echo # 0 - delete the rows (without bulk update this is 5 + 1 for execute no commit)
+--echo # 1 - delete the row + commit the transaction
--echo
--source include/ndb_init_execute_count.inc
delete from t1 where a in (1,7, 90, 100, 130);
diff -Nrup a/mysql-test/suite/ndb/t/ndb_update_no_read.test
b/mysql-test/suite/ndb/t/ndb_update_no_read.test
--- a/mysql-test/suite/ndb/t/ndb_update_no_read.test 2007-10-29 19:57:57 +01:00
+++ b/mysql-test/suite/ndb/t/ndb_update_no_read.test 2007-11-01 08:05:42 +01:00
@@ -39,11 +39,11 @@ update t1 set c = 111, b = 20 where a =
select * from t1 where a = 1 order by a;
--echo
---echo # expected result 4 roundtrips
+--echo # expected result 3 roundtrips
--echo # 1 - info call
--echo # 1 - read the row
---echo # 1 - delete the row
---echo # 1 - commit the transaction
+--echo # 0 - delete the row (deferred to commit)
+--echo # 1 - delete + commit the transaction
--echo
--source include/ndb_init_execute_count.inc
delete from t1 where a = 1;
@@ -65,11 +65,11 @@ update t1 set c = 12, b = 19 where b = 2
select * from t1 where b = 2 order by a;
--echo
---echo # expected result 4 roundtrips
+--echo # expected result 3 roundtrips
--echo # 1 - info call
--echo # 1 - read the row
---echo # 1 - delete the row
---echo # 1 - commit the transaction
+--echo # 0 - delete the row (deferred to commit)
+--echo # 1 - delete and commit the transaction
--echo
--source include/ndb_init_execute_count.inc
delete from t1 where b = 19;
diff -Nrup a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
--- a/sql/ha_ndbcluster.cc 2007-10-31 10:28:38 +01:00
+++ b/sql/ha_ndbcluster.cc 2007-11-01 08:05:42 +01:00
@@ -4370,7 +4370,8 @@ int ha_ndbcluster::bulk_delete_row(const
int ha_ndbcluster::end_bulk_delete()
{
DBUG_ENTER("end_bulk_delete");
- if (m_thd_ndb->m_unsent_bytes)
+ if (m_thd_ndb->m_unsent_bytes &&
+ !m_thd_ndb->m_handler)
{
uint ignore_count= 0;
if (execute_no_commit(m_thd_ndb, m_thd_ndb->trans, FALSE,
@@ -6057,7 +6058,10 @@ int ndbcluster_commit(handlerton *hton,
set_ndb_err(thd, err);
res= ndb_to_mysql_error(&err);
if (res != -1)
- ndbcluster_print_error(res, error_op);
+ if (thd_ndb->m_handler)
+ thd_ndb->m_handler->print_error(res, MYF(0));
+ else
+ ndbcluster_print_error(res, error_op);
}
ndb->closeTransaction(trans);
thd_ndb->trans= NULL;
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2694) | tomas | 1 Nov |