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
381deba3
Commit
381deba3
authored
Jun 15, 2007
by
malff/marcsql@weblab.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manual merge
parent
7e36d37e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
2 deletions
+56
-2
tests/mysql_client_test.c
tests/mysql_client_test.c
+56
-2
No files found.
tests/mysql_client_test.c
View file @
381deba3
...
...
@@ -16217,6 +16217,59 @@ static void test_bug28934()
}
/*
Bug#27592 (stack overrun when storing datetime value using prepared statements)
*/
static
void
test_bug27592
()
{
const
int
NUM_ITERATIONS
=
40
;
int
i
;
int
rc
;
MYSQL_STMT
*
stmt
=
NULL
;
MYSQL_BIND
bind
[
1
];
MYSQL_TIME
time_val
;
DBUG_ENTER
(
"test_bug27592"
);
myheader
(
"test_bug27592"
);
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS t1"
);
mysql_query
(
mysql
,
"CREATE TABLE t1(c2 DATETIME)"
);
stmt
=
mysql_simple_prepare
(
mysql
,
"INSERT INTO t1 VALUES (?)"
);
DIE_UNLESS
(
stmt
);
memset
(
bind
,
0
,
sizeof
(
bind
));
bind
[
0
].
buffer_type
=
MYSQL_TYPE_DATETIME
;
bind
[
0
].
buffer
=
(
char
*
)
&
time_val
;
bind
[
0
].
length
=
NULL
;
for
(
i
=
0
;
i
<
NUM_ITERATIONS
;
i
++
)
{
time_val
.
year
=
2007
;
time_val
.
month
=
6
;
time_val
.
day
=
7
;
time_val
.
hour
=
18
;
time_val
.
minute
=
41
;
time_val
.
second
=
3
;
time_val
.
second_part
=
0
;
time_val
.
neg
=
0
;
rc
=
mysql_stmt_bind_param
(
stmt
,
bind
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
}
mysql_stmt_close
(
stmt
);
DBUG_VOID_RETURN
;
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
...
...
@@ -16498,15 +16551,16 @@ static struct my_tests_st my_tests[]= {
{
"test_bug15518"
,
test_bug15518
},
{
"test_bug23383"
,
test_bug23383
},
{
"test_bug21635"
,
test_bug21635
},
{
"test_bug28505"
,
test_bug28505
},
{
"test_status"
,
test_status
},
{
"test_bug24179"
,
test_bug24179
},
{
"test_ps_query_cache"
,
test_ps_query_cache
},
#ifdef fix_bug_in_pb_first
{
"test_bug28075"
,
test_bug28075
},
#endif
{
"test_bug28934"
,
test_bug28934
},
{
"test_bug27876"
,
test_bug27876
},
{
"test_bug28505"
,
test_bug28505
},
{
"test_bug28934"
,
test_bug28934
},
{
"test_bug27592"
,
test_bug27592
},
{
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