Leftover trailing OK packet for "CALL my_sp" queries
(self)
| 326 | c.execute("drop table b") |
| 327 | |
| 328 | def test_issue_95(self): |
| 329 | """Leftover trailing OK packet for "CALL my_sp" queries""" |
| 330 | conn = self.connect() |
| 331 | cur = conn.cursor() |
| 332 | with warnings.catch_warnings(): |
| 333 | warnings.filterwarnings("ignore") |
| 334 | cur.execute("DROP PROCEDURE IF EXISTS `foo`") |
| 335 | cur.execute( |
| 336 | """CREATE PROCEDURE `foo` () |
| 337 | BEGIN |
| 338 | SELECT 1; |
| 339 | END""" |
| 340 | ) |
| 341 | try: |
| 342 | cur.execute("""CALL foo()""") |
| 343 | cur.execute("""SELECT 1""") |
| 344 | self.assertEqual(cur.fetchone()[0], 1) |
| 345 | finally: |
| 346 | with warnings.catch_warnings(): |
| 347 | warnings.filterwarnings("ignore") |
| 348 | cur.execute("DROP PROCEDURE IF EXISTS `foo`") |
| 349 | |
| 350 | def test_issue_114(self): |
| 351 | """autocommit is not set after reconnecting with ping()""" |