[CONC-213] mariadb_stmt_execute_direct of queries with parameters Created: 2016-11-11 Updated: 2016-11-22 Resolved: 2016-11-22 |
|
| Status: | Closed |
| Project: | MariaDB Connector/C |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.0.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lawrin Novitsky | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
C/C built from current master branch, and server built from current 10.2 branch |
||
| Description |
|
Using mariadb_stmt_execute_direct of queries with parameters simply crashes the application. #include <stdio.h> #include <mysql.h> #define NUMBER_OF_TEST_LOOPS 10 #ifndef OK
#define check_stmt_rc(rc, stmt) \ #define check_mysql_rc(rc, mysql) \ void diag(char const *fmt, ...); ma = mysql_init(NULL); else { printf("Server info %s\nClient info: %s\n", mysql_get_server_info(ma), mysql_get_client_info()); }stmt = mysql_stmt_init(ma); memset(bind, '\0', sizeof(bind)); bind[0].buffer_type = MYSQL_TYPE_LONG; mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶m_count); mysql_stmt_close(stmt); exit(0); |
| Comments |
| Comment by Lawrin Novitsky [ 2016-11-11 ] |
|
The thing is, C/C does not think, that the server I use (10.2 branch) is capable to do mariadb_stmt_execute_direct. I don't know is it aslo a bug, or I am just using wrong branch. |
| Comment by Lawrin Novitsky [ 2016-11-13 ] |
|
Output of the testcase: C:\Work\git\server>sql\Debug\mysqld.exe --console --port=3308 C:\Work\git\server>git branch --all | head
C:\Work\git\server>git log | head Deb: add gdb as a build dependency for stack traces on test suite failures If mysqld crashed during the test suite run and gdb is available, |
| Comment by Lawrin Novitsky [ 2016-11-22 ] |
|
I do not observe the bug with latest updates of C/C and server. I am not sure where it was fixed. |