Commit 0aa4fb73 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix crash when a null qrp is returned for OCCUR tables

  in connect_assisted_discovery

modified:
  storage/connect/ha_connect.cc

- Change CRLF line endings to LF

modified:
  storage/connect/tabpivot.cpp
  storage/connect/tabpivot.h
parent 9f7c3fed
...@@ -3604,7 +3604,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -3604,7 +3604,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
if (src && ttp != TAB_PIVOT) { if (src && ttp != TAB_PIVOT) {
qrp= SrcColumns(g, host, db, user, pwd, src, port); qrp= SrcColumns(g, host, db, user, pwd, src, port);
if (ttp == TAB_OCCUR) if (qrp && ttp == TAB_OCCUR)
if (OcrSrcCols(g, qrp, col, ocl, rnk)) { if (OcrSrcCols(g, qrp, col, ocl, rnk)) {
my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
return HA_ERR_INTERNAL_ERROR; return HA_ERR_INTERNAL_ERROR;
...@@ -3660,7 +3660,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd, ...@@ -3660,7 +3660,7 @@ static int connect_assisted_discovery(handlerton *hton, THD* thd,
if (!qrp && bif && fnc != FNC_COL) // tab is a view if (!qrp && bif && fnc != FNC_COL) // tab is a view
qrp= MyColumns(g, host, db, user, pwd, tab, NULL, port, false); qrp= MyColumns(g, host, db, user, pwd, tab, NULL, port, false);
if (ttp == TAB_OCCUR && fnc != FNC_COL) if (qrp && ttp == TAB_OCCUR && fnc != FNC_COL)
if (OcrColumns(g, qrp, col, ocl, rnk)) { if (OcrColumns(g, qrp, col, ocl, rnk)) {
my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0));
return HA_ERR_INTERNAL_ERROR; return HA_ERR_INTERNAL_ERROR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment