ESP8266 & MySQL_Connection: crash when creating cursor.

Running on an ESP8266, the 12E module on my own design PCB.

The error is as said is a decoded stack trace; simply from the serial monitor.

For added interest: now I moved the code that handles the query into a separate function, it suddenly works fine?! I really don't get it.