Commit b051b3ab authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql

parents c9014d88 aecef761
Loading
Loading
Loading
Loading
+18 −7
Original line number Diff line number Diff line
@@ -3582,7 +3582,7 @@ in your applications or when you add not free extensions to the
become GPL through the GPL license that acts as a virus.  By licensing
@strong{MySQL} server from @strong{MySQL AB} under a commercial
license you will avoid this problem.
See @uref{http://www.gnu.org/copyleft/gpl-faq.html}.
@item
You have a commercial application that ONLY works with @strong{MySQL}
and ships the application with the @strong{MySQL} server.  This is
@@ -45717,6 +45717,11 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.40
@itemize @bullet
@item
Fixed problem with @code{UPDATE} and BDB tables.
@item
Fixed problem when using the @code{GRANT FILE ON database.* ...}; Previously
we added the @code{DROP} privilege for the database.
@item
Fixed that @code{DELETE FROM table_name ... LIMIT 0} and
@code{UPDATE FROM table_name ... LIMIT 0} doesn't delete/update anything.
@item
@@ -45747,8 +45752,8 @@ Fixed bug in @code{BDB} tables when querying empty tables.
Fixed a bug when using @code{COUNT(DISTINCT)} with @code{LEFT JOIN} and
there wasn't any matching rows.
@item
Removed all documentation referring to the @code{GEMINI} table type. @code{GEMINI}
is not released under an Open Source license.
Removed all documentation referring to the @code{GEMINI} table
type. @code{GEMINI} is not released under an Open Source license.
@end itemize
@node News-3.23.39, News-3.23.38, News-3.23.40, News-3.23.x
@@ -50795,16 +50800,20 @@ Don't execute @code{ALTER TABLE} on a @code{BDB} table on which you are
running not completed multi-statement transactions. (The transaction
will probably be ignored).
@item
@code{ANALYZE TABLE}, @code{OPTIMIZE TABLE} and @code{REPAIR TABLE} may
cause problems on tables for which you are using @code{INSERT DELAYED}.
@item
Doing a @code{LOCK TABLE ..} and @code{FLUSH TABLES ..} doesn't
guarantee that there isn't a half-finished transaction in progress on the
table.
@item
BDB tables are a bit slow to open from this. If you have many BDB tables
in a database, it will take a long time to use the @code{mysql} client
on the database if you are not using the @code{-A} option or if you are
using @code{rehash}. This is especially notable when you have a big table
BDB tables are a bit slow to open. If you have many BDB tables in a
database, it will take a long time to use the @code{mysql} client on the
database if you are not using the @code{-A} option or if you are using
@code{rehash}. This is especially notable when you have a big table
cache.
@item
@@ -50959,6 +50968,8 @@ values in double. Using these will cause problems when trying to export
and import data. We should as an intermediate solution change @code{NaN} to
@code{NULL} (if possible) and @code{-Inf} and @code{Inf} to the
Minimum respective maximum possible @code{double} value.
@item
@code{LIMIT} on negative numbers are treated as big positive numbers.
@end itemize
The following are known bugs in earlier versions of @strong{MySQL}:
+1 −1
Original line number Diff line number Diff line
@@ -2011,7 +2011,7 @@ and GNU make work together causes some files to depend on this
header, even if we're not building with Berkeley DB.

Obviously, if this file *is* used, it'll break and hopefully we can find
out why this file was generated by $(top_srcdir)/configure instead of
out why this file was generated by ${top_srcdir}/configure instead of
the real db.h.

If you run into some problems because of this file, please use mysql_bug
+20 −16
Original line number Diff line number Diff line
@@ -110,7 +110,8 @@ my_bool init_thr_lock()
}

#ifdef EXTRA_DEBUG
static int found_errors=0;
#define MAX_FOUND_ERRORS	10		/* Report 10 first errors */
static uint found_errors=0;

static int check_lock(struct st_lock_list *list, const char* lock_type,
		      const char *where, my_bool same_thread)
