00001 /***************************************************************************** 00002 00003 Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved. 00004 00005 This program is free software; you can redistribute it and/or modify it under 00006 the terms of the GNU General Public License as published by the Free Software 00007 Foundation; version 2 of the License. 00008 00009 This program is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00011 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License along with 00014 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 00015 St, Fifth Floor, Boston, MA 02110-1301 USA 00016 00017 *****************************************************************************/ 00018 00019 /**************************************************/ 00026 #pragma once 00027 #ifndef usr0sess_h 00028 #define usr0sess_h 00029 00030 #include "univ.i" 00031 #include "ut0byte.h" 00032 #include "trx0types.h" 00033 #include "srv0srv.h" 00034 #include "trx0types.h" 00035 #include "usr0types.h" 00036 #include "que0types.h" 00037 #include "data0data.h" 00038 #include "rem0rec.h" 00039 00040 /*********************************************************************/ 00043 UNIV_INTERN 00044 sess_t* 00045 sess_open(void); 00046 /*============*/ 00047 /*********************************************************************/ 00049 UNIV_INTERN 00050 void 00051 sess_close( 00052 /*=======*/ 00053 sess_t* sess); /* in, own: session object */ 00054 00055 /* The session handle. All fields are protected by the kernel mutex */ 00056 struct sess_struct{ 00057 ulint state; 00058 trx_t* trx; 00063 UT_LIST_BASE_NODE_T(que_t) 00064 graphs; 00066 }; 00067 00068 /* Session states */ 00069 #define SESS_ACTIVE 1 00070 #define SESS_ERROR 2 /* session contains an error message 00071 which has not yet been communicated 00072 to the client */ 00073 #ifndef UNIV_NONINL 00074 #include "usr0sess.ic" 00075 #endif 00076 00077 #endif