summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnil Toshniwal <anil.toshniwal@oracle.com>2013-10-17 18:09:04 +0530
committerAnil Toshniwal <anil.toshniwal@oracle.com>2013-10-17 18:09:04 +0530
commitccfd3a0e750664b68fd229bfa22910bf9a68aeb0 (patch)
tree0325a35bb64806c53b6dcd11aca164adea2882aa /include
parentb3d390959bf6269a6e9572816400b18f735835d7 (diff)
downloadmariadb-git-ccfd3a0e750664b68fd229bfa22910bf9a68aeb0.tar.gz
Bug#17513737 INTRODUCE CHECK TABLE...QUICK
--Implemented CHECK TABLE...QUICK. Introduce CHECK TABLE...QUICK that would skip the btr_validate_index() and btr_search_validate() call, and count the no. of records in each index. Approved by Marko and Kevin. (rb#3567).
Diffstat (limited to 'include')
-rw-r--r--include/my_check_opt.h69
-rw-r--r--include/myisam.h47
2 files changed, 70 insertions, 46 deletions
diff --git a/include/my_check_opt.h b/include/my_check_opt.h
new file mode 100644
index 00000000000..7b064f69ef1
--- /dev/null
+++ b/include/my_check_opt.h
@@ -0,0 +1,69 @@
+/* Copyright (c) 2000, 2013, 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 Street, Fifth Floor, Boston, MA 02110-1301, USA */
+
+#ifndef _my_check_opt_h
+#define _my_check_opt_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ All given definitions needed for MyISAM storage engine:
+ myisamchk.c or/and ha_myisam.cc or/and micheck.c
+ Some definitions are needed by the MySQL parser.
+*/
+
+#define T_AUTO_INC (1UL << 0)
+#define T_AUTO_REPAIR (1UL << 1)
+#define T_BACKUP_DATA (1UL << 2)
+#define T_CALC_CHECKSUM (1UL << 3)
+#define T_CHECK (1UL << 4)
+#define T_CHECK_ONLY_CHANGED (1UL << 5)
+#define T_CREATE_MISSING_KEYS (1UL << 6)
+#define T_DESCRIPT (1UL << 7)
+#define T_DONT_CHECK_CHECKSUM (1UL << 8)
+#define T_EXTEND (1UL << 9)
+#define T_FAST (1UL << 10)
+#define T_FORCE_CREATE (1UL << 11)
+#define T_FORCE_UNIQUENESS (1UL << 12)
+#define T_INFO (1UL << 13)
+/** CHECK TABLE...MEDIUM (the default) */
+#define T_MEDIUM (1UL << 14)
+/** CHECK TABLE...QUICK */
+#define T_QUICK (1UL << 15)
+#define T_READONLY (1UL << 16)
+#define T_REP (1UL << 17)
+#define T_REP_BY_SORT (1UL << 18)
+#define T_REP_PARALLEL (1UL << 19)
+#define T_RETRY_WITHOUT_QUICK (1UL << 20)
+#define T_SAFE_REPAIR (1UL << 21)
+#define T_SILENT (1UL << 22)
+#define T_SORT_INDEX (1UL << 23)
+#define T_SORT_RECORDS (1UL << 24)
+#define T_STATISTICS (1UL << 25)
+#define T_UNPACK (1UL << 26)
+#define T_UPDATE_STATE (1UL << 27)
+#define T_VERBOSE (1UL << 28)
+#define T_VERY_SILENT (1UL << 29)
+#define T_WAIT_FOREVER (1UL << 30)
+#define T_WRITE_LOOP (1UL << 31)
+
+#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/include/myisam.h b/include/myisam.h
index dc9eac8f100..bf94fd7d8cd 100644
--- a/include/myisam.h
+++ b/include/myisam.h
@@ -33,7 +33,7 @@ extern "C" {
#endif
#include "my_compare.h"
#include <mysql/plugin.h>
-
+#include <my_check_opt.h>
/*
Limit max keys according to HA_MAX_POSSIBLE_KEY
*/
@@ -312,51 +312,6 @@ extern uint mi_get_pointer_length(ulonglong file_length, uint def);
#define MYISAMCHK_VERIFY 2 /* Verify, run repair if failure */
/*
- Definitions needed for myisamchk.c
-
- Entries marked as "QQ to be removed" are NOT used to
- pass check/repair options to mi_check.c. They are used
- internally by myisamchk.c or/and ha_myisam.cc and should NOT
- be stored together with other flags. They should be removed
- from the following list to make addition of new flags possible.
-*/
-
-#define T_AUTO_INC 1
-#define T_AUTO_REPAIR 2 /* QQ to be removed */
-#define T_BACKUP_DATA 4
-#define T_CALC_CHECKSUM 8
-#define T_CHECK 16 /* QQ to be removed */
-#define T_CHECK_ONLY_CHANGED 32 /* QQ to be removed */
-#define T_CREATE_MISSING_KEYS 64
-#define T_DESCRIPT 128
-#define T_DONT_CHECK_CHECKSUM 256
-#define T_EXTEND 512
-#define T_FAST (1L << 10) /* QQ to be removed */
-#define T_FORCE_CREATE (1L << 11) /* QQ to be removed */
-#define T_FORCE_UNIQUENESS (1L << 12)
-#define T_INFO (1L << 13)
-#define T_MEDIUM (1L << 14)
-#define T_QUICK (1L << 15) /* QQ to be removed */
-#define T_READONLY (1L << 16) /* QQ to be removed */
-#define T_REP (1L << 17)
-#define T_REP_BY_SORT (1L << 18) /* QQ to be removed */
-#define T_REP_PARALLEL (1L << 19) /* QQ to be removed */
-#define T_RETRY_WITHOUT_QUICK (1L << 20)
-#define T_SAFE_REPAIR (1L << 21)
-#define T_SILENT (1L << 22)
-#define T_SORT_INDEX (1L << 23) /* QQ to be removed */
-#define T_SORT_RECORDS (1L << 24) /* QQ to be removed */
-#define T_STATISTICS (1L << 25)
-#define T_UNPACK (1L << 26)
-#define T_UPDATE_STATE (1L << 27)
-#define T_VERBOSE (1L << 28)
-#define T_VERY_SILENT (1L << 29)
-#define T_WAIT_FOREVER (1L << 30)
-#define T_WRITE_LOOP ((ulong) 1L << 31)
-
-#define T_REP_ANY (T_REP | T_REP_BY_SORT | T_REP_PARALLEL)
-
-/*
Flags used by myisamchk.c or/and ha_myisam.cc that are NOT passed
to mi_check.c follows:
*/