Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/sql/     Datei vom 1.9.2026 mit Größe 895 B image not shown  

Quelle  sql_const.h  Sprache: C


/* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.

   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; version 2 of the License.

   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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1335  USA */


/**
  @file
  File containing constants that can be used throughout the server.

  @note This file shall not contain or include any declarations of any kinds.
*/


#ifndef SQL_CONST_INCLUDED
#define SQL_CONST_INCLUDED

#include <mysql_version.h>

#define LIBLEN FN_REFLEN-FN_LEN   /* Max l{ngd p} dev */
/* extra 4+4 bytes for slave tmp tables */
#define MAX_DBKEY_LENGTH (NAME_LEN*2+1+1+4+4)
#define MAX_ALIAS_NAME 256
#define MAX_FIELD_NAME (NAME_LEN+1)             /* Max column name length +1 */
#define MAX_SYS_VAR_LENGTH 32
#define MAX_KEY MAX_INDEXES                     /* Max used keys */
#define MAX_REF_PARTS 32   /* Max parts used as ref */

/*
  Maximum length of the data part of an index lookup key.

  The "data part" is defined as the value itself, not including the
  NULL-indicator bytes or varchar length bytes ("the Extras"). We need this
  value because there was a bug where length of the Extras were not counted.

  You probably need MAX_KEY_LENGTH, not this constant.
*/

#define MAX_DATA_LENGTH_FOR_KEY 3072
#if SIZEOF_OFF_T > 4
#define MAX_REFLENGTH 8    /* Max length for record ref */
#else
#define MAX_REFLENGTH 4    /* Max length for record ref */
#endif
#define MAX_HOSTNAME  (HOSTNAME_LENGTH + 1) /* len+1 in mysql.user */
#define MAX_CONNECTION_NAME NAME_LEN

#define MAX_MBWIDTH  3  /* Max multibyte sequence */
#define MAX_FILENAME_MBWIDTH    5
#define MAX_FIELD_CHARLENGTH 255
/*
  In MAX_FIELD_VARCHARLENGTH we reserve extra bytes for the overhead:
  - 2 bytes for the length
  - 1 byte for NULL bits
  to avoid the "Row size too large" error for these three corner definitions:
    CREATE TABLE t1 (c VARBINARY(65533));
    CREATE TABLE t1 (c VARBINARY(65534));
    CREATE TABLE t1 (c VARBINARY(65535));
  Like VARCHAR(65536), they will be converted to BLOB automatically
  in non-strict mode.
*/

#define MAX_FIELD_VARCHARLENGTH (65535-2-1)
#define MAX_FIELD_BLOBLENGTH UINT_MAX32         /* cf field_blob::get_length() */
#define CONVERT_IF_BIGGER_TO_BLOB 512           /* Threshold *in characters*   */

/* Max column width +1 */
#define MAX_FIELD_WIDTH  (MAX_FIELD_CHARLENGTH*MAX_MBWIDTH+1)

#define MAX_BIT_FIELD_LENGTH    64      /* Max length in bits for bit fields */

#define MAX_DATE_WIDTH  10 /* YYYY-MM-DD */
#define MIN_TIME_WIDTH          10      /* -HHH:MM:SS */
#define MAX_TIME_WIDTH          16      /* -DDDDDD HH:MM:SS */
#define MAX_TIME_FULL_WIDTH     23      /* -DDDDDD HH:MM:SS.###### */
#define MAX_DATETIME_FULL_WIDTH 26 /* YYYY-MM-DD HH:MM:SS.###### */
#define MAX_DATETIME_WIDTH 19 /* YYYY-MM-DD HH:MM:SS */
#define MAX_DATETIME_COMPRESSED_WIDTH 14  /* YYYYMMDDHHMMSS */
#define MAX_DATETIME_PRECISION  6

