mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Force clients to recompile if client lib changes (Bug #3009)
sql/lock.cc: Added comments sql/set_var.h: Indentation fix
This commit is contained in:
parent
bc12d57fa7
commit
690a413d31
3 changed files with 54 additions and 21 deletions
|
@ -19,7 +19,8 @@
|
|||
#AUTOMAKE_OPTIONS = nostdinc
|
||||
INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
|
||||
LIBS = @CLIENT_LIBS@
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
|
||||
DEPLIB= ../libmysql/libmysqlclient.la
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB)
|
||||
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
|
||||
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
|
||||
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
|
||||
|
@ -27,18 +28,18 @@ noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
|
|||
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
|
||||
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
|
||||
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
|
||||
mysql_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqladmin_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlcheck_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysql_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqladmin_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlcheck_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqltest_SOURCES= mysqltest.c
|
||||
mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c
|
||||
mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlmanagerc_SOURCES = mysqlmanagerc.c
|
||||
mysqlmanagerc_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlmanagerc_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
sql_src=log_event.h log_event.cc
|
||||
|
||||
# Fix for mit-threads
|
||||
|
|
52
sql/lock.cc
52
sql/lock.cc
|
@ -445,14 +445,27 @@ static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count,
|
|||
return sql_lock;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
** Lock table based on the name.
|
||||
** This is used when we need total access to a closed, not open table
|
||||
Lock table based on the name.
|
||||
This is used when we need total access to a closed, not open table
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
Lock and wait for the named lock.
|
||||
Returns 0 on ok
|
||||
|
||||
SYNOPSIS
|
||||
lock_and_wait_for_table_name()
|
||||
thd Thread handler
|
||||
table_list Lock first table in this list
|
||||
|
||||
|
||||
NOTES
|
||||
Works together with global read lock.
|
||||
|
||||
RETURN
|
||||
0 ok
|
||||
1 error
|
||||
*/
|
||||
|
||||
int lock_and_wait_for_table_name(THD *thd, TABLE_LIST *table_list)
|
||||
|
@ -482,13 +495,28 @@ end:
|
|||
|
||||
/*
|
||||
Put a not open table with an old refresh version in the table cache.
|
||||
This will force any other threads that uses the table to release it
|
||||
as soon as possible.
|
||||
One must have a lock on LOCK_open !
|
||||
Return values:
|
||||
< 0 error
|
||||
== 0 table locked
|
||||
> 0 table locked, but someone is using it
|
||||
|
||||
SYNPOSIS
|
||||
lock_table_name()
|
||||
thd Thread handler
|
||||
table_list Lock first table in this list
|
||||
|
||||
WARNING
|
||||
If you are going to update the table, you should use
|
||||
lock_and_wait_for_table_name instead of this function as this works
|
||||
together with 'FLUSH TABLES WITH READ LOCK'
|
||||
|
||||
NOTES
|
||||
This will force any other threads that uses the table to release it
|
||||
as soon as possible.
|
||||
|
||||
REQUIREMENTS
|
||||
One must have a lock on LOCK_open !
|
||||
|
||||
RETURN:
|
||||
< 0 error
|
||||
== 0 table locked
|
||||
> 0 table locked, but someone is using it
|
||||
*/
|
||||
|
||||
int lock_table_name(THD *thd, TABLE_LIST *table_list)
|
||||
|
@ -588,6 +616,10 @@ bool wait_for_locked_table_names(THD *thd, TABLE_LIST *table_list)
|
|||
table_list Names of tables to lock
|
||||
|
||||
NOTES
|
||||
If you are just locking one table, you should use
|
||||
lock_and_wait_for_table_name().
|
||||
|
||||
REQUIREMENTS
|
||||
One must have a lock on LOCK_open when calling this
|
||||
|
||||
RETURN
|
||||
|
|
|
@ -505,7 +505,7 @@ public:
|
|||
sys_var_character_set(const char *name_arg) :sys_var_thd(name_arg)
|
||||
{ nullable= 0; }
|
||||
bool check(THD *thd, set_var *var);
|
||||
SHOW_TYPE type() { return SHOW_CHAR; }
|
||||
SHOW_TYPE type() { return SHOW_CHAR; }
|
||||
bool check_update_type(Item_result type)
|
||||
{
|
||||
return type != STRING_RESULT; /* Only accept strings */
|
||||
|
|
Loading…
Reference in a new issue