Python Stored procedure not running, No errors
<p>The following procedure works fine from mysql client but not running from Python.</p>

<p><strong>Stored Procedure</strong></p>

<pre><code>CREATE DEFINER=`music-cnv`@`%` PROCEDURE `StoreFileStats`(FNAME VARCHAR(200), FEXT varchar(4), FBDIR VARCHAR(100), FRDIR VARCHAR(250), FSIZE bigint(8), FMDATE bigint(8), FCDATE bigint(8), CONVERTED tinyint(1))
BEGIN
    DECLARE FCount int DEFAULT 0;
    SELECT COUNT(FileName) INTO FCount FROM FileList where (FleRelativeDir LIKE FRDIR) AND (FileName LIKE FNAME);
    IF FCount = 0 THEN 
        INSERT INTO FileList (FileName,FileBaseDir,FleRelativeDir,FileExt,FileSize,FileModDate,FileCDate,Con#verted) VALUES (FNAME,FBDir,FRDir,FEXT,FSize,FMDate,FCDate,CONVERTED);
    END IF;
END
</code></pre>

<p><strong>Data</strong></p>

<pre><code>'In the Light', 'FLAC', '/var/data/Music_FLAC', 'Led Zeppelin/Physical Graffiti, Disc 2', 51472669, 1289282499, 1458631127, False
</code></pre>

<p><strong>Python Code</strong></p>

<p>The connection and cursor give no errors</p>

<pre><code>try:
    myargs = [fnamesub, self.type.strip(), self.directory,
        subdirname, fpathstat[2], fpathstat[3],
        fpathstat[4], False]
    result_args = mycur.callproc('StoreFileStats', myargs)
except mysql.connector.Error as Err:
    errno = 51
    print('Error ' + str(errno) + ' !!!, Cannot Update MySQL Data with    Name    '     + fnamesub)
    print(Err)
</code></pre>

<p>The code runs without error but does not update database
Thank you for any help</p>

<p>Just needed to commit. When running procedure from shell auto commit is enabled. But when run from Python must manually run commit.</p>

python mysql stored-procedures