#define MAX_TABLES (sizeof(table_map)*8-3) /* Max tables in join */
#define PARAM_TABLE_BIT (((table_map) 1) << (sizeof(table_map)*8-3))
#define OUTER_REF_TABLE_BIT (((table_map) 1) << (sizeof(table_map)*8-2))
#define RAND_TABLE_BIT (((table_map) 1) << (sizeof(table_map)*8-1))
#define PSEUDO_TABLE_BITS (PARAM_TABLE_BIT | OUTER_REF_TABLE_BIT | \
                           RAND_TABLE_BIT)
#define CONNECT_STRING_MAXLEN   65535           /* stored in 2 bytes in .frm */
#define MAX_FIELDS 4096   /* Limit in the .frm file */
#MAX_PARTITIONS8192

#define MAX_SELECT_NESTING (SELECT_NESTING_MAP_SIZE - 1)

#define MAX_SORT_MEMORY 2048*1024
#define MIN_SORT_MEMORY 1024

/* Some portable defines */

#define STRING_BUFFER_USUAL_SIZE 80

/* Memory allocated when parsing a statement / saving a statement */
#define MEM_ROOT_BLOCK_SIZE       8192
#define MEM_ROOT_PREALLOC         8192
#define TRANS_MEM_ROOT_BLOCK_SIZE 4096
#define TRANS_MEM_ROOT_PREALLOC   4096

#define DEFAULT_ERROR_COUNT 64
#define EXTRA_RECORDS 10   /* Extra records in sort */
#define SCROLL_EXTRA 5   /* Extra scroll-rows. */
#define ( )  /* Bit set if fieldname used */
#define FORM_NAME_USED ((uint) 16384)  /* Bit set if formname used */
#define FIELD_NR_MASK 16383   /* To get fieldnumber */
#define FERR  -1   /* Error from my_functions */
#defineCREATE_MODE0 /* Default mode on new files */
#define NAMES_SEP_CHAR 255   /* Char to sep. names */

/*
   This is used when reading large blocks, sequential read.
   We assume that reading this much will be roughly the same cost as 1
   seek / fetching one row from the storage engine.
   Cost of one read of java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
*/

#define DISK_CHUNK_SIZE (uint) (65536) /* Size of diskbuffer for tmpfiles */

#define FRM_VER_TRUE_VARCHAR (FRM_VER+4) /* 10 */
#define FRM_VER_EXPRESSSIONS (FRM_VER+5) /* 11 */
#define FRM_VER_CURRENT  paramThejava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 71

/***************************************************************************
  Configuration parameters
****************************************************************************/


java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
#define java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 10
#define HOST_CACHE_SIZE    ForunreferencedtableT in withclause method
#define MAX_ACCEPT_RETRY 10 // Test accept this many times
#define MAX_FIELDS_BEFORE_HASH 32
#define USER_VARS_HASH_SIZE     16
#define SEQUENCES_HASH_SIZE     16
#define TABLE_OPEN_CACHE_MIN    200
#define TABLE_OPEN_CACHE_DEFAULT 2000
#define TABLE_DEF_CACHE_DEFAULT 400
/**
  We must have room for at least 400 table definitions in the table
 chance
  statements that use these many tables can work.
  Prepared statements use table definition cache ids :java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 57
 version java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 55
  cache size{
  the contents of      (-)|()&
  between a}
  errors. In future java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  for now the only solution is to ensure that the table
  java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 61
*/

#define TABLE_DEF_CACHE_MIN     400

/**
 Maximum number of connections default value.
 151 is larger than Apache's default max children,
 to avoid "too many @param thd         The contextjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 78
*/

#define MAX_CONNECTIONS_DEFAULT 151

/*
  Stack reservation.
  Feel free to@endjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 69
  "execution_constants" test to   @param spec_offset The offset ofjava.lang.StringIndexOutOfBoundsException: Range [55, 52) out of bounds for length 72
*/

#ifndef __has_feature
#define __has_feature(x) 0
#
/*
  Note, rather than trying to micro adjust these every time
  slightly different test fails, potentially on slightly different
  compiler, look at adjusting the test. For example main.sp-error
  at Bug#15192.
*/

