List:Maria Storage Engine« Previous MessageNext Message »
From:Michael Widenius Date:June 28 2008 3:09pm
Subject:bzr commit into MySQL/Maria:mysql-maria branch (monty:2649)
View as plain text  
#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-maria/

 2649 Michael Widenius	2008-06-28
      Disable versioning (concurrent writes) if more than one unique key
      The reason for this is that if we change one unique key and then get a failure on the second, we may not be able to rename the first one back before someone else writes the same key value.  In Maria 2.0, when we keep deleted key values in the tree, this will not be a problem anymore
      Fixed typedisable concurrent insert/select for SQLCOM_LOAD as there are problems with concurrent threads during index recreation
modified:
  KNOWN_BUGS.txt
  storage/maria/ha_maria.cc
  storage/maria/ma_open.c

per-file messages:
  KNOWN_BUGS.txt
    More comments
  storage/maria/ha_maria.cc
    Fixed typo (REPLACE -> INSERT)
    Also disable concurrent insert/select for SQLCOM_LOAD as there are problems with concurrent threads during index recreation
  storage/maria/ma_open.c
    Disable versioning (concurrent writes) if more than one unique key
=== modified file 'KNOWN_BUGS.txt'
--- a/KNOWN_BUGS.txt	2008-06-28 13:57:00 +0000
+++ b/KNOWN_BUGS.txt	2008-06-28 15:09:03 +0000
@@ -29,6 +29,11 @@ Known bugs that we are working on and wi
   the log handler doesn't start up after restart.
   Most of this should now be fixed...
 
+- INSERT on a duplicate key against a key inserted by another connection
+  that has not yet ended will give a duplicate key error instead of
+  waiting for the other statement to end.
+
+
 Known bugs that are planned to be fixed before Gamma/RC
 =======================================================
 
@@ -56,14 +61,20 @@ this on a table:
   wrong results if someone else is doing writes on the table during repair
   or someone is doing selects during the repair index phase.
 
-INSERT ... SELECT and REPLACE ... SELECT are blocking inserts and 
-SELECT for the table.
+INSERT ... SELECT, REPLACE ... SELECT and LOAD DATA are blocking
+inserts and SELECT for the table.  They should only have to do this if
+the destination is empty (as then we are using fast index rebuild).
 
 Missing features that is planned to fix before Beta
 ===================================================
 
+None
+
 Features planned for future releases
 ====================================
 
+Most notable is full transaction support and multiple reader/writers
+in Maria 2.0
+
 http://forge.mysql.com/worklog/
 (you can enter "maria" in the "quick search" field there).

=== modified file 'storage/maria/ha_maria.cc'
--- a/storage/maria/ha_maria.cc	2008-06-28 13:57:00 +0000
+++ b/storage/maria/ha_maria.cc	2008-06-28 15:09:03 +0000
@@ -2474,8 +2474,9 @@ THR_LOCK_DATA **ha_maria::store_lock(THD
         mysql_bin_log.is_open())
       lock_type= TL_READ_NO_INSERT;
     else if (lock_type == TL_WRITE_CONCURRENT_INSERT &&
-             (thd->lex->sql_command == SQLCOM_REPLACE_SELECT ||
-              thd->lex->sql_command == SQLCOM_REPLACE_SELECT))
+             (thd->lex->sql_command == SQLCOM_INSERT_SELECT ||
+              thd->lex->sql_command == SQLCOM_REPLACE_SELECT ||
+              thd->lex->sql_command == SQLCOM_LOAD))
       lock_type= TL_WRITE;
     file->lock.type= lock_type;
   }

=== modified file 'storage/maria/ma_open.c'
--- a/storage/maria/ma_open.c	2008-06-28 13:57:00 +0000
+++ b/storage/maria/ma_open.c	2008-06-28 15:09:03 +0000
@@ -601,6 +601,15 @@ MARIA_HA *maria_open(const char *name, i
 	pos->null_bit=0;
 	pos->flag=0;					/* For purify */
 	pos++;
+
+        if ((share->keyinfo[i].flag & HA_NOSAME) && i != 0)
+        {
+          /*
+            We can't yet have versioning if there is more than one unique
+            key
+          */
+          versioning= 0;
+        }
       }
       for (i=0 ; i < uniques ; i++)
       {
@@ -1345,11 +1354,12 @@ static uchar *_ma_state_info_read(uchar 
    @param  state           state which will be filled
 */
 
-uint _ma_state_info_read_dsk(File file, MARIA_STATE_INFO *state)
+uint _ma_state_info_read_dsk(File file __attribute__((unused)),
+                             MARIA_STATE_INFO *state __attribute__((unused)))
 {
+#ifdef EXTERNAL_LOCKING
   uchar	buff[MARIA_STATE_INFO_SIZE + MARIA_STATE_EXTRA_SIZE];
 
-#ifdef EXTERNAL_LOCKING
   /* trick to detect transactional tables */
   DBUG_ASSERT(state->create_rename_lsn == LSN_IMPOSSIBLE);
   if (!maria_single_user)

Thread
bzr commit into MySQL/Maria:mysql-maria branch (monty:2649) Michael Widenius28 Jun