I am not familiar with futures mechanism. so ask for help...
If the sql don't execute successfully, how can i get err-no and err-message from mysql?
thanks~
Now I do it by this way:
import logging
from tornado import ioloop, gen
from tornado_mysql import pools
dbpool = pools.Pool(...)
@gen.coroutine
def run_sql(sql):
success = False
try:
cur = yield dbpool.execute(sql)
success = True
except:
logging.error('mysql execution error')
if success:
# do sth.