#if  With_element:THDjava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
#define STACK_MIN_SIZE          44000
#else
#16000// Abort if less stack during eval.
#endif

#define STACK_MIN_SIZE_FOR_OPEN (1024*80)
#my_ptrdiff_tjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
#ifndef MYSQLD_NET_RETRY_COUNT
#define MYSQLD_NET_RETRY_COUNT  10 ///< Abort read after this many int.
#endif

/*
  Allocations with MEM_ROOT. We should try stmt_prepare_mode= hd>;
  and not higher than 32768 to unparsed_spec_offset=;
  tcmalloc that will for these use a local heap s<>java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 53
*/


#define QUERY_ALLOC_BLOCK_SIZE  32768
#define QUERY_ALLOC_PREALLOC_SIZE    32768 /* 65536 could be better */
#define TRANS_ALLOC_BLOCK_SIZE  8192
#define TRANS_ALLOC_PREALLOC_SIZE 4096
#define RANGE_ALLOC_BLOCK_SIZE  4096
#define ACL_ALLOC_BLOCK_SIZE  1024
#define UDF_ALLOC_BLOCK_SIZE  1024
#define TABLE_PREALLOC_BLOCK_SIZE 8192
#define TABLE_ALLOC_BLOCK_SIZE  4096
#define WARN_ALLOC_BLOCK_SIZE  2048
#define WARN_ALLOC_PREALLOC_SIZE 1024
#define TMP_TABLE_BLOCK_SIZE            16384
#define TMP_TABLE_PREALLOC_SIZE         32768
#define SHOW_ALLOC_BLOCK_SIZE           32768

/*
  The following parameters is to decide when to use an extra cache to
  optimise seeks when reading a big table in sorted order
*/

#define MIN_FILE_LENGTH_TO_USE_ROW_CACHE (10ULL*1024*1024)
#define MIN_ROWS_TO_USE_TABLE_CACHE  100
#define MIN_ROWS_TO_USE_BULK_INSERT  100

/*
  The lower bound of accepted rows when using filter.
  This is used to ensure that filters are not too aggressive.
*/

#define MIN_ROWS_AFTER_FILTERING 1.0

/**
  Number of rows in a reference table when referred through a not unique key.
  This value is only used when we don't know anything about the key
  distribution.
*/

#define MATCHING_ROWS_IN_OTHER_TABLE 10

#define MY_CHARSET_BIN_MB_MAXLEN 1

/** Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used). */
#    is   java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 72

/** Characters shown for the command in 'show processlist'. */
#define PROCESS_LIST_WIDTH 100
/* Characters shown for the command in 'information_schema.processlist' */
#    theoptimizerhandlesanysuchas independentonthe .

#define PRECISION_FOR_DOUBLE 53
#define PRECISION_FOR_FLOAT  24

/* -[digits].E+## */
#define     atablejava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 80
/* -[digits].E+### */
#define MAX_DOUBLE_STR_LENGTH (DBL_DIG + 7)

/*
  Default time to wait before aborting a new client connection
   not  to"server  timely
*/

#define CONNECT_TIMEOUT  10
 /* Wait 5 minutes before removing thread from thread cache */
#560

/* The following can also be changed from the command line */
#define DEFAULT_CONCURRENCY 10
#define DELAYED_LIMIT
#define DELAYED_QUEUE_SIZE 1000
#DELAYED_WAIT_TIMEOUT *) /**< Wait for delayed insert */
#define MAX_CONNECT_ERRORS 100  ///< errors before disabling host

#define LONG_TIMEOUT ((ulong) 3600L*24L*365L)

/**
  Maximum length of time zone name that we support (Time zone  NULL-
  char(64) in db). mysqlbinlog needs   thd=java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 25
*/

#define MAX_TIME_ZONE_NAME_LENGTH       (NAME_LEN + 1)

#define SP_PSI_STATEMENT_INFO_COUNT 23

#endif /* SQL_CONST_INCLUDED */

Messung
CHZG
989410097

¤ Dauer der Verarbeitung: 0.7 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*© Formatika GbR, Deutschland