title: Moving Code to Debian Caused "Use multi=True when executing multiple statements" Error Statements
body: <p>I have been running python scripts making calls to MySQL on a machine with Ubuntu 20.04 LTS. I just recently moved those scripts over to a server running Debian 10.</p>
  <p>Both servers have MySQL 8.0.21 installed. Python 3.7.3 is on the Debian server, and Python 3.8.2 on Ubuntu. When I execute the python scripts on the Debian server, I get the following error message:</p>
  <p><code>Use multi=True when executing multiple statements</code></p>
  <p>I haven't made any changes to the code, so I'm not sure why I'm getting this message on the Debian server, but not the Ubuntu one.</p>
  <p>Here's the section in the script that causes the error:</p>
  <pre><code>cursor = dbconn.cursor(dictionary=True)
  
  # get next scheduled event to be aired
  sql = &quot;CALL GetEvent();&quot;
  cursor.execute(sql)
  
  result = cursor.fetchone()
  cursor.close()
  
  if result:  
      eventtime = str(result[&quot;eventtime&quot;])
  
      # the max seconds we are going to wait is 60
      init_waitseconds = timediffinseconds(eventtime)
      if init_waitseconds &gt; 61:
          waitseconds = 60
      else:
          waitseconds = init_waitseconds
  
      # wait for specified time
      print_stdout(f&quot;{bcolors.CGREEN}[EVENT_MONITOR]{bcolors.ENDC} Waiting for next scheduled event at {eventtime}&quot;)
      time.sleep(waitseconds)
  </code></pre>
  <p>The stored procedure that is called is as follows:</p>
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `GetEvent`()
  BEGIN
      
      DECLARE v_DayName CHAR(9);    
      SET v_DayName := DAYNAME(CURRENT_DATE);
      
      SELECT e.name, e.eventaction, e.data, e.extra, et.eventday, et.eventtime, et.recurring
          FROM event e
          INNER JOIN eventtime et ON et.eventID = e.ID
          WHERE et.eventdate = CURDATE() AND et.recurring = 'No' AND e.enabled = 1 AND et.eventtime &gt; CURRENT_TIME() OR           
              et.eventday = 'v_DayName' AND et.recurring = 'Yes' AND e.enabled = 1 AND et.eventtime &gt; CURRENT_TIME() OR
              et.eventday = 'Day' AND et.recurring = 'Yes' AND e.enabled = 1 AND et.eventtime &gt; CURRENT_TIME() OR
              CASE WHEN IsWeekday('v_DayName') = True THEN et.eventday = 'Mon-Fri' END AND e.enabled = 1 AND et.eventtime &gt; CURRENT_TIME() OR
              CASE WHEN IsWeekend('v_DayName') = True THEN et.eventday = 'Sat-Sun' END AND e.enabled = 1 AND et.eventtime &gt; CURRENT_TIME()
          ORDER BY et.eventtime
          LIMIT 1;
  END
  </code></pre>
  <p>Also, this section of my python script causes the same error:</p>
  <pre><code>cursor = dbconn.cursor(dictionary=True)
  
  # CheckQueueCount MySQL procedure retrieves how many tracks are currently in queuelist table
  sql = &quot;CALL CheckQueueCount&quot;
  cursor.execute(sql)
  
  result = cursor.fetchone()
  ret = result[&quot;QueueCount&quot;]
  cursor.close()
  return ret
  </code></pre>
  <p>And the stored procedure it calls:</p>
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckQueueCount`()
  BEGIN
  
      SELECT COUNT(ID) AS QueueCount FROM queuelist;
      
  END
  </code></pre>