Below is the list of changes that have just been committed into a local
5.0 repository of emurphy. When emurphy does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2151 06/04/13 02:43:14 elliot@stripped +8 -0
testing, ignore...
sql/sql_repl.cc
1.149 06/04/13 02:43:09 elliot@stripped +9 -30
testing, ignore...
sql/sql_class.h
1.287 06/04/13 02:43:09 elliot@stripped +25 -29
testing, ignore...
sql/set_var.cc
1.152 06/04/13 02:43:09 elliot@stripped +25 -50
testing, ignore...
sql/mysqld.cc
1.543 06/04/13 02:43:08 elliot@stripped +48 -65
testing, ignore...
sql/handler.h
1.168 06/04/13 02:43:08 elliot@stripped +13 -18
testing, ignore...
sql/handler.cc
1.211 06/04/13 02:43:08 elliot@stripped +36 -89
testing, ignore...
sql/ha_innodb.h
1.111 06/04/13 02:43:08 elliot@stripped +8 -11
testing, ignore...
sql/ha_innodb.cc
1.292 06/04/13 02:43:08 elliot@stripped +140 -369
testing, ignore...
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: elliot
# Host: agony.local
# Root: /Users/emurphy/src/mysql/bk-clean/mysql-5.0
--- 1.210/sql/handler.cc 2006-02-17 01:51:10 -05:00
+++ 1.211/sql/handler.cc 2006-04-13 02:43:08 -04:00
@@ -35,9 +35,9 @@
#include "ha_berkeley.h"
extern handlerton berkeley_hton;
#else
-handlerton berkeley_hton = { "BerkeleyDB", SHOW_OPTION_NO,
- "Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB, NULL,
- 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+handlerton berkeley_hton = { "BerkeleyDB", SHOW_OPTION_NO,
+ "Supports transactions and page-level locking", DB_TYPE_BERKELEY_DB, NULL,
+ 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, HTON_NO_FLAGS };
#endif
#ifdef HAVE_BLACKHOLE_DB
@@ -46,8 +46,8 @@
#else
handlerton blackhole_hton = { "BLACKHOLE", SHOW_OPTION_NO,
"/dev/null storage engine (anything you write to it disappears)",
- DB_TYPE_BLACKHOLE_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ DB_TYPE_BLACKHOLE_DB, NULL, 0, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_EXAMPLE_DB
@@ -55,9 +55,9 @@
extern handlerton example_hton;
#else
handlerton example_hton = { "EXAMPLE", SHOW_OPTION_NO,
- "Example storage engine",
- DB_TYPE_EXAMPLE_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "Example storage engine",
+ DB_TYPE_EXAMPLE_DB, NULL, 0, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#if defined(HAVE_ARCHIVE_DB)
@@ -65,17 +65,17 @@
extern handlerton archive_hton;
#else
handlerton archive_hton = { "ARCHIVE", SHOW_OPTION_NO,
- "Archive storage engine", DB_TYPE_ARCHIVE_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "Archive storage engine", DB_TYPE_ARCHIVE_DB, NULL, 0, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_CSV_DB
#include "examples/ha_tina.h"
extern handlerton tina_hton;
#else
-handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
- DB_TYPE_CSV_DB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+handlerton tina_hton = { "CSV", SHOW_OPTION_NO, "CSV storage engine",
+ DB_TYPE_CSV_DB, NULL, 0, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_INNOBASE_DB
@@ -83,9 +83,9 @@
extern handlerton innobase_hton;
#else
handlerton innobase_hton = { "InnoDB", SHOW_OPTION_NO,
- "Supports transactions, row-level locking, and foreign keys",
- DB_TYPE_INNODB, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "Supports transactions, row-level locking, and foreign keys",
+ DB_TYPE_INNODB, NULL, 0, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_NDBCLUSTER_DB
@@ -93,18 +93,18 @@
extern handlerton ndbcluster_hton;
#else
handlerton ndbcluster_hton = { "ndbcluster", SHOW_OPTION_NO,
- "Clustered, fault-tolerant, memory-based tables",
- DB_TYPE_NDBCLUSTER, NULL, 0, 0, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "Clustered, fault-tolerant, memory-based tables",
+ DB_TYPE_NDBCLUSTER, NULL, 0, 0, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#ifdef HAVE_FEDERATED_DB
#include "ha_federated.h"
extern handlerton federated_hton;
#else
-handlerton federated_hton = { "FEDERATED", SHOW_OPTION_NO,
- "Federated MySQL storage engine", DB_TYPE_FEDERATED_DB, NULL, 0, 0, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+handlerton federated_hton = { "FEDERATED", SHOW_OPTION_NO,
+ "Federated MySQL storage engine", DB_TYPE_FEDERATED_DB, NULL, 0, 0, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
HTON_NO_FLAGS };
#endif
#include <myisampack.h>
@@ -118,8 +118,8 @@
/*
Obsolete
*/
-handlerton isam_hton = { "ISAM", SHOW_OPTION_NO, "Obsolete storage engine",
- DB_TYPE_ISAM, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+handlerton isam_hton = { "ISAM", SHOW_OPTION_NO, "Obsolete storage engine",
+ DB_TYPE_ISAM, NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, HTON_NO_FLAGS };
@@ -283,7 +283,7 @@
default:
break;
}
-
+
return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ?
(enum db_type) thd->variables.table_type :
((enum db_type) global_system_variables.table_type !=
@@ -481,7 +481,7 @@
for (types= sys_table_types; *types; types++)
{
if (!(*types)->init || !(*types)->init())
- ha_was_inited_ok(types);
+ ha_was_inited_ok(types);
else
(*types)->state= SHOW_OPTION_DISABLED;
}
@@ -1144,7 +1144,7 @@
}
-/*
+/*
Export statistics for different engines. Currently we use it only for
InnoDB.
*/
@@ -1480,7 +1480,7 @@
RETURN
0 ok
1 get_auto_increment() was called and returned ~(ulonglong) 0
-
+
IMPLEMENTATION
@@ -2323,8 +2323,8 @@
/*
- Call this function in order to give the handler the possiblity
- to ask engine if there are any new tables that should be written to disk
+ Call this function in order to give the handler the possiblity
+ to ask engine if there are any new tables that should be written to disk
or any dropped tables that need to be removed from disk
*/
@@ -2334,7 +2334,7 @@
{
int error= 0;
DBUG_ENTER("ha_find_files");
- DBUG_PRINT("enter", ("db: %s, path: %s, wild: %s, dir: %d",
+ DBUG_PRINT("enter", ("db: %s, path: %s, wild: %s, dir: %d",
db, path, wild, dir));
#ifdef HAVE_NDBCLUSTER_DB
if (have_ndbcluster == SHOW_OPTION_YES)
@@ -2500,7 +2500,7 @@
read_range_first()
start_key Start key. Is 0 if no min range
end_key End key. Is 0 if no max range
- eq_range_arg Set to 1 if start_key == end_key
+ eq_range_arg Set to 1 if start_key == end_key
sorted Set to 1 if result should be sorted per key
NOTES
@@ -2538,7 +2538,7 @@
start_key->length,
start_key->flag);
if (result)
- DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND)
+ DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND)
? HA_ERR_END_OF_FILE
: result);
@@ -2586,7 +2586,7 @@
SYNOPSIS
compare_key
range range to compare to row. May be 0 for no range
-
+
NOTES
See key.cc::key_cmp() for details
@@ -2626,7 +2626,7 @@
SYNOPSIS
ha_known_exts()
-
+
NOTES
No mutexes, worst case race is a minor surplus memory allocation
We have to recreate the extension map if mysqld is restarted (for example
@@ -2673,7 +2673,7 @@
ext= (const char **) my_once_alloc(sizeof(char *)*
(found_exts.elements+1),
MYF(MY_WME | MY_FAE));
-
+
DBUG_ASSERT(ext != 0);
known_extensions.count= found_exts.elements;
known_extensions.type_names= ext;
@@ -2684,56 +2684,3 @@
}
return &known_extensions;
}
-
-
-#ifdef HAVE_REPLICATION
-/*
- Reports to table handlers up to which position we have sent the binlog
- to a slave in replication
-
- SYNOPSIS
- ha_repl_report_sent_binlog()
- thd thread doing the binlog communication to the slave
- log_file_name binlog file name
- end_offse t the offset in the binlog file up to which we sent the
- contents to the slave
-
- NOTES
- Only works for InnoDB at the moment
-
- RETURN VALUE
- Always 0 (= success)
-*/
-
-int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
- my_off_t end_offset)
-{
-#ifdef HAVE_INNOBASE_DB
- return innobase_repl_report_sent_binlog(thd,log_file_name,end_offset);
-#else
- return 0;
-#endif
-}
-
-
-/*
- Reports to table handlers that we stop replication to a specific slave
-
- SYNOPSIS
- ha_repl_report_replication_stop()
- thd thread doing the binlog communication to the slave
-
- NOTES
- Does nothing at the moment
-
- RETURN VALUE
- Always 0 (= success)
-
- PARAMETERS
-*/
-
-int ha_repl_report_replication_stop(THD *thd)
-{
- return 0;
-}
-#endif /* HAVE_REPLICATION */
--- 1.167/sql/handler.h 2006-02-25 10:46:25 -05:00
+++ 1.168/sql/handler.h 2006-04-13 02:43:08 -04:00
@@ -106,7 +106,7 @@
Index scan will not return records in rowid order. Not guaranteed to be
set for unordered (e.g. HASH) indexes.
*/
-#define HA_KEY_SCAN_NOT_ROR 128
+#define HA_KEY_SCAN_NOT_ROR 128
/* operations for disable/enable indexes */
@@ -231,7 +231,7 @@
long bqual_length;
char data[XIDDATASIZE]; // not \0-terminated !
- xid_t() {} /* Remove gcc warning */
+ xid_t() {} /* Remove gcc warning */
bool eq(struct xid_t *xid)
{ return eq(xid->gtrid_length, xid->bqual_length, xid->data); }
bool eq(long g, long b, const char *d)
@@ -319,7 +319,7 @@
const char *name;
/*
- Historical marker for if the engine is available of not
+ Historical marker for if the engine is available of not
*/
SHOW_COMP_OPTION state;
@@ -333,7 +333,7 @@
This is going away and new engines will just use "name" for this.
*/
enum db_type db_type;
- /*
+ /*
Method that initizlizes a storage engine
*/
bool (*init)();
@@ -573,7 +573,7 @@
virtual const key_map *keys_to_use_for_scanning() { return &key_map_empty; }
virtual bool has_transactions(){ return 0;}
virtual uint extra_rec_buf_length() { return 0; }
-
+
/*
Return upper bound of current number of records in the table
(max. of how many records one will retrieve when doing a full table scan)
@@ -726,7 +726,7 @@
int check_old_types();
/* to be actually called to get 'check()' functionality*/
int ha_check(THD *thd, HA_CHECK_OPT *check_opt);
-
+
virtual int backup(THD* thd, HA_CHECK_OPT* check_opt)
{ return HA_ADMIN_NOT_IMPLEMENTED; }
/*
@@ -815,7 +815,7 @@
*/
virtual int rename_table(const char *from, const char *to);
virtual int delete_table(const char *name);
-
+
virtual int create(const char *name, TABLE *form, HA_CREATE_INFO *info)=0;
/* lock_count() can be more than one if the table is a MERGE */
@@ -829,7 +829,7 @@
/* ask handler about permission to cache table when query is to be cached */
virtual my_bool register_query_cache_table(THD *thd, char *table_key,
uint key_length,
- qc_engine_callback
+ qc_engine_callback
*engine_callback,
ulonglong *engine_data)
{
@@ -847,7 +847,7 @@
{
return memcmp(ref1, ref2, ref_length);
}
-
+
/*
Condition pushdown to storage engines
*/
@@ -856,7 +856,7 @@
Push condition down to the table handler.
SYNOPSIS
cond_push()
- cond Condition to be pushed. The condition tree must not be
+ cond Condition to be pushed. The condition tree must not be
modified by the by the caller.
RETURN
The 'remainder' condition that caller must use to filter out records.
@@ -865,14 +865,14 @@
NOTES
The pushed conditions form a stack (from which one can remove the
last pushed condition using cond_pop).
- The table handler filters out rows using (pushed_cond1 AND pushed_cond2
+ The table handler filters out rows using (pushed_cond1 AND pushed_cond2
AND ... AND pushed_condN)
or less restrictive condition, depending on handler's capabilities.
-
+
handler->extra(HA_EXTRA_RESET) call empties the condition stack.
Calls to rnd_init/rnd_end, index_init/index_end etc do not affect the
condition stack.
- */
+ */
virtual const COND *cond_push(const COND *cond) { return cond; };
/*
Pop the top condition from the condition stack of the handler instance.
@@ -965,8 +965,3 @@
*/
#define trans_need_2pc(thd, all) ((total_ha_2pc > 1) && \
!((all ? &thd->transaction.all : &thd->transaction.stmt)->no_2pc))
-
-/* semi-synchronous replication */
-int ha_repl_report_sent_binlog(THD *thd, char *log_file_name,
- my_off_t end_offset);
-int ha_repl_report_replication_stop(THD *thd);
--- 1.542/sql/mysqld.cc 2006-04-12 10:30:46 -04:00
+++ 1.543/sql/mysqld.cc 2006-04-13 02:43:08 -04:00
@@ -165,7 +165,7 @@
static void getvolumename();
static void getvolumeID(BYTE *volumeName);
#endif /* __NETWARE__ */
-
+
#ifdef _AIX41
int initgroups(const char *,unsigned int);
@@ -960,18 +960,18 @@
else
sql_print_error(ER(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */
-#if defined(HAVE_SMEM) && defined(__WIN__)
- /*
- Send event to smem_event_connect_request for aborting
- */
- if (!SetEvent(smem_event_connect_request))
- {
+#if defined(HAVE_SMEM) && defined(__WIN__)
+ /*
+ Send event to smem_event_connect_request for aborting
+ */
+ if (!SetEvent(smem_event_connect_request))
+ {
DBUG_PRINT("error",
("Got error: %ld from SetEvent of smem_event_connect_request",
- GetLastError()));
+ GetLastError()));
}
-#endif
-
+#endif
+
#if defined(__NETWARE__) || (defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__) && !defined(OS2))
my_thread_init(); // If this is a new thread
#endif
@@ -1453,7 +1453,7 @@
if (Service.IsNT() && mysqld_unix_port[0] && !opt_bootstrap &&
opt_enable_named_pipe)
{
-
+
pipe_name[sizeof(pipe_name)-1]= 0; /* Safety if too long string */
strxnmov(pipe_name, sizeof(pipe_name)-1, "\\\\.\\pipe\\",
mysqld_unix_port, NullS);
@@ -1804,7 +1804,7 @@
{
ConsumerRegistrationInfo reg_info;
-
+
/* Clear NEB registration structure */
bzero((char*) ®_info, sizeof(struct ConsumerRegistrationInfo));
@@ -1820,7 +1820,7 @@
reg_info.CRIOwnerID= (LoadDefinitionStructure *)getnlmhandle();
reg_info.CRIConsumerESR= NULL; // No consumer ESR required
reg_info.CRISecurityToken= 0; // No security token for the event
- reg_info.CRIConsumerFlags= 0; // SMP_ENABLED_BIT;
+ reg_info.CRIConsumerFlags= 0; // SMP_ENABLED_BIT;
reg_info.CRIFilterName= 0; // No event filtering
reg_info.CRIFilterDataLength= 0; // No filtering data
reg_info.CRIFilterData= 0; // No filtering data
@@ -1845,7 +1845,7 @@
Get the NSS volume ID of the MySQL Data volume.
Volume ID is stored in a global variable
*/
- getvolumeID((BYTE*) datavolname);
+ getvolumeID((BYTE*) datavolname);
}
@@ -1910,7 +1910,7 @@
strxmov(path, (const char *) ADMIN_VOL_PATH, (const char *) volumeName,
NullS);
- if ((status= zOpen(rootKey, zNSS_TASK, zNSPACE_LONG|zMODE_UTF8,
+ if ((status= zOpen(rootKey, zNSS_TASK, zNSPACE_LONG|zMODE_UTF8,
(BYTE *) path, zRR_READ_ACCESS, &fileKey)) != zOK)
{
consoleprintf("\nGetNSSVolumeProperties - Failed to get file, status: %d\n.", (int) status);
@@ -1918,7 +1918,7 @@
}
getInfoMask= zGET_IDS | zGET_VOLUME_INFO ;
- if ((status= zGetInfo(fileKey, getInfoMask, sizeof(info),
+ if ((status= zGetInfo(fileKey, getInfoMask, sizeof(info),
zINFO_VERSION_A, &info)) != zOK)
{
consoleprintf("\nGetNSSVolumeProperties - Failed in zGetInfo, status: %d\n.", (int) status);
@@ -2041,7 +2041,7 @@
We will try our best to scrape up some info that will hopefully help diagnose\n\
the problem, but since we have already crashed, something is definitely wrong\n\
and this may fail.\n\n");
- fprintf(stderr, "key_buffer_size=%lu\n",
+ fprintf(stderr, "key_buffer_size=%lu\n",
(ulong) dflt_key_cache->key_cache_mem_size);
fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size);
fprintf(stderr, "max_used_connections=%lu\n", max_used_connections);
@@ -2385,7 +2385,7 @@
thd->spcont->find_handler(error, MYSQL_ERROR::WARN_LEVEL_ERROR))
{
if (! thd->spcont->found_handler_here())
- thd->net.report_error= 1; /* Make "select" abort correctly */
+ thd->net.report_error= 1; /* Make "select" abort correctly */
DBUG_RETURN(0);
}
@@ -2588,13 +2588,13 @@
}
#endif
/*
- We set SYSTEM time zone as reasonable default and
+ We set SYSTEM time zone as reasonable default and
also for failure of my_tz_init() and bootstrap mode.
If user explicitly set time zone with --default-time-zone
option we will change this value in my_tz_init().
*/
global_system_variables.time_zone= my_tz_SYSTEM;
-
+
/*
Init mutexes for the global MYSQL_LOG objects.
As safe_mutex depends on what MY_INIT() does, we can't init the mutexes of
@@ -2604,7 +2604,7 @@
mysql_log.init_pthread_objects();
mysql_slow_log.init_pthread_objects();
mysql_bin_log.init_pthread_objects();
-
+
if (gethostname(glob_hostname,sizeof(glob_hostname)-4) < 0)
strmov(glob_hostname,"mysql");
strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
@@ -2699,7 +2699,7 @@
global_system_variables.character_set_client= default_charset_info;
global_system_variables.collation_connection= default_charset_info;
- if (!(character_set_filesystem=
+ if (!(character_set_filesystem=
get_charset_by_csname(character_set_filesystem_name,
MY_CS_PRIMARY, MYF(MY_WME))))
return 1;
@@ -2798,7 +2798,7 @@
openssl_stdlocks= (openssl_lock_t*) OPENSSL_malloc(CRYPTO_num_locks() *
sizeof(openssl_lock_t));
for (int i= 0; i < CRYPTO_num_locks(); ++i)
- (void) my_rwlock_init(&openssl_stdlocks[i].lock, NULL);
+ (void) my_rwlock_init(&openssl_stdlocks[i].lock, NULL);
CRYPTO_set_dynlock_create_callback(openssl_dynlock_create);
CRYPTO_set_dynlock_destroy_callback(openssl_dynlock_destroy);
CRYPTO_set_dynlock_lock_callback(openssl_lock);
@@ -2839,20 +2839,20 @@
#if defined(HAVE_OPENSSL) && !defined(HAVE_YASSL)
static unsigned long openssl_id_function()
-{
+{
return (unsigned long) pthread_self();
-}
+}
static openssl_lock_t *openssl_dynlock_create(const char *file, int line)
-{
+{
openssl_lock_t *lock= new openssl_lock_t;
my_rwlock_init(&lock->lock, NULL);
return lock;
}
-static void openssl_dynlock_destroy(openssl_lock_t *lock, const char *file,
+static void openssl_dynlock_destroy(openssl_lock_t *lock, const char *file,
int line)
{
rwlock_destroy(&lock->lock);
@@ -2872,7 +2872,7 @@
}
-static void openssl_lock(int mode, openssl_lock_t *lock, const char *file,
+static void openssl_lock(int mode, openssl_lock_t *lock, const char *file,
int line)
{
int err;
@@ -2897,7 +2897,7 @@
sql_print_error("Fatal: OpenSSL interface problem (mode=0x%x)", mode);
abort();
}
- if (err)
+ if (err)
{
sql_print_error("Fatal: can't %s OpenSSL %s lock", what);
abort();
@@ -3204,7 +3204,7 @@
if (pthread_create(&hThread,&connection_attrib,handle_shutdown,0))
sql_print_warning("Can't create thread to handle shutdown requests");
#endif
-#endif // EMBEDDED_LIBRARY
+#endif // EMBEDDED_LIBRARY
}
@@ -3259,7 +3259,7 @@
handler_count--;
}
}
-#endif
+#endif
while (handler_count > 0)
pthread_cond_wait(&COND_handler_count,&LOCK_thread_count);
@@ -3353,7 +3353,7 @@
#endif
#ifdef __NETWARE__
/* Increasing stacksize of threads on NetWare */
-
+
pthread_attr_setstacksize(&connection_attrib, NW_THD_STACKSIZE);
#endif
@@ -3445,7 +3445,7 @@
#ifndef __NETWARE__
(void) pthread_kill(signal_thread, MYSQL_KILL_SIGNAL);
#endif /* __NETWARE__ */
-
+
if (!opt_bootstrap)
(void) my_delete(pidfile_name,MYF(MY_WME)); // Not needed anymore
@@ -3513,7 +3513,7 @@
#endif /* __NT__ */
/* (void) pthread_attr_destroy(&connection_attrib); */
-
+
DBUG_PRINT("quit",("Exiting main thread"));
#ifndef __WIN__
@@ -3549,7 +3549,7 @@
wait_for_signal_thread_to_end();
clean_up_mutexes();
my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
-
+
exit(0);
return(0); /* purecov: deadcode */
}
@@ -3993,7 +3993,7 @@
size_socket length=sizeof(struct sockaddr_in);
new_sock = accept(sock, my_reinterpret_cast(struct sockaddr *) (&cAddr),
&length);
-#ifdef __NETWARE__
+#ifdef __NETWARE__
// TODO: temporary fix, waiting for TCP/IP fix - DEFECT000303149
if ((new_sock == INVALID_SOCKET) && (socket_errno == EINVAL))
{
@@ -4397,7 +4397,7 @@
NullS);
sql_perror(buff);
}
- if (handle_client_file_map)
+ if (handle_client_file_map)
CloseHandle(handle_client_file_map);
if (handle_client_map)
UnmapViewOfFile(handle_client_map);
@@ -4442,8 +4442,8 @@
enum options_mysqld
{
- OPT_ISAM_LOG=256, OPT_SKIP_NEW,
- OPT_SKIP_GRANT, OPT_SKIP_LOCK,
+ OPT_ISAM_LOG=256, OPT_SKIP_NEW,
+ OPT_SKIP_GRANT, OPT_SKIP_LOCK,
OPT_ENABLE_LOCK, OPT_USE_LOCKING,
OPT_SOCKET, OPT_UPDATE_LOG,
OPT_BIN_LOG, OPT_SKIP_RESOLVE,
@@ -4622,7 +4622,7 @@
struct my_option my_long_options[] =
{
- {"help", '?', "Display this help and exit.",
+ {"help", '?', "Display this help and exit.",
(gptr*) &opt_help, (gptr*) &opt_help, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
#ifdef HAVE_REPLICATION
@@ -4957,7 +4957,7 @@
(gptr*) &myisam_log_filename, (gptr*) &myisam_log_filename, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0},
{"log-long-format", '0',
- "Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.",
+ "Log some extra information to update log. Please note that this option is deprecated; see --log-short-format option.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"log-queries-not-using-indexes", OPT_LOG_QUERIES_NOT_USING_INDEXES,
"Log queries that are executed without benefit of any index to the slow log if it is open.",
@@ -5353,7 +5353,7 @@
0, 0, 0, 0, 0},
{"timed_mutexes", OPT_TIMED_MUTEXES,
"Specify whether to time mutexes (only InnoDB mutexes are currently supported)",
- (gptr*) &timed_mutexes, (gptr*) &timed_mutexes, 0, GET_BOOL, NO_ARG, 0,
+ (gptr*) &timed_mutexes, (gptr*) &timed_mutexes, 0, GET_BOOL, NO_ARG, 0,
0, 0, 0, 0, 0},
{"tmpdir", 't',
"Path for temporary files. Several paths may be specified, separated by a "
@@ -5588,7 +5588,7 @@
"This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache",
(gptr*) &dflt_key_cache_var.param_age_threshold,
(gptr*) 0,
- 0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
+ 0, (GET_ULONG | GET_ASK_ADDR), REQUIRED_ARG,
300, 100, ~0L, 0, 100, 0},
{"key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,
"The default size of key cache blocks",
@@ -5899,23 +5899,6 @@
{"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default.",
(gptr*) &opt_sync_frm, (gptr*) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
0, 0, 0, 0},
-#ifdef HAVE_REPLICATION
- {"sync-replication", OPT_SYNC_REPLICATION,
- "Enable synchronous replication.",
- (gptr*) &global_system_variables.sync_replication,
- (gptr*) &global_system_variables.sync_replication,
- 0, GET_ULONG, REQUIRED_ARG, 0, 0, 1, 0, 1, 0},
- {"sync-replication-slave-id", OPT_SYNC_REPLICATION_SLAVE_ID,
- "Synchronous replication is wished for this slave.",
- (gptr*) &global_system_variables.sync_replication_slave_id,
- (gptr*) &global_system_variables.sync_replication_slave_id,
- 0, GET_ULONG, REQUIRED_ARG, 0, 0, ~0L, 0, 1, 0},
- {"sync-replication-timeout", OPT_SYNC_REPLICATION_TIMEOUT,
- "Synchronous replication timeout.",
- (gptr*) &global_system_variables.sync_replication_timeout,
- (gptr*) &global_system_variables.sync_replication_timeout,
- 0, GET_ULONG, REQUIRED_ARG, 10, 0, ~0L, 0, 1, 0},
-#endif /* HAVE_REPLICATION */
{"table_cache", OPT_TABLE_CACHE,
"The number of open tables for all threads.", (gptr*) &table_cache_size,
(gptr*) &table_cache_size, 0, GET_ULONG, REQUIRED_ARG, 64, 1, 512*1024L,
@@ -6003,7 +5986,7 @@
{"Com_drop_index", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_INDEX]), SHOW_LONG_STATUS},
{"Com_drop_table", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_TABLE]), SHOW_LONG_STATUS},
{"Com_drop_user", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_DROP_USER]), SHOW_LONG_STATUS},
- {"Com_execute_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_EXECUTE]), SHOW_LONG_STATUS},
+ {"Com_execute_sql", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_EXECUTE]), SHOW_LONG_STATUS},
{"Com_flush", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_FLUSH]), SHOW_LONG_STATUS},
{"Com_grant", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_GRANT]), SHOW_LONG_STATUS},
{"Com_ha_close", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_HA_CLOSE]), SHOW_LONG_STATUS},
@@ -6356,7 +6339,7 @@
master_password= master_host= 0;
master_info_file= (char*) "master.info",
relay_log_info_file= (char*) "relay-log.info";
- master_ssl_key= master_ssl_cert= master_ssl_ca=
+ master_ssl_key= master_ssl_cert= master_ssl_ca=
master_ssl_capath= master_ssl_cipher= 0;
report_user= report_password = report_host= 0; /* TO BE DELETED */
opt_relay_logname= opt_relaylog_index_name= 0;
@@ -6377,7 +6360,7 @@
global_system_variables.max_join_size= (ulonglong) HA_POS_ERROR;
max_system_variables.max_join_size= (ulonglong) HA_POS_ERROR;
global_system_variables.old_passwords= 0;
-
+
/*
Default behavior for 4.1 and 5.0 is to treat NULL values as unequal
when collecting index statistics for MyISAM tables.
@@ -7006,7 +6989,7 @@
exit(1);
}
switch (method-1) {
- case 0:
+ case 0:
method_conv= MI_STATS_METHOD_NULLS_EQUAL;
break;
case 1:
@@ -7420,7 +7403,7 @@
(void) my_close(file, MYF(0));
}
sql_perror("Can't start server: can't create PID file");
- exit(1);
+ exit(1);
}
--- 1.286/sql/sql_class.h 2006-04-12 17:46:36 -04:00
+++ 1.287/sql/sql_class.h 2006-04-13 02:43:09 -04:00
@@ -552,11 +552,7 @@
my_bool new_mode;
my_bool query_cache_wlock_invalidate;
my_bool engine_condition_pushdown;
-#ifdef HAVE_REPLICATION
- ulong sync_replication;
- ulong sync_replication_slave_id;
- ulong sync_replication_timeout;
-#endif /* HAVE_REPLICATION */
+
#ifdef HAVE_INNOBASE_DB
my_bool innodb_table_locks;
my_bool innodb_support_xa;
@@ -755,7 +751,7 @@
- prepared, that is, contain placeholders,
- opened as cursors. We maintain 1 to 1 relationship between
statement and cursor - if user wants to create another cursor for his
- query, we create another statement for it.
+ query, we create another statement for it.
To perform some action with statement we reset THD part to the state of
that statement, do the action, and then save back modified state from THD
to the statement. It will be changed in near future, and Statement will
@@ -778,7 +774,7 @@
ulong id;
/*
- - if set_query_id=1, we set field->query_id for all fields. In that case
+ - if set_query_id=1, we set field->query_id for all fields. In that case
field list can not contain duplicates.
*/
bool set_query_id;
@@ -803,7 +799,7 @@
it. We will see the query_length field as either 0, or the right value
for it.
Assuming that the write and read of an n-bit memory field in an n-bit
- computer is atomic, we can avoid races in the above way.
+ computer is atomic, we can avoid races in the above way.
This printing is needed at least in SHOW PROCESSLIST and SHOW INNODB
STATUS.
*/
@@ -1152,7 +1148,7 @@
/*
One thread can hold up to one named user-level lock. This variable
points to a lock object if the lock is present. See item_func.cc and
- chapter 'Miscellaneous functions', for functions GET_LOCK, RELEASE_LOCK.
+ chapter 'Miscellaneous functions', for functions GET_LOCK, RELEASE_LOCK.
*/
User_level_lock *ull;
#ifndef DBUG_OFF
@@ -1355,10 +1351,10 @@
long long_value;
ulong ulong_value;
} sys_var_tmp;
-
+
struct {
- /*
- If true, mysql_bin_log::write(Log_event) call will not write events to
+ /*
+ If true, mysql_bin_log::write(Log_event) call will not write events to
binlog, and maintain 2 below variables instead (use
mysql_bin_log.start_union_events to turn this on)
*/
@@ -1369,19 +1365,19 @@
*/
bool unioned_events;
/*
- If TRUE, at least one mysql_bin_log::write(Log_event e), where
- e.cache_stmt == TRUE call has been made after last
+ If TRUE, at least one mysql_bin_log::write(Log_event e), where
+ e.cache_stmt == TRUE call has been made after last
mysql_bin_log.start_union_events() call.
*/
bool unioned_events_trans;
-
- /*
+
+ /*
'queries' (actually SP statements) that run under inside this binlog
union have thd->query_id >= first_query_id.
*/
query_id_t first_query_id;
} binlog_evt_union;
-
+
THD();
~THD();
@@ -1393,7 +1389,7 @@
killing mysqld) where it's vital to not allocate excessive and not used
memory. Note, that we still don't return error from init_for_queries():
if preallocation fails, we should notice that at the first call to
- alloc_root.
+ alloc_root.
*/
void init_for_queries();
void change_user(void);
@@ -1589,7 +1585,7 @@
#define SYSTEM_THREAD_SLAVE_SQL 4
/*
- Used to hold information about file and file structure in exchainge
+ Used to hold information about file and file structure in exchainge
via non-DB file (...INTO OUTFILE..., ...LOAD DATA...)
XXX: We never call destructor for objects of this class.
*/
@@ -1771,8 +1767,8 @@
#include <myisam.h>
-/*
- Param to create temporary tables when doing SELECT:s
+/*
+ Param to create temporary tables when doing SELECT:s
NOTE
This structure is copied using memcpy as a part of JOIN.
*/
@@ -1800,8 +1796,8 @@
uint quick_group;
bool using_indirect_summary_function;
/* If >0 convert all blob fields to varchar(convert_blob_length) */
- uint convert_blob_length;
- CHARSET_INFO *table_charset;
+ uint convert_blob_length;
+ CHARSET_INFO *table_charset;
bool schema_table;
/*
True if GROUP BY and its aggregate functions are already computed
@@ -1932,12 +1928,12 @@
else
db= db_arg;
}
- inline Table_ident(LEX_STRING table_arg)
+ inline Table_ident(LEX_STRING table_arg)
:table(table_arg), sel((SELECT_LEX_UNIT *)0)
{
db.str=0;
}
- inline Table_ident(SELECT_LEX_UNIT *s) : sel(s)
+ inline Table_ident(SELECT_LEX_UNIT *s) : sel(s)
{
/* We must have a table name here as this is used with add_table_to_list */
db.str=0; table.str= internal_table_name; table.length=1;
@@ -1967,7 +1963,7 @@
};
/*
- Unique -- class for unique (removing of duplicates).
+ Unique -- class for unique (removing of duplicates).
Puts all values to the TREE. If the tree becomes too big,
it's dumped to the file. User can request sorted values, or
just iterate through them. In the last case tree merging is performed in
@@ -2000,12 +1996,12 @@
}
bool get(TABLE *table);
- static double get_use_cost(uint *buffer, uint nkeys, uint key_size,
+ static double get_use_cost(uint *buffer, uint nkeys, uint key_size,
ulong max_in_memory_size);
- inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size,
+ inline static int get_cost_calc_buff_size(ulong nkeys, uint key_size,
ulong max_in_memory_size)
{
- register ulong max_elems_in_tree=
+ register ulong max_elems_in_tree=
(1 + max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size));
return sizeof(uint)*(1 + nkeys/max_elems_in_tree);
}
--- 1.291/sql/ha_innodb.cc 2006-03-31 16:54:11 -05:00
+++ 1.292/sql/ha_innodb.cc 2006-04-13 02:43:08 -04:00
@@ -153,7 +153,7 @@
/* The default values for the following char* start-up parameters
are determined in innobase_init below: */
-
+
char* innobase_data_home_dir = NULL;
char* innobase_data_file_path = NULL;
char* innobase_log_group_home_dir = NULL;
@@ -205,7 +205,7 @@
handlerton innobase_hton = {
"InnoDB",
SHOW_OPTION_YES,
- "Supports transactions, row-level locking, and foreign keys",
+ "Supports transactions, row-level locking, and foreign keys",
DB_TYPE_INNODB,
innobase_init,
0, /* slot */
@@ -394,7 +394,7 @@
trx_t* trx;
if (!innodb_inited) {
-
+
return;
}
@@ -612,7 +612,7 @@
/* Points to buf or dyn_str. */
char* str = buf;
-
+
if (max_query_len == 0)
{
/* ADDITIONAL SAFETY: the default is to print at
@@ -623,7 +623,7 @@
safe */
max_query_len = 300;
}
-
+
len = min(thd->query_length, max_query_len);
if (len > (sizeof(buf) - 1))
@@ -975,7 +975,7 @@
if (thd->variables.tx_isolation == ISO_SERIALIZABLE) {
/* In the SERIALIZABLE mode we add LOCK IN SHARE MODE to every
plain SELECT if AUTOCOMMIT is not on. */
-
+
return((my_bool)FALSE);
}
@@ -1022,7 +1022,7 @@
return((my_bool)TRUE);
}
-
+
/* Normalize the table name to InnoDB format */
memcpy(norm_name, full_name, full_name_len);
@@ -1306,12 +1306,12 @@
/* -------------- Log files ---------------------------*/
/* The default dir for log files is the datadir of MySQL */
-
+
if (!innobase_log_group_home_dir) {
innobase_log_group_home_dir = default_path;
}
-#ifdef UNIV_LOG_ARCHIVE
+#ifdef UNIV_LOG_ARCHIVE
/* Since innodb_log_arch_dir has no relevance under MySQL,
starting from 4.0.6 we always set it the same as
innodb_log_group_home_dir: */
@@ -1353,14 +1353,14 @@
if (innobase_buffer_pool_awe_mem_mb == 0) {
/* Careful here: we first convert the signed long int to ulint
and only after that divide */
-
+
srv_pool_size = ((ulint) innobase_buffer_pool_size) / 1024;
} else {
srv_use_awe = TRUE;
srv_pool_size = (ulint)
(1024 * innobase_buffer_pool_awe_mem_mb);
srv_awe_window_size = (ulint) innobase_buffer_pool_size;
-
+
/* Note that what the user specified as
innodb_buffer_pool_size is actually the AWE memory window
size in this case, and the real buffer pool size is
@@ -1379,7 +1379,7 @@
os_use_large_pages = (ibool) innobase_use_large_pages;
os_large_page_size = (ulint) innobase_large_page_size;
-
+
srv_file_per_table = (ibool) innobase_file_per_table;
srv_locks_unsafe_for_binlog = (ibool) innobase_locks_unsafe_for_binlog;
@@ -1439,7 +1439,7 @@
THIS DOES NOT WORK CURRENTLY because replication seems to initialize
glob_mi also after innobase_init. */
-
+
/* if (trx_sys_mysql_master_log_pos != -1) {
ut_memcpy(glob_mi.log_file_name, trx_sys_mysql_master_log_name,
1 + ut_strlen(trx_sys_mysql_master_log_name));
@@ -1613,7 +1613,7 @@
if (trx->has_search_latch) {
trx_search_latch_release_if_reserved(trx);
}
-
+
/* The flag trx->active_trans is set to 1 in
1. ::external_lock(),
@@ -1631,13 +1631,13 @@
if (trx->active_trans == 0
&& trx->conc_state != TRX_NOT_STARTED) {
-
+
sql_print_error("trx->active_trans == 0, but trx->conc_state != "
"TRX_NOT_STARTED");
}
if (all
|| (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))) {
-
+
/* We were instructed to commit the whole transaction, or
this is an SQL statement end and autocommit is on */
@@ -1658,7 +1658,7 @@
else
pthread_mutex_unlock(&commit_cond_m);
}
-
+
trx->mysql_log_file_name = mysql_bin_log.get_log_fname();
trx->mysql_log_offset =
(ib_longlong)mysql_bin_log.get_log_file()->pos_in_file;
@@ -1672,14 +1672,14 @@
pthread_cond_signal(&commit_cond);
pthread_mutex_unlock(&commit_cond_m);
}
-
+
if (trx->active_trans == 2) {
pthread_mutex_unlock(&prepare_commit_mutex);
}
-
+
trx->active_trans = 0;
-
+
} else {
/* We just mark the SQL statement ended and do not do a
transaction commit */
@@ -1687,7 +1687,7 @@
if (trx->auto_inc_lock) {
/* If we had reserved the auto-inc lock for some
table in this SQL statement we release it now */
-
+
row_unlock_table_autoinc_for_mysql(trx);
}
/* Store the current undo_no of the transaction so that we
@@ -1741,25 +1741,6 @@
trx->mysql_log_file_name = log_file_name;
trx->mysql_log_offset = (ib_longlong)end_offset;
-#ifdef HAVE_REPLICATION
- if (thd->variables.sync_replication) {
- /* Let us store the binlog file name and the position, so that
- we know how long to wait for the binlog to the replicated to
- the slave in synchronous replication. */
-
- if (trx->repl_wait_binlog_name == NULL) {
-
- trx->repl_wait_binlog_name =
- (char*)mem_alloc_noninline(FN_REFLEN + 100);
- }
-
- ut_a(strlen(log_file_name) < FN_REFLEN + 100);
-
- strcpy(trx->repl_wait_binlog_name, log_file_name);
-
- trx->repl_wait_binlog_pos = (ib_longlong)end_offset;
- }
-#endif /* HAVE_REPLICATION */
trx->flush_log_later = TRUE;
innobase_commit(thd, TRUE);
@@ -1828,219 +1809,9 @@
trx_commit_complete_for_mysql(trx);
}
-#ifdef HAVE_REPLICATION
- if (thd->variables.sync_replication
- && trx->repl_wait_binlog_name
- && innobase_repl_state != 0) {
-
- struct timespec abstime;
- int cmp;
- int ret;
-
- /* In synchronous replication, let us wait until the MySQL
- replication has sent the relevant binlog segment to the
- replication slave. */
-
- pthread_mutex_lock(&innobase_repl_cond_mutex);
-try_again:
- if (innobase_repl_state == 0) {
-
- pthread_mutex_unlock(&innobase_repl_cond_mutex);
-
- return(0);
- }
-
- cmp = strcmp(innobase_repl_file_name,
- trx->repl_wait_binlog_name);
- if (cmp > 0
- || (cmp == 0 && innobase_repl_pos
- >= (my_off_t)trx->repl_wait_binlog_pos)) {
- /* We have already sent the relevant binlog to the
- slave: no need to wait here */
-
- pthread_mutex_unlock(&innobase_repl_cond_mutex);
-
-/* printf("Binlog now sent\n"); */
-
- return(0);
- }
-
- /* Let us update the info about the minimum binlog position
- of waiting threads in the innobase_repl_... variables */
-
- if (innobase_repl_wait_file_name_inited != 0) {
- cmp = strcmp(trx->repl_wait_binlog_name,
- innobase_repl_wait_file_name);
- if (cmp < 0
- || (cmp == 0 && (my_off_t)trx->repl_wait_binlog_pos
- <= innobase_repl_wait_pos)) {
- /* This thd has an even lower position, let
- us update the minimum info */
-
- strcpy(innobase_repl_wait_file_name,
- trx->repl_wait_binlog_name);
-
- innobase_repl_wait_pos =
- trx->repl_wait_binlog_pos;
- }
- } else {
- strcpy(innobase_repl_wait_file_name,
- trx->repl_wait_binlog_name);
-
- innobase_repl_wait_pos = trx->repl_wait_binlog_pos;
-
- innobase_repl_wait_file_name_inited = 1;
- }
- set_timespec(abstime, thd->variables.sync_replication_timeout);
-
- /* Let us suspend this thread to wait on the condition;
- when replication has progressed far enough, we will release
- these waiting threads. The following call
- pthread_cond_timedwait also atomically unlocks
- innobase_repl_cond_mutex. */
-
- innobase_repl_n_wait_threads++;
-
-/* printf("Waiting for binlog to be sent\n"); */
-
- ret = pthread_cond_timedwait(&innobase_repl_cond,
- &innobase_repl_cond_mutex, &abstime);
- innobase_repl_n_wait_threads--;
-
- if (ret != 0) {
- ut_print_timestamp(stderr);
-
- sql_print_error("MySQL synchronous replication was "
- "not able to send the binlog to the "
- "slave within the timeout %lu. We "
- "assume that the slave has become "
- "inaccessible, and switch off "
- "synchronous replication until the "
- "communication to the slave works "
- "again. MySQL synchronous replication "
- "has sent binlog to the slave up to "
- "file %s, position %lu. This "
- "transaction needs it to be sent up "
- "to file %s, position %lu.",
- thd->variables.sync_replication_timeout,
- innobase_repl_file_name,
- (ulong) innobase_repl_pos,
- trx->repl_wait_binlog_name,
- (ulong) trx->repl_wait_binlog_pos);
-
- innobase_repl_state = 0;
-
- pthread_mutex_unlock(&innobase_repl_cond_mutex);
-
- return(0);
- }
-
- goto try_again;
- }
-#endif // HAVE_REPLICATION
return(0);
}
-#ifdef HAVE_REPLICATION
-/*********************************************************************
-In synchronous replication, reports to InnoDB up to which binlog position
-we have sent the binlog to the slave. Note that replication is synchronous
-for one slave only. For other slaves, we do nothing in this function. This
-function is used in a replication master. */
-
-int
-innobase_repl_report_sent_binlog(
-/*=============================*/
- /* out: 0 */
- THD* thd, /* in: thread doing the binlog communication to
- the slave */
- char* log_file_name, /* in: binlog file name */
- my_off_t end_offset) /* in: the offset in the binlog file up to
- which we sent the contents to the slave */
-{
- int cmp;
- ibool can_release_threads = 0;
-
- /* If synchronous replication is not switched on, or this thd is
- sending binlog to a slave where we do not need synchronous replication,
- then return immediately */
-
- if (thd->server_id != thd->variables.sync_replication_slave_id) {
-
- /* Do nothing */
-
- return(0);
- }
-
- pthread_mutex_lock(&innobase_repl_cond_mutex);
-
- if (innobase_repl_state == 0) {
-
- ut_print_timestamp(stderr);
- sql_print_warning("Switching MySQL synchronous replication on "
- "again at binlog file %s, position %lu",
- log_file_name, (ulong) end_offset);
-
- innobase_repl_state = 1;
- }
-
- /* The position should increase monotonically, since just one thread
- is sending the binlog to the slave for which we want synchronous
- replication. Let us check this, and print an error to the .err log
- if that is not the case. */
-
- if (innobase_repl_file_name_inited) {
- cmp = strcmp(log_file_name, innobase_repl_file_name);
-
- if (cmp < 0
- || (cmp == 0 && end_offset < innobase_repl_pos)) {
-
- ut_print_timestamp(stderr);
- sql_print_error("MySQL synchronous replication has "
- "sent binlog to the slave up to file "
- "%s, position %lu, but now MySQL "
- "reports that it sent the binlog only "
- "up to file %s, position %lu",
- innobase_repl_file_name,
- (ulong) innobase_repl_pos,
- log_file_name, (ulong) end_offset);
- }
- }
-
- strcpy(innobase_repl_file_name, log_file_name);
- innobase_repl_pos = end_offset;
- innobase_repl_file_name_inited = 1;
-
- if (innobase_repl_n_wait_threads > 0) {
- /* Let us check if some of the waiting threads doing a trx
- commit can now proceed */
-
- cmp = strcmp(innobase_repl_file_name,
- innobase_repl_wait_file_name);
- if (cmp > 0
- || (cmp == 0 && innobase_repl_pos
- >= innobase_repl_wait_pos)) {
-
- /* Yes, at least one waiting thread can now proceed:
- let us release all waiting threads with a broadcast */
-
- can_release_threads = 1;
-
- innobase_repl_wait_file_name_inited = 0;
- }
- }
-
- pthread_mutex_unlock(&innobase_repl_cond_mutex);
-
- if (can_release_threads) {
-
- pthread_cond_broadcast(&innobase_repl_cond);
- }
-
- return(0);
-}
-#endif /* HAVE_REPLICATION */
-
/*********************************************************************
Rolls back a transaction or the latest SQL statement. */
@@ -2074,7 +1845,7 @@
/* If we had reserved the auto-inc lock for some table (if
we come here to roll back the latest SQL statement) we
release it now before a possibly lengthy rollback */
-
+
row_unlock_table_autoinc_for_mysql(trx);
}
@@ -2114,7 +1885,7 @@
/* If we had reserved the auto-inc lock for some table (if
we come here to roll back the latest SQL statement) we
release it now before a possibly lengthy rollback */
-
+
row_unlock_table_autoinc_for_mysql(trx);
}
@@ -2249,7 +2020,7 @@
if (trx->active_trans == 0
&& trx->conc_state != TRX_NOT_STARTED) {
-
+
sql_print_error("trx->active_trans == 0, but trx->conc_state != "
"TRX_NOT_STARTED");
}
@@ -2478,7 +2249,7 @@
that may be NULL. ref_length must be as exact as possible to
save space, because all row reference buffers are allocated
based on ref_length. */
-
+
ref_length = table->key_info[primary_key].key_length;
} else {
if (primary_key != MAX_KEY) {
@@ -2505,7 +2276,7 @@
that key_used_on_scan is the undefined value MAX_KEY.
The column is the row id in the automatical generation case,
and it will never be updated anyway. */
-
+
if (key_used_on_scan != MAX_KEY) {
sql_print_warning("Table %s key_used_on_scan is %lu even "
"though there is no primary key inside "
@@ -2914,7 +2685,7 @@
if (is_null) {
buff += key_len + 2;
-
+
continue;
}
cs = field->charset();
@@ -2922,7 +2693,7 @@
lenlen = (ulint)
(((Field_varstring*)field)->length_bytes);
- data = row_mysql_read_true_varchar(&len,
+ data = row_mysql_read_true_varchar(&len,
(byte*) (record
+ (ulint)get_field_offset(table, field)),
lenlen);
@@ -2936,7 +2707,7 @@
true_len = (ulint) cs->cset->well_formed_len(cs,
(const char *) data,
(const char *) data + len,
- key_len / cs->mbmaxlen,
+ key_len / cs->mbmaxlen,
&error);
}
@@ -2982,10 +2753,10 @@
if (is_null) {
buff += key_len + 2;
-
+
continue;
}
-
+
cs = field->charset();
blob_data = row_mysql_read_blob_ref(&blob_len,
@@ -3000,11 +2771,11 @@
/* For multi byte character sets we need to calculate
the true length of the key */
-
+
if (blob_len > 0 && cs->mbmaxlen > 1) {
true_len = (ulint) cs->cset->well_formed_len(cs,
(const char *) blob_data,
- (const char *) blob_data
+ (const char *) blob_data
+ blob_len,
key_len / cs->mbmaxlen,
&error);
@@ -3048,7 +2819,7 @@
if (is_null) {
buff += key_len;
-
+
continue;
}
@@ -3061,22 +2832,22 @@
type is not enum or set. For these fields check
if character set is multi byte. */
- if (real_type != FIELD_TYPE_ENUM
+ if (real_type != FIELD_TYPE_ENUM
&& real_type != FIELD_TYPE_SET
&& ( mysql_type == MYSQL_TYPE_VAR_STRING
|| mysql_type == MYSQL_TYPE_STRING)) {
cs = field->charset();
- /* For multi byte character sets we need to
+ /* For multi byte character sets we need to
calculate the true length of the key */
if (key_len > 0 && cs->mbmaxlen > 1) {
- true_len = (ulint)
+ true_len = (ulint)
cs->cset->well_formed_len(cs,
(const char *)src_start,
- (const char *)src_start
+ (const char *)src_start
+ key_len,
key_len / cs->mbmaxlen,
&error);
@@ -3086,9 +2857,9 @@
memcpy(buff, src_start, true_len);
buff += true_len;
- /* Pad the unused space with spaces. Note that no
- padding is ever needed for UCS-2 because in MySQL,
- all UCS2 characters are 2 bytes, as MySQL does not
+ /* Pad the unused space with spaces. Note that no
+ padding is ever needed for UCS-2 because in MySQL,
+ all UCS2 characters are 2 bytes, as MySQL does not
support surrogate pairs, which are needed to represent
characters in the range U+10000 to U+10FFFF. */
@@ -3286,7 +3057,7 @@
templ->mysql_length_bytes = (ulint)
(((Field_varstring*)field)->length_bytes);
}
-
+
templ->charset = dtype_get_charset_coll_noninline(
index->table->cols[i].type.prtype);
templ->mbminlen = index->table->cols[i].type.mbminlen;
@@ -3595,7 +3366,7 @@
o_ptr = (byte*) old_row + get_field_offset(table, field);
n_ptr = (byte*) new_row + get_field_offset(table, field);
-
+
/* Use new_mysql_row_col and col_pack_len save the values */
new_mysql_row_col = n_ptr;
@@ -3605,10 +3376,10 @@
n_len = col_pack_len;
/* We use o_ptr and n_ptr to dig up the actual data for
- comparison. */
+ comparison. */
field_mysql_type = field->type();
-
+
col_type = prebuilt->table->cols[i].type.mtype;
switch (col_type) {
@@ -3626,12 +3397,12 @@
/* This is a >= 5.0.3 type true VARCHAR where
the real payload data length is stored in
1 or 2 bytes */
-
+
o_ptr = row_mysql_read_true_varchar(
&o_len, o_ptr,
(ulint)
(((Field_varstring*)field)->length_bytes));
-
+
n_ptr = row_mysql_read_true_varchar(
&n_len, n_ptr,
(ulint)
@@ -3660,7 +3431,7 @@
/* The field has changed */
ufield = uvect->fields + n_changed;
-
+
/* Let us use a dummy dfield to make the conversion
from the MySQL column format to the InnoDB format */
@@ -3812,7 +3583,7 @@
}
/**************************************************************************
-Removes a new lock set on a row. This method does nothing unless the
+Removes a new lock set on a row. This method does nothing unless the
option innodb_locks_unsafe_for_binlog is set.*/
void
@@ -4496,10 +4267,10 @@
/* We assume that the 'ref' value len is always fixed for the same
table. */
-
+
if (len != ref_length) {
sql_print_error("Stored ref len is %lu, but table ref len is %lu",
- (ulong) len, (ulong) ref_length);
+ (ulong) len, (ulong) ref_length);
}
}
@@ -4568,7 +4339,7 @@
binary_type = 0;
}
- charset_no = 0;
+ charset_no = 0;
if (dtype_is_string_type(col_type)) {
@@ -4587,7 +4358,7 @@
for a true VARCHAR. Let us subtract that, so that the InnoDB
column length in the InnoDB data dictionary is the real
maximum byte length of the actual data. */
-
+
long_true_varchar = 0;
if (field->type() == MYSQL_TYPE_VARCHAR) {
@@ -4601,7 +4372,7 @@
dict_mem_table_add_col(table,
(char*) field->field_name,
col_type,
- dtype_form_prtype(
+ dtype_form_prtype(
(ulint)field->type()
| nulls_allowed | unsigned_type
| binary_type | long_true_varchar,
@@ -4642,7 +4413,7 @@
ulint i;
ulint j;
ulint* field_lengths;
-
+
DBUG_ENTER("create_index");
key = form->key_info + key_num;
@@ -4667,7 +4438,7 @@
field_lengths = (ulint*) my_malloc(sizeof(ulint) * n_fields,
MYF(MY_FAE));
-
+
for (i = 0; i < n_fields; i++) {
key_part = key->key_part + i;
@@ -4676,7 +4447,7 @@
bytes of the column to the index field.) The flag does not
seem to be properly set by MySQL. Let us fall back on testing
the length of the key part versus the column. */
-
+
field = NULL;
for (j = 0; j < form->s->fields; j++) {
@@ -4715,7 +4486,7 @@
"name %s, column name %s.",
table_name,
key_part->field->field_name);
-
+
prefix_len = 0;
}
} else {
@@ -4740,7 +4511,7 @@
error = convert_error_code_to_mysql(error, NULL);
my_free((gptr) field_lengths, MYF(0));
-
+
DBUG_RETURN(error);
}
@@ -4804,20 +4575,20 @@
but we play safe here */
DBUG_RETURN(HA_ERR_TO_BIG_ROW);
- }
+ }
/* Get the transaction associated with the current thd, or create one
if not yet created */
-
+
parent_trx = check_trx_exists(current_thd);
/* In case MySQL calls this in the middle of a SELECT query, release
possible adaptive hash latch to avoid deadlocks of threads */
- trx_search_latch_release_if_reserved(parent_trx);
-
+ trx_search_latch_release_if_reserved(parent_trx);
+
trx = trx_allocate_for_mysql();
-
+
trx->mysql_thd = thd;
trx->mysql_query_str = &((*thd).query);
@@ -4858,7 +4629,7 @@
/* Look for a primary key */
primary_key_no= (table->s->primary_key != MAX_KEY ?
- (int) table->s->primary_key :
+ (int) table->s->primary_key :
-1);
/* Our function row_get_mysql_key_number_for_index assumes
@@ -4907,7 +4678,7 @@
current_thd->query_length,
current_thd->charset())) {
error = HA_ERR_OUT_OF_MEM;
-
+
goto cleanup;
}
@@ -4939,7 +4710,7 @@
if ((create_info->used_fields & HA_CREATE_USED_AUTO) &&
(create_info->auto_increment_value != 0)) {
- /* Query was ALTER TABLE...AUTO_INCREMENT = x; or
+ /* Query was ALTER TABLE...AUTO_INCREMENT = x; or
CREATE TABLE ...AUTO_INCREMENT = x; Find out a table
definition from the dictionary and get the current value
of the auto increment field. Set a new value to the
@@ -4961,9 +4732,9 @@
cleanup:
innobase_commit_low(trx);
-
+
row_mysql_unlock_data_dictionary(trx);
-
+
trx_free_for_mysql(trx);
DBUG_RETURN(error);
@@ -5067,13 +4838,13 @@
/* Get the transaction associated with the current thd, or create one
if not yet created */
-
+
parent_trx = check_trx_exists(current_thd);
/* In case MySQL calls this in the middle of a SELECT query, release
possible adaptive hash latch to avoid deadlocks of threads */
- trx_search_latch_release_if_reserved(parent_trx);
+ trx_search_latch_release_if_reserved(parent_trx);
if (lower_case_table_names) {
srv_lower_case_table_names = TRUE;
@@ -5149,13 +4920,13 @@
/* Get the transaction associated with the current thd, or create one
if not yet created */
-
+
parent_trx = check_trx_exists(current_thd);
/* In case MySQL calls this in the middle of a SELECT query, release
possible adaptive hash latch to avoid deadlocks of threads */
- trx_search_latch_release_if_reserved(parent_trx);
+ trx_search_latch_release_if_reserved(parent_trx);
ptr = strend(path) - 2;
@@ -5225,13 +4996,13 @@
/* Get the transaction associated with the current thd, or create one
if not yet created */
-
+
parent_trx = check_trx_exists(current_thd);
/* In case MySQL calls this in the middle of a SELECT query, release
possible adaptive hash latch to avoid deadlocks of threads */
- trx_search_latch_release_if_reserved(parent_trx);
+ trx_search_latch_release_if_reserved(parent_trx);
if (lower_case_table_names) {
srv_lower_case_table_names = TRUE;
@@ -5439,7 +5210,7 @@
searches, we pretend that a sequential read takes the same time
as a random disk read, that is, we do not divide the following
by 10, which would be physically realistic. */
-
+
return((double) (prebuilt->table->stat_clustered_index_size));
}
@@ -5457,9 +5228,9 @@
{
ha_rows total_rows;
double time_for_scan;
-
+
if (index != table->s->primary_key) {
- /* Not clustered */
+ /* Not clustered */
return(handler::read_time(index, ranges, rows));
}
@@ -5543,14 +5314,14 @@
".ibd");
unpack_filename(path,path);
} else {
- my_snprintf(path, sizeof(path), "%s/%s%s",
+ my_snprintf(path, sizeof(path), "%s/%s%s",
mysql_data_home, ib_table->name,
reg_ext);
-
+
unpack_filename(path,path);
}
- /* Note that we do not know the access time of the table,
+ /* Note that we do not know the access time of the table,
nor the CHECK TABLE time, nor the UPDATE or INSERT time. */
if (os_file_get_status(path,&stat_info)) {
@@ -5689,7 +5460,7 @@
the auto-inc counter, and the second call is guaranteed to
succeed. */
- ret = innobase_read_and_init_auto_inc(&auto_inc);
+ ret = innobase_read_and_init_auto_inc(&auto_inc);
if (ret != 0) {
ret = innobase_read_and_init_auto_inc(&auto_inc);
@@ -5702,7 +5473,7 @@
auto_inc = 0;
}
}
-
+
auto_increment_value = auto_inc;
}
@@ -5717,7 +5488,7 @@
int
ha_innobase::analyze(
-/*=================*/
+/*=================*/
/* out: returns always 0 (success) */
THD* thd, /* in: connection thread handle */
HA_CHECK_OPT* check_opt) /* in: currently ignored */
@@ -5775,7 +5546,7 @@
return(HA_ADMIN_OK);
}
- return(HA_ADMIN_CORRUPT);
+ return(HA_ADMIN_CORRUPT);
}
/*****************************************************************
@@ -5917,7 +5688,7 @@
}
-int
+int
ha_innobase::get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
{
dict_foreign_t* foreign;
@@ -5931,7 +5702,7 @@
mutex_enter_noninline(&(dict_sys->mutex));
foreign = UT_LIST_GET_FIRST(prebuilt->table->foreign_list);
- while (foreign != NULL)
+ while (foreign != NULL)
{
uint i;
FOREIGN_KEY_INFO f_key_info;
@@ -5952,7 +5723,7 @@
f_key_info.referenced_db= make_lex_string(thd, 0,
tmp_buff, i, 1);
tmp_buff+= i + 1;
- f_key_info.referenced_table= make_lex_string(thd, 0, tmp_buff,
+ f_key_info.referenced_table= make_lex_string(thd, 0, tmp_buff,
(uint) strlen(tmp_buff), 1);
for (i= 0;;)
@@ -5972,7 +5743,7 @@
{
length=17;
tmp_buff= "ON DELETE CASCADE";
- }
+ }
else if (foreign->type == DICT_FOREIGN_ON_DELETE_SET_NULL)
{
length=18;
@@ -6002,7 +5773,7 @@
f_key_info.constraint_method,
tmp_buff, length, 1);
- FOREIGN_KEY_INFO *pf_key_info= ((FOREIGN_KEY_INFO *)
+ FOREIGN_KEY_INFO *pf_key_info= ((FOREIGN_KEY_INFO *)
thd->memdup((gptr) &f_key_info,
sizeof(FOREIGN_KEY_INFO)));
f_key_list->push_back(pf_key_info);
@@ -6187,13 +5958,13 @@
this same LOCK TABLES; since MySQL does NOT call external_lock
in this case, we must use x-row locks inside InnoDB to be
prepared for an update of a row */
-
+
prebuilt->select_lock_type = LOCK_X;
} else {
if (trx->isolation_level != TRX_ISO_SERIALIZABLE
&& thd->lex->sql_command == SQLCOM_SELECT
&& lock_type == TL_READ) {
-
+
/* For other than temporary tables, we obtain
no lock for consistent read (plain SELECT). */
@@ -6203,8 +5974,8 @@
select_lock_type value. The value of
stored_select_lock_type was decided in:
1) ::store_lock(),
- 2) ::external_lock(),
- 3) ::init_table_handle_for_HANDLER(), and
+ 2) ::external_lock(),
+ 3) ::init_table_handle_for_HANDLER(), and
4) :.transactional_table_lock(). */
prebuilt->select_lock_type =
@@ -6254,9 +6025,9 @@
case ISO_SERIALIZABLE: return(TRX_ISO_SERIALIZABLE);
case ISO_READ_UNCOMMITTED: return(TRX_ISO_READ_UNCOMMITTED);
default: ut_a(0); return(0);
- }
+ }
}
-
+
/**********************************************************************
As MySQL will execute an external lock for every new table it uses when it
starts to process an SQL statement (an exception is when MySQL calls
@@ -6301,7 +6072,7 @@
/* MySQL is setting a new table lock */
trx->detailed_error[0] = '\0';
-
+
/* Set the MySQL flag to mark that there is an active
transaction */
if (trx->active_trans == 0) {
@@ -6342,7 +6113,7 @@
TABLES if AUTOCOMMIT=1. It does not make much sense to acquire
an InnoDB table lock if it is released immediately at the end
of LOCK TABLES, and InnoDB's table locks in that case cause
- VERY easily deadlocks.
+ VERY easily deadlocks.
We do not set InnoDB table locks if user has not explicitly
requested a table lock. Note that thd->in_lock_tables
@@ -6385,7 +6156,7 @@
trx->mysql_n_tables_locked = 0;
prebuilt->used_in_HANDLER = FALSE;
-
+
/* Release a possible FIFO ticket and search latch. Since we
may reserve the kernel mutex, we have to release the search
system latch first to obey the latching order. */
@@ -6491,8 +6262,8 @@
if (thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) {
- /* Store the current undo_no of the transaction
- so that we know where to roll back if we have
+ /* Store the current undo_no of the transaction
+ so that we know where to roll back if we have
to roll back the next SQL statement */
trx_mark_sql_stat_end(trx);
@@ -6735,7 +6506,7 @@
INNOBASE_SHARE *share;
pthread_mutex_lock(&innobase_share_mutex);
uint length=(uint) strlen(table_name);
-
+
if (!(share=(INNOBASE_SHARE*) hash_search(&innobase_open_tables,
(mysql_byte*) table_name,
length))) {
@@ -6751,17 +6522,17 @@
(mysql_byte*) share)) {
pthread_mutex_unlock(&innobase_share_mutex);
my_free((gptr) share,0);
-
+
return 0;
}
-
+
thr_lock_init(&share->lock);
pthread_mutex_init(&share->mutex,MY_MUTEX_INIT_FAST);
}
-
+
share->use_count++;
pthread_mutex_unlock(&innobase_share_mutex);
-
+
return share;
}
@@ -6808,7 +6579,7 @@
Be careful to ignore TL_IGNORE if we are going to do something with
only 'real' locks! */
- if ((lock_type == TL_READ && thd->in_lock_tables) ||
+ if ((lock_type == TL_READ && thd->in_lock_tables) ||
(lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) ||
lock_type == TL_READ_WITH_SHARED_LOCKS ||
lock_type == TL_READ_NO_INSERT ||
@@ -6894,7 +6665,7 @@
}
/* If we are not doing a LOCK TABLE, DISCARD/IMPORT
- TABLESPACE or TRUNCATE TABLE then allow multiple
+ TABLESPACE or TRUNCATE TABLE then allow multiple
writers. Note that ALTER TABLE uses a TL_WRITE_ALLOW_READ
< TL_WRITE_CONCURRENT_INSERT.
@@ -6903,7 +6674,7 @@
stored function call (MySQL does have thd->in_lock_tables
TRUE there). */
- if ((lock_type >= TL_WRITE_CONCURRENT_INSERT
+ if ((lock_type >= TL_WRITE_CONCURRENT_INSERT
&& lock_type <= TL_WRITE)
&& !(thd->in_lock_tables
&& thd->lex->sql_command == SQLCOM_LOCK_TABLES)
@@ -6919,19 +6690,19 @@
MySQL would use the lock TL_READ_NO_INSERT on t2, and that
would conflict with TL_WRITE_ALLOW_WRITE, blocking all inserts
to t2. Convert the lock to a normal read lock to allow
- concurrent inserts to t2.
+ concurrent inserts to t2.
- We especially allow concurrent inserts if MySQL is at the
- start of a stored procedure call (SQLCOM_CALL)
+ We especially allow concurrent inserts if MySQL is at the
+ start of a stored procedure call (SQLCOM_CALL)
(MySQL does have thd->in_lock_tables TRUE there). */
-
+
if (lock_type == TL_READ_NO_INSERT
&& (!thd->in_lock_tables
|| thd->lex->sql_command == SQLCOM_CALL)) {
lock_type = TL_READ;
}
-
+
lock.type = lock_type;
}
@@ -6963,7 +6734,7 @@
ut_a(prebuilt->trx ==
(trx_t*) current_thd->ha_data[innobase_hton.slot]);
ut_a(prebuilt->table);
-
+
if (prebuilt->trx->conc_state == TRX_NOT_STARTED) {
trx_was_not_started = TRUE;
}
@@ -6978,7 +6749,7 @@
if (auto_inc != 0) {
/* Already initialized */
*ret = auto_inc;
-
+
error = 0;
goto func_exit_early;
@@ -6990,14 +6761,14 @@
error = convert_error_code_to_mysql(error, user_thd);
goto func_exit_early;
- }
+ }
/* Check again if someone has initialized the counter meanwhile */
auto_inc = dict_table_autoinc_read(prebuilt->table);
if (auto_inc != 0) {
*ret = auto_inc;
-
+
error = 0;
goto func_exit_early;
@@ -7014,7 +6785,7 @@
accept this flaw, since the deadlocks were a bigger trouble. */
/* Fetch all the columns in the key */
-
+
prebuilt->hint_need_to_fetch_extra_cols = ROW_RETRIEVE_ALL_COLS;
old_select_lock_type = prebuilt->select_lock_type;
@@ -7093,14 +6864,14 @@
{
longlong nr;
int error;
-
+
error = innobase_read_and_init_auto_inc(&nr);
if (error) {
/* This should never happen in the current (5.0.6) code, since
we call this function only after the counter has been
initialized. */
-
+
ut_print_timestamp(stderr);
sql_print_error("Error %lu in ::get_auto_increment()",
(ulong) error);
@@ -7125,7 +6896,7 @@
error = convert_error_code_to_mysql(error, user_thd);
DBUG_RETURN(error);
- }
+ }
dict_table_autoinc_initialize(prebuilt->table, value);
@@ -7190,7 +6961,7 @@
|| mysql_type == FIELD_TYPE_MEDIUM_BLOB
|| mysql_type == FIELD_TYPE_BLOB
|| mysql_type == FIELD_TYPE_LONG_BLOB) {
-
+
/* In the MySQL key value format, a column prefix of
a BLOB is preceded by a 2-byte length field */
@@ -7296,7 +7067,7 @@
str + data_len, (int) n_chars);
if (char_length > data_len) {
char_length = data_len;
- }
+ }
} else {
if (data_len < prefix_len) {
char_length = data_len;
@@ -7311,15 +7082,15 @@
extern "C" {
/**********************************************************************
-This function returns true if
+This function returns true if
1) SQL-query in the current thread
-is either REPLACE or LOAD DATA INFILE REPLACE.
+is either REPLACE or LOAD DATA INFILE REPLACE.
2) SQL-query in the current thread
is INSERT ON DUPLICATE KEY UPDATE.
-NOTE that /mysql/innobase/row/row0ins.c must contain the
+NOTE that /mysql/innobase/row/row0ins.c must contain the
prototype for this function ! */
ibool
@@ -7327,9 +7098,9 @@
/*==========================*/
{
THD* thd;
-
+
thd = (THD *)innobase_current_thd();
-
+
if (thd->lex->sql_command == SQLCOM_REPLACE ||
thd->lex->sql_command == SQLCOM_REPLACE_SELECT ||
(thd->lex->sql_command == SQLCOM_LOAD &&
@@ -7351,7 +7122,7 @@
/***********************************************************************
This function is used to prepare X/Open XA distributed transaction */
-int
+int
innobase_xa_prepare(
/*================*/
/* out: 0 or error number */
@@ -7444,10 +7215,10 @@
/***********************************************************************
This function is used to recover X/Open XA distributed transactions */
-int
+int
innobase_xa_recover(
/*================*/
- /* out: number of prepared transactions
+ /* out: number of prepared transactions
stored in xid_list */
XID* xid_list, /* in/out: prepared transactions */
uint len) /* in: number of slots in xid_list */
@@ -7464,7 +7235,7 @@
This function is used to commit one X/Open XA distributed transaction
which is in the prepared state */
-int
+int
innobase_commit_by_xid(
/*===================*/
/* out: 0 or error number */
@@ -7476,7 +7247,7 @@
if (trx) {
innobase_commit_low(trx);
-
+
return(XA_OK);
} else {
return(XAER_NOTA);
@@ -7487,7 +7258,7 @@
This function is used to rollback one X/Open XA distributed transaction
which is in the prepared state */
-int
+int
innobase_rollback_by_xid(
/*=====================*/
/* out: 0 or error number */
@@ -7507,7 +7278,7 @@
/***********************************************************************
Create a consistent view for a cursor based on current transaction
which is created if the corresponding MySQL thread still lacks one.
-This consistent view is then used inside of MySQL when accessing records
+This consistent view is then used inside of MySQL when accessing records
using a cursor. */
void*
@@ -7521,7 +7292,7 @@
/***********************************************************************
Close the given consistent cursor view of a transaction and restore
-global read view to a transaction read view. Transaction is created if the
+global read view to a transaction read view. Transaction is created if the
corresponding MySQL thread still lacks one. */
void
@@ -7534,8 +7305,8 @@
}
/***********************************************************************
-Set the given consistent cursor view to a transaction which is created
-if the corresponding MySQL thread still lacks one. If the given
+Set the given consistent cursor view to a transaction which is created
+if the corresponding MySQL thread still lacks one. If the given
consistent cursor view is NULL global read view of a transaction is
restored to a transaction read view. */
@@ -7544,7 +7315,7 @@
/*=====================*/
void* curview)/* in: Consistent cursor view to be set */
{
- read_cursor_set_for_mysql(check_trx_exists(current_thd),
+ read_cursor_set_for_mysql(check_trx_exists(current_thd),
(cursor_view_t*) curview);
}
--- 1.110/sql/ha_innodb.h 2006-01-31 13:41:43 -05:00
+++ 1.111/sql/ha_innodb.h 2006-04-13 02:43:08 -04:00
@@ -165,15 +165,15 @@
int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list);
bool can_switch_engines();
uint referenced_by_foreign_key();
- void free_foreign_key_create_info(char* str);
+ void free_foreign_key_create_info(char* str);
THR_LOCK_DATA **store_lock(THD *thd, THR_LOCK_DATA **to,
enum thr_lock_type lock_type);
- void init_table_handle_for_HANDLER();
+ void init_table_handle_for_HANDLER();
ulonglong get_auto_increment();
int reset_auto_increment(ulonglong value);
virtual bool get_error_message(int error, String *buf);
-
+
uint8 table_cache_type() { return HA_CACHE_TBL_ASKTRANSACT; }
/*
ask handler about permission to cache table during query registration
@@ -280,7 +280,7 @@
int innobase_xa_recover(
/*====================*/
- /* out: number of prepared transactions
+ /* out: number of prepared transactions
stored in xid_list */
XID* xid_list, /* in/out: prepared transactions */
uint len); /* in: number of slots in xid_list */
@@ -303,13 +303,10 @@
XID *xid); /* in : X/Open XA Transaction Identification */
-int innobase_repl_report_sent_binlog(THD *thd, char *log_file_name,
- my_off_t end_offset);
-
/***********************************************************************
Create a consistent view for a cursor based on current transaction
which is created if the corresponding MySQL thread still lacks one.
-This consistent view is then used inside of MySQL when accessing records
+This consistent view is then used inside of MySQL when accessing records
using a cursor. */
void*
@@ -319,7 +316,7 @@
/***********************************************************************
Close the given consistent cursor view of a transaction and restore
-global read view to a transaction read view. Transaction is created if the
+global read view to a transaction read view. Transaction is created if the
corresponding MySQL thread still lacks one. */
void
@@ -328,8 +325,8 @@
void* curview); /* in: Consistent read view to be closed */
/***********************************************************************
-Set the given consistent cursor view to a transaction which is created
-if the corresponding MySQL thread still lacks one. If the given
+Set the given consistent cursor view to a transaction which is created
+if the corresponding MySQL thread still lacks one. If the given
consistent cursor view is NULL global read view of a transaction is
restored to a transaction read view. */
--- 1.151/sql/set_var.cc 2006-04-12 10:08:57 -04:00
+++ 1.152/sql/set_var.cc 2006-04-13 02:43:09 -04:00
@@ -205,7 +205,7 @@
sys_var_trust_routine_creators
sys_trust_routine_creators("log_bin_trust_routine_creators",
&trust_function_creators);
-sys_var_bool_ptr
+sys_var_bool_ptr
sys_trust_function_creators("log_bin_trust_function_creators",
&trust_function_creators);
sys_var_thd_ulong sys_log_warnings("log_warnings", &SV::log_warnings);
@@ -376,17 +376,6 @@
&SV::table_type);
sys_var_thd_storage_engine sys_storage_engine("storage_engine",
&SV::table_type);
-#ifdef HAVE_REPLICATION
-sys_var_sync_binlog_period sys_sync_binlog_period("sync_binlog", &sync_binlog_period);
-sys_var_thd_ulong sys_sync_replication("sync_replication",
- &SV::sync_replication);
-sys_var_thd_ulong sys_sync_replication_slave_id(
- "sync_replication_slave_id",
- &SV::sync_replication_slave_id);
-sys_var_thd_ulong sys_sync_replication_timeout(
- "sync_replication_timeout",
- &SV::sync_replication_timeout);
-#endif
sys_var_bool_ptr sys_sync_frm("sync_frm", &opt_sync_frm);
sys_var_long_ptr sys_table_cache_size("table_cache",
&table_cache_size);
@@ -708,12 +697,6 @@
&sys_sql_warnings,
&sys_sql_notes,
&sys_storage_engine,
-#ifdef HAVE_REPLICATION
- &sys_sync_binlog_period,
- &sys_sync_replication,
- &sys_sync_replication_slave_id,
- &sys_sync_replication_timeout,
-#endif
&sys_sync_frm,
&sys_table_cache_size,
&sys_table_lock_wait_timeout,
@@ -742,7 +725,7 @@
&sys_innodb_thread_concurrency,
&sys_innodb_commit_concurrency,
&sys_innodb_flush_log_at_trx_commit,
-#endif
+#endif
&sys_trust_routine_creators,
&sys_trust_function_creators,
&sys_engine_condition_pushdown,
@@ -803,7 +786,7 @@
{sys_delayed_insert_timeout.name, (char*) &sys_delayed_insert_timeout, SHOW_SYS},
{sys_delayed_queue_size.name,(char*) &sys_delayed_queue_size, SHOW_SYS},
{sys_div_precincrement.name,(char*) &sys_div_precincrement,SHOW_SYS},
- {sys_engine_condition_pushdown.name,
+ {sys_engine_condition_pushdown.name,
(char*) &sys_engine_condition_pushdown, SHOW_SYS},
{sys_expire_logs_days.name, (char*) &sys_expire_logs_days, SHOW_SYS},
{sys_flush.name, (char*) &sys_flush, SHOW_SYS},
@@ -931,9 +914,9 @@
{sys_myisam_repair_threads.name, (char*) &sys_myisam_repair_threads,
SHOW_SYS},
{sys_myisam_sort_buffer_size.name, (char*) &sys_myisam_sort_buffer_size, SHOW_SYS},
-
+
{sys_myisam_stats_method.name, (char*) &sys_myisam_stats_method, SHOW_SYS},
-
+
#ifdef __NT__
{"named_pipe", (char*) &opt_enable_named_pipe, SHOW_MY_BOOL},
#endif
@@ -1009,15 +992,7 @@
{"sql_notes", (char*) &sys_sql_notes, SHOW_BOOL},
{"sql_warnings", (char*) &sys_sql_warnings, SHOW_BOOL},
{sys_storage_engine.name, (char*) &sys_storage_engine, SHOW_SYS},
-#ifdef HAVE_REPLICATION
- {sys_sync_binlog_period.name,(char*) &sys_sync_binlog_period, SHOW_SYS},
-#endif
{sys_sync_frm.name, (char*) &sys_sync_frm, SHOW_SYS},
-#ifdef HAVE_REPLICATION
- {sys_sync_replication.name, (char*) &sys_sync_replication, SHOW_SYS},
- {sys_sync_replication_slave_id.name, (char*) &sys_sync_replication_slave_id,SHOW_SYS},
- {sys_sync_replication_timeout.name, (char*) &sys_sync_replication_timeout,SHOW_SYS},
-#endif
#ifdef HAVE_TZNAME
{"system_time_zone", system_time_zone, SHOW_CHAR},
#endif
@@ -1204,7 +1179,7 @@
thd->variables.tx_isolation);
}
-static void fix_completion_type(THD *thd __attribute__(unused),
+static void fix_completion_type(THD *thd __attribute__(unused),
enum_var_type type __attribute__(unused)) {}
static int check_completion_type(THD *thd, set_var *var)
@@ -1272,7 +1247,7 @@
#ifdef HAVE_QUERY_CACHE
static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type)
{
- query_cache_min_res_unit=
+ query_cache_min_res_unit=
query_cache.set_min_res_unit(query_cache_min_res_unit);
}
#endif
@@ -1336,7 +1311,7 @@
static void fix_max_connections(THD *thd, enum_var_type type)
{
#ifndef EMBEDDED_LIBRARY
- resize_thr_alarm(max_connections +
+ resize_thr_alarm(max_connections +
global_system_variables.max_insert_delayed_threads + 10);
#endif
}
@@ -1514,7 +1489,7 @@
if (var->type == OPT_GLOBAL)
{
/* Lock is needed to make things safe on 32 bit systems */
- pthread_mutex_lock(&LOCK_global_system_variables);
+ pthread_mutex_lock(&LOCK_global_system_variables);
global_system_variables.*offset= (ha_rows) tmp;
pthread_mutex_unlock(&LOCK_global_system_variables);
}
@@ -1888,7 +1863,7 @@
my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, res->c_ptr());
return 1;
}
-
+
/*
We must copy result to thread space to not get a memory leak if
update is aborted
@@ -1945,7 +1920,7 @@
const char *new_name;
} my_old_conv;
-static my_old_conv old_conv[]=
+static my_old_conv old_conv[]=
{
{ "cp1251_koi8" , "cp1251" },
{ "cp1250_latin2" , "cp1250" },
@@ -1963,7 +1938,7 @@
CHARSET_INFO *get_old_charset_by_name(const char *name)
{
my_old_conv *conv;
-
+
for (conv= old_conv; conv->old_name; conv++)
{
if (!my_strcasecmp(&my_charset_latin1, name, conv->old_name))
@@ -2344,7 +2319,7 @@
pthread_mutex_lock(&LOCK_global_system_variables);
key_cache= get_key_cache(base_name);
-
+
if (!key_cache)
{
/* Key cache didn't exists */
@@ -2381,7 +2356,7 @@
Move tables using this key cache to the default key cache
and clear the old key cache.
*/
- NAMED_LIST *list;
+ NAMED_LIST *list;
key_cache= (KEY_CACHE *) find_named(&key_caches, base_name->str,
base_name->length, &list);
key_cache->in_init= 1;
@@ -2410,7 +2385,7 @@
error= (bool)(ha_resize_key_cache(key_cache));
pthread_mutex_lock(&LOCK_global_system_variables);
- key_cache->in_init= 0;
+ key_cache->in_init= 0;
end:
pthread_mutex_unlock(&LOCK_global_system_variables);
@@ -2459,7 +2434,7 @@
error= (bool) (ha_resize_key_cache(key_cache));
pthread_mutex_lock(&LOCK_global_system_variables);
- key_cache->in_init= 0;
+ key_cache->in_init= 0;
end:
pthread_mutex_unlock(&LOCK_global_system_variables);
@@ -2632,7 +2607,7 @@
byte *sys_var_thd_time_zone::value_ptr(THD *thd, enum_var_type type,
LEX_STRING *base)
{
- /*
+ /*
We can use ptr() instead of c_ptr() here because String contaning
time zone name is guaranteed to be zero ended.
*/
@@ -2786,7 +2761,7 @@
See sql/mysqld.cc/, comments in function init_server_components() for an
explaination of the different warnings we send below
*/
-
+
if (opt_sql_bin_update)
{
((sys_var_thd_bit*) var->var)->bit_flag|= (OPTION_BIN_LOG |
@@ -2838,7 +2813,7 @@
static byte *get_error_count(THD *thd)
{
- thd->sys_var_tmp.long_value=
+ thd->sys_var_tmp.long_value=
thd->warn_count[(uint) MYSQL_ERROR::WARN_LEVEL_ERROR];
return (byte*) &thd->sys_var_tmp.long_value;
}
@@ -2878,7 +2853,7 @@
ptr pointer to option structure
*/
-static struct my_option *find_option(struct my_option *opt, const char *name)
+static struct my_option *find_option(struct my_option *opt, const char *name)
{
uint length=strlen(name);
for (; opt->name; opt++)
@@ -3286,7 +3261,7 @@
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
ER(ER_WARN_DEPRECATED_SYNTAX), "table_type",
- "storage_engine");
+ "storage_engine");
}
void sys_var_thd_table_type::set_default(THD *thd, enum_var_type type)
@@ -3385,7 +3360,7 @@
ulong fix_sql_mode(ulong sql_mode)
{
/*
- Note that we dont set
+ Note that we dont set
MODE_NO_KEY_OPTIONS | MODE_NO_TABLE_OPTIONS | MODE_NO_FIELD_OPTIONS
to allow one to get full use of MySQL in this mode.
*/
@@ -3394,7 +3369,7 @@
{
sql_mode|= (MODE_REAL_AS_FLOAT | MODE_PIPES_AS_CONCAT | MODE_ANSI_QUOTES |
MODE_IGNORE_SPACE);
- /*
+ /*
MODE_ONLY_FULL_GROUP_BY removed from ANSI mode because it is currently
overly restrictive (see BUG#8510).
*/
@@ -3479,7 +3454,7 @@
KEY_CACHE *key_cache;
DBUG_ENTER("create_key_cache");
DBUG_PRINT("enter",("name: %.*s", length, name));
-
+
if ((key_cache= (KEY_CACHE*) my_malloc(sizeof(KEY_CACHE),
MYF(MY_ZEROFILL | MY_WME))))
{
@@ -3546,7 +3521,7 @@
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_DEPRECATED_SYNTAX,
ER(ER_WARN_DEPRECATED_SYNTAX), "log_bin_trust_routine_creators",
- "log_bin_trust_function_creators");
+ "log_bin_trust_function_creators");
}
void sys_var_trust_routine_creators::set_default(THD *thd, enum_var_type type)
--- 1.148/sql/sql_repl.cc 2006-04-07 13:44:32 -04:00
+++ 1.149/sql/sql_repl.cc 2006-04-13 02:43:09 -04:00
@@ -385,9 +385,6 @@
goto err;
}
- if (thd->variables.sync_replication)
- ha_repl_report_sent_binlog(thd, log_file_name, pos);
-
/*
We need to start a packet with something other than 255
to distinguish it from error
@@ -480,9 +477,6 @@
goto err;
}
- if (thd->variables.sync_replication)
- ha_repl_report_sent_binlog(thd, log_file_name, my_b_tell(&log));
-
/*
No need to save this event. We are only doing simple reads
(no real parsing of the events) so we don't need it. And so
@@ -541,9 +535,6 @@
goto err;
}
- if (thd->variables.sync_replication)
- ha_repl_report_sent_binlog(thd, log_file_name, my_b_tell(&log));
-
DBUG_PRINT("info", ("log event code %d",
(*packet)[LOG_EVENT_OFFSET+1] ));
if ((*packet)[LOG_EVENT_OFFSET+1] == LOAD_EVENT)
@@ -657,9 +648,6 @@
goto err;
}
- if (thd->variables.sync_replication)
- ha_repl_report_sent_binlog(thd, log_file_name, my_b_tell(&log));
-
if ((*packet)[LOG_EVENT_OFFSET+1] == LOAD_EVENT)
{
if (send_file(thd))
@@ -705,7 +693,7 @@
if (loop_breaker)
break;
-
+
end_io_cache(&log);
(void) my_close(file, MYF(MY_WME));
@@ -726,18 +714,12 @@
goto err;
}
- if (thd->variables.sync_replication)
- ha_repl_report_sent_binlog(thd, log_file_name, 0);
-
packet->length(0);
packet->append('\0');
}
}
end:
- if (thd->variables.sync_replication)
- ha_repl_report_replication_stop(thd);
-
end_io_cache(&log);
(void)my_close(file, MYF(MY_WME));
@@ -749,9 +731,6 @@
DBUG_VOID_RETURN;
err:
- if (thd->variables.sync_replication)
- ha_repl_report_replication_stop(thd);
-
thd->proc_info = "Waiting to finalize termination";
end_io_cache(&log);
/*
@@ -854,7 +833,7 @@
/* Issuing warning then started without --skip-slave-start */
if (!opt_skip_slave_start)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
- ER_MISSING_SKIP_SLAVE,
+ ER_MISSING_SKIP_SLAVE,
ER(ER_MISSING_SKIP_SLAVE));
}
@@ -880,7 +859,7 @@
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_SLAVE_WAS_RUNNING,
ER(ER_SLAVE_WAS_RUNNING));
}
-
+
unlock_slave_threads(mi);
if (slave_errno)
@@ -1040,7 +1019,7 @@
slave_server_id the slave's server id
*/
-
+
void kill_zombie_dump_threads(uint32 slave_server_id)
{
@@ -1105,9 +1084,9 @@
*/
/*
- If the user specified host or port without binlog or position,
+ If the user specified host or port without binlog or position,
reset binlog's name to FIRST and position to 4.
- */
+ */
if ((lex_mi->host || lex_mi->port) && !lex_mi->log_file_name && !lex_mi->pos)
{
@@ -1134,7 +1113,7 @@
mi->port = lex_mi->port;
if (lex_mi->connect_retry)
mi->connect_retry = lex_mi->connect_retry;
-
+
if (lex_mi->ssl != LEX_MASTER_INFO::SSL_UNCHANGED)
mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::SSL_ENABLE);
if (lex_mi->ssl_ca)
@@ -1150,7 +1129,7 @@
#ifndef HAVE_OPENSSL
if (lex_mi->ssl || lex_mi->ssl_ca || lex_mi->ssl_capath ||
lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key )
- push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_SLAVE_IGNORED_SSL_PARAMS, ER(ER_SLAVE_IGNORED_SSL_PARAMS));
#endif
@@ -1510,7 +1489,7 @@
}
field_list.push_back(new Item_empty_string("Log_name", 255));
- field_list.push_back(new Item_return_int("File_size", 20,
+ field_list.push_back(new Item_return_int("File_size", 20,
MYSQL_TYPE_LONGLONG));
if (protocol->send_fields(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
| Thread |
|---|
| • bk commit into 5.0 tree (elliot:1.2151) | Elliot Murphy | 13 Apr |