Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
0ae23cd6
Commit
0ae23cd6
authored
Dec 24, 2009
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge from mysql-trunk-merge.
parents
6e9dad7e
f6a8efbe
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
38 additions
and
24 deletions
+38
-24
client/mysql.cc
client/mysql.cc
+2
-1
client/mysqldump.c
client/mysqldump.c
+2
-2
include/config-win.h
include/config-win.h
+1
-1
libmysql/libmysql.c
libmysql/libmysql.c
+7
-4
mysql-test/r/mysql.result
mysql-test/r/mysql.result
+7
-1
mysql-test/suite/rpl/t/rpl_killed_ddl.test
mysql-test/suite/rpl/t/rpl_killed_ddl.test
+1
-2
mysql-test/t/mysql.test
mysql-test/t/mysql.test
+6
-1
mysys/default.c
mysys/default.c
+1
-1
mysys/mf_pack.c
mysys/mf_pack.c
+2
-2
sql/log.cc
sql/log.cc
+4
-4
sql/sql_acl.cc
sql/sql_acl.cc
+2
-2
sql/sql_connect.cc
sql/sql_connect.cc
+1
-1
sql/sql_plugin.cc
sql/sql_plugin.cc
+1
-1
sql/sql_table.cc
sql/sql_table.cc
+1
-1
No files found.
client/mysql.cc
View file @
0ae23cd6
...
...
@@ -3612,7 +3612,8 @@ print_table_data_vertically(MYSQL_RES *result)
for
(
uint
off
=
0
;
off
<
mysql_num_fields
(
result
);
off
++
)
{
field
=
mysql_fetch_field
(
result
);
tee_fprintf
(
PAGER
,
"%*s: "
,(
int
)
max_length
,
field
->
name
);
if
(
column_names
)
tee_fprintf
(
PAGER
,
"%*s: "
,(
int
)
max_length
,
field
->
name
);
if
(
cur
[
off
])
{
unsigned
int
i
;
...
...
client/mysqldump.c
View file @
0ae23cd6
...
...
@@ -840,7 +840,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
&
err_ptr
,
&
err_len
);
if
(
err_len
)
{
strmake
(
buff
,
err_ptr
,
min
(
sizeof
(
buff
),
err_len
));
strmake
(
buff
,
err_ptr
,
min
(
sizeof
(
buff
)
-
1
,
err_len
));
fprintf
(
stderr
,
"Invalid mode to --compatible: %s
\n
"
,
buff
);
exit
(
1
);
}
...
...
@@ -4630,7 +4630,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length,
for
(;
pos
!=
end
&&
*
pos
!=
','
;
pos
++
)
;
var_len
=
(
uint
)
(
pos
-
start
);
strmake
(
buff
,
start
,
min
(
sizeof
(
buff
),
var_len
));
strmake
(
buff
,
start
,
min
(
sizeof
(
buff
)
-
1
,
var_len
));
find
=
find_type
(
buff
,
lib
,
var_len
);
if
(
!
find
)
{
...
...
include/config-win.h
View file @
0ae23cd6
...
...
@@ -190,7 +190,7 @@ typedef SSIZE_T ssize_t;
#define isnan(X) _isnan(X)
#define finite(X) _finite(X)
#ifndef
UNDEF_THREAD_HACK
#ifndef
MYSQL_CLIENT_NO_THREADS
#define THREAD
#endif
#define VOID_SIGHANDLER
...
...
libmysql/libmysql.c
View file @
0ae23cd6
...
...
@@ -409,7 +409,10 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
if
(
!
passwd
)
passwd
=
""
;
/* Store user into the buffer */
/*
Store user into the buffer.
Advance position as strmake returns a pointer to the closing NUL.
*/
end
=
strmake
(
end
,
user
,
USERNAME_LENGTH
)
+
1
;
/* write scrambled password according to server capabilities */
...
...
@@ -897,7 +900,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
{
MYSQL_RES
*
result
;
MYSQL_FIELD
*
fields
;
char
buff
[
25
7
],
*
end
;
char
buff
[
25
8
],
*
end
;
DBUG_ENTER
(
"mysql_list_fields"
);
DBUG_PRINT
(
"enter"
,(
"table: '%s' wild: '%s'"
,
table
,
wild
?
wild
:
""
));
...
...
@@ -1903,7 +1906,7 @@ mysql_stmt_param_metadata(MYSQL_STMT *stmt)
/* Store type of parameter in network buffer. */
static
void
store_param_type
(
char
**
pos
,
MYSQL_BIND
*
param
)
static
void
store_param_type
(
unsigned
char
**
pos
,
MYSQL_BIND
*
param
)
{
uint
typecode
=
param
->
buffer_type
|
(
param
->
is_unsigned
?
32768
:
0
);
int2store
(
*
pos
,
typecode
);
...
...
@@ -2182,7 +2185,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
that is sent to the server.
*/
for
(
param
=
stmt
->
params
;
param
<
param_end
;
param
++
)
store_param_type
(
(
char
**
)
&
net
->
write_pos
,
param
);
store_param_type
(
&
net
->
write_pos
,
param
);
}
for
(
param
=
stmt
->
params
;
param
<
param_end
;
param
++
)
...
...
mysql-test/r/mysql.result
View file @
0ae23cd6
...
...
@@ -427,4 +427,10 @@ a: b
</row>
</resultset>
drop table t1;
End of 5.0 tests
Bug #47147: mysql client option --skip-column-names does not apply to vertical output
*************************** 1. row ***************************
1
End of tests
mysql-test/suite/rpl/t/rpl_killed_ddl.test
View file @
0ae23cd6
...
...
@@ -158,8 +158,7 @@ source include/kill_query_and_diff_master_slave.inc;
######## EVENT ########
let
$diff_statement
=
SELECT
event_name
,
event_body
,
execute_at
FROM
information_schema
.
events
where
event_name
like
'e%'
;
let
$diff_statement
=
SELECT
event_name
,
event_body
,
execute_at
FROM
information_schema
.
events
where
event_name
like
'e%'
;
send
CREATE
EVENT
e2
ON
SCHEDULE
AT
CURRENT_TIMESTAMP
+
INTERVAL
1
DAY
...
...
mysql-test/t/mysql.test
View file @
0ae23cd6
...
...
@@ -420,5 +420,10 @@ insert into t1 values ('\0b\0');
--
exec
$MYSQL
--
xml
test
-
e
"select a from t1"
drop
table
t1
;
--
echo
--
echo
Bug
#47147: mysql client option --skip-column-names does not apply to vertical output
--
echo
--
exec
$MYSQL
--
skip
-
column
-
names
--
vertical
test
-
e
"select 1 as a"
--
echo
End
of
5.0
tests
--
echo
--
echo
End
of
tests
mysys/default.c
View file @
0ae23cd6
...
...
@@ -683,7 +683,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler,
int
recursion_level
)
{
char
name
[
FN_REFLEN
+
10
],
buff
[
4096
],
curr_gr
[
4096
],
*
ptr
,
*
end
,
**
tmp_ext
;
char
*
value
,
option
[
4096
],
tmp
[
FN_REFLEN
];
char
*
value
,
option
[
4096
+
2
],
tmp
[
FN_REFLEN
];
static
const
char
includedir_keyword
[]
=
"includedir"
;
static
const
char
include_keyword
[]
=
"include"
;
const
int
max_recursion_level
=
10
;
...
...
mysys/mf_pack.c
View file @
0ae23cd6
...
...
@@ -245,7 +245,7 @@ my_bool my_use_symdir=0; /* Set this if you want to use symdirs */
#ifdef USE_SYMDIR
void
symdirget
(
char
*
dir
)
{
char
buff
[
FN_REFLEN
];
char
buff
[
FN_REFLEN
+
1
];
char
*
pos
=
strend
(
dir
);
if
(
dir
[
0
]
&&
pos
[
-
1
]
!=
FN_DEVCHAR
&&
my_access
(
dir
,
F_OK
))
{
...
...
@@ -257,7 +257,7 @@ void symdirget(char *dir)
*
pos
++=
temp
;
*
pos
=
0
;
/* Restore old filename */
if
(
file
>=
0
)
{
if
((
length
=
my_read
(
file
,
buff
,
sizeof
(
buff
),
MYF
(
0
)))
>
0
)
if
((
length
=
my_read
(
file
,
buff
,
sizeof
(
buff
)
-
1
,
MYF
(
0
)))
>
0
)
{
for
(
pos
=
buff
+
length
;
pos
>
buff
&&
(
iscntrl
(
pos
[
-
1
])
||
isspace
(
pos
[
-
1
]))
;
...
...
sql/log.cc
View file @
0ae23cd6
...
...
@@ -2509,7 +2509,7 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
{
char
*
p
=
fn_ext
(
log_name
);
uint
length
=
(
uint
)
(
p
-
log_name
);
strmake
(
buff
,
log_name
,
min
(
length
,
FN_REFLEN
));
strmake
(
buff
,
log_name
,
min
(
length
,
FN_REFLEN
-
1
));
return
(
const
char
*
)
buff
;
}
return
log_name
;
...
...
@@ -3768,7 +3768,7 @@ int MYSQL_BIN_LOG::purge_logs_before_date(time_t purge_time)
if
(
stat_area
.
st_mtime
<
purge_time
)
strmake
(
to_log
,
log_info
.
log_file_name
,
sizeof
(
log_info
.
log_file_name
));
sizeof
(
log_info
.
log_file_name
)
-
1
);
else
break
;
}
...
...
@@ -5173,11 +5173,11 @@ bool flush_error_log()
if
(
opt_error_log
)
{
char
err_renamed
[
FN_REFLEN
],
*
end
;
end
=
strmake
(
err_renamed
,
log_error_file
,
FN_REFLEN
-
4
);
end
=
strmake
(
err_renamed
,
log_error_file
,
FN_REFLEN
-
5
);
strmov
(
end
,
"-old"
);
pthread_mutex_lock
(
&
LOCK_error_log
);
#ifdef __WIN__
char
err_temp
[
FN_REFLEN
+
4
];
char
err_temp
[
FN_REFLEN
+
5
];
/*
On Windows is necessary a temporary file for to rename
the current error file.
...
...
sql/sql_acl.cc
View file @
0ae23cd6
...
...
@@ -1060,7 +1060,7 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh,
*
mqh
=
acl_user
->
user_resource
;
if
(
acl_user
->
host
.
hostname
)
strmake
(
sctx
->
priv_host
,
acl_user
->
host
.
hostname
,
MAX_HOSTNAME
);
strmake
(
sctx
->
priv_host
,
acl_user
->
host
.
hostname
,
MAX_HOSTNAME
-
1
);
else
*
sctx
->
priv_host
=
0
;
}
...
...
@@ -1161,7 +1161,7 @@ bool acl_getroot_no_password(Security_context *sctx, char *user, char *host,
sctx
->
priv_user
=
acl_user
->
user
?
user
:
(
char
*
)
""
;
if
(
acl_user
->
host
.
hostname
)
strmake
(
sctx
->
priv_host
,
acl_user
->
host
.
hostname
,
MAX_HOSTNAME
);
strmake
(
sctx
->
priv_host
,
acl_user
->
host
.
hostname
,
MAX_HOSTNAME
-
1
);
else
*
sctx
->
priv_host
=
0
;
}
...
...
sql/sql_connect.cc
View file @
0ae23cd6
...
...
@@ -725,7 +725,7 @@ static int check_connection(THD *thd)
ulong
server_capabilites
;
{
/* buff[] needs to big enough to hold the server_version variable */
char
buff
[
SERVER_VERSION_LENGTH
+
SCRAMBLE_LENGTH
+
64
];
char
buff
[
SERVER_VERSION_LENGTH
+
1
+
SCRAMBLE_LENGTH
+
1
+
64
];
server_capabilites
=
CLIENT_BASIC_FLAGS
;
if
(
opt_using_transactions
)
...
...
sql/sql_plugin.cc
View file @
0ae23cd6
...
...
@@ -2080,7 +2080,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var,
&
error
,
&
error_len
,
&
not_used
);
if
(
error_len
)
{
strmake
(
buff
,
error
,
min
(
sizeof
(
buff
),
error_len
));
strmake
(
buff
,
error
,
min
(
sizeof
(
buff
)
-
1
,
error_len
));
strvalue
=
buff
;
goto
err
;
}
...
...
sql/sql_table.cc
View file @
0ae23cd6
...
...
@@ -2609,7 +2609,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
!
(
sql_field
->
charset
=
get_charset_by_csname
(
sql_field
->
charset
->
csname
,
MY_CS_BINSORT
,
MYF
(
0
))))
{
char
tmp
[
6
4
];
char
tmp
[
6
5
];
strmake
(
strmake
(
tmp
,
save_cs
->
csname
,
sizeof
(
tmp
)
-
4
),
STRING_WITH_LEN
(
"_bin"
));
my_error
(
ER_UNKNOWN_COLLATION
,
MYF
(
0
),
tmp
);
...
...
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