diff options
Diffstat (limited to 'sql/unireg.h')
-rw-r--r-- | sql/unireg.h | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/sql/unireg.h b/sql/unireg.h index ccc8a353b3d..1b655a2a0cb 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -1,4 +1,5 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* + Copyright (c) 2000, 2011, 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 @@ -11,7 +12,8 @@ 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-1301 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ /* Extra functions used by unireg library */ @@ -84,6 +86,7 @@ #define PSEUDO_TABLE_BITS (PARAM_TABLE_BIT | OUTER_REF_TABLE_BIT | \ RAND_TABLE_BIT) #define MAX_FIELDS 4096 /* Limit in the .frm file */ +#define MAX_PARTITIONS 1024 #define MAX_SELECT_NESTING (sizeof(nesting_map)*8-1) @@ -108,7 +111,6 @@ #define READ_RECORD_BUFFER (uint) (IO_SIZE*8) /* Pointer_buffer_size */ #define DISK_BUFFER_SIZE (uint) (IO_SIZE*16) /* Size of diskbuffer */ -#define POSTFIX_ERROR DBL_MAX #define ME_INFO (ME_HOLDTANG+ME_OLDWIN+ME_NOREFRESH) #define ME_ERROR (ME_BELL+ME_OLDWIN+ME_NOREFRESH) @@ -129,8 +131,8 @@ #define SPECIAL_LOG_QUERIES_NOT_USING_INDEXES 4096 /* Obsolete */ /* Extern defines */ -#define store_record(A,B) bmove_align((A)->B,(A)->record[0],(size_t) (A)->s->reclength) -#define restore_record(A,B) bmove_align((A)->record[0],(A)->B,(size_t) (A)->s->reclength) +#define store_record(A,B) memcpy((A)->B,(A)->record[0],(size_t) (A)->s->reclength) +#define restore_record(A,B) memcpy((A)->record[0],(A)->B,(size_t) (A)->s->reclength) #define cmp_record(A,B) memcmp((A)->record[0],(A)->B,(size_t) (A)->s->reclength) #define empty_record(A) { \ restore_record((A),s->default_values); \ @@ -152,14 +154,48 @@ #define DONT_GIVE_ERROR 256 /* Don't do frm_error on openfrm */ #define READ_SCREENS 1024 /* Read screens, info and helpfile */ #define DELAYED_OPEN 4096 /* Open table later */ -#define NO_ERR_ON_NEW_FRM 8192 /* stop error sending on new format */ +#define OPEN_VIEW 8192 /* Allow open on view */ #define OPEN_VIEW_NO_PARSE 16384 /* Open frm only if it's a view, but do not parse view itself */ +/** + This flag is used in function get_all_tables() which fills + I_S tables with data which are retrieved from frm files and storage engine + The flag means that we need to open FRM file only to get necessary data. +*/ +#define OPEN_FRM_FILE_ONLY 32768 +/** + This flag is used in function get_all_tables() which fills + I_S tables with data which are retrieved from frm files and storage engine + The flag means that we need to process tables only to get necessary data. + Views are not processed. +*/ +#define OPEN_TABLE_ONLY OPEN_FRM_FILE_ONLY*2 +/** + This flag is used in function get_all_tables() which fills + I_S tables with data which are retrieved from frm files and storage engine + The flag means that we need to process views only to get necessary data. + Tables are not processed. +*/ +#define OPEN_VIEW_ONLY OPEN_TABLE_ONLY*2 +/** + This flag is used in function get_all_tables() which fills + I_S tables with data which are retrieved from frm files and storage engine. + The flag means that we need to open a view using + open_normal_and_derived_tables() function. +*/ +#define OPEN_VIEW_FULL OPEN_VIEW_ONLY*2 +/** + This flag is used in function get_all_tables() which fills + I_S tables with data which are retrieved from frm files and storage engine. + The flag means that I_S table uses optimization algorithm. +*/ +#define OPTIMIZE_I_S_TABLE OPEN_VIEW_FULL*2 + #define SC_INFO_LENGTH 4 /* Form format constant */ #define TE_INFO_LENGTH 3 #define MTYP_NOEMPTY_BIT 128 -#define FRM_VER_TRUE_VARCHAR (FRM_VER+4) +#define FRM_VER_TRUE_VARCHAR (FRM_VER+4) /* 10 */ /* Minimum length pattern before Turbo Boyer-Moore is used for SELECT "text" LIKE "%pattern%", excluding the two |