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.
This commit is contained in:
parent
99413e461f
commit
169f7da04c
@ -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);
|
||||||
|
@ -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)
|
|||||||
{
|
{
|
||||||
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,
|
|||||||
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)
|
|||||||
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,
|
|||||||
|
|
||||||
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(¶m->read_cache,info->dfile,
|
if (init_io_cache(¶m->read_cache,info->dfile,
|
||||||
(uint) param->read_buffer_length,
|
(uint) param->read_buffer_length,
|
||||||
|
@ -272,6 +272,300 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ndb_logevent_Connected {
|
||||||
|
unsigned node;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ndb_logevent_Disconnected {
|
||||||
|
unsigned node;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ndb_logevent_CommunicationClosed {
|
||||||
|
unsigned node;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ndb_logevent_CommunicationOpened {
|
||||||
|
unsigned node;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ndb_logevent_ConnectedApiVersion {
|
||||||
|
unsigned node;
|
||||||
|
unsigned version;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* CHECKPOINT */
|
||||||
|
struct ndb_logevent_GlobalCheckpointStarted {
|
||||||
|
unsigned gci;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_GlobalCheckpointCompleted {
|
||||||
|
unsigned gci;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_LocalCheckpointStarted {
|
||||||
|
unsigned lci;
|
||||||
|
unsigned keep_gci;
|
||||||
|
unsigned restore_gci;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_LocalCheckpointCompleted {
|
||||||
|
unsigned lci;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_LCPStoppedInCalcKeepGci {
|
||||||
|
unsigned data;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_LCPFragmentCompleted {
|
||||||
|
unsigned node;
|
||||||
|
unsigned table_id;
|
||||||
|
unsigned fragment_id;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_UndoLogBlocked {
|
||||||
|
unsigned acc_count;
|
||||||
|
unsigned tup_count;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* STARTUP */
|
||||||
|
struct ndb_logevent_NDBStartStarted {
|
||||||
|
unsigned version;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NDBStartCompleted {
|
||||||
|
unsigned version;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_STTORRYRecieved {
|
||||||
|
};
|
||||||
|
struct ndb_logevent_StartPhaseCompleted {
|
||||||
|
unsigned phase;
|
||||||
|
unsigned starttype;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_CM_REGCONF {
|
||||||
|
unsigned own_id;
|
||||||
|
unsigned president_id;
|
||||||
|
unsigned dynamic_id;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_CM_REGREF {
|
||||||
|
unsigned own_id;
|
||||||
|
unsigned other_id;
|
||||||
|
unsigned cause;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_FIND_NEIGHBOURS {
|
||||||
|
unsigned own_id;
|
||||||
|
unsigned left_id;
|
||||||
|
unsigned right_id;
|
||||||
|
unsigned dynamic_id;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NDBStopStarted {
|
||||||
|
unsigned stoptype;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NDBStopCompleted {
|
||||||
|
unsigned action;
|
||||||
|
unsigned signum;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NDBStopForced {
|
||||||
|
unsigned action;
|
||||||
|
unsigned signum;
|
||||||
|
unsigned error;
|
||||||
|
unsigned sphase;
|
||||||
|
unsigned extra;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NDBStopAborted {
|
||||||
|
};
|
||||||
|
struct ndb_logevent_StartREDOLog {
|
||||||
|
unsigned node;
|
||||||
|
unsigned keep_gci;
|
||||||
|
unsigned completed_gci;
|
||||||
|
unsigned restorable_gci;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_StartLog {
|
||||||
|
unsigned log_part;
|
||||||
|
unsigned start_mb;
|
||||||
|
unsigned stop_mb;
|
||||||
|
unsigned gci;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_UNDORecordsExecuted {
|
||||||
|
unsigned block;
|
||||||
|
unsigned data1;
|
||||||
|
unsigned data2;
|
||||||
|
unsigned data3;
|
||||||
|
unsigned data4;
|
||||||
|
unsigned data5;
|
||||||
|
unsigned data6;
|
||||||
|
unsigned data7;
|
||||||
|
unsigned data8;
|
||||||
|
unsigned data9;
|
||||||
|
unsigned data10;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* NODERESTART */
|
||||||
|
struct ndb_logevent_NR_CopyDict {
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NR_CopyDistr {
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NR_CopyFragsStarted {
|
||||||
|
unsigned dest_node;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NR_CopyFragDone {
|
||||||
|
unsigned dest_node;
|
||||||
|
unsigned table_id;
|
||||||
|
unsigned fragment_id;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NR_CopyFragsCompleted {
|
||||||
|
unsigned dest_node;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ndb_logevent_NodeFailCompleted {
|
||||||
|
unsigned block; /* 0 = all */
|
||||||
|
unsigned failed_node;
|
||||||
|
unsigned completing_node; /* 0 = all */
|
||||||
|
};
|
||||||
|
struct ndb_logevent_NODE_FAILREP {
|
||||||
|
unsigned failed_node;
|
||||||
|
unsigned failure_state;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_ArbitState {
|
||||||
|
unsigned code; /* code & state << 16 */
|
||||||
|
unsigned arbit_node;
|
||||||
|
unsigned ticket_0;
|
||||||
|
unsigned ticket_1;
|
||||||
|
/* TODO */
|
||||||
|
};
|
||||||
|
struct ndb_logevent_ArbitResult {
|
||||||
|
unsigned code; /* code & state << 16 */
|
||||||
|
unsigned arbit_node;
|
||||||
|
unsigned ticket_0;
|
||||||
|
unsigned ticket_1;
|
||||||
|
/* TODO */
|
||||||
|
};
|
||||||
|
struct ndb_logevent_GCP_TakeoverStarted {
|
||||||
|
};
|
||||||
|
struct ndb_logevent_GCP_TakeoverCompleted {
|
||||||
|
};
|
||||||
|
struct ndb_logevent_LCP_TakeoverStarted {
|
||||||
|
};
|
||||||
|
struct ndb_logevent_LCP_TakeoverCompleted {
|
||||||
|
unsigned state;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* STATISTIC */
|
||||||
|
struct ndb_logevent_TransReportCounters {
|
||||||
|
unsigned trans_count;
|
||||||
|
unsigned commit_count;
|
||||||
|
unsigned read_count;
|
||||||
|
unsigned simple_read_count;
|
||||||
|
unsigned write_count;
|
||||||
|
unsigned attrinfo_count;
|
||||||
|
unsigned conc_op_count;
|
||||||
|
unsigned abort_count;
|
||||||
|
unsigned scan_count;
|
||||||
|
unsigned range_scan_count;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_OperationReportCounters {
|
||||||
|
unsigned ops;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_TableCreated {
|
||||||
|
unsigned table_id;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_JobStatistic {
|
||||||
|
unsigned mean_loop_count;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_SendBytesStatistic {
|
||||||
|
unsigned to_node;
|
||||||
|
unsigned mean_sent_bytes;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_ReceiveBytesStatistic {
|
||||||
|
unsigned from_node;
|
||||||
|
unsigned mean_received_bytes;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_MemoryUsage {
|
||||||
|
int gth;
|
||||||
|
/* union is for compatibility backward.
|
||||||
|
* page_size_kb member variable should be removed in the future
|
||||||
|
*/
|
||||||
|
union {
|
||||||
|
unsigned page_size_kb;
|
||||||
|
unsigned page_size_bytes;
|
||||||
|
};
|
||||||
|
unsigned pages_used;
|
||||||
|
unsigned pages_total;
|
||||||
|
unsigned block;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* ERROR */
|
||||||
|
struct ndb_logevent_TransporterError {
|
||||||
|
unsigned to_node;
|
||||||
|
unsigned code;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_TransporterWarning {
|
||||||
|
unsigned to_node;
|
||||||
|
unsigned code;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_MissedHeartbeat {
|
||||||
|
unsigned node;
|
||||||
|
unsigned count;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_DeadDueToHeartbeat {
|
||||||
|
unsigned node;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_WarningEvent {
|
||||||
|
/* TODO */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* INFO */
|
||||||
|
struct ndb_logevent_SentHeartbeat {
|
||||||
|
unsigned node;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_CreateLogBytes {
|
||||||
|
unsigned node;
|
||||||
|
};
|
||||||
|
struct ndb_logevent_InfoEvent {
|
||||||
|
/* TODO */
|
||||||
|
};
|
||||||
|
struct ndb_logevent_EventBufferStatus {
|
||||||
|
unsigned usage;
|
||||||
|
unsigned alloc;
|
||||||
|
unsigned max;
|
||||||
|
unsigned apply_gci_l;
|
||||||
|
unsigned apply_gci_h;
|
||||||
|
unsigned latest_gci_l;
|
||||||
|
unsigned latest_gci_h;
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Log event data for @ref NDB_LE_BackupStarted */
|
||||||
|
struct ndb_logevent_BackupStarted {
|
||||||
|
unsigned starting_node;
|
||||||
|
unsigned backup_id;
|
||||||
|
};
|
||||||
|
/** Log event data @ref NDB_LE_BackupFailedToStart */
|
||||||
|
struct ndb_logevent_BackupFailedToStart {
|
||||||
|
unsigned starting_node;
|
||||||
|
unsigned error;
|
||||||
|
};
|
||||||
|
/** Log event data @ref NDB_LE_BackupCompleted */
|
||||||
|
struct ndb_logevent_BackupCompleted {
|
||||||
|
unsigned starting_node;
|
||||||
|
unsigned backup_id;
|
||||||
|
unsigned start_gci;
|
||||||
|
unsigned stop_gci;
|
||||||
|
unsigned n_records;
|
||||||
|
unsigned n_log_records;
|
||||||
|
unsigned n_bytes;
|
||||||
|
unsigned n_log_bytes;
|
||||||
|
};
|
||||||
|
/** Log event data @ref NDB_LE_BackupAborted */
|
||||||
|
struct ndb_logevent_BackupAborted {
|
||||||
|
unsigned starting_node;
|
||||||
|
unsigned backup_id;
|
||||||
|
unsigned error;
|
||||||
|
};
|
||||||
|
/** Log event data @ref NDB_LE_SingleUser */
|
||||||
|
struct ndb_logevent_SingleUser {
|
||||||
|
unsigned type;
|
||||||
|
unsigned node_id;
|
||||||
|
};
|
||||||
|
/** Log even data @ref NDB_LE_StartReport */
|
||||||
|
struct ndb_logevent_StartReport {
|
||||||
|
unsigned report_type;
|
||||||
|
unsigned remaining_time;
|
||||||
|
unsigned bitmask_size;
|
||||||
|
unsigned bitmask_data[1];
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structure to store and retrieve log event information.
|
* Structure to store and retrieve log event information.
|
||||||
* @see @ref secSLogEvents
|
* @see @ref secSLogEvents
|
||||||
@ -305,354 +599,87 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
union {
|
union {
|
||||||
/* CONNECT */
|
/* CONNECT */
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_Connected Connected;
|
||||||
struct {
|
struct ndb_logevent_Disconnected Disconnected;
|
||||||
unsigned node;
|
struct ndb_logevent_CommunicationClosed CommunicationClosed;
|
||||||
} Connected;
|
struct ndb_logevent_CommunicationOpened CommunicationOpened;
|
||||||
|
struct ndb_logevent_ConnectedApiVersion ConnectedApiVersion;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
} Disconnected;
|
|
||||||
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
} CommunicationClosed;
|
|
||||||
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
} CommunicationOpened;
|
|
||||||
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
unsigned version;
|
|
||||||
} ConnectedApiVersion;
|
|
||||||
|
|
||||||
/* CHECKPOINT */
|
/* CHECKPOINT */
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_GlobalCheckpointStarted GlobalCheckpointStarted;
|
||||||
struct {
|
struct ndb_logevent_GlobalCheckpointCompleted GlobalCheckpointCompleted;
|
||||||
unsigned gci;
|
struct ndb_logevent_LocalCheckpointStarted LocalCheckpointStarted;
|
||||||
} GlobalCheckpointStarted;
|
struct ndb_logevent_LocalCheckpointCompleted LocalCheckpointCompleted;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_LCPStoppedInCalcKeepGci LCPStoppedInCalcKeepGci;
|
||||||
struct {
|
struct ndb_logevent_LCPFragmentCompleted LCPFragmentCompleted;
|
||||||
unsigned gci;
|
struct ndb_logevent_UndoLogBlocked UndoLogBlocked;
|
||||||
} GlobalCheckpointCompleted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned lci;
|
|
||||||
unsigned keep_gci;
|
|
||||||
unsigned restore_gci;
|
|
||||||
} LocalCheckpointStarted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned lci;
|
|
||||||
} LocalCheckpointCompleted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned data;
|
|
||||||
} LCPStoppedInCalcKeepGci;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
unsigned table_id;
|
|
||||||
unsigned fragment_id;
|
|
||||||
} LCPFragmentCompleted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned acc_count;
|
|
||||||
unsigned tup_count;
|
|
||||||
} UndoLogBlocked;
|
|
||||||
|
|
||||||
/* STARTUP */
|
/* STARTUP */
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_NDBStartStarted NDBStartStarted;
|
||||||
struct {
|
struct ndb_logevent_NDBStartCompleted NDBStartCompleted;
|
||||||
unsigned version;
|
struct ndb_logevent_STTORRYRecieved STTORRYRecieved;
|
||||||
} NDBStartStarted;
|
struct ndb_logevent_StartPhaseCompleted StartPhaseCompleted;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_CM_REGCONF CM_REGCONF;
|
||||||
struct {
|
struct ndb_logevent_CM_REGREF CM_REGREF;
|
||||||
unsigned version;
|
struct ndb_logevent_FIND_NEIGHBOURS FIND_NEIGHBOURS;
|
||||||
} NDBStartCompleted;
|
struct ndb_logevent_NDBStopStarted NDBStopStarted;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_NDBStopCompleted NDBStopCompleted;
|
||||||
struct {
|
struct ndb_logevent_NDBStopForced NDBStopForced;
|
||||||
} STTORRYRecieved;
|
struct ndb_logevent_NDBStopAborted NDBStopAborted;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_StartREDOLog StartREDOLog;
|
||||||
struct {
|
struct ndb_logevent_StartLog StartLog;
|
||||||
unsigned phase;
|
struct ndb_logevent_UNDORecordsExecuted UNDORecordsExecuted;
|
||||||
unsigned starttype;
|
|
||||||
} StartPhaseCompleted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned own_id;
|
|
||||||
unsigned president_id;
|
|
||||||
unsigned dynamic_id;
|
|
||||||
} CM_REGCONF;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned own_id;
|
|
||||||
unsigned other_id;
|
|
||||||
unsigned cause;
|
|
||||||
} CM_REGREF;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned own_id;
|
|
||||||
unsigned left_id;
|
|
||||||
unsigned right_id;
|
|
||||||
unsigned dynamic_id;
|
|
||||||
} FIND_NEIGHBOURS;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned stoptype;
|
|
||||||
} NDBStopStarted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned action;
|
|
||||||
unsigned signum;
|
|
||||||
} NDBStopCompleted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned action;
|
|
||||||
unsigned signum;
|
|
||||||
unsigned error;
|
|
||||||
unsigned sphase;
|
|
||||||
unsigned extra;
|
|
||||||
} NDBStopForced;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
} NDBStopAborted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
unsigned keep_gci;
|
|
||||||
unsigned completed_gci;
|
|
||||||
unsigned restorable_gci;
|
|
||||||
} StartREDOLog;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned log_part;
|
|
||||||
unsigned start_mb;
|
|
||||||
unsigned stop_mb;
|
|
||||||
unsigned gci;
|
|
||||||
} StartLog;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned block;
|
|
||||||
unsigned data1;
|
|
||||||
unsigned data2;
|
|
||||||
unsigned data3;
|
|
||||||
unsigned data4;
|
|
||||||
unsigned data5;
|
|
||||||
unsigned data6;
|
|
||||||
unsigned data7;
|
|
||||||
unsigned data8;
|
|
||||||
unsigned data9;
|
|
||||||
unsigned data10;
|
|
||||||
} UNDORecordsExecuted;
|
|
||||||
|
|
||||||
/* NODERESTART */
|
/* NODERESTART */
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_NR_CopyDict NR_CopyDict;
|
||||||
struct {
|
struct ndb_logevent_NR_CopyDistr NR_CopyDistr;
|
||||||
} NR_CopyDict;
|
struct ndb_logevent_NR_CopyFragsStarted NR_CopyFragsStarted;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_NR_CopyFragDone NR_CopyFragDone;
|
||||||
struct {
|
struct ndb_logevent_NR_CopyFragsCompleted NR_CopyFragsCompleted;
|
||||||
} NR_CopyDistr;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned dest_node;
|
|
||||||
} NR_CopyFragsStarted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned dest_node;
|
|
||||||
unsigned table_id;
|
|
||||||
unsigned fragment_id;
|
|
||||||
} NR_CopyFragDone;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned dest_node;
|
|
||||||
} NR_CopyFragsCompleted;
|
|
||||||
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_NodeFailCompleted NodeFailCompleted;
|
||||||
struct {
|
struct ndb_logevent_NODE_FAILREP NODE_FAILREP;
|
||||||
unsigned block; /* 0 = all */
|
struct ndb_logevent_ArbitState ArbitState;
|
||||||
unsigned failed_node;
|
struct ndb_logevent_ArbitResult ArbitResult;
|
||||||
unsigned completing_node; /* 0 = all */
|
struct ndb_logevent_GCP_TakeoverStarted GCP_TakeoverStarted;
|
||||||
} NodeFailCompleted;
|
struct ndb_logevent_GCP_TakeoverCompleted GCP_TakeoverCompleted;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_LCP_TakeoverStarted LCP_TakeoverStarted;
|
||||||
struct {
|
struct ndb_logevent_LCP_TakeoverCompleted LCP_TakeoverCompleted;
|
||||||
unsigned failed_node;
|
|
||||||
unsigned failure_state;
|
|
||||||
} NODE_FAILREP;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned code; /* code & state << 16 */
|
|
||||||
unsigned arbit_node;
|
|
||||||
unsigned ticket_0;
|
|
||||||
unsigned ticket_1;
|
|
||||||
/* TODO */
|
|
||||||
} ArbitState;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned code; /* code & state << 16 */
|
|
||||||
unsigned arbit_node;
|
|
||||||
unsigned ticket_0;
|
|
||||||
unsigned ticket_1;
|
|
||||||
/* TODO */
|
|
||||||
} ArbitResult;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
} GCP_TakeoverStarted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
} GCP_TakeoverCompleted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
} LCP_TakeoverStarted;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned state;
|
|
||||||
} LCP_TakeoverCompleted;
|
|
||||||
|
|
||||||
/* STATISTIC */
|
/* STATISTIC */
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_TransReportCounters TransReportCounters;
|
||||||
struct {
|
struct ndb_logevent_OperationReportCounters OperationReportCounters;
|
||||||
unsigned trans_count;
|
struct ndb_logevent_TableCreated TableCreated;
|
||||||
unsigned commit_count;
|
struct ndb_logevent_JobStatistic JobStatistic;
|
||||||
unsigned read_count;
|
struct ndb_logevent_SendBytesStatistic SendBytesStatistic;
|
||||||
unsigned simple_read_count;
|
struct ndb_logevent_ReceiveBytesStatistic ReceiveBytesStatistic;
|
||||||
unsigned write_count;
|
struct ndb_logevent_MemoryUsage MemoryUsage;
|
||||||
unsigned attrinfo_count;
|
|
||||||
unsigned conc_op_count;
|
|
||||||
unsigned abort_count;
|
|
||||||
unsigned scan_count;
|
|
||||||
unsigned range_scan_count;
|
|
||||||
} TransReportCounters;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned ops;
|
|
||||||
} OperationReportCounters;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned table_id;
|
|
||||||
} TableCreated;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned mean_loop_count;
|
|
||||||
} JobStatistic;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned to_node;
|
|
||||||
unsigned mean_sent_bytes;
|
|
||||||
} SendBytesStatistic;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned from_node;
|
|
||||||
unsigned mean_received_bytes;
|
|
||||||
} ReceiveBytesStatistic;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
int gth;
|
|
||||||
/* union is for compatibility backward.
|
|
||||||
* page_size_kb member variable should be removed in the future
|
|
||||||
*/
|
|
||||||
union {
|
|
||||||
unsigned page_size_kb;
|
|
||||||
unsigned page_size_bytes;
|
|
||||||
};
|
|
||||||
unsigned pages_used;
|
|
||||||
unsigned pages_total;
|
|
||||||
unsigned block;
|
|
||||||
} MemoryUsage;
|
|
||||||
|
|
||||||
/* ERROR */
|
/* ERROR */
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_TransporterError TransporterError;
|
||||||
struct {
|
struct ndb_logevent_TransporterWarning TransporterWarning;
|
||||||
unsigned to_node;
|
struct ndb_logevent_MissedHeartbeat MissedHeartbeat;
|
||||||
unsigned code;
|
struct ndb_logevent_DeadDueToHeartbeat DeadDueToHeartbeat;
|
||||||
} TransporterError;
|
struct ndb_logevent_WarningEvent WarningEvent;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned to_node;
|
|
||||||
unsigned code;
|
|
||||||
} TransporterWarning;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
unsigned count;
|
|
||||||
} MissedHeartbeat;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
} DeadDueToHeartbeat;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
/* TODO */
|
|
||||||
} WarningEvent;
|
|
||||||
|
|
||||||
/* INFO */
|
/* INFO */
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
struct ndb_logevent_SentHeartbeat SentHeartbeat;
|
||||||
struct {
|
struct ndb_logevent_CreateLogBytes CreateLogBytes;
|
||||||
unsigned node;
|
struct ndb_logevent_InfoEvent InfoEvent;
|
||||||
} SentHeartbeat;
|
struct ndb_logevent_EventBufferStatus EventBufferStatus;
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned node;
|
|
||||||
} CreateLogBytes;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
/* TODO */
|
|
||||||
} InfoEvent;
|
|
||||||
/** Log event specific data for for corresponding NDB_LE_ log event */
|
|
||||||
struct {
|
|
||||||
unsigned usage;
|
|
||||||
unsigned alloc;
|
|
||||||
unsigned max;
|
|
||||||
unsigned apply_gci_l;
|
|
||||||
unsigned apply_gci_h;
|
|
||||||
unsigned latest_gci_l;
|
|
||||||
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 BackupStarted;
|
||||||
unsigned starting_node;
|
|
||||||
unsigned backup_id;
|
|
||||||
} BackupStarted;
|
|
||||||
/** Log event data @ref NDB_LE_BackupFailedToStart */
|
/** Log event data @ref NDB_LE_BackupFailedToStart */
|
||||||
struct {
|
struct ndb_logevent_BackupFailedToStart BackupFailedToStart;
|
||||||
unsigned starting_node;
|
|
||||||
unsigned error;
|
|
||||||
} BackupFailedToStart;
|
|
||||||
/** Log event data @ref NDB_LE_BackupCompleted */
|
/** Log event data @ref NDB_LE_BackupCompleted */
|
||||||
struct {
|
struct ndb_logevent_BackupCompleted BackupCompleted;
|
||||||
unsigned starting_node;
|
|
||||||
unsigned backup_id;
|
|
||||||
unsigned start_gci;
|
|
||||||
unsigned stop_gci;
|
|
||||||
unsigned n_records;
|
|
||||||
unsigned n_log_records;
|
|
||||||
unsigned n_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 BackupAborted;
|
||||||
unsigned starting_node;
|
|
||||||
unsigned backup_id;
|
|
||||||
unsigned error;
|
|
||||||
} BackupAborted;
|
|
||||||
/** Log event data @ref NDB_LE_SingleUser */
|
/** Log event data @ref NDB_LE_SingleUser */
|
||||||
struct {
|
struct ndb_logevent_SingleUser SingleUser;
|
||||||
unsigned type;
|
|
||||||
unsigned node_id;
|
|
||||||
} SingleUser;
|
|
||||||
/** Log even data @ref NDB_LE_StartReport */
|
/** Log even data @ref NDB_LE_StartReport */
|
||||||
struct {
|
struct ndb_logevent_StartReport StartReport;
|
||||||
unsigned report_type;
|
|
||||||
unsigned remaining_time;
|
|
||||||
unsigned bitmask_size;
|
|
||||||
unsigned bitmask_data[1];
|
|
||||||
} StartReport;
|
|
||||||
#ifndef DOXYGEN_FIX
|
#ifndef DOXYGEN_FIX
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user