MySQL Forums
Forum List  »  Connector/Python

[MySQLdb]: Stored Proc results is not reflecting on tables
Posted by: jayson pryde
Date: October 05, 2011 07:21PM

Good day all,

I am using MySQLdb in my script to call a very simple stored procedure (inserts value to a table). What happens is that the execution of the stored procedure is OK, with no exceptions encountered. However, the expected results after the stored proc was called, was not reflected to the table. I've already performed 2 ways of calling the stored proc:

1. conn = MySQLdb.connect(host="XXX", user="root", passwd="XXX", db="XXX",
port=3306)
cursor = conn.cursor()
cursor.callproc('insertData',("sample1.exe", "sample2.exe", 'A,B,R,D', "2"))

2. conn = MySQLdb.connect(host="XXX", user="root", passwd="XXX", db="XXX",
port=3306)
cursor = conn.cursor()
cursor.execute('call insertData("jayson12.exe", "uv_win32",
"RegOpen,RegClose", 2);')

I tried calling the SP in MySQL workbench using this statement:
call `behavior`.`insertData`('1.exe', '2.exe', 'A,B', 2);
and it worked fine, with the results reflected on the table

Does anybody have an idea of how to resolve this? or is this a bug of MySQLdb module?

Options: ReplyQuote


Subject
Written By
Posted
[MySQLdb]: Stored Proc results is not reflecting on tables
October 05, 2011 07:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.