]> git.pld-linux.org Git - packages/mysql.git/blame - mysql_remove_eol_carret.patch
use mysqld.conf when fetching slave status
[packages/mysql.git] / mysql_remove_eol_carret.patch
CommitLineData
b4e1fa2c
AM
1# name : mysql_remove_eol_carret.patch
2# introduced : 11 or before
3# maintainer : Oleg
4#
5#!!! notice !!!
6# Any small change to this file in the main branch
7# should be done or reviewed by the maintainer!
db82db79
AM
8--- a/client/client_priv.h
9+++ b/client/client_priv.h
10@@ -89,6 +89,7 @@
b4e1fa2c
AM
11 OPT_SYSLOG,
12 #endif
13 OPT_PLUGIN_DIR,
14+ OPT_NO_REMOVE_EOL_CARRET,
df1b5770 15 OPT_DEFAULT_AUTH,
b4e1fa2c
AM
16 OPT_DEFAULT_PLUGIN,
17 OPT_MAX_CLIENT_OPTION
db82db79
AM
18--- a/client/mysql.cc
19+++ b/client/mysql.cc
20@@ -135,6 +135,8 @@
b4e1fa2c
AM
21 enum enum_info_type { INFO_INFO,INFO_ERROR,INFO_RESULT};
22 typedef enum enum_info_type INFO_TYPE;
23
24+my_bool opt_no_remove_eol_carret=0;
25+
26 static MYSQL mysql; /* The connection */
27 static my_bool ignore_errors=0,wait_flag=0,quick=0,
28 connected=0,opt_raw_data=0,unbuffered=0,output_tables=0,
db82db79 29@@ -1454,6 +1456,10 @@
b4e1fa2c
AM
30 NO_ARG, 1, 0, 0, 0, 0, 0},
31 {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
32 NO_ARG, 0, 0, 0, 0, 0, 0},
33+ {"no-remove-eol-carret", OPT_NO_REMOVE_EOL_CARRET, "Do not remove \\r before \\n in batch mode",
34+ (uchar**)&opt_no_remove_eol_carret , (uchar**)&opt_no_remove_eol_carret, 0,
35+ GET_BOOL,
36+ NO_ARG, 0, 0, 0, 0, 0, 0},
37 {"unbuffered", 'n', "Flush buffer after each query.", &unbuffered,
38 &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
39 {"column-names", OPT_COLUMN_NAMES, "Write column names in results.",
db82db79
AM
40--- a/client/readline.cc
41+++ b/client/readline.cc
42@@ -23,6 +23,8 @@
df1b5770 43 #include <my_dir.h>
b4e1fa2c
AM
44 #include "my_readline.h"
45
46+extern my_bool opt_no_remove_eol_carret;
47+
48 static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
49 ulong max_size);
50 static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str);
db82db79 51@@ -62,7 +64,7 @@
df1b5770 52 if (!(pos=intern_read_line(line_buff, &out_length)))
b4e1fa2c
AM
53 return 0;
54 if (out_length && pos[out_length-1] == '\n')
55- if (--out_length && pos[out_length-1] == '\r') /* Remove '\n' */
56+ if (--out_length && !opt_no_remove_eol_carret && pos[out_length-1] == '\r') /* Remove '\n' */
57 out_length--; /* Remove '\r' */
58 line_buff->read_length=out_length;
59 pos[out_length]=0;
db82db79
AM
60--- /dev/null
61+++ b/patch_info/mysql_remove_eol_carret.patch
b4e1fa2c
AM
62@@ -0,0 +1,7 @@
63+File=mysql_remove_eol_carret.patch
64+Name=
65+Version=1.1
66+Author=Percona <info@percona.com>
67+License=GPL
68+Comment=Do not remove carret before eol if --no-remove-eol-carret is enabled in MySQL client.
69+Changelog
This page took 0.32494 seconds and 4 git commands to generate.