| 227 | } |
| 228 | |
| 229 | bool InternalConnection::resetSession(thread_db* tdbb) |
| 230 | { |
| 231 | fb_assert(isCurrent()); |
| 232 | |
| 233 | if (isCurrent()) |
| 234 | return true; |
| 235 | |
| 236 | FbLocalStatus status; |
| 237 | { |
| 238 | EngineCallbackGuard guard(tdbb, *this, FB_FUNCTION); |
| 239 | m_attachment->execute(&status, NULL, 0, "ALTER SESSION RESET", |
| 240 | m_sqlDialect, NULL, NULL, NULL, NULL); |
| 241 | } |
| 242 | return !(status->getState() & IStatus::STATE_ERRORS); |
| 243 | } |
| 244 | |
| 245 | // this internal connection instance is available for the current execution context if it |
| 246 | // a) is current connection and current thread's attachment is equal to |