Backport of revno: 2617.65.10
Backport of revno: 2617.65.10

Bug #45067 Assertion `stmt_da->is_error()' in 
           Delayed_insert::open_and_lock_table

The assert was triggered when delayed insert was killed by another 
connection using mysql_notify_thread_having_shared_lock().
During handling of thd->killed, thd.fatal_error() was called without
a previous call to my_error() which triggered the assert.
This patch allows the assert to pass if thd->killed has been set.

natsys/mariadb_10.2,flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,ollie314/server,flynn1973/mariadb-aix,ollie314/server,slanterns/server,davidl-zend/zenddbi,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,ollie314/server,ollie314/server,flynn1973/mariadb-aix,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,ollie314/server