@@ -225,8 +225,8 @@ class Database_rewrite {
225
225
Rewrite_result rewrite_transaction_payload (
226
226
unsigned char *buffer, std::size_t buffer_capacity,
227
227
binary_log::Format_description_event const &fde) {
228
- DBUG_ASSERT (buffer[EVENT_TYPE_OFFSET] ==
229
- binary_log::TRANSACTION_PAYLOAD_EVENT);
228
+ assert (buffer[EVENT_TYPE_OFFSET] ==
229
+ binary_log::TRANSACTION_PAYLOAD_EVENT);
230
230
binary_log::Transaction_payload_event tpe ((const char *)buffer, &fde);
231
231
232
232
auto orig_payload{tpe.get_payload ()};
@@ -504,7 +504,7 @@ class Database_rewrite {
504
504
dbname_ptr = the_buffer + offset_dbname;
505
505
memcpy (dbname_ptr, to.c_str (), to.size ());
506
506
507
- DBUG_ASSERT (to.size () < UINT8_MAX);
507
+ assert (to.size () < UINT8_MAX);
508
508
dbname_len_ptr = the_buffer + offset_dbname_len;
509
509
*dbname_len_ptr = (char )to.size ();
510
510
@@ -602,7 +602,7 @@ class Database_rewrite {
602
602
size_t data_size,
603
603
binary_log::Format_description_event const &fde,
604
604
bool skip_transaction_payload_event = false ) {
605
- DBUG_ASSERT (buffer_capacity >= data_size);
605
+ assert (buffer_capacity >= data_size);
606
606
auto event_type = (Log_event_type)buffer[EVENT_TYPE_OFFSET];
607
607
if (m_dict.empty () || !is_rewrite_needed_for_event (event_type))
608
608
return Rewrite_result{buffer, buffer_capacity, data_size, false };
@@ -698,7 +698,7 @@ static uint opt_protocol = 0;
698
698
static uint opt_compress = 0 ;
699
699
static FILE *result_file;
700
700
701
- #ifndef DBUG_OFF
701
+ #ifndef NDEBUG
702
702
static const char *default_dbug_option = " d:t:o,/tmp/mysqlbinlog.trace" ;
703
703
#endif
704
704
static const char *load_default_groups[] = {" mysqlbinlog" , " client" , nullptr };
@@ -1814,7 +1814,7 @@ static struct my_option my_long_options[] = {
1814
1814
" it can be applied to a new database" ,
1815
1815
&rewrite, &rewrite, nullptr , GET_STR_ALLOC, REQUIRED_ARG, 0 , 0 , 0 , nullptr ,
1816
1816
0 , nullptr },
1817
- #ifdef DBUG_OFF
1817
+ #ifdef NDEBUG
1818
1818
{" debug" , ' #' , " This is a non-debug version. Catch this and exit." , 0 , 0 , 0 ,
1819
1819
GET_DISABLED, OPT_ARG, 0 , 0 , 0 , 0 , 0 , 0 },
1820
1820
{" debug-check" , OPT_DEBUG_CHECK,
@@ -2174,7 +2174,7 @@ extern "C" bool get_one_option(int optid, const struct my_option *opt,
2174
2174
char *argument) {
2175
2175
bool tty_password = false ;
2176
2176
switch (optid) {
2177
- #ifndef DBUG_OFF
2177
+ #ifndef NDEBUG
2178
2178
case ' #' :
2179
2179
DBUG_PUSH (argument ? argument : default_dbug_option);
2180
2180
break ;
@@ -2213,8 +2213,8 @@ extern "C" bool get_one_option(int optid, const struct my_option *opt,
2213
2213
if (argument == disabled_my_option) {
2214
2214
// Don't require password
2215
2215
static char empty_password[] = {' \0 ' };
2216
- DBUG_ASSERT (empty_password[0 ] ==
2217
- ' \0 ' ); // Check that it has not been overwritten
2216
+ assert (empty_password[0 ] ==
2217
+ ' \0 ' ); // Check that it has not been overwritten
2218
2218
argument = empty_password;
2219
2219
}
2220
2220
if (argument) {
@@ -2383,7 +2383,7 @@ static Exit_status dump_single_log(PRINT_EVENT_INFO *print_event_info,
2383
2383
rc = dump_remote_log_entries (print_event_info, logname);
2384
2384
break ;
2385
2385
default :
2386
- DBUG_ASSERT (0 );
2386
+ assert (0 );
2387
2387
break ;
2388
2388
}
2389
2389
return rc;
@@ -2925,7 +2925,7 @@ class Stdin_binlog_istream : public Basic_seekable_istream,
2925
2925
}
2926
2926
2927
2927
bool seek (my_off_t position) override {
2928
- DBUG_ASSERT (position > m_position);
2928
+ assert (position > m_position);
2929
2929
if (Stdin_istream::skip (position - m_position)) {
2930
2930
error (" Failed to skip %llu bytes from stdin" , position - m_position);
2931
2931
return true ;
@@ -2937,7 +2937,7 @@ class Stdin_binlog_istream : public Basic_seekable_istream,
2937
2937
/* purecov: begin inspected */
2938
2938
/* * Stdin has no length. It should never be called. */
2939
2939
my_off_t length () override {
2940
- DBUG_ASSERT (0 );
2940
+ assert (0 );
2941
2941
return 0 ;
2942
2942
}
2943
2943
/* purecov: end */
0 commit comments