summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-05-18 09:12:37 -0700
committerunknown <jimw@mysql.com>2005-05-18 09:12:37 -0700
commiteff871bd6ce85c5e4eedcac8bc756f8d1799233b (patch)
treebebe771b1dcfcfc1e91b8468e1d88951ad1df49f /client
parent04f9561a911397360d53a27e4bf414e1c220fd16 (diff)
downloadmariadb-git-eff871bd6ce85c5e4eedcac8bc756f8d1799233b.tar.gz
Small optimization to bug fix, from Monty.
client/mysqldump.c: Optimize away a call to strend() by using return value of my_snprintf()
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 8cfd76cd64a..a3487ed6f50 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -1104,6 +1104,7 @@ static uint getTableStructure(char *table, char* db)
char table_buff2[NAME_LEN*2+3];
char query_buff[512];
FILE *sql_file = md_result_file;
+ int len;
DBUG_ENTER("getTableStructure");
if (!insert_pat_inited)
@@ -1118,11 +1119,11 @@ static uint getTableStructure(char *table, char* db)
if (verbose)
fprintf(stderr, "-- Retrieving table structure for table %s...\n", table);
- my_snprintf(query_buff, sizeof(query_buff),
- "SET OPTION SQL_QUOTE_SHOW_CREATE=%d",
- (opt_quoted || opt_keywords));
+ len= my_snprintf(query_buff, sizeof(query_buff),
+ "SET OPTION SQL_QUOTE_SHOW_CREATE=%d",
+ (opt_quoted || opt_keywords));
if (!create_options)
- strmov(strend(query_buff), "/*!40102 ,SQL_MODE=concat(@@sql_mode, _utf8 ',NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') */");
+ strmov(query_buff+len, "/*!40102 ,SQL_MODE=concat(@@sql_mode, _utf8 ',NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') */");
result_table= quote_name(table, table_buff, 1);
opt_quoted_table= quote_name(table, table_buff2, 0);