Commit b9aa51e2 authored by Konstantin Osipov's avatar Konstantin Osipov

A follow up patch for the fix for Bug#51263 "Deadlock between

transactional SELECT and ALTER TABLE ...  REBUILD PARTITION".

Remove unused code - TL_WRITE_ALLOW_READ thr_lock.c lock.






include/thr_lock.h:
  Remove TL_WRITE_ALLOW_READ.
mysys/CMakeLists.txt:
  Add thr_lock test to the list of CMake executables to build.
mysys/thr_lock.c:
  Remove TL_WRITE_ALLOW_READ thr_lock.c lock.
  Consequently, simplify lock compatibility rules.
  Remove unused code.
sql/sql_test.cc:
  Remove TL_WRITE_ALLOW_READ lock.
parent 7c018682
...@@ -53,12 +53,6 @@ enum thr_lock_type { TL_IGNORE=-1, ...@@ -53,12 +53,6 @@ enum thr_lock_type { TL_IGNORE=-1,
reading/writing to the table. reading/writing to the table.
*/ */
TL_WRITE_ALLOW_WRITE, TL_WRITE_ALLOW_WRITE,
/*
Write lock, but allow other threads to read.
Used by ALTER TABLE in MySQL to allow readers
to use the table until ALTER TABLE is finished.
*/
TL_WRITE_ALLOW_READ,
/* /*
WRITE lock used by concurrent insert. Will allow WRITE lock used by concurrent insert. Will allow
READ, if one could use concurrent insert on table. READ, if one could use concurrent insert on table.
......
...@@ -66,3 +66,7 @@ ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES}) ...@@ -66,3 +66,7 @@ ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY} TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
${LIBNSL} ${LIBM} ${LIBRT}) ${LIBNSL} ${LIBM} ${LIBRT})
DTRACE_INSTRUMENT(mysys) DTRACE_INSTRUMENT(mysys)
ADD_EXECUTABLE(thr_lock thr_lock.c)
TARGET_LINK_LIBRARIES(thr_lock mysys)
SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN")
This diff is collapsed.
...@@ -45,7 +45,6 @@ static const char *lock_descriptions[] = ...@@ -45,7 +45,6 @@ static const char *lock_descriptions[] =
/* TL_READ_HIGH_PRIORITY */ "High priority read lock", /* TL_READ_HIGH_PRIORITY */ "High priority read lock",
/* TL_READ_NO_INSERT */ "Read lock without concurrent inserts", /* TL_READ_NO_INSERT */ "Read lock without concurrent inserts",
/* TL_WRITE_ALLOW_WRITE */ "Write lock that allows other writers", /* TL_WRITE_ALLOW_WRITE */ "Write lock that allows other writers",
/* TL_WRITE_ALLOW_READ */ "Write lock, but allow reading",
/* TL_WRITE_CONCURRENT_INSERT */ "Concurrent insert lock", /* TL_WRITE_CONCURRENT_INSERT */ "Concurrent insert lock",
/* TL_WRITE_DELAYED */ "Lock used by delayed insert", /* TL_WRITE_DELAYED */ "Lock used by delayed insert",
/* TL_WRITE_DEFAULT */ NULL, /* TL_WRITE_DEFAULT */ NULL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment