Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
mariadb
Commits
6d6af547
Commit
6d6af547
authored
12 years ago
by
Nirbhay Choubey
Browse files
Options
Download
Plain Diff
Merge of patch for bug#14685362 from mysql-5.1.
parents
56630dfd
a6adbd05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
client/mysql.cc
client/mysql.cc
+18
-2
sql-common/client.c
sql-common/client.c
+2
-0
No files found.
client/mysql.cc
View file @
6d6af547
/*
Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
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
...
...
@@ -1849,7 +1849,7 @@ static int read_and_execute(bool interactive)
String
buffer
;
#endif
char
*
line
;
char
*
line
=
NULL
;
char
in_string
=
0
;
ulong
line_number
=
0
;
bool
ml_comment
=
0
;
...
...
@@ -1913,6 +1913,13 @@ static int read_and_execute(bool interactive)
#else
if
(
opt_outfile
)
fputs
(
prompt
,
OUTFILE
);
/*
free the previous entered line.
Note: my_free() cannot be used here as the memory was allocated under
the readline/libedit library.
*/
if
(
line
)
free
(
line
);
line
=
readline
(
prompt
);
#endif
/* defined(__WIN__) */
...
...
@@ -1970,8 +1977,17 @@ static int read_and_execute(bool interactive)
#if defined(__WIN__)
buffer
.
free
();
tmpbuf
.
free
();
#else
if
(
interactive
)
/*
free the last entered line.
Note: my_free() cannot be used here as the memory was allocated under
the readline/libedit library.
*/
free
(
line
);
#endif
return
status
.
exit_status
;
}
...
...
This diff is collapsed.
Click to expand it.
sql-common/client.c
View file @
6d6af547
...
...
@@ -2215,6 +2215,8 @@ mysql_autodetect_character_set(MYSQL *mysql)
}
#endif
if
(
mysql
->
options
.
charset_name
)
my_free
(
mysql
->
options
.
charset_name
);
if
(
!
(
mysql
->
options
.
charset_name
=
my_strdup
(
csname
,
MYF
(
MY_WME
))))
return
1
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment