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

📄 m_mysql.bas

📁 Usb Key loock vb soucrse code. ocx not found
💻 BAS
📖 第 1 页 / 共 3 页
字号:
Public Const NET_WAIT_TIMEOUT = 8 * 60 * 60

Public Const packet_error = -1

'Public Type vio
'End Type

'sizeof(NET)=272
Public Type API_NET
  vio As Long    'pointer->type vio
  fd As Long
  fcntl As Long
  buff As Long
  buff_end As Long
  write_pos As Long
  read_pos As Long
  last_error(1 To MYSQL_ERRMSG_SIZE) As Byte
  last_errno As Long
  max_packet As Long
  timeout As Long
  pkt_nr As Long
  error As Byte
  return_errno As Byte
  compress As Byte
  no_send_ok As Byte
  remain_in_buf As Long
  length As Long
  buf_length As Long
  where_b As Long
  return_status As Long
  reading_or_writing As Byte
  save_char As Byte
End Type
Public Enum API_refresh_options
 API_REFRESH_GRANT = 1
 API_REFRESH_LOG = 2
 API_REFRESH_TABLES = 4
 API_REFRESH_HOSTS = 8
 API_REFRESH_STATUS = 16
 API_REFRESH_THREADS = 32
 API_REFRESH_SLAVE = 64
 API_REFRESH_MASTER = 128
 API_REFRESH_READ_LOCK = 256
 API_REFRESH_FAST = 32768
End Enum
Public Enum API_enum_field_types
 FIELD_TYPE_DECIMAL = 0   ' adDecimal
 FIELD_TYPE_TINY = 1      ' adTinyInt
 FIELD_TYPE_SHORT = 2     ' adInteger
 FIELD_TYPE_LONG = 3      ' adBigInt
 FIELD_TYPE_FLOAT = 4
 FIELD_TYPE_DOUBLE = 5    ' adDouble
 FIELD_TYPE_NULL = 6      ' adUserDefined
 FIELD_TYPE_TIMESTAMP = 7 ' adDBTimeStamp
 FIELD_TYPE_LONGLONG = 8  ' adDouble
 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 ' adVarChar
 FIELD_TYPE_STRING = 254     ' adBSTR
End Enum
    ' adArray
    ' adBinary
    ' adBoolean
    ' adBSTR
    ' adChapter
    ' adChar
    ' adCurrency
    ' adDate
    ' adDBDate
    ' adDBTime
    ' adDBTimeStamp
    ' adEmpty
    ' adError
    ' adFileTime
    ' adGUID
    ' adIDispatch
    ' adSingle
    ' adIUnknown
    ' adLongVarBinary
    ' adLongVarChar
    ' adLongVarWChar
    ' adNumeric
    ' adPropVariant
    ' adSmallInt
    ' adUnsignedBigInt
    ' adUnsignedInt
    ' adUnsignedSmallInt
    ' adUnsignedTinyInt
    ' adVarBinary
    ' adVarChar
    ' adVariant
    ' adVarNumeric
    ' adVarWChar
    ' adWChar
Public Const FIELD_TYPE_CHAR = FIELD_TYPE_TINY
Public Const FIELD_TYPE_INTERVAL = FIELD_TYPE_ENUM

'----------------------------------------------------
'translated from mysql_version.h
'----------------------------------------------------
Public Const PROTOCOL_VERSION = 10
Public Const MYSQL_SERVER_VERSION = "3.23.33"
Public Const MYSQL_SERVER_SUFFIX = ""
Public Const FRM_VER = 6
Public Const MYSQL_VERSION_ID = 32333
Public Const MYSQL_PORT = 3306
Public Const MYSQL_UNIX_ADDR = "/tmp/mysql.sock"

'----------------------------------------------------
'translated from mysql.h
'----------------------------------------------------
'gptr is a long
'sizeof(USED_MEM)=12
Public Type API_myulonglong
   bytes(1 To 8) As Byte
End Type
Public Type API_USED_MEM
  next As Long
  left As Long
  size As Long
End Type
'sizeof(MEM_ROOT)=20
Public Type API_MEM_ROOT
  free As Long
  used As Long
  min_malloc As Long
  block_size As Long
  error_handler As Long 'pointer to an error handler
  'fix_mis_alignment where ever we don't land on a full word boundary (because this structure is 20 bytes in size)
End Type
'mysql_port is a long
'mysql_unix port is a long (pointer)
'sizeof(MYSQL_FIELD)=32
Public Type API_MYSQL_FIELD
  name As Long
  table As Long
  def As Long
  type As API_enum_field_types
  length As Long
  max_length As Long
  flags As Long
  decimals As Long
End Type
'sizeof(mysql_options)=76
Public Type API_st_mysql_options
  connect_timeout As Long
  client_flag As Long
  compress As Byte
  named_pipe As Byte
  Port As Long
  host As Long
  init_command As Long
  user As Long
  Password As Long
  Unix_Socket As Long
  DB As Long
  my_cnf_file As Long
  my_cnf_group As Long
  charset_dir As Long
  charset_name As Long
  use_ssl As Byte               '/* if to use SSL or not */
  ssl_key As Long               '/* PEM key file */
  ssl_cert As Long              '/* PEM cert file */
  ssl_ca As Long                '/* PEM CA file */
  ssl_capath As Long            '/* PEM directory of CA-s? */
End Type
Public Enum API_mysql_option
        MYSQL_OPT_CONNECT_TIMEOUT
        MYSQL_OPT_COMPRESS
        MYSQL_OPT_NAMED_PIPE
        MYSQL_INIT_COMMAND
        MYSQL_READ_DEFAULT_FILE
        MYSQL_READ_DEFAULT_GROUP
        MYSQL_SET_CHARSET_DIR
        MYSQL_SET_CHARSET_NAME
End Enum
'sizeof(mysql_status)=4
Public Enum API_mysql_status
        MYSQL_STATUS_READY
        MYSQL_STATUS_GET_RESULT
        MYSQL_STATUS_USE_RESULT
End Enum
'sizeof(MYSQL)=496
Public Type API_MYSQL
  net_a As API_NET
  connector_fd As Long
  host As Long
  user As Long
  Passwd As Long
  Unix_Socket As Long
  server_version As Long
  host_info As Long
  info As Long
  DB As Long
  Port As Long
  client_flag As Long
  server_capabilities As Long
  protocol_ver As Long
  field_count As Long
  server_status As Long
  thread_id As Long
  affected_rows As API_myulonglong
  Insert_ID As API_myulonglong
  extra_info As API_myulonglong
  packet_length As Long
  status As API_mysql_status
  Fields As Long
  field_alloc As API_MEM_ROOT
  'we are 4 bytes short cause of mal-aligned mem_root...add 4
  FIX_MISALIGNMENT As Long
  free_me As Byte
  reconnect As Byte
  options As API_st_mysql_options
  scramble_buff(1 To 9) As Byte
  charset As Long
  server_language As Long
End Type
'sizeof(MYSQL_DATA)=40
Public Type API_MYSQL_DATA
  Rows As API_myulonglong
  Fields As Long

⌨️ 快捷键说明

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