summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysqlimport.c6
-rw-r--r--config.h.cmake1
-rw-r--r--configure.cmake1
-rw-r--r--sql/sql_analyse.cc4
-rw-r--r--storage/maria/maria_ftdump.c4
-rw-r--r--storage/myisam/myisam_ftdump.c4
6 files changed, 1 insertions, 19 deletions
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index c5c1554ca6a..ac0ad793c3f 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
- Copyright (c) 2011, 2017, MariaDB
+ Copyright (c) 2011, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -323,11 +323,7 @@ static int write_to_table(char *filename, MYSQL *mysql)
{
if (verbose)
fprintf(stdout, "Deleting the old data from table %s\n", tablename);
-#ifdef HAVE_SNPRINTF
snprintf(sql_statement, FN_REFLEN*16+256, "DELETE FROM %s", tablename);
-#else
- sprintf(sql_statement, "DELETE FROM %s", tablename);
-#endif
if (mysql_query(mysql, sql_statement))
{
db_error_with_table(mysql, tablename);
diff --git a/config.h.cmake b/config.h.cmake
index 3a4a030fd59..e7754337b1f 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -224,7 +224,6 @@
#cmakedefine HAVE_SIGWAIT 1
#cmakedefine HAVE_SIGWAITINFO 1
#cmakedefine HAVE_SLEEP 1
-#cmakedefine HAVE_SNPRINTF 1
#cmakedefine HAVE_STPCPY 1
#cmakedefine HAVE_STRERROR 1
#cmakedefine HAVE_STRCOLL 1
diff --git a/configure.cmake b/configure.cmake
index a899c2fd671..475fd250329 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -407,7 +407,6 @@ CHECK_FUNCTION_EXISTS (sigwait HAVE_SIGWAIT)
CHECK_FUNCTION_EXISTS (sigwaitinfo HAVE_SIGWAITINFO)
CHECK_FUNCTION_EXISTS (sigset HAVE_SIGSET)
CHECK_FUNCTION_EXISTS (sleep HAVE_SLEEP)
-CHECK_FUNCTION_EXISTS (snprintf HAVE_SNPRINTF)
CHECK_FUNCTION_EXISTS (stpcpy HAVE_STPCPY)
CHECK_FUNCTION_EXISTS (strcoll HAVE_STRCOLL)
CHECK_FUNCTION_EXISTS (strerror HAVE_STRERROR)
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc
index 61474433506..8e833035b96 100644
--- a/sql/sql_analyse.cc
+++ b/sql/sql_analyse.cc
@@ -415,13 +415,9 @@ void field_real::add()
}
else
{
-#ifdef HAVE_SNPRINTF
buff[sizeof(buff)-1]=0; // Safety
snprintf(buff, sizeof(buff)-1, "%-.*f", (int) decs, num);
length = (uint) strlen(buff);
-#else
- length= snprintf(buff, sizeof(buff), "%-.*f", (int) decs, num);
-#endif
// We never need to check further than this
end = buff + length - 1 - decs + max_notzero_dec_len;
diff --git a/storage/maria/maria_ftdump.c b/storage/maria/maria_ftdump.c
index 75ff9bd2642..1a7e1cda59f 100644
--- a/storage/maria/maria_ftdump.c
+++ b/storage/maria/maria_ftdump.c
@@ -119,11 +119,7 @@ int main(int argc,char *argv[])
if (subkeys.i >= 0)
weight= subkeys.f;
-#ifdef HAVE_SNPRINTF
snprintf(buf,MAX_LEN,"%.*s",(int) keylen,info->lastkey_buff+1);
-#else
- sprintf(buf,"%.*s",(int) keylen,info->lastkey_buff+1);
-#endif
my_casedn_str(default_charset_info,buf);
total++;
lengths[keylen]++;
diff --git a/storage/myisam/myisam_ftdump.c b/storage/myisam/myisam_ftdump.c
index 7ced701ed5b..2d96a951890 100644
--- a/storage/myisam/myisam_ftdump.c
+++ b/storage/myisam/myisam_ftdump.c
@@ -117,11 +117,7 @@ int main(int argc,char *argv[])
if (subkeys.i >= 0)
weight= subkeys.f;
-#ifdef HAVE_SNPRINTF
snprintf(buf,MAX_LEN,"%.*s",(int) keylen,info->lastkey+1);
-#else
- sprintf(buf,"%.*s",(int) keylen,info->lastkey+1);
-#endif
my_casedn_str(default_charset_info,buf);
total++;
lengths[keylen]++;