diff options
Diffstat (limited to 'storage/federatedx/ha_federatedx.cc')
-rw-r--r-- | storage/federatedx/ha_federatedx.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/federatedx/ha_federatedx.cc b/storage/federatedx/ha_federatedx.cc index 20a78b8e3ce..dbf83aec127 100644 --- a/storage/federatedx/ha_federatedx.cc +++ b/storage/federatedx/ha_federatedx.cc @@ -2650,7 +2650,7 @@ int ha_federatedx::index_read_idx_with_result_set(uchar *buf, uint index, if (io->query(sql_query.ptr(), sql_query.length())) { - sprintf(error_buffer, "error: %d '%s'", + snprintf(error_buffer, sizeof(error_buffer), "error: %d '%s'", io->error_code(), io->error_str()); retval= ER_QUERY_ON_FOREIGN_DATA_SOURCE; goto error; @@ -3375,7 +3375,7 @@ static int test_connection(MYSQL_THD thd, federatedx_io *io, if ((retval= io->query(str.ptr(), str.length()))) { - sprintf(buffer, "database: '%s' username: '%s' hostname: '%s'", + snprintf(buffer, sizeof(buffer), "database: '%s' username: '%s' hostname: '%s'", share->database, share->username, share->hostname); DBUG_PRINT("info", ("error-code: %d", io->error_code())); my_error(ER_CANT_CREATE_FEDERATED_TABLE, MYF(0), buffer); |