[Commits] Rev 4589: Merge in file:///data0/psergey/dev2/mysql-5.6-leveldb/

Sergey Petrunya psergey at askmonty.org
Fri Feb 1 15:18:28 EET 2013


At file:///data0/psergey/dev2/mysql-5.6-leveldb/

------------------------------------------------------------
revno: 4589 [merge]
revision-id: psergey at askmonty.org-20130201131827-1fauq5vi1ywq66ta
parent: psergey at askmonty.org-20130201170639-xng9xmo6l7fhca8o
parent: psergey at askmonty.org-20130130074400-ifmnbjbn86665ehj
committer: Sergey Petrunya <psergey at askmonty.org>
branch nick: mysql-5.6-leveldb
timestamp: Fri 2013-02-01 17:18:27 +0400
message:
  Merge
modified:
  mysql-test/r/leveldb.result    leveldb.result-20121210113953-dpn1uz6gjg8djzf9-1
  mysql-test/t/leveldb.test      leveldb.test-20121210113953-dpn1uz6gjg8djzf9-2
  storage/leveldb/ha_leveldb.cc  ha_leveldb.cc-20121210095559-is3z7qfirf1sy830-1
  storage/leveldb/ldb_datadic.cc ldb_datadic.cc-20121214121958-7w421zkw3hn8qp7h-1
=== modified file 'mysql-test/r/leveldb.result'
--- a/mysql-test/r/leveldb.result	2013-02-01 17:06:39 +0000
+++ b/mysql-test/r/leveldb.result	2013-02-01 13:18:27 +0000
@@ -830,3 +830,13 @@
 1	row1-NEW
 2	row2-NEW
 drop table t47;
+#
+# Fix TRUNCATE over empty table (transaction is committed when it wasn't
+# started)
+#
+create table t48(pk int primary key auto_increment, col1 varchar(12)) engine=leveldb;
+set autocommit=0;
+truncate table t48;
+ERROR HY000: Table storage engine for 't48' doesn't have this option
+set autocommit=1;
+drop table t48;

=== modified file 'mysql-test/t/leveldb.test'
--- a/mysql-test/t/leveldb.test	2013-02-01 17:06:39 +0000
+++ b/mysql-test/t/leveldb.test	2013-02-01 13:18:27 +0000
@@ -727,3 +727,15 @@
 select * from t47;
 drop table t47;
 
+--echo #
+--echo # Fix TRUNCATE over empty table (transaction is committed when it wasn't
+--echo # started)
+--echo #
+create table t48(pk int primary key auto_increment, col1 varchar(12)) engine=leveldb;
+set autocommit=0;
+--error ER_ILLEGAL_HA
+truncate table t48;
+set autocommit=1;
+drop table t48;
+
+

=== modified file 'storage/leveldb/ha_leveldb.cc'
--- a/storage/leveldb/ha_leveldb.cc	2013-02-01 17:06:39 +0000
+++ b/storage/leveldb/ha_leveldb.cc	2013-02-01 13:18:27 +0000
@@ -390,7 +390,8 @@
   if (commit_trx)
   {
     Ldb_transaction*& trx= get_trx_from_thd(thd);
-    trx->commit(); // todo: return error code.
+    if (trx)
+      trx->commit(); // todo: return error code.
   }
   else
   {

=== modified file 'storage/leveldb/ldb_datadic.cc'
--- a/storage/leveldb/ldb_datadic.cc	2013-02-01 15:34:02 +0000
+++ b/storage/leveldb/ldb_datadic.cc	2013-02-01 13:18:27 +0000
@@ -731,7 +731,7 @@
 
     if (key.size() != LDBSE_KEYDEF::INDEX_NUMBER_SIZE + 1)
     {
-      sql_print_error("LevelDB: Key store got key of size %d", key.size());
+      sql_print_error("LevelDB: Key store got key of size %ld", key.size());
       delete it;
       return true;
     }
@@ -867,7 +867,7 @@
     if (val.size() < LDBSE_KEYDEF::INDEX_NUMBER_SIZE)
     {
       sql_print_error("LevelDB: Table_store: no keys defined in %*s",
-                      key.size(), key.data());
+                      (int)key.size(), key.data());
       return true;
     }
     if (val.size() % LDBSE_KEYDEF::INDEX_NUMBER_SIZE)



More information about the commits mailing list