1
- /* Copyright (c) 2000, 2020 , Oracle and/or its affiliates.
1
+ /* Copyright (c) 2000, 2021 , Oracle and/or its affiliates.
2
2
3
3
This program is free software; you can redistribute it and/or modify
4
4
it under the terms of the GNU General Public License, version 2.0,
@@ -754,11 +754,11 @@ class LogFile {
754
754
void write(DYNAMIC_STRING* ds)
755
755
{
756
756
DBUG_ENTER("LogFile::write");
757
- DBUG_ASSERT (m_file);
757
+ assert (m_file);
758
758
759
759
if (ds->length == 0)
760
760
DBUG_VOID_RETURN;
761
- DBUG_ASSERT (ds->str);
761
+ assert (ds->str);
762
762
763
763
if (fwrite(ds->str, 1, ds->length, m_file) != ds->length)
764
764
die("Failed to write %lu bytes to '%s', errno: %d",
@@ -919,7 +919,7 @@ extern "C" void *connection_thread(void *arg)
919
919
cn->result= mysql_read_query_result(&cn->mysql);
920
920
break;
921
921
default:
922
- DBUG_ASSERT (0);
922
+ assert (0);
923
923
}
924
924
cn->command= 0;
925
925
native_mutex_lock(&cn->result_mutex);
@@ -937,7 +937,7 @@ extern "C" void *connection_thread(void *arg)
937
937
938
938
static void wait_query_thread_done(struct st_connection *con)
939
939
{
940
- DBUG_ASSERT (con->has_thread);
940
+ assert (con->has_thread);
941
941
if (!con->query_done)
942
942
{
943
943
native_mutex_lock(&con->result_mutex);
@@ -950,7 +950,7 @@ static void wait_query_thread_done(struct st_connection *con)
950
950
951
951
static void signal_connection_thd(struct st_connection *cn, int command)
952
952
{
953
- DBUG_ASSERT (cn->has_thread);
953
+ assert (cn->has_thread);
954
954
cn->query_done= 0;
955
955
cn->command= command;
956
956
native_mutex_lock(&cn->query_mutex);
@@ -978,7 +978,7 @@ static int do_send_query(struct st_connection *cn, const char *q, size_t q_len)
978
978
979
979
static int do_read_query_result(struct st_connection *cn)
980
980
{
981
- DBUG_ASSERT (cn->has_thread);
981
+ assert (cn->has_thread);
982
982
wait_query_thread_done(cn);
983
983
signal_connection_thd(cn, EMB_READ_QUERY_RESULT);
984
984
wait_query_thread_done(cn);
@@ -1302,7 +1302,7 @@ void check_command_args(struct st_command *command,
1302
1302
break;
1303
1303
1304
1304
default:
1305
- DBUG_ASSERT ("Unknown argument type");
1305
+ assert ("Unknown argument type");
1306
1306
break;
1307
1307
}
1308
1308
@@ -1491,7 +1491,7 @@ static void cleanup_and_exit(int exit_code)
1491
1491
break;
1492
1492
default:
1493
1493
printf("unknown exit code: %d\n", exit_code);
1494
- DBUG_ASSERT (0);
1494
+ assert (0);
1495
1495
}
1496
1496
}
1497
1497
@@ -2110,7 +2110,7 @@ void check_result()
2110
2110
const char* mess= "Result content mismatch\n";
2111
2111
2112
2112
DBUG_ENTER("check_result");
2113
- DBUG_ASSERT (result_file_name);
2113
+ assert (result_file_name);
2114
2114
DBUG_PRINT("enter", ("result_file_name: %s", result_file_name));
2115
2115
2116
2116
switch (compare_files(log_file.file_name(), result_file_name)) {
@@ -2428,7 +2428,7 @@ void var_set(const char *var_name, const char *var_name_end,
2428
2428
v->str_val_len= strlen(v->str_val);
2429
2429
}
2430
2430
/* setenv() expects \0-terminated strings */
2431
- DBUG_ASSERT (v->name[v->name_len] == 0);
2431
+ assert (v->name[v->name_len] == 0);
2432
2432
setenv(v->name, v->str_val, 1);
2433
2433
}
2434
2434
DBUG_VOID_RETURN;
@@ -7278,7 +7278,7 @@ get_one_option(int optid, const struct my_option *opt, char *argument)
7278
7278
argument= buff;
7279
7279
}
7280
7280
fn_format(buff, argument, "", "", MY_UNPACK_FILENAME);
7281
- DBUG_ASSERT (cur_file == file_stack && cur_file->file == 0);
7281
+ assert (cur_file == file_stack && cur_file->file == 0);
7282
7282
if (!(cur_file->file=
7283
7283
fopen(buff, "rb")))
7284
7284
die("Could not open '%s' for reading, errno: %d", buff, errno);
@@ -7902,7 +7902,7 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
7902
7902
through PS API we should not issue SHOW WARNINGS until
7903
7903
we have not read all results...
7904
7904
*/
7905
- DBUG_ASSERT (!mysql_more_results(mysql));
7905
+ assert (!mysql_more_results(mysql));
7906
7906
7907
7907
if (mysql_real_query(mysql, "SHOW WARNINGS", 13))
7908
7908
die("Error running query \"SHOW WARNINGS\": %s", mysql_error(mysql));
@@ -8043,7 +8043,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
8043
8043
mysql_sqlstate(mysql), ds);
8044
8044
goto end;
8045
8045
}
8046
- DBUG_ASSERT (err == -1); /* Successful and there are no more results */
8046
+ assert (err == -1); /* Successful and there are no more results */
8047
8047
8048
8048
/* If we come here the query is both executed and read successfully */
8049
8049
handle_no_error(command);
@@ -10301,7 +10301,7 @@ void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds,
10301
10301
DBUG_PRINT("exit", ("Found end of from string"));
10302
10302
DBUG_VOID_RETURN;
10303
10303
}
10304
- DBUG_ASSERT (from <= str+len);
10304
+ assert (from <= str+len);
10305
10305
start= from;
10306
10306
rep_pos=rep;
10307
10307
}
0 commit comments