@@ -167,15 +168,16 @@ static int check_lock(struct st_lock_list *list, const char* lock_type,
static void check_locks(THR_LOCK *lock, const char *where,
			my_bool allow_no_locks)
{
  if (!found_errors)
  uint old_found_errors=found_errors;
  if (found_errors < MAX_FOUND_ERRORS)
  {
    if (check_lock(&lock->write,"write",where,1) |
	check_lock(&lock->write_wait,"write_wait",where,0) |
	check_lock(&lock->read,"read",where,0) |
	check_lock(&lock->read_wait,"read_wait",where,0))
      found_errors=1;
      found_errors++;

    if (!found_errors)
    if (found_errors < MAX_FOUND_ERRORS)
    {
      uint count=0;
      THR_LOCK_DATA *data;
@@ -186,7 +188,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
      }
      if (count != lock->read_no_write_count)
      {
	found_errors=1;
	found_errors++;
	fprintf(stderr,
		"Warning at '%s': Locks read_no_write_count was %u when it should have been %u\n", where, lock->read_no_write_count,count);
      }      
@@ -196,7 +198,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
	if (!allow_no_locks && !lock->read.data &&
	    (lock->write_wait.data || lock->read_wait.data))
	{
	  found_errors=1;
	  found_errors++;
	  fprintf(stderr,
		  "Warning at '%s': No locks in use but locks are in wait queue\n",
		  where);
@@ -205,7 +207,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
	{
	  if (!allow_no_locks && lock->read_wait.data)
	  {
	    found_errors=1;
	    found_errors++;
	    fprintf(stderr,
		    "Warning at '%s': No write locks and waiting read locks\n",
		    where);
@@ -221,7 +223,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
	       (lock->write_wait.data->type == TL_WRITE_DELAYED &&
		!lock->read.data)))
	  {
	    found_errors=1;
	    found_errors++;
	    fprintf(stderr,
		    "Warning at '%s': Write lock %d waiting while no exclusive read locks\n",where,(int) lock->write_wait.data->type);
	  }
@@ -235,7 +237,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
	      lock->write.data->type == TL_WRITE_ALLOW_WRITE &&
	      lock->write_wait.data->type == TL_WRITE_ALLOW_WRITE)
	  {
	    found_errors=1;
	    found_errors++;
	    fprintf(stderr,
		    "Warning at '%s': Found WRITE_ALLOW_WRITE lock waiting for WRITE_ALLOW_WRITE lock\n",
		    where);
@@ -243,16 +245,18 @@ static void check_locks(THR_LOCK *lock, const char *where,
	}
	if (lock->read.data)
	{
	  if ((!pthread_equal(lock->write.data->thread,lock->read.data->thread) &&
	       lock->write.data->type > TL_WRITE_DELAYED) ||
	  if ((!pthread_equal(lock->write.data->thread,
			      lock->read.data->thread) &&
	       lock->write.data->type > TL_WRITE_DELAYED &&
	       lock->write.data->type != TL_WRITE_ONLY) ||
	      ((lock->write.data->type == TL_WRITE_CONCURRENT_INSERT ||
		lock->write.data->type == TL_WRITE_ALLOW_WRITE) &&
	       lock->read_no_write_count))
	  {
	    found_errors=1;
	    found_errors++;
	    fprintf(stderr,
		    "Warning at '%s': Found lock that is write and read locked\n",
		    where);
		    "Warning at '%s': Found lock of type %d that is write and read locked\n",
		    where, lock->write.data->type);
	  }
	}
	if (lock->read_wait.data)
@@ -260,7 +264,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
	  if (!allow_no_locks && lock->write.data->type <= TL_WRITE_DELAYED &&
	      lock->read_wait.data->type <= TL_READ_HIGH_PRIORITY)
	  {
	    found_errors=1;
	    found_errors++;
	    fprintf(stderr,
		    "Warning at '%s': Found read lock of type %d waiting for write lock of type %d\n",
		    where,
@@ -270,7 +274,7 @@ static void check_locks(THR_LOCK *lock, const char *where,
	}
      }
    }
    if (found_errors)
    if (found_errors != old_found_errors)
    {
      DBUG_PRINT("error",("Found wrong lock"));
    }
+3 −1
Original line number Diff line number Diff line
@@ -453,8 +453,10 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
  if ((primary_key=table->primary_key) >= MAX_KEY)
  {						// No primary key
    primary_key=table->keys;
    key_used_on_scan=MAX_KEY;
    ref_length=hidden_primary_key=BDB_HIDDEN_PRIMARY_KEY_LENGTH;
  }
  else
    key_used_on_scan=primary_key;

  /* Need some extra memory in case of packed keys */
+3 −4
Original line number Diff line number Diff line
@@ -1824,9 +1824,8 @@ int mysql_grant (THD *thd, const char *db, List <LEX_USER> &list, uint rights,
			    *Str,
			    (!db ? rights : 0), what)))
      result= -1;
    if (db)
      if (( replace_db_table(tables[1].table, db, *Str, rights,
			     what)))
    if (db && replace_db_table(tables[1].table, db, *Str, rights & DB_ACLS,
			       what))
      result= -1;
  }
  VOID(pthread_mutex_unlock(&acl_cache->lock));
Loading