Commit graph

15 commits

Author SHA1 Message Date
ingo@mysql.com
d27a15a81c Bug#16986 - Deadlock condition with MyISAM tables
Addendum fixes after changing the condition variable
for the global read lock.

The stress test suite revealed some deadlocks. Some were
related to the new condition variable (COND_global_read_lock)
and some were general problems with the global read lock.

It is now necessary to signal COND_global_read_lock whenever 
COND_refresh is signalled.

We need to wait for the release of a global read lock if one 
is set before every operation that requires a write lock.
But we must not wait if we have locked tables by LOCK TABLES.
After setting a global read lock a thread waits until all
write locks are released.
2006-06-26 19:14:35 +02:00
elliot@mysql.com
37e5ec9f50 Applying patch from SergeyV
Fixes bug#17264, for alter table on win32 for successfull operation completion
it is used TL_WRITE(=10) lock instead of TL_WRITE_ALLOW_READ(=6), however here
in innodb handler TL_WRTIE is lifted to TL_WRITE_ALLOW_WRITE, which causes
race condition when several clients do alter table simultaneously.
2006-06-20 13:43:13 -04:00
ingo@mysql.com
76f066aa32 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-amerge
2006-06-10 12:24:44 +02:00
ingo@mysql.com
d00441e328 Bug#19815 - CREATE/RENAME/DROP DATABASE can deadlock on a global read lock
The order of acquiring LOCK_mysql_create_db
and wait_if_global_read_lock() was wrong. It could happen
that a thread held LOCK_mysql_create_db while waiting for
the global read lock to be released. The thread with the
global read lock could try to administrate a database too.
It would first try to lock LOCK_mysql_create_db and hang...

The check if the current thread has the global read lock
is done in wait_if_global_read_lock(), which could not be
reached because of the hang in LOCK_mysql_create_db.

Now I exchanged the order of acquiring LOCK_mysql_create_db
and wait_if_global_read_lock(). This makes 
wait_if_global_read_lock() fail with an error message for
the thread with the global read lock. No deadlock happens.
2006-05-29 15:26:23 +02:00
monty@mysql.com
9e9ca8b6eb More DBUG statements
Replaced COND_refresh with COND_global_read_lock becasue of a bug in NTPL threads when using different mutexes as arguments to pthread_cond_wait()
The original code caused a hang in FLUSH TABLES WITH READ LOCK in some circumstances because pthread_cond_broadcast() was not delivered to other threads.
This fixes:
Bug#16986: Deadlock condition with MyISAM tables
Bug#20048: FLUSH TABLES WITH READ LOCK causes a deadlock
2006-05-24 17:21:35 +03:00
monty@mysql.com
15d48525af Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2005-07-28 17:09:54 +03:00
monty@mysql.com
3c12d0ae54 Added end marker for tests to make future merges easier 2005-07-28 03:22:47 +03:00
msvensson@neptunus.(none)
8c0f0c7b2b BUG#9998 MySQL client hangs on "USE database"
Use open_normal_and_derived_tables instead of open_and_lock_tables when reading metadata for a table.
 Add two test cases, one for "USE database" and one for "SHOW COLUMNS FROM table"
2005-06-03 15:29:05 +02:00
monty@mysql.com
62f3cd6a31 Merge with 4.0 for 4.1 release
Noteworthy:
- New HANDLER code
- New multi-update-grant-check code
- Table lock code in ha_innodb.cc was not applied
2004-10-06 19:14:33 +03:00
antony@ltantony.rdg.cyberkinetica.homeunix.net
2973a047ea Bug#4118: multi-table UPDATE takes WRITE lock on read table
Ensures that WRITE lock is not obtained on all tables referenced.
2004-10-03 00:20:47 +01:00
monty@narttu.mysql.fi
a434bca704 Merge with 4.0 2003-03-16 19:17:54 +02:00
monty@narttu.mysql.fi
2a7dfa172c Fixed bug in LOCK TABLE + DROP TABLE when other thread was waiting for a table that was locked bug not droped 2003-03-04 12:22:35 +02:00
monty@mashka.mysql.fi
1f6ecc0cd3 Changed mysql-test to print warnings for not existing table to DROP TABLE
Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names.
changed store_warning() -> push_warning_print()
2003-01-06 01:48:59 +02:00
bell@sanja.is.com.ua
463c59e1e9 fixed tests to be independed from environment 2002-08-30 21:32:59 +03:00
monty@hundin.mysql.fi
88aff4bf85 Updated manual about embedded version.
Speed up column-completion in 'mysql'
Don't use ISAM if HAVE_ISAM is not defined
A lot of fixes for the embedded version.  All libraries are now included in libmysqld.a
Changed arguments to convert_dirname() to make it more general.
Renamed files in the 'merge' directory to all use a common prefix.
Don't compile both assembler and C functions on x86
2001-10-08 04:58:07 +03:00