CURRENT_TEST: spider/bugfix.mdev_31338
mysqltest: At line 18: query 'SELECT TRIM(BOTH ' ' FROM c) FROM ts ORDER BY c' failed: <Unknown> (2013): Lost connection to server during query

The result from queries just before the failure was:
#
# MDEV-31338 UBSAN: runtime error: member access within null pointer of type 'struct SPIDER_FIELD_CHAIN' and SIGSEGV in spider_db_open_item_ident on SELECT
#
for master_1
for child2
for child3
set spider_same_server_link=1;
set global spider_same_server_link=1;
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
CREATE TABLE t (c BLOB) ENGINE=InnoDB;
CREATE TABLE ts (c BLOB) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
Warnings:
Warning	138	Spider table params in COMMENT or CONNECTION strings have been deprecated and will be removed in a future release. Please use table options instead.
SELECT TRIM(BOTH ' ' FROM c) FROM ts ORDER BY c;
CURRENT_TEST: spider/bugfix.mdev_31338
mysqltest: At line 18: query 'SELECT TRIM(BOTH ' ' FROM c) FROM ts ORDER BY c' failed: <Unknown> (2013): Lost connection to server during query

The result from queries just before the failure was:
#
# MDEV-31338 UBSAN: runtime error: member access within null pointer of type 'struct SPIDER_FIELD_CHAIN' and SIGSEGV in spider_db_open_item_ident on SELECT
#
for master_1
for child2
for child3
set spider_same_server_link=1;
set global spider_same_server_link=1;
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
CREATE TABLE t (c BLOB) ENGINE=InnoDB;
CREATE TABLE ts (c BLOB) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"';
Warnings:
Warning	138	Spider table params in COMMENT or CONNECTION strings have been deprecated and will be removed in a future release. Please use table options instead.
SELECT TRIM(BOTH ' ' FROM c) FROM ts ORDER BY c;
