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
f99d6ccf
Commit
f99d6ccf
authored
Oct 22, 2004
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A test case for Bug#6046: no fix is needed (the bug is already
fixed in the main tree).
parent
33c97a49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
tests/client_test.c
tests/client_test.c
+48
-0
No files found.
tests/client_test.c
View file @
f99d6ccf
...
...
@@ -10642,6 +10642,53 @@ static void test_bug6059()
}
static
void
test_bug6046
()
{
MYSQL_STMT
*
stmt
;
const
char
*
stmt_text
;
int
rc
;
short
b
=
1
;
MYSQL_BIND
bind
[
1
];
myheader
(
"test_bug6046"
);
stmt_text
=
"DROP TABLE IF EXISTS t1"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
stmt_text
=
"CREATE TABLE a1 (a int, b int)"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
stmt_text
=
"INSERT INTO a1 VALUES (1,1),(2,2),(3,1),(4,2)"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
stmt
=
mysql_stmt_init
(
mysql
);
stmt_text
=
"SELECT a1.a FROM a1 NATURAL JOIN a1 as X1 "
"WHERE a1.b > ? ORDER BY a1.a"
;
rc
=
mysql_stmt_prepare
(
stmt
,
stmt_text
,
strlen
(
stmt_text
));
check_execute
(
stmt
,
rc
);
b
=
1
;
bzero
(
bind
,
sizeof
(
bind
));
bind
[
0
].
buffer
=
&
b
;
bind
[
0
].
buffer_type
=
MYSQL_TYPE_SHORT
;
mysql_stmt_bind_param
(
stmt
,
bind
);
rc
=
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
mysql_stmt_store_result
(
stmt
);
rc
=
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
mysql_stmt_close
(
stmt
);
}
/*
Read and parse arguments and MySQL options from my.cnf
...
...
@@ -10956,6 +11003,7 @@ int main(int argc, char **argv)
test_bug6049
();
/* check support for negative TIME values */
test_bug6058
();
/* check support for 0000-00-00 dates */
test_bug6059
();
/* correct metadata for SELECT ... INTO OUTFILE */
test_bug6046
();
/* NATURAL JOIN transformation works in PS */
/*
XXX: PLEASE RUN THIS PROGRAM UNDER VALGRIND AND VERIFY THAT YOUR TEST
DOESN'T CONTAIN WARNINGS/ERRORS BEFORE YOU PUSH.
...
...
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