title: getWritableDatabase called recursively
body: <p>I'm attempting to update my database table with the following code:</p>
  
  <pre><code>    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
  
          String query = "ALTER TABLE names ADD COLUMN hidden integer default 0";
          dbHelper.getWritableDatabase().rawQuery(query, null);
  
      }
  </code></pre>
  
  <p>However, when I start the application and it tries to upgrade the database I get the following exception:</p>
  
  <pre><code>    ...Caused by: java.lang.IllegalStateException: getWritableDatabase called recursively
  </code></pre>
  
  <p>Does anyone know how I can get around this issue and what exactly is causing it?</p>
  
  <p>Thanks</p>