Commit 169f7da0 authored by Davi Arnaut's avatar Davi Arnaut

Fix for a few assorted compiler warnings.

client/mysql.cc:
  Remove leading whitespace.
  Remove extra text after #else directive.
client/mysqldump.c:
  Function does not take a parameter.
mysys/array.c:
  buffer is a uchar pointer.
sql/item.cc:
  Assert if it should not happen.
storage/myisam/mi_check.c:
  Cast to expected type. This is probably a bug, but it is
  casted in a similar way in another part of the code.
storage/ndb/include/mgmapi/ndb_logevent.h:
  Apply fix from cluster team.
tests/mysql_client_test.c:
  Remove extraneous slash.
parent 99413e46
...@@ -86,7 +86,7 @@ extern "C" { ...@@ -86,7 +86,7 @@ extern "C" {
#endif #endif
#undef bcmp // Fix problem with new readline #undef bcmp // Fix problem with new readline
#if defined( __WIN__) #if defined(__WIN__)
#include <conio.h> #include <conio.h>
#elif !defined(__NETWARE__) #elif !defined(__NETWARE__)
#include <readline/readline.h> #include <readline/readline.h>
...@@ -106,7 +106,7 @@ extern "C" { ...@@ -106,7 +106,7 @@ extern "C" {
#define cmp_database(cs,A,B) strcmp((A),(B)) #define cmp_database(cs,A,B) strcmp((A),(B))
#endif #endif
#if !defined( __WIN__) && !defined(__NETWARE__) && !defined(THREAD) #if !defined(__WIN__) && !defined(__NETWARE__) && !defined(THREAD)
#define USE_POPEN #define USE_POPEN
#endif #endif
...@@ -1862,7 +1862,7 @@ static int read_and_execute(bool interactive) ...@@ -1862,7 +1862,7 @@ static int read_and_execute(bool interactive)
if (opt_outfile && glob_buffer.is_empty()) if (opt_outfile && glob_buffer.is_empty())
fflush(OUTFILE); fflush(OUTFILE);
#if defined( __WIN__) || defined(__NETWARE__) #if defined(__WIN__) || defined(__NETWARE__)
tee_fputs(prompt, stdout); tee_fputs(prompt, stdout);
#if defined(__NETWARE__) #if defined(__NETWARE__)
line=fgets(linebuffer, sizeof(linebuffer)-1, stdin); line=fgets(linebuffer, sizeof(linebuffer)-1, stdin);
...@@ -1873,7 +1873,7 @@ static int read_and_execute(bool interactive) ...@@ -1873,7 +1873,7 @@ static int read_and_execute(bool interactive)
if (p != NULL) if (p != NULL)
*p = '\0'; *p = '\0';
} }
#else defined(__WIN__) #else
if (!tmpbuf.is_alloced()) if (!tmpbuf.is_alloced())
tmpbuf.alloc(65535); tmpbuf.alloc(65535);
tmpbuf.length(0); tmpbuf.length(0);
...@@ -1899,7 +1899,7 @@ static int read_and_execute(bool interactive) ...@@ -1899,7 +1899,7 @@ static int read_and_execute(bool interactive)
if (opt_outfile) if (opt_outfile)
fputs(prompt, OUTFILE); fputs(prompt, OUTFILE);
line= readline(prompt); line= readline(prompt);
#endif /* defined( __WIN__) || defined(__NETWARE__) */ #endif /* defined(__WIN__) || defined(__NETWARE__) */
/* /*
When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS When Ctrl+d or Ctrl+z is pressed, the line may be NULL on some OS
...@@ -1947,10 +1947,10 @@ static int read_and_execute(bool interactive) ...@@ -1947,10 +1947,10 @@ static int read_and_execute(bool interactive)
} }
} }
#if defined( __WIN__) || defined(__NETWARE__) #if defined(__WIN__) || defined(__NETWARE__)
buffer.free(); buffer.free();
#endif #endif
#if defined( __WIN__) #if defined(__WIN__)
tmpbuf.free(); tmpbuf.free();
#endif #endif
...@@ -4602,7 +4602,7 @@ void tee_putc(int c, FILE *file) ...@@ -4602,7 +4602,7 @@ void tee_putc(int c, FILE *file)
putc(c, OUTFILE); putc(c, OUTFILE);
} }
#if defined( __WIN__) || defined(__NETWARE__) #if defined(__WIN__) || defined(__NETWARE__)
#include <time.h> #include <time.h>
#else #else
#include <sys/times.h> #include <sys/times.h>
...@@ -4614,7 +4614,7 @@ void tee_putc(int c, FILE *file) ...@@ -4614,7 +4614,7 @@ void tee_putc(int c, FILE *file)
static ulong start_timer(void) static ulong start_timer(void)
{ {
#if defined( __WIN__) || defined(__NETWARE__) #if defined(__WIN__) || defined(__NETWARE__)
return clock(); return clock();
#else #else
struct tms tms_tmp; struct tms tms_tmp;
......
...@@ -5008,7 +5008,7 @@ int main(int argc, char **argv) ...@@ -5008,7 +5008,7 @@ int main(int argc, char **argv)
exit_code= get_options(&argc, &argv); exit_code= get_options(&argc, &argv);
if (exit_code) if (exit_code)
{ {
free_resources(0); free_resources();
exit(exit_code); exit(exit_code);
} }
...@@ -5016,14 +5016,14 @@ int main(int argc, char **argv) ...@@ -5016,14 +5016,14 @@ int main(int argc, char **argv)
{ {
if(!(stderror_file= freopen(log_error_file, "a+", stderr))) if(!(stderror_file= freopen(log_error_file, "a+", stderr)))
{ {
free_resources(0); free_resources();
exit(EX_MYSQLERR); exit(EX_MYSQLERR);
} }
} }
if (connect_to_db(current_host, current_user, opt_password)) if (connect_to_db(current_host, current_user, opt_password))
{ {
free_resources(0); free_resources();
exit(EX_MYSQLERR); exit(EX_MYSQLERR);
} }
if (!path) if (!path)
......
...@@ -67,7 +67,7 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size, ...@@ -67,7 +67,7 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
Since the dynamic array is usable even if allocation fails here malloc Since the dynamic array is usable even if allocation fails here malloc
should not throw an error should not throw an error
*/ */
if (!(array->buffer= (char*) my_malloc_ci(element_size*init_alloc, MYF(0)))) if (!(array->buffer= (uchar*) my_malloc_ci(element_size*init_alloc, MYF(0))))
array->max_element=0; array->max_element=0;
DBUG_RETURN(FALSE); DBUG_RETURN(FALSE);
} }
......
...@@ -3305,8 +3305,7 @@ Item_copy *Item_copy::create (Item *item) ...@@ -3305,8 +3305,7 @@ Item_copy *Item_copy::create (Item *item)
new Item_copy_uint (item) : new Item_copy_int (item); new Item_copy_uint (item) : new Item_copy_int (item);
case DECIMAL_RESULT: case DECIMAL_RESULT:
return new Item_copy_decimal (item); return new Item_copy_decimal (item);
default:
case ROW_RESULT:
DBUG_ASSERT (0); DBUG_ASSERT (0);
} }
/* should not happen */ /* should not happen */
......
...@@ -1549,7 +1549,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, ...@@ -1549,7 +1549,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info,
if (!param->using_global_keycache) if (!param->using_global_keycache)
VOID(init_key_cache(dflt_key_cache, param->key_cache_block_size, VOID(init_key_cache(dflt_key_cache, param->key_cache_block_size,
param->use_buffers, 0, 0)); (size_t) param->use_buffers, 0, 0));
if (init_io_cache(&param->read_cache,info->dfile, if (init_io_cache(&param->read_cache,info->dfile,
(uint) param->read_buffer_length, (uint) param->read_buffer_length,
......
...@@ -272,172 +272,113 @@ extern "C" { ...@@ -272,172 +272,113 @@ extern "C" {
#endif #endif
}; };
/** struct ndb_logevent_Connected {
* Structure to store and retrieve log event information.
* @see @ref secSLogEvents
*/
struct ndb_logevent {
/** NdbLogEventHandle (to be used for comparing only)
* set in ndb_logevent_get_next()
*/
void *handle;
/** Which event */
enum Ndb_logevent_type type;
/** Time when log event was registred at the management server */
unsigned time;
/** Category of log event */
enum ndb_mgm_event_category category;
/** Severity of log event */
enum ndb_mgm_event_severity severity;
/** Level (0-15) of log event */
unsigned level;
/** Node ID of the node that reported the log event */
unsigned source_nodeid;
/** Union of log event specific data. Use @ref type to decide
* which struct to use
*/
union {
/* CONNECT */
/** Log event specific data for for corresponding NDB_LE_ log event */
struct {
unsigned node; unsigned node;
} Connected; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_Disconnected {
struct {
unsigned node; unsigned node;
} Disconnected; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_CommunicationClosed {
struct {
unsigned node; unsigned node;
} CommunicationClosed; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_CommunicationOpened {
struct {
unsigned node; unsigned node;
} CommunicationOpened; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_ConnectedApiVersion {
struct {
unsigned node; unsigned node;
unsigned version; unsigned version;
} ConnectedApiVersion; };
/* CHECKPOINT */ /* CHECKPOINT */
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_GlobalCheckpointStarted {
struct {
unsigned gci; unsigned gci;
} GlobalCheckpointStarted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_GlobalCheckpointCompleted {
struct {
unsigned gci; unsigned gci;
} GlobalCheckpointCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_LocalCheckpointStarted {
struct {
unsigned lci; unsigned lci;
unsigned keep_gci; unsigned keep_gci;
unsigned restore_gci; unsigned restore_gci;
} LocalCheckpointStarted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_LocalCheckpointCompleted {
struct {
unsigned lci; unsigned lci;
} LocalCheckpointCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_LCPStoppedInCalcKeepGci {
struct {
unsigned data; unsigned data;
} LCPStoppedInCalcKeepGci; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_LCPFragmentCompleted {
struct {
unsigned node; unsigned node;
unsigned table_id; unsigned table_id;
unsigned fragment_id; unsigned fragment_id;
} LCPFragmentCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_UndoLogBlocked {
struct {
unsigned acc_count; unsigned acc_count;
unsigned tup_count; unsigned tup_count;
} UndoLogBlocked; };
/* STARTUP */ /* STARTUP */
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NDBStartStarted {
struct {
unsigned version; unsigned version;
} NDBStartStarted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NDBStartCompleted {
struct {
unsigned version; unsigned version;
} NDBStartCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_STTORRYRecieved {
struct { };
} STTORRYRecieved; struct ndb_logevent_StartPhaseCompleted {
/** Log event specific data for for corresponding NDB_LE_ log event */
struct {
unsigned phase; unsigned phase;
unsigned starttype; unsigned starttype;
} StartPhaseCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_CM_REGCONF {
struct {
unsigned own_id; unsigned own_id;
unsigned president_id; unsigned president_id;
unsigned dynamic_id; unsigned dynamic_id;
} CM_REGCONF; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_CM_REGREF {
struct {
unsigned own_id; unsigned own_id;
unsigned other_id; unsigned other_id;
unsigned cause; unsigned cause;
} CM_REGREF; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_FIND_NEIGHBOURS {
struct {
unsigned own_id; unsigned own_id;
unsigned left_id; unsigned left_id;
unsigned right_id; unsigned right_id;
unsigned dynamic_id; unsigned dynamic_id;
} FIND_NEIGHBOURS; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NDBStopStarted {
struct {
unsigned stoptype; unsigned stoptype;
} NDBStopStarted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NDBStopCompleted {
struct {
unsigned action; unsigned action;
unsigned signum; unsigned signum;
} NDBStopCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NDBStopForced {
struct {
unsigned action; unsigned action;
unsigned signum; unsigned signum;
unsigned error; unsigned error;
unsigned sphase; unsigned sphase;
unsigned extra; unsigned extra;
} NDBStopForced; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NDBStopAborted {
struct { };
} NDBStopAborted; struct ndb_logevent_StartREDOLog {
/** Log event specific data for for corresponding NDB_LE_ log event */
struct {
unsigned node; unsigned node;
unsigned keep_gci; unsigned keep_gci;
unsigned completed_gci; unsigned completed_gci;
unsigned restorable_gci; unsigned restorable_gci;
} StartREDOLog; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_StartLog {
struct {
unsigned log_part; unsigned log_part;
unsigned start_mb; unsigned start_mb;
unsigned stop_mb; unsigned stop_mb;
unsigned gci; unsigned gci;
} StartLog; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_UNDORecordsExecuted {
struct {
unsigned block; unsigned block;
unsigned data1; unsigned data1;
unsigned data2; unsigned data2;
...@@ -449,74 +390,60 @@ extern "C" { ...@@ -449,74 +390,60 @@ extern "C" {
unsigned data8; unsigned data8;
unsigned data9; unsigned data9;
unsigned data10; unsigned data10;
} UNDORecordsExecuted; };
/* NODERESTART */ /* NODERESTART */
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NR_CopyDict {
struct { };
} NR_CopyDict; struct ndb_logevent_NR_CopyDistr {
/** Log event specific data for for corresponding NDB_LE_ log event */ };
struct { struct ndb_logevent_NR_CopyFragsStarted {
} NR_CopyDistr;
/** Log event specific data for for corresponding NDB_LE_ log event */
struct {
unsigned dest_node; unsigned dest_node;
} NR_CopyFragsStarted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NR_CopyFragDone {
struct {
unsigned dest_node; unsigned dest_node;
unsigned table_id; unsigned table_id;
unsigned fragment_id; unsigned fragment_id;
} NR_CopyFragDone; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NR_CopyFragsCompleted {
struct {
unsigned dest_node; unsigned dest_node;
} NR_CopyFragsCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NodeFailCompleted {
struct {
unsigned block; /* 0 = all */ unsigned block; /* 0 = all */
unsigned failed_node; unsigned failed_node;
unsigned completing_node; /* 0 = all */ unsigned completing_node; /* 0 = all */
} NodeFailCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_NODE_FAILREP {
struct {
unsigned failed_node; unsigned failed_node;
unsigned failure_state; unsigned failure_state;
} NODE_FAILREP; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_ArbitState {
struct {
unsigned code; /* code & state << 16 */ unsigned code; /* code & state << 16 */
unsigned arbit_node; unsigned arbit_node;
unsigned ticket_0; unsigned ticket_0;
unsigned ticket_1; unsigned ticket_1;
/* TODO */ /* TODO */
} ArbitState; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_ArbitResult {
struct {
unsigned code; /* code & state << 16 */ unsigned code; /* code & state << 16 */
unsigned arbit_node; unsigned arbit_node;
unsigned ticket_0; unsigned ticket_0;
unsigned ticket_1; unsigned ticket_1;
/* TODO */ /* TODO */
} ArbitResult; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_GCP_TakeoverStarted {
struct { };
} GCP_TakeoverStarted; struct ndb_logevent_GCP_TakeoverCompleted {
/** Log event specific data for for corresponding NDB_LE_ log event */ };
struct { struct ndb_logevent_LCP_TakeoverStarted {
} GCP_TakeoverCompleted; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_LCP_TakeoverCompleted {
struct {
} LCP_TakeoverStarted;
/** Log event specific data for for corresponding NDB_LE_ log event */
struct {
unsigned state; unsigned state;
} LCP_TakeoverCompleted; };
/* STATISTIC */ /* STATISTIC */
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_TransReportCounters {
struct {
unsigned trans_count; unsigned trans_count;
unsigned commit_count; unsigned commit_count;
unsigned read_count; unsigned read_count;
...@@ -527,31 +454,25 @@ extern "C" { ...@@ -527,31 +454,25 @@ extern "C" {
unsigned abort_count; unsigned abort_count;
unsigned scan_count; unsigned scan_count;
unsigned range_scan_count; unsigned range_scan_count;
} TransReportCounters; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_OperationReportCounters {
struct {
unsigned ops; unsigned ops;
} OperationReportCounters; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_TableCreated {
struct {
unsigned table_id; unsigned table_id;
} TableCreated; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_JobStatistic {
struct {
unsigned mean_loop_count; unsigned mean_loop_count;
} JobStatistic; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_SendBytesStatistic {
struct {
unsigned to_node; unsigned to_node;
unsigned mean_sent_bytes; unsigned mean_sent_bytes;
} SendBytesStatistic; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_ReceiveBytesStatistic {
struct {
unsigned from_node; unsigned from_node;
unsigned mean_received_bytes; unsigned mean_received_bytes;
} ReceiveBytesStatistic; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_MemoryUsage {
struct {
int gth; int gth;
/* union is for compatibility backward. /* union is for compatibility backward.
* page_size_kb member variable should be removed in the future * page_size_kb member variable should be removed in the future
...@@ -563,48 +484,39 @@ extern "C" { ...@@ -563,48 +484,39 @@ extern "C" {
unsigned pages_used; unsigned pages_used;
unsigned pages_total; unsigned pages_total;
unsigned block; unsigned block;
} MemoryUsage; };
/* ERROR */ /* ERROR */
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_TransporterError {
struct {
unsigned to_node; unsigned to_node;
unsigned code; unsigned code;
} TransporterError; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_TransporterWarning {
struct {
unsigned to_node; unsigned to_node;
unsigned code; unsigned code;
} TransporterWarning; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_MissedHeartbeat {
struct {
unsigned node; unsigned node;
unsigned count; unsigned count;
} MissedHeartbeat; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_DeadDueToHeartbeat {
struct {
unsigned node; unsigned node;
} DeadDueToHeartbeat; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_WarningEvent {
struct {
/* TODO */ /* TODO */
} WarningEvent; };
/* INFO */ /* INFO */
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_SentHeartbeat {
struct {
unsigned node; unsigned node;
} SentHeartbeat; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_CreateLogBytes {
struct {
unsigned node; unsigned node;
} CreateLogBytes; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_InfoEvent {
struct {
/* TODO */ /* TODO */
} InfoEvent; };
/** Log event specific data for for corresponding NDB_LE_ log event */ struct ndb_logevent_EventBufferStatus {
struct {
unsigned usage; unsigned usage;
unsigned alloc; unsigned alloc;
unsigned max; unsigned max;
...@@ -612,20 +524,20 @@ extern "C" { ...@@ -612,20 +524,20 @@ extern "C" {
unsigned apply_gci_h; unsigned apply_gci_h;
unsigned latest_gci_l; unsigned latest_gci_l;
unsigned latest_gci_h; unsigned latest_gci_h;
} EventBufferStatus; };
/** Log event data for @ref NDB_LE_BackupStarted */ /** Log event data for @ref NDB_LE_BackupStarted */
struct { struct ndb_logevent_BackupStarted {
unsigned starting_node; unsigned starting_node;
unsigned backup_id; unsigned backup_id;
} BackupStarted; };
/** Log event data @ref NDB_LE_BackupFailedToStart */ /** Log event data @ref NDB_LE_BackupFailedToStart */
struct { struct ndb_logevent_BackupFailedToStart {
unsigned starting_node; unsigned starting_node;
unsigned error; unsigned error;
} BackupFailedToStart; };
/** Log event data @ref NDB_LE_BackupCompleted */ /** Log event data @ref NDB_LE_BackupCompleted */
struct { struct ndb_logevent_BackupCompleted {
unsigned starting_node; unsigned starting_node;
unsigned backup_id; unsigned backup_id;
unsigned start_gci; unsigned start_gci;
...@@ -634,25 +546,140 @@ extern "C" { ...@@ -634,25 +546,140 @@ extern "C" {
unsigned n_log_records; unsigned n_log_records;
unsigned n_bytes; unsigned n_bytes;
unsigned n_log_bytes; unsigned n_log_bytes;
} BackupCompleted; };
/** Log event data @ref NDB_LE_BackupAborted */ /** Log event data @ref NDB_LE_BackupAborted */
struct { struct ndb_logevent_BackupAborted {
unsigned starting_node; unsigned starting_node;
unsigned backup_id; unsigned backup_id;
unsigned error; unsigned error;
} BackupAborted; };
/** Log event data @ref NDB_LE_SingleUser */ /** Log event data @ref NDB_LE_SingleUser */
struct { struct ndb_logevent_SingleUser {
unsigned type; unsigned type;
unsigned node_id; unsigned node_id;
} SingleUser; };
/** Log even data @ref NDB_LE_StartReport */ /** Log even data @ref NDB_LE_StartReport */
struct { struct ndb_logevent_StartReport {
unsigned report_type; unsigned report_type;
unsigned remaining_time; unsigned remaining_time;
unsigned bitmask_size; unsigned bitmask_size;
unsigned bitmask_data[1]; unsigned bitmask_data[1];
} StartReport; };
/**
* Structure to store and retrieve log event information.
* @see @ref secSLogEvents
*/
struct ndb_logevent {
/** NdbLogEventHandle (to be used for comparing only)
* set in ndb_logevent_get_next()
*/
void *handle;
/** Which event */
enum Ndb_logevent_type type;
/** Time when log event was registred at the management server */
unsigned time;
/** Category of log event */
enum ndb_mgm_event_category category;
/** Severity of log event */
enum ndb_mgm_event_severity severity;
/** Level (0-15) of log event */
unsigned level;
/** Node ID of the node that reported the log event */
unsigned source_nodeid;
/** Union of log event specific data. Use @ref type to decide
* which struct to use
*/
union {
/* CONNECT */
struct ndb_logevent_Connected Connected;
struct ndb_logevent_Disconnected Disconnected;
struct ndb_logevent_CommunicationClosed CommunicationClosed;
struct ndb_logevent_CommunicationOpened CommunicationOpened;
struct ndb_logevent_ConnectedApiVersion ConnectedApiVersion;
/* CHECKPOINT */
struct ndb_logevent_GlobalCheckpointStarted GlobalCheckpointStarted;
struct ndb_logevent_GlobalCheckpointCompleted GlobalCheckpointCompleted;
struct ndb_logevent_LocalCheckpointStarted LocalCheckpointStarted;
struct ndb_logevent_LocalCheckpointCompleted LocalCheckpointCompleted;
struct ndb_logevent_LCPStoppedInCalcKeepGci LCPStoppedInCalcKeepGci;
struct ndb_logevent_LCPFragmentCompleted LCPFragmentCompleted;
struct ndb_logevent_UndoLogBlocked UndoLogBlocked;
/* STARTUP */
struct ndb_logevent_NDBStartStarted NDBStartStarted;
struct ndb_logevent_NDBStartCompleted NDBStartCompleted;
struct ndb_logevent_STTORRYRecieved STTORRYRecieved;
struct ndb_logevent_StartPhaseCompleted StartPhaseCompleted;
struct ndb_logevent_CM_REGCONF CM_REGCONF;
struct ndb_logevent_CM_REGREF CM_REGREF;
struct ndb_logevent_FIND_NEIGHBOURS FIND_NEIGHBOURS;
struct ndb_logevent_NDBStopStarted NDBStopStarted;
struct ndb_logevent_NDBStopCompleted NDBStopCompleted;
struct ndb_logevent_NDBStopForced NDBStopForced;
struct ndb_logevent_NDBStopAborted NDBStopAborted;
struct ndb_logevent_StartREDOLog StartREDOLog;
struct ndb_logevent_StartLog StartLog;
struct ndb_logevent_UNDORecordsExecuted UNDORecordsExecuted;
/* NODERESTART */
struct ndb_logevent_NR_CopyDict NR_CopyDict;
struct ndb_logevent_NR_CopyDistr NR_CopyDistr;
struct ndb_logevent_NR_CopyFragsStarted NR_CopyFragsStarted;
struct ndb_logevent_NR_CopyFragDone NR_CopyFragDone;
struct ndb_logevent_NR_CopyFragsCompleted NR_CopyFragsCompleted;
struct ndb_logevent_NodeFailCompleted NodeFailCompleted;
struct ndb_logevent_NODE_FAILREP NODE_FAILREP;
struct ndb_logevent_ArbitState ArbitState;
struct ndb_logevent_ArbitResult ArbitResult;
struct ndb_logevent_GCP_TakeoverStarted GCP_TakeoverStarted;
struct ndb_logevent_GCP_TakeoverCompleted GCP_TakeoverCompleted;
struct ndb_logevent_LCP_TakeoverStarted LCP_TakeoverStarted;
struct ndb_logevent_LCP_TakeoverCompleted LCP_TakeoverCompleted;
/* STATISTIC */
struct ndb_logevent_TransReportCounters TransReportCounters;
struct ndb_logevent_OperationReportCounters OperationReportCounters;
struct ndb_logevent_TableCreated TableCreated;
struct ndb_logevent_JobStatistic JobStatistic;
struct ndb_logevent_SendBytesStatistic SendBytesStatistic;
struct ndb_logevent_ReceiveBytesStatistic ReceiveBytesStatistic;
struct ndb_logevent_MemoryUsage MemoryUsage;
/* ERROR */
struct ndb_logevent_TransporterError TransporterError;
struct ndb_logevent_TransporterWarning TransporterWarning;
struct ndb_logevent_MissedHeartbeat MissedHeartbeat;
struct ndb_logevent_DeadDueToHeartbeat DeadDueToHeartbeat;
struct ndb_logevent_WarningEvent WarningEvent;
/* INFO */
struct ndb_logevent_SentHeartbeat SentHeartbeat;
struct ndb_logevent_CreateLogBytes CreateLogBytes;
struct ndb_logevent_InfoEvent InfoEvent;
struct ndb_logevent_EventBufferStatus EventBufferStatus;
/** Log event data for @ref NDB_LE_BackupStarted */
struct ndb_logevent_BackupStarted BackupStarted;
/** Log event data @ref NDB_LE_BackupFailedToStart */
struct ndb_logevent_BackupFailedToStart BackupFailedToStart;
/** Log event data @ref NDB_LE_BackupCompleted */
struct ndb_logevent_BackupCompleted BackupCompleted;
/** Log event data @ref NDB_LE_BackupAborted */
struct ndb_logevent_BackupAborted BackupAborted;
/** Log event data @ref NDB_LE_SingleUser */
struct ndb_logevent_SingleUser SingleUser;
/** Log even data @ref NDB_LE_StartReport */
struct ndb_logevent_StartReport StartReport;
#ifndef DOXYGEN_FIX #ifndef DOXYGEN_FIX
}; };
#else #else
......
...@@ -4262,7 +4262,7 @@ static void test_fetch_date() ...@@ -4262,7 +4262,7 @@ static void test_fetch_date()
myheader("test_fetch_date"); myheader("test_fetch_date");
/* Will not work if sql_mode is NO_ZERO_DATE (implicit if TRADITIONAL) /*/ /* Will not work if sql_mode is NO_ZERO_DATE (implicit if TRADITIONAL) */
rc= mysql_query(mysql, "SET SQL_MODE=''"); rc= mysql_query(mysql, "SET SQL_MODE=''");
myquery(rc); myquery(rc);
......
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