**Apache Airflow version**:

2.1.0

**Environment**:

- self hosted docker-compose based stack

**What happened**:

Using JDBCOperator if the sql result in an error we got only 
```
[2021-06-21 11:05:55,377] {local_task_job.py:151} INFO - Task exited with return code 1
```

Before upgrading from 2.0.1 we got error details in logs:
```
jaydebeapi.DatabaseError: java.sql.SQLException:... [MapR][DrillJDBCDriver](500165) Query execution error. Details: VALIDATION ERROR:...
``` 

**What you expected to happen**:

See `SQLException` in logs

**How to reproduce it**:

Perform a generic SQL task with broken SQL.

**Anything else we need to know**:

I think is somehow related to https://github.com/apache/airflow/commit/abcd48731303d9e141bdc94acc2db46d73ccbe12#diff-4fd3febb74d94b2953bf5e9b4a981b617949195f83d96f4a589c3078085959b7R202 
airflow/models/taskinstance.py
:param tis: a list of task instances
    :param session: current session
    :param dag_run_state: state to set DagRun to. If set to False, dagrun state will not
        be changed.
    :param dag: DAG object
    :param activate_dag_runs: Deprecated parameter, do not pass
    """
    job_ids = []
    task_id_by_key = defaultdict(lambda: defaultdict(lambda: defaultdict(set)))
    for ti in tis:
        if ti.state == State.RUNNING:
            if ti.job_id:
                ti.state = State.SHUTDOWN
                job_ids.append(ti.job_id)
        else:
            task_id = ti.task_id
            if dag and dag.has_task(task_id):
                task = dag.get_task(task_id)
                ti.refresh_from_task(task)
                task_retries = task.retries
                ti.max_tries = ti.try_number + task_retries - 1
            else:
                
                
                
                
                ti.max_tries = max(ti.max_tries, ti.prev_attempted_tries)
            ti.state = State.NONE
            ti.external_executor_id = None
            session.merge(ti)