Re: kill query and prepared statements
Sorry for the spam, and thanks for you suggestion Johan! http://bugs.mysql.com/bug.php?id=84470 Seb On 01/11/2017 11:21 AM, Johan De Meersman wrote: Seb, You should log a bug at http://bugs.mysql.com - this is not a developer list. /Johan - Original Message - From: "Sebastien FLAESCH"To: "MySql" Sent: Tuesday, 10 January, 2017 14:55:42 Subject: kill query and prepared statements Hi all, I have reported this problem before, but I raise it again, since I still get this problem with 5.7.17 See attached code: I want to interrupt a long running statement with CTRL-C by starting a new connect to make a KILL QUERY. I am using the same technique as the mysql client code. The difference here is that my code is using PREPARED STATEMENTS with mysql_stmt_prepare() etc. Problem: After interrupting the first query with CTRL-C, the call to mysql_stmt_close() hangs... Maybe I am missing some new connection or statement option...?!? IMPORTANT: This problem appeared in a 5.7.x, same code is working fine with 5.6(.16) Please can someone from MySQL C API team try to reproduce and confirm? Thanks! Seb -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: kill query and prepared statements
Seb, You should log a bug at http://bugs.mysql.com - this is not a developer list. /Johan - Original Message - > From: "Sebastien FLAESCH"> To: "MySql" > Sent: Tuesday, 10 January, 2017 14:55:42 > Subject: kill query and prepared statements > Hi all, > > I have reported this problem before, but I raise it again, since I still get > this problem with 5.7.17 > > See attached code: > > I want to interrupt a long running statement with CTRL-C by starting a new > connect to make a KILL QUERY. > > I am using the same technique as the mysql client code. > > The difference here is that my code is using PREPARED STATEMENTS with > mysql_stmt_prepare() etc. > > Problem: After interrupting the first query with CTRL-C, the call to > mysql_stmt_close() hangs... > > Maybe I am missing some new connection or statement option...?!? > > IMPORTANT: This problem appeared in a 5.7.x, same code is working fine with > 5.6(.16) > > Please can someone from MySQL C API team try to reproduce and confirm? > > Thanks! > Seb > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe:http://lists.mysql.com/mysql -- Unhappiness is discouraged and will be corrected with kitten pictures. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: kill query and prepared statements
Just to be clear: This is a hint, to find the real problem, this is NOT A WORKAROUND for us! Seb On 01/10/2017 03:53 PM, Sebastien FLAESCH wrote: Investigating different API calls, to see if it makes a difference... Seems that the problem is related to the read-only cursor type option! If you comment out: unsigned long ct = (unsigned long) CURSOR_TYPE_READ_ONLY; s = mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void *) ); Then it works ... Seb On 01/10/2017 02:55 PM, Sebastien FLAESCH wrote: Hi all, I have reported this problem before, but I raise it again, since I still get this problem with 5.7.17 See attached code: I want to interrupt a long running statement with CTRL-C by starting a new connect to make a KILL QUERY. I am using the same technique as the mysql client code. The difference here is that my code is using PREPARED STATEMENTS with mysql_stmt_prepare() etc. Problem: After interrupting the first query with CTRL-C, the call to mysql_stmt_close() hangs... Maybe I am missing some new connection or statement option...?!? IMPORTANT: This problem appeared in a 5.7.x, same code is working fine with 5.6(.16) Please can someone from MySQL C API team try to reproduce and confirm? Thanks! Seb -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: kill query and prepared statements
Investigating different API calls, to see if it makes a difference... Seems that the problem is related to the read-only cursor type option! If you comment out: unsigned long ct = (unsigned long) CURSOR_TYPE_READ_ONLY; s = mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (const void *) ); Then it works ... Seb On 01/10/2017 02:55 PM, Sebastien FLAESCH wrote: Hi all, I have reported this problem before, but I raise it again, since I still get this problem with 5.7.17 See attached code: I want to interrupt a long running statement with CTRL-C by starting a new connect to make a KILL QUERY. I am using the same technique as the mysql client code. The difference here is that my code is using PREPARED STATEMENTS with mysql_stmt_prepare() etc. Problem: After interrupting the first query with CTRL-C, the call to mysql_stmt_close() hangs... Maybe I am missing some new connection or statement option...?!? IMPORTANT: This problem appeared in a 5.7.x, same code is working fine with 5.6(.16) Please can someone from MySQL C API team try to reproduce and confirm? Thanks! Seb -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql