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
c7674f14
Commit
c7674f14
authored
Feb 10, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
manual merge
libmysql/libmysql.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged
parents
77b2435e
fca90750
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
2 deletions
+60
-2
libmysql/libmysql.c
libmysql/libmysql.c
+5
-0
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+2
-2
tests/mysql_client_test.c
tests/mysql_client_test.c
+53
-0
No files found.
libmysql/libmysql.c
View file @
c7674f14
...
...
@@ -2499,6 +2499,11 @@ int cli_stmt_execute(MYSQL_STMT *stmt)
set_stmt_error
(
stmt
,
CR_PARAMS_NOT_BOUND
,
unknown_sqlstate
);
DBUG_RETURN
(
1
);
}
if
(
stmt
->
mysql
->
status
!=
MYSQL_STATUS_READY
)
{
set_stmt_error
(
stmt
,
CR_COMMANDS_OUT_OF_SYNC
,
unknown_sqlstate
);
DBUG_RETURN
(
1
);
}
net_clear
(
net
);
/* Sets net->write_pos */
/* Reserve place for null-marker bytes */
...
...
mysql-test/mysql-test-run.sh
View file @
c7674f14
...
...
@@ -194,8 +194,8 @@ MY_LOG_DIR="$MYSQL_TEST_DIR/var/log"
#
# Set LD_LIBRARY_PATH if we are using shared libraries
#
LD_LIBRARY_PATH
=
"
$BASEDIR
/lib:
$BASEDIR
/libmysql/.libs:
$LD_LIBRARY_PATH
"
DYLD_LIBRARY_PATH
=
"
$BASEDIR
/lib:
$BASEDIR
/libmysql/.libs:
$DYLD_LIBRARY_PATH
"
LD_LIBRARY_PATH
=
"
$BASEDIR
/lib:
$BASEDIR
/libmysql/.libs:
$
BASEDIR
/zlib/.libs:
$
LD_LIBRARY_PATH
"
DYLD_LIBRARY_PATH
=
"
$BASEDIR
/lib:
$BASEDIR
/libmysql/.libs:
$
BASEDIR
/zlib/.libs:
$
DYLD_LIBRARY_PATH
"
export
LD_LIBRARY_PATH DYLD_LIBRARY_PATH
#
...
...
tests/mysql_client_test.c
View file @
c7674f14
...
...
@@ -30,6 +30,7 @@
#include <my_global.h>
#include <my_sys.h>
#include <mysql.h>
#include <errmsg.h>
#include <my_getopt.h>
#include <m_string.h>
...
...
@@ -12512,6 +12513,57 @@ static void test_bug6761(void)
}
/* Bug#8330 - Bug #8330 mysql_stmt_execute crashes (libmysql) */
static
void
test_bug8330
()
{
const
char
*
stmt_text
;
MYSQL_STMT
*
stmt
[
2
];
int
i
,
rc
;
char
*
query
=
"select a,b from t1 where a=?"
;
MYSQL_BIND
bind
[
2
];
long
lval
[
2
];
myheader
(
"test_bug8330"
);
stmt_text
=
"drop table if exists t1"
;
/* in case some previos test failed */
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
stmt_text
=
"create table t1 (a int, b int)"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
bzero
(
bind
,
sizeof
(
bind
));
for
(
i
=
0
;
i
<
2
;
i
++
)
{
stmt
[
i
]
=
mysql_stmt_init
(
mysql
);
rc
=
mysql_stmt_prepare
(
stmt
[
i
],
query
,
strlen
(
query
));
check_execute
(
stmt
[
i
],
rc
);
bind
[
i
].
buffer_type
=
MYSQL_TYPE_LONG
;
bind
[
i
].
buffer
=
(
void
*
)
&
lval
[
i
];
bind
[
i
].
is_null
=
0
;
mysql_stmt_bind_param
(
stmt
[
i
],
&
bind
[
i
]);
}
rc
=
mysql_stmt_execute
(
stmt
[
0
]);
check_execute
(
stmt
[
0
],
rc
);
rc
=
mysql_stmt_execute
(
stmt
[
1
]);
DIE_UNLESS
(
rc
&&
mysql_stmt_errno
(
stmt
[
1
])
==
CR_COMMANDS_OUT_OF_SYNC
);
rc
=
mysql_stmt_execute
(
stmt
[
0
]);
check_execute
(
stmt
[
0
],
rc
);
mysql_stmt_close
(
stmt
[
0
]);
mysql_stmt_close
(
stmt
[
1
]);
stmt_text
=
"drop table t1"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
strlen
(
stmt_text
));
myquery
(
rc
);
}
/*
Read and parse arguments and MySQL options from my.cnf
*/
...
...
@@ -12730,6 +12782,7 @@ static struct my_tests_st my_tests[]= {
{
"test_cursors_with_union"
,
test_cursors_with_union
},
{
"test_truncation"
,
test_truncation
},
{
"test_truncation_option"
,
test_truncation_option
},
{
"test_bug8330"
,
test_bug8330
},
{
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