diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2014-11-15 18:28:24 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2014-11-15 18:28:24 +0100 |
commit | 5d8311960a8f993591075b3da6106559922183b4 (patch) | |
tree | 1efe45e1188606c895a4069c05a2501826e1f293 /storage/connect/user_connect.cc | |
parent | 9ade2d088d12f6a2a6f901148ed72a45dd15e9ff (diff) | |
download | mariadb-git-5d8311960a8f993591075b3da6106559922183b4.tar.gz |
- Implement the NEWMSG and XMSG methods
They are still experimental and should not be used in production.
added:
storage/connect/encas.h
storage/connect/english.msg
storage/connect/enids.h
storage/connect/frcas.h
storage/connect/french.msg
storage/connect/frids.h
storage/connect/frmsg.h
modified:
storage/connect/connect.cc
storage/connect/engmsg.h
storage/connect/filamdbf.cpp
storage/connect/global.h
storage/connect/ha_connect.cc
storage/connect/msgid.h
storage/connect/plgdbutl.cpp
storage/connect/plugutil.c
storage/connect/rcmsg.c
storage/connect/resource.h
storage/connect/tabfmt.h
- Fix global variable not being properly initialized (MDEV-6690, MDEV-7094)
modified:
storage/connect/ha_connect.cc
storage/connect/plugutil.c
storage/connect/user_connect.cc
storage/connect/xindex.cpp
- Implement Rewind for ODBC tables (MDEV-7097)
modified:
storage/connect/odbconn.cpp
storage/connect/odbconn.h
storage/connect/tabmysql.cpp
storage/connect/tabodbc.cpp
- Reset N when reopening MYSQL tables
modified:
storage/connect/tabmysql.cpp
Diffstat (limited to 'storage/connect/user_connect.cc')
-rw-r--r-- | storage/connect/user_connect.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/connect/user_connect.cc b/storage/connect/user_connect.cc index 557b94d8347..4affe447b00 100644 --- a/storage/connect/user_connect.cc +++ b/storage/connect/user_connect.cc @@ -47,13 +47,17 @@ #include "user_connect.h" #include "mycat.h" -extern uint worksize; - /****************************************************************************/ /* Initialize the user_connect static member. */ /****************************************************************************/ PCONNECT user_connect::to_users= NULL; +/****************************************************************************/ +/* Get the work_size SESSION variable value . */ +/****************************************************************************/ +uint GetWorkSize(void); +void SetWorkSize(uint); + /* -------------------------- class user_connect -------------------------- */ /****************************************************************************/ @@ -90,6 +94,7 @@ user_connect::~user_connect() bool user_connect::user_init() { // Initialize Plug-like environment + uint worksize= GetWorkSize(); PACTIVITY ap= NULL; PDBUSER dup= NULL; @@ -142,6 +147,8 @@ void user_connect::SetHandler(ha_connect *hc) bool user_connect::CheckCleanup(void) { if (thdp->query_id > last_query_id) { + uint worksize= GetWorkSize(); + PlugCleanup(g, true); if (g->Sarea_Size != worksize) { @@ -151,7 +158,7 @@ bool user_connect::CheckCleanup(void) // Check whether the work area size was changed if (!(g->Sarea = PlugAllocMem(g, worksize))) { g->Sarea = PlugAllocMem(g, g->Sarea_Size); - worksize = g->Sarea_Size; // Was too big + SetWorkSize(g->Sarea_Size); // Was too big } else g->Sarea_Size = worksize; // Ok |