def METHOD_NAME(lines):
  conn = MySQLdb.connect(host=param["host"], port=param["port"], user=param["user"], passwd = param["passwd"])
  conn.autocommit(True)
  cursor = conn.cursor()
  param['batch_count'] = len(lines)
  replace_sql = gen_replace_sql(**param)
  cursor.execute(replace_sql)
  if len(lines) != param['batch_count']:
    raise MyExcept
  set_values = []
  execute_values = []
  count = 0
  for i in xrange(0, len(lines)):
    line = lines[i]
    tokens = line.split(param['delima'])
    if len(tokens) != param['column_count']:
      print tokens
      raise MyExcept
    count = add_value(count, i, tokens, set_values, execute_values);
  set_sql = "set " + ",".join(set_values)
  execute_sql = "execute p1 using " + ",".join(execute_values)
  try:
    cursor.execute(set_sql)
    cursor.execute(execute_sql)
  except:
    print set_sql
    print execute_sql
    print "".join(traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
  cursor.close()
  conn.close()