title: Flask-SQLAlchemy session.rollback doesnt work
body: <p>I´m developing an API with FLASK and I´m using FLASK-SQALCHEMY.</p>
  
  <p>Well, when the api throws some exception, I try to rollback the session.</p>
  
  <p><strong>My Code</strong></p>
  
  <pre><code>def create_user():
      user = User()
      db.session.add(user)
      db.session.flush()
      return user
  
  try:
      new_user = create_user()
      print('x' + 2) # force error
      db.session.commit()
  except Exception as error:
      db.session.rollback()
      raise
  </code></pre>
  
  <p><strong>My requirements (Python 3.6.3 &amp; MySQL 5.7):</strong></p>
  
  <pre><code>SQLAlchemy==1.2.2
  astroid==1.6.0
  flask==0.12.2
  flask-login==0.4.1
  Flask-Migrate==2.1.1
  flask-script==2.0.6
  flask-sqlalchemy==2.3.2
  flask-validator==1.2.3
  isort==4.2.15
  pygelf==0.3.3
  pylint==1.8.1
  PyMySQL==0.7.11
  pytest==3.3.1
  Werkzeug==0.13
  </code></pre>