Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Minor
 - 
    Resolution: Fixed
 - 
    1.0.7
 - 
    None
 
Description
MariaDB [tpch1]> select calsettrace(1);
----------------
| calsettrace(1) | 
----------------
| 0 | 
----------------
1 row in set (0.00 sec)
MariaDB [tpch1]> (select n_nationkey K from nation limit 1) union all (select n_nationkey K from nation limit 2) limit 1;
ERROR 2013 (HY000): Lost connection to MySQL server during query
MariaDB [tpch1]> select calsettrace(1);
In ha_calpont_impl_external_lock(), we try to access the connection info without checking if it exists (around lin 4406 of ha_calpont_impl.cpp):		
else // vtable mode
		{
			if (thd->infinidb_vtable.vtable_state == THD::INFINIDB_SELECT_VTABLE)
			{
				if (ci->traceFlags & 1)
					push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, 9999, ci->cal_conn_hndl->queryStats.c_str());
ci->cal_conn_hndl is NULL in this case.