From 86741f4614729f89e28071d14d8e3dd2f34b3e06 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Tue, 18 Aug 2020 12:22:04 +1000 Subject: [PATCH] More thread safety --- src/odbc/odbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/odbc/odbc.c b/src/odbc/odbc.c index 45c99d7..5d6e580 100644 --- a/src/odbc/odbc.c +++ b/src/odbc/odbc.c @@ -1608,8 +1608,8 @@ SQLRETURN SQL_API SQLGetData( default: /* FIXME here we assume fCType == SQL_C_CHAR */ to_c_char: { - static size_t len = 0; - static char *str = NULL; + static __thread size_t len = 0; + static __thread char *str = NULL; if (col->col_type == MDB_OLE) { if (stmt->pos == 0) {