summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/csv/ha_tina.cc3
-rw-r--r--storage/csv/ha_tina.h3
-rw-r--r--storage/myisam/ha_myisam.cc13
-rw-r--r--storage/myisam/ha_myisam.h3
-rw-r--r--storage/ndb/test/include/NDBT_Error.hpp4
-rw-r--r--storage/ndb/test/include/NDBT_ReturnCodes.h2
6 files changed, 17 insertions, 11 deletions
diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc
index afe8e5f1b27..07a4ffc65c5 100644
--- a/storage/csv/ha_tina.cc
+++ b/storage/csv/ha_tina.cc
@@ -787,7 +787,8 @@ void ha_tina::update_status()
bool ha_tina::check_if_locking_is_allowed(uint sql_command,
ulong type, TABLE *table,
- uint count,
+ uint count, uint current,
+ uint *system_count,
bool called_by_privileged_thread)
{
if (!called_by_privileged_thread)
diff --git a/storage/csv/ha_tina.h b/storage/csv/ha_tina.h
index 0c667237c0f..c096f21fca2 100644
--- a/storage/csv/ha_tina.h
+++ b/storage/csv/ha_tina.h
@@ -128,7 +128,8 @@ public:
virtual bool check_if_locking_is_allowed(uint sql_command,
ulong type, TABLE *table,
- uint count,
+ uint count, uint current,
+ uint *system_count,
bool called_by_logger_thread);
int open(const char *name, int mode, uint open_options);
int close(void);
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 48f1d9b2395..8fe4d988dbc 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -600,7 +600,8 @@ err:
bool ha_myisam::check_if_locking_is_allowed(uint sql_command,
ulong type, TABLE *table,
- uint count,
+ uint count, uint current,
+ uint *system_count,
bool called_by_privileged_thread)
{
/*
@@ -609,11 +610,13 @@ bool ha_myisam::check_if_locking_is_allowed(uint sql_command,
we have to disallow write-locking of these tables with any other tables.
*/
if (table->s->system_table &&
- table->reginfo.lock_type >= TL_WRITE_ALLOW_WRITE &&
- count != 1)
+ table->reginfo.lock_type >= TL_WRITE_ALLOW_WRITE)
+ (*system_count)++;
+
+ /* 'current' is an index, that's why '<=' below. */
+ if (*system_count > 0 && *system_count <= current)
{
- my_error(ER_WRONG_LOCK_OF_SYSTEM_TABLE, MYF(0), table->s->db.str,
- table->s->table_name.str);
+ my_error(ER_WRONG_LOCK_OF_SYSTEM_TABLE, MYF(0));
return FALSE;
}
diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h
index 647e72d53eb..bb439e9914d 100644
--- a/storage/myisam/ha_myisam.h
+++ b/storage/myisam/ha_myisam.h
@@ -62,7 +62,8 @@ class ha_myisam: public handler
virtual bool check_if_locking_is_allowed(uint sql_command,
ulong type, TABLE *table,
- uint count,
+ uint count, uint current,
+ uint *system_count,
bool called_by_logger_thread);
int open(const char *name, int mode, uint test_if_locked);
int close(void);
diff --git a/storage/ndb/test/include/NDBT_Error.hpp b/storage/ndb/test/include/NDBT_Error.hpp
index 352f5926eeb..faec0cdadfc 100644
--- a/storage/ndb/test/include/NDBT_Error.hpp
+++ b/storage/ndb/test/include/NDBT_Error.hpp
@@ -77,8 +77,8 @@ private:
};
//
-// ERR prints an NdbError object togheter with a description of where
-// the error occured
+// ERR prints an NdbError object together with a description of where the
+// error occured
//
#define ERR_OUT(where, error) \
{ where << "ERROR: " << error.code << " " \
diff --git a/storage/ndb/test/include/NDBT_ReturnCodes.h b/storage/ndb/test/include/NDBT_ReturnCodes.h
index 8660c0828f4..b48fccdb12d 100644
--- a/storage/ndb/test/include/NDBT_ReturnCodes.h
+++ b/storage/ndb/test/include/NDBT_ReturnCodes.h
@@ -26,7 +26,7 @@ extern "C" {
#define NDBT_TEMPORARY 3
/**
* NDBT_ProgramExit
- * This function will print the returncode togheter with a prefix on
+ * This function will print the returncode together with a prefix on
* the screen and then exit the test program.
* Call this function when exiting the main function in your test programs
* Returns the return code