From a8428e3ac88a1d202f41d1b0cbbef247f7fd7c21 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Wed, 12 Jun 2013 20:48:55 +0200 Subject: [PATCH] - To avoid crashing in debug mode, the error message concerning the making of the index is changed to a warning. modified: storage/connect/ha_connect.cc storage/connect/tabmul.cpp* --- storage/connect/ha_connect.cc | 11 ++++++++++- storage/connect/tabmul.cpp | 8 +++----- 2 files changed, 13 insertions(+), 6 deletions(-) mode change 100644 => 100755 storage/connect/tabmul.cpp diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 672bad023a5..2e4e86ab6c9 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -2920,8 +2920,17 @@ int ha_connect::external_lock(THD *thd, int lock_type) } // endelse Xchk - if (CloseTable(g)) + if (CloseTable(g)) { + // This is an error while builing index +#if defined(_DEBUG) + // Make it a warning to avoid crash + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, g->Message); + rc= 0; +#else // !_DEBUG + my_message(ER_UNKNOWN_ERROR, g->Message, MYF(0)); rc= HA_ERR_INTERNAL_ERROR; +#endif // !DEBUG + } // endif Close DBUG_RETURN(rc); } // endif MODE_ANY diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp old mode 100644 new mode 100755 index 42cae1d6748..0561638daa8 --- a/storage/connect/tabmul.cpp +++ b/storage/connect/tabmul.cpp @@ -125,15 +125,13 @@ PTDB TDBMUL::Duplicate(PGLOBAL g) bool TDBMUL::InitFileNames(PGLOBAL g) { #define PFNZ 4096 - char *pfn[PFNZ]/*, filename[_MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT]*/; -// char* *pfn; - char *filename; - int rc, n = 0; + char *pfn[PFNZ]; + char *filename; + int rc, n = 0; if (trace) htrc("in InitFileName: fn[]=%d\n", _MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT); -// pfn = (char**)PlugSubAlloc(g, NULL, PFNZ * sizeof(char*)); filename = (char*)PlugSubAlloc(g, NULL, _MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT); // The sub table may need to refer to the Table original block