Perform the query that is passed to it (sql_str).

    Returns:
       results in a dict.

def __do_query_into_hash(conn, sql_str):
    '''
    Perform the query that is passed to it (sql_str).

    Returns:
       results in a dict.

    '''
    mod = sys._getframe().f_code.co_name
    log.debug('%s<--(%s)', mod, sql_str)

    rtn_results = []

    try:
        cursor = conn.cursor()
    except MySQLdb.MySQLError:
        log.error('%s: Can\'t get cursor for SQL->%s', mod, sql_str)
        cursor.close()
        log.debug('%s-->', mod)
        return rtn_results

    try:
        _execute(cursor, sql_str)
    except MySQLdb.MySQLError:
        log.error('%s: try to execute : SQL->%s', mod, sql_str)
        cursor.close()
        log.debug('%s-->', mod)
        return rtn_results

    qrs = cursor.fetchall()

    for row_data in qrs:
        col_cnt = 0
        row = {}
        for col_data in cursor.description:
            col_name = col_data[0]
            row[col_name] = row_data[col_cnt]
            col_cnt += 1

        rtn_results.append(row)

    cursor.close()
    log.debug('%s-->', mod)
    return rtn_results