⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 umysqlct.pas

📁 RO模拟器!!适合玩仙境传说的玩家们呦~
💻 PAS
字号:
{--------------------------------------------------------------------------------
Licencing issues:
23-March-2002      〤ristian Nicola
Note:
 Mysql is copyright by MySQL AB. Refer to their site ( http://www.mysql.com )
for licencing issues.
 Zlib is copyright by Jean-loup Gailly and Mark Adler. Refer to their site for
licencing issues. ( http://www.info-zip.org/pub/infozip/zlib/ )

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

NOTES:
  1. The origin of this software must not be misrepresented; you must not
     claim that you wrote the original software. If you use this software
     in a product, an acknowledgment in the product documentation would be
     appreciated.
  2. Altered source versions must be plainly marked as such, and must not be
     misrepresented as being the original software.
  3. If you are using it for a commercial software it must be open source and
     it must include full source code of this library in an unaltered fashion
     or you would need to ask for permission to use it. This library will be
     considered donationware which means if you want to contribute with any money
     or hardware you are more than welcome.
  4. This notice may not be removed or altered from any source distribution.

  Cristian Nicola
  n_cristian@hotmail.com

If you use the mysqldirect library in a product, i would appreciate *not*
receiving lengthy legal documents to sign. The sources are provided
for free but without warranty of any kind.  The library has been
entirely written by Cristian Nicola after libmysql of MYSQL AB.
--------------------------------------------------------------------------------}
unit uMysqlCT;
////////////////////////////////////////////////////////////////////////////////
// CT = constants and types
// various constants and types imported from mysql definition

interface

const
     MyObjVer='1.1'; //direct-mysql objects version

     MYSQL_ERRMSG_SIZE     =200;
     MYSQL_NAMEDPIPE       ='MySQL';
     LOCAL_HOST_NAMEDPIPE  ='.';
     MYSQL_PORT            =3306;
     MYSQL_UNIX_ADDR       ='\\socket\\MySQL';                        // ;06-02 - for unix pipe

     PACKET_ERROR       = -1;
     IO_SIZE            = 4096;
     MAX_ALLOWED_PACKET = 16*1024*1024;
     NET_HEADER_SIZE    = 4;
     RETRY_COUNT        = 1;
     COMP_HEADER_SIZE   = 3;
     MIN_COMPRESS_LENGTH=50;
     NET_BUFFER_LENGTH  = 8192;
     NET_READ_TIMEOUT      =30;


const
     NULL_LENGTH              = NOT 0;
     SERVER_STATUS_IN_TRANS   = 1;
     SERVER_STATUS_AUTOCOMMIT = 2;
     MYSQL_SERVER_VERSION     = '3.23.38';
     NAME_LEN                 = 64;
     USERNAME_LENGTH          = 16;
     PROTOCOL_VERSION         = 10;

     //refresh flags
     REFRESH_GRANT     = 1;
     REFRESH_LOG       = 2;
     REFRESH_TABLES    = 4;
     REFRESH_HOSTS     = 8;
     REFRESH_STATUS    = 16;
     REFRESH_THREADS   = 32;
     REFRESH_SLAVE     = 64;
     REFRESH_MASTER    = 128;
     REFRESH_READ_LOCK = 16384;
     REFRESH_FAST      = 32768;

     //client flags
     CLIENT_LONG_PASSWORD   = 1;
     CLIENT_FOUND_ROWS      = 2;
     CLIENT_LONG_FLAG       = 4;
     CLIENT_CONNECT_WITH_DB = 8;
     CLIENT_NO_SCHEMA       = 16;
     CLIENT_COMPRESS        = 32;
     CLIENT_ODBC            = 64;
     CLIENT_LOCAL_FILES     = 128;
     CLIENT_IGNORE_SPACE    = 256;
     CLIENT_CHANGE_USER     = 512;
     CLIENT_INTERACTIVE     = 1024;
     CLIENT_SSL             = 2048;
     CLIENT_IGNORE_SIGPIPE  = 4096;
     CLIENT_TRANSACTIONS    = 8192;

     CLIENT_CAPABILITIES= CLIENT_LONG_PASSWORD or
                          CLIENT_LONG_FLAG or
                          CLIENT_LOCAL_FILES or
                          CLIENT_TRANSACTIONS;
     // field types
     FIELD_TYPE_DECIMAL     = 0;
     FIELD_TYPE_TINY        = 1;
     FIELD_TYPE_SHORT       = 2;
     FIELD_TYPE_LONG        = 3;
     FIELD_TYPE_FLOAT       = 4;
     FIELD_TYPE_DOUBLE      = 5;
     FIELD_TYPE_NULL        = 6;
     FIELD_TYPE_TIMESTAMP   = 7;
     FIELD_TYPE_LONGLONG    = 8;
     FIELD_TYPE_INT24       = 9;
     FIELD_TYPE_DATE        = 10;
     FIELD_TYPE_TIME        = 11;
     FIELD_TYPE_DATETIME    = 12;
     FIELD_TYPE_YEAR        = 13;
     FIELD_TYPE_NEWDATE     = 14;
     FIELD_TYPE_ENUM        = 247;
     FIELD_TYPE_SET         = 248;
     FIELD_TYPE_TINY_BLOB   = 249;
     FIELD_TYPE_MEDIUM_BLOB = 250;
     FIELD_TYPE_LONG_BLOB   = 251;
     FIELD_TYPE_BLOB        = 252;
     FIELD_TYPE_VAR_STRING  = 253;
     FIELD_TYPE_STRING      = 254;

     FIELD_TYPE_CHAR        = FIELD_TYPE_TINY;
     FIELD_TYPE_INTERVAL    = FIELD_TYPE_ENUM;

     //field flags
     NOT_NULL_FLAG       = 1;
     PRI_KEY_FLAG        = 2;
     UNIQUE_KEY_FLAG     = 4;
     MULTIPLE_KEY_FLAG   = 8;
     BLOB_FLAG           = 16;
     UNSIGNED_FLAG       = 32;
     ZEROFILL_FLAG       = 64;
     BINARY_FLAG         = 128;
     ENUM_FLAG           = 256;
     AUTO_INCREMENT_FLAG = 512;
     TIMESTAMP_FLAG      = 1024;
     SET_FLAG            = 2048;
     NUM_FLAG            = 32768;
     PART_KEY_FLAG       = 16384;
     GROUP_FLAG          = 32768;
     UNIQUE_FLAG         = 65536;

type
    TEnumVioType = ( VIO_CLOSED,
                     VIO_TYPE_TCPIP,
                     VIO_TYPE_SOCKET,
                     VIO_TYPE_NAMEDPIPE,
                     VIO_TYPE_SSL);

    TEnumServerCommand = (COM_SLEEP,        COM_QUIT,           COM_INIT_DB,
                          COM_QUERY,        COM_FIELD_LIST,     COM_CREATE_DB,
                          COM_DROP_DB,      COM_REFRESH,        COM_SHUTDOWN,
                          COM_STATISTICS,   COM_PROCESS_INFO,   COM_CONNECT,
                          COM_PROCESS_KILL, COM_DEBUG,          COM_PING,
                          COM_TIME,         COM_DELAYED_INSERT, COM_CHANGE_USER,
                          COM_BINLOG_DUMP,  COM_TABLE_DUMP,     COM_CONNECT_OUT);

    TMysql_Status = ( MYSQL_STATUS_READY,
                      MYSQL_STATUS_GET_RESULT,
                      MYSQL_STATUS_USE_RESULT );

implementation

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -