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
a01cd746
Commit
a01cd746
authored
Oct 25, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-12925
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
b5d42662
e8eed35c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
5 deletions
+24
-5
mysql-test/t/mysql_client_test.test
mysql-test/t/mysql_client_test.test
+2
-2
mysys/my_getopt.c
mysys/my_getopt.c
+3
-3
tests/mysql_client_test.c
tests/mysql_client_test.c
+19
-0
No files found.
mysql-test/t/mysql_client_test.test
View file @
a01cd746
...
...
@@ -6,7 +6,7 @@
# var/log/mysql_client_test.trace
--
disable_result_log
--
exec
echo
$MYSQL_CLIENT_TEST
--
exec
$MYSQL_CLIENT_TEST
--
exec
echo
$MYSQL_CLIENT_TEST
--
getopt
-
ll
-
test
=
25600
M
--
exec
$MYSQL_CLIENT_TEST
--
getopt
-
ll
-
test
=
25600
M
# End of 4.1 tests
mysys/my_getopt.c
View file @
a01cd746
...
...
@@ -689,10 +689,10 @@ static longlong getopt_ll(char *arg, const struct my_option *optp, int *err)
ulonglong
block_size
=
(
optp
->
block_size
?
(
ulonglong
)
optp
->
block_size
:
1L
);
num
=
eval_num_suffix
(
arg
,
err
,
(
char
*
)
optp
->
name
);
if
(
num
>
0
&&
(
ulonglong
)
num
>
(
ulonglong
)
(
ulong
)
optp
->
max_value
&&
if
(
num
>
0
&&
(
ulonglong
)
num
>
(
ulonglong
)
optp
->
max_value
&&
optp
->
max_value
)
/* if max value is not set -> no upper limit */
num
=
(
longlong
)
(
u
long
)
optp
->
max_value
;
num
=
((
num
-
(
longlong
)
optp
->
sub_size
)
/
block_size
);
num
=
(
ulong
long
)
optp
->
max_value
;
num
=
((
num
-
optp
->
sub_size
)
/
block_size
);
num
=
(
longlong
)
(
num
*
block_size
);
return
max
(
num
,
optp
->
min_value
);
}
...
...
tests/mysql_client_test.c
View file @
a01cd746
...
...
@@ -51,6 +51,8 @@ static unsigned int iter_count= 0;
static
const
char
*
opt_basedir
=
"./"
;
static
longlong
opt_getopt_ll_test
=
0
;
static
int
embedded_server_arg_count
=
0
;
static
char
*
embedded_server_args
[
MAX_SERVER_ARGS
];
...
...
@@ -11738,6 +11740,19 @@ static void test_bug11718()
rc
=
mysql_query
(
mysql
,
"drop table t1, t2"
);
myquery
(
rc
);
}
/*
Bug #12925: Bad handling of maximum values in getopt
*/
static
void
test_bug12925
()
{
myheader
(
"test_bug12925"
);
if
(
opt_getopt_ll_test
)
DIE_UNLESS
(
opt_getopt_ll_test
==
LL
(
25600
*
1024
*
1024
));
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
...
...
@@ -11780,6 +11795,9 @@ static struct my_option client_test_long_options[] =
{
"user"
,
'u'
,
"User for login if not current user"
,
(
char
**
)
&
opt_user
,
(
char
**
)
&
opt_user
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#endif
{
"getopt-ll-test"
,
'g'
,
"Option for testing bug in getopt library"
,
(
char
**
)
&
opt_getopt_ll_test
,
(
char
**
)
&
opt_getopt_ll_test
,
0
,
GET_LL
,
REQUIRED_ARG
,
0
,
0
,
LONGLONG_MAX
,
0
,
0
,
0
},
{
0
,
0
,
0
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
}
};
...
...
@@ -11955,6 +11973,7 @@ static struct my_tests_st my_tests[]= {
{
"test_bug11183"
,
test_bug11183
},
{
"test_bug12001"
,
test_bug12001
},
{
"test_bug11718"
,
test_bug11718
},
{
"test_bug12925"
,
test_bug12925
},
{
0
,
0
}
};
...
...
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