[Commits] 82d3837: Merge InnoDB from MySQL 5.7.14.

Jan Lindström jan.lindstrom at mariadb.com
Mon Sep 5 18:33:30 EEST 2016


revision-id: 82d383787f4a3a983765793b54a97375e5ecb648 (mariadb-10.2.1-5-g82d3837)
parent(s): 1dd460d9267681c5b49eb5c98ce70f4ba06d4110 3e1132022491dfe276a93069ce38ab4c31779db7
committer: Jan Lindström
timestamp: 2016-09-05 18:33:00 +0300
message:

Merge InnoDB from MySQL 5.7.14.


 include/my_base.h                                  |   12 +-
 include/my_handler_errors.h                        |   12 +-
 mysql-test/suite/innodb/disabled.def               |    2 -
 .../suite/innodb/r/innodb-corrupted-table.result   |    3 -
 mysql-test/suite/innodb/r/innodb-index.result      |    4 +-
 mysql-test/suite/innodb/r/innodb-mdev-7513.result  |    2 +
 .../suite/innodb/r/innodb-wl5522-debug-zip.result  |    3 +-
 mysql-test/suite/innodb/r/innodb-wl5522-zip.result |    2 +-
 mysql-test/suite/innodb/r/innodb.result            |    2 +-
 mysql-test/suite/innodb/t/innodb-mdev-7513.test    |    4 +
 .../suite/innodb/t/innodb-wl5522-debug-zip.test    |    1 +
 mysql-test/suite/innodb/t/innodb.test              |    2 +-
 mysql-test/t/row-checksum.opt                      |    1 +
 sql/handler.cc                                     |   10 +
 sql/share/errmsg-utf8.txt                          |   18 +
 storage/innobase/CMakeLists.txt                    |  405 +--
 storage/innobase/api/api0api.cc                    |   24 +-
 storage/innobase/api/api0misc.cc                   |   64 +-
 storage/innobase/btr/btr0btr.cc                    |  186 +-
 storage/innobase/btr/btr0bulk.cc                   |   37 +-
 storage/innobase/btr/btr0cur.cc                    |  230 +-
 storage/innobase/btr/btr0defragment.cc             |   27 +-
 storage/innobase/btr/btr0scrub.cc                  |    5 +-
 storage/innobase/btr/btr0sea.cc                    |   26 +-
 storage/innobase/buf/buf0buf.cc                    |  386 ++-
 storage/innobase/buf/buf0checksum.cc               |    6 +-
 storage/innobase/buf/buf0dblwr.cc                  |   13 +-
 storage/innobase/buf/buf0dump.cc                   |   44 +-
 storage/innobase/buf/buf0flu.cc                    |  176 +-
 storage/innobase/buf/buf0lru.cc                    |   57 +-
 storage/innobase/buf/buf0mtflu.cc                  |    2 +-
 storage/innobase/buf/buf0rea.cc                    |   13 +-
 storage/innobase/data/data0data.cc                 |    3 +-
 storage/innobase/dict/dict0boot.cc                 |    2 +-
 storage/innobase/dict/dict0crea.cc                 |  203 +-
 storage/innobase/dict/dict0defrag_bg.cc            |  403 +++
 storage/innobase/dict/dict0dict.cc                 |  318 ++-
 storage/innobase/dict/dict0load.cc                 |  280 +-
 storage/innobase/dict/dict0mem.cc                  |  285 +-
 storage/innobase/dict/dict0stats.cc                |  149 +-
 storage/innobase/dict/dict0stats_bg.cc             |  274 +-
 storage/innobase/fil/fil0crypt.cc                  |    2 +-
 storage/innobase/fil/fil0fil.cc                    | 1085 +++++---
 storage/innobase/fsp/fsp0file.cc                   |  132 +-
 storage/innobase/fsp/fsp0fsp.cc                    |  607 +++-
 storage/innobase/fsp/fsp0space.cc                  |   30 +-
 storage/innobase/fsp/fsp0sysspace.cc               |   27 +-
 storage/innobase/fts/fts0ast.cc                    |   34 +-
 storage/innobase/fts/fts0fts.cc                    |  103 +-
 storage/innobase/fts/fts0opt.cc                    |   54 +-
 storage/innobase/fts/fts0que.cc                    |   63 +-
 storage/innobase/gis/gis0rtree.cc                  |  139 +-
 storage/innobase/gis/gis0sea.cc                    |  123 +-
 storage/innobase/handler/ha_innodb.cc              | 2912 ++++++++++++--------
 storage/innobase/handler/ha_innodb.h               |  661 +++--
 storage/innobase/handler/ha_innopart.cc            |  245 +-
 storage/innobase/handler/ha_innopart.h             |   22 +-
 storage/innobase/handler/handler0alter.cc          | 1441 ++++++++--
 storage/innobase/handler/i_s.cc                    |  461 ++--
 storage/innobase/ibuf/ibuf0ibuf.cc                 |   69 +-
 storage/innobase/include/api0api.h                 |    9 +-
 storage/innobase/include/btr0btr.h                 |   47 +-
 storage/innobase/include/btr0bulk.h                |    2 +-
 storage/innobase/include/btr0sea.h                 |    7 +
 storage/innobase/include/btr0sea.ic                |    6 +-
 storage/innobase/include/btr0types.h               |    2 +-
 storage/innobase/include/buf0buf.h                 |   65 +-
 storage/innobase/include/buf0buf.ic                |   71 +-
 storage/innobase/include/buf0checksum.h            |    7 +-
 storage/innobase/include/buf0dblwr.h               |    4 +-
 storage/innobase/include/buf0flu.h                 |   29 +-
 storage/innobase/include/buf0rea.h                 |    7 -
 storage/innobase/include/data0data.h               |   38 +-
 storage/innobase/include/data0data.ic              |   31 +-
 storage/innobase/include/db0err.h                  |   13 +-
 storage/innobase/include/dict0crea.h               |   14 +
 storage/innobase/include/dict0defrag_bg.h          |   93 +
 storage/innobase/include/dict0dict.h               |  137 +-
 storage/innobase/include/dict0dict.ic              |  101 +-
 storage/innobase/include/dict0load.h               |   10 +-
 storage/innobase/include/dict0mem.h                |  185 +-
 storage/innobase/include/dict0stats.h              |   36 +
 storage/innobase/include/dict0stats_bg.h           |   46 +-
 storage/innobase/include/dict0types.h              |   29 +-
 storage/innobase/include/dyn0buf.h                 |   22 +-
 storage/innobase/include/fil0crypt.ic              |    2 +-
 storage/innobase/include/fil0fil.h                 |  472 ++--
 storage/innobase/include/fsp0file.h                |   42 +-
 storage/innobase/include/fsp0fsp.h                 |  117 +-
 storage/innobase/include/fsp0fsp.ic                |   27 +-
 storage/innobase/include/fsp0space.h               |   21 +-
 storage/innobase/include/fsp0sysspace.h            |   24 +-
 storage/innobase/include/fsp0types.h               |   30 +-
 storage/innobase/include/fts0ast.h                 |    7 +
 storage/innobase/include/fts0fts.h                 |   95 +-
 storage/innobase/include/fts0priv.h                |   56 +-
 storage/innobase/include/fts0priv.ic               |   17 +-
 storage/innobase/include/fut0fut.h                 |    4 +-
 storage/innobase/include/gis0rtree.h               |   21 +-
 storage/innobase/include/ha0ha.h                   |    2 +-
 storage/innobase/include/ha_prototypes.h           |   16 +-
 storage/innobase/include/ibuf0ibuf.h               |    8 +-
 storage/innobase/include/lock0lock.h               |   48 +-
 storage/innobase/include/lock0prdt.h               |   23 +-
 storage/innobase/include/lock0priv.h               |   75 +-
 storage/innobase/include/log0log.h                 |   72 +-
 storage/innobase/include/log0log.ic                |    7 +-
 storage/innobase/include/log0recv.h                |   16 +-
 storage/innobase/include/mach0data.h               |   29 +-
 storage/innobase/include/mach0data.ic              |    2 +-
 storage/innobase/include/mem0mem.h                 |    2 +-
 storage/innobase/include/mem0mem.ic                |    2 +-
 storage/innobase/include/mtr0log.ic                |   24 +-
 storage/innobase/include/mtr0mtr.h                 |   44 +-
 storage/innobase/include/mtr0mtr.ic                |    2 +-
 storage/innobase/include/os0atomic.h               |   52 +-
 storage/innobase/include/os0atomic.ic              |   11 +-
 storage/innobase/include/os0file.h                 |  358 ++-
 storage/innobase/include/os0file.ic                |   11 +-
 storage/innobase/include/os0thread.h               |    9 +-
 storage/innobase/include/page0cur.h                |    3 +-
 storage/innobase/include/page0page.h               |   24 +-
 storage/innobase/include/page0types.h              |   15 +-
 storage/innobase/include/page0zip.h                |   52 +-
 storage/innobase/include/page0zip.ic               |    3 +-
 storage/innobase/include/pars0pars.h               |   18 +-
 storage/innobase/include/que0que.h                 |   16 +-
 storage/innobase/include/read0read.h               |    2 +-
 storage/innobase/include/read0types.h              |    4 +-
 storage/innobase/include/rem0cmp.h                 |   21 +-
 storage/innobase/include/rem0rec.h                 |   81 +-
 storage/innobase/include/rem0rec.ic                |    2 +-
 storage/innobase/include/row0ins.h                 |    8 +-
 storage/innobase/include/row0log.h                 |   17 +-
 storage/innobase/include/row0merge.h               |   86 +-
 storage/innobase/include/row0mysql.h               |   72 +-
 storage/innobase/include/row0purge.h               |    2 +-
 storage/innobase/include/row0row.h                 |   10 +-
 storage/innobase/include/row0sel.h                 |    9 +-
 storage/innobase/include/row0umod.h                |    2 +-
 storage/innobase/include/row0undo.h                |    4 +-
 storage/innobase/include/row0upd.h                 |   62 +-
 storage/innobase/include/row0vers.h                |    9 +-
 storage/innobase/include/srv0mon.h                 |    2 +-
 storage/innobase/include/srv0srv.h                 |   34 +-
 storage/innobase/include/srv0start.h               |   11 +
 storage/innobase/include/sync0arr.h                |    6 +-
 storage/innobase/include/sync0rw.h                 |   14 +-
 storage/innobase/include/sync0sync.h               |    5 +-
 storage/innobase/include/sync0types.h              |    7 +-
 storage/innobase/include/trx0rec.h                 |    4 +
 storage/innobase/include/trx0rseg.h                |    7 +-
 storage/innobase/include/trx0sys.h                 |   21 +-
 storage/innobase/include/trx0sys.ic                |    8 +-
 storage/innobase/include/trx0trx.h                 |   62 +-
 storage/innobase/include/trx0types.h               |    2 +-
 storage/innobase/include/trx0undo.h                |   11 +-
 storage/innobase/include/univ.i                    |   46 +-
 storage/innobase/include/ut0counter.h              |    8 +-
 storage/innobase/include/ut0crc32.h                |    2 +-
 storage/innobase/include/ut0dbg.h                  |    2 +-
 storage/innobase/include/ut0lst.h                  |    1 -
 storage/innobase/include/ut0mem.h                  |    2 +-
 storage/innobase/include/ut0new.h                  |   11 +-
 storage/innobase/include/ut0rnd.h                  |    2 +-
 storage/innobase/include/ut0rnd.ic                 |    2 +-
 storage/innobase/include/ut0ut.h                   |   35 +-
 storage/innobase/include/ut0wqueue.h               |    1 -
 storage/innobase/innodb.cmake                      |  254 +-
 storage/innobase/lock/lock0lock.cc                 |  945 +++----
 storage/innobase/lock/lock0prdt.cc                 |   33 +-
 storage/innobase/lock/lock0wait.cc                 |   14 +-
 storage/innobase/log/log0crypt.cc                  |    2 -
 storage/innobase/log/log0log.cc                    |  336 ++-
 storage/innobase/log/log0recv.cc                   |  847 +++++-
 storage/innobase/mtr/mtr0log.cc                    |   14 +-
 storage/innobase/mtr/mtr0mtr.cc                    |  193 +-
 storage/innobase/os/os0file.cc                     | 1238 +++++++--
 storage/innobase/os/os0sync.cc                     |  935 -------
 storage/innobase/os/os0thread.cc                   |   15 +-
 storage/innobase/page/page0zip.cc                  |   87 +-
 storage/innobase/pars/lexyy.cc                     |    2 +-
 storage/innobase/pars/pars0pars.cc                 |   21 +-
 storage/innobase/que/que0que.cc                    |   19 +-
 storage/innobase/rem/rem0cmp.cc                    |   58 +-
 storage/innobase/rem/rem0rec.cc                    |   15 +-
 storage/innobase/row/row0ftsort.cc                 |   30 +-
 storage/innobase/row/row0import.cc                 |  303 +-
 storage/innobase/row/row0ins.cc                    |  160 +-
 storage/innobase/row/row0log.cc                    |   51 +-
 storage/innobase/row/row0merge.cc                  |  252 +-
 storage/innobase/row/row0mysql.cc                  |  239 +-
 storage/innobase/row/row0purge.cc                  |   33 +
 storage/innobase/row/row0quiesce.cc                |  245 +-
 storage/innobase/row/row0row.cc                    |   16 +-
 storage/innobase/row/row0sel.cc                    |   82 +-
 storage/innobase/row/row0trunc.cc                  |   64 +-
 storage/innobase/row/row0uins.cc                   |    2 +-
 storage/innobase/row/row0umod.cc                   |   30 -
 storage/innobase/row/row0undo.cc                   |    2 +-
 storage/innobase/row/row0upd.cc                    |  313 ++-
 storage/innobase/row/row0vers.cc                   |  242 +-
 storage/innobase/srv/srv0conc.cc                   |   13 +
 storage/innobase/srv/srv0mon.cc                    |    7 +-
 storage/innobase/srv/srv0srv.cc                    |  166 +-
 storage/innobase/srv/srv0start.cc                  |  134 +-
 storage/innobase/sync/sync0arr.cc                  |   26 +-
 storage/innobase/sync/sync0debug.cc                |   22 +-
 storage/innobase/sync/sync0rw.cc                   |   46 +-
 storage/innobase/sync/sync0sync.cc                 |   10 +-
 storage/innobase/trx/trx0i_s.cc                    |    1 -
 storage/innobase/trx/trx0purge.cc                  |   13 +-
 storage/innobase/trx/trx0rec.cc                    |  161 +-
 storage/innobase/trx/trx0roll.cc                   |   18 +-
 storage/innobase/trx/trx0rseg.cc                   |   30 +-
 storage/innobase/trx/trx0sys.cc                    |  225 +-
 storage/innobase/trx/trx0trx.cc                    |  226 +-
 storage/innobase/trx/trx0undo.cc                   |   21 +-
 storage/innobase/ut/ut0crc32.cc                    |    2 +-
 storage/innobase/ut/ut0dbg.cc                      |    6 +-
 storage/innobase/ut/ut0new.cc                      |    4 +-
 storage/innobase/ut/ut0rnd.cc                      |    2 +-
 storage/innobase/ut/ut0ut.cc                       |   34 +-
 storage/innobase/ut/ut0wqueue.cc                   |    1 -
 storage/xtradb/Doxyfile                            |   19 +-
 storage/xtradb/dyn/dyn0dyn.cc                      |   66 -
 226 files changed, 15258 insertions(+), 8580 deletions(-)

diff --cc include/my_base.h
index 1317639,0000000..74be00f
mode 100644,000000..100644
--- a/include/my_base.h
+++ b/include/my_base.h
@@@ -1,648 -1,0 +1,658 @@@
 +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
 +   Copyright (c) 1995, 2012 Monty Program Ab
 +
 +   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, Suite 500, Boston, MA 02110-1335 USA */
 +
 +
 +/* This file includes constants used with all databases */
 +
 +#ifndef _my_base_h
 +#define _my_base_h
 +
 +#include <my_global.h>
 +#include <my_dir.h>			/* This includes types */
 +#include <my_sys.h>
 +#include <m_string.h>
 +#include <errno.h>
 +
 +#ifndef EOVERFLOW
 +#define EOVERFLOW 84
 +#endif
 +
 +#include <my_list.h>
 +
 +/* The following is bits in the flag parameter to ha_open() */
 +
 +#define HA_OPEN_ABORT_IF_LOCKED		0	/* default */
 +#define HA_OPEN_WAIT_IF_LOCKED		1
 +#define HA_OPEN_IGNORE_IF_LOCKED	2
 +#define HA_OPEN_TMP_TABLE		4	/* Table is a temp table */
 +#define HA_OPEN_DELAY_KEY_WRITE		8	/* Don't update index  */
 +#define HA_OPEN_ABORT_IF_CRASHED	16
 +#define HA_OPEN_FOR_REPAIR		32	/* open even if crashed */
 +#define HA_OPEN_FROM_SQL_LAYER          64
 +#define HA_OPEN_MMAP                    128     /* open memory mapped */
 +#define HA_OPEN_COPY			256     /* Open copy (for repair) */
 +/* Internal temp table, used for temporary results */
 +#define HA_OPEN_INTERNAL_TABLE          512
 +#define HA_OPEN_NO_PSI_CALL             1024    /* Don't call/connect PSI */
 +#define HA_OPEN_MERGE_TABLE		2048
 +/*
 +  Allow opening even if table is incompatible as this is for ALTER TABLE which
 +  will fix the table structure.
 +*/
 +#define HA_OPEN_FOR_ALTER		4096
 +
 +/* The following is parameter to ha_rkey() how to use key */
 +
 +/*
 +  We define a complete-field prefix of a key value as a prefix where
 +  the last included field in the prefix contains the full field, not
 +  just some bytes from the start of the field. A partial-field prefix
 +  is allowed to contain only a few first bytes from the last included
 +  field.
 +
 +  Below HA_READ_KEY_EXACT, ..., HA_READ_BEFORE_KEY can take a
 +  complete-field prefix of a key value as the search
 +  key. HA_READ_PREFIX and HA_READ_PREFIX_LAST could also take a
 +  partial-field prefix, but currently (4.0.10) they are only used with
 +  complete-field prefixes. MySQL uses a padding trick to implement
 +  LIKE 'abc%' queries.
 +
 +  NOTE that in InnoDB HA_READ_PREFIX_LAST will NOT work with a
 +  partial-field prefix because InnoDB currently strips spaces from the
 +  end of varchar fields!
 +*/
 +
 +enum ha_rkey_function {
 +  HA_READ_KEY_EXACT,              /* Find first record else error */
 +  HA_READ_KEY_OR_NEXT,            /* Record or next record */
 +  HA_READ_KEY_OR_PREV,            /* Record or previous */
 +  HA_READ_AFTER_KEY,              /* Find next rec. after key-record */
 +  HA_READ_BEFORE_KEY,             /* Find next rec. before key-record */
 +  HA_READ_PREFIX,                 /* Key which as same prefix */
 +  HA_READ_PREFIX_LAST,            /* Last key with the same prefix */
 +  HA_READ_PREFIX_LAST_OR_PREV,    /* Last or prev key with the same prefix */
 +  HA_READ_MBR_CONTAIN,
 +  HA_READ_MBR_INTERSECT,
 +  HA_READ_MBR_WITHIN,
 +  HA_READ_MBR_DISJOINT,
 +  HA_READ_MBR_EQUAL
 +};
 +
 +	/* Key algorithm types */
 +
 +enum ha_key_alg {
 +  HA_KEY_ALG_UNDEF=	0,		/* Not specified (old file) */
 +  HA_KEY_ALG_BTREE=	1,		/* B-tree, default one          */
 +  HA_KEY_ALG_RTREE=	2,		/* R-tree, for spatial searches */
 +  HA_KEY_ALG_HASH=	3,		/* HASH keys (HEAP tables) */
 +  HA_KEY_ALG_FULLTEXT=	4		/* FULLTEXT (MyISAM tables) */
 +};
 +
 +        /* Storage media types */ 
 +
 +enum ha_storage_media {
 +  HA_SM_DEFAULT=        0,		/* Not specified (engine default) */
 +  HA_SM_DISK=           1,		/* DISK storage */
 +  HA_SM_MEMORY=         2		/* MAIN MEMORY storage */
 +};
 +
 +	/* The following is parameter to ha_extra() */
 +
 +enum ha_extra_function {
 +  HA_EXTRA_NORMAL=0,			/* Optimize for space (def) */
 +  HA_EXTRA_QUICK=1,			/* Optimize for speed */
 +  HA_EXTRA_NOT_USED=2,			/* Should be ignored by handler */
 +  HA_EXTRA_CACHE=3,			/* Cache record in HA_rrnd() */
 +  HA_EXTRA_NO_CACHE=4,			/* End caching of records (def) */
 +  HA_EXTRA_NO_READCHECK=5,		/* No readcheck on update */
 +  HA_EXTRA_READCHECK=6,			/* Use readcheck (def) */
 +  HA_EXTRA_KEYREAD=7,			/* Read only key to database */
 +  HA_EXTRA_NO_KEYREAD=8,		/* Normal read of records (def) */
 +  HA_EXTRA_NO_USER_CHANGE=9,		/* No user is allowed to write */
 +  HA_EXTRA_KEY_CACHE=10,
 +  HA_EXTRA_NO_KEY_CACHE=11,
 +  HA_EXTRA_WAIT_LOCK=12,		/* Wait until file is avalably (def) */
 +  HA_EXTRA_NO_WAIT_LOCK=13,		/* If file is locked, return quickly */
 +  HA_EXTRA_WRITE_CACHE=14,		/* Use write cache in ha_write() */
 +  HA_EXTRA_FLUSH_CACHE=15,		/* flush write_record_cache */
 +  HA_EXTRA_NO_KEYS=16,			/* Remove all update of keys */
 +  HA_EXTRA_KEYREAD_CHANGE_POS=17,	/* Keyread, but change pos */
 +					/* xxxxchk -r must be used */
 +  HA_EXTRA_REMEMBER_POS=18,		/* Remember pos for next/prev */
 +  HA_EXTRA_RESTORE_POS=19,
 +  HA_EXTRA_REINIT_CACHE=20,		/* init cache from current record */
 +  HA_EXTRA_FORCE_REOPEN=21,		/* Datafile have changed on disk */
 +  HA_EXTRA_FLUSH,			/* Flush tables to disk */
 +  HA_EXTRA_NO_ROWS,			/* Don't write rows */
 +  HA_EXTRA_RESET_STATE,			/* Reset positions */
 +  HA_EXTRA_IGNORE_DUP_KEY,		/* Dup keys don't rollback everything*/
 +  HA_EXTRA_NO_IGNORE_DUP_KEY,
 +  HA_EXTRA_PREPARE_FOR_DROP,
 +  HA_EXTRA_PREPARE_FOR_UPDATE,		/* Remove read cache if problems */
 +  HA_EXTRA_PRELOAD_BUFFER_SIZE,         /* Set buffer size for preloading */
 +  /*
 +    On-the-fly switching between unique and non-unique key inserting.
 +  */
 +  HA_EXTRA_CHANGE_KEY_TO_UNIQUE,
 +  HA_EXTRA_CHANGE_KEY_TO_DUP,
 +  /*
 +    When using HA_EXTRA_KEYREAD, overwrite only key member fields and keep 
 +    other fields intact. When this is off (by default) InnoDB will use memcpy
 +    to overwrite entire row.
 +  */
 +  HA_EXTRA_KEYREAD_PRESERVE_FIELDS,
 +  HA_EXTRA_MMAP,
 +  /*
 +    Ignore if the a tuple is not found, continue processing the
 +    transaction and ignore that 'row'.  Needed for idempotency
 +    handling on the slave
 +  */
 +  HA_EXTRA_IGNORE_NO_KEY,
 +  HA_EXTRA_NO_IGNORE_NO_KEY,
 +  /*
 +    Mark the table as a log table. For some handlers (e.g. CSV) this results
 +    in a special locking for the table.
 +  */
 +  HA_EXTRA_MARK_AS_LOG_TABLE,
 +  /*
 +    Informs handler that write_row() which tries to insert new row into the
 +    table and encounters some already existing row with same primary/unique
 +    key can replace old row with new row instead of reporting error (basically
 +    it informs handler that we do REPLACE instead of simple INSERT).
 +    Off by default.
 +  */
 +  HA_EXTRA_WRITE_CAN_REPLACE,
 +  HA_EXTRA_WRITE_CANNOT_REPLACE,
 +  /*
 +    Inform handler that delete_row()/update_row() cannot batch deletes/updates
 +    and should perform them immediately. This may be needed when table has 
 +    AFTER DELETE/UPDATE triggers which access to subject table.
 +    These flags are reset by the handler::extra(HA_EXTRA_RESET) call.
 +  */
 +  HA_EXTRA_DELETE_CANNOT_BATCH,
 +  HA_EXTRA_UPDATE_CANNOT_BATCH,
 +  /*
 +    Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be
 +    executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
 +  */
 +  HA_EXTRA_INSERT_WITH_UPDATE,
 +  /* Inform handler that we will do a rename */
 +  HA_EXTRA_PREPARE_FOR_RENAME,
 +  /*
 +    Special actions for MERGE tables.
 +  */
 +  HA_EXTRA_ADD_CHILDREN_LIST,
 +  HA_EXTRA_ATTACH_CHILDREN,
 +  HA_EXTRA_IS_ATTACHED_CHILDREN,
 +  HA_EXTRA_DETACH_CHILDREN,
 +  HA_EXTRA_DETACH_CHILD,
 +  /* Inform handler we will force a close as part of flush */
 +  HA_EXTRA_PREPARE_FOR_FORCED_CLOSE
 +};
 +
 +/* Compatible option, to be deleted in 6.0 */
 +#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP
 +
 +	/* The following is parameter to ha_panic() */
 +
 +enum ha_panic_function {
 +  HA_PANIC_CLOSE,			/* Close all databases */
 +  HA_PANIC_WRITE,			/* Unlock and write status */
 +  HA_PANIC_READ				/* Lock and read keyinfo */
 +};
 +
 +	/* The following is parameter to ha_create(); keytypes */
 +
 +enum ha_base_keytype {
 +  HA_KEYTYPE_END=0,
 +  HA_KEYTYPE_TEXT=1,			/* Key is sorted as letters */
 +  HA_KEYTYPE_BINARY=2,			/* Key is sorted as unsigned chars */
 +  HA_KEYTYPE_SHORT_INT=3,
 +  HA_KEYTYPE_LONG_INT=4,
 +  HA_KEYTYPE_FLOAT=5,
 +  HA_KEYTYPE_DOUBLE=6,
 +  HA_KEYTYPE_NUM=7,			/* Not packed num with pre-space */
 +  HA_KEYTYPE_USHORT_INT=8,
 +  HA_KEYTYPE_ULONG_INT=9,
 +  HA_KEYTYPE_LONGLONG=10,
 +  HA_KEYTYPE_ULONGLONG=11,
 +  HA_KEYTYPE_INT24=12,
 +  HA_KEYTYPE_UINT24=13,
 +  HA_KEYTYPE_INT8=14,
 +  /* Varchar (0-255 bytes) with length packed with 1 byte */
 +  HA_KEYTYPE_VARTEXT1=15,               /* Key is sorted as letters */
 +  HA_KEYTYPE_VARBINARY1=16,             /* Key is sorted as unsigned chars */
 +  /* Varchar (0-65535 bytes) with length packed with 2 bytes */
 +  HA_KEYTYPE_VARTEXT2=17,		/* Key is sorted as letters */
 +  HA_KEYTYPE_VARBINARY2=18,		/* Key is sorted as unsigned chars */
 +  HA_KEYTYPE_BIT=19
 +};
 +
 +#define HA_MAX_KEYTYPE	31		/* Must be log2-1 */
 +
 +/*
 +  These flags kan be OR:ed to key-flag
 +  Note that these can only be up to 16 bits!
 +*/
 +
 +#define HA_NOSAME		 1	/* Set if not dupplicated records */
 +#define HA_PACK_KEY		 2	/* Pack string key to previous key */
 +#define HA_AUTO_KEY		 16
 +#define HA_BINARY_PACK_KEY	 32	/* Packing of all keys to prev key */
 +#define HA_FULLTEXT		128     /* For full-text search */
 +#define HA_UNIQUE_CHECK		256	/* Check the key for uniqueness */
 +#define HA_SPATIAL		1024    /* For spatial search */
 +#define HA_NULL_ARE_EQUAL	2048	/* NULL in key are cmp as equal */
 +#define HA_GENERATED_KEY	8192	/* Automaticly generated key */
 +
 +        /* The combination of the above can be used for key type comparison. */
 +#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
 +                         HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
 +                         HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
 +
 +/*
 +  Key contains partial segments.
 +
 +  This flag is internal to the MySQL server by design. It is not supposed
 +  neither to be saved in FRM-files, nor to be passed to storage engines.
 +  It is intended to pass information into internal static sort_keys(KEY *,
 +  KEY *) function.
 +
 +  This flag can be calculated -- it's based on key lengths comparison.
 +*/
 +#define HA_KEY_HAS_PART_KEY_SEG 65536
 +
 +	/* Automatic bits in key-flag */
 +
 +#define HA_SPACE_PACK_USED	 4	/* Test for if SPACE_PACK used */
 +#define HA_VAR_LENGTH_KEY	 8
 +#define HA_NULL_PART_KEY	 64
 +#define HA_USES_COMMENT          4096
 +#define HA_USES_PARSER           16384  /* Fulltext index uses [pre]parser */
 +#define HA_USES_BLOCK_SIZE	 ((uint) 32768)
 +#define HA_SORT_ALLOWS_SAME      512    /* Intern bit when sorting records */
 +
 +/* This flag can be used only in KEY::ext_key_flags */
 +#define HA_EXT_NOSAME            131072
 +
 +	/* These flags can be added to key-seg-flag */
 +
 +#define HA_SPACE_PACK		 1	/* Pack space in key-seg */
 +#define HA_PART_KEY_SEG		 4	/* Used by MySQL for part-key-cols */
 +#define HA_VAR_LENGTH_PART	 8
 +#define HA_NULL_PART		 16
 +#define HA_BLOB_PART		 32
 +#define HA_SWAP_KEY		 64
 +#define HA_REVERSE_SORT		 128	/* Sort key in reverse order */
 +#define HA_NO_SORT               256 /* do not bother sorting on this keyseg */
 +
 +#define HA_BIT_PART		1024
 +#define HA_CAN_MEMCMP           2048 /* internal, never stored in frm */
 +
 +	/* optionbits for database */
 +#define HA_OPTION_PACK_RECORD		1
 +#define HA_OPTION_PACK_KEYS		2
 +#define HA_OPTION_COMPRESS_RECORD	4
 +#define HA_OPTION_LONG_BLOB_PTR		8 /* new ISAM format */
 +#define HA_OPTION_TMP_TABLE		16
 +#define HA_OPTION_CHECKSUM		32
 +#define HA_OPTION_DELAY_KEY_WRITE	64
 +#define HA_OPTION_NO_PACK_KEYS		128  /* Reserved for MySQL */
 +/* unused                               256 */
 +#define HA_OPTION_RELIES_ON_SQL_LAYER   512
 +#define HA_OPTION_NULL_FIELDS		1024
 +#define HA_OPTION_PAGE_CHECKSUM		2048
 +/*
 +   STATS_PERSISTENT=1 has been specified in the SQL command (either CREATE
 +   or ALTER TABLE). Table and index statistics that are collected by the
 +   storage engine and used by the optimizer for query optimization will be
 +   stored on disk and will not change after a server restart.
 +*/
 +#define HA_OPTION_STATS_PERSISTENT	4096
 +/*
 +  STATS_PERSISTENT=0 has been specified in CREATE/ALTER TABLE. Statistics
 +  for the table will be wiped away on server shutdown and new ones recalculated
 +  after the server is started again. If none of HA_OPTION_STATS_PERSISTENT or
 +  HA_OPTION_NO_STATS_PERSISTENT is set, this means that the setting is not
 +  explicitly set at table level and the corresponding table will use whatever
 +  is the global server default.
 +*/
 +#define HA_OPTION_NO_STATS_PERSISTENT	8192
 +
 +/* .frm has extra create options in linked-list format */
 +#define HA_OPTION_TEXT_CREATE_OPTIONS_legacy (1L << 14) /* 5.2 to 5.5, unused since 10.0 */
 +#define HA_OPTION_TEMP_COMPRESS_RECORD  (1L << 15)      /* set by isamchk */
 +#define HA_OPTION_READ_ONLY_DATA        (1L << 16)      /* Set by isamchk */
 +#define HA_OPTION_NO_CHECKSUM           (1L << 17)
 +#define HA_OPTION_NO_DELAY_KEY_WRITE    (1L << 18)
 +
 +	/* Bits in flag to create() */
 +
 +#define HA_DONT_TOUCH_DATA	1	/* Don't empty datafile (isamchk) */
 +#define HA_PACK_RECORD		2	/* Request packed record format */
 +#define HA_CREATE_TMP_TABLE	4
 +#define HA_CREATE_CHECKSUM	8
 +#define HA_CREATE_KEEP_FILES	16      /* don't overwrite .MYD and MYI */
 +#define HA_CREATE_PAGE_CHECKSUM	32
 +#define HA_CREATE_DELAY_KEY_WRITE 64
 +#define HA_CREATE_RELIES_ON_SQL_LAYER 128
 +#define HA_CREATE_INTERNAL_TABLE 256
 +#define HA_PRESERVE_INSERT_ORDER 512
 +
 +/* Flags used by start_bulk_insert */
 +
 +#define HA_CREATE_UNIQUE_INDEX_BY_SORT   1
 +
 +
 +/*
 +  The following flags (OR-ed) are passed to handler::info() method.
 +  The method copies misc handler information out of the storage engine
 +  to data structures accessible from MySQL
 +
 +  Same flags are also passed down to mi_status, myrg_status, etc.
 +*/
 +
 +/* this one is not used */
 +#define HA_STATUS_POS            1
 +/*
 +  assuming the table keeps shared actual copy of the 'info' and
 +  local, possibly outdated copy, the following flag means that
 +  it should not try to get the actual data (locking the shared structure)
 +  slightly outdated version will suffice
 +*/
 +#define HA_STATUS_NO_LOCK        2
 +/* update the time of the last modification (in handler::update_time) */
 +#define HA_STATUS_TIME           4
 +/*
 +  update the 'constant' part of the info:
 +  handler::max_data_file_length, max_index_file_length, create_time
 +  sortkey, ref_length, block_size, data_file_name, index_file_name.
 +  handler::table->s->keys_in_use, keys_for_keyread, rec_per_key
 +*/
 +#define HA_STATUS_CONST          8
 +/*
 +  update the 'variable' part of the info:
 +  handler::records, deleted, data_file_length, index_file_length,
 +  check_time, mean_rec_length
 +*/
 +#define HA_STATUS_VARIABLE      16
 +/*
 +  get the information about the key that caused last duplicate value error
 +  update handler::errkey and handler::dupp_ref
 +  see handler::get_dup_key()
 +*/
 +#define HA_STATUS_ERRKEY        32
 +/*
 +  update handler::auto_increment_value
 +*/
 +#define HA_STATUS_AUTO          64
 +/*
 +  Get also delete_length when HA_STATUS_VARIABLE is called. It's ok to set it also
 +  when only HA_STATUS_VARIABLE but it won't be used.
 +*/
 +#define HA_STATUS_VARIABLE_EXTRA 128
 +
 +/*
 +  Errorcodes given by handler functions
 +
 +  opt_sum_query() assumes these codes are > 1
 +  Do not add error numbers before HA_ERR_FIRST.
 +  If necessary to add lower numbers, change HA_ERR_FIRST accordingly.
 +*/
 +#define HA_ERR_FIRST            120     /* Copy of first error nr.*/
 +
 +#define HA_ERR_KEY_NOT_FOUND	120	/* Didn't find key on read or update */
 +#define HA_ERR_FOUND_DUPP_KEY	121	/* Dupplicate key on write */
 +#define HA_ERR_INTERNAL_ERROR   122     /* Internal error */
 +#define HA_ERR_RECORD_CHANGED	123	/* Uppdate with is recoverable */
 +#define HA_ERR_WRONG_INDEX	124	/* Wrong index given to function */
 +#define HA_ERR_CRASHED		126	/* Indexfile is crashed */
 +#define HA_ERR_WRONG_IN_RECORD	127	/* Record-file is crashed */
 +#define HA_ERR_OUT_OF_MEM	128	/* Out of memory */
 +#define HA_ERR_NOT_A_TABLE      130     /* not a MYI file - no signature */
 +#define HA_ERR_WRONG_COMMAND	131	/* Command not supported */
 +#define HA_ERR_OLD_FILE		132	/* old databasfile */
 +#define HA_ERR_NO_ACTIVE_RECORD 133	/* No record read in update() */
 +#define HA_ERR_RECORD_DELETED	134	/* A record is not there */
 +#define HA_ERR_RECORD_FILE_FULL 135	/* No more room in file */
 +#define HA_ERR_INDEX_FILE_FULL	136	/* No more room in file */
 +#define HA_ERR_END_OF_FILE	137	/* end in next/prev/first/last */
 +#define HA_ERR_UNSUPPORTED	138	/* unsupported extension used */
 +#define HA_ERR_TO_BIG_ROW	139	/* Too big row */
 +#define HA_WRONG_CREATE_OPTION	140	/* Wrong create option */
 +#define HA_ERR_FOUND_DUPP_UNIQUE 141	/* Dupplicate unique on write */
 +#define HA_ERR_UNKNOWN_CHARSET	 142	/* Can't open charset */
 +#define HA_ERR_WRONG_MRG_TABLE_DEF 143  /* conflicting tables in MERGE */
 +#define HA_ERR_CRASHED_ON_REPAIR 144	/* Last (automatic?) repair failed */
 +#define HA_ERR_CRASHED_ON_USAGE  145	/* Table must be repaired */
 +#define HA_ERR_LOCK_WAIT_TIMEOUT 146
 +#define HA_ERR_LOCK_TABLE_FULL   147
 +#define HA_ERR_READ_ONLY_TRANSACTION 148 /* Updates not allowed */
 +#define HA_ERR_LOCK_DEADLOCK	 149
 +#define HA_ERR_CANNOT_ADD_FOREIGN 150    /* Cannot add a foreign key constr. */
 +#define HA_ERR_NO_REFERENCED_ROW 151     /* Cannot add a child row */
 +#define HA_ERR_ROW_IS_REFERENCED 152     /* Cannot delete a parent row */
 +#define HA_ERR_NO_SAVEPOINT	 153     /* No savepoint with that name */
 +#define HA_ERR_NON_UNIQUE_BLOCK_SIZE 154 /* Non unique key block size */
 +#define HA_ERR_NO_SUCH_TABLE     155  /* The table does not exist in engine */
 +#define HA_ERR_TABLE_EXIST       156  /* The table existed in storage engine */
 +#define HA_ERR_NO_CONNECTION     157  /* Could not connect to storage engine */
 +/* NULLs are not supported in spatial index */
 +#define HA_ERR_NULL_IN_SPATIAL   158
 +#define HA_ERR_TABLE_DEF_CHANGED 159  /* The table changed in storage engine */
 +/* There's no partition in table for given value */
 +#define HA_ERR_NO_PARTITION_FOUND 160
 +#define HA_ERR_RBR_LOGGING_FAILED 161  /* Row-based binlogging of row failed */
 +#define HA_ERR_DROP_INDEX_FK      162  /* Index needed in foreign key constr */
 +/*
 +  Upholding foreign key constraints would lead to a duplicate key error
 +  in some other table.
 +*/
 +#define HA_ERR_FOREIGN_DUPLICATE_KEY 163
 +/* The table changed in storage engine */
 +#define HA_ERR_TABLE_NEEDS_UPGRADE 164
 +#define HA_ERR_TABLE_READONLY      165   /* The table is not writable */
 +
 +#define HA_ERR_AUTOINC_READ_FAILED 166   /* Failed to get next autoinc value */
 +#define HA_ERR_AUTOINC_ERANGE    167     /* Failed to set row autoinc value */
 +#define HA_ERR_GENERIC           168     /* Generic error */
 +/* row not actually updated: new values same as the old values */
 +#define HA_ERR_RECORD_IS_THE_SAME 169
 +#define HA_ERR_LOGGING_IMPOSSIBLE 170    /* It is not possible to log this
 +                                            statement */
 +#define HA_ERR_CORRUPT_EVENT      171	 /* The event was corrupt, leading to
 +                                            illegal data being read */
 +#define HA_ERR_NEW_FILE	          172	 /* New file format */
 +#define HA_ERR_ROWS_EVENT_APPLY   173    /* The event could not be processed
 +                                            no other hanlder error happened */
 +#define HA_ERR_INITIALIZATION     174    /* Error during initialization */
 +#define HA_ERR_FILE_TOO_SHORT	  175	 /* File too short */
 +#define HA_ERR_WRONG_CRC	  176	 /* Wrong CRC on page */
 +#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
 +/* There's no explicitly listed partition in table for the given value */
 +#define HA_ERR_NOT_IN_LOCK_PARTITIONS 178
 +#define HA_ERR_INDEX_COL_TOO_LONG 179    /* Index column length exceeds limit */
 +#define HA_ERR_INDEX_CORRUPT      180    /* Index corrupted */
 +#define HA_ERR_UNDO_REC_TOO_BIG   181    /* Undo log record too big */
 +#define HA_FTS_INVALID_DOCID      182	 /* Invalid InnoDB Doc ID */
 +#define HA_ERR_TABLE_IN_FK_CHECK  183    /* Table being used in foreign key check */
 +#define HA_ERR_TABLESPACE_EXISTS  184    /* The tablespace existed in storage engine */
 +#define HA_ERR_TOO_MANY_FIELDS    185    /* Table has too many columns */
 +#define HA_ERR_ROW_IN_WRONG_PARTITION 186 /* Row in wrong partition */
 +#define HA_ERR_ROW_NOT_VISIBLE    187
 +#define HA_ERR_ABORTED_BY_USER    188
 +#define HA_ERR_DISK_FULL          189
 +#define HA_ERR_INCOMPATIBLE_DEFINITION 190
 +#define HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE 191 /* Too many words in a phrase */
 +#define HA_ERR_DECRYPTION_FAILED  192 /* Table encrypted but
 +						decypt failed */
- #define HA_ERR_LAST               192    /* Copy of last error nr */
++#define HA_ERR_FK_DEPTH_EXCEEDED  193 /* FK cascade depth exceeded */
++#define HA_MISSING_CREATE_OPTION       194  /* Option Missing during Create */
++#define HA_ERR_SE_OUT_OF_MEMORY        195  /* Out of memory in storage engine */
++#define HA_ERR_TABLE_CORRUPT           196  /* Table/Clustered index is corrupted. */
++#define HA_ERR_QUERY_INTERRUPTED       197  /* The query was interrupted */
++#define HA_ERR_TABLESPACE_MISSING      198  /* Missing Tablespace */
++#define HA_ERR_TABLESPACE_IS_NOT_EMPTY 199  /* Tablespace is not empty */
++#define HA_ERR_WRONG_FILE_NAME         200  /* Invalid Filename */
++#define HA_ERR_NOT_ALLOWED_COMMAND     201  /* Operation is not allowed */
++#define HA_ERR_COMPUTE_FAILED          202  /* Compute generated column value failed */
++#define HA_ERR_LAST                    202  /* Copy of last error nr */
 +
 +/* Number of different errors */
 +#define HA_ERR_ERRORS            (HA_ERR_LAST - HA_ERR_FIRST + 1)
 +
 +	/* Other constants */
 +
 +#define HA_NAMELEN 64			/* Max length of saved filename */
 +#define NO_SUCH_KEY (~(uint)0)          /* used as a key no. */
 +
 +typedef ulong key_part_map;
 +#define HA_WHOLE_KEY  (~(key_part_map)0)
 +
 +	/* Intern constants in databases */
 +
 +	/* bits in _search */
 +#define SEARCH_FIND	1
 +#define SEARCH_NO_FIND	2
 +#define SEARCH_SAME	4
 +#define SEARCH_BIGGER	8
 +#define SEARCH_SMALLER	16
 +#define SEARCH_SAVE_BUFF	32
 +#define SEARCH_UPDATE	64
 +#define SEARCH_PREFIX	128
 +#define SEARCH_LAST	256
 +#define MBR_CONTAIN     512
 +#define MBR_INTERSECT   1024
 +#define MBR_WITHIN      2048
 +#define MBR_DISJOINT    4096
 +#define MBR_EQUAL       8192
 +#define MBR_DATA        16384
 +#define SEARCH_NULL_ARE_EQUAL 32768	/* NULL in keys are equal */
 +#define SEARCH_NULL_ARE_NOT_EQUAL 65536	/* NULL in keys are not equal */
 +/* Use this when inserting a key in position order */
 +#define SEARCH_INSERT   (SEARCH_NULL_ARE_NOT_EQUAL*2)
 +/* Only part of the key is specified while reading */
 +#define SEARCH_PART_KEY (SEARCH_INSERT*2)
 +/* Used when user key (key 2) contains transaction id's */
 +#define SEARCH_USER_KEY_HAS_TRANSID (SEARCH_PART_KEY*2)
 +/* Used when page key (key 1) contains transaction id's */
 +#define SEARCH_PAGE_KEY_HAS_TRANSID (SEARCH_USER_KEY_HAS_TRANSID*2)
 +
 +	/* bits in opt_flag */
 +#define QUICK_USED	1
 +#define READ_CACHE_USED	2
 +#define READ_CHECK_USED 4
 +#define KEY_READ_USED	8
 +#define WRITE_CACHE_USED 16
 +#define OPT_NO_ROWS	32
 +
 +	/* bits in update */
 +#define HA_STATE_CHANGED	1	/* Database has changed */
 +#define HA_STATE_AKTIV		2	/* Has a current record */
 +#define HA_STATE_WRITTEN	4	/* Record is written */
 +#define HA_STATE_DELETED	8
 +#define HA_STATE_NEXT_FOUND	16	/* Next found record (record before) */
 +#define HA_STATE_PREV_FOUND	32	/* Prev found record (record after) */
 +#define HA_STATE_NO_KEY		64	/* Last read didn't find record */
 +#define HA_STATE_KEY_CHANGED	128
 +#define HA_STATE_WRITE_AT_END	256	/* set in _ps_find_writepos */
 +#define HA_STATE_BUFF_SAVED	512	/* If current keybuff is info->buff */
 +#define HA_STATE_ROW_CHANGED	1024	/* To invalide ROW cache */
 +#define HA_STATE_EXTEND_BLOCK	2048
 +#define HA_STATE_RNEXT_SAME	4096	/* rnext_same occupied lastkey2 */
 +
 +/* myisampack expects no more than 32 field types. */
 +enum en_fieldtype {
 +  FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
 +  FIELD_SKIP_ZERO,FIELD_BLOB,FIELD_CONSTANT,FIELD_INTERVALL,FIELD_ZERO,
 +  FIELD_VARCHAR,FIELD_CHECK,
 +  FIELD_enum_val_count
 +};
 +
 +enum data_file_type {
 +  STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD, NO_RECORD
 +};
 +
 +/* For key ranges */
 +
 +#define NO_MIN_RANGE	1
 +#define NO_MAX_RANGE	2
 +#define NEAR_MIN	4
 +#define NEAR_MAX	8
 +#define UNIQUE_RANGE	16
 +#define EQ_RANGE	32
 +#define NULL_RANGE	64
 +#define GEOM_FLAG      128
 +#define SKIP_RANGE     256
 +
 +typedef struct st_key_range
 +{
 +  const uchar *key;
 +  uint length;
 +  key_part_map keypart_map;
 +  enum ha_rkey_function flag;
 +} key_range;
 +
 +typedef void *range_id_t;
 +
 +typedef struct st_key_multi_range
 +{
 +  key_range start_key;
 +  key_range end_key;
 +  range_id_t ptr;                 /* Free to use by caller (ptr to row etc) */
 +  uint  range_flag;           /* key range flags see above */
 +} KEY_MULTI_RANGE;
 +
 +
 +/* For number of records */
 +#ifdef BIG_TABLES
 +#define rows2double(A)	ulonglong2double(A)
 +typedef my_off_t	ha_rows;
 +#else
 +#define rows2double(A)	(double) (A)
 +typedef ulong		ha_rows;
 +#endif
 +
 +#define HA_POS_ERROR	(~ (ha_rows) 0)
 +#define HA_OFFSET_ERROR	(~ (my_off_t) 0)
 +
 +#if SYSTEM_SIZEOF_OFF_T == 4
 +#define MAX_FILE_SIZE	INT_MAX32
 +#else
 +#define MAX_FILE_SIZE	LONGLONG_MAX
 +#endif
 +
 +#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
 +
 +/* invalidator function reference for Query Cache */
 +C_MODE_START
 +typedef void (* invalidator_by_filename)(const char * filename);
 +C_MODE_END
 +
 +
 +enum durability_properties
 +{
 +  /*
 +    Preserves the durability properties defined by the engine */
 +  HA_REGULAR_DURABILITY= 0,
 +  /* 
 +     Ignore the durability properties defined by the engine and
 +     write only in-memory entries.
 +  */
 +  HA_IGNORE_DURABILITY= 1
 +};
 +
 +#endif /* _my_base_h */
diff --cc include/my_handler_errors.h
index 5af6a35,0000000..bc92779
mode 100644,000000..100644
--- a/include/my_handler_errors.h
+++ b/include/my_handler_errors.h
@@@ -1,101 -1,0 +1,111 @@@
 +#ifndef MYSYS_MY_HANDLER_ERRORS_INCLUDED
 +#define MYSYS_MY_HANDLER_ERRORS_INCLUDED
 +
 +/* Copyright (c) 2008, 2013, Oracle and/or its affiliates.
 +   Copyright (c) 2011, 2013, SkySQL Ab.
 +
 +   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, Suite 500, Boston, MA 02110-1335 USA */
 +
 +/*
 +  Errors a handler can give you
 +*/
 +
 +static const char *handler_error_messages[]=
 +{
 +  "Didn't find key on read or update",
 +  "Duplicate key on write or update",
 +  "Internal (unspecified) error in handler",
 +  "Someone has changed the row since it was read (while the table was locked to prevent it)",
 +  "Wrong index given to function",
 +  "Undefined handler error 125",
 +  "Index file is crashed",
 +  "Record file is crashed",
 +  "Out of memory in engine",
 +  "Undefined handler error 129",
 +  "Incorrect file format",
 +  "Command not supported by database",
 +  "Old database file",
 +  "No record read before update",
 +  "Record was already deleted (or record file crashed)",
 +  "No more room in record file",
 +  "No more room in index file",
 +  "No more records (read after end of file)",
 +  "Unsupported extension used for table",
 +  "Too big row",
 +  "Wrong create options",
 +  "Duplicate unique key or constraint on write or update",
 +  "Unknown character set used in table",
 +  "Conflicting table definitions in sub-tables of MERGE table",
 +  "Table is crashed and last repair failed",
 +  "Table was marked as crashed and should be repaired",
 +  "Lock timed out; Retry transaction",
 +  "Lock table is full;  Restart program with a larger lock table",
 +  "Updates are not allowed under a read only transactions",
 +  "Lock deadlock; Retry transaction",
 +  "Foreign key constraint is incorrectly formed",
 +  "Cannot add a child row",
 +  "Cannot delete a parent row",
 +  "No savepoint with that name",
 +  "Non unique key block size",
 +  "The table does not exist in engine",
 +  "The table already existed in storage engine",
 +  "Could not connect to storage engine",
 +  "Unexpected null pointer found when using spatial index",
 +  "The table changed in storage engine",
 +  "There's no partition in table for the given value",
 +  "Row-based binary logging of row failed",
 +  "Index needed in foreign key constraint",
 +  "Upholding foreign key constraints would lead to a duplicate key error in some other table",
 +  "Table needs to be upgraded before it can be used",
 +  "Table is read only",
 +  "Failed to get next auto increment value",
 +  "Failed to set row auto increment value",
 +  "Unknown (generic) error from engine",
 +  "Record was not update. Original values was same as new values",
 +  "It is not possible to log this statement",
 +  "The event was corrupt, leading to illegal data being read",
 +  "The table is of a new format not supported by this version",
 +  "The event could not be processed. No other handler error happened",
 +  "Got a fatal error during initialization of handler",
 +  "File too short; Expected more data in file",
 +  "Read page with wrong checksum",
 +  "Too many active concurrent transactions",
 +  "Record not matching the given partition set",
 +  "Index column length exceeds limit",
 +  "Index corrupted",
 +  "Undo record too big",
 +  "Invalid InnoDB FTS Doc ID",
 +  "Table is being used in foreign key check",
 +  "Tablespace already exists",
 +  "Too many columns",
 +  "Row in wrong partition",
 +  "Row is not visible by the current transaction",
 +  "Operation was interrupted by end user (probably kill command?)",
 +  "Disk full",
 +  "Incompatible key or row definition between the MariaDB .frm file and the information in the storage engine. You have to dump and restore the table to fix this",
 +  "Too many words in a FTS phrase or proximity search",
-   "Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match."
++  "Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.",
++  "Foreign key cascade delete/update exceeds max depth",
++  "Table storage engine found required create option missing",
++  "Out of memory in storage engine",
++  "Operation cannot be performed. The table is missing, corrupt or contains bad data.",
++  "Query execution was interrupted",
++  "Tablespace is missing for table",
++  "Tablespace is not empty",
++  "Incorrect File Name",
++  "Table storage engine found required create option missing",
++  "Compute virtual column value failed"
 +};
 +
 +#endif /* MYSYS_MY_HANDLER_ERRORS_INCLUDED */
diff --cc mysql-test/suite/innodb/disabled.def
index 274e3c2,0000000..778ce48
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/disabled.def
+++ b/mysql-test/suite/innodb/disabled.def
@@@ -1,18 -1,0 +1,16 @@@
 +##############################################################################
 +#
 +#  List the test cases that are to be disabled temporarily.
 +#
 +#  Separate the test case name and the comment with ':'.
 +#
 +#    <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
 +#
 +#  Do not use any TAB characters for whitespace.
 +#
 +##############################################################################
 +
 +innodb.auto_increment_dup : MDEV-10548
- group_commit_binlog_pos : MDEV-10156
- group_commit_binlog_pos_no_optimize_thread : MDEV-10156
 +innodb_skip_innodb_is_tables : MDEV-10200
 +innodb.innodb_bug13510739: MDEV-10549
 +innodb.defrag_mdl-9155 : MDEV-10551
diff --cc mysql-test/suite/innodb/r/innodb-corrupted-table.result
index 94203a7,0000000..36e8745
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/r/innodb-corrupted-table.result
+++ b/mysql-test/suite/innodb/r/innodb-corrupted-table.result
@@@ -1,49 -1,0 +1,46 @@@
 +call mtr.add_suppression("Table .* has a primary key in InnoDB data dictionary, but not in MySQL.*");
 +call mtr.add_suppression("InnoDB: Table .* contains .* indexes inside InnoDB, which is different from the number of indexes .* defined in the MySQL.*");
 +create table t1 (pk int, i int, key(i)) engine=InnoDB;
 +insert into t1 values (1,1),(2,2);
 +flush tables;
 +# Save the .frm file without the PK
 +alter table t1 add primary key (pk);
 +# Stop the server, replace the frm with the old one and restart the server
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `pk` int(11) DEFAULT NULL,
 +  `i` int(11) DEFAULT NULL,
 +  KEY `i` (`i`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +Warnings:
 +Warning	1082	InnoDB: Table test/t1 has a primary key in InnoDB data dictionary, but not in MySQL!
 +Warning	1082	InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL 
 +select * from t1;
 +pk	i
 +1	1
 +2	2
 +alter table t1 add j int;
- Warnings:
- Warning	1082	InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL 
 +show warnings;
 +Level	Code	Message
- Warning	1082	InnoDB: Table test/t1 contains 2 indexes inside InnoDB, which is different from the number of indexes 1 defined in the MySQL 
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `pk` int(11) DEFAULT NULL,
 +  `i` int(11) DEFAULT NULL,
 +  `j` int(11) DEFAULT NULL,
 +  KEY `i` (`i`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 add primary key (pk);
 +show warnings;
 +Level	Code	Message
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `pk` int(11) NOT NULL,
 +  `i` int(11) DEFAULT NULL,
 +  `j` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`pk`),
 +  KEY `i` (`i`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
diff --cc mysql-test/suite/innodb/r/innodb-index.result
index fa49027,0000000..b65fd0c
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/r/innodb-index.result
+++ b/mysql-test/suite/innodb/r/innodb-index.result
@@@ -1,1201 -1,0 +1,1201 @@@
 +set global innodb_file_per_table=on;
 +set global innodb_file_format='Barracuda';
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS;
 +create table t1(a varchar(2) primary key) engine=innodb;
 +insert into t1 values('');
 +create index t1a1 on t1(a(1));
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +drop table t1;
 +create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
 +insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
 +commit;
 +alter table t1 add index b (b), add index b (b);
 +ERROR 42000: Duplicate key name 'b'
 +alter table t1 add index (b,b);
 +ERROR 42S21: Duplicate column name 'b'
 +alter table t1 add index d2 (d);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  KEY `d2` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +analyze table t1;
 +explain select * from t1 force index(d2) order by d;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	d2	23	NULL	4	
 +select * from t1 force index (d2) order by d;
 +a	b	c	d
 +3	4	ad	ad
 +2	3	ak	ak
 +5	5	oo	oo
 +4	4	tr	tr
 +alter table t1 add unique index (b);
 +ERROR 23000: Duplicate entry '4' for key 'b'
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  KEY `d2` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 add index (b);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  KEY `d2` (`d`),
 +  KEY `b` (`b`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 add unique index (c), add index (d);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 1
 +Warnings:
 +Note	1831	Duplicate index 'd' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  UNIQUE KEY `c` (`c`),
 +  KEY `d2` (`d`),
 +  KEY `b` (`b`),
 +  KEY `d` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +analyze table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	analyze	status	OK
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	c	10	NULL	4	
 +alter table t1 add primary key (a), drop index c;
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  KEY `d2` (`d`),
 +  KEY `b` (`b`),
 +  KEY `d` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +alter table t1 add primary key (c);
 +ERROR 42000: Multiple primary key defined
 +alter table t1 drop primary key, add primary key (b);
 +ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
 +create unique index c on t1 (c);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `c` (`c`),
 +  KEY `d2` (`d`),
 +  KEY `b` (`b`),
 +  KEY `d` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +analyze table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	analyze	status	OK
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	c	10	NULL	4	
 +select * from t1 force index(c) order by c;
 +a	b	c	d
 +3	4	ad	ad
 +2	3	ak	ak
 +5	5	oo	oo
 +4	4	tr	tr
 +alter table t1 drop index b, add index (b);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `c` (`c`),
 +  KEY `d2` (`d`),
 +  KEY `b` (`b`),
 +  KEY `d` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +insert into t1 values(6,1,'ggg','ggg');
 +select * from t1;
 +a	b	c	d
 +2	3	ak	ak
 +3	4	ad	ad
 +4	4	tr	tr
 +5	5	oo	oo
 +6	1	ggg	ggg
 +select * from t1 force index(b) order by b;
 +a	b	c	d
 +6	1	ggg	ggg
 +2	3	ak	ak
 +3	4	ad	ad
 +4	4	tr	tr
 +5	5	oo	oo
 +select * from t1 force index(c) order by c;
 +a	b	c	d
 +3	4	ad	ad
 +2	3	ak	ak
 +6	1	ggg	ggg
 +5	5	oo	oo
 +4	4	tr	tr
 +select * from t1 force index(d) order by d;
 +a	b	c	d
 +3	4	ad	ad
 +2	3	ak	ak
 +6	1	ggg	ggg
 +5	5	oo	oo
 +4	4	tr	tr
 +analyze table t1;
 +explain select * from t1 force index(b) order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	5	NULL	5	
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	c	10	NULL	5	
 +explain select * from t1 force index(d) order by d;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	d	23	NULL	5	
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) NOT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `c` (`c`),
 +  KEY `d2` (`d`),
 +  KEY `b` (`b`),
 +  KEY `d` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
 +insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ad','ad'),(4,4,'afe','afe');
 +commit;
 +alter table t1 add index (c(2));
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  KEY `c` (`c`(2))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +alter table t1 add unique index (d(10));
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `d` (`d`(10)),
 +  KEY `c` (`c`(2))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +insert into t1 values(5,1,'ggg','ggg');
 +analyze table t1;
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	3	ad	ad
 +4	4	afe	afe
 +5	1	ggg	ggg
 +select * from t1 force index(c) order by c;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	3	ad	ad
 +4	4	afe	afe
 +5	1	ggg	ggg
 +select * from t1 force index(d) order by d;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	3	ad	ad
 +4	4	afe	afe
 +5	1	ggg	ggg
 +explain select * from t1 order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	Using filesort
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	Using filesort
 +explain select * from t1 force index(d) order by d;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	5	Using filesort
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `d` (`d`(10)),
 +  KEY `c` (`c`(2))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 drop index d;
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +insert into t1 values(8,9,'fff','fff');
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	3	ad	ad
 +4	4	afe	afe
 +5	1	ggg	ggg
 +8	9	fff	fff
 +select * from t1 force index(c) order by c;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	3	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +5	1	ggg	ggg
 +analyze table t1;
 +explain select * from t1 order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	6	Using filesort
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	6	Using filesort
 +explain select * from t1 order by d;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	6	Using filesort
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  KEY `c` (`c`(2))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
 +insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
 +commit;
 +alter table t1 add unique index (b,c);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +insert into t1 values(8,9,'fff','fff');
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +select * from t1 force index(b) order by b;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +analyze table t1;
 +explain select * from t1 force index(b) order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	16	NULL	5	
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `b` (`b`,`c`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 add index (b,c);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +insert into t1 values(11,11,'kkk','kkk');
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +11	11	kkk	kkk
 +select * from t1 force index(b) order by b;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +11	11	kkk	kkk
 +analyze table t1;
 +explain select * from t1 force index(b) order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	16	NULL	6	
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `b` (`b`,`c`),
 +  KEY `b_2` (`b`,`c`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 add unique index (c,d);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +insert into t1 values(13,13,'yyy','aaa');
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +11	11	kkk	kkk
 +13	13	yyy	aaa
 +select * from t1 force index(b) order by b;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +11	11	kkk	kkk
 +13	13	yyy	aaa
 +select * from t1 force index(c) order by c;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +11	11	kkk	kkk
 +13	13	yyy	aaa
 +analyze table t1;
 +explain select * from t1 force index(b) order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	16	NULL	7	
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	c	34	NULL	7	
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `b` (`b`,`c`),
 +  UNIQUE KEY `c` (`c`,`d`),
 +  KEY `b_2` (`b`,`c`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1(a int not null, b int not null, c int, primary key (a), key (b)) engine = innodb;
 +create table t3(a int not null, c int not null, d int, primary key (a), key (c)) engine = innodb;
 +create table t4(a int not null, d int not null, e int, primary key (a), key (d)) engine = innodb;
 +create table t2(a int not null, b int, c int, d int, e int,
 +foreign key (b) references t1(b) on delete set null,
 +foreign key (c) references t3(c), foreign key (d) references t4(d) on update set null)
 +engine = innodb;
 +alter table t1 drop index b;
 +ERROR HY000: Cannot drop index 'b': needed in a foreign key constraint
 +alter table t3 drop index c;
 +ERROR HY000: Cannot drop index 'c': needed in a foreign key constraint
 +alter table t4 drop index d;
 +ERROR HY000: Cannot drop index 'd': needed in a foreign key constraint
 +alter table t2 drop index b;
 +ERROR HY000: Cannot drop index 'b': needed in a foreign key constraint
 +alter table t2 drop index b, drop index c, drop index d;
 +ERROR HY000: Cannot drop index 'b': needed in a foreign key constraint
 +alter table t2 MODIFY b INT NOT NULL, ALGORITHM=COPY;
 +ERROR HY000: Cannot change column 'b': used in a foreign key constraint 't2_ibfk_1'
 +set @old_sql_mode = @@sql_mode;
 +set @@sql_mode = 'STRICT_TRANS_TABLES';
 +alter table t2 MODIFY b INT NOT NULL, ALGORITHM=INPLACE;
 +ERROR HY000: Column 'b' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_1' SET NULL
 +set @@sql_mode = @old_sql_mode;
 +SET FOREIGN_KEY_CHECKS=0;
 +alter table t2 DROP COLUMN b, ALGORITHM=COPY;
 +ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 't2_ibfk_1'
 +alter table t2 DROP COLUMN b;
- ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 'test/t2_ibfk_1'
++ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 't2_ibfk_1'
 +alter table t1 DROP COLUMN b, ALGORITHM=COPY;
 +ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 't2_ibfk_1' of table 'test.t2'
 +alter table t1 DROP COLUMN b;
- ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 'test/t2_ibfk_1' of table '"test"."t2"'
++ERROR HY000: Cannot drop column 'b': needed in a foreign key constraint 't2_ibfk_1' of table 'test.t2'
 +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
 +create unique index dc on t2 (d,c);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +create index dc on t1 (b,c);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +set @@sql_mode = 'STRICT_TRANS_TABLES';
 +alter table t2 add primary key (alpha), change a alpha int,
 +change b beta int not null, change c charlie int not null;
 +ERROR HY000: Column 'b' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_1' SET NULL
 +alter table t2 add primary key (alpha), change a alpha int,
 +change c charlie int not null, change d delta int not null;
 +ERROR HY000: Column 'd' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_3' SET NULL
 +alter table t2 add primary key (alpha), change a alpha int,
 +change b beta int, modify c int not null;
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +set @@sql_mode = @old_sql_mode;
 +insert into t1 values (1,1,1);
 +insert into t3 values (1,1,1);
 +insert into t4 values (1,1,1);
 +insert into t2 values (1,1,1,1,1);
 +commit;
 +alter table t4 add constraint dc foreign key (a) references t1(a);
 +affected rows: 1
 +info: Records: 1  Duplicates: 0  Warnings: 0
 +show create table t4;
 +Table	Create Table
 +t4	CREATE TABLE `t4` (
 +  `a` int(11) NOT NULL,
 +  `d` int(11) NOT NULL,
 +  `e` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  KEY `d` (`d`),
 +  CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t3 add constraint dc foreign key (a) references t1(a);
 +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 121 "Duplicate key on write or update")
 +SET FOREIGN_KEY_CHECKS=0;
 +alter table t3 add constraint dc foreign key (a) references t1(a);
 +ERROR HY000: Failed to add the foreign key constraint 'test/dc' to system tables
 +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
 +show create table t3;
 +Table	Create Table
 +t3	CREATE TABLE `t3` (
 +  `a` int(11) NOT NULL,
 +  `c` int(11) NOT NULL,
 +  `d` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  KEY `c` (`c`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t2 drop index b, add index (beta);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `alpha` int(11) NOT NULL,
 +  `beta` int(11) DEFAULT NULL,
 +  `c` int(11) NOT NULL,
 +  `d` int(11) DEFAULT NULL,
 +  `e` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`alpha`),
 +  UNIQUE KEY `dc` (`d`,`c`),
 +  KEY `c` (`c`),
 +  KEY `beta` (`beta`),
 +  CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`beta`) REFERENCES `t1` (`b`) ON DELETE SET NULL,
 +  CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`c`) REFERENCES `t3` (`c`),
 +  CONSTRAINT `t2_ibfk_3` FOREIGN KEY (`d`) REFERENCES `t4` (`d`) ON UPDATE SET NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +delete from t1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `dc` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
 +drop index dc on t4;
 +ERROR 42000: Can't DROP INDEX `dc`; check that it exists
 +alter table t3 drop foreign key dc;
 +ERROR 42000: Can't DROP FOREIGN KEY `dc`; check that it exists
 +alter table t4 drop foreign key dc;
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +select * from t2;
 +alpha	beta	c	d	e
 +1	1	1	1	1
 +delete from t1;
 +select * from t2;
 +alpha	beta	c	d	e
 +1	NULL	1	1	1
 +drop table t2,t4,t3,t1;
 +create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb default charset=utf8;
 +insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,2,'ad','ad'),(4,4,'afe','afe');
 +commit;
 +alter table t1 add unique index (b);
 +ERROR 23000: Duplicate entry '2' for key 'b'
 +insert into t1 values(8,9,'fff','fff');
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8
 +alter table t1 add index (b);
 +insert into t1 values(10,10,'kkk','iii');
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +10	10	kkk	iii
 +select * from t1 force index(b) order by b;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +10	10	kkk	iii
 +explain select * from t1 force index(b) order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	5	NULL	6	
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  KEY `b` (`b`)
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8
 +alter table t1 add unique index (c), add index (d);
 +insert into t1 values(11,11,'aaa','mmm');
 +select * from t1;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +10	10	kkk	iii
 +11	11	aaa	mmm
 +select * from t1 force index(b) order by b;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +10	10	kkk	iii
 +11	11	aaa	mmm
 +select * from t1 force index(c) order by c;
 +a	b	c	d
 +11	11	aaa	mmm
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +10	10	kkk	iii
 +select * from t1 force index(d) order by d;
 +a	b	c	d
 +1	1	ab	ab
 +2	2	ac	ac
 +3	2	ad	ad
 +4	4	afe	afe
 +8	9	fff	fff
 +10	10	kkk	iii
 +11	11	aaa	mmm
 +explain select * from t1 force index(b) order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	5	NULL	7	
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	c	31	NULL	7	
 +explain select * from t1 force index(d) order by d;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	d	63	NULL	7	
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `c` (`c`),
 +  KEY `b` (`b`),
 +  KEY `d` (`d`)
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8
 +check table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +drop table t1;
 +create table t1(a int not null, b int) engine = innodb;
 +insert into t1 values (1,1),(1,1),(1,1),(1,1);
 +alter table t1 add unique index (a);
 +ERROR 23000: Duplicate entry '1' for key 'a'
 +alter table t1 add unique index (b);
 +ERROR 23000: Duplicate entry '1' for key 'b'
 +alter table t1 add unique index (a), add unique index(b);
 +ERROR 23000: Duplicate entry '1' for key 'a'
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1(a int not null, c int not null,b int, primary key(a), unique key(c), key(b)) engine = innodb;
 +alter table t1 drop index c, drop index b;
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `c` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1(a int not null, b int, primary key(a)) engine = innodb;
 +alter table t1 add index (b);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  KEY `b` (`b`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1(a int not null, b int, c char(10), d varchar(20), primary key (a)) engine = innodb;
 +insert into t1 values (1,1,'ab','ab'),(2,2,'ac','ac'),(3,3,'ac','ac'),(4,4,'afe','afe'),(5,4,'affe','affe');
 +alter table t1 add unique index (b), add unique index (c), add unique index (d);
 +ERROR 23000: Duplicate entry '4' for key 'b'
 +alter table t1 add unique index (c), add unique index (b), add index (d);
 +ERROR 23000: Duplicate entry 'ac' for key 'c'
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `d` varchar(20) DEFAULT NULL,
 +  PRIMARY KEY (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1(a int not null, b int not null, c int, primary key (a), key(c)) engine=innodb;
 +insert into t1 values (5,1,5),(4,2,4),(3,3,3),(2,4,2),(1,5,1);
 +alter table t1 add unique index (b);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +insert into t1 values (10,20,20),(11,19,19),(12,18,18),(13,17,17);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) NOT NULL,
 +  `c` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `b` (`b`),
 +  KEY `c` (`c`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +check table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +analyze table t1;
 +explain select * from t1 force index(c) order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	c	5	NULL	9	
 +explain select * from t1 order by a;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	PRIMARY	4	NULL	9	
 +explain select * from t1 force index(b) order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	4	NULL	9	
 +select * from t1 order by a;
 +a	b	c
 +1	5	1
 +2	4	2
 +3	3	3
 +4	2	4
 +5	1	5
 +10	20	20
 +11	19	19
 +12	18	18
 +13	17	17
 +select * from t1 force index(b) order by b;
 +a	b	c
 +5	1	5
 +4	2	4
 +3	3	3
 +2	4	2
 +1	5	1
 +13	17	17
 +12	18	18
 +11	19	19
 +10	20	20
 +select * from t1 force index(c) order by c;
 +a	b	c
 +1	5	1
 +2	4	2
 +3	3	3
 +4	2	4
 +5	1	5
 +13	17	17
 +12	18	18
 +11	19	19
 +10	20	20
 +drop table t1;
 +create table t1(a int not null, b int not null) engine=innodb;
 +insert into t1 values (1,1);
 +alter table t1 add primary key(b);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +insert into t1 values (2,2);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  `b` int(11) NOT NULL,
 +  PRIMARY KEY (`b`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +check table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +select * from t1;
 +a	b
 +1	1
 +2	2
 +analyze table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	analyze	status	OK
 +explain select * from t1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	
 +explain select * from t1 order by a;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	2	Using filesort
 +explain select * from t1 order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	PRIMARY	4	NULL	2	
 +checksum table t1;
 +Table	Checksum
 +test.t1	582702641
 +drop table t1;
 +create table t1(a int not null) engine=innodb;
 +insert into t1 values (1);
 +alter table t1 add primary key(a);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +insert into t1 values (2);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` int(11) NOT NULL,
 +  PRIMARY KEY (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +check table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +commit;
 +select * from t1;
 +a
 +1
 +2
 +analyze table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	analyze	status	OK
 +explain select * from t1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	PRIMARY	4	NULL	2	Using index
 +explain select * from t1 order by a;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	PRIMARY	4	NULL	2	Using index
 +drop table t1;
 +set global innodb_file_per_table=1;
 +set global innodb_file_format=Barracuda;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +set global innodb_file_format_max=Barracuda;
 +Warnings:
 +Warning	131	Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
 +SET FOREIGN_KEY_CHECKS=0;
 +CREATE TABLE t1(
 +c1	BIGINT(12) NOT NULL,
 +PRIMARY KEY (c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +CREATE TABLE t2(
 +c1	BIGINT(16) NOT NULL,
 +c2	BIGINT(12) NOT NULL,
 +c3	BIGINT(12) NOT NULL,
 +PRIMARY KEY (c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3) REFERENCES t1(c1);
 +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
 +SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `fk_t2_ca` (`c3`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`) REFERENCES `t1` (`c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +CREATE INDEX i_t2_c3_c2 ON t2(c3, c2);
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `i_t2_c3_c2` (`c3`,`c2`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`) REFERENCES `t1` (`c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
 +SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
 +INSERT INTO t2 VALUES(0,0,0);
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`) REFERENCES `t1` (`c1`))
 +INSERT INTO t1 VALUES(0);
 +INSERT INTO t2 VALUES(0,0,0);
 +DROP TABLE t2;
 +CREATE TABLE t2(
 +c1	BIGINT(16) NOT NULL,
 +c2	BIGINT(12) NOT NULL,
 +c3	BIGINT(12) NOT NULL,
 +PRIMARY KEY (c1,c2,c3)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +SET FOREIGN_KEY_CHECKS=0;
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3) REFERENCES t1(c1);
 +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`,`c2`,`c3`),
 +  KEY `fk_t2_ca` (`c3`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`) REFERENCES `t1` (`c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +CREATE INDEX i_t2_c3_c2 ON t2(c3, c2);
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`,`c2`,`c3`),
 +  KEY `i_t2_c3_c2` (`c3`,`c2`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`) REFERENCES `t1` (`c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +INSERT INTO t2 VALUES(0,0,1);
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`) REFERENCES `t1` (`c1`))
 +INSERT INTO t2 VALUES(0,0,0);
 +DELETE FROM t1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`) REFERENCES `t1` (`c1`))
 +DELETE FROM t2;
 +DROP TABLE t2;
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1	BIGINT(12) NOT NULL,
 +c2	INT(4) NOT NULL,
 +PRIMARY KEY (c2,c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +CREATE TABLE t2(
 +c1	BIGINT(16) NOT NULL,
 +c2	BIGINT(12) NOT NULL,
 +c3	BIGINT(12) NOT NULL,
 +PRIMARY KEY (c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +SET FOREIGN_KEY_CHECKS=0;
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1), ALGORITHM=COPY;
 +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c1,c1);
 +ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
 +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
 +ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=INPLACE;
 +ERROR HY000: Failed to add the foreign key constraint on table 't2'. Incorrect options in FOREIGN KEY constraint 'test/fk_t2_ca'
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1), ALGORITHM=COPY;
 +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
 +ALTER TABLE t1 MODIFY COLUMN c2 BIGINT(12) NOT NULL;
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2), ALGORITHM=COPY;
 +ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c1,c2);
 +ERROR HY000: Failed to add the foreign key constaint. Missing index for constraint 'fk_t2_ca' in the referenced table 't1'
 +ALTER TABLE t2 ADD CONSTRAINT fk_t2_ca
 +FOREIGN KEY (c3,c2) REFERENCES t1(c2,c1);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
 +affected rows: 0
 +SHOW CREATE TABLE t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` bigint(12) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c2`,`c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `fk_t2_ca` (`c3`,`c2`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +CREATE INDEX i_t2_c2_c1 ON t2(c2, c1);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `fk_t2_ca` (`c3`,`c2`),
 +  KEY `i_t2_c2_c1` (`c2`,`c1`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +CREATE INDEX i_t2_c3_c1_c2 ON t2(c3, c1, c2);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `fk_t2_ca` (`c3`,`c2`),
 +  KEY `i_t2_c2_c1` (`c2`,`c1`),
 +  KEY `i_t2_c3_c1_c2` (`c3`,`c1`,`c2`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +CREATE INDEX i_t2_c3_c2 ON t2(c3, c2);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `c1` bigint(16) NOT NULL,
 +  `c2` bigint(12) NOT NULL,
 +  `c3` bigint(12) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `i_t2_c2_c1` (`c2`,`c1`),
 +  KEY `i_t2_c3_c1_c2` (`c3`,`c1`,`c2`),
 +  KEY `i_t2_c3_c2` (`c3`,`c2`),
 +  CONSTRAINT `fk_t2_ca` FOREIGN KEY (`c3`, `c2`) REFERENCES `t1` (`c2`, `c1`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +affected rows: 1
 +DROP TABLE t2;
 +DROP TABLE t1;
 +connect  a,localhost,root,,;
 +connect  b,localhost,root,,;
 +connection a;
 +CREATE TABLE t1 (a INT, b CHAR(1)) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES (3,'a'),(3,'b'),(1,'c'),(0,'d'),(1,'e');
 +CREATE TABLE t2 (a INT, b CHAR(1)) ENGINE=InnoDB;
 +CREATE TABLE t2i (a INT, b CHAR(1) NOT NULL) ENGINE=InnoDB;
 +CREATE TABLE t2c (a INT, b CHAR(1) NOT NULL) ENGINE=InnoDB;
 +INSERT INTO t2 SELECT * FROM t1;
 +INSERT INTO t2i SELECT * FROM t1;
 +INSERT INTO t2c SELECT * FROM t1;
 +connection b;
 +BEGIN;
 +SELECT * FROM t1;
 +a	b
 +3	a
 +3	b
 +1	c
 +0	d
 +1	e
 +connection a;
 +SET lock_wait_timeout=1;
 +CREATE INDEX t1a ON t1(a);
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +CREATE INDEX t2a ON t2(a);
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +set @old_sql_mode = @@sql_mode;
 +set @@sql_mode = 'STRICT_TRANS_TABLES';
 +ALTER TABLE t2i ADD PRIMARY KEY(a,b), ADD INDEX t2a(a), ALGORITHM=INPLACE;
 +affected rows: 0
 +info: Records: 0  Duplicates: 0  Warnings: 0
 +set @@sql_mode = @old_sql_mode;
 +ALTER TABLE t2c ADD PRIMARY KEY(a,b), ADD INDEX t2a(a), ALGORITHM=COPY;
 +affected rows: 5
 +info: Records: 5  Duplicates: 0  Warnings: 0
 +connection b;
 +SELECT * FROM t2i;
 +ERROR HY000: Table definition has changed, please retry transaction
 +SELECT * FROM t2i FORCE INDEX(t2a) ORDER BY a;
 +ERROR HY000: Table definition has changed, please retry transaction
 +SELECT * FROM t2c;
 +ERROR HY000: Table definition has changed, please retry transaction
 +SELECT * FROM t2c FORCE INDEX(t2a) ORDER BY a;
 +ERROR HY000: Table definition has changed, please retry transaction
 +SELECT * FROM t2;
 +a	b
 +3	a
 +3	b
 +1	c
 +0	d
 +1	e
 +SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
 +ERROR HY000: Table definition has changed, please retry transaction
 +SELECT * FROM t2;
 +a	b
 +3	a
 +3	b
 +1	c
 +0	d
 +1	e
 +COMMIT;
 +SELECT * FROM t2;
 +a	b
 +3	a
 +3	b
 +1	c
 +0	d
 +1	e
 +SELECT * FROM t2 FORCE INDEX(t2a) ORDER BY a;
 +a	b
 +0	d
 +1	c
 +1	e
 +3	a
 +3	b
 +SELECT * FROM t2i;
 +a	b
 +0	d
 +1	c
 +1	e
 +3	a
 +3	b
 +SELECT * FROM t2i FORCE INDEX(t2a) ORDER BY a;
 +a	b
 +0	d
 +1	c
 +1	e
 +3	a
 +3	b
 +SELECT * FROM t2c;
 +a	b
 +0	d
 +1	c
 +1	e
 +3	a
 +3	b
 +SELECT * FROM t2c FORCE INDEX(t2a) ORDER BY a;
 +a	b
 +0	d
 +1	c
 +1	e
 +3	a
 +3	b
 +connection default;
 +disconnect a;
 +disconnect b;
 +alter table t2 add index t2a(b);
 +ERROR 42000: Duplicate key name 't2a'
 +alter table t2 drop index t2a, add index t2a(b);
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `a` int(11) DEFAULT NULL,
 +  `b` char(1) DEFAULT NULL,
 +  KEY `t2a` (`b`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +show create table t2i;
 +Table	Create Table
 +t2i	CREATE TABLE `t2i` (
 +  `a` int(11) NOT NULL,
 +  `b` char(1) NOT NULL,
 +  PRIMARY KEY (`a`,`b`),
 +  KEY `t2a` (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +show create table t2c;
 +Table	Create Table
 +t2c	CREATE TABLE `t2c` (
 +  `a` int(11) NOT NULL,
 +  `b` char(1) NOT NULL,
 +  PRIMARY KEY (`a`,`b`),
 +  KEY `t2a` (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +DROP TABLE t1,t2,t2c,t2i;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +Warnings:
 +Warning	131	Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
diff --cc mysql-test/suite/innodb/r/innodb-mdev-7513.result
index 55b4d34,0000000..91d6447
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/r/innodb-mdev-7513.result
+++ b/mysql-test/suite/innodb/r/innodb-mdev-7513.result
@@@ -1,205 -1,0 +1,207 @@@
 +call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
 +call mtr.add_suppression("Row size too large (> 8126)*");
++set GLOBAL innodb_strict_mode=OFF;
 +CREATE TABLE t1 ( text1 TEXT,
 +text2 TEXT,
 +text3 TEXT,
 +text4 TEXT,
 +text5 TEXT,
 +text6 TEXT,
 +text7 TEXT,
 +text8 TEXT,
 +text9 TEXT,
 +text10 TEXT,
 +text11 TEXT,
 +text12 TEXT,
 +text13 TEXT,
 +text14 TEXT,
 +text15 TEXT,
 +text16 TEXT,
 +text17 TEXT,
 +text18 TEXT,
 +text19 TEXT,
 +text20 TEXT,
 +text21 TEXT,
 +text22 TEXT,
 +text23 TEXT,
 +text24 TEXT,
 +text25 TEXT,
 +text26 TEXT,
 +text27 TEXT,
 +text28 TEXT,
 +text29 TEXT,
 +text30 TEXT,
 +text31 TEXT,
 +text32 TEXT,
 +text33 TEXT,
 +text34 TEXT,
 +text35 TEXT,
 +text36 TEXT,
 +text37 TEXT,
 +text38 TEXT,
 +text39 TEXT,
 +text40 TEXT,
 +text41 TEXT,
 +text42 TEXT,
 +text43 TEXT,
 +text44 TEXT,
 +text45 TEXT,
 +text46 TEXT,
 +text47 TEXT,
 +text48 TEXT,
 +text49 TEXT,
 +text50 TEXT,
 +text51 TEXT,
 +text52 TEXT,
 +text53 TEXT,
 +text54 TEXT,
 +text55 TEXT,
 +text56 TEXT,
 +text57 TEXT,
 +text58 TEXT,
 +text59 TEXT,
 +text60 TEXT,
 +text61 TEXT,
 +text62 TEXT,
 +text63 TEXT,
 +text64 TEXT,
 +text65 TEXT,
 +text66 TEXT,
 +text67 TEXT,
 +text68 TEXT,
 +text69 TEXT,
 +text70 TEXT,
 +text71 TEXT,
 +text72 TEXT,
 +text73 TEXT,
 +text74 TEXT,
 +text75 TEXT,
 +text76 TEXT,
 +text77 TEXT,
 +text78 TEXT,
 +text79 TEXT,
 +text80 TEXT,
 +text81 TEXT,
 +text82 TEXT,
 +text83 TEXT,
 +text84 TEXT,
 +text85 TEXT,
 +text86 TEXT,
 +text87 TEXT,
 +text88 TEXT,
 +text89 TEXT,
 +text90 TEXT,
 +text91 TEXT,
 +text92 TEXT,
 +text93 TEXT,
 +text94 TEXT,
 +text95 TEXT,
 +text96 TEXT,
 +text97 TEXT,
 +text98 TEXT,
 +text99 TEXT,
 +text100 TEXT,
 +text101 TEXT,
 +text102 TEXT,
 +text103 TEXT,
 +text104 TEXT,
 +text105 TEXT,
 +text106 TEXT,
 +text107 TEXT,
 +text108 TEXT,
 +text109 TEXT,
 +text110 TEXT,
 +text111 TEXT,
 +text112 TEXT,
 +text113 TEXT,
 +text114 TEXT,
 +text115 TEXT,
 +text116 TEXT,
 +text117 TEXT,
 +text118 TEXT,
 +text119 TEXT,
 +text120 TEXT,
 +text121 TEXT,
 +text122 TEXT,
 +text123 TEXT,
 +text124 TEXT,
 +text125 TEXT,
 +text126 TEXT,
 +text127 TEXT,
 +text128 TEXT,
 +text129 TEXT,
 +text130 TEXT,
 +text131 TEXT,
 +text132 TEXT,
 +text133 TEXT,
 +text134 TEXT,
 +text135 TEXT,
 +text136 TEXT,
 +text137 TEXT,
 +text138 TEXT,
 +text139 TEXT,
 +text140 TEXT,
 +text141 TEXT,
 +text142 TEXT,
 +text143 TEXT,
 +text144 TEXT,
 +text145 TEXT,
 +text146 TEXT,
 +text147 TEXT,
 +text148 TEXT,
 +text149 TEXT,
 +text150 TEXT,
 +text151 TEXT,
 +text152 TEXT,
 +text153 TEXT,
 +text154 TEXT,
 +text155 TEXT,
 +text156 TEXT,
 +text157 TEXT,
 +text158 TEXT,
 +text159 TEXT,
 +text160 TEXT,
 +text161 TEXT,
 +text162 TEXT,
 +text163 TEXT,
 +text164 TEXT,
 +text165 TEXT,
 +text166 TEXT,
 +text167 TEXT,
 +text168 TEXT,
 +text169 TEXT,
 +text170 TEXT,
 +text171 TEXT,
 +text172 TEXT,
 +text173 TEXT,
 +text174 TEXT,
 +text175 TEXT,
 +text176 TEXT,
 +text177 TEXT,
 +text178 TEXT,
 +text179 TEXT,
 +text180 TEXT,
 +text181 TEXT,
 +text182 TEXT,
 +text183 TEXT,
 +text184 TEXT,
 +text185 TEXT,
 +text186 TEXT,
 +text187 TEXT,
 +text188 TEXT,
 +text189 TEXT,
 +text190 TEXT,
 +text191 TEXT,
 +text192 TEXT,
 +text193 TEXT,
 +text194 TEXT,
 +text195 TEXT,
 +text196 TEXT,
 +text197 TEXT
 +) ENGINE = InnoDB;
 +INSERT INTO t1 VALUES ('abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcd
 ef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abc
 def', 'abcdef');
 +DELETE FROM t1 WHERE text1 = 'abcdef';
 +SELECT * from t1;
 +text1	text2	text3	text4	text5	text6	text7	text8	text9	text10	text11	text12	text13	text14	text15	text16	text17	text18	text19	text20	text21	text22	text23	text24	text25	text26	text27	text28	text29	text30	text31	text32	text33	text34	text35	text36	text37	text38	text39	text40	text41	text42	text43	text44	text45	text46	text47	text48	text49	text50	text51	text52	text53	text54	text55	text56	text57	text58	text59	text60	text61	text62	text63	text64	text65	text66	text67	text68	text69	text70	text71	text72	text73	text74	text75	text76	text77	text78	text79	text80	text81	text82	text83	text84	text85	text86	text87	text88	text89	text90	text91	text92	text93	text94	text95	text96	text97	text98	text99	text100	text101	text102	text103	text104	text105	text106	text107	text108	text109	text110	text111	text112	text113	text114	text115	text116	text117	text118	text119	text120	text121	text122	text123	text124	text125	text126	text127	text128	text129	text130	text131	text132	text133	text134	text135	text136	text137	
 text138	text139	text140	text141	text142	text143	text144	text145	text146	text147	text148	text149	text150	text151	text152	text153	text154	text155	text156	text157	text158	text159	text160	text161	text162	text163	text164	text165	text166	text167	text168	text169	text170	text171	text172	text173	text174	text175	text176	text177	text178	text179	text180	text181	text182	text183	text184	text185	text186	text187	text188	text189	text190	text191	text192	text193	text194	text195	text196	text197
++set GLOBAL innodb_strict_mode=DEFAULT;
 +DROP TABLE t1;
diff --cc mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
index e01a773,0000000..57edf7a
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
@@@ -1,593 -1,0 +1,594 @@@
 +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
 +call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
 +call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
++call mtr.add_suppression("InnoDB: Tablespace flags: .* corrupted  in file: .* ");
 +SET GLOBAL innodb_file_per_table = 1;
 +SELECT @@innodb_file_per_table;
 +@@innodb_file_per_table
 +1
 +SET GLOBAL innodb_file_format = `Barracuda`;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +SELECT @@innodb_file_format;
 +@@innodb_file_format
 +Barracuda
 +SET SESSION innodb_strict_mode=1;
 +SELECT @@SESSION.innodb_strict_mode;
 +@@SESSION.innodb_strict_mode
 +1
 +DROP DATABASE IF EXISTS test_wl5522;
 +Warnings:
 +Note	1008	Can't drop database 'test_wl5522'; database doesn't exist
 +CREATE DATABASE test_wl5522;
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4);
 +FLUSH TABLES test_wl5522.t1 FOR EXPORT;
 +backup: t1
 +UNLOCK TABLES;
 +DROP TABLE test_wl5522.t1;
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +INSERT INTO test_wl5522.t1 VALUES (1);
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
 +SELECT * FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Lost connection to MySQL server during query
 +SET SESSION debug_dbug="-d,ib_import_before_commit_crash";
 +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Lost connection to MySQL server during query
 +unlink: t1.ibd
 +unlink: t1.cfg
 +# Restart and reconnect to the server
 +SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
 +DROP TABLE test_wl5522.t1;
 +SET GLOBAL innodb_file_per_table = 1;
 +SELECT @@innodb_file_per_table;
 +@@innodb_file_per_table
 +1
 +SET GLOBAL innodb_file_format = `Barracuda`;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +SELECT @@innodb_file_format;
 +@@innodb_file_format
 +Barracuda
 +SET SESSION innodb_strict_mode=1;
 +SELECT @@SESSION.innodb_strict_mode;
 +@@SESSION.innodb_strict_mode
 +1
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +CHECK TABLE test_wl5522.t1;
 +Table	Op	Msg_type	Msg_text
 +test_wl5522.t1	check	status	OK
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +COUNT(*)
 +4
 +INSERT INTO test_wl5522.t1 VALUES(400), (500), (600);
 +SELECT * FROM test_wl5522.t1;
 +c1
 +1
 +2
 +3
 +4
 +400
 +500
 +600
 +DROP TABLE test_wl5522.t1;
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_internal_error";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Internal error: While updating the <space, root page number> of index GEN_CLUST_INDEX - Generic error
 +SET SESSION debug_dbug="-d,ib_import_internal_error";
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +DROP TABLE test_wl5522.t1;
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Too many concurrent transactions
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
 +SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Got error 44 't1.ibd
 +SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure";
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Incorrect key file for table 't1'; try to repair it
 +SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure";
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Incorrect key file for table 't1'; try to repair it
 +SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure";
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_cluster_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Incorrect key file for table 't1'; try to repair it
 +SET SESSION debug_dbug="-d,ib_import_cluster_failure";
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Incorrect key file for table 't1'; try to repair it
 +SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure";
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Incorrect key file for table 't1'; try to repair it
 +SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure";
 +unlink: t1.ibd
 +unlink: t1.cfg
 +DROP TABLE test_wl5522.t1;
 +CREATE TABLE test_wl5522.t1 (
 +c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 BIGINT,
 +c3 VARCHAR(2048),
 +c4 VARCHAR(2048),
 +INDEX idx1(c2),
 +INDEX idx2(c3(512)),
 +INDEX idx3(c4(512))) Engine=InnoDB
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 +SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
 +SET GLOBAL innodb_disable_background_merge=ON;
 +SET GLOBAL innodb_monitor_reset = ibuf_merges;
 +SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES
 +(1, REPEAT('a', 2048), REPEAT('a', 2048)),
 +(2, REPEAT('b', 2048), REPEAT('b', 2048)),
 +(3, REPEAT('c', 2048), REPEAT('c', 2048)),
 +(4, REPEAT('d', 2048), REPEAT('d', 2048));
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +DELETE FROM test_wl5522.t1 WHERE c2 = 1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024);
 +UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024);
 +SHOW CREATE TABLE test_wl5522.t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` bigint(20) NOT NULL AUTO_INCREMENT,
 +  `c2` bigint(20) DEFAULT NULL,
 +  `c3` varchar(2048) DEFAULT NULL,
 +  `c4` varchar(2048) DEFAULT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `idx1` (`c2`),
 +  KEY `idx2` (`c3`(512)),
 +  KEY `idx3` (`c4`(512))
 +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
 +SELECT c1, c2 FROM test_wl5522.t1;
 +c1	c2
 +2	32
 +3	48
 +4	64
 +6	92
 +7	108
 +8	124
 +13	197
 +14	213
 +15	229
 +17	257
 +18	273
 +19	289
 +28	422
 +29	438
 +30	454
 +32	482
 +33	498
 +34	514
 +36	542
 +37	558
 +38	574
 +40	602
 +41	618
 +42	634
 +59	887
 +60	903
 +61	919
 +63	947
 +64	963
 +65	979
 +67	1007
 +68	1023
 +69	1039
 +71	1067
 +72	1083
 +73	1099
 +75	1127
 +76	1143
 +77	1159
 +79	1187
 +80	1203
 +81	1219
 +83	1247
 +84	1263
 +85	1279
 +87	1307
 +88	1323
 +89	1339
 +122	1832
 +123	1848
 +124	1864
 +126	1892
 +127	1908
 +128	1924
 +130	1952
 +131	1968
 +132	1984
 +134	2012
 +135	2028
 +136	2044
 +138	2072
 +139	2088
 +140	2104
 +142	2132
 +143	2148
 +144	2164
 +146	2192
 +147	2208
 +148	2224
 +150	2252
 +151	2268
 +152	2284
 +154	2312
 +155	2328
 +156	2344
 +158	2372
 +159	2388
 +160	2404
 +162	2432
 +163	2448
 +164	2464
 +166	2492
 +167	2508
 +168	2524
 +170	2552
 +171	2568
 +172	2584
 +174	2612
 +175	2628
 +176	2644
 +178	2672
 +179	2688
 +180	2704
 +182	2732
 +183	2748
 +184	2764
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +COUNT(*)
 +96
 +SELECT SUM(c2) FROM test_wl5522.t1;
 +SUM(c2)
 +145278
 +SELECT name
 +FROM information_schema.innodb_metrics
 +WHERE name = 'ibuf_merges_insert' AND count = 0;
 +name
 +FLUSH TABLES test_wl5522.t1 FOR EXPORT;
 +backup: t1
 +UNLOCK TABLES;
 +SELECT name
 +FROM information_schema.innodb_metrics
 +WHERE name = 'ibuf_merges' AND count > 0;
 +name
 +ibuf_merges
 +SELECT name
 +FROM information_schema.innodb_metrics
 +WHERE name = 'ibuf_merges_inserts' AND count > 0;
 +name
 +SET GLOBAL innodb_disable_background_merge=OFF;
 +SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
 +DROP TABLE test_wl5522.t1;
 +CREATE TABLE test_wl5522.t1 (
 +c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 BIGINT,
 +c3 VARCHAR(2048),
 +c4 VARCHAR(2048),
 +INDEX idx1(c2),
 +INDEX idx2(c3(512)),
 +INDEX idx3(c4(512))) Engine=InnoDB
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 +SELECT c1, c2 FROM test_wl5522.t1;
 +c1	c2
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +CHECK TABLE test_wl5522.t1;
 +Table	Op	Msg_type	Msg_text
 +test_wl5522.t1	check	status	OK
 +SELECT c1,c2 FROM test_wl5522.t1;
 +c1	c2
 +2	32
 +3	48
 +4	64
 +6	92
 +7	108
 +8	124
 +13	197
 +14	213
 +15	229
 +17	257
 +18	273
 +19	289
 +28	422
 +29	438
 +30	454
 +32	482
 +33	498
 +34	514
 +36	542
 +37	558
 +38	574
 +40	602
 +41	618
 +42	634
 +59	887
 +60	903
 +61	919
 +63	947
 +64	963
 +65	979
 +67	1007
 +68	1023
 +69	1039
 +71	1067
 +72	1083
 +73	1099
 +75	1127
 +76	1143
 +77	1159
 +79	1187
 +80	1203
 +81	1219
 +83	1247
 +84	1263
 +85	1279
 +87	1307
 +88	1323
 +89	1339
 +122	1832
 +123	1848
 +124	1864
 +126	1892
 +127	1908
 +128	1924
 +130	1952
 +131	1968
 +132	1984
 +134	2012
 +135	2028
 +136	2044
 +138	2072
 +139	2088
 +140	2104
 +142	2132
 +143	2148
 +144	2164
 +146	2192
 +147	2208
 +148	2224
 +150	2252
 +151	2268
 +152	2284
 +154	2312
 +155	2328
 +156	2344
 +158	2372
 +159	2388
 +160	2404
 +162	2432
 +163	2448
 +164	2464
 +166	2492
 +167	2508
 +168	2524
 +170	2552
 +171	2568
 +172	2584
 +174	2612
 +175	2628
 +176	2644
 +178	2672
 +179	2688
 +180	2704
 +182	2732
 +183	2748
 +184	2764
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +COUNT(*)
 +96
 +SELECT SUM(c2) FROM test_wl5522.t1;
 +SUM(c2)
 +145278
 +SHOW CREATE TABLE test_wl5522.t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` bigint(20) NOT NULL AUTO_INCREMENT,
 +  `c2` bigint(20) DEFAULT NULL,
 +  `c3` varchar(2048) DEFAULT NULL,
 +  `c4` varchar(2048) DEFAULT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `idx1` (`c2`),
 +  KEY `idx2` (`c3`(512)),
 +  KEY `idx3` (`c4`(512))
 +) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8
 +DROP TABLE test_wl5522.t1;
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +INSERT INTO test_wl5522.t1 VALUES
 +(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200));
 +Warnings:
 +Warning	1265	Data truncated for column 'c2' at row 1
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +COUNT(*)
 +256
 +FLUSH TABLES test_wl5522.t1 FOR EXPORT;
 +backup: t1
 +UNLOCK TABLES;
 +DROP TABLE test_wl5522.t1;
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Data structure corruption
 +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Index corrupt: Externally stored column(5) has a reference length of 19 in the cluster index GEN_CLUST_INDEX
 +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Incorrect key file for table 't1'; try to repair it
 +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
 +ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1);
 +Warnings:
 +Warning	1814	Tablespace has been discarded for table 't1'
 +SET SESSION debug_dbug="-d,ib_import_create_index_failure_1";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,fil_space_create_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Got error 11 't1.ibd
 +SET SESSION debug_dbug="-d,fil_space_create_failure";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Got error 39 't1.ibd
 +SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +ERROR HY000: Internal error: Cannot reset LSNs in table "test_wl5522"."t1" : Unsupported
 +SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
 +DROP TABLE test_wl5522.t1;
 +unlink: t1.ibd
 +unlink: t1.cfg
 +DROP DATABASE test_wl5522;
 +set global innodb_monitor_disable = all;
 +set global innodb_monitor_reset_all = all;
 +set global innodb_monitor_enable = default;
 +set global innodb_monitor_disable = default;
 +set global innodb_monitor_reset = default;
 +set global innodb_monitor_reset_all = default;
 +Warnings:
 +Error	145	Table './mtr/test_suppressions' is marked as crashed and should be repaired
 +Error	1194	Table 'test_suppressions' is marked as crashed and should be repaired
 +Error	1034	1 client is using or hasn't closed the table properly
 +SET GLOBAL INNODB_FILE_PER_TABLE=1;
 +SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
- SET SESSION innodb_strict_mode=0;
++SET SESSION innodb_strict_mode=1;
diff --cc mysql-test/suite/innodb/r/innodb-wl5522-zip.result
index 67e5976,0000000..562e9f8
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-zip.result
@@@ -1,507 -1,0 +1,507 @@@
 +call mtr.add_suppression("InnoDB: Unable to import tablespace .* because it already exists.  Please DISCARD the tablespace before IMPORT.");
 +DROP TABLE IF EXISTS t1;
 +SET GLOBAL innodb_file_per_table = 1;
 +SELECT @@innodb_file_per_table;
 +@@innodb_file_per_table
 +1
 +SET GLOBAL innodb_file_format = `Barracuda`;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +SELECT @@innodb_file_format;
 +@@innodb_file_format
 +Barracuda
 +SET SESSION innodb_strict_mode=1;
 +SELECT @@SESSION.innodb_strict_mode;
 +@@SESSION.innodb_strict_mode
 +1
 +CREATE TABLE t1
 +(a INT AUTO_INCREMENT PRIMARY KEY,
 +b char(22),
 +c varchar(255),
 +KEY (b))
 +ENGINE = InnoDB ROW_FORMAT=COMPRESSED ;
 +insert into t1 (b, c) values ('Apa', 'Filler........'),
 +('Banan', 'Filler........'), ('Cavalry', '..asdasdfaeraf'),
 +('Devotion', 'asdfuihknaskdf'), ('Evolution', 'lsjndofiabsoibeg');
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +640
 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
 +a	b	c
 +819	Apa	Filler........
 +814	Apa	Filler........
 +809	Apa	Filler........
 +SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
 +a	b	c
 +823	Evolution	lsjndofiabsoibeg
 +822	Devotion	asdfuihknaskdf
 +821	Cavalry	..asdasdfaeraf
 +t1.frm
 +t1.ibd
 +# Restarting server
 +# Done restarting server
 +FLUSH TABLE t1 FOR EXPORT;
 +# List before copying files
 +t1.cfg
 +t1.frm
 +t1.ibd
 +UNLOCK TABLES;
 +INSERT INTO t1 (b, c) SELECT b,c FROM t1 ORDER BY a;
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +1280
 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
 +a	b	c
 +1459	Apa	Filler........
 +1454	Apa	Filler........
 +1449	Apa	Filler........
 +SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
 +a	b	c
 +1463	Evolution	lsjndofiabsoibeg
 +1462	Devotion	asdfuihknaskdf
 +1461	Cavalry	..asdasdfaeraf
 +# Restarting server
 +# Done restarting server
 +# List before t1 DISCARD
 +t1.frm
 +t1.ibd
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +# List after t1 DISCARD
 +t1.frm
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +ALTER TABLE t1 ENGINE InnoDB;
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +640
 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
 +a	b	c
 +819	Apa	Filler........
 +814	Apa	Filler........
 +809	Apa	Filler........
 +SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
 +a	b	c
 +823	Evolution	lsjndofiabsoibeg
 +822	Devotion	asdfuihknaskdf
 +821	Cavalry	..asdasdfaeraf
 +t1.cfg
 +t1.frm
 +t1.ibd
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +640
 +SELECT * FROM t1 ORDER BY b,a DESC LIMIT 3;
 +a	b	c
 +819	Apa	Filler........
 +814	Apa	Filler........
 +809	Apa	Filler........
 +SELECT * FROM t1 ORDER BY a DESC LIMIT 3;
 +a	b	c
 +823	Evolution	lsjndofiabsoibeg
 +822	Devotion	asdfuihknaskdf
 +821	Cavalry	..asdasdfaeraf
 +DROP TABLE t1;
 +SET GLOBAL innodb_file_per_table = 1;
 +SELECT @@innodb_file_per_table;
 +@@innodb_file_per_table
 +1
 +SET GLOBAL innodb_file_format = `Barracuda`;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +SELECT @@innodb_file_format;
 +@@innodb_file_format
 +Barracuda
 +SET SESSION innodb_strict_mode=1;
 +SELECT @@SESSION.innodb_strict_mode;
 +@@SESSION.innodb_strict_mode
 +1
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT) ENGINE=InnoDB  ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
 +INSERT INTO t1(c2) VALUES(1);
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT.
 +SELECT * FROM t1;
 +c1	c2
 +1	1
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT) ENGINE=InnoDB  ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
 +INSERT INTO t1(c2) VALUES(1);
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +t1.frm
 +t1.ibd
 +FLUSH TABLES t1 FOR EXPORT;
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +16
 +backup: t1
 +t1.cfg
 +t1.frm
 +t1.ibd
 +UNLOCK TABLES;
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT) ENGINE=InnoDB  ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +t1.cfg
 +t1.frm
 +t1.ibd
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +CHECK TABLE t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +16
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT) ENGINE=InnoDB  ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +INSERT INTO t1(c2) VALUES(1);
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +t1.frm
 +t1.ibd
 +FLUSH TABLES t1 FOR EXPORT;
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +16
 +backup: t1
 +t1.cfg
 +t1.frm
 +t1.ibd
 +UNLOCK TABLES;
 +t1.frm
 +t1.ibd
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT) ENGINE=InnoDB  ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +t1.cfg
 +t1.frm
 +t1.ibd
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +CHECK TABLE t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +16
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT, INDEX(c2)) ENGINE=InnoDB  
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 +INSERT INTO t1(c2) VALUES(1);
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +FLUSH TABLES t1 FOR EXPORT;
 +SELECT COUNT(*) FROM t1 WHERE c2 = 1;
 +COUNT(*)
 +16
 +backup: t1
 +t1.cfg
 +t1.frm
 +t1.ibd
 +UNLOCK TABLES;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT, INDEX(c2)) ENGINE=InnoDB 
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +CHECK TABLE t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +SELECT COUNT(*) FROM t1 WHERE c2 = 1;
 +COUNT(*)
 +16
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT, INDEX idx(c2)) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
 +INSERT INTO t1(c2) VALUES(1);
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +FLUSH TABLES t1 FOR EXPORT;
 +SELECT COUNT(*) FROM t1 WHERE c2 = 1;
 +COUNT(*)
 +16
 +backup: t1
 +UNLOCK TABLES;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT, INDEX x(c2)) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +ERROR HY000: Schema mismatch (Index x not found in tablespace meta-data file.)
 +ALTER TABLE t1 DROP INDEX x;
 +Warnings:
 +Warning	1814	Tablespace has been discarded for table 't1'
 +ALTER TABLE t1 ADD INDEX idx(c2);
 +Warnings:
 +Warning	1814	Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +CHECK TABLE t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +SELECT * FROM t1;
 +c1	c2
 +1	1
 +2	1
 +3	1
 +4	1
 +6	1
 +7	1
 +8	1
 +9	1
 +13	1
 +14	1
 +15	1
 +16	1
 +17	1
 +18	1
 +19	1
 +20	1
 +unlink: t1.cfg
 +DROP TABLE t1;
 +SET GLOBAL innodb_file_per_table = 0;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT) ENGINE=InnoDB;
 +INSERT INTO t1(c2) VALUES(1);
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +SELECT COUNT(*) FROM t1;
 +COUNT(*)
 +16
 +SHOW CREATE TABLE t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` int(11) NOT NULL AUTO_INCREMENT,
 +  `c2` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`c1`)
 +) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=latin1
 +FLUSH TABLES t1 FOR EXPORT;
 +Warnings:
 +Warning	1809	Table '"test"."t1"' in system tablespace
 +UNLOCK TABLES;
 +DROP TABLE t1;
 +SET GLOBAL innodb_file_per_table = 1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT, INDEX idx(c2)) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED;
 +INSERT INTO t1(c2) VALUES(1);
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +INSERT INTO t1(c2) SELECT c2 FROM t1;
 +SHOW CREATE TABLE t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` int(11) NOT NULL AUTO_INCREMENT,
 +  `c2` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `idx` (`c2`)
 +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 +SELECT * FROM t1;
 +c1	c2
 +1	1
 +2	1
 +3	1
 +4	1
 +6	1
 +7	1
 +8	1
 +9	1
 +13	1
 +14	1
 +15	1
 +16	1
 +17	1
 +18	1
 +19	1
 +20	1
 +28	1
 +29	1
 +30	1
 +31	1
 +32	1
 +33	1
 +34	1
 +35	1
 +36	1
 +37	1
 +38	1
 +39	1
 +40	1
 +41	1
 +42	1
 +43	1
 +FLUSH TABLES t1 FOR EXPORT;
 +backup: t1
 +UNLOCK TABLES;
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +ERROR HY000: Schema mismatch (Number of indexes don't match, table has 1 indexes but the tablespace meta-data file has 2 indexes)
 +unlink: t1.ibd
 +unlink: t1.cfg
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT,
 +c3 INT, INDEX idx(c2)) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +ERROR HY000: Schema mismatch (Number of columns don't match, table has 6 columns but the tablespace meta-data file has 5 columns)
 +unlink: t1.ibd
 +unlink: t1.cfg
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 BIGINT, INDEX idx(c2)) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +ERROR HY000: Schema mismatch (Column c2 precise type mismatch.)
 +unlink: t1.ibd
 +unlink: t1.cfg
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT, INDEX idx(c2)) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +ERROR HY000: Schema mismatch 
 +unlink: t1.ibd
 +unlink: t1.cfg
 +DROP TABLE t1;
 +CREATE TABLE t1(
 +c1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +c2 INT, INDEX idx(c2)) ENGINE=InnoDB
 +ROW_FORMAT=COMPRESSED;
 +ALTER TABLE t1 DISCARD TABLESPACE;
 +SELECT * FROM t1;
 +ERROR HY000: Tablespace has been discarded for table 't1'
 +restore: t1 .ibd and .cfg files
 +ALTER TABLE t1 IMPORT TABLESPACE;
 +CHECK TABLE t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +unlink: t1.cfg
 +SHOW CREATE TABLE t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` int(11) NOT NULL AUTO_INCREMENT,
 +  `c2` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`c1`),
 +  KEY `idx` (`c2`)
 +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 +SELECT * FROM t1;
 +c1	c2
 +1	1
 +2	1
 +3	1
 +4	1
 +6	1
 +7	1
 +8	1
 +9	1
 +13	1
 +14	1
 +15	1
 +16	1
 +17	1
 +18	1
 +19	1
 +20	1
 +28	1
 +29	1
 +30	1
 +31	1
 +32	1
 +33	1
 +34	1
 +35	1
 +36	1
 +37	1
 +38	1
 +39	1
 +40	1
 +41	1
 +42	1
 +43	1
 +DROP TABLE t1;
 +call mtr.add_suppression("Got error -1 when reading table '.*'");
 +call mtr.add_suppression("InnoDB: Error: tablespace id and flags in file '.*'.*");
 +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
 +SET GLOBAL INNODB_FILE_FORMAT=Barracuda;
 +Warnings:
 +Warning	131	Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +SET GLOBAL INNODB_FILE_PER_TABLE=1;
- SET SESSION innodb_strict_mode=0;
++SET SESSION innodb_strict_mode=1;
diff --cc mysql-test/suite/innodb/r/innodb.result
index d278fee,0000000..a8a48a2
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@@ -1,3334 -1,0 +1,3334 @@@
 +set optimizer_switch = 'mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
 +drop table if exists t1,t2,t3,t4;
 +drop database if exists mysqltest;
 +CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
 +INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
 +UPDATE bug58912 SET a=REPEAT('a',7999);
 +create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
 +insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
 +select id, code, name from t1 order by id;
 +id	code	name
 +1	1	Tim
 +2	1	Monty
 +3	2	David
 +4	2	Erik
 +5	3	Sasha
 +6	3	Jeremy
 +7	4	Matt
 +update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
 +select id, code, name from t1 order by id;
 +id	code	name
 +2	1	Monty
 +3	2	David
 +4	2	Erik
 +5	3	Sasha
 +6	3	Jeremy
 +7	4	Matt
 +8	1	Sinisa
 +update ignore t1 set id = id + 10, name = 'Ralph' where id < 4;
 +select id, code, name from t1 order by id;
 +id	code	name
 +3	2	David
 +4	2	Erik
 +5	3	Sasha
 +6	3	Jeremy
 +7	4	Matt
 +8	1	Sinisa
 +12	1	Ralph
 +drop table t1;
 +CREATE TABLE t1 (
 +id int(11) NOT NULL auto_increment,
 +parent_id int(11) DEFAULT '0' NOT NULL,
 +level tinyint(4) DEFAULT '0' NOT NULL,
 +PRIMARY KEY (id),
 +KEY parent_id (parent_id),
 +KEY level (level)
 +) engine=innodb;
 +INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2);
 +update t1 set parent_id=parent_id+100;
 +select * from t1 where parent_id=102;
 +id	parent_id	level
 +8	102	2
 +9	102	2
 +15	102	2
 +update t1 set id=id+1000;
 +update t1 set id=1024 where id=1009;
 +Got one of the listed errors
 +select * from t1;
 +id	parent_id	level
 +1001	100	0
 +1002	101	1
 +1003	101	1
 +1004	101	1
 +1005	101	1
 +1006	101	1
 +1007	101	1
 +1008	102	2
 +1009	102	2
 +1015	102	2
 +1016	103	2
 +1017	103	2
 +1018	103	2
 +1019	103	2
 +1020	103	2
 +1021	104	2
 +1022	104	2
 +1024	104	2
 +1025	105	2
 +1026	105	2
 +1027	105	2
 +1028	105	2
 +1029	105	2
 +1030	105	2
 +1031	106	2
 +1032	106	2
 +1033	106	2
 +1034	106	2
 +1035	106	2
 +1036	107	2
 +1037	107	2
 +1038	107	2
 +1040	107	2
 +1157	100	0
 +1179	105	2
 +1183	104	2
 +1193	105	2
 +1202	107	2
 +1203	107	2
 +update ignore t1 set id=id+1;
 +select * from t1;
 +id	parent_id	level
 +1001	100	0
 +1002	101	1
 +1003	101	1
 +1004	101	1
 +1005	101	1
 +1006	101	1
 +1007	101	1
 +1008	102	2
 +1010	102	2
 +1015	102	2
 +1016	103	2
 +1017	103	2
 +1018	103	2
 +1019	103	2
 +1020	103	2
 +1021	104	2
 +1023	104	2
 +1024	104	2
 +1025	105	2
 +1026	105	2
 +1027	105	2
 +1028	105	2
 +1029	105	2
 +1030	105	2
 +1031	106	2
 +1032	106	2
 +1033	106	2
 +1034	106	2
 +1035	106	2
 +1036	107	2
 +1037	107	2
 +1039	107	2
 +1041	107	2
 +1158	100	0
 +1180	105	2
 +1184	104	2
 +1194	105	2
 +1202	107	2
 +1204	107	2
 +update ignore t1 set id=1023 where id=1010;
 +select * from t1 where parent_id=102;
 +id	parent_id	level
 +1008	102	2
 +1010	102	2
 +1015	102	2
 +explain select level from t1 where level=1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	level	level	1	const	#	Using index
 +explain select level,id from t1 where level=1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	level	level	1	const	#	Using index
 +explain select level,id,parent_id from t1 where level=1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	level	level	1	const	#	
 +select level,id from t1 where level=1;
 +level	id
 +1	1002
 +1	1003
 +1	1004
 +1	1005
 +1	1006
 +1	1007
 +select level,id,parent_id from t1 where level=1;
 +level	id	parent_id
 +1	1002	101
 +1	1003	101
 +1	1004	101
 +1	1005	101
 +1	1006	101
 +1	1007	101
 +optimize table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	optimize	note	Table does not support optimize, doing recreate + analyze instead
 +test.t1	optimize	status	OK
 +show keys from t1;
 +Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_comment
 +t1	0	PRIMARY	1	id	A	#	NULL	NULL		BTREE		
 +t1	1	parent_id	1	parent_id	A	#	NULL	NULL		BTREE		
 +t1	1	level	1	level	A	#	NULL	NULL		BTREE		
 +drop table t1;
 +CREATE TABLE t1 (
 +gesuchnr int(11) DEFAULT '0' NOT NULL,
 +benutzer_id int(11) DEFAULT '0' NOT NULL,
 +PRIMARY KEY (gesuchnr,benutzer_id)
 +) engine=innodb;
 +replace into t1 (gesuchnr,benutzer_id) values (2,1);
 +replace into t1 (gesuchnr,benutzer_id) values (1,1);
 +replace into t1 (gesuchnr,benutzer_id) values (1,1);
 +select * from t1;
 +gesuchnr	benutzer_id
 +1	1
 +2	1
 +drop table t1;
 +create table t1 (a int) engine=innodb;
 +insert into t1 values (1), (2);
 +optimize table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	optimize	note	Table does not support optimize, doing recreate + analyze instead
 +test.t1	optimize	status	OK
 +delete from t1 where a = 1;
 +select * from t1;
 +a
 +2
 +check table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	check	status	OK
 +drop table t1;
 +create table t1 (a int,b varchar(20)) engine=innodb;
 +insert into t1 values (1,""), (2,"testing");
 +delete from t1 where a = 1;
 +select * from t1;
 +a	b
 +2	testing
 +create index skr on t1 (a);
 +insert into t1 values (3,""), (4,"testing");
 +analyze table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	analyze	status	OK
 +show keys from t1;
 +Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_comment
 +t1	1	skr	1	a	A	#	NULL	NULL	YES	BTREE		
 +drop table t1;
 +create table t1 (a int,b varchar(20),key(a)) engine=innodb;
 +insert into t1 values (1,""), (2,"testing");
 +select * from t1 where a = 1;
 +a	b
 +1	
 +drop table t1;
 +create table t1 (n int not null primary key) engine=innodb;
 +set autocommit=0;
 +insert into t1 values (4);
 +rollback;
 +select n, "after rollback" from t1;
 +n	after rollback
 +insert into t1 values (4);
 +commit;
 +select n, "after commit" from t1;
 +n	after commit
 +4	after commit
 +commit;
 +insert into t1 values (5);
 +insert into t1 values (4);
 +ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
 +commit;
 +select n, "after commit" from t1;
 +n	after commit
 +4	after commit
 +5	after commit
 +set autocommit=1;
 +insert into t1 values (6);
 +insert into t1 values (4);
 +ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
 +select n from t1;
 +n
 +4
 +5
 +6
 +set autocommit=0;
 +begin;
 +savepoint `my_savepoint`;
 +insert into t1 values (7);
 +savepoint `savept2`;
 +insert into t1 values (3);
 +select n from t1;
 +n
 +3
 +4
 +5
 +6
 +7
 +savepoint savept3;
 +rollback to savepoint savept2;
 +rollback to savepoint savept3;
 +ERROR 42000: SAVEPOINT savept3 does not exist
 +rollback to savepoint savept2;
 +release savepoint `my_savepoint`;
 +select n from t1;
 +n
 +4
 +5
 +6
 +7
 +rollback to savepoint `my_savepoint`;
 +ERROR 42000: SAVEPOINT my_savepoint does not exist
 +rollback to savepoint savept2;
 +ERROR 42000: SAVEPOINT savept2 does not exist
 +insert into t1 values (8);
 +savepoint sv;
 +commit;
 +savepoint sv;
 +set autocommit=1;
 +rollback;
 +drop table t1;
 +create table t1 (n int not null primary key) engine=innodb;
 +start transaction;
 +insert into t1 values (4);
 +flush tables with read lock;
 +commit;
 +unlock tables;
 +commit;
 +select * from t1;
 +n
 +4
 +drop table t1;
 +create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=innodb;
 +begin;
 +insert into t1 values(1,'hamdouni');
 +select id as afterbegin_id,nom as afterbegin_nom from t1;
 +afterbegin_id	afterbegin_nom
 +1	hamdouni
 +rollback;
 +select id as afterrollback_id,nom as afterrollback_nom from t1;
 +afterrollback_id	afterrollback_nom
 +set autocommit=0;
 +insert into t1 values(2,'mysql');
 +select id as afterautocommit0_id,nom as afterautocommit0_nom from t1;
 +afterautocommit0_id	afterautocommit0_nom
 +2	mysql
 +rollback;
 +select id as afterrollback_id,nom as afterrollback_nom from t1;
 +afterrollback_id	afterrollback_nom
 +set autocommit=1;
 +drop table t1;
 +CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb;
 +insert into t1 values ('pippo', 12);
 +insert into t1 values ('pippo', 12);
 +ERROR 23000: Duplicate entry 'pippo' for key 'PRIMARY'
 +delete from t1;
 +delete from t1 where id = 'pippo';
 +select * from t1;
 +id	val
 +insert into t1 values ('pippo', 12);
 +set autocommit=0;
 +delete from t1;
 +rollback;
 +select * from t1;
 +id	val
 +pippo	12
 +delete from t1;
 +commit;
 +select * from t1;
 +id	val
 +drop table t1;
 +create table t1 (a integer) engine=innodb;
 +start transaction;
 +rename table t1 to t2;
 +create table t1 (b integer) engine=innodb;
 +insert into t1 values (1);
 +rollback;
 +drop table t1;
 +rename table t2 to t1;
 +drop table t1;
 +set autocommit=1;
 +CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) ENGINE=innodb;
 +INSERT INTO t1 VALUES (1, 'Jochen');
 +select * from t1;
 +ID	NAME
 +1	Jochen
 +drop table t1;
 +CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) ENGINE=innodb;
 +set autocommit=0;
 +INSERT INTO t1  SET _userid='marc at anyware.co.uk';
 +COMMIT;
 +SELECT * FROM t1;
 +_userid
 +marc at anyware.co.uk
 +SELECT _userid FROM t1 WHERE _userid='marc at anyware.co.uk';
 +_userid
 +marc at anyware.co.uk
 +drop table t1;
 +set autocommit=1;
 +CREATE TABLE t1 (
 +user_id int(10) DEFAULT '0' NOT NULL,
 +name varchar(100),
 +phone varchar(100),
 +ref_email varchar(100) DEFAULT '' NOT NULL,
 +detail varchar(200),
 +PRIMARY KEY (user_id,ref_email)
 +)engine=innodb;
 +INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777 at hotmail.com','xxx'),(10292,'shirish','2333604','shirish at yahoo.com','ddsds'),(10292,'sonali','323232','sonali at bolly.com','filmstar');
 +select * from t1 where user_id=10292;
 +user_id	name	phone	ref_email	detail
 +10292	sanjeev	29153373	sansh777 at hotmail.com	xxx
 +10292	shirish	2333604	shirish at yahoo.com	ddsds
 +10292	sonali	323232	sonali at bolly.com	filmstar
 +INSERT INTO t1 VALUES (10291,'sanjeev','29153373','sansh777 at hotmail.com','xxx'),(10293,'shirish','2333604','shirish at yahoo.com','ddsds');
 +select * from t1 where user_id=10292;
 +user_id	name	phone	ref_email	detail
 +10292	sanjeev	29153373	sansh777 at hotmail.com	xxx
 +10292	shirish	2333604	shirish at yahoo.com	ddsds
 +10292	sonali	323232	sonali at bolly.com	filmstar
 +select * from t1 where user_id>=10292;
 +user_id	name	phone	ref_email	detail
 +10292	sanjeev	29153373	sansh777 at hotmail.com	xxx
 +10292	shirish	2333604	shirish at yahoo.com	ddsds
 +10292	sonali	323232	sonali at bolly.com	filmstar
 +10293	shirish	2333604	shirish at yahoo.com	ddsds
 +select * from t1 where user_id>10292;
 +user_id	name	phone	ref_email	detail
 +10293	shirish	2333604	shirish at yahoo.com	ddsds
 +select * from t1 where user_id<10292;
 +user_id	name	phone	ref_email	detail
 +10291	sanjeev	29153373	sansh777 at hotmail.com	xxx
 +drop table t1;
 +CREATE TABLE t1 (a int not null, b int not null,c int not null,
 +key(a),primary key(a,b), unique(c),key(a),unique(b));
 +Warnings:
 +Note	1831	Duplicate index 'a_2' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
 +show index from t1;
 +Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_comment
 +t1	0	PRIMARY	1	a	A	#	NULL	NULL		BTREE		
 +t1	0	PRIMARY	2	b	A	#	NULL	NULL		BTREE		
 +t1	0	c	1	c	A	#	NULL	NULL		BTREE		
 +t1	0	b	1	b	A	#	NULL	NULL		BTREE		
 +t1	1	a	1	a	A	#	NULL	NULL		BTREE		
 +t1	1	a_2	1	a	A	#	NULL	NULL		BTREE		
 +drop table t1;
 +create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
 +alter table t1 engine=innodb;
 +insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4');
 +select * from t1;
 +col1	col2
 +1	1
 +2	3
 +3	4
 +4	4
 +5	2
 +update t1 set col2='7' where col1='4';
 +select * from t1;
 +col1	col2
 +1	1
 +2	3
 +3	4
 +4	7
 +5	2
 +alter table t1 add co3 int not null;
 +select * from t1;
 +col1	col2	co3
 +1	1	0
 +2	3	0
 +3	4	0
 +4	7	0
 +5	2	0
 +update t1 set col2='9' where col1='2';
 +select * from t1;
 +col1	col2	co3
 +1	1	0
 +2	9	0
 +3	4	0
 +4	7	0
 +5	2	0
 +drop table t1;
 +create table t1 (a int not null , b int, primary key (a)) engine = innodb;
 +create table t2 (a int not null , b int, primary key (a)) engine = myisam;
 +insert into t1 VALUES (1,3) , (2,3), (3,3);
 +select * from t1;
 +a	b
 +1	3
 +2	3
 +3	3
 +insert into t2 select * from t1;
 +select * from t2;
 +a	b
 +1	3
 +2	3
 +3	3
 +delete from t1 where b = 3;
 +select * from t1;
 +a	b
 +insert into t1 select * from t2;
 +select * from t1;
 +a	b
 +1	3
 +2	3
 +3	3
 +select * from t2;
 +a	b
 +1	3
 +2	3
 +3	3
 +drop table t1,t2;
 +CREATE TABLE t1 (
 +user_name varchar(12),
 +password text,
 +subscribed char(1),
 +user_id int(11) DEFAULT '0' NOT NULL,
 +quota bigint(20),
 +weight double,
 +access_date date,
 +access_time time,
 +approved datetime,
 +dummy_primary_key int(11) NOT NULL auto_increment,
 +PRIMARY KEY (dummy_primary_key)
 +) ENGINE=innodb;
 +INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1);
 +INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2);
 +INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3);
 +INSERT INTO t1 VALUES ('user_3','somepassword','Y',3,3,1.7320508075689,'2000-09-07','23:06:59','2000-09-07 23:06:59',4);
 +INSERT INTO t1 VALUES ('user_4','somepassword','N',4,4,2,'2000-09-07','23:06:59','2000-09-07 23:06:59',5);
 +select  user_name, password , subscribed, user_id, quota, weight, access_date, access_time, approved, dummy_primary_key from t1 order by user_name;
 +user_name	password	subscribed	user_id	quota	weight	access_date	access_time	approved	dummy_primary_key
 +user_0	somepassword	N	0	0	0	2000-09-07	23:06:59	2000-09-07 23:06:59	1
 +user_1	somepassword	Y	1	1	1	2000-09-07	23:06:59	2000-09-07 23:06:59	2
 +user_2	somepassword	N	2	2	1.4142135623731	2000-09-07	23:06:59	2000-09-07 23:06:59	3
 +user_3	somepassword	Y	3	3	1.7320508075689	2000-09-07	23:06:59	2000-09-07 23:06:59	4
 +user_4	somepassword	N	4	4	2	2000-09-07	23:06:59	2000-09-07 23:06:59	5
 +drop table t1;
 +CREATE TABLE t1 (
 +id int(11) NOT NULL auto_increment,
 +parent_id int(11) DEFAULT '0' NOT NULL,
 +level tinyint(4) DEFAULT '0' NOT NULL,
 +KEY (id),
 +KEY parent_id (parent_id),
 +KEY level (level)
 +) engine=innodb;
 +INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1);
 +INSERT INTO t1 values (179,5,2);
 +update t1 set parent_id=parent_id+100;
 +select * from t1 where parent_id=102;
 +id	parent_id	level
 +8	102	2
 +9	102	2
 +15	102	2
 +update t1 set id=id+1000;
 +update t1 set id=1024 where id=1009;
 +select * from t1;
 +id	parent_id	level
 +1001	100	0
 +1003	101	1
 +1004	101	1
 +1008	102	2
 +1024	102	2
 +1017	103	2
 +1022	104	2
 +1024	104	2
 +1028	105	2
 +1029	105	2
 +1030	105	2
 +1031	106	2
 +1032	106	2
 +1033	106	2
 +1203	107	2
 +1202	107	2
 +1020	103	2
 +1157	100	0
 +1193	105	2
 +1040	107	2
 +1002	101	1
 +1015	102	2
 +1006	101	1
 +1034	106	2
 +1035	106	2
 +1016	103	2
 +1007	101	1
 +1036	107	2
 +1018	103	2
 +1026	105	2
 +1027	105	2
 +1183	104	2
 +1038	107	2
 +1025	105	2
 +1037	107	2
 +1021	104	2
 +1019	103	2
 +1005	101	1
 +1179	105	2
 +update ignore t1 set id=id+1;
 +select * from t1;
 +id	parent_id	level
 +1002	100	0
 +1004	101	1
 +1005	101	1
 +1009	102	2
 +1025	102	2
 +1018	103	2
 +1023	104	2
 +1025	104	2
 +1029	105	2
 +1030	105	2
 +1031	105	2
 +1032	106	2
 +1033	106	2
 +1034	106	2
 +1204	107	2
 +1203	107	2
 +1021	103	2
 +1158	100	0
 +1194	105	2
 +1041	107	2
 +1003	101	1
 +1016	102	2
 +1007	101	1
 +1035	106	2
 +1036	106	2
 +1017	103	2
 +1008	101	1
 +1037	107	2
 +1019	103	2
 +1027	105	2
 +1028	105	2
 +1184	104	2
 +1039	107	2
 +1026	105	2
 +1038	107	2
 +1022	104	2
 +1020	103	2
 +1006	101	1
 +1180	105	2
 +update ignore t1 set id=1023 where id=1010;
 +select * from t1 where parent_id=102;
 +id	parent_id	level
 +1009	102	2
 +1025	102	2
 +1016	102	2
 +explain select level from t1 where level=1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	level	level	1	const	#	Using index
 +select level,id from t1 where level=1;
 +level	id
 +1	1004
 +1	1005
 +1	1003
 +1	1007
 +1	1008
 +1	1006
 +select level,id,parent_id from t1 where level=1;
 +level	id	parent_id
 +1	1004	101
 +1	1005	101
 +1	1003	101
 +1	1007	101
 +1	1008	101
 +1	1006	101
 +select level,id from t1 where level=1 order by id;
 +level	id
 +1	1003
 +1	1004
 +1	1005
 +1	1006
 +1	1007
 +1	1008
 +delete from t1 where level=1;
 +select * from t1;
 +id	parent_id	level
 +1002	100	0
 +1009	102	2
 +1025	102	2
 +1018	103	2
 +1023	104	2
 +1025	104	2
 +1029	105	2
 +1030	105	2
 +1031	105	2
 +1032	106	2
 +1033	106	2
 +1034	106	2
 +1204	107	2
 +1203	107	2
 +1021	103	2
 +1158	100	0
 +1194	105	2
 +1041	107	2
 +1016	102	2
 +1035	106	2
 +1036	106	2
 +1017	103	2
 +1037	107	2
 +1019	103	2
 +1027	105	2
 +1028	105	2
 +1184	104	2
 +1039	107	2
 +1026	105	2
 +1038	107	2
 +1022	104	2
 +1020	103	2
 +1180	105	2
 +drop table t1;
 +CREATE TABLE t1 (
 +sca_code char(6) NOT NULL,
 +cat_code char(6) NOT NULL,
 +sca_desc varchar(50),
 +lan_code char(2) NOT NULL,
 +sca_pic varchar(100),
 +sca_sdesc varchar(50),
 +sca_sch_desc varchar(16),
 +PRIMARY KEY (sca_code, cat_code, lan_code),
 +INDEX sca_pic (sca_pic)
 +) engine = innodb ;
 +INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
 +select count(*) from t1 where sca_code = 'PD';
 +count(*)
 +1
 +select count(*) from t1 where sca_code <= 'PD';
 +count(*)
 +1
 +select count(*) from t1 where sca_pic is null;
 +count(*)
 +2
 +alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
 +select count(*) from t1 where sca_code='PD' and sca_pic is null;
 +count(*)
 +1
 +select count(*) from t1 where cat_code='E';
 +count(*)
 +0
 +alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
 +select count(*) from t1 where sca_code='PD' and sca_pic is null;
 +count(*)
 +1
 +select count(*) from t1 where sca_pic >= 'n';
 +count(*)
 +1
 +select sca_pic from t1 where sca_pic is null;
 +sca_pic
 +NULL
 +NULL
 +update t1 set sca_pic="test" where sca_pic is null;
 +delete from t1 where sca_code='pd';
 +drop table t1;
 +set @a:=now();
 +CREATE TABLE t1 (a int not null, b timestamp not null default 
 +current_timestamp on update current_timestamp, primary key (a)) engine=innodb;
 +insert into t1 (a) values(1),(2),(3);
 +select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
 +a
 +1
 +2
 +3
 +select a from t1 natural join t1 as t2 where b >= @a order by a;
 +a
 +1
 +2
 +3
 +update t1 set a=5 where a=1;
 +select a from t1;
 +a
 +2
 +3
 +5
 +drop table t1;
 +create table t1 (a varchar(100) not null, primary key(a), b int not null) engine=innodb;
 +insert into t1 values("hello",1),("world",2);
 +select * from t1 order by b desc;
 +a	b
 +world	2
 +hello	1
 +optimize table t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	optimize	note	Table does not support optimize, doing recreate + analyze instead
 +test.t1	optimize	status	OK
 +show keys from t1;
 +Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment	Index_comment
 +t1	0	PRIMARY	1	a	A	#	NULL	NULL		BTREE		
 +drop table t1;
 +create table t1 (i int, j int ) ENGINE=innodb;
 +insert into t1 values (1,2);
 +select * from t1 where i=1 and j=2;
 +i	j
 +1	2
 +create index ax1 on t1 (i,j);
 +select * from t1 where i=1 and j=2;
 +i	j
 +1	2
 +drop table t1;
 +CREATE TABLE t1 (
 +a int3 unsigned NOT NULL,
 +b int1 unsigned NOT NULL,
 +UNIQUE (a, b)
 +) ENGINE = innodb;
 +INSERT INTO t1 VALUES (1, 1);
 +SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1;
 +MIN(B)	MAX(b)
 +1	1
 +drop table t1;
 +CREATE TABLE t1 (a int unsigned NOT NULL) engine=innodb;
 +INSERT INTO t1 VALUES (1);
 +SELECT * FROM t1;
 +a
 +1
 +DROP TABLE t1;
 +create table t1 (a int  primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) engine = innodb;
 +insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
 +explain select * from t1 where a > 0 and a < 50;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	range	PRIMARY	PRIMARY	4	NULL	#	Using index condition
 +drop table t1;
 +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
 +insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
 +LOCK TABLES t1 WRITE;
 +insert into t1 values (99,1,2,'D'),(1,1,2,'D');
 +ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
 +select id from t1;
 +id
 +0
 +1
 +2
 +select id from t1;
 +id
 +0
 +1
 +2
 +UNLOCK TABLES;
 +DROP TABLE t1;
 +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
 +insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
 +LOCK TABLES t1 WRITE;
 +begin;
 +insert into t1 values (99,1,2,'D'),(1,1,2,'D');
 +ERROR 23000: Duplicate entry '1-1' for key 'PRIMARY'
 +select id from t1;
 +id
 +0
 +1
 +2
 +insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
 +Warnings:
 +Warning	1062	Duplicate entry '1-1' for key 'PRIMARY'
 +commit;
 +select id,id3 from t1;
 +id	id3
 +0	0
 +1	1
 +2	2
 +100	2
 +UNLOCK TABLES;
 +DROP TABLE t1;
 +create table t1 (a char(20), unique (a(5))) engine=innodb;
 +drop table t1;
 +create table t1 (a char(20), index (a(5))) engine=innodb;
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `a` char(20) DEFAULT NULL,
 +  KEY `a` (`a`(5))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create temporary table t1 (a int not null auto_increment, primary key(a)) engine=innodb;
 +insert into t1 values (NULL),(NULL),(NULL);
 +delete from t1 where a=3;
 +insert into t1 values (NULL);
 +select * from t1;
 +a
 +1
 +2
 +4
 +alter table t1 add b int;
 +select * from t1;
 +a	b
 +1	NULL
 +2	NULL
 +4	NULL
 +drop table t1;
 +create table t1
 +(
 +id int auto_increment primary key,
 +name varchar(32) not null,
 +value text not null,
 +uid int not null,
 +unique key(name,uid)
 +) engine=innodb;
 +insert into t1 values (1,'one','one value',101),
 +(2,'two','two value',102),(3,'three','three value',103);
 +set insert_id=5;
 +replace into t1 (value,name,uid) values ('other value','two',102);
 +delete from t1 where uid=102;
 +set insert_id=5;
 +replace into t1 (value,name,uid) values ('other value','two',102);
 +set insert_id=6;
 +replace into t1 (value,name,uid) values ('other value','two',102);
 +select * from t1;
 +id	name	value	uid
 +1	one	one value	101
 +3	three	three value	103
 +6	two	other value	102
 +drop table t1;
 +create database mysqltest;
 +create table mysqltest.t1 (a int not null) engine= innodb;
 +insert into mysqltest.t1 values(1);
 +create table mysqltest.t2 (a int not null) engine= myisam;
 +insert into mysqltest.t2 values(1);
 +create table mysqltest.t3 (a int not null) engine= heap;
 +insert into mysqltest.t3 values(1);
 +commit;
 +drop database mysqltest;
 +show tables from mysqltest;
 +ERROR 42000: Unknown database 'mysqltest'
 +set autocommit=0;
 +create table t1 (a int not null) engine= innodb;
 +insert into t1 values(1),(2);
 +truncate table t1;
 +commit;
 +truncate table t1;
 +truncate table t1;
 +select * from t1;
 +a
 +insert into t1 values(1),(2);
 +delete from t1;
 +select * from t1;
 +a
 +commit;
 +drop table t1;
 +set autocommit=1;
 +create table t1 (a int not null) engine= innodb;
 +insert into t1 values(1),(2);
 +truncate table t1;
 +insert into t1 values(1),(2);
 +select * from t1;
 +a
 +1
 +2
 +truncate table t1;
 +insert into t1 values(1),(2);
 +delete from t1;
 +select * from t1;
 +a
 +drop table t1;
 +create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=innodb;
 +insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
 +explain select * from t1 order by a;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	PRIMARY	4	NULL	#	
 +explain select * from t1 order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	#	Using filesort
 +explain select * from t1 order by c;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	#	Using filesort
 +explain select a from t1 order by a;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	PRIMARY	4	NULL	#	Using index
 +explain select b from t1 order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	4	NULL	#	Using index
 +explain select a,b from t1 order by b;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	4	NULL	#	Using index
 +explain select a,b from t1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	NULL	b	4	NULL	#	Using index
 +explain select a,b,c from t1;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	#	
 +drop table t1;
 +create table t1 (t int not null default 1, key (t)) engine=innodb;
 +desc t1;
 +Field	Type	Null	Key	Default	Extra
 +t	int(11)	NO	MUL	1	
 +drop table t1;
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +CREATE TABLE t1 (
 +number bigint(20) NOT NULL default '0',
 +cname char(15) NOT NULL default '',
 +carrier_id smallint(6) NOT NULL default '0',
 +privacy tinyint(4) NOT NULL default '0',
 +last_mod_date timestamp NOT NULL,
 +last_mod_id smallint(6) NOT NULL default '0',
 +last_app_date timestamp NOT NULL,
 +last_app_id smallint(6) default '-1',
 +version smallint(6) NOT NULL default '0',
 +assigned_scps int(11) default '0',
 +status tinyint(4) default '0'
 +) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
 +INSERT INTO t1 VALUES (9197722223,'berry',90,3,20020111112809,500,20020102114532,501,4,10,0);
 +INSERT INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
 +INSERT INTO t1 VALUES (302467,'Sue\'s Subshop',90,3,20020109113241,500,20020102115111,501,7,24,0);
 +INSERT INTO t1 VALUES (6014911113,'SudzCarwash',520,1,20020102115234,500,20020102115259,501,33,32768,0);
 +INSERT INTO t1 VALUES (333,'tubs',99,2,20020109113440,501,20020109113440,500,3,10,0);
 +CREATE TABLE t2 (
 +number bigint(20) NOT NULL default '0',
 +cname char(15) NOT NULL default '',
 +carrier_id smallint(6) NOT NULL default '0',
 +privacy tinyint(4) NOT NULL default '0',
 +last_mod_date timestamp NOT NULL,
 +last_mod_id smallint(6) NOT NULL default '0',
 +last_app_date timestamp NOT NULL,
 +last_app_id smallint(6) default '-1',
 +version smallint(6) NOT NULL default '0',
 +assigned_scps int(11) default '0',
 +status tinyint(4) default '0'
 +) ENGINE=InnoDB;
 +INSERT INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
 +INSERT INTO t2 VALUES (9197722223,'berry',90,3,20020111112818,500,20020102114532,501,4,10,0);
 +INSERT INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
 +INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
 +select * from t1;
 +number	cname	carrier_id	privacy	last_mod_date	last_mod_id	last_app_date	last_app_id	version	assigned_scps	status
 +4077711111	SeanWheeler	90	2	2002-01-11 11:28:46	500	0000-00-00 00:00:00	-1	2	3	1
 +9197722223	berry	90	3	2002-01-11 11:28:09	500	2002-01-02 11:45:32	501	4	10	0
 +650	San Francisco	0	0	2001-12-27 11:13:36	342	0000-00-00 00:00:00	-1	1	24	1
 +302467	Sue's Subshop	90	3	2002-01-09 11:32:41	500	2002-01-02 11:51:11	501	7	24	0
 +6014911113	SudzCarwash	520	1	2002-01-02 11:52:34	500	2002-01-02 11:52:59	501	33	32768	0
 +333	tubs	99	2	2002-01-09 11:34:40	501	2002-01-09 11:34:40	500	3	10	0
 +select * from t2;
 +number	cname	carrier_id	privacy	last_mod_date	last_mod_id	last_app_date	last_app_id	version	assigned_scps	status
 +4077711111	SeanWheeler	0	2	2002-01-11 11:28:53	500	0000-00-00 00:00:00	-1	2	3	1
 +9197722223	berry	90	3	2002-01-11 11:28:18	500	2002-01-02 11:45:32	501	4	10	0
 +650	San Francisco	90	0	2002-01-09 11:31:58	342	0000-00-00 00:00:00	-1	1	24	1
 +333	tubs	99	2	2002-01-09 11:34:53	501	2002-01-09 11:34:53	500	3	10	0
 +delete t1, t2 from t1 left join t2 on t1.number=t2.number where (t1.carrier_id=90 and t1.number=t2.number) or (t2.carrier_id=90 and t1.number=t2.number) or  (t1.carrier_id=90 and t2.number is null);
 +select * from t1;
 +number	cname	carrier_id	privacy	last_mod_date	last_mod_id	last_app_date	last_app_id	version	assigned_scps	status
 +6014911113	SudzCarwash	520	1	2002-01-02 11:52:34	500	2002-01-02 11:52:59	501	33	32768	0
 +333	tubs	99	2	2002-01-09 11:34:40	501	2002-01-09 11:34:40	500	3	10	0
 +select * from t2;
 +number	cname	carrier_id	privacy	last_mod_date	last_mod_id	last_app_date	last_app_id	version	assigned_scps	status
 +333	tubs	99	2	2002-01-09 11:34:53	501	2002-01-09 11:34:53	500	3	10	0
 +select * from t2;
 +number	cname	carrier_id	privacy	last_mod_date	last_mod_id	last_app_date	last_app_id	version	assigned_scps	status
 +333	tubs	99	2	2002-01-09 11:34:53	501	2002-01-09 11:34:53	500	3	10	0
 +drop table t1,t2;
 +SET sql_mode = default;
 +create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
 +BEGIN;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +SELECT @@tx_isolation,@@global.tx_isolation;
 +@@tx_isolation	@@global.tx_isolation
 +SERIALIZABLE	REPEATABLE-READ
 +insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
 +select id, code, name from t1 order by id;
 +id	code	name
 +1	1	Tim
 +2	1	Monty
 +3	2	David
 +COMMIT;
 +BEGIN;
 +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
 +insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
 +select id, code, name from t1 order by id;
 +id	code	name
 +1	1	Tim
 +2	1	Monty
 +3	2	David
 +4	2	Erik
 +5	3	Sasha
 +COMMIT;
 +SET binlog_format='MIXED';
 +BEGIN;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 +insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
 +select id, code, name from t1 order by id;
 +id	code	name
 +1	1	Tim
 +2	1	Monty
 +3	2	David
 +4	2	Erik
 +5	3	Sasha
 +6	3	Jeremy
 +7	4	Matt
 +COMMIT;
 +DROP TABLE t1;
 +create table t1 (n int(10), d int(10)) engine=innodb;
 +create table t2 (n int(10), d int(10)) engine=innodb;
 +insert into t1 values(1,1),(1,2);
 +insert into t2 values(1,10),(2,20);
 +UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
 +select * from t1;
 +n	d
 +1	10
 +1	10
 +select * from t2;
 +n	d
 +1	30
 +2	20
 +drop table t1,t2;
 +drop table if exists t1, t2;
 +CREATE TABLE t1 (a int, PRIMARY KEY (a));
 +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
 +create trigger trg_del_t2 after  delete on t2 for each row
 +insert into t1 values (1);
 +insert into t1 values (1);
 +insert into t2 values (1),(2);
 +delete t2 from t2;
 +ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
 +count(*)
 +2
 +drop table t1, t2;
 +drop table if exists t1, t2;
 +CREATE TABLE t1 (a int, PRIMARY KEY (a));
 +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
 +create trigger trg_del_t2 after  delete on t2 for each row
 +insert into t1 values (1);
 +insert into t1 values (1);
 +insert into t2 values (1),(2);
 +delete t2 from t2;
 +ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
 +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
 +count(*)
 +2
 +drop table t1, t2;
 +create table t1 (a int, b int) engine=innodb;
 +insert into t1 values(20,null);
 +select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
 +t2.b=t3.a;
 +b	ifnull(t2.b,"this is null")
 +NULL	this is null
 +select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
 +t2.b=t3.a order by 1;
 +b	ifnull(t2.b,"this is null")
 +NULL	this is null
 +insert into t1 values(10,null);
 +select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
 +t2.b=t3.a order by 1;
 +b	ifnull(t2.b,"this is null")
 +NULL	this is null
 +NULL	this is null
 +drop table t1;
 +create table t1 (a varchar(10) not null) engine=myisam;
 +create table t2 (b varchar(10) not null unique) engine=innodb;
 +select t1.a from t1,t2 where t1.a=t2.b;
 +a
 +drop table t1,t2;
 +create table t1 (a int not null, b int, primary key (a)) engine = innodb;
 +create table t2 (a int not null, b int, primary key (a)) engine = innodb;
 +insert into t1 values (10, 20);
 +insert into t2 values (10, 20);
 +update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;
 +drop table t1,t2;
 +CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
 +CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (t1_id) REFERENCES t1(id)  ON DELETE CASCADE ) ENGINE=INNODB;
 +insert into t1 set id=1;
 +insert into t2 set id=1, t1_id=1;
 +delete t1,t2 from t1,t2 where t1.id=t2.t1_id;
 +select * from t1;
 +id
 +select * from t2;
 +id	t1_id
 +drop table t2,t1;
 +CREATE TABLE t1(id INT NOT NULL,  PRIMARY KEY (id)) ENGINE=INNODB;
 +CREATE TABLE t2(id  INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id)  ) ENGINE=INNODB;
 +INSERT INTO t1 VALUES(1);
 +INSERT INTO t2 VALUES(1, 1);
 +SELECT * from t1;
 +id
 +1
 +UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
 +SELECT * from t1;
 +id
 +2
 +UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
 +SELECT * from t1;
 +id
 +3
 +DROP TABLE t1,t2;
 +set autocommit=0;
 +CREATE TABLE t1 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
 +CREATE TABLE t2 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
 +CREATE TABLE t3 (id1 CHAR(15) NOT NULL, id2 CHAR(15) NOT NULL, PRIMARY KEY(id1, id2)) ENGINE=InnoDB;
 +INSERT INTO t3 VALUES("my-test-1", "my-test-2");
 +COMMIT;
 +INSERT INTO t1 VALUES("this-key", "will disappear");
 +INSERT INTO t2 VALUES("this-key", "will also disappear");
 +DELETE FROM t3 WHERE id1="my-test-1";
 +SELECT * FROM t1;
 +id	value
 +this-key	will disappear
 +SELECT * FROM t2;
 +id	value
 +this-key	will also disappear
 +SELECT * FROM t3;
 +id1	id2
 +ROLLBACK;
 +SELECT * FROM t1;
 +id	value
 +SELECT * FROM t2;
 +id	value
 +SELECT * FROM t3;
 +id1	id2
 +my-test-1	my-test-2
 +SELECT * FROM t3 WHERE id1="my-test-1" LOCK IN SHARE MODE;
 +id1	id2
 +my-test-1	my-test-2
 +COMMIT;
 +set autocommit=1;
 +DROP TABLE t1,t2,t3;
 +CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) engine=innodb;
 +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
 +UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
 +SELECT * from t1;
 +a	b
 +1	1
 +102	2
 +103	3
 +4	4
 +5	5
 +6	6
 +7	7
 +8	8
 +9	9
 +drop table t1;
 +CREATE TABLE t2 (   NEXT_T         BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
 +CREATE TABLE t1 (  B_ID           INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
 +SET AUTOCOMMIT=0;
 +INSERT INTO t1 ( B_ID ) VALUES ( 1 );
 +INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
 +ROLLBACK;
 +Warnings:
 +Warning	1196	Some non-transactional changed tables couldn't be rolled back
 +SELECT * FROM t1;
 +B_ID
 +drop table  t1,t2;
 +create table t1  ( pk         int primary key,    parent     int not null,    child      int not null,       index (parent)  ) engine = innodb;
 +insert into t1 values   (1,0,4),  (2,1,3),  (3,2,1),  (4,1,2);
 +select distinct  parent,child   from t1   order by parent;
 +parent	child
 +0	4
 +1	2
 +1	3
 +2	1
 +drop table t1;
 +create table t1 (a int not null auto_increment primary key, b int, c int, key(c)) engine=innodb;
 +create table t2 (a int not null auto_increment primary key, b int);
 +insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null);
 +insert into t2 (a) select b from t1;
 +insert into t1 (b) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +select count(*) from t1;
 +count(*)
 +623
 +explain select * from t1 where c between 1 and 2500;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	range	c	c	5	NULL	#	#
 +update t1 set c=a;
 +explain select * from t1 where c between 1 and 2500;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	c	NULL	NULL	NULL	#	#
 +drop table t1,t2;
 +create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=innodb;
 +insert into t1 (id) values (null),(null),(null),(null),(null);
 +update t1 set fk=69 where fk is null order by id limit 1;
 +SELECT * from t1;
 +id	fk
 +2	NULL
 +3	NULL
 +4	NULL
 +5	NULL
 +1	69
 +drop table t1;
 +create table t1 (a int not null, b int not null, key (a));
 +insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
 +SET @tmp=0;
 +update t1 set b=(@tmp:=@tmp+1) order by a;
 +update t1 set b=99 where a=1 order by b asc limit 1;
 +update t1 set b=100 where a=1 order by b desc limit 2;
 +update t1 set a=a+10+b where a=1 order by b;
 +select * from t1 order by a,b;
 +a	b
 +2	4
 +2	5
 +2	6
 +3	7
 +3	8
 +3	9
 +3	10
 +3	11
 +3	12
 +13	2
 +111	100
 +111	100
 +drop table t1;
 +create table t1 ( c char(8) not null ) engine=innodb;
 +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
 +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
 +alter table t1 add b char(8) not null;
 +alter table t1 add a char(8) not null;
 +alter table t1 add primary key (a,b,c);
 +update t1 set a=c, b=c;
 +create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) engine=innodb;
 +insert into t2 select * from t1;
 +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
 +drop table t1,t2;
 +SET AUTOCOMMIT=1;
 +create table t1 (a integer auto_increment primary key) engine=innodb;
 +insert into t1 (a) values (NULL),(NULL);
 +truncate table t1;
 +insert into t1 (a) values (NULL),(NULL);
 +SELECT * from t1;
 +a
 +1
 +2
 +drop table t1;
 +CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB;
 +CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`)  ON DELETE CASCADE ) ENGINE=INNODB;
 +drop table t2,t1;
 +create table `t1` (`id` int( 11 ) not null  ,primary key ( `id` )) engine = innodb;
 +insert into `t1`values ( 1 ) ;
 +create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb;
 +insert into `t2`values ( 1 ) ;
 +create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb;
 +insert into `t3`values ( 1 ) ;
 +delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
 +update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
 +update t3 set  t3.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 +ERROR 42S22: Unknown column 't1.id' in 'where clause'
 +drop table t3,t2,t1;
 +CREATE TABLE t1 (
 +c1 VARCHAR(8), c2 VARCHAR(8),
 +PRIMARY KEY (c1, c2)
 +) ENGINE=InnoDB;
 +CREATE TABLE t2 (
 +c0 INT PRIMARY KEY,
 +c1 VARCHAR(8) UNIQUE,
 +FOREIGN KEY (c1) REFERENCES t1 (c1) ON UPDATE CASCADE
 +) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES ('old', 'somevalu'), ('other', 'anyvalue');
 +INSERT INTO t2 VALUES (10, 'old'), (20, 'other');
 +UPDATE t1 SET c1 = 'other' WHERE c1 = 'old';
 +ERROR 23000: Foreign key constraint for table 't1', record 'other-somevalu' would lead to a duplicate entry in table 't2', key 'c1'
 +DROP TABLE t2,t1;
 +call mtr.add_suppression("Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 255. Please drop excessive foreign constraints and try again");
 +create table t1(
 +id int primary key,
 +pid int,
 +index(pid),
 +foreign key(pid) references t1(id) on delete cascade) engine=innodb;
 +insert into t1 values
 +(  0,   0), (  1,   0), (  2,   1), (  3,   2),
 +(  4,   3), (  5,   4), (  6,   5), (  7,   6),
 +(  8,   7), (  9,   8), ( 10,   9), ( 11,  10),
 +( 12,  11), ( 13,  12), ( 14,  13), ( 15,  14),
 +( 16,  15), ( 17,  16), ( 18,  17), ( 19,  18),
 +( 20,  19), ( 21,  20), ( 22,  21), ( 23,  22),
 +( 24,  23), ( 25,  24), ( 26,  25), ( 27,  26),
 +( 28,  27), ( 29,  28), ( 30,  29), ( 31,  30),
 +( 32,  31), ( 33,  32), ( 34,  33), ( 35,  34),
 +( 36,  35), ( 37,  36), ( 38,  37), ( 39,  38),
 +( 40,  39), ( 41,  40), ( 42,  41), ( 43,  42),
 +( 44,  43), ( 45,  44), ( 46,  45), ( 47,  46),
 +( 48,  47), ( 49,  48), ( 50,  49), ( 51,  50),
 +( 52,  51), ( 53,  52), ( 54,  53), ( 55,  54),
 +( 56,  55), ( 57,  56), ( 58,  57), ( 59,  58),
 +( 60,  59), ( 61,  60), ( 62,  61), ( 63,  62),
 +( 64,  63), ( 65,  64), ( 66,  65), ( 67,  66),
 +( 68,  67), ( 69,  68), ( 70,  69), ( 71,  70),
 +( 72,  71), ( 73,  72), ( 74,  73), ( 75,  74),
 +( 76,  75), ( 77,  76), ( 78,  77), ( 79,  78),
 +( 80,  79), ( 81,  80), ( 82,  81), ( 83,  82),
 +( 84,  83), ( 85,  84), ( 86,  85), ( 87,  86),
 +( 88,  87), ( 89,  88), ( 90,  89), ( 91,  90),
 +( 92,  91), ( 93,  92), ( 94,  93), ( 95,  94),
 +( 96,  95), ( 97,  96), ( 98,  97), ( 99,  98),
 +(100,  99), (101, 100), (102, 101), (103, 102),
 +(104, 103), (105, 104), (106, 105), (107, 106),
 +(108, 107), (109, 108), (110, 109), (111, 110),
 +(112, 111), (113, 112), (114, 113), (115, 114),
 +(116, 115), (117, 116), (118, 117), (119, 118),
 +(120, 119), (121, 120), (122, 121), (123, 122),
 +(124, 123), (125, 124), (126, 125), (127, 126),
 +(128, 127), (129, 128), (130, 129), (131, 130),
 +(132, 131), (133, 132), (134, 133), (135, 134),
 +(136, 135), (137, 136), (138, 137), (139, 138),
 +(140, 139), (141, 140), (142, 141), (143, 142),
 +(144, 143), (145, 144), (146, 145), (147, 146),
 +(148, 147), (149, 148), (150, 149), (151, 150),
 +(152, 151), (153, 152), (154, 153), (155, 154),
 +(156, 155), (157, 156), (158, 157), (159, 158),
 +(160, 159), (161, 160), (162, 161), (163, 162),
 +(164, 163), (165, 164), (166, 165), (167, 166),
 +(168, 167), (169, 168), (170, 169), (171, 170),
 +(172, 171), (173, 172), (174, 173), (175, 174),
 +(176, 175), (177, 176), (178, 177), (179, 178),
 +(180, 179), (181, 180), (182, 181), (183, 182),
 +(184, 183), (185, 184), (186, 185), (187, 186),
 +(188, 187), (189, 188), (190, 189), (191, 190),
 +(192, 191), (193, 192), (194, 193), (195, 194),
 +(196, 195), (197, 196), (198, 197), (199, 198),
 +(200, 199), (201, 200), (202, 201), (203, 202),
 +(204, 203), (205, 204), (206, 205), (207, 206),
 +(208, 207), (209, 208), (210, 209), (211, 210),
 +(212, 211), (213, 212), (214, 213), (215, 214),
 +(216, 215), (217, 216), (218, 217), (219, 218),
 +(220, 219), (221, 220), (222, 221), (223, 222),
 +(224, 223), (225, 224), (226, 225), (227, 226),
 +(228, 227), (229, 228), (230, 229), (231, 230),
 +(232, 231), (233, 232), (234, 233), (235, 234),
 +(236, 235), (237, 236), (238, 237), (239, 238),
 +(240, 239), (241, 240), (242, 241), (243, 242),
 +(244, 243), (245, 244), (246, 245), (247, 246),
 +(248, 247), (249, 248), (250, 249), (251, 250),
 +(252, 251), (253, 252), (254, 253), (255, 254);
 +delete from t1 where id=0;
 +Got one of the listed errors
 +delete from t1 where id=255;
 +delete from t1 where id=0;
 +drop table t1;
 +CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
 +CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
 +(stamp))ENGINE=InnoDB;
 +insert into t1 values (1),(2),(3);
 +insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
 +Warnings:
 +Warning	1265	Data truncated for column 'stamp' at row 3
 +SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
 +'20020204120000' GROUP BY col1;
 +col1
 +1
 +2
 +3
 +4
 +drop table t1,t2;
 +CREATE TABLE t1 (
 +`id` int(10) unsigned NOT NULL auto_increment,
 +`id_object` int(10) unsigned default '0',
 +`id_version` int(10) unsigned NOT NULL default '1',
 +`label` varchar(100) NOT NULL default '',
 +`description` text,
 +PRIMARY KEY  (`id`),
 +KEY `id_object` (`id_object`),
 +KEY `id_version` (`id_version`)
 +) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
 +CREATE TABLE t2 (
 +`id` int(10) unsigned NOT NULL auto_increment,
 +`id_version` int(10) unsigned NOT NULL default '1',
 +PRIMARY KEY  (`id`),
 +KEY `id_version` (`id_version`)
 +) ENGINE=InnoDB;
 +INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
 +SELECT t2.id, t1.`label` FROM t2 INNER JOIN
 +(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl 
 +ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
 +id	label
 +3382	Test
 +102	Le Pekin (Test)
 +1794	Test de resto
 +1822	Test 3
 +3524	Societe Test
 +3525	Fournisseur Test
 +drop table t1,t2;
 +create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=myisam;
 +create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=innodb;
 +create table t3 (a int, b varchar(200), c text not null) checksum=1 engine=innodb;
 +insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
 +insert t2 select * from t1;
 +insert t3 select * from t1;
 +checksum table t1, t2, t3, t4 quick;
 +Table	Checksum
 +test.t1	3442722830
 +test.t2	NULL
 +test.t3	NULL
 +test.t4	NULL
 +Warnings:
 +Error	1146	Table 'test.t4' doesn't exist
 +checksum table t1, t2, t3, t4;
 +Table	Checksum
 +test.t1	3442722830
 +test.t2	3442722830
 +test.t3	3442722830
 +test.t4	NULL
 +Warnings:
 +Error	1146	Table 'test.t4' doesn't exist
 +checksum table t1, t2, t3, t4 extended;
 +Table	Checksum
 +test.t1	3442722830
 +test.t2	3442722830
 +test.t3	3442722830
 +test.t4	NULL
 +Warnings:
 +Error	1146	Table 'test.t4' doesn't exist
 +drop table t1,t2,t3;
 +create table t1 (id int,  name char(10) not null,  name2 char(10) not null) engine=innodb;
 +insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
 +select trim(name2) from t1  union all  select trim(name) from t1 union all select trim(id) from t1;
 +trim(name2)
 +fff
 +sss
 +ttt
 +first
 +second
 +third
 +1
 +2
 +3
 +drop table t1;
 +create table t1 (a int) engine=innodb;
 +create table t2 like t1;
 +drop table t1,t2;
 +create table t1 (id int(11) not null, id2 int(11) not null, unique (id,id2)) engine=innodb;
 +create table t2 (id int(11) not null, constraint t1_id_fk foreign key ( id ) references t1 (id)) engine = innodb;
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `id` int(11) NOT NULL,
 +  `id2` int(11) NOT NULL,
 +  UNIQUE KEY `id` (`id`,`id2`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  KEY `t1_id_fk` (`id`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +create index id on t2 (id);
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  KEY `id` (`id`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +create index id2 on t2 (id);
 +Warnings:
 +Note	1831	Duplicate index 'id2' defined on the table 'test.t2'. This is deprecated and will be disallowed in a future release.
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  KEY `id` (`id`),
 +  KEY `id2` (`id`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop index id2 on t2;
 +drop index id on t2;
 +ERROR HY000: Cannot drop index 'id': needed in a foreign key constraint
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  KEY `id` (`id`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id,id2) references t1 (id,id2)) engine = innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  `id2` int(11) NOT NULL,
 +  KEY `t1_id_fk` (`id`,`id2`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +create unique index id on t2 (id,id2);
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  `id2` int(11) NOT NULL,
 +  UNIQUE KEY `id` (`id`,`id2`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`, `id2`) REFERENCES `t1` (`id`, `id2`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  `id2` int(11) NOT NULL,
 +  UNIQUE KEY `id` (`id`,`id2`),
 +  KEY `t1_id_fk` (`id2`,`id`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2), constraint t1_id_fk foreign key (id) references t1 (id)) engine = innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  `id2` int(11) NOT NULL,
 +  UNIQUE KEY `id` (`id`,`id2`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  `id2` int(11) NOT NULL,
 +  UNIQUE KEY `id` (`id`,`id2`),
 +  KEY `t1_id_fk` (`id2`,`id`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id2`, `id`) REFERENCES `t1` (`id`, `id2`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id), primary key (id), index (id,id2)) engine = innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL AUTO_INCREMENT,
 +  `id2` int(11) NOT NULL,
 +  PRIMARY KEY (`id`),
 +  KEY `id` (`id`,`id2`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id)) engine= innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL AUTO_INCREMENT,
 +  `id2` int(11) NOT NULL,
 +  KEY `t1_id_fk` (`id`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t2 add index id_test (id), add index id_test2 (id,id2);
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL AUTO_INCREMENT,
 +  `id2` int(11) NOT NULL,
 +  KEY `id_test` (`id`),
 +  KEY `id_test2` (`id`,`id2`),
 +  CONSTRAINT `t1_id_fk` FOREIGN KEY (`id`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
 +ERROR 42000: Incorrect foreign key definition for 't1_id_fk': Key reference and table reference don't match
 +create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `a` int(11) NOT NULL AUTO_INCREMENT,
 +  `b` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `b_2` (`b`),
 +  KEY `b` (`b`),
 +  CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2;
 +create table t2 (a int auto_increment primary key, b int, foreign key (b) references t1(id), foreign key (b) references t1(id), unique(b)) engine=innodb;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `a` int(11) NOT NULL AUTO_INCREMENT,
 +  `b` int(11) DEFAULT NULL,
 +  PRIMARY KEY (`a`),
 +  UNIQUE KEY `b` (`b`),
 +  CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`id`),
 +  CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t2, t1;
 +create table t1 (c char(10), index (c,c)) engine=innodb;
 +ERROR 42S21: Duplicate column name 'c'
 +create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
 +ERROR 42S21: Duplicate column name 'c1'
 +create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb;
 +ERROR 42S21: Duplicate column name 'c1'
 +create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb;
 +ERROR 42S21: Duplicate column name 'c1'
 +create table t1 (c1 char(10), c2 char(10)) engine=innodb;
 +alter table t1 add key (c1,c1);
 +ERROR 42S21: Duplicate column name 'c1'
 +alter table t1 add key (c2,c1,c1);
 +ERROR 42S21: Duplicate column name 'c1'
 +alter table t1 add key (c1,c2,c1);
 +ERROR 42S21: Duplicate column name 'c1'
 +alter table t1 add key (c1,c1,c2);
 +ERROR 42S21: Duplicate column name 'c1'
 +drop table t1;
 +create table t1(a int(1) , b int(1)) engine=innodb;
 +insert into t1 values ('1111', '3333');
 +select distinct concat(a, b) from t1;
 +concat(a, b)
 +11113333
 +drop table t1;
 +CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY  (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +INSERT INTO t1 VALUES (1),(2),(3);
 +CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY  (b_id), KEY  (b_a), 
 +CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2);
 +SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz;
 +a_id	b_list
 +1	1,2,3
 +2	4,5
 +3	NULL
 +DROP TABLE t2;
 +DROP TABLE t1;
 +create temporary table t1 (a int) engine=innodb;
 +insert into t1 values (4711);
 +truncate t1;
 +insert into t1 values (42);
 +select * from t1;
 +a
 +42
 +drop table t1;
 +create table t1 (a int) engine=innodb;
 +insert into t1 values (4711);
 +truncate t1;
 +insert into t1 values (42);
 +select * from t1;
 +a
 +42
 +drop table t1;
 +create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
 +insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
 +analyze table t1;
 +select * from t1 order by a,b,c,d;
 +a	b	c	d	e
 +1	1	a	1	1
 +2	2	b	2	2
 +3	3	ab	3	3
 +explain select * from t1 order by a,b,c,d;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ALL	NULL	NULL	NULL	NULL	3	Using filesort
 +drop table t1;
 +create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
 +insert into t1 values ('8', '6'), ('4', '7');
 +select min(a) from t1;
 +min(a)
 +4
 +select min(b) from t1 where a='8';
 +min(b)
 +6
 +drop table t1;
 +create table t1 (x bigint unsigned not null primary key) engine=innodb;
 +insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
 +select * from t1;
 +x
 +18446744073709551600
 +18446744073709551601
 +select count(*) from t1 where x>0;
 +count(*)
 +2
 +select count(*) from t1 where x=0;
 +count(*)
 +0
 +select count(*) from t1 where x<0;
 +count(*)
 +0
 +select count(*) from t1 where x < -16;
 +count(*)
 +0
 +select count(*) from t1 where x = -16;
 +count(*)
 +0
 +explain select count(*) from t1 where x > -16;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	index	PRIMARY	PRIMARY	8	NULL	2	Using where; Using index
 +select count(*) from t1 where x > -16;
 +count(*)
 +2
 +select * from t1 where x > -16;
 +x
 +18446744073709551600
 +18446744073709551601
 +select count(*) from t1 where x = 18446744073709551601;
 +count(*)
 +1
 +drop table t1;
 +SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
 +variable_value
 +ok
 +SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
 +variable_value
 +16384
 +SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
 +variable_value - @innodb_rows_deleted_orig
 +311
 +SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
 +variable_value - @innodb_rows_inserted_orig
- 1204
++1241
 +SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
 +variable_value - @innodb_rows_updated_orig
 +866
 +SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
 +variable_value - @innodb_row_lock_waits_orig
 +0
 +SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
 +variable_value - @innodb_row_lock_current_waits_orig
 +0
 +SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
 +variable_value - @innodb_row_lock_time_orig
 +0
 +SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
 +variable_value - @innodb_row_lock_time_max_orig
 +0
 +SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
 +variable_value - @innodb_row_lock_time_avg_orig
 +0
 +set storage_engine=INNODB;
 +drop table if exists t1,t2,t3;
 +--- Testing varchar ---
 +--- Testing varchar ---
 +create table t1 (v varchar(10), c char(10), t text);
 +insert into t1 values('+ ', '+ ', '+ ');
 +set @a=repeat(' ',20);
 +insert into t1 values (concat('+', at a),concat('+', at a),concat('+', at a));
 +Warnings:
 +Note	1265	Data truncated for column 'v' at row 1
 +select concat('*',v,'*',c,'*',t,'*') from t1;
 +concat('*',v,'*',c,'*',t,'*')
 +*+ *+*+ *
 +*+         *+*+                    *
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(10) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +create table t2 like t1;
 +show create table t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `v` varchar(10) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +create table t3 select * from t1;
 +show create table t3;
 +Table	Create Table
 +t3	CREATE TABLE `t3` (
 +  `v` varchar(10) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 modify c varchar(10);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(10) DEFAULT NULL,
 +  `c` varchar(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 modify v char(10);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` char(10) DEFAULT NULL,
 +  `c` varchar(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 modify t varchar(10);
 +Warnings:
 +Note	1265	Data truncated for column 't' at row 2
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` char(10) DEFAULT NULL,
 +  `c` varchar(10) DEFAULT NULL,
 +  `t` varchar(10) DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +select concat('*',v,'*',c,'*',t,'*') from t1;
 +concat('*',v,'*',c,'*',t,'*')
 +*+*+*+ *
 +*+*+*+         *
 +drop table t1,t2,t3;
 +create table t1 (v varchar(10), c char(10), t text, key(v), key(c), key(t(10)));
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(10) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL,
 +  KEY `v` (`v`),
 +  KEY `c` (`c`),
 +  KEY `t` (`t`(10))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +select count(*) from t1;
 +count(*)
 +270
 +insert into t1 values(concat('a',char(1)),concat('a',char(1)),concat('a',char(1)));
 +select count(*) from t1 where v='a';
 +count(*)
 +10
 +select count(*) from t1 where c='a';
 +count(*)
 +10
 +select count(*) from t1 where t='a';
 +count(*)
 +10
 +select count(*) from t1 where v='a  ';
 +count(*)
 +10
 +select count(*) from t1 where c='a  ';
 +count(*)
 +10
 +select count(*) from t1 where t='a  ';
 +count(*)
 +10
 +select count(*) from t1 where v between 'a' and 'a ';
 +count(*)
 +10
 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a  ' and 'b\n';
 +count(*)
 +10
 +select count(*) from t1 where v like 'a%';
 +count(*)
 +11
 +select count(*) from t1 where c like 'a%';
 +count(*)
 +11
 +select count(*) from t1 where t like 'a%';
 +count(*)
 +11
 +select count(*) from t1 where v like 'a %';
 +count(*)
 +9
 +explain select count(*) from t1 where v='a  ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	13	const	#	Using where; Using index
 +explain select count(*) from t1 where c='a  ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	c	c	11	const	#	Using where; Using index
 +explain select count(*) from t1 where t='a  ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	t	t	13	const	#	Using where
 +explain select count(*) from t1 where v like 'a%';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	range	v	v	13	NULL	#	Using where; Using index
 +explain select count(*) from t1 where v between 'a' and 'a ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	13	const	#	Using where; Using index
 +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a  ' and 'b\n';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	13	const	#	Using where; Using index
 +alter table t1 add unique(v);
 +ERROR 23000: Duplicate entry '{ ' for key 'v_2'
 +alter table t1 add key(v);
 +Warnings:
 +Note	1831	Duplicate index 'v_2' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
 +select concat('*',v,'*',c,'*',t,'*') as qq from t1 where v='a';
 +qq
 +*a*a*a*
 +*a *a*a *
 +*a  *a*a  *
 +*a   *a*a   *
 +*a    *a*a    *
 +*a     *a*a     *
 +*a      *a*a      *
 +*a       *a*a       *
 +*a        *a*a        *
 +*a         *a*a         *
 +explain select * from t1 where v='a';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v,v_2	#	13	const	#	#
 +select v,count(*) from t1 group by v limit 10;
 +v	count(*)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select v,count(c) from t1 group by v limit 10;
 +v	count(c)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select sql_big_result v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select sql_big_result v,count(c) from t1 group by v limit 10;
 +v	count(c)
 +a	1
 +a 	10
 +b     	10
 +c    	10
 +d   	10
 +e  	10
 +f     	10
 +g    	10
 +h	10
 +i     	10
 +select c,count(*) from t1 group by c limit 10;
 +c	count(*)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select c,count(t) from t1 group by c limit 10;
 +c	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select sql_big_result c,count(t) from t1 group by c limit 10;
 +c	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select t,count(*) from t1 group by t limit 10;
 +t	count(*)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select t,count(t) from t1 group by t limit 10;
 +t	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select sql_big_result t,count(t) from t1 group by t limit 10;
 +t	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +alter table t1 modify v varchar(300), drop key v, drop key v_2, add key v (v);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(300) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL,
 +  KEY `c` (`c`),
 +  KEY `t` (`t`(10)),
 +  KEY `v` (`v`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +select count(*) from t1 where v='a';
 +count(*)
 +10
 +select count(*) from t1 where v='a  ';
 +count(*)
 +10
 +select count(*) from t1 where v between 'a' and 'a ';
 +count(*)
 +10
 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a  ' and 'b\n';
 +count(*)
 +10
 +select count(*) from t1 where v like 'a%';
 +count(*)
 +11
 +select count(*) from t1 where v like 'a %';
 +count(*)
 +9
 +explain select count(*) from t1 where v='a  ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	303	const	#	Using where; Using index
 +explain select count(*) from t1 where v like 'a%';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	range	v	v	303	NULL	#	Using where; Using index
 +explain select count(*) from t1 where v between 'a' and 'a ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	303	const	#	Using where; Using index
 +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a  ' and 'b\n';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	303	const	#	Using where; Using index
 +explain select * from t1 where v='a';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	303	const	#	#
 +select v,count(*) from t1 group by v limit 10;
 +v	count(*)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select sql_big_result v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +alter table t1 drop key v, add key v (v(30));
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(300) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL,
 +  KEY `c` (`c`),
 +  KEY `t` (`t`(10)),
 +  KEY `v` (`v`(30))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +select count(*) from t1 where v='a';
 +count(*)
 +10
 +select count(*) from t1 where v='a  ';
 +count(*)
 +10
 +select count(*) from t1 where v between 'a' and 'a ';
 +count(*)
 +10
 +select count(*) from t1 where v between 'a' and 'a ' and v between 'a  ' and 'b\n';
 +count(*)
 +10
 +select count(*) from t1 where v like 'a%';
 +count(*)
 +11
 +select count(*) from t1 where v like 'a %';
 +count(*)
 +9
 +explain select count(*) from t1 where v='a  ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	33	const	#	Using where
 +explain select count(*) from t1 where v like 'a%';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	range	v	v	33	NULL	#	Using where
 +explain select count(*) from t1 where v between 'a' and 'a ';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	33	const	#	Using where
 +explain select count(*) from t1 where v between 'a' and 'a ' and v between 'a  ' and 'b\n';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	33	const	#	Using where
 +explain select * from t1 where v='a';
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	v	v	33	const	#	#
 +select v,count(*) from t1 group by v limit 10;
 +v	count(*)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select sql_big_result v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +alter table t1 modify v varchar(600), drop key v, add key v (v);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(600) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL,
 +  KEY `c` (`c`),
 +  KEY `t` (`t`(10)),
 +  KEY `v` (`v`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +select v,count(*) from t1 group by v limit 10;
 +v	count(*)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +select sql_big_result v,count(t) from t1 group by v limit 10;
 +v	count(t)
 +a	1
 +a	10
 +b	10
 +c	10
 +d	10
 +e	10
 +f	10
 +g	10
 +h	10
 +i	10
 +drop table t1;
 +create table t1 (a char(10), unique (a));
 +insert into t1 values ('a   ');
 +insert into t1 values ('a ');
 +ERROR 23000: Duplicate entry 'a' for key 'a'
 +alter table t1 modify a varchar(10);
 +insert into t1 values ('a '),('a  '),('a   '),('a         ');
 +ERROR 23000: Duplicate entry 'a ' for key 'a'
 +insert into t1 values ('a     ');
 +ERROR 23000: Duplicate entry 'a     ' for key 'a'
 +insert into t1 values ('a          ');
 +ERROR 23000: Duplicate entry 'a         ' for key 'a'
 +insert into t1 values ('a ');
 +ERROR 23000: Duplicate entry 'a ' for key 'a'
 +update t1 set a='a  ' where a like 'a%';
 +select concat(a,'.') from t1;
 +concat(a,'.')
 +a  .
 +update t1 set a='abc    ' where a like 'a ';
 +select concat(a,'.') from t1;
 +concat(a,'.')
 +a  .
 +update t1 set a='a      ' where a like 'a %';
 +select concat(a,'.') from t1;
 +concat(a,'.')
 +a      .
 +update t1 set a='a  ' where a like 'a      ';
 +select concat(a,'.') from t1;
 +concat(a,'.')
 +a  .
 +drop table t1;
 +create table t1 (v varchar(10), c char(10), t text, key(v(5)), key(c(5)), key(t(5)));
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(10) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL,
 +  `t` text DEFAULT NULL,
 +  KEY `v` (`v`(5)),
 +  KEY `c` (`c`(5)),
 +  KEY `t` (`t`(5))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1 (v char(10) character set utf8);
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` char(10) CHARACTER SET utf8 DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1 (v varchar(10), c char(10)) row_format=fixed;
 +Warnings:
 +Warning	1478	InnoDB: assuming ROW_FORMAT=DYNAMIC.
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` varchar(10) DEFAULT NULL,
 +  `c` char(10) DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED
 +insert into t1 values('a','a'),('a ','a ');
 +select concat('*',v,'*',c,'*') from t1;
 +concat('*',v,'*',c,'*')
 +*a*a*
 +*a *a*
 +drop table t1;
 +create table t1 (v varchar(65530), key(v(10)));
 +insert into t1 values(repeat('a',65530));
 +select length(v) from t1 where v=repeat('a',65530);
 +length(v)
 +65530
 +drop table t1;
 +create table t1(a int, b varchar(12), key ba(b, a));
 +insert into t1 values (1, 'A'), (20, NULL);
 +explain select * from t1 where a=20 and b is null;
 +id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 +1	SIMPLE	t1	ref	ba	ba	20	const,const	1	Using where; Using index
 +select * from t1 where a=20 and b is null;
 +a	b
 +20	NULL
 +drop table t1;
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +SET GLOBAL innodb_large_prefix=OFF;
 +Warnings:
 +Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +create table t1 (v varchar(65530), key(v));
 +Warnings:
 +Warning	1071	Specified key was too long; max key length is 767 bytes
 +SET GLOBAL innodb_large_prefix=default;
 +Warnings:
 +Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +drop table t1;
 +create table t1 (v varchar(65536));
 +Warnings:
 +Note	1246	Converting column 'v' from VARCHAR to TEXT
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` mediumtext DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +create table t1 (v varchar(65530) character set utf8);
 +Warnings:
 +Note	1246	Converting column 'v' from VARCHAR to TEXT
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `v` mediumtext CHARACTER SET utf8 DEFAULT NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1;
 +SET sql_mode = default;
 +set default_storage_engine=MyISAM;
 +create table t1 (v varchar(16384)) engine=innodb;
 +drop table t1;
 +create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
 +insert into t1 values ('8', '6'), ('4', '7');
 +select min(a) from t1;
 +min(a)
 +4
 +select min(b) from t1 where a='8';
 +min(b)
 +6
 +drop table t1;
 +CREATE TABLE t1 ( `a` int(11) NOT NULL auto_increment, `b` int(11) default NULL,PRIMARY KEY  (`a`),UNIQUE KEY `b` (`b`)) ENGINE=innodb;
 +insert into t1 (b) values (1);
 +replace into t1 (b) values (2), (1), (3);
 +select * from t1;
 +a	b
 +3	1
 +2	2
 +4	3
 +truncate table t1;
 +insert into t1 (b) values (1);
 +replace into t1 (b) values (2);
 +replace into t1 (b) values (1);
 +replace into t1 (b) values (3);
 +select * from t1;
 +a	b
 +3	1
 +2	2
 +4	3
 +drop table t1;
 +create table t1 (rowid int not null auto_increment, val int not null,primary
 +key (rowid), unique(val)) engine=innodb;
 +replace into t1 (val) values ('1'),('2');
 +replace into t1 (val) values ('1'),('2');
 +insert into t1 (val) values ('1'),('2');
 +ERROR 23000: Duplicate entry '1' for key 'val'
 +select * from t1;
 +rowid	val
 +3	1
 +4	2
 +drop table t1;
 +create table t1 (a int not null auto_increment primary key, val int) engine=InnoDB;
 +insert into t1 (val) values (1);
 +update t1 set a=2 where a=1;
 +insert into t1 (val) values (1);
 +ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
 +select * from t1;
 +a	val
 +2	1
 +drop table t1;
 +CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB;
 +INSERT INTO t1 (GRADE) VALUES (151),(252),(343);
 +SELECT GRADE  FROM t1 WHERE GRADE > 160 AND GRADE < 300;
 +GRADE
 +252
 +SELECT GRADE  FROM t1 WHERE GRADE= 151;
 +GRADE
 +151
 +DROP TABLE t1;
 +create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
 +create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
 +insert into t2 values ('aa','cc');
 +insert into t1 values ('aa','bb'),('aa','cc');
 +delete t1 from t1,t2 where f1=f3 and f4='cc';
 +select * from t1;
 +f1	f2
 +drop table t1,t2;
 +CREATE TABLE t1 (
 +id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
 +) ENGINE=InnoDB;
 +INSERT INTO t1 (id) VALUES (NULL);
 +SELECT * FROM t1;
 +id
 +1
 +TRUNCATE t1;
 +INSERT INTO t1 (id) VALUES (NULL);
 +SELECT * FROM t1;
 +id
 +1
 +DELETE FROM t1;
 +TRUNCATE t1;
 +INSERT INTO t1 (id) VALUES (NULL);
 +SELECT * FROM t1;
 +id
 +1
 +DROP TABLE t1;
 +CREATE TABLE t1
 +(
 +id INT PRIMARY KEY
 +) ENGINE=InnoDB;
 +CREATE TEMPORARY TABLE t2
 +(
 +id INT NOT NULL PRIMARY KEY,
 +b INT,
 +FOREIGN KEY (b) REFERENCES test.t1(id)
 +) ENGINE=InnoDB;
 +Got one of the listed errors
 +DROP TABLE t1;
 +create table t1 (col1 varchar(2000), index (col1(767)))
 +character set = latin1 engine = innodb;
 +create table t2 (col1 char(255), index (col1))
 +character set = latin1 engine = innodb;
 +create table t3 (col1 binary(255), index (col1))
 +character set = latin1 engine = innodb;
 +create table t4 (col1 varchar(767), index (col1))
 +character set = latin1 engine = innodb;
 +create table t5 (col1 varchar(767) primary key)
 +character set = latin1 engine = innodb;
 +create table t6 (col1 varbinary(767) primary key)
 +character set = latin1 engine = innodb;
 +create table t7 (col1 text, index(col1(767)))
 +character set = latin1 engine = innodb;
 +create table t8 (col1 blob, index(col1(767)))
 +character set = latin1 engine = innodb;
 +create table t9 (col1 varchar(512), col2 varchar(512), index(col1, col2))
 +character set = latin1 engine = innodb;
 +show create table t9;
 +Table	Create Table
 +t9	CREATE TABLE `t9` (
 +  `col1` varchar(512) DEFAULT NULL,
 +  `col2` varchar(512) DEFAULT NULL,
 +  KEY `col1` (`col1`,`col2`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +SET GLOBAL innodb_large_prefix=OFF;
 +Warnings:
 +Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +create table t1 (col1 varchar(768), index(col1))
 +character set = latin1 engine = innodb;
 +Warnings:
 +Warning	1071	Specified key was too long; max key length is 767 bytes
 +create table t2 (col1 varbinary(768), index(col1))
 +character set = latin1 engine = innodb;
 +Warnings:
 +Warning	1071	Specified key was too long; max key length is 767 bytes
 +create table t3 (col1 text, index(col1(768)))
 +character set = latin1 engine = innodb;
 +Warnings:
 +Warning	1071	Specified key was too long; max key length is 767 bytes
 +create table t4 (col1 blob, index(col1(768)))
 +character set = latin1 engine = innodb;
 +Warnings:
 +Warning	1071	Specified key was too long; max key length is 767 bytes
 +SET GLOBAL innodb_large_prefix=default;
 +Warnings:
 +Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `col1` varchar(768) DEFAULT NULL,
 +  KEY `col1` (`col1`(767))
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1, t2, t3, t4;
 +set global innodb_large_prefix=OFF;
 +Warnings:
 +Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +create table t1 (col1 varchar(768) primary key)
 +character set = latin1 engine = innodb;
 +ERROR 42000: Specified key was too long; max key length is 767 bytes
 +create table t2 (col1 varbinary(768) primary key)
 +character set = latin1 engine = innodb;
 +ERROR 42000: Specified key was too long; max key length is 767 bytes
 +create table t3 (col1 text, primary key(col1(768)))
 +character set = latin1 engine = innodb;
 +ERROR 42000: Specified key was too long; max key length is 767 bytes
 +create table t4 (col1 blob, primary key(col1(768)))
 +character set = latin1 engine = innodb;
 +ERROR 42000: Specified key was too long; max key length is 767 bytes
 +SET sql_mode = default;
 +set global innodb_large_prefix=default;
 +Warnings:
 +Warning	131	Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
 +CREATE TABLE t1
 +(
 +id INT PRIMARY KEY
 +) ENGINE=InnoDB;
 +CREATE TABLE t2
 +(
 +v INT,
 +CONSTRAINT c1 FOREIGN KEY (v) REFERENCES t1(id)
 +) ENGINE=InnoDB;
 +INSERT INTO t2 VALUES(2);
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
 +INSERT INTO t1 VALUES(1);
 +INSERT INTO t2 VALUES(1);
 +DELETE FROM t1 WHERE id = 1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
 +DROP TABLE t1;
 +Got one of the listed errors
 +SET FOREIGN_KEY_CHECKS=0;
 +DROP TABLE t1;
 +SET FOREIGN_KEY_CHECKS=1;
 +INSERT INTO t2 VALUES(3);
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c1` FOREIGN KEY (`v`) REFERENCES `t1` (`id`))
 +DROP TABLE t2;
 +connect  a,localhost,root,,;
 +connect  b,localhost,root,,;
 +connection a;
 +create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
 +insert into t1 values (1),(2);
 +set autocommit=0;
 +checksum table t1;
 +Table	Checksum
 +test.t1	1531596814
 +connection b;
 +insert into t1 values(3);
 +connection a;
 +checksum table t1;
 +Table	Checksum
 +test.t1	1531596814
 +connection a;
 +commit;
 +checksum table t1;
 +Table	Checksum
 +test.t1	2050879373
 +commit;
 +drop table t1;
 +connection a;
 +create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
 +insert into t1 values (1),(2);
 +set autocommit=1;
 +checksum table t1;
 +Table	Checksum
 +test.t1	1531596814
 +connection b;
 +set autocommit=1;
 +insert into t1 values(3);
 +connection a;
 +checksum table t1;
 +Table	Checksum
 +test.t1	2050879373
 +drop table t1;
 +connection default;
 +disconnect a;
 +disconnect b;
 +set foreign_key_checks=0;
 +create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
 +create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
 +ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
 +set foreign_key_checks=1;
 +drop table t2;
 +set foreign_key_checks=0;
 +create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
 +ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
 +set foreign_key_checks=1;
 +drop table t1;
 +set foreign_key_checks=0;
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb;
 +create table t1(a varchar(10) primary key) engine = innodb;
 +alter table t1 modify column a int;
 +Got one of the listed errors
 +set foreign_key_checks=1;
 +drop table t2,t1;
 +set foreign_key_checks=0;
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
 +create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
 +alter table t1 convert to character set utf8;
 +set foreign_key_checks=1;
 +drop table t2,t1;
 +set foreign_key_checks=0;
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
 +create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
 +rename table t3 to t1;
 +ERROR HY000: Error on rename of './test/t3' to './test/t1' (errno: 150 "Foreign key constraint is incorrectly formed")
 +set foreign_key_checks=1;
 +drop table t2,t3;
 +create table t1(a int primary key) row_format=redundant engine=innodb;
 +create table t2(a int primary key,constraint foreign key(a)references t1(a)) row_format=compact engine=innodb;
 +create table t3(a int primary key) row_format=compact engine=innodb;
 +create table t4(a int primary key,constraint foreign key(a)references t3(a)) row_format=redundant engine=innodb;
 +insert into t1 values(1);
 +insert into t3 values(1);
 +insert into t2 values(2);
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
 +insert into t4 values(2);
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
 +insert into t2 values(1);
 +insert into t4 values(1);
 +update t1 set a=2;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
 +update t2 set a=2;
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
 +update t3 set a=2;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
 +update t4 set a=2;
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
 +truncate t1;
 +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`))
 +truncate t3;
 +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t3` (`a`))
 +truncate t2;
 +truncate t4;
 +truncate t1;
 +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`))
 +truncate t3;
 +ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t3` (`a`))
 +drop table t4,t3,t2,t1;
 +create table t1 (a varchar(255) character set utf8,
 +b varchar(255) character set utf8,
 +c varchar(255) character set utf8,
 +d varchar(255) character set utf8,
 +key (a,b,c,d)) engine=innodb;
 +drop table t1;
 +create table t1 (a varchar(255) character set utf8,
 +b varchar(255) character set utf8,
 +c varchar(255) character set utf8,
 +d varchar(255) character set utf8,
 +e varchar(255) character set utf8,
 +key (a,b,c,d,e)) engine=innodb;
 +ERROR 42000: Specified key was too long; max key length is 3072 bytes
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
 +create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
 +create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
 +create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
 +insert into t1 values (0x41),(0x4120),(0x4100);
 +insert into t2 values (0x41),(0x4120),(0x4100);
 +ERROR 23000: Duplicate entry 'A' for key 'PRIMARY'
 +insert into t2 values (0x41),(0x4120);
 +insert into t3 values (0x41),(0x4120),(0x4100);
 +ERROR 23000: Duplicate entry 'A ' for key 'PRIMARY'
 +insert into t3 values (0x41),(0x4100);
 +insert into t4 values (0x41),(0x4120),(0x4100);
 +ERROR 23000: Duplicate entry 'A' for key 'PRIMARY'
 +insert into t4 values (0x41),(0x4100);
 +select hex(s1) from t1;
 +hex(s1)
 +41
 +4100
 +4120
 +select hex(s1) from t2;
 +hex(s1)
 +4100
 +4120
 +select hex(s1) from t3;
 +hex(s1)
 +4100
 +41
 +select hex(s1) from t4;
 +hex(s1)
 +4100
 +41
 +drop table t1,t2,t3,t4;
 +create table t1 (a int primary key,s1 varbinary(3) not null unique) engine=innodb;
 +create table t2 (s1 binary(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
 +insert into t1 values(1,0x4100),(2,0x41),(3,0x4120),(4,0x42);
 +insert into t2 values(0x42);
 +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
 +insert into t2 values(0x41);
 +select hex(s1) from t2;
 +hex(s1)
 +4100
 +update t1 set s1=0x123456 where a=2;
 +select hex(s1) from t2;
 +hex(s1)
 +4100
 +update t1 set s1=0x12 where a=1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
 +update t1 set s1=0x12345678 where a=1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
 +update t1 set s1=0x123457 where a=1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
 +update t1 set s1=0x1220 where a=1;
 +select hex(s1) from t2;
 +hex(s1)
 +1220
 +update t1 set s1=0x1200 where a=1;
 +select hex(s1) from t2;
 +hex(s1)
 +1200
 +update t1 set s1=0x4200 where a=1;
 +select hex(s1) from t2;
 +hex(s1)
 +4200
 +delete from t1 where a=1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
 +delete from t1 where a=2;
 +update t2 set s1=0x4120;
 +delete from t1;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
 +delete from t1 where a!=3;
 +select a,hex(s1) from t1;
 +a	hex(s1)
 +3	4120
 +select hex(s1) from t2;
 +hex(s1)
 +4120
 +drop table t2,t1;
 +create table t1 (a int primary key,s1 varchar(2) binary not null unique) engine=innodb;
 +create table t2 (s1 char(2) binary not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
 +insert into t1 values(1,0x4100),(2,0x41);
 +insert into t2 values(0x41);
 +select hex(s1) from t2;
 +hex(s1)
 +41
 +update t1 set s1=0x1234 where a=1;
 +select hex(s1) from t2;
 +hex(s1)
 +41
 +update t1 set s1=0x12 where a=2;
 +select hex(s1) from t2;
 +hex(s1)
 +12
 +delete from t1 where a=1;
 +delete from t1 where a=2;
 +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `c` FOREIGN KEY (`s1`) REFERENCES `t1` (`s1`) ON UPDATE CASCADE)
 +select a,hex(s1) from t1;
 +a	hex(s1)
 +2	12
 +select hex(s1) from t2;
 +hex(s1)
 +12
 +drop table t2,t1;
 +CREATE TABLE t1(a INT, PRIMARY KEY(a)) ENGINE=InnoDB;
 +CREATE TABLE t2(a INT) ENGINE=InnoDB;
 +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1(a);
 +ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_1;
 +ALTER TABLE t2 ADD CONSTRAINT t2_ibfk_0 FOREIGN KEY (a) REFERENCES t1(a);
 +ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_0;
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `a` int(11) DEFAULT NULL,
 +  KEY `t2_ibfk_0` (`a`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +DROP TABLE t2,t1;
 +SET sql_mode = default;
 +CREATE TABLE t1 (
 +field1 varchar(8) NOT NULL DEFAULT '',
 +field2 varchar(8) NOT NULL DEFAULT '',
 +PRIMARY KEY  (field1, field2)
 +) ENGINE=InnoDB;
 +CREATE TABLE t2 (
 +field1 varchar(8) NOT NULL DEFAULT '' PRIMARY KEY,
 +FOREIGN KEY (field1) REFERENCES t1 (field1)
 +ON DELETE CASCADE ON UPDATE CASCADE
 +) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES ('old', 'somevalu');
 +INSERT INTO t1 VALUES ('other', 'anyvalue');
 +INSERT INTO t2 VALUES ('old');
 +INSERT INTO t2 VALUES ('other');
 +UPDATE t1 SET field1 = 'other' WHERE field2 = 'somevalu';
 +ERROR 23000: Foreign key constraint for table 't1', record 'other-somevalu' would lead to a duplicate entry in table 't2', key 'PRIMARY'
 +DROP TABLE t2;
 +DROP TABLE t1;
 +create table t1 (
 +c1 bigint not null,
 +c2 bigint not null,
 +primary key (c1),
 +unique  key (c2)
 +) engine=innodb;
 +create table t2 (
 +c1 bigint not null,
 +primary key (c1)
 +) engine=innodb;
 +alter table t1 add constraint c2_fk foreign key (c2)
 +references t2(c1) on delete cascade;
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` bigint(20) NOT NULL,
 +  `c2` bigint(20) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  UNIQUE KEY `c2` (`c2`),
 +  CONSTRAINT `c2_fk` FOREIGN KEY (`c2`) REFERENCES `t2` (`c1`) ON DELETE CASCADE
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +alter table t1 drop foreign key c2_fk;
 +show create table t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `c1` bigint(20) NOT NULL,
 +  `c2` bigint(20) NOT NULL,
 +  PRIMARY KEY (`c1`),
 +  UNIQUE KEY `c2` (`c2`)
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +drop table t1, t2;
 +create table t1(a date) engine=innodb;
 +create table t2(a date, key(a)) engine=innodb;
 +insert into t1 values('2005-10-01');
 +insert into t2 values('2005-10-01');
 +select * from t1, t2
 +where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
 +a	a
 +2005-10-01	2005-10-01
 +drop table t1, t2;
 +create table t1 (id int not null, f_id int not null, f int not null,
 +primary key(f_id, id)) engine=innodb;
 +create table t2 (id int not null,s_id int not null,s varchar(200),
 +primary key(id)) engine=innodb;
 +INSERT INTO t1 VALUES (8, 1, 3);
 +INSERT INTO t1 VALUES (1, 2, 1);
 +INSERT INTO t2 VALUES (1, 0, '');
 +INSERT INTO t2 VALUES (8, 1, '');
 +commit;
 +DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
 +WHERE mm.id IS NULL;
 +select ml.* from t1 as ml left join t2 as mm on (mm.id=ml.id)
 +where mm.id is null lock in share mode;
 +id	f_id	f
 +drop table t1,t2;
 +connect  a,localhost,root,,;
 +connect  b,localhost,root,,;
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
 +commit;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +update t1 set b = 5 where b = 1;
 +connection b;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +select * from t1 where a = 7 and b = 3 for update;
 +a	b
 +7	3
 +connection a;
 +commit;
 +connection b;
 +commit;
 +drop table t1;
 +connection default;
 +disconnect a;
 +disconnect b;
 +connect  a,localhost,root,,;
 +connect  b,localhost,root,,;
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2);
 +commit;
 +set autocommit = 0;
 +select * from t1 lock in share mode;
 +a	b
 +1	1
 +2	2
 +3	1
 +4	2
 +5	1
 +6	2
 +update t1 set b = 5 where b = 1;
 +connection b;
 +set autocommit = 0;
 +select * from t1 where a = 2 and b = 2 for update;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection a;
 +commit;
 +connection b;
 +commit;
 +connection default;
 +disconnect a;
 +disconnect b;
 +drop table t1;
 +connect  a,localhost,root,,;
 +connect  b,localhost,root,,;
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values (1,2),(5,3),(4,2);
 +create table t2(d int not null, e int, primary key(d)) engine=innodb;
 +insert into t2 values (8,6),(12,1),(3,1);
 +commit;
 +set autocommit = 0;
 +select * from t2 for update;
 +d	e
 +3	1
 +8	6
 +12	1
 +connection b;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +insert into t1 select * from t2;
 +update t1 set b = (select e from t2 where a = d);
 +create table t3(d int not null, e int, primary key(d)) engine=innodb
 +select * from t2;
 +commit;
 +connection a;
 +commit;
 +connection default;
 +disconnect a;
 +disconnect b;
 +drop table t1, t2, t3;
 +connect  a,localhost,root,,;
 +connect  b,localhost,root,,;
 +connect  c,localhost,root,,;
 +connect  d,localhost,root,,;
 +connect  e,localhost,root,,;
 +connect  f,localhost,root,,;
 +connect  g,localhost,root,,;
 +connect  h,localhost,root,,;
 +connect  i,localhost,root,,;
 +connect  j,localhost,root,,;
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values (1,2),(5,3),(4,2);
 +create table t2(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t2 values (8,6),(12,1),(3,1);
 +create table t3(d int not null, b int, primary key(d)) engine=innodb;
 +insert into t3 values (8,6),(12,1),(3,1);
 +create table t5(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t5 values (1,2),(5,3),(4,2);
 +create table t6(d int not null, e int, primary key(d)) engine=innodb;
 +insert into t6 values (8,6),(12,1),(3,1);
 +create table t8(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t8 values (1,2),(5,3),(4,2);
 +create table t9(d int not null, e int, primary key(d)) engine=innodb;
 +insert into t9 values (8,6),(12,1),(3,1);
 +commit;
 +set autocommit = 0;
 +select * from t2 for update;
 +a	b
 +3	1
 +8	6
 +12	1
 +connection b;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +insert into t1 select * from t2;
 +connection c;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +update t3 set b = (select b from t2 where a = d);
 +connection d;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
 +connection e;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +insert into t5 (select * from t2 lock in share mode);
 +connection f;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +update t6 set e = (select b from t2 where a = d lock in share mode);
 +connection g;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
 +connection h;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +insert into t8 (select * from t2 for update);
 +connection i;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +update t9 set e = (select b from t2 where a = d for update);
 +connection j;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +create table t10(a int not null, b int, primary key(a)) engine=innodb select * from t2 for update;
 +connection b;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection c;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection d;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection e;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection f;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection g;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection h;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection i;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection j;
 +ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 +connection a;
 +commit;
 +connection default;
 +disconnect a;
 +disconnect b;
 +disconnect c;
 +disconnect d;
 +disconnect e;
 +disconnect f;
 +disconnect g;
 +disconnect h;
 +disconnect i;
 +disconnect j;
 +drop table t1, t2, t3, t5, t6, t8, t9;
 +CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
 +ERROR 42000: Incorrect column name 'DB_ROW_ID'
 +CREATE TABLE t1 (
 +a BIGINT(20) NOT NULL,
 +PRIMARY KEY  (a)
 +) ENGINE=INNODB DEFAULT CHARSET=UTF8;
 +CREATE TABLE t2 (
 +a BIGINT(20) NOT NULL,
 +b VARCHAR(128) NOT NULL,
 +c TEXT NOT NULL,
 +PRIMARY KEY  (a,b),
 +KEY idx_t2_b_c (b,c(200)),
 +CONSTRAINT t_fk FOREIGN KEY (a) REFERENCES t1 (a) 
 +ON DELETE CASCADE
 +) ENGINE=INNODB DEFAULT CHARSET=UTF8;
 +INSERT INTO t1 VALUES (1);
 +INSERT INTO t2 VALUES (1, 'bar', 'vbar');
 +INSERT INTO t2 VALUES (1, 'BAR2', 'VBAR');
 +INSERT INTO t2 VALUES (1, 'bar_bar', 'bibi');
 +INSERT INTO t2 VALUES (1, 'customer_over', '1');
 +SELECT * FROM t2 WHERE b = 'customer_over';
 +a	b	c
 +1	customer_over	1
 +SELECT * FROM t2 WHERE BINARY b = 'customer_over';
 +a	b	c
 +1	customer_over	1
 +SELECT DISTINCT p0.a FROM t2 p0 WHERE p0.b = 'customer_over';
 +a
 +1
 +/* Bang: Empty result set, above was expected: */
 +SELECT DISTINCT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
 +a
 +1
 +SELECT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
 +a
 +1
 +drop table t2, t1;
 +CREATE TABLE t1 ( a int ) ENGINE=innodb;
 +BEGIN;
 +INSERT INTO t1 VALUES (1);
 +OPTIMIZE TABLE t1;
 +Table	Op	Msg_type	Msg_text
 +test.t1	optimize	note	Table does not support optimize, doing recreate + analyze instead
 +test.t1	optimize	status	OK
 +DROP TABLE t1;
 +CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB;
 +CREATE TABLE t2 (id int PRIMARY KEY, f INT NOT NULL,
 +CONSTRAINT t2_t1 FOREIGN KEY (id) REFERENCES t1 (id)
 +ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;
 +ALTER TABLE t2 ADD FOREIGN KEY (f) REFERENCES t1 (f) ON
 +DELETE CASCADE ON UPDATE CASCADE;
 +SHOW CREATE TABLE t2;
 +Table	Create Table
 +t2	CREATE TABLE `t2` (
 +  `id` int(11) NOT NULL,
 +  `f` int(11) NOT NULL,
 +  PRIMARY KEY (`id`),
 +  KEY `f` (`f`),
 +  CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f`) REFERENCES `t1` (`f`) ON DELETE CASCADE ON UPDATE CASCADE,
 +  CONSTRAINT `t2_t1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1
 +DROP TABLE t2, t1;
 +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB;
 +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES (1);
 +INSERT INTO t2 VALUES (1);
 +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
 +set @old_sql_mode = @@sql_mode;
 +set @@sql_mode = 'STRICT_TRANS_TABLES';
 +ALTER TABLE t2 MODIFY a INT NOT NULL;
 +ERROR HY000: Column 'a' cannot be NOT NULL: needed in a foreign key constraint 'test/t2_ibfk_1' SET NULL
 +set @@sql_mode = @old_sql_mode;
 +DELETE FROM t1;
 +DROP TABLE t2,t1;
 +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
 +ENGINE=InnoDB;
 +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
 +DELETE FROM t1;
 +INSERT INTO t1 VALUES ('DDD');
 +SELECT * FROM t1;
 +a
 +DDD
 +DROP TABLE t1;
 +CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
 +AUTO_INCREMENT=42;
 +INSERT INTO t1 VALUES (0),(347),(0);
 +SELECT * FROM t1;
 +id
 +42
 +347
 +348
 +SHOW CREATE TABLE t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `id` int(11) NOT NULL AUTO_INCREMENT,
 +  PRIMARY KEY (`id`)
 +) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
 +CREATE TABLE t2 (id int PRIMARY KEY) ENGINE=InnoDB;
 +INSERT INTO t2 VALUES(42),(347),(348);
 +ALTER TABLE t1 ADD CONSTRAINT t1_t2 FOREIGN KEY (id) REFERENCES t2(id);
 +SHOW CREATE TABLE t1;
 +Table	Create Table
 +t1	CREATE TABLE `t1` (
 +  `id` int(11) NOT NULL AUTO_INCREMENT,
 +  PRIMARY KEY (`id`),
 +  CONSTRAINT `t1_t2` FOREIGN KEY (`id`) REFERENCES `t2` (`id`)
 +) ENGINE=InnoDB AUTO_INCREMENT=349 DEFAULT CHARSET=latin1
 +DROP TABLE t1,t2;
 +SET innodb_strict_mode=ON;
 +CREATE TABLE t1 (
 +c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
 +c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
 +c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
 +c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
 +c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
 +c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
 +c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
 +c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
 +) ENGINE = InnoDB;
 +ERROR 42000: Row size too large (> {checked_valid}). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
 +SET innodb_strict_mode=OFF;
 +DROP TABLE IF EXISTS t1;
 +Warnings:
 +Note	1051	Unknown table 'test.t1'
 +CREATE TABLE t1(
 +id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
 +) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES(-10);
 +SELECT * FROM t1;
 +id
 +-10
 +INSERT INTO t1 VALUES(NULL);
 +SELECT * FROM t1;
 +id
 +-10
 +1
 +DROP TABLE t1;
 +CONNECT  c1,localhost,root,,;
 +CONNECT  c2,localhost,root,,;
 +connection c1;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +DROP TABLE IF EXISTS t1, t2;
 +Warnings:
 +Note	1051	Unknown table 'test.t1'
 +Note	1051	Unknown table 'test.t2'
 +CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
 +CREATE TABLE t2 LIKE t1;
 +SELECT * FROM t2;
 +a
 +connection c2;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +INSERT INTO t1 VALUES (1);
 +COMMIT;
 +connection c1;
 +SELECT * FROM t1 WHERE a=1;
 +a
 +1
 +disconnect c1;
 +disconnect c2;
 +CONNECT  c1,localhost,root,,;
 +CONNECT  c2,localhost,root,,;
 +connection c1;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +SELECT * FROM t2;
 +a
 +connection c2;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +INSERT INTO t1 VALUES (2);
 +COMMIT;
 +connection c1;
 +SELECT * FROM t1 WHERE a=2;
 +a
 +2
 +SELECT * FROM t1 WHERE a=2;
 +a
 +2
 +DROP TABLE t1;
 +DROP TABLE t2;
 +disconnect c1;
 +disconnect c2;
 +connection default;
 +create table t1 (i int, j int) engine=innodb;
 +insert into t1 (i, j) values (1, 1), (2, 2);
 +update t1 set j = 2;
 +affected rows: 1
 +info: Rows matched: 2  Changed: 1  Warnings: 0
 +drop table t1;
 +create table t1 (id int) comment='this is a comment' engine=innodb;
 +select table_comment, data_free > 0 as data_free_is_set
 +from information_schema.tables
 +where table_schema='test' and table_name = 't1';
 +table_comment	data_free_is_set
 +this is a comment	1
 +drop table t1;
 +connection default;
 +CREATE TABLE t1 (
 +c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 +c2 VARCHAR(128) NOT NULL,
 +PRIMARY KEY(c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100;
 +CREATE TABLE t2 (
 +c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 +c2 INT(10) UNSIGNED DEFAULT NULL,
 +PRIMARY KEY(c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200;
 +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
 +AUTO_INCREMENT
 +200
 +ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1);
 +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
 +AUTO_INCREMENT
 +200
 +DROP TABLE t2;
 +DROP TABLE t1;
 +connection default;
 +CREATE TABLE t1 (c1 int default NULL,
 +c2 int default NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +TRUNCATE TABLE t1;
 +affected rows: 0
 +INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
 +affected rows: 5
 +info: Records: 5  Duplicates: 0  Warnings: 0
 +TRUNCATE TABLE t1;
 +affected rows: 0
 +DROP TABLE t1;
 +Variable_name	Value
 +Handler_update	0
 +Variable_name	Value
 +Handler_delete	0
 +Variable_name	Value
 +Handler_update	1
 +Variable_name	Value
 +Handler_delete	1
 +DROP TABLE bug58912;
 +create table t1 (f1 integer primary key) engine=innodb;
 +flush status;
 +show status like "handler_read_key";
 +Variable_name	Value
 +Handler_read_key	0
 +select f1 from t1;
 +f1
 +show status like "handler_read_key";
 +Variable_name	Value
 +Handler_read_key	0
 +drop table t1;
diff --cc mysql-test/suite/innodb/t/innodb-mdev-7513.test
index 88f941e,0000000..cc2e7a9
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/t/innodb-mdev-7513.test
+++ b/mysql-test/suite/innodb/t/innodb-mdev-7513.test
@@@ -1,221 -1,0 +1,225 @@@
 +-- source include/have_innodb.inc
 +-- source include/not_embedded.inc
 +
 +# MDEV-7513: ib_warn_row_too_big dereferences null thd
 +
 +call mtr.add_suppression("InnoDB: Cannot add field `.* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
 +call mtr.add_suppression("Row size too large (> 8126)*");
 +
++set GLOBAL innodb_strict_mode=OFF;
++
 +--disable_warnings
 +CREATE TABLE t1 ( text1 TEXT,
 +text2 TEXT,
 +text3 TEXT,
 +text4 TEXT,
 +text5 TEXT,
 +text6 TEXT,
 +text7 TEXT,
 +text8 TEXT,
 +text9 TEXT,
 +text10 TEXT,
 +text11 TEXT,
 +text12 TEXT,
 +text13 TEXT,
 +text14 TEXT,
 +text15 TEXT,
 +text16 TEXT,
 +text17 TEXT,
 +text18 TEXT,
 +text19 TEXT,
 +text20 TEXT,
 +text21 TEXT,
 +text22 TEXT,
 +text23 TEXT,
 +text24 TEXT,
 +text25 TEXT,
 +text26 TEXT,
 +text27 TEXT,
 +text28 TEXT,
 +text29 TEXT,
 +text30 TEXT,
 +text31 TEXT,
 +text32 TEXT,
 +text33 TEXT,
 +text34 TEXT,
 +text35 TEXT,
 +text36 TEXT,
 +text37 TEXT,
 +text38 TEXT,
 +text39 TEXT,
 +text40 TEXT,
 +text41 TEXT,
 +text42 TEXT,
 +text43 TEXT,
 +text44 TEXT,
 +text45 TEXT,
 +text46 TEXT,
 +text47 TEXT,
 +text48 TEXT,
 +text49 TEXT,
 +text50 TEXT,
 +text51 TEXT,
 +text52 TEXT,
 +text53 TEXT,
 +text54 TEXT,
 +text55 TEXT,
 +text56 TEXT,
 +text57 TEXT,
 +text58 TEXT,
 +text59 TEXT,
 +text60 TEXT,
 +text61 TEXT,
 +text62 TEXT,
 +text63 TEXT,
 +text64 TEXT,
 +text65 TEXT,
 +text66 TEXT,
 +text67 TEXT,
 +text68 TEXT,
 +text69 TEXT,
 +text70 TEXT,
 +text71 TEXT,
 +text72 TEXT,
 +text73 TEXT,
 +text74 TEXT,
 +text75 TEXT,
 +text76 TEXT,
 +text77 TEXT,
 +text78 TEXT,
 +text79 TEXT,
 +text80 TEXT,
 +text81 TEXT,
 +text82 TEXT,
 +text83 TEXT,
 +text84 TEXT,
 +text85 TEXT,
 +text86 TEXT,
 +text87 TEXT,
 +text88 TEXT,
 +text89 TEXT,
 +text90 TEXT,
 +text91 TEXT,
 +text92 TEXT,
 +text93 TEXT,
 +text94 TEXT,
 +text95 TEXT,
 +text96 TEXT,
 +text97 TEXT,
 +text98 TEXT,
 +text99 TEXT,
 +text100 TEXT,
 +text101 TEXT,
 +text102 TEXT,
 +text103 TEXT,
 +text104 TEXT,
 +text105 TEXT,
 +text106 TEXT,
 +text107 TEXT,
 +text108 TEXT,
 +text109 TEXT,
 +text110 TEXT,
 +text111 TEXT,
 +text112 TEXT,
 +text113 TEXT,
 +text114 TEXT,
 +text115 TEXT,
 +text116 TEXT,
 +text117 TEXT,
 +text118 TEXT,
 +text119 TEXT,
 +text120 TEXT,
 +text121 TEXT,
 +text122 TEXT,
 +text123 TEXT,
 +text124 TEXT,
 +text125 TEXT,
 +text126 TEXT,
 +text127 TEXT,
 +text128 TEXT,
 +text129 TEXT,
 +text130 TEXT,
 +text131 TEXT,
 +text132 TEXT,
 +text133 TEXT,
 +text134 TEXT,
 +text135 TEXT,
 +text136 TEXT,
 +text137 TEXT,
 +text138 TEXT,
 +text139 TEXT,
 +text140 TEXT,
 +text141 TEXT,
 +text142 TEXT,
 +text143 TEXT,
 +text144 TEXT,
 +text145 TEXT,
 +text146 TEXT,
 +text147 TEXT,
 +text148 TEXT,
 +text149 TEXT,
 +text150 TEXT,
 +text151 TEXT,
 +text152 TEXT,
 +text153 TEXT,
 +text154 TEXT,
 +text155 TEXT,
 +text156 TEXT,
 +text157 TEXT,
 +text158 TEXT,
 +text159 TEXT,
 +text160 TEXT,
 +text161 TEXT,
 +text162 TEXT,
 +text163 TEXT,
 +text164 TEXT,
 +text165 TEXT,
 +text166 TEXT,
 +text167 TEXT,
 +text168 TEXT,
 +text169 TEXT,
 +text170 TEXT,
 +text171 TEXT,
 +text172 TEXT,
 +text173 TEXT,
 +text174 TEXT,
 +text175 TEXT,
 +text176 TEXT,
 +text177 TEXT,
 +text178 TEXT,
 +text179 TEXT,
 +text180 TEXT,
 +text181 TEXT,
 +text182 TEXT,
 +text183 TEXT,
 +text184 TEXT,
 +text185 TEXT,
 +text186 TEXT,
 +text187 TEXT,
 +text188 TEXT,
 +text189 TEXT,
 +text190 TEXT,
 +text191 TEXT,
 +text192 TEXT,
 +text193 TEXT,
 +text194 TEXT,
 +text195 TEXT,
 +text196 TEXT,
 +text197 TEXT
 +) ENGINE = InnoDB;
 +
 +INSERT INTO t1 VALUES ('abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcd
 ef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abcdef', 'abc
 def', 'abcdef');
 +--enable_warnings
 +
 +DELETE FROM t1 WHERE text1 = 'abcdef';
 +
 +--source include/restart_mysqld.inc
 +
 +--disable_warnings
 +SELECT * from t1;
 +--enable_warnings
 +
++set GLOBAL innodb_strict_mode=DEFAULT;
++
 +DROP TABLE t1;
 +
diff --cc mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
index c61d10e,0000000..762b475
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
@@@ -1,758 -1,0 +1,759 @@@
 +# Not supported in embedded
 +--source include/not_embedded.inc
 +
 +# This test case needs to crash the server. Needs a debug server.
 +--source include/have_debug.inc
 +
 +# Don't test this under valgrind, memory leaks will occur.
 +--source include/not_valgrind.inc
 +
 +# Avoid CrashReporter popup on Mac
 +--source include/not_crashrep.inc
 +
 +-- source include/have_innodb.inc
 +
 +# compressed table in tests are with sizes KEY_BLOCK_SIZE 1,2,4,8,16 
 +# Table creatation fails if KEY_BLOCK_SIZE > innodb-page-size,so 
 +# allow test to run only when innodb-page-size=16  
 +--source include/have_innodb_16k.inc
 +
 +call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
 +call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
 +call mtr.add_suppression("InnoDB: Error: Tablespace flags .* corrupted unused .*");
++call mtr.add_suppression("InnoDB: Tablespace flags: .* corrupted  in file: .* ");
 +
 +let MYSQLD_DATADIR =`SELECT @@datadir`;
 +let $innodb_file_per_table = `SELECT @@innodb_file_per_table`;
 +let $innodb_file_format = `SELECT @@innodb_file_format`;
 +let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`;
 +let $pathfix=/: '.*test_wl5522.*t1.ibd'/: 'test_wl5522_t1.ibd'/;
 +
 +SET GLOBAL innodb_file_per_table = 1;
 +SELECT @@innodb_file_per_table;
 +
 +SET GLOBAL innodb_file_format = `Barracuda`;
 +SELECT @@innodb_file_format;
 +
 +SET SESSION innodb_strict_mode=1;
 +SELECT @@SESSION.innodb_strict_mode;
 +
 +
 +
 +DROP DATABASE IF EXISTS test_wl5522;
 +CREATE DATABASE test_wl5522;
 +
 +# Create the table that we will use for crash recovery (during IMPORT)
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +INSERT INTO test_wl5522.t1 VALUES (1), (2), (3), (4);
 +
 +--replace_regex /, .*\).*t1.cfg/, Bad file descriptor) t1.cfg/
 +
 +FLUSH TABLES test_wl5522.t1 FOR EXPORT;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_backup_tablespaces("test_wl5522", "t1");
 +EOF
 +UNLOCK TABLES;
 +
 +DROP TABLE test_wl5522.t1;
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +INSERT INTO test_wl5522.t1 VALUES (1);
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_discard_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +##### Before commit crash
 +SET SESSION debug_dbug="+d,ib_import_before_commit_crash";
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT * FROM test_wl5522.t1;
 +
 +# Write file to make mysql-test-run.pl start up the server again
 +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 +
 +# Execute the statement that causes the crash
 +--error 2013
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +--enable_reconnect
 +--source include/wait_until_connected_again.inc
 +--disable_reconnect
 +
 +SET SESSION debug_dbug="-d,ib_import_before_commit_crash";
 +#### Before commit crash
 +
 +# Check that the DD is consistent after recovery
 +
 +##### Before checkpoint crash
 +SET SESSION debug_dbug="+d,ib_import_before_checkpoint_crash";
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Don't start up the server right away.
 +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 +
 +# Execute the statement that causes the crash
 +--error 2013
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +# After the above test the results are non-deterministic,
 +# delete the old tablespace files and drop the table,
 +# recreate the table and do a proper import.
 +-- source include/wait_until_disconnected.inc
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +--echo # Restart and reconnect to the server
 +--enable_reconnect
 +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
 +--source include/wait_until_connected_again.inc
 +--disable_reconnect
 +
 +SET SESSION debug_dbug="-d,ib_import_before_checkpoint_crash";
 +#### Before checkpoint crash
 +
 +# After the above test the results are non-deterministic, recreate the table
 +# and do a proper import.
 +
 +DROP TABLE test_wl5522.t1;
 +
 +SET GLOBAL innodb_file_per_table = 1;
 +SELECT @@innodb_file_per_table;
 +
 +SET GLOBAL innodb_file_format = `Barracuda`;
 +SELECT @@innodb_file_format;
 +
 +SET SESSION innodb_strict_mode=1;
 +SELECT @@SESSION.innodb_strict_mode;
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +CHECK TABLE test_wl5522.t1;
 +
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +INSERT INTO test_wl5522.t1 VALUES(400), (500), (600);
 +
 +SELECT * FROM test_wl5522.t1;
 +
 +DROP TABLE test_wl5522.t1;
 +
 +# Test handling of internal failure error
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +# Test failure after reset of space id and LSN in the tablespace
 +SET SESSION debug_dbug="+d,ib_import_internal_error";
 +
 +--replace_regex /'.*t1.cfg'/'t1.cfg'/
 +
 +--error ER_INTERNAL_ERROR
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_internal_error";
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +DROP TABLE test_wl5522.t1;
 +
 +
 +# Test failure after reset of space id and LSN in the tablespace
 +CREATE TABLE test_wl5522.t1 (c1 INT) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +# Test failure after reset of space id and LSN in the tablespace
 +SET SESSION debug_dbug="+d,ib_import_reset_space_and_lsn_failure";
 +
 +--replace_regex /'.*t1.cfg'/'t1.cfg'/
 +
 +--error ER_INTERNAL_ERROR
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="-d,ib_import_reset_space_and_lsn_failure";
 +
 +# Test failure after attempting a tablespace open
 +SET SESSION debug_dbug="+d,ib_import_open_tablespace_failure";
 +
 +--replace_regex /'.*[\/\\]/'/
 +--error ER_GET_ERRMSG
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_open_tablespace_failure";
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +# Test failure after ibuf check
 +SET SESSION debug_dbug="+d,ib_import_check_bitmap_failure";
 +
 +# Need proper mapping of error codes :-(
 +--error ER_NOT_KEYFILE
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_check_bitmap_failure";
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +# Test failure after adjusting the cluster index root page
 +SET SESSION debug_dbug="+d,ib_import_cluster_root_adjust_failure";
 +
 +--error ER_NOT_KEYFILE
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_cluster_root_adjust_failure";
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +# Test failure after importing the cluster index
 +SET SESSION debug_dbug="+d,ib_import_cluster_failure";
 +
 +--error ER_NOT_KEYFILE
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_cluster_failure";
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +# Test failure after importing the secondary index(es)
 +SET SESSION debug_dbug="+d,ib_import_sec_root_adjust_failure";
 +
 +--error ER_NOT_KEYFILE
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_sec_root_adjust_failure";
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +# Test failure after importing the cluster index
 +SET SESSION debug_dbug="+d,ib_import_set_max_rowid_failure";
 +
 +--error ER_NOT_KEYFILE
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_set_max_rowid_failure";
 +
 +# Left over from the failed IMPORT
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +DROP TABLE test_wl5522.t1;
 +
 +--disable_query_log
 +# Enable metrics for the counters we are going to use
 +set global innodb_monitor_enable = purge_stop_count;
 +set global innodb_monitor_enable = purge_resume_count;
 +set global innodb_monitor_enable = ibuf_merges;
 +set global innodb_monitor_enable = ibuf_merges_insert;
 +--enable_query_log
 +
 +#
 +# Create a large table with delete marked records, disable purge during
 +# the update so that we can test the IMPORT purge code.
 +#
 +CREATE TABLE test_wl5522.t1 (
 +	c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +	c2 BIGINT,
 +	c3 VARCHAR(2048),
 +	c4 VARCHAR(2048),
 +	INDEX idx1(c2),
 +	INDEX idx2(c3(512)),
 +	INDEX idx3(c4(512))) Engine=InnoDB
 +        ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 +
 +# Stop purge so that it doesn't remove the delete marked entries.
 +SET GLOBAL INNODB_PURGE_STOP_NOW=ON;
 +
 +# Disable change buffer merge from the master thread, additionally
 +# enable aggressive flushing so that more changes are buffered.
 +SET GLOBAL innodb_disable_background_merge=ON;
 +SET GLOBAL innodb_monitor_reset = ibuf_merges;
 +SET GLOBAL innodb_monitor_reset = ibuf_merges_insert;
 +
 +INSERT INTO test_wl5522.t1(c2, c3, c4) VALUES
 +	(1, REPEAT('a', 2048), REPEAT('a', 2048)),
 +	(2, REPEAT('b', 2048), REPEAT('b', 2048)),
 +	(3, REPEAT('c', 2048), REPEAT('c', 2048)),
 +	(4, REPEAT('d', 2048), REPEAT('d', 2048));
 +
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1(c2, c3, c4) SELECT c2, c3, c4 FROM test_wl5522.t1;
 +
 +DELETE FROM test_wl5522.t1 WHERE c2 = 1;
 +
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c2 = c2 + c1;
 +UPDATE test_wl5522.t1 SET c3 = REPEAT("c2", 1024);
 +UPDATE test_wl5522.t1 SET c4 = REPEAT("c4", 1024);
 +
 +SHOW CREATE TABLE test_wl5522.t1;
 +
 +SELECT c1, c2 FROM test_wl5522.t1;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +SELECT SUM(c2) FROM test_wl5522.t1;
 +
 +SELECT name
 +  FROM information_schema.innodb_metrics
 +  WHERE name = 'ibuf_merges_insert' AND count = 0;
 +
 +FLUSH TABLES test_wl5522.t1 FOR EXPORT;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_backup_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +UNLOCK TABLES;
 +
 +SELECT name
 +  FROM information_schema.innodb_metrics
 +  WHERE name = 'ibuf_merges' AND count > 0;
 +
 +SELECT name
 +  FROM information_schema.innodb_metrics
 +  WHERE name = 'ibuf_merges_inserts' AND count > 0;
 +
 +SET GLOBAL innodb_disable_background_merge=OFF;
 +
 +# Enable normal operation
 +SET GLOBAL INNODB_PURGE_RUN_NOW=ON;
 +
 +DROP TABLE test_wl5522.t1;
 +
 +CREATE TABLE test_wl5522.t1 (
 +	c1 BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY,
 +	c2 BIGINT,
 +	c3 VARCHAR(2048),
 +	c4 VARCHAR(2048),
 +	INDEX idx1(c2),
 +	INDEX idx2(c3(512)),
 +	INDEX idx3(c4(512))) Engine=InnoDB
 +        ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
 +
 +SELECT c1, c2 FROM test_wl5522.t1;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +CHECK TABLE test_wl5522.t1;
 +
 +SELECT c1,c2 FROM test_wl5522.t1;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +SELECT SUM(c2) FROM test_wl5522.t1;
 +
 +SHOW CREATE TABLE test_wl5522.t1;
 +
 +DROP TABLE test_wl5522.t1;
 +
 +####
 +# Create a table and save the tablespace and .cfg file, we need to create
 +# a Btree that has several levels
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +INSERT INTO test_wl5522.t1 VALUES
 +	(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200));
 +
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +FLUSH TABLES test_wl5522.t1 FOR EXPORT;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_backup_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +UNLOCK TABLES;
 +
 +DROP TABLE test_wl5522.t1;
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_1";
 +
 +--replace_regex /'.*t1.cfg'/'t1.cfg'/
 +
 +--error ER_INTERNAL_ERROR
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_1";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +#
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="+d,buf_page_is_corrupt_failure";
 +
 +--replace_regex /'.*t1.cfg'/'t1.cfg'/
 +
 +# Following alter is not failing 
 +#--error ER_INTERNAL_ERROR
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,buf_page_is_corrupt_failure";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_2";
 +
 +--replace_regex $pathfix
 +
 +--error ER_INNODB_INDEX_CORRUPT
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_2";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="+d,ib_import_trigger_corruption_3";
 +
 +--replace_regex /'.*t1.cfg'/'t1.cfg'/
 +
 +--error ER_NOT_KEYFILE
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,ib_import_trigger_corruption_3";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +SET SESSION debug_dbug="+d,ib_import_create_index_failure_1";
 +
 +ALTER TABLE test_wl5522.t1 ADD INDEX idx(c1);
 +
 +SET SESSION debug_dbug="-d,ib_import_create_index_failure_1";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +#
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="+d,fil_space_create_failure";
 +
 +--replace_regex /'.*[\/\\]/'/
 +--error ER_GET_ERRMSG
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,fil_space_create_failure";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +#
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="+d,dict_tf_to_fsp_flags_failure";
 +
 +--replace_regex /'.*[\/\\]/'/
 +--error ER_GET_ERRMSG
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,dict_tf_to_fsp_flags_failure";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +#
 +
 +CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
 +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
 +
 +ALTER TABLE test_wl5522.t1 DISCARD TABLESPACE;
 +
 +--error ER_TABLESPACE_DISCARDED
 +SELECT COUNT(*) FROM test_wl5522.t1;
 +
 +# Restore files
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_restore_tablespaces("test_wl5522", "t1");
 +EOF
 +
 +SET SESSION debug_dbug="+d,fsp_flags_is_valid_failure";
 +
 +--replace_regex /'.*t1.cfg'/'t1.cfg'/
 +
 +--error ER_INTERNAL_ERROR
 +ALTER TABLE test_wl5522.t1 IMPORT TABLESPACE;
 +
 +SET SESSION debug_dbug="-d,fsp_flags_is_valid_failure";
 +
 +DROP TABLE test_wl5522.t1;
 +
 +perl;
 +do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
 +ib_unlink_tablespace("test_wl5522", "t1");
 +EOF
 +
 +
 +DROP DATABASE test_wl5522;
 +
 +set global innodb_monitor_disable = all;
 +set global innodb_monitor_reset_all = all;
 +
 +-- disable_warnings
 +set global innodb_monitor_enable = default;
 +set global innodb_monitor_disable = default;
 +set global innodb_monitor_reset = default;
 +set global innodb_monitor_reset_all = default;
 +-- enable_warnings
 +
 +--disable_query_log
 +call mtr.add_suppression("'Resource temporarily unavailable'");
 +call mtr.add_suppression("Monitor ibuf_merges is already enabled");
 +call mtr.add_suppression("Monitor ibuf_merges_insert is already enabled");
 +call mtr.add_suppression("Got error -1 when reading table '.*'");
 +call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded.");
 +call mtr.add_suppression("InnoDB: Tablespace '.*' exists in the cache.*");
 +call mtr.add_suppression("InnoDB: Freeing existing tablespace '.*' entry from the cache with id.*");
 +call mtr.add_suppression("InnoDB: The table .* doesn't have a corresponding tablespace, it was discarded");
 +call mtr.add_suppression(".*There was an error writing to the meta data file.*");
 +call mtr.add_suppression("InnoDB: Trying to import a tablespace, but could not open the tablespace file");
 +call mtr.add_suppression("Unsupported tablespace format");
 +call mtr.add_suppression("Error in page .* of index \"GEN_CLUST_INDEX\" of table \"test_wl5522\".\"t1\"");
 +call mtr.add_suppression("Page is marked as free");
 +call mtr.add_suppression("t1.ibd: Page .* at offset .* looks corrupted");
 +call mtr.add_suppression("but tablespace with that id or name does not exist");
 +call mtr.add_suppression("Failed to find tablespace for table '\"test_wl5522\".\"t1\"' in the cache");
 +call mtr.add_suppression("Could not find a valid tablespace file for 'test_wl5522.*t1'");
 +--enable_query_log
 +
 +#cleanup
 +--remove_file $MYSQLTEST_VARDIR/tmp/t1.cfg
 +--remove_file $MYSQLTEST_VARDIR/tmp/t1.ibd
 +
 +eval SET GLOBAL INNODB_FILE_PER_TABLE=$innodb_file_per_table;
 +eval SET GLOBAL INNODB_FILE_FORMAT=$innodb_file_format;
 +eval SET SESSION innodb_strict_mode=$innodb_strict_mode_orig;
 +
diff --cc mysql-test/suite/innodb/t/innodb.test
index 79a00c2,0000000..d129e86
mode 100644,000000..100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@@ -1,2636 -1,0 +1,2636 @@@
 +#######################################################################
 +#                                                                     #
 +# Please, DO NOT TOUCH this file as well as the innodb.result file.   #
 +# These files are to be modified ONLY BY INNOBASE guys.               #
 +#                                                                     #
 +# Use innodb_mysql.[test|result] files instead.                       #
 +#                                                                     #
 +# If nevertheless you need to make some changes here, please, forward #
 +# your commit message                                                 #
 +# To: innodb_dev_ww at oracle.com                                        #
 +# Cc: dev-innodb at mysql.com                                            #
 +# (otherwise your changes may be erased).                             #
 +#                                                                     #
 +#######################################################################
 +
 +-- source include/have_innodb.inc
 +-- source include/have_innodb_16k.inc
 +
 +let $MYSQLD_DATADIR= `select @@datadir`;
 +
 +let collation=utf8_unicode_ci;
 +--source include/have_collation.inc
 +set optimizer_switch = 'mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
 +
 +# Save the original values of some variables in order to be able to
 +# estimate how much they have changed during the tests. Previously this
 +# test assumed that e.g. rows_deleted is 0 here and after deleting 23
 +# rows it expected that rows_deleted will be 23. Now we do not make
 +# assumptions about the values of the variables at the beginning, e.g.
 +# rows_deleted should be 23 + "rows_deleted before the test". This allows
 +# the test to be run multiple times without restarting the mysqld server.
 +# See Bug#43309 Test main.innodb can't be run twice
 +-- disable_query_log
 +call mtr.add_suppression("Cannot add field .* in table .* because after adding it, the row size is");
 +call mtr.add_suppression("\\[ERROR\\] InnoDB: in ALTER TABLE `test`.`t1`");
 +call mtr.add_suppression("\\[ERROR\\] InnoDB: in RENAME TABLE table `test`.`t1`");
 +
 +SET @innodb_thread_sleep_delay_orig = @@innodb_thread_sleep_delay;
 +
 +SET @innodb_thread_concurrency_orig = @@innodb_thread_concurrency;
 +
 +--disable_warnings
 +SET @innodb_rows_deleted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted');
 +SET @innodb_rows_inserted_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted');
 +SET @innodb_rows_updated_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated');
 +SET @innodb_row_lock_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits');
 +SET @innodb_row_lock_current_waits_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits');
 +SET @innodb_row_lock_time_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time');
 +SET @innodb_row_lock_time_max_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max');
 +SET @innodb_row_lock_time_avg_orig = (SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg');
 +--enable_warnings
 +-- enable_query_log
 +
 +--disable_warnings
 +drop table if exists t1,t2,t3,t4;
 +drop database if exists mysqltest;
 +--enable_warnings
 +
 +# Bug#58912 InnoDB unnecessarily avoids update-in-place on column prefixes
 +CREATE TABLE bug58912 (a BLOB, b TEXT, PRIMARY KEY(a(1))) ENGINE=InnoDB;
 +INSERT INTO bug58912 VALUES(REPEAT('a',8000),REPEAT('b',8000));
 +UPDATE bug58912 SET a=REPEAT('a',7999);
 +# The above statements used to trigger a failure during purge when
 +# Bug#55284 was fixed while Bug#58912 was not. Defer the DROP TABLE,
 +# so that purge gets a chance to run (and a double free of the
 +# off-page column can be detected, if one is to occur.)
 +
 +#
 +# Small basic test with ignore
 +#
 +
 +create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
 +
 +insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David'), (2, 'Erik'), (3, 'Sasha'), (3, 'Jeremy'), (4, 'Matt');
 +select id, code, name from t1 order by id;
 +
 +update ignore t1 set id = 8, name = 'Sinisa' where id < 3;
 +select id, code, name from t1 order by id;
 +update ignore t1 set id = id + 10, name = 'Ralph' where id < 4;
 +select id, code, name from t1 order by id;
 +
 +drop table t1;
 +
 +#
 +# A bit bigger test
 +# The 'replace_column' statements are needed because the cardinality calculated
 +# by innodb is not always the same between runs
 +#
 +
 +CREATE TABLE t1 (
 +  id int(11) NOT NULL auto_increment,
 +  parent_id int(11) DEFAULT '0' NOT NULL,
 +  level tinyint(4) DEFAULT '0' NOT NULL,
 +  PRIMARY KEY (id),
 +  KEY parent_id (parent_id),
 +  KEY level (level)
 +) engine=innodb;
 +INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1),(179,5,2);
 +update t1 set parent_id=parent_id+100;
 +select * from t1 where parent_id=102;
 +update t1 set id=id+1000;
 +-- error ER_DUP_ENTRY,1022
 +update t1 set id=1024 where id=1009; 
 +select * from t1;
 +update ignore t1 set id=id+1; # This will change all rows
 +select * from t1;
 +update ignore t1 set id=1023 where id=1010;
 +select * from t1 where parent_id=102;
 +--replace_column 9 #
 +explain select level from t1 where level=1;
 +--replace_column 9 #
 +explain select level,id from t1 where level=1;
 +--replace_column 9 #
 +explain select level,id,parent_id from t1 where level=1;
 +select level,id from t1 where level=1;
 +select level,id,parent_id from t1 where level=1;
 +optimize table t1;
 +--replace_column 7 #
 +show keys from t1;
 +drop table t1;
 +
 +#
 +# Test replace
 +#
 +
 +CREATE TABLE t1 (
 +  gesuchnr int(11) DEFAULT '0' NOT NULL,
 +  benutzer_id int(11) DEFAULT '0' NOT NULL,
 +  PRIMARY KEY (gesuchnr,benutzer_id)
 +) engine=innodb;
 +
 +replace into t1 (gesuchnr,benutzer_id) values (2,1);
 +replace into t1 (gesuchnr,benutzer_id) values (1,1);
 +replace into t1 (gesuchnr,benutzer_id) values (1,1);
 +select * from t1;
 +drop table t1;
 +
 +#
 +# test delete using hidden_primary_key
 +#
 +
 +create table t1 (a int) engine=innodb;
 +insert into t1 values (1), (2);
 +optimize table t1;
 +delete from t1 where a = 1;
 +select * from t1;
 +check table t1;
 +drop table t1;
 +
 +create table t1 (a int,b varchar(20)) engine=innodb;
 +insert into t1 values (1,""), (2,"testing");
 +delete from t1 where a = 1;
 +select * from t1;
 +create index skr on t1 (a);
 +insert into t1 values (3,""), (4,"testing");
 +analyze table t1;
 +--replace_column 7 #
 +show keys from t1;
 +drop table t1;
 +
 +
 +# Test of reading on secondary key with may be null
 +
 +create table t1 (a int,b varchar(20),key(a)) engine=innodb;
 +insert into t1 values (1,""), (2,"testing");
 +select * from t1 where a = 1;
 +drop table t1;
 +
 +#
 +# Test rollback
 +#
 +
 +create table t1 (n int not null primary key) engine=innodb;
 +set autocommit=0;
 +insert into t1 values (4);
 +rollback;
 +select n, "after rollback" from t1;
 +insert into t1 values (4);
 +commit;
 +select n, "after commit" from t1;
 +commit;
 +insert into t1 values (5);
 +-- error ER_DUP_ENTRY
 +insert into t1 values (4);
 +commit;
 +select n, "after commit" from t1;
 +set autocommit=1;
 +insert into t1 values (6);
 +-- error ER_DUP_ENTRY
 +insert into t1 values (4);
 +select n from t1;
 +set autocommit=0;
 +#
 +# savepoints
 +#
 +begin;
 +savepoint `my_savepoint`;
 +insert into t1 values (7);
 +savepoint `savept2`;
 +insert into t1 values (3);
 +select n from t1;
 +savepoint savept3;
 +rollback to savepoint savept2;
 +--error 1305
 +rollback to savepoint savept3;
 +rollback to savepoint savept2;
 +release savepoint `my_savepoint`;
 +select n from t1;
 +-- error 1305
 +rollback to savepoint `my_savepoint`;
 +--error 1305
 +rollback to savepoint savept2;
 +insert into t1 values (8);
 +savepoint sv;
 +commit;
 +savepoint sv;
 +set autocommit=1;
 +# nop
 +rollback;
 +drop table t1;
 +
 +#
 +# Test for commit and FLUSH TABLES WITH READ LOCK
 +#
 +
 +create table t1 (n int not null primary key) engine=innodb;
 +start transaction;
 +insert into t1 values (4);
 +flush tables with read lock;
 +#
 +# Current code can't handle a read lock in middle of transaction
 +#--error 1223;
 +commit;
 +unlock tables;
 +commit;
 +select * from t1;
 +drop table t1;
 +
 +#
 +# Testing transactions
 +#
 +
 +create table t1 ( id int NOT NULL PRIMARY KEY, nom varchar(64)) engine=innodb;
 +begin;
 +insert into t1 values(1,'hamdouni');
 +select id as afterbegin_id,nom as afterbegin_nom from t1;
 +rollback;
 +select id as afterrollback_id,nom as afterrollback_nom from t1;
 +set autocommit=0;
 +insert into t1 values(2,'mysql');
 +select id as afterautocommit0_id,nom as afterautocommit0_nom from t1;
 +rollback;
 +select id as afterrollback_id,nom as afterrollback_nom from t1;
 +set autocommit=1;
 +drop table t1;
 +
 +#
 +# Simple not autocommit test
 +# 
 +
 +CREATE TABLE t1 (id char(8) not null primary key, val int not null) engine=innodb;
 +insert into t1 values ('pippo', 12);
 +-- error ER_DUP_ENTRY
 +insert into t1 values ('pippo', 12); # Gives error
 +delete from t1;
 +delete from t1 where id = 'pippo';
 +select * from t1;
 +
 +insert into t1 values ('pippo', 12);
 +set autocommit=0;
 +delete from t1;
 +rollback;
 +select * from t1;
 +delete from t1;
 +commit;
 +select * from t1;
 +drop table t1;
 +
 +#
 +# Test of active transactions
 +#
 +
 +create table t1 (a integer) engine=innodb;
 +start transaction;
 +rename table t1 to t2;
 +create table t1 (b integer) engine=innodb;
 +insert into t1 values (1);
 +rollback;
 +drop table t1;
 +rename table t2 to t1;
 +drop table t1;
 +set autocommit=1;
 +
 +#
 +# The following simple tests failed at some point
 +#
 +
 +CREATE TABLE t1 (ID INTEGER NOT NULL PRIMARY KEY, NAME VARCHAR(64)) ENGINE=innodb;
 +INSERT INTO t1 VALUES (1, 'Jochen');
 +select * from t1;
 +drop table t1;
 +
 +CREATE TABLE t1 ( _userid VARCHAR(60) NOT NULL PRIMARY KEY) ENGINE=innodb;
 +set autocommit=0;
 +INSERT INTO t1  SET _userid='marc at anyware.co.uk';
 +COMMIT;
 +SELECT * FROM t1;
 +SELECT _userid FROM t1 WHERE _userid='marc at anyware.co.uk';
 +drop table t1;
 +set autocommit=1;
 +
 +#
 +# Test when reading on part of unique key
 +#
 +CREATE TABLE t1 (
 +  user_id int(10) DEFAULT '0' NOT NULL,
 +  name varchar(100),
 +  phone varchar(100),
 +  ref_email varchar(100) DEFAULT '' NOT NULL,
 +  detail varchar(200),
 +  PRIMARY KEY (user_id,ref_email)
 +)engine=innodb;
 +
 +INSERT INTO t1 VALUES (10292,'sanjeev','29153373','sansh777 at hotmail.com','xxx'),(10292,'shirish','2333604','shirish at yahoo.com','ddsds'),(10292,'sonali','323232','sonali at bolly.com','filmstar');
 +select * from t1 where user_id=10292;
 +INSERT INTO t1 VALUES (10291,'sanjeev','29153373','sansh777 at hotmail.com','xxx'),(10293,'shirish','2333604','shirish at yahoo.com','ddsds');
 +select * from t1 where user_id=10292;
 +select * from t1 where user_id>=10292;
 +select * from t1 where user_id>10292;
 +select * from t1 where user_id<10292;
 +drop table t1;
 +
 +#
 +# Test that keys are created in right order
 +#
 +
 +CREATE TABLE t1 (a int not null, b int not null,c int not null,
 +key(a),primary key(a,b), unique(c),key(a),unique(b));
 +--replace_column 7 #
 +show index from t1;
 +drop table t1;
 +
 +#
 +# Test of ALTER TABLE and innodb tables
 +#
 +
 +create table t1 (col1 int not null, col2 char(4) not null, primary key(col1));
 +alter table t1 engine=innodb;
 +insert into t1 values ('1','1'),('5','2'),('2','3'),('3','4'),('4','4');
 +select * from t1;
 +update t1 set col2='7' where col1='4';
 +select * from t1;
 +alter table t1 add co3 int not null;
 +select * from t1;
 +update t1 set col2='9' where col1='2';
 +select * from t1;
 +drop table t1;
 +
 +#
 +# INSERT INTO innodb tables
 +#
 +
 +create table t1 (a int not null , b int, primary key (a)) engine = innodb;
 +create table t2 (a int not null , b int, primary key (a)) engine = myisam;
 +insert into t1 VALUES (1,3) , (2,3), (3,3);
 +select * from t1;
 +insert into t2 select * from t1;
 +select * from t2;
 +delete from t1 where b = 3;
 +select * from t1;
 +insert into t1 select * from t2;
 +select * from t1;
 +select * from t2;
 +drop table t1,t2;
 +
 +#
 +# ORDER BY on not primary key
 +#
 +
 +CREATE TABLE t1 (
 +  user_name varchar(12),
 +  password text,
 +  subscribed char(1),
 +  user_id int(11) DEFAULT '0' NOT NULL,
 +  quota bigint(20),
 +  weight double,
 +  access_date date,
 +  access_time time,
 +  approved datetime,
 +  dummy_primary_key int(11) NOT NULL auto_increment,
 +  PRIMARY KEY (dummy_primary_key)
 +) ENGINE=innodb;
 +INSERT INTO t1 VALUES ('user_0','somepassword','N',0,0,0,'2000-09-07','23:06:59','2000-09-07 23:06:59',1);
 +INSERT INTO t1 VALUES ('user_1','somepassword','Y',1,1,1,'2000-09-07','23:06:59','2000-09-07 23:06:59',2);
 +INSERT INTO t1 VALUES ('user_2','somepassword','N',2,2,1.4142135623731,'2000-09-07','23:06:59','2000-09-07 23:06:59',3);
 +INSERT INTO t1 VALUES ('user_3','somepassword','Y',3,3,1.7320508075689,'2000-09-07','23:06:59','2000-09-07 23:06:59',4);
 +INSERT INTO t1 VALUES ('user_4','somepassword','N',4,4,2,'2000-09-07','23:06:59','2000-09-07 23:06:59',5);
 +select  user_name, password , subscribed, user_id, quota, weight, access_date, access_time, approved, dummy_primary_key from t1 order by user_name;
 +drop table t1;
 +
 +#
 +# Testing of tables without primary keys
 +#
 +
 +CREATE TABLE t1 (
 +  id int(11) NOT NULL auto_increment,
 +  parent_id int(11) DEFAULT '0' NOT NULL,
 +  level tinyint(4) DEFAULT '0' NOT NULL,
 +  KEY (id),
 +  KEY parent_id (parent_id),
 +  KEY level (level)
 +) engine=innodb;
 +INSERT INTO t1 VALUES (1,0,0),(3,1,1),(4,1,1),(8,2,2),(9,2,2),(17,3,2),(22,4,2),(24,4,2),(28,5,2),(29,5,2),(30,5,2),(31,6,2),(32,6,2),(33,6,2),(203,7,2),(202,7,2),(20,3,2),(157,0,0),(193,5,2),(40,7,2),(2,1,1),(15,2,2),(6,1,1),(34,6,2),(35,6,2),(16,3,2),(7,1,1),(36,7,2),(18,3,2),(26,5,2),(27,5,2),(183,4,2),(38,7,2),(25,5,2),(37,7,2),(21,4,2),(19,3,2),(5,1,1);
 +INSERT INTO t1 values (179,5,2);
 +update t1 set parent_id=parent_id+100;
 +select * from t1 where parent_id=102;
 +update t1 set id=id+1000;
 +update t1 set id=1024 where id=1009; 
 +select * from t1;
 +update ignore t1 set id=id+1; # This will change all rows
 +select * from t1;
 +update ignore t1 set id=1023 where id=1010;
 +select * from t1 where parent_id=102;
 +--replace_column 9 #
 +explain select level from t1 where level=1;
 +select level,id from t1 where level=1;
 +select level,id,parent_id from t1 where level=1;
 +select level,id from t1 where level=1 order by id;
 +delete from t1 where level=1;
 +select * from t1;
 +drop table t1;
 +
 +#
 +# Test of index only reads
 +#
 +CREATE TABLE t1 (
 +   sca_code char(6) NOT NULL,
 +   cat_code char(6) NOT NULL,
 +   sca_desc varchar(50),
 +   lan_code char(2) NOT NULL,
 +   sca_pic varchar(100),
 +   sca_sdesc varchar(50),
 +   sca_sch_desc varchar(16),
 +   PRIMARY KEY (sca_code, cat_code, lan_code),
 +   INDEX sca_pic (sca_pic)
 +) engine = innodb ;
 +
 +INSERT INTO t1 ( sca_code, cat_code, sca_desc, lan_code, sca_pic, sca_sdesc, sca_sch_desc) VALUES ( 'PD', 'J', 'PENDANT', 'EN', NULL, NULL, 'PENDANT'),( 'RI', 'J', 'RING', 'EN', NULL, NULL, 'RING'),( 'QQ', 'N', 'RING', 'EN', 'not null', NULL, 'RING');
 +select count(*) from t1 where sca_code = 'PD';
 +select count(*) from t1 where sca_code <= 'PD';
 +select count(*) from t1 where sca_pic is null;
 +alter table t1 drop index sca_pic, add index sca_pic (cat_code, sca_pic);
 +select count(*) from t1 where sca_code='PD' and sca_pic is null;
 +select count(*) from t1 where cat_code='E';
 +
 +alter table t1 drop index sca_pic, add index (sca_pic, cat_code);
 +select count(*) from t1 where sca_code='PD' and sca_pic is null;
 +select count(*) from t1 where sca_pic >= 'n';
 +select sca_pic from t1 where sca_pic is null;
 +update t1 set sca_pic="test" where sca_pic is null;
 +delete from t1 where sca_code='pd';
 +drop table t1;
 +
 +#
 +# Test of opening table twice and timestamps
 +#
 +set @a:=now();
 +CREATE TABLE t1 (a int not null, b timestamp not null default 
 +current_timestamp on update current_timestamp, primary key (a)) engine=innodb;
 +insert into t1 (a) values(1),(2),(3);
 +select t1.a from t1 natural join t1 as t2 where t1.b >= @a order by t1.a;
 +select a from t1 natural join t1 as t2 where b >= @a order by a;
 +update t1 set a=5 where a=1;
 +select a from t1;
 +drop table t1;
 +
 +#
 +# Test with variable length primary key
 +#
 +create table t1 (a varchar(100) not null, primary key(a), b int not null) engine=innodb;
 +insert into t1 values("hello",1),("world",2);
 +select * from t1 order by b desc;
 +optimize table t1;
 +--replace_column 7 #
 +show keys from t1;
 +drop table t1;
 +
 +#
 +# Test of create index with NULL columns
 +#
 +create table t1 (i int, j int ) ENGINE=innodb;
 +insert into t1 values (1,2);
 +select * from t1 where i=1 and j=2;
 +create index ax1 on t1 (i,j);
 +select * from t1 where i=1 and j=2;
 +drop table t1;
 +
 +#
 +# Test min-max optimization
 +#
 +
 +CREATE TABLE t1 (
 +  a int3 unsigned NOT NULL,
 +  b int1 unsigned NOT NULL,
 +  UNIQUE (a, b)
 +) ENGINE = innodb;
 + 
 +INSERT INTO t1 VALUES (1, 1);
 +SELECT MIN(B),MAX(b) FROM t1 WHERE t1.a = 1;
 +drop table t1;
 +
 +#
 +# Test INSERT DELAYED
 +#
 +
 +CREATE TABLE t1 (a int unsigned NOT NULL) engine=innodb;
 +# Can't test this in 3.23
 +# INSERT DELAYED INTO t1 VALUES (1);
 +INSERT INTO t1 VALUES (1);
 +SELECT * FROM t1;
 +DROP TABLE t1;
 +
 +
 +#
 +# Crash when using many tables (Test case by Jeremy D Zawodny)
 +#
 +
 +create table t1 (a int  primary key,b int, c int, d int, e int, f int, g int, h int, i int, j int, k int, l int, m int, n int, o int, p int, q int, r int, s int, t int, u int, v int, w int, x int, y int, z int, a1 int, a2 int, a3 int, a4 int, a5 int, a6 int, a7 int, a8 int, a9 int, b1 int, b2 int, b3 int, b4 int, b5 int, b6 int) engine = innodb;
 +insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
 +--replace_column 9 #
 +--replace_result "Using where" "Using index condition"
 +explain select * from t1 where a > 0 and a < 50;
 +drop table t1;
 +
 +#
 +# Test lock tables
 +#
 +
 +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
 +insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
 +LOCK TABLES t1 WRITE;
 +--error ER_DUP_ENTRY
 +insert into t1 values (99,1,2,'D'),(1,1,2,'D');
 +select id from t1;
 +select id from t1;
 +UNLOCK TABLES;
 +DROP TABLE t1;
 +
 +create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
 +insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
 +LOCK TABLES t1 WRITE;
 +begin;
 +--error ER_DUP_ENTRY
 +insert into t1 values (99,1,2,'D'),(1,1,2,'D');
 +select id from t1;
 +insert ignore into t1 values (100,1,2,'D'),(1,1,99,'D');
 +commit;
 +select id,id3 from t1;
 +UNLOCK TABLES;
 +DROP TABLE t1;
 +
 +#
 +# Test prefix key
 +#
 +create table t1 (a char(20), unique (a(5))) engine=innodb;
 +drop table t1;
 +create table t1 (a char(20), index (a(5))) engine=innodb;
 +show create table t1;
 +drop table t1;
 +
 +#
 +# Test using temporary table and auto_increment
 +#
 +
 +create temporary table t1 (a int not null auto_increment, primary key(a)) engine=innodb;
 +insert into t1 values (NULL),(NULL),(NULL);
 +delete from t1 where a=3;
 +insert into t1 values (NULL);
 +select * from t1;
 +alter table t1 add b int;
 +select * from t1;
 +drop table t1;
 +
 +#Slashdot bug
 +create table t1
 + (
 +  id int auto_increment primary key,
 +  name varchar(32) not null,
 +  value text not null,
 +  uid int not null,
 +  unique key(name,uid)
 + ) engine=innodb;
 +insert into t1 values (1,'one','one value',101),
 + (2,'two','two value',102),(3,'three','three value',103);
 +set insert_id=5;
 +replace into t1 (value,name,uid) values ('other value','two',102);
 +delete from t1 where uid=102;
 +set insert_id=5;
 +replace into t1 (value,name,uid) values ('other value','two',102);
 +set insert_id=6;
 +replace into t1 (value,name,uid) values ('other value','two',102);
 +select * from t1;
 +drop table t1;
 +
 +#
 +# Test DROP DATABASE
 +#
 +
 +create database mysqltest;
 +create table mysqltest.t1 (a int not null) engine= innodb;
 +insert into mysqltest.t1 values(1);
 +create table mysqltest.t2 (a int not null) engine= myisam;
 +insert into mysqltest.t2 values(1);
 +create table mysqltest.t3 (a int not null) engine= heap;
 +insert into mysqltest.t3 values(1);
 +commit;
 +drop database mysqltest;
 +# Don't check error message
 +--error 1049
 +show tables from mysqltest;
 +
 +#
 +# Test truncate table with and without auto_commit
 +#
 +
 +set autocommit=0;
 +create table t1 (a int not null) engine= innodb;
 +insert into t1 values(1),(2);
 +truncate table t1;
 +commit;
 +truncate table t1;
 +truncate table t1;
 +select * from t1;
 +insert into t1 values(1),(2);
 +delete from t1;
 +select * from t1;
 +commit;
 +drop table t1;
 +set autocommit=1;
 +
 +create table t1 (a int not null) engine= innodb;
 +insert into t1 values(1),(2);
 +truncate table t1;
 +insert into t1 values(1),(2);
 +select * from t1;
 +truncate table t1;
 +insert into t1 values(1),(2);
 +delete from t1;
 +select * from t1;
 +drop table t1;
 +
 +#
 +# Test of how ORDER BY works when doing it on the whole table
 +#
 +
 +create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=innodb;
 +insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
 +--replace_column 9 #
 +explain select * from t1 order by a;
 +--replace_column 9 #
 +explain select * from t1 order by b;
 +--replace_column 9 #
 +explain select * from t1 order by c;
 +--replace_column 9 #
 +explain select a from t1 order by a;
 +--replace_column 9 #
 +explain select b from t1 order by b;
 +--replace_column 9 #
 +explain select a,b from t1 order by b;
 +--replace_column 9 #
 +explain select a,b from t1;
 +--replace_column 9 #
 +explain select a,b,c from t1;
 +drop table t1;
 +
 +#
 +# Check describe
 +#
 +
 +create table t1 (t int not null default 1, key (t)) engine=innodb;
 +desc t1;
 +drop table t1;
 +
 +#
 +# Test of multi-table-delete
 +#
 +
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +
 +CREATE TABLE t1 (
 +  number bigint(20) NOT NULL default '0',
 +  cname char(15) NOT NULL default '',
 +  carrier_id smallint(6) NOT NULL default '0',
 +  privacy tinyint(4) NOT NULL default '0',
 +  last_mod_date timestamp NOT NULL,
 +  last_mod_id smallint(6) NOT NULL default '0',
 +  last_app_date timestamp NOT NULL,
 +  last_app_id smallint(6) default '-1',
 +  version smallint(6) NOT NULL default '0',
 +  assigned_scps int(11) default '0',
 +  status tinyint(4) default '0'
 +) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
 +INSERT INTO t1 VALUES (9197722223,'berry',90,3,20020111112809,500,20020102114532,501,4,10,0);
 +INSERT INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
 +INSERT INTO t1 VALUES (302467,'Sue\'s Subshop',90,3,20020109113241,500,20020102115111,501,7,24,0);
 +INSERT INTO t1 VALUES (6014911113,'SudzCarwash',520,1,20020102115234,500,20020102115259,501,33,32768,0);
 +INSERT INTO t1 VALUES (333,'tubs',99,2,20020109113440,501,20020109113440,500,3,10,0);
 +CREATE TABLE t2 (
 +  number bigint(20) NOT NULL default '0',
 +  cname char(15) NOT NULL default '',
 +  carrier_id smallint(6) NOT NULL default '0',
 +  privacy tinyint(4) NOT NULL default '0',
 +  last_mod_date timestamp NOT NULL,
 +  last_mod_id smallint(6) NOT NULL default '0',
 +  last_app_date timestamp NOT NULL,
 +  last_app_id smallint(6) default '-1',
 +  version smallint(6) NOT NULL default '0',
 +  assigned_scps int(11) default '0',
 +  status tinyint(4) default '0'
 +) ENGINE=InnoDB;
 +INSERT INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
 +INSERT INTO t2 VALUES (9197722223,'berry',90,3,20020111112818,500,20020102114532,501,4,10,0);
 +INSERT INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
 +INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
 +select * from t1;
 +select * from t2;
 +delete t1, t2 from t1 left join t2 on t1.number=t2.number where (t1.carrier_id=90 and t1.number=t2.number) or (t2.carrier_id=90 and t1.number=t2.number) or  (t1.carrier_id=90 and t2.number is null);
 +select * from t1;
 +select * from t2; 
 +select * from t2;
 +drop table t1,t2;
 +SET sql_mode = default;
 +
 +#
 +# A simple test with some isolation levels
 +# TODO: Make this into a test using replication to really test how
 +# this works.
 +#
 +
 +create table t1 (id int unsigned not null auto_increment, code tinyint unsigned not null, name char(20) not null, primary key (id), key (code), unique (name)) engine=innodb;
 +
 +BEGIN;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +SELECT @@tx_isolation,@@global.tx_isolation;
 +insert into t1 (code, name) values (1, 'Tim'), (1, 'Monty'), (2, 'David');
 +select id, code, name from t1 order by id;
 +COMMIT;
 +
 +BEGIN;
 +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ;
 +insert into t1 (code, name) values (2, 'Erik'), (3, 'Sasha');
 +select id, code, name from t1 order by id;
 +COMMIT;
 +
 +SET binlog_format='MIXED';
 +BEGIN;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
 +insert into t1 (code, name) values (3, 'Jeremy'), (4, 'Matt');
 +select id, code, name from t1 order by id;
 +COMMIT;
 +DROP TABLE t1;
 +
 +#
 +# Test of multi-table-update
 +#
 +create table t1 (n int(10), d int(10)) engine=innodb;
 +create table t2 (n int(10), d int(10)) engine=innodb;
 +insert into t1 values(1,1),(1,2);
 +insert into t2 values(1,10),(2,20);
 +UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n;
 +select * from t1;
 +select * from t2;
 +drop table t1,t2;
 +
 +#
 +# Bug #29136  	erred multi-delete on trans table does not rollback 
 +#
 +
 +# prepare
 +--disable_warnings
 +drop table if exists t1, t2;
 +--enable_warnings
 +CREATE TABLE t1 (a int, PRIMARY KEY (a));
 +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
 +create trigger trg_del_t2 after  delete on t2 for each row
 +       insert into t1 values (1);
 +insert into t1 values (1);
 +insert into t2 values (1),(2);
 +
 +
 +# exec cases A, B - see multi_update.test
 +
 +# A. send_error() w/o send_eof() branch
 +
 +--error ER_DUP_ENTRY
 +delete t2 from t2;
 +
 +# check
 +
 +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
 +
 +# cleanup bug#29136
 +
 +drop table t1, t2;
 +
 +
 +#
 +# Bug #29136  	erred multi-delete on trans table does not rollback 
 +#
 +
 +# prepare
 +--disable_warnings
 +drop table if exists t1, t2;
 +--enable_warnings
 +CREATE TABLE t1 (a int, PRIMARY KEY (a));
 +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
 +create trigger trg_del_t2 after  delete on t2 for each row
 +       insert into t1 values (1);
 +insert into t1 values (1);
 +insert into t2 values (1),(2);
 +
 +
 +# exec cases A, B - see multi_update.test
 +
 +# A. send_error() w/o send_eof() branch
 +
 +--error ER_DUP_ENTRY
 +delete t2 from t2;
 +
 +# check
 +
 +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */;
 +
 +# cleanup bug#29136
 +
 +drop table t1, t2;
 +
 +
 +#
 +# Testing of IFNULL
 +#
 +create table t1 (a int, b int) engine=innodb;
 +insert into t1 values(20,null);
 +select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
 +t2.b=t3.a;
 +select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
 +t2.b=t3.a order by 1;
 +insert into t1 values(10,null);
 +select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on
 +t2.b=t3.a order by 1;
 +drop table t1;
 +
 +#
 +# Test of read_through not existing const_table
 +#
 +
 +create table t1 (a varchar(10) not null) engine=myisam;
 +create table t2 (b varchar(10) not null unique) engine=innodb;
 +select t1.a from t1,t2 where t1.a=t2.b;
 +drop table t1,t2;
 +create table t1 (a int not null, b int, primary key (a)) engine = innodb;
 +create table t2 (a int not null, b int, primary key (a)) engine = innodb;
 +insert into t1 values (10, 20);
 +insert into t2 values (10, 20);
 +update t1, t2 set t1.b = 150, t2.b = t1.b where t2.a = t1.a and t1.a = 10;
 +drop table t1,t2;
 +
 +#
 +# Test of multi-table-delete with foreign key constraints
 +#
 +
 +CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
 +CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (t1_id) REFERENCES t1(id)  ON DELETE CASCADE ) ENGINE=INNODB;
 +insert into t1 set id=1;
 +insert into t2 set id=1, t1_id=1;
 +delete t1,t2 from t1,t2 where t1.id=t2.t1_id;
 +select * from t1;
 +select * from t2;
 +drop table t2,t1;
 +CREATE TABLE t1(id INT NOT NULL,  PRIMARY KEY (id)) ENGINE=INNODB;
 +CREATE TABLE t2(id  INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id)  ) ENGINE=INNODB;
 +INSERT INTO t1 VALUES(1);
 +INSERT INTO t2 VALUES(1, 1);
 +SELECT * from t1;
 +UPDATE t1,t2 SET t1.id=t1.id+1, t2.t1_id=t1.id+1;
 +SELECT * from t1;
 +UPDATE t1,t2 SET t1.id=t1.id+1 where t1.id!=t2.id;
 +SELECT * from t1;
 +DROP TABLE t1,t2;
 +
 +#
 +# Test of range_optimizer
 +#
 +
 +set autocommit=0;
 +
 +CREATE TABLE t1 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
 +
 +CREATE TABLE t2 (id CHAR(15) NOT NULL, value CHAR(40) NOT NULL, PRIMARY KEY(id)) ENGINE=InnoDB;
 +
 +CREATE TABLE t3 (id1 CHAR(15) NOT NULL, id2 CHAR(15) NOT NULL, PRIMARY KEY(id1, id2)) ENGINE=InnoDB;
 +
 +INSERT INTO t3 VALUES("my-test-1", "my-test-2");
 +COMMIT;
 +
 +INSERT INTO t1 VALUES("this-key", "will disappear");
 +INSERT INTO t2 VALUES("this-key", "will also disappear");
 +DELETE FROM t3 WHERE id1="my-test-1";
 +
 +SELECT * FROM t1;
 +SELECT * FROM t2;
 +SELECT * FROM t3;
 +ROLLBACK;
 +
 +SELECT * FROM t1;
 +SELECT * FROM t2;
 +SELECT * FROM t3;
 +SELECT * FROM t3 WHERE id1="my-test-1" LOCK IN SHARE MODE;
 +COMMIT;
 +set autocommit=1;
 +DROP TABLE t1,t2,t3;
 +
 +#
 +# Check update with conflicting key
 +#
 +
 +CREATE TABLE t1 (a int not null primary key, b int not null, unique (b)) engine=innodb;
 +INSERT INTO t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(8,8),(9,9);
 +# We need the a < 1000 test here to quard against the halloween problems
 +UPDATE t1 set a=a+100 where b between 2 and 3 and a < 1000;
 +SELECT * from t1;
 +drop table t1;
 +
 +CREATE TABLE t2 (   NEXT_T         BIGINT NOT NULL PRIMARY KEY) ENGINE=MyISAM;
 +CREATE TABLE t1 (  B_ID           INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
 +SET AUTOCOMMIT=0;
 +INSERT INTO t1 ( B_ID ) VALUES ( 1 );
 +INSERT INTO t2 ( NEXT_T ) VALUES ( 1 );
 +ROLLBACK;
 +SELECT * FROM t1;
 +drop table  t1,t2;
 +create table t1  ( pk         int primary key,    parent     int not null,    child      int not null,       index (parent)  ) engine = innodb;
 +insert into t1 values   (1,0,4),  (2,1,3),  (3,2,1),  (4,1,2);
 +select distinct  parent,child   from t1   order by parent;
 +drop table t1;
 +
 +#
 +# Test that MySQL priorities clustered indexes
 +#
 +create table t1 (a int not null auto_increment primary key, b int, c int, key(c)) engine=innodb;
 +create table t2 (a int not null auto_increment primary key, b int);
 +insert into t1 (b) values (null),(null),(null),(null),(null),(null),(null);
 +insert into t2 (a) select b from t1;
 +insert into t1 (b) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +insert into t2 (a) select b from t1;
 +insert into t1 (a) select b from t2;
 +select count(*) from t1;
 +--replace_column 9 # 10 #
 +explain select * from t1 where c between 1 and 2500;
 +update t1 set c=a;
 +--replace_column 9 # 10 #
 +explain select * from t1 where c between 1 and 2500;
 +drop table t1,t2;
 +
 +#
 +# Test of UPDATE ... ORDER BY
 +#
 +
 +create table t1 (id int primary key auto_increment, fk int, index index_fk (fk)) engine=innodb;
 +
 +insert into t1 (id) values (null),(null),(null),(null),(null);
 +update t1 set fk=69 where fk is null order by id limit 1;
 +SELECT * from t1;
 +drop table t1;
 +
 +create table t1 (a int not null, b int not null, key (a));
 +insert into t1 values (1,1),(1,2),(1,3),(3,1),(3,2),(3,3),(3,1),(3,2),(3,3),(2,1),(2,2),(2,3);
 +SET @tmp=0;
 +update t1 set b=(@tmp:=@tmp+1) order by a;
 +update t1 set b=99 where a=1 order by b asc limit 1;
 +update t1 set b=100 where a=1 order by b desc limit 2;
 +update t1 set a=a+10+b where a=1 order by b;
 +select * from t1 order by a,b;
 +drop table t1;
 +
 +#
 +# Test of multi-table-updates (bug #1980).
 +#
 +
 +create table t1 ( c char(8) not null ) engine=innodb;
 +insert into t1 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9');
 +insert into t1 values ('A'),('B'),('C'),('D'),('E'),('F');
 +
 +alter table t1 add b char(8) not null;
 +alter table t1 add a char(8) not null;
 +alter table t1 add primary key (a,b,c);
 +update t1 set a=c, b=c;
 +
 +create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, primary key(a,b,c)) engine=innodb;
 +insert into t2 select * from t1;
 +
 +delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
 +drop table t1,t2;
 +
 +#
 +# test autoincrement with TRUNCATE
 +#
 +
 +SET AUTOCOMMIT=1;
 +create table t1 (a integer auto_increment primary key) engine=innodb;
 +insert into t1 (a) values (NULL),(NULL);
 +truncate table t1;
 +insert into t1 (a) values (NULL),(NULL);
 +SELECT * from t1;
 +drop table t1;
 +
 +#
 +# Test dictionary handling with spaceand quoting
 +#
 +
 +CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) ENGINE=INNODB;
 +CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`)  ON DELETE CASCADE ) ENGINE=INNODB;
 +#show create table t2;
 +drop table t2,t1;
 +
 +#
 +# Test of multi updated and foreign keys
 +#
 +
 +create table `t1` (`id` int( 11 ) not null  ,primary key ( `id` )) engine = innodb;
 +insert into `t1`values ( 1 ) ;
 +create table `t2` (`id` int( 11 ) not null default '0',unique key `id` ( `id` ) ,constraint `t1_id_fk` foreign key ( `id` ) references `t1` (`id` )) engine = innodb;
 +insert into `t2`values ( 1 ) ;
 +create table `t3` (`id` int( 11 ) not null default '0',key `id` ( `id` ) ,constraint `t2_id_fk` foreign key ( `id` ) references `t2` (`id` )) engine = innodb;
 +insert into `t3`values ( 1 ) ;
 +--error ER_ROW_IS_REFERENCED_2
 +delete t3,t2,t1 from t1,t2,t3 where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 +--error ER_ROW_IS_REFERENCED_2
 +update t1,t2,t3 set t3.id=5, t2.id=6, t1.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 +--error ER_BAD_FIELD_ERROR
 +update t3 set  t3.id=7  where t1.id =1 and t2.id = t1.id and t3.id = t2.id;
 +drop table t3,t2,t1;
 +
 +# test ON UPDATE CASCADE
 +CREATE TABLE t1 (
 +        c1 VARCHAR(8), c2 VARCHAR(8),
 +	PRIMARY KEY (c1, c2)
 +) ENGINE=InnoDB;
 +
 +CREATE TABLE t2 (
 +        c0 INT PRIMARY KEY,
 +        c1 VARCHAR(8) UNIQUE,
 +        FOREIGN KEY (c1) REFERENCES t1 (c1) ON UPDATE CASCADE
 +) ENGINE=InnoDB;
 +
 +INSERT INTO t1 VALUES ('old', 'somevalu'), ('other', 'anyvalue');
 +INSERT INTO t2 VALUES (10, 'old'), (20, 'other');
 +--error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO
 +UPDATE t1 SET c1 = 'other' WHERE c1 = 'old';
 +DROP TABLE t2,t1;
 +
 +#
 +# test for FK cascade depth limit
 +#
 +call mtr.add_suppression("Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 255. Please drop excessive foreign constraints and try again");
 +
 +create table t1(
 +	id int primary key,
 +	pid int,
 +	index(pid),
 +	foreign key(pid) references t1(id) on delete cascade) engine=innodb;
 +insert into t1 values
 +(  0,   0), (  1,   0), (  2,   1), (  3,   2),
 +(  4,   3), (  5,   4), (  6,   5), (  7,   6),
 +(  8,   7), (  9,   8), ( 10,   9), ( 11,  10),
 +( 12,  11), ( 13,  12), ( 14,  13), ( 15,  14),
 +( 16,  15), ( 17,  16), ( 18,  17), ( 19,  18),
 +( 20,  19), ( 21,  20), ( 22,  21), ( 23,  22),
 +( 24,  23), ( 25,  24), ( 26,  25), ( 27,  26),
 +( 28,  27), ( 29,  28), ( 30,  29), ( 31,  30),
 +( 32,  31), ( 33,  32), ( 34,  33), ( 35,  34),
 +( 36,  35), ( 37,  36), ( 38,  37), ( 39,  38),
 +( 40,  39), ( 41,  40), ( 42,  41), ( 43,  42),
 +( 44,  43), ( 45,  44), ( 46,  45), ( 47,  46),
 +( 48,  47), ( 49,  48), ( 50,  49), ( 51,  50),
 +( 52,  51), ( 53,  52), ( 54,  53), ( 55,  54),
 +( 56,  55), ( 57,  56), ( 58,  57), ( 59,  58),
 +( 60,  59), ( 61,  60), ( 62,  61), ( 63,  62),
 +( 64,  63), ( 65,  64), ( 66,  65), ( 67,  66),
 +( 68,  67), ( 69,  68), ( 70,  69), ( 71,  70),
 +( 72,  71), ( 73,  72), ( 74,  73), ( 75,  74),
 +( 76,  75), ( 77,  76), ( 78,  77), ( 79,  78),
 +( 80,  79), ( 81,  80), ( 82,  81), ( 83,  82),
 +( 84,  83), ( 85,  84), ( 86,  85), ( 87,  86),
 +( 88,  87), ( 89,  88), ( 90,  89), ( 91,  90),
 +( 92,  91), ( 93,  92), ( 94,  93), ( 95,  94),
 +( 96,  95), ( 97,  96), ( 98,  97), ( 99,  98),
 +(100,  99), (101, 100), (102, 101), (103, 102),
 +(104, 103), (105, 104), (106, 105), (107, 106),
 +(108, 107), (109, 108), (110, 109), (111, 110),
 +(112, 111), (113, 112), (114, 113), (115, 114),
 +(116, 115), (117, 116), (118, 117), (119, 118),
 +(120, 119), (121, 120), (122, 121), (123, 122),
 +(124, 123), (125, 124), (126, 125), (127, 126),
 +(128, 127), (129, 128), (130, 129), (131, 130),
 +(132, 131), (133, 132), (134, 133), (135, 134),
 +(136, 135), (137, 136), (138, 137), (139, 138),
 +(140, 139), (141, 140), (142, 141), (143, 142),
 +(144, 143), (145, 144), (146, 145), (147, 146),
 +(148, 147), (149, 148), (150, 149), (151, 150),
 +(152, 151), (153, 152), (154, 153), (155, 154),
 +(156, 155), (157, 156), (158, 157), (159, 158),
 +(160, 159), (161, 160), (162, 161), (163, 162),
 +(164, 163), (165, 164), (166, 165), (167, 166),
 +(168, 167), (169, 168), (170, 169), (171, 170),
 +(172, 171), (173, 172), (174, 173), (175, 174),
 +(176, 175), (177, 176), (178, 177), (179, 178),
 +(180, 179), (181, 180), (182, 181), (183, 182),
 +(184, 183), (185, 184), (186, 185), (187, 186),
 +(188, 187), (189, 188), (190, 189), (191, 190),
 +(192, 191), (193, 192), (194, 193), (195, 194),
 +(196, 195), (197, 196), (198, 197), (199, 198),
 +(200, 199), (201, 200), (202, 201), (203, 202),
 +(204, 203), (205, 204), (206, 205), (207, 206),
 +(208, 207), (209, 208), (210, 209), (211, 210),
 +(212, 211), (213, 212), (214, 213), (215, 214),
 +(216, 215), (217, 216), (218, 217), (219, 218),
 +(220, 219), (221, 220), (222, 221), (223, 222),
 +(224, 223), (225, 224), (226, 225), (227, 226),
 +(228, 227), (229, 228), (230, 229), (231, 230),
 +(232, 231), (233, 232), (234, 233), (235, 234),
 +(236, 235), (237, 236), (238, 237), (239, 238),
 +(240, 239), (241, 240), (242, 241), (243, 242),
 +(244, 243), (245, 244), (246, 245), (247, 246),
 +(248, 247), (249, 248), (250, 249), (251, 250),
 +(252, 251), (253, 252), (254, 253), (255, 254);
- --error 1296,1451
++--error 4029,1451
 +delete from t1 where id=0;
 +delete from t1 where id=255;
 +--error 0,1451
 +delete from t1 where id=0;
 +
 +drop table t1;
 +
 +#
 +# Test timestamps
 +#
 +
 +CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
 +CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
 +(stamp))ENGINE=InnoDB;
 +insert into t1 values (1),(2),(3);
 +# Note that timestamp 3 is wrong
 +insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
 +SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
 +'20020204120000' GROUP BY col1;
 +drop table t1,t2;
 +
 +#
 +# Test by Francois MASUREL
 +#
 +
 +CREATE TABLE t1 (
 +  `id` int(10) unsigned NOT NULL auto_increment,
 +  `id_object` int(10) unsigned default '0',
 +  `id_version` int(10) unsigned NOT NULL default '1',
 +  `label` varchar(100) NOT NULL default '',
 +  `description` text,
 +  PRIMARY KEY  (`id`),
 +  KEY `id_object` (`id_object`),
 +  KEY `id_version` (`id_version`)
 +) ENGINE=InnoDB;
 +
 +INSERT INTO t1 VALUES("6", "3382", "9", "Test", NULL), ("7", "102", "5", "Le Pekin (Test)", NULL),("584", "1794", "4", "Test de resto", NULL),("837", "1822", "6", "Test 3", NULL),("1119", "3524", "1", "Societe Test", NULL),("1122", "3525", "1", "Fournisseur Test", NULL);
 +
 +CREATE TABLE t2 (
 +  `id` int(10) unsigned NOT NULL auto_increment,
 +  `id_version` int(10) unsigned NOT NULL default '1',
 +  PRIMARY KEY  (`id`),
 +  KEY `id_version` (`id_version`)
 +) ENGINE=InnoDB;
 +
 +INSERT INTO t2 VALUES("3524", "1"),("3525", "1"),("1794", "4"),("102", "5"),("1822", "6"),("3382", "9");
 +
 +SELECT t2.id, t1.`label` FROM t2 INNER JOIN
 +(SELECT t1.id_object as id_object FROM t1 WHERE t1.`label` LIKE '%test%') AS lbl 
 +ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
 +drop table t1,t2;
 +
 +create table t1 (a int, b varchar(200), c text not null) checksum=1 engine=myisam;
 +create table t2 (a int, b varchar(200), c text not null) checksum=0 engine=innodb;
 +create table t3 (a int, b varchar(200), c text not null) checksum=1 engine=innodb;
 +insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
 +insert t2 select * from t1;
 +insert t3 select * from t1;
 +checksum table t1, t2, t3, t4 quick;
 +checksum table t1, t2, t3, t4;
 +checksum table t1, t2, t3, t4 extended;
 +#show table status;
 +drop table t1,t2,t3;
 +
 +#
 +# Test problem with refering to different fields in same table in UNION
 +# (Bug #2552)
 +#
 +create table t1 (id int,  name char(10) not null,  name2 char(10) not null) engine=innodb;
 +insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt');
 +select trim(name2) from t1  union all  select trim(name) from t1 union all select trim(id) from t1;
 +drop table t1;
 +
 +#
 +# Bug2160
 +#
 +create table t1 (a int) engine=innodb;
 +create table t2 like t1;
 +drop table t1,t2;
 +
 +#
 +# Test of automaticly created foreign keys
 +#
 +
 +create table t1 (id int(11) not null, id2 int(11) not null, unique (id,id2)) engine=innodb;
 +create table t2 (id int(11) not null, constraint t1_id_fk foreign key ( id ) references t1 (id)) engine = innodb;
 +show create table t1;
 +show create table t2;
 +create index id on t2 (id);
 +show create table t2;
 +create index id2 on t2 (id);
 +show create table t2;
 +drop index id2 on t2;
 +--error ER_DROP_INDEX_FK
 +drop index id on t2;
 +show create table t2;
 +drop table t2;
 +
 +create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id,id2) references t1 (id,id2)) engine = innodb;
 +show create table t2;
 +create unique index id on t2 (id,id2);
 +show create table t2;
 +drop table t2;
 +
 +# Check foreign key columns created in different order than key columns
 +create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
 +show create table t2;
 +drop table t2;
 +
 +create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2), constraint t1_id_fk foreign key (id) references t1 (id)) engine = innodb;
 +show create table t2;
 +drop table t2;
 +
 +create table t2 (id int(11) not null, id2 int(11) not null, unique (id,id2),constraint t1_id_fk foreign key (id2,id) references t1 (id,id2)) engine = innodb;
 +show create table t2;
 +drop table t2;
 +
 +create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id), primary key (id), index (id,id2)) engine = innodb;
 +show create table t2;
 +drop table t2;
 +
 +create table t2 (id int(11) not null auto_increment, id2 int(11) not null, constraint t1_id_fk foreign key (id) references t1 (id)) engine= innodb;
 +show create table t2;
 +alter table t2 add index id_test (id), add index id_test2 (id,id2);
 +show create table t2;
 +drop table t2;
 +
 +# Test error handling
 +
 +# Embedded server doesn't chdir to data directory
 +--replace_result $MYSQLTEST_VARDIR . master-data/ ''
 +--error ER_WRONG_FK_DEF
 +create table t2 (id int(11) not null, id2 int(11) not null, constraint t1_id_fk foreign key (id2,id) references t1 (id)) engine = innodb;
 +
 +# bug#3749
 +
 +create table t2 (a int auto_increment primary key, b int, index(b), foreign key (b) references t1(id), unique(b)) engine=innodb;
 +show create table t2;
 +drop table t2;
 +create table t2 (a int auto_increment primary key, b int, foreign key (b) references t1(id), foreign key (b) references t1(id), unique(b)) engine=innodb;
 +show create table t2;
 +drop table t2, t1;
 +
 +
 +#
 +# Bug #6126: Duplicate columns in keys gives misleading error message
 +#
 +--error 1060
 +create table t1 (c char(10), index (c,c)) engine=innodb;
 +--error 1060
 +create table t1 (c1 char(10), c2 char(10), index (c1,c2,c1)) engine=innodb;
 +--error 1060
 +create table t1 (c1 char(10), c2 char(10), index (c1,c1,c2)) engine=innodb;
 +--error 1060
 +create table t1 (c1 char(10), c2 char(10), index (c2,c1,c1)) engine=innodb;
 +create table t1 (c1 char(10), c2 char(10)) engine=innodb;
 +--error 1060
 +alter table t1 add key (c1,c1);
 +--error 1060
 +alter table t1 add key (c2,c1,c1);
 +--error 1060
 +alter table t1 add key (c1,c2,c1);
 +--error 1060
 +alter table t1 add key (c1,c1,c2);
 +drop table t1;
 +
 +#
 +# Bug #4082: integer truncation
 +#
 +
 +create table t1(a int(1) , b int(1)) engine=innodb;
 +insert into t1 values ('1111', '3333');
 +select distinct concat(a, b) from t1;
 +drop table t1;
 +
 +#
 +# check null values #1
 +#
 +
 +--disable_warnings
 +CREATE TABLE t1 (a_id tinyint(4) NOT NULL default '0', PRIMARY KEY  (a_id)) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +INSERT INTO t1 VALUES (1),(2),(3);
 +CREATE TABLE t2 (b_id tinyint(4) NOT NULL default '0',b_a tinyint(4) NOT NULL default '0', PRIMARY KEY  (b_id), KEY  (b_a), 
 +                CONSTRAINT fk_b_a FOREIGN KEY (b_a) REFERENCES t1 (a_id) ON DELETE CASCADE ON UPDATE NO ACTION) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +--enable_warnings
 +INSERT INTO t2 VALUES (1,1),(2,1),(3,1),(4,2),(5,2);
 +SELECT * FROM (SELECT t1.*,GROUP_CONCAT(t2.b_id SEPARATOR ',') as b_list FROM (t1 LEFT JOIN (t2) on t1.a_id = t2.b_a) GROUP BY t1.a_id ) AS xyz;
 +DROP TABLE t2;
 +DROP TABLE t1;
 +
 +#
 +# Bug#11816 - Truncate table doesn't work with temporary innodb tables
 +# This is not an innodb bug, but we test it using innodb.
 +#
 +create temporary table t1 (a int) engine=innodb;
 +insert into t1 values (4711);
 +truncate t1;
 +insert into t1 values (42);
 +select * from t1;
 +drop table t1;
 +# Show that it works with permanent tables too.
 +create table t1 (a int) engine=innodb;
 +insert into t1 values (4711);
 +truncate t1;
 +insert into t1 values (42);
 +select * from t1;
 +drop table t1;
 +
 +#
 +# Bug #13025  Server crash during filesort	
 +#
 +
 +create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
 +insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
 +-- disable_result_log
 +analyze table t1;
 +-- enable_result_log
 +select * from t1 order by a,b,c,d;
 +explain select * from t1 order by a,b,c,d;
 +drop table t1;
 +
 +#
 +# BUG#11039,#13218 Wrong key length in min()
 +#
 +
 +create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
 +insert into t1 values ('8', '6'), ('4', '7');
 +select min(a) from t1;
 +select min(b) from t1 where a='8';
 +drop table t1;
 +
 +# End of 4.1 tests
 +
 +#
 +# range optimizer problem
 +#
 +
 +create table t1 (x bigint unsigned not null primary key) engine=innodb;
 +insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
 +select * from t1;
 +select count(*) from t1 where x>0;
 +select count(*) from t1 where x=0;
 +select count(*) from t1 where x<0;
 +select count(*) from t1 where x < -16;
 +select count(*) from t1 where x = -16;
 +explain select count(*) from t1 where x > -16;
 +select count(*) from t1 where x > -16;
 +select * from t1 where x > -16;
 +select count(*) from t1 where x = 18446744073709551601;
 +drop table t1;
 +
 +
 +# Test for testable InnoDB status variables. This test
 +# uses previous ones(pages_created, rows_deleted, ...).
 +--replace_result 511 ok 512 ok 2047 ok 513 ok 514 ok 515 ok
 +SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_buffer_pool_pages_total';
 +SELECT variable_value FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_page_size';
 +SELECT variable_value - @innodb_rows_deleted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_deleted';
 +SELECT variable_value - @innodb_rows_inserted_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_inserted';
 +SELECT variable_value - @innodb_rows_updated_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_rows_updated';
 +
 +# Test for row locks InnoDB status variables.
 +SELECT variable_value - @innodb_row_lock_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_waits';
 +SELECT variable_value - @innodb_row_lock_current_waits_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_current_waits';
 +SELECT variable_value - @innodb_row_lock_time_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time';
 +SELECT variable_value - @innodb_row_lock_time_max_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_max';
 +SELECT variable_value - @innodb_row_lock_time_avg_orig FROM information_schema.global_status WHERE LOWER(variable_name) = 'innodb_row_lock_time_avg';
 +
 +
 +#
 +# Test varchar
 +#
 +
 +let $default=`select @@storage_engine`;
 +set storage_engine=INNODB;
 +source include/varchar.inc;
 +
 +#
 +# Some errors/warnings on create
 +#
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +# Embedded server doesn't chdir to data directory
 +--replace_result $MYSQLTEST_VARDIR . master-data/ ''
 +SET GLOBAL innodb_large_prefix=OFF;
 +create table t1 (v varchar(65530), key(v));
 +SET GLOBAL innodb_large_prefix=default;
 +drop table t1;
 +create table t1 (v varchar(65536));
 +show create table t1;
 +drop table t1;
 +create table t1 (v varchar(65530) character set utf8);
 +show create table t1;
 +drop table t1;
 +SET sql_mode = default;
 +eval set default_storage_engine=$default;
 +
 +# InnoDB specific varchar tests
 +create table t1 (v varchar(16384)) engine=innodb;
 +drop table t1;
 +
 +#
 +# BUG#11039 Wrong key length in min()
 +#
 +
 +create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
 +insert into t1 values ('8', '6'), ('4', '7');
 +select min(a) from t1;
 +select min(b) from t1 where a='8';
 +drop table t1;
 +
 +#
 +# Bug #11080 & #11005  Multi-row REPLACE fails on a duplicate key error
 +#
 +
 +CREATE TABLE t1 ( `a` int(11) NOT NULL auto_increment, `b` int(11) default NULL,PRIMARY KEY  (`a`),UNIQUE KEY `b` (`b`)) ENGINE=innodb;
 +insert into t1 (b) values (1);
 +replace into t1 (b) values (2), (1), (3);
 +select * from t1;
 +truncate table t1;
 +insert into t1 (b) values (1);
 +replace into t1 (b) values (2);
 +replace into t1 (b) values (1);
 +replace into t1 (b) values (3);
 +select * from t1;
 +drop table t1;
 +
 +create table t1 (rowid int not null auto_increment, val int not null,primary
 +key (rowid), unique(val)) engine=innodb;
 +replace into t1 (val) values ('1'),('2');
 +replace into t1 (val) values ('1'),('2');
 +--error ER_DUP_ENTRY
 +insert into t1 (val) values ('1'),('2');
 +select * from t1;
 +drop table t1;
 +
 +#
 +# Test that update does not change internal auto-increment value
 +#
 +
 +create table t1 (a int not null auto_increment primary key, val int) engine=InnoDB;
 +insert into t1 (val) values (1);
 +update t1 set a=2 where a=1;
 +# We should get the following error because InnoDB does not update the counter
 +--error ER_DUP_ENTRY
 +insert into t1 (val) values (1);
 +select * from t1;
 +drop table t1;
 +#
 +# Bug #10465
 +#
 +
 +--disable_warnings
 +CREATE TABLE t1 (GRADE DECIMAL(4) NOT NULL, PRIMARY KEY (GRADE)) ENGINE=INNODB;
 +--enable_warnings
 +INSERT INTO t1 (GRADE) VALUES (151),(252),(343);
 +SELECT GRADE  FROM t1 WHERE GRADE > 160 AND GRADE < 300;
 +SELECT GRADE  FROM t1 WHERE GRADE= 151;
 +DROP TABLE t1;
 +
 +#
 +# Bug #12340 multitable delete deletes only one record
 +#
 +create table t1 (f1 varchar(10), f2 varchar(10), primary key (f1,f2)) engine=innodb;
 +create table t2 (f3 varchar(10), f4 varchar(10), key (f4)) engine=innodb;
 +insert into t2 values ('aa','cc');
 +insert into t1 values ('aa','bb'),('aa','cc');
 +delete t1 from t1,t2 where f1=f3 and f4='cc';
 +select * from t1;
 +drop table t1,t2;
 +
 +#
 +# Test that the slow TRUNCATE implementation resets autoincrement columns
 +# (bug #11946)
 +#
 +
 +CREATE TABLE t1 (
 +id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
 +) ENGINE=InnoDB;
 +
 +INSERT INTO t1 (id) VALUES (NULL);
 +SELECT * FROM t1;
 +TRUNCATE t1;
 +INSERT INTO t1 (id) VALUES (NULL);
 +SELECT * FROM t1;
 +
 +# continued from above; test that doing a slow TRUNCATE on a table with 0
 +# rows resets autoincrement columns
 +DELETE FROM t1;
 +TRUNCATE t1;
 +INSERT INTO t1 (id) VALUES (NULL);
 +SELECT * FROM t1;
 +DROP TABLE t1;
 +
 +# Test that foreign keys in temporary tables are not accepted (bug #12084)
 +CREATE TABLE t1
 +(
 + id INT PRIMARY KEY
 +) ENGINE=InnoDB;
 +
 +--error ER_CANNOT_ADD_FOREIGN,1005
 +CREATE TEMPORARY TABLE t2
 +(
 + id INT NOT NULL PRIMARY KEY,
 + b INT,
 + FOREIGN KEY (b) REFERENCES test.t1(id)
 +) ENGINE=InnoDB;
 +DROP TABLE t1;
 +
 +#
 +# Test that index column max sizes are honored (bug #13315)
 +#
 +
 +# prefix index
 +create table t1 (col1 varchar(2000), index (col1(767)))
 + character set = latin1 engine = innodb;
 +
 +# normal indexes
 +create table t2 (col1 char(255), index (col1))
 + character set = latin1 engine = innodb;
 +create table t3 (col1 binary(255), index (col1))
 + character set = latin1 engine = innodb;
 +create table t4 (col1 varchar(767), index (col1))
 + character set = latin1 engine = innodb;
 +create table t5 (col1 varchar(767) primary key)
 + character set = latin1 engine = innodb;
 +create table t6 (col1 varbinary(767) primary key)
 + character set = latin1 engine = innodb;
 +create table t7 (col1 text, index(col1(767)))
 + character set = latin1 engine = innodb;
 +create table t8 (col1 blob, index(col1(767)))
 + character set = latin1 engine = innodb;
 +
 +# multi-column indexes are allowed to be longer
 +create table t9 (col1 varchar(512), col2 varchar(512), index(col1, col2))
 + character set = latin1 engine = innodb;
 +
 +show create table t9;
 +
 +drop table t1, t2, t3, t4, t5, t6, t7, t8, t9;
 +
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +SET GLOBAL innodb_large_prefix=OFF;
 +# these should have their index length trimmed
 +create table t1 (col1 varchar(768), index(col1))
 + character set = latin1 engine = innodb;
 +create table t2 (col1 varbinary(768), index(col1))
 + character set = latin1 engine = innodb;
 +create table t3 (col1 text, index(col1(768)))
 + character set = latin1 engine = innodb;
 +create table t4 (col1 blob, index(col1(768)))
 + character set = latin1 engine = innodb;
 +SET GLOBAL innodb_large_prefix=default;
 +
 +show create table t1;
 +
 +drop table t1, t2, t3, t4;
 +
 +# these should be refused
 +set global innodb_large_prefix=OFF;
 +--error ER_TOO_LONG_KEY
 +create table t1 (col1 varchar(768) primary key)
 + character set = latin1 engine = innodb;
 +--error ER_TOO_LONG_KEY
 +create table t2 (col1 varbinary(768) primary key)
 + character set = latin1 engine = innodb;
 +--error ER_TOO_LONG_KEY
 +create table t3 (col1 text, primary key(col1(768)))
 + character set = latin1 engine = innodb;
 +--error ER_TOO_LONG_KEY
 +create table t4 (col1 blob, primary key(col1(768)))
 + character set = latin1 engine = innodb;
 +SET sql_mode = default;
 +set global innodb_large_prefix=default;
 +#
 +# Test improved foreign key error messages (bug #3443)
 +#
 +
 +CREATE TABLE t1
 +(
 + id INT PRIMARY KEY
 +) ENGINE=InnoDB;
 +
 +CREATE TABLE t2
 +(
 + v INT,
 + CONSTRAINT c1 FOREIGN KEY (v) REFERENCES t1(id)
 +) ENGINE=InnoDB;
 +
 +--error 1452
 +INSERT INTO t2 VALUES(2);
 +
 +INSERT INTO t1 VALUES(1);
 +INSERT INTO t2 VALUES(1);
 +
 +--error 1451
 +DELETE FROM t1 WHERE id = 1;
 +
 +--error 1451, 1217
 +DROP TABLE t1;
 +
 +SET FOREIGN_KEY_CHECKS=0;
 +DROP TABLE t1;
 +SET FOREIGN_KEY_CHECKS=1;
 +
 +--error 1452
 +INSERT INTO t2 VALUES(3);
 +
 +DROP TABLE t2;
 +#
 +# Test that checksum table uses a consistent read Bug #12669
 +#
 +connect (a,localhost,root,,);
 +connect (b,localhost,root,,);
 +connection a;
 +create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
 +insert into t1 values (1),(2);
 +set autocommit=0;
 +checksum table t1;
 +connection b;
 +insert into t1 values(3);
 +connection a;
 +#
 +# Here checksum should not see insert
 +#
 +checksum table t1;
 +connection a;
 +commit;
 +checksum table t1;
 +commit;
 +drop table t1;
 +#
 +# autocommit = 1
 +#
 +connection a;
 +create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
 +insert into t1 values (1),(2);
 +set autocommit=1;
 +checksum table t1;
 +connection b;
 +set autocommit=1;
 +insert into t1 values(3);
 +connection a;
 +#
 +# Here checksum sees insert
 +#
 +checksum table t1;
 +drop table t1;
 +
 +connection default;
 +disconnect a;
 +disconnect b;
 +
 +# tests for bugs #9802 and #13778
 +
 +# test that FKs between invalid types are not accepted
 +
 +set foreign_key_checks=0;
 +create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
 +# Embedded server doesn't chdir to data directory
 +--replace_result $MYSQLTEST_VARDIR . master-data/ ''
 +-- error 1005
 +create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
 +set foreign_key_checks=1;
 +drop table t2;
 +
 +# test that FKs between different charsets are not accepted in CREATE even
 +# when f_k_c is 0
 +
 +set foreign_key_checks=0;
 +create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
 +# Embedded server doesn't chdir to data directory
 +--replace_result $MYSQLTEST_VARDIR . master-data/ ''
 +-- error 1005
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
 +set foreign_key_checks=1;
 +drop table t1;
 +
 +# test that invalid datatype conversions with ALTER are not allowed
 +
 +set foreign_key_checks=0;
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb;
 +create table t1(a varchar(10) primary key) engine = innodb;
 +-- error 1025,1025
 +alter table t1 modify column a int;
 +set foreign_key_checks=1;
 +drop table t2,t1;
 +
 +# test that charset conversions with ALTER are allowed when f_k_c is 0
 +
 +set foreign_key_checks=0;
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
 +create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
 +alter table t1 convert to character set utf8;
 +set foreign_key_checks=1;
 +drop table t2,t1;
 +
 +# test that RENAME does not allow invalid charsets when f_k_c is 0
 +
 +set foreign_key_checks=0;
 +create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
 +create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
 +# Embedded server doesn't chdir to data directory
 +--replace_result $MYSQLD_DATADIR ./ master-data/ ''
 +-- error 1025
 +rename table t3 to t1;
 +set foreign_key_checks=1;
 +drop table t2,t3;
 +
 +# test that foreign key errors are reported correctly (Bug #15550)
 +
 +create table t1(a int primary key) row_format=redundant engine=innodb;
 +create table t2(a int primary key,constraint foreign key(a)references t1(a)) row_format=compact engine=innodb;
 +create table t3(a int primary key) row_format=compact engine=innodb;
 +create table t4(a int primary key,constraint foreign key(a)references t3(a)) row_format=redundant engine=innodb;
 +
 +insert into t1 values(1);
 +insert into t3 values(1);
 +-- error 1452
 +insert into t2 values(2);
 +-- error 1452
 +insert into t4 values(2);
 +insert into t2 values(1);
 +insert into t4 values(1);
 +-- error 1451
 +update t1 set a=2;
 +-- error 1452
 +update t2 set a=2;
 +-- error 1451
 +update t3 set a=2;
 +-- error 1452
 +update t4 set a=2;
 +-- error ER_TRUNCATE_ILLEGAL_FK
 +truncate t1;
 +-- error ER_TRUNCATE_ILLEGAL_FK
 +truncate t3;
 +truncate t2;
 +truncate t4;
 +-- error ER_TRUNCATE_ILLEGAL_FK
 +truncate t1;
 +-- error ER_TRUNCATE_ILLEGAL_FK
 +truncate t3;
 +
 +drop table t4,t3,t2,t1;
 +
 +
 +#
 +# Test that we can create a large (>1K) key
 +#
 +create table t1 (a varchar(255) character set utf8,
 +                 b varchar(255) character set utf8,
 +                 c varchar(255) character set utf8,
 +                 d varchar(255) character set utf8,
 +                 key (a,b,c,d)) engine=innodb;
 +drop table t1;
 +--error ER_TOO_LONG_KEY
 +create table t1 (a varchar(255) character set utf8,
 +                 b varchar(255) character set utf8,
 +                 c varchar(255) character set utf8,
 +                 d varchar(255) character set utf8,
 +                 e varchar(255) character set utf8,
 +                 key (a,b,c,d,e)) engine=innodb;
 +
 +
 +# test the padding of BINARY types and collations (Bug #14189)
 +SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
 +create table t1 (s1 varbinary(2),primary key (s1)) engine=innodb;
 +create table t2 (s1 binary(2),primary key (s1)) engine=innodb;
 +create table t3 (s1 varchar(2) binary,primary key (s1)) engine=innodb;
 +create table t4 (s1 char(2) binary,primary key (s1)) engine=innodb;
 +
 +insert into t1 values (0x41),(0x4120),(0x4100);
 +-- error ER_DUP_ENTRY
 +insert into t2 values (0x41),(0x4120),(0x4100);
 +insert into t2 values (0x41),(0x4120);
 +-- error ER_DUP_ENTRY
 +insert into t3 values (0x41),(0x4120),(0x4100);
 +insert into t3 values (0x41),(0x4100);
 +-- error ER_DUP_ENTRY
 +insert into t4 values (0x41),(0x4120),(0x4100);
 +insert into t4 values (0x41),(0x4100);
 +select hex(s1) from t1;
 +select hex(s1) from t2;
 +select hex(s1) from t3;
 +select hex(s1) from t4;
 +drop table t1,t2,t3,t4;
 +
 +create table t1 (a int primary key,s1 varbinary(3) not null unique) engine=innodb;
 +create table t2 (s1 binary(2) not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
 +
 +insert into t1 values(1,0x4100),(2,0x41),(3,0x4120),(4,0x42);
 +-- error 1452
 +insert into t2 values(0x42);
 +insert into t2 values(0x41);
 +select hex(s1) from t2;
 +update t1 set s1=0x123456 where a=2;
 +select hex(s1) from t2;
 +-- error 1451
 +update t1 set s1=0x12 where a=1;
 +-- error 1451
 +update t1 set s1=0x12345678 where a=1;
 +-- error 1451
 +update t1 set s1=0x123457 where a=1;
 +update t1 set s1=0x1220 where a=1;
 +select hex(s1) from t2;
 +update t1 set s1=0x1200 where a=1;
 +select hex(s1) from t2;
 +update t1 set s1=0x4200 where a=1;
 +select hex(s1) from t2;
 +-- error 1451
 +delete from t1 where a=1;
 +delete from t1 where a=2;
 +update t2 set s1=0x4120;
 +-- error 1451
 +delete from t1;
 +delete from t1 where a!=3;
 +select a,hex(s1) from t1;
 +select hex(s1) from t2;
 +
 +drop table t2,t1;
 +
 +create table t1 (a int primary key,s1 varchar(2) binary not null unique) engine=innodb;
 +create table t2 (s1 char(2) binary not null, constraint c foreign key(s1) references t1(s1) on update cascade) engine=innodb;
 +
 +insert into t1 values(1,0x4100),(2,0x41);
 +insert into t2 values(0x41);
 +select hex(s1) from t2;
 +update t1 set s1=0x1234 where a=1;
 +select hex(s1) from t2;
 +update t1 set s1=0x12 where a=2;
 +select hex(s1) from t2;
 +delete from t1 where a=1;
 +-- error 1451
 +delete from t1 where a=2;
 +select a,hex(s1) from t1;
 +select hex(s1) from t2;
 +
 +drop table t2,t1;
 +# Ensure that <tablename>_ibfk_0 is not mistreated as a
 +# generated foreign key identifier.  (Bug #16387)
 +
 +CREATE TABLE t1(a INT, PRIMARY KEY(a)) ENGINE=InnoDB;
 +CREATE TABLE t2(a INT) ENGINE=InnoDB;
 +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1(a);
 +ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_1;
 +ALTER TABLE t2 ADD CONSTRAINT t2_ibfk_0 FOREIGN KEY (a) REFERENCES t1(a);
 +ALTER TABLE t2 DROP FOREIGN KEY t2_ibfk_0;
 +SHOW CREATE TABLE t2;
 +DROP TABLE t2,t1;
 +SET sql_mode = default;
 +#
 +# Test case for bug #16229: MySQL/InnoDB uses full explicit table locks in trigger processing
 +#
 +## the following cannot be tested after the introduction of metadata locks
 +## because the create trigger command blocks and waits for connection b to
 +## commit
 +## begin disabled_mdl
 +#connect (a,localhost,root,,);
 +#connect (b,localhost,root,,);
 +#connection a;
 +#create table t1(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
 +#insert into t1(a) values (1),(2),(3);
 +#commit;
 +#connection b;
 +#set autocommit = 0;
 +#update t1 set b = 5 where a = 2;
 +#connection a;
 +#delimiter |;
 +#create trigger t1t before insert on t1 for each row begin set NEW.b = NEW.a * 10 + 5, NEW.c = NEW.a / 10; end |
 +#delimiter ;|
 +#set autocommit = 0;
 +#connection a;
 +#insert into t1(a) values (10),(20),(30),(40),(50),(60),(70),(80),(90),(100),
 +#(11),(21),(31),(41),(51),(61),(71),(81),(91),(101),
 +#(12),(22),(32),(42),(52),(62),(72),(82),(92),(102),
 +#(13),(23),(33),(43),(53),(63),(73),(83),(93),(103),
 +#(14),(24),(34),(44),(54),(64),(74),(84),(94),(104);
 +#connection b;
 +#commit;
 +#connection a;
 +#commit;
 +#drop trigger t1t;
 +#drop table t1;
 +#disconnect a;
 +#disconnect b;
 +##
 +## Another trigger test
 +##
 +#connect (a,localhost,root,,);
 +#connect (b,localhost,root,,);
 +#connection a;
 +#create table t1(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
 +#create table t2(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
 +#create table t3(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
 +#create table t4(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
 +#create table t5(a int not null, b int, c int, d int, primary key(a)) engine=innodb;
 +#insert into t1(a) values (1),(2),(3);
 +#insert into t2(a) values (1),(2),(3);
 +#insert into t3(a) values (1),(2),(3);
 +#insert into t4(a) values (1),(2),(3);
 +#insert into t3(a) values (5),(7),(8);
 +#insert into t4(a) values (5),(7),(8);
 +#insert into t5(a) values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12);
 +#
 +#delimiter |;
 +#create trigger t1t before insert on t1 for each row begin 
 +#    INSERT INTO t2 SET a = NEW.a;
 +#end |
 +#
 +#create trigger t2t before insert on t2 for each row begin
 +#    DELETE FROM t3 WHERE a = NEW.a;
 +#end |
 +#
 +#create trigger t3t before delete on t3 for each row begin  
 +#    UPDATE t4 SET b = b + 1 WHERE a = OLD.a;
 +#end |
 +#
 +#create trigger t4t before update on t4 for each row begin
 +#    UPDATE t5 SET b = b + 1 where a = NEW.a;
 +#end |
 +#delimiter ;|
 +#commit;
 +#set autocommit = 0;
 +#update t1 set b = b + 5 where a = 1;
 +#update t2 set b = b + 5 where a = 1;
 +#update t3 set b = b + 5 where a = 1;
 +#update t4 set b = b + 5 where a = 1;
 +#insert into t5(a) values(20);
 +#connection b;
 +#set autocommit = 0;
 +#insert into t1(a) values(7);
 +#insert into t2(a) values(8);
 +#delete from t2 where a = 3;
 +#update t4 set b = b + 1 where a = 3;
 +#commit;
 +#drop trigger t1t;
 +#drop trigger t2t;
 +#drop trigger t3t;
 +#drop trigger t4t;
 +#drop table t1, t2, t3, t4, t5;
 +#connection default;
 +#disconnect a;
 +#disconnect b;
 +## end disabled_mdl
 +
 +#
 +# Test that cascading updates leading to duplicate keys give the correct
 +# error message (bug #9680)
 +#
 +
 +CREATE TABLE t1 (
 +  field1 varchar(8) NOT NULL DEFAULT '',
 +  field2 varchar(8) NOT NULL DEFAULT '',
 +  PRIMARY KEY  (field1, field2)
 +) ENGINE=InnoDB;
 +
 +CREATE TABLE t2 (
 +  field1 varchar(8) NOT NULL DEFAULT '' PRIMARY KEY,
 +  FOREIGN KEY (field1) REFERENCES t1 (field1)
 +    ON DELETE CASCADE ON UPDATE CASCADE
 +) ENGINE=InnoDB;
 +
 +INSERT INTO t1 VALUES ('old', 'somevalu');
 +INSERT INTO t1 VALUES ('other', 'anyvalue');
 +
 +INSERT INTO t2 VALUES ('old');
 +INSERT INTO t2 VALUES ('other');
 +
 +--error ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO
 +UPDATE t1 SET field1 = 'other' WHERE field2 = 'somevalu';
 +
 +DROP TABLE t2;
 +DROP TABLE t1;
 +
 +#
 +# Bug#18477 - MySQL/InnoDB Ignoring Foreign Keys in ALTER TABLE
 +#
 +create table t1 (
 +  c1 bigint not null,
 +  c2 bigint not null,
 +  primary key (c1),
 +  unique  key (c2)
 +) engine=innodb;
 +#
 +create table t2 (
 +  c1 bigint not null,
 +  primary key (c1)
 +) engine=innodb;
 +#
 +alter table t1 add constraint c2_fk foreign key (c2)
 +  references t2(c1) on delete cascade;
 +show create table t1;
 +#
 +alter table t1 drop foreign key c2_fk;
 +show create table t1;
 +#
 +drop table t1, t2;
 +
 +#
 +# Bug #14360: problem with intervals
 +#
 +
 +create table t1(a date) engine=innodb;
 +create table t2(a date, key(a)) engine=innodb;
 +insert into t1 values('2005-10-01');
 +insert into t2 values('2005-10-01');
 +select * from t1, t2
 +  where t2.a between t1.a - interval 2 day and t1.a + interval 2 day;
 +drop table t1, t2;
 +
 +create table t1 (id int not null, f_id int not null, f int not null,
 +primary key(f_id, id)) engine=innodb;
 +create table t2 (id int not null,s_id int not null,s varchar(200),
 +primary key(id)) engine=innodb;
 +INSERT INTO t1 VALUES (8, 1, 3);
 +INSERT INTO t1 VALUES (1, 2, 1);
 +INSERT INTO t2 VALUES (1, 0, '');
 +INSERT INTO t2 VALUES (8, 1, '');
 +commit;
 +DELETE ml.* FROM t1 AS ml LEFT JOIN t2 AS mm ON (mm.id=ml.id)
 +WHERE mm.id IS NULL;
 +select ml.* from t1 as ml left join t2 as mm on (mm.id=ml.id)
 +where mm.id is null lock in share mode;
 +drop table t1,t2;
 +
 +#
 +# Test case where X-locks on unused rows should be released in a
 +# update (because READ COMMITTED isolation level)
 +#
 +
 +connect (a,localhost,root,,);
 +connect (b,localhost,root,,);
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2),(7,3);
 +commit;
 +SET binlog_format='MIXED';
 +set autocommit = 0; 
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +update t1 set b = 5 where b = 1;
 +connection b;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +#
 +# X-lock to record (7,3) should be released in a update 
 +#
 +select * from t1 where a = 7 and b = 3 for update;
 +connection a;
 +commit;
 +connection b;
 +commit;
 +drop table t1;
 +connection default;
 +disconnect a;
 +disconnect b;
 +
 +#
 +# Test case where no locks should be released (because we are not
 +# using READ COMMITTED isolation level)
 +#
 +
 +connect (a,localhost,root,,);
 +connect (b,localhost,root,,);
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values(1,1),(2,2),(3,1),(4,2),(5,1),(6,2);
 +commit;
 +set autocommit = 0; 
 +select * from t1 lock in share mode;
 +update t1 set b = 5 where b = 1;
 +connection b;
 +set autocommit = 0;
 +#
 +# S-lock to records (2,2),(4,2), and (6,2) should not be released in a update
 +#
 +--error 1205
 +select * from t1 where a = 2 and b = 2 for update;
 +#
 +# X-lock to record (1,1),(3,1),(5,1) should not be released in a update
 +#
 +--error 1205
 +connection a;
 +commit;
 +connection b;
 +commit;
 +connection default;
 +disconnect a;
 +disconnect b;
 +drop table t1;
 +
 +#
 +# Consistent read should be used in following selects
 +#
 +# 1) INSERT INTO ... SELECT
 +# 2) UPDATE ... = ( SELECT ...)
 +# 3) CREATE ... SELECT
 +
 +connect (a,localhost,root,,);
 +connect (b,localhost,root,,);
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values (1,2),(5,3),(4,2);
 +create table t2(d int not null, e int, primary key(d)) engine=innodb;
 +insert into t2 values (8,6),(12,1),(3,1);
 +commit;
 +set autocommit = 0;
 +select * from t2 for update;
 +connection b;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +insert into t1 select * from t2;
 +update t1 set b = (select e from t2 where a = d);
 +create table t3(d int not null, e int, primary key(d)) engine=innodb
 +select * from t2;
 +commit;
 +connection a;
 +commit;
 +connection default;
 +disconnect a;
 +disconnect b;
 +drop table t1, t2, t3;
 +
 +#
 +# Consistent read should not be used if 
 +#
 +# (a) isolation level is serializable OR
 +# (b) select ... lock in share mode OR
 +# (c) select ... for update
 +#
 +# in following queries:
 +#
 +# 1) INSERT INTO ... SELECT
 +# 2) UPDATE ... = ( SELECT ...)
 +# 3) CREATE ... SELECT
 +
 +connect (a,localhost,root,,);
 +connect (b,localhost,root,,);
 +connect (c,localhost,root,,);
 +connect (d,localhost,root,,);
 +connect (e,localhost,root,,);
 +connect (f,localhost,root,,);
 +connect (g,localhost,root,,);
 +connect (h,localhost,root,,);
 +connect (i,localhost,root,,);
 +connect (j,localhost,root,,);
 +connection a;
 +create table t1(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t1 values (1,2),(5,3),(4,2);
 +create table t2(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t2 values (8,6),(12,1),(3,1);
 +create table t3(d int not null, b int, primary key(d)) engine=innodb;
 +insert into t3 values (8,6),(12,1),(3,1);
 +create table t5(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t5 values (1,2),(5,3),(4,2);
 +create table t6(d int not null, e int, primary key(d)) engine=innodb;
 +insert into t6 values (8,6),(12,1),(3,1);
 +create table t8(a int not null, b int, primary key(a)) engine=innodb;
 +insert into t8 values (1,2),(5,3),(4,2);
 +create table t9(d int not null, e int, primary key(d)) engine=innodb;
 +insert into t9 values (8,6),(12,1),(3,1);
 +commit;
 +set autocommit = 0;
 +select * from t2 for update;
 +connection b;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +--send
 +insert into t1 select * from t2;
 +connection c;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +--send
 +update t3 set b = (select b from t2 where a = d);
 +connection d;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
 +--send
 +create table t4(a int not null, b int, primary key(a)) engine=innodb select * from t2;
 +connection e;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +--send
 +insert into t5 (select * from t2 lock in share mode);
 +connection f;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +--send
 +update t6 set e = (select b from t2 where a = d lock in share mode);
 +connection g;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +--send
 +create table t7(a int not null, b int, primary key(a)) engine=innodb select * from t2 lock in share mode;
 +connection h;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +--send
 +insert into t8 (select * from t2 for update);
 +connection i;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +--send
 +update t9 set e = (select b from t2 where a = d for update);
 +connection j;
 +SET binlog_format='MIXED';
 +set autocommit = 0;
 +SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
 +--send
 +create table t10(a int not null, b int, primary key(a)) engine=innodb select * from t2 for update;
 +
 +connection b;
 +--error 1205
 +reap;
 +
 +connection c;
 +--error 1205
 +reap;
 +
 +connection d;
 +--error 1205
 +reap;
 +
 +connection e;
 +--error 1205
 +reap;
 +
 +connection f;
 +--error 1205
 +reap;
 +
 +connection g;
 +--error 1205
 +reap;
 +
 +connection h;
 +--error 1205
 +reap;
 +
 +connection i;
 +--error 1205
 +reap;
 +
 +connection j;
 +--error 1205
 +reap;
 +
 +connection a;
 +commit;
 +
 +connection default;
 +disconnect a;
 +disconnect b;
 +disconnect c;
 +disconnect d;
 +disconnect e;
 +disconnect f;
 +disconnect g;
 +disconnect h;
 +disconnect i;
 +disconnect j;
 +drop table t1, t2, t3, t5, t6, t8, t9;
 +
 +# bug 18934, "InnoDB crashes when table uses column names like DB_ROW_ID"
 +--error ER_WRONG_COLUMN_NAME
 +CREATE TABLE t1 (DB_ROW_ID int) engine=innodb;
 +
 +#
 +# Bug #17152: Wrong result with BINARY comparison on aliased column
 +#
 +
 +CREATE TABLE t1 (
 +   a BIGINT(20) NOT NULL,
 +    PRIMARY KEY  (a)
 + ) ENGINE=INNODB DEFAULT CHARSET=UTF8;
 +
 +CREATE TABLE t2 (
 +  a BIGINT(20) NOT NULL,
 +  b VARCHAR(128) NOT NULL,
 +  c TEXT NOT NULL,
 +  PRIMARY KEY  (a,b),
 +  KEY idx_t2_b_c (b,c(200)),
 +  CONSTRAINT t_fk FOREIGN KEY (a) REFERENCES t1 (a) 
 +   ON DELETE CASCADE
 + ) ENGINE=INNODB DEFAULT CHARSET=UTF8;
 +
 +INSERT INTO t1 VALUES (1);
 +INSERT INTO t2 VALUES (1, 'bar', 'vbar');
 +INSERT INTO t2 VALUES (1, 'BAR2', 'VBAR');
 +INSERT INTO t2 VALUES (1, 'bar_bar', 'bibi');
 +INSERT INTO t2 VALUES (1, 'customer_over', '1');
 +
 +SELECT * FROM t2 WHERE b = 'customer_over';
 +SELECT * FROM t2 WHERE BINARY b = 'customer_over';
 +SELECT DISTINCT p0.a FROM t2 p0 WHERE p0.b = 'customer_over';
 +/* Bang: Empty result set, above was expected: */
 +SELECT DISTINCT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
 +SELECT p0.a FROM t2 p0 WHERE BINARY p0.b = 'customer_over';
 +
 +drop table t2, t1;
 +
 +#
 +# Test optimize on table with open transaction
 +#
 +
 +CREATE TABLE t1 ( a int ) ENGINE=innodb;
 +BEGIN;
 +INSERT INTO t1 VALUES (1);
 +OPTIMIZE TABLE t1;
 +DROP TABLE t1;
 +
 +#
 +# Bug #24741 (existing cascade clauses disappear when adding foreign keys)
 +#
 +
 +CREATE TABLE t1 (id int PRIMARY KEY, f int NOT NULL, INDEX(f)) ENGINE=InnoDB;
 +
 +CREATE TABLE t2 (id int PRIMARY KEY, f INT NOT NULL,
 +  CONSTRAINT t2_t1 FOREIGN KEY (id) REFERENCES t1 (id)
 +  ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;
 +
 +ALTER TABLE t2 ADD FOREIGN KEY (f) REFERENCES t1 (f) ON
 +DELETE CASCADE ON UPDATE CASCADE;
 +
 +SHOW CREATE TABLE t2;
 +DROP TABLE t2, t1;
 +
 +#
 +# Bug #25927: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns
 +# for which there is a foreign key constraint ON ... SET NULL.
 +#
 +
 +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB;
 +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES (1);
 +INSERT INTO t2 VALUES (1);
 +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
 +# NULL -> NOT NULL only allowed INPLACE if strict sql_mode is on.
 +set @old_sql_mode = @@sql_mode;
 +set @@sql_mode = 'STRICT_TRANS_TABLES';
 +--error ER_FK_COLUMN_NOT_NULL
 +ALTER TABLE t2 MODIFY a INT NOT NULL;
 +set @@sql_mode = @old_sql_mode;
 +DELETE FROM t1;
 +DROP TABLE t2,t1;
 +
 +#
 +# Bug #26835: table corruption after delete+insert
 +#
 +
 +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)
 +ENGINE=InnoDB;
 +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4);
 +DELETE FROM t1;
 +INSERT INTO t1 VALUES ('DDD');
 +SELECT * FROM t1;
 +DROP TABLE t1;
 +
 +#
 +# Bug #23313 (AUTO_INCREMENT=# not reported back for InnoDB tables)
 +# Bug #21404 (AUTO_INCREMENT value reset when Adding FKEY (or ALTER?))
 +#
 +
 +CREATE TABLE t1 (id int PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB
 +AUTO_INCREMENT=42;
 +
 +INSERT INTO t1 VALUES (0),(347),(0);
 +SELECT * FROM t1;
 +
 +SHOW CREATE TABLE t1;
 +
 +CREATE TABLE t2 (id int PRIMARY KEY) ENGINE=InnoDB;
 +INSERT INTO t2 VALUES(42),(347),(348);
 +ALTER TABLE t1 ADD CONSTRAINT t1_t2 FOREIGN KEY (id) REFERENCES t2(id);
 +SHOW CREATE TABLE t1;
 +
 +DROP TABLE t1,t2;
 +
 +#
 +# Bug #21101 (Prints wrong error message if max row size is too large)
 +#
 +SET innodb_strict_mode=ON;
 +--replace_result 8126 {checked_valid} 4030 {checked_valid} 1982 {checked_valid}
 +--error ER_TOO_BIG_ROWSIZE
 +CREATE TABLE t1 (
 +	c01 CHAR(255), c02 CHAR(255), c03 CHAR(255), c04 CHAR(255),
 +	c05 CHAR(255), c06 CHAR(255), c07 CHAR(255), c08 CHAR(255),
 +	c09 CHAR(255), c10 CHAR(255), c11 CHAR(255), c12 CHAR(255),
 +	c13 CHAR(255), c14 CHAR(255), c15 CHAR(255), c16 CHAR(255),
 +	c17 CHAR(255), c18 CHAR(255), c19 CHAR(255), c20 CHAR(255),
 +	c21 CHAR(255), c22 CHAR(255), c23 CHAR(255), c24 CHAR(255),
 +	c25 CHAR(255), c26 CHAR(255), c27 CHAR(255), c28 CHAR(255),
 +	c29 CHAR(255), c30 CHAR(255), c31 CHAR(255), c32 CHAR(255)
 +	) ENGINE = InnoDB;
 +SET innodb_strict_mode=OFF;
 +
 +#
 +# Bug #31860 InnoDB assumes AUTOINC values can only be positive.
 +#
 +DROP TABLE IF EXISTS t1;
 +CREATE TABLE t1(
 +	id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY
 +	) ENGINE=InnoDB;
 +INSERT INTO t1 VALUES(-10);
 +SELECT * FROM t1;
 +#
 +# NOTE: The server really needs to be restarted at this point
 +# for the test to be useful.  
 +#
 +# Without the fix InnoDB would trip over an assertion here.
 +INSERT INTO t1 VALUES(NULL);
 +# The next value should be 1 and not -9 or a -ve number
 +SELECT * FROM t1;
 +DROP TABLE t1;
 +
 +# 
 +# Bug #21409 Incorrect result returned when in READ-COMMITTED with
 +# query_cache ON
 +#
 +CONNECT (c1,localhost,root,,);
 +CONNECT (c2,localhost,root,,);
 +CONNECTION c1;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +DROP TABLE IF EXISTS t1, t2;
 +CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
 +CREATE TABLE t2 LIKE t1;
 +SELECT * FROM t2;
 +CONNECTION c2;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +INSERT INTO t1 VALUES (1);
 +COMMIT;
 +CONNECTION c1;
 +SELECT * FROM t1 WHERE a=1;
 +DISCONNECT c1;
 +DISCONNECT c2;
 +CONNECT (c1,localhost,root,,);
 +CONNECT (c2,localhost,root,,);
 +CONNECTION c1;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +SELECT * FROM t2;
 +CONNECTION c2;
 +SET binlog_format='MIXED';
 +SET TX_ISOLATION='read-committed';
 +SET AUTOCOMMIT=0;
 +INSERT INTO t1 VALUES (2);
 +COMMIT;
 +CONNECTION c1;
 +# The result set below should be the same for both selects
 +SELECT * FROM t1 WHERE a=2;
 +SELECT * FROM t1 WHERE a=2;
 +DROP TABLE t1;
 +DROP TABLE t2;
 +DISCONNECT c1;
 +DISCONNECT c2;
 +CONNECTION default;
 +
 +#
 +# Bug #29157 UPDATE, changed rows incorrect
 +#
 +create table t1 (i int, j int) engine=innodb;
 +insert into t1 (i, j) values (1, 1), (2, 2);
 +--enable_info
 +update t1 set j = 2;
 +--disable_info
 +drop table t1;
 +
 +#
 +# Bug #32440 InnoDB free space info does not appear in SHOW TABLE STATUS or
 +# I_S
 +#
 +create table t1 (id int) comment='this is a comment' engine=innodb;
 +select table_comment, data_free > 0 as data_free_is_set
 +  from information_schema.tables
 +  where table_schema='test' and table_name = 't1';
 +drop table t1;
 +
 +#
 +# Bug 34920 test
 +#
 +CONNECTION default;
 +CREATE TABLE t1 (
 +	c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 +	c2 VARCHAR(128) NOT NULL,
 +	PRIMARY KEY(c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100;
 +
 +CREATE TABLE t2 (
 +	c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 +	c2 INT(10) UNSIGNED DEFAULT NULL,
 +	PRIMARY KEY(c1)
 +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200;
 +
 +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
 +ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1);
 +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2';
 +DROP TABLE t2;
 +DROP TABLE t1;
 +# End 34920 test
 +#
 +# Bug #29507 TRUNCATE shows to many rows effected
 +#
 +CONNECTION default;
 +CREATE TABLE t1 (c1 int default NULL,
 +		 c2 int default NULL
 +) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 +
 +--enable_info
 +TRUNCATE TABLE t1;
 +
 +INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
 +TRUNCATE TABLE t1;
 +
 +--disable_info
 +DROP TABLE t1;
 +#
 +# Bug#35537 Innodb doesn't increment handler_update and handler_delete.
 +#
 +-- disable_query_log
 +-- disable_result_log
 +
 +CONNECT (c1,localhost,root,,);
 +
 +DROP TABLE IF EXISTS bug35537;
 +CREATE TABLE bug35537 (
 +  c1 int
 +) ENGINE=InnoDB;
 +
 +INSERT INTO bug35537 VALUES (1);
 +
 +-- enable_result_log
 +
 +SHOW SESSION STATUS LIKE 'Handler_update%';
 +SHOW SESSION STATUS LIKE 'Handler_delete%';
 +
 +UPDATE bug35537 SET c1 = 2 WHERE c1 = 1;
 +DELETE FROM bug35537 WHERE c1 = 2;
 +
 +SHOW SESSION STATUS LIKE 'Handler_update%';
 +SHOW SESSION STATUS LIKE 'Handler_delete%';
 +
 +DROP TABLE bug35537;
 +
 +DISCONNECT c1;
 +CONNECTION default;
 +
 +SET GLOBAL innodb_thread_sleep_delay = @innodb_thread_sleep_delay_orig;
 +SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
 +
 +-- enable_query_log
 +
 +# Clean up after the Bug#55284/Bug#58912 test case.
 +DROP TABLE bug58912;
 +
 +#
 +# Test fix for bug 13117023. InnoDB increments HA_READ_KEY_COUNT (aka
 +# HANDLER_READ_KEY) when it should not.
 +#
 +create table t1 (f1 integer primary key) engine=innodb;
 +flush status;
 +show status like "handler_read_key";
 +select f1 from t1;
 +show status like "handler_read_key";
 +drop table t1;
 +
 +#######################################################################
 +#                                                                     #
 +# Please, DO NOT TOUCH this file as well as the innodb.result file.   #
 +# These files are to be modified ONLY BY INNOBASE guys.               #
 +#                                                                     #
 +# Use innodb_mysql.[test|result] files instead.                       #
 +#                                                                     #
 +# If nevertheless you need to make some changes here, please, forward #
 +# your commit message                                                 #
 +# To: innodb_dev_ww at oracle.com                                        #
 +# Cc: dev-innodb at mysql.com                                            #
 +# (otherwise your changes may be erased).                             #
 +#                                                                     #
 +#######################################################################
diff --cc mysql-test/t/row-checksum.opt
index 0000000,0000000..977b569
new file mode 100644
--- /dev/null
+++ b/mysql-test/t/row-checksum.opt
@@@ -1,0 -1,0 +1,1 @@@
++--loose-innodb-strict-mode=off
diff --cc sql/handler.cc
index 3fbd1b3,0000000..4a7f10f
mode 100644,000000..100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@@ -1,6440 -1,0 +1,6450 @@@
 +/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
 +   Copyright (c) 2009, 2016, MariaDB
 +
 +   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-1301  USA */
 +
 +/** @file handler.cc
 +
 +    @brief
 +  Handler-calling-functions
 +*/
 +
 +#include <my_global.h>
 +#include "sql_priv.h"
 +#include "unireg.h"
 +#include "rpl_handler.h"
 +#include "sql_cache.h"                   // query_cache, query_cache_*
 +#include "sql_connect.h"                 // global_table_stats
 +#include "key.h"     // key_copy, key_unpack, key_cmp_if_same, key_cmp
 +#include "sql_table.h"                   // build_table_filename
 +#include "sql_parse.h"                          // check_stack_overrun
 +#include "sql_acl.h"            // SUPER_ACL
 +#include "sql_base.h"           // TDC_element
 +#include "discover.h"           // extension_based_table_discovery, etc
 +#include "log_event.h"          // *_rows_log_event
 +#include "create_options.h"
 +#include <myisampack.h>
 +#include "transaction.h"
 +#include "myisam.h"
 +#include "probes_mysql.h"
 +#include <mysql/psi/mysql_table.h>
 +#include "debug_sync.h"         // DEBUG_SYNC
 +#include "sql_audit.h"
 +
 +#ifdef WITH_PARTITION_STORAGE_ENGINE
 +#include "ha_partition.h"
 +#endif
 +
 +#ifdef WITH_ARIA_STORAGE_ENGINE
 +#include "../storage/maria/ha_maria.h"
 +#endif
 +
 +#include "wsrep_mysqld.h"
 +#include "wsrep.h"
 +#include "wsrep_xid.h"
 +
 +/*
 +  While we have legacy_db_type, we have this array to
 +  check for dups and to find handlerton from legacy_db_type.
 +  Remove when legacy_db_type is finally gone
 +*/
 +st_plugin_int *hton2plugin[MAX_HA];
 +
 +static handlerton *installed_htons[128];
 +
 +#define BITMAP_STACKBUF_SIZE (128/8)
 +
 +KEY_CREATE_INFO default_key_create_info=
 +{ HA_KEY_ALG_UNDEF, 0, {NullS, 0}, {NullS, 0}, true };
 +
 +/* number of entries in handlertons[] */
 +ulong total_ha= 0;
 +/* number of storage engines (from handlertons[]) that support 2pc */
 +ulong total_ha_2pc= 0;
 +/* size of savepoint storage area (see ha_init) */
 +ulong savepoint_alloc_size= 0;
 +
 +static const LEX_STRING sys_table_aliases[]=
 +{
 +  { C_STRING_WITH_LEN("INNOBASE") },  { C_STRING_WITH_LEN("INNODB") },
 +  { C_STRING_WITH_LEN("HEAP") },      { C_STRING_WITH_LEN("MEMORY") },
 +  { C_STRING_WITH_LEN("MERGE") },     { C_STRING_WITH_LEN("MRG_MYISAM") },
 +  { C_STRING_WITH_LEN("Maria") },      { C_STRING_WITH_LEN("Aria") },
 +  {NullS, 0}
 +};
 +
 +const char *ha_row_type[] = {
 +  "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "PAGE"
 +};
 +
 +const char *tx_isolation_names[] =
 +{ "READ-UNCOMMITTED", "READ-COMMITTED", "REPEATABLE-READ", "SERIALIZABLE",
 +  NullS};
 +TYPELIB tx_isolation_typelib= {array_elements(tx_isolation_names)-1,"",
 +			       tx_isolation_names, NULL};
 +
 +static TYPELIB known_extensions= {0,"known_exts", NULL, NULL};
 +uint known_extensions_id= 0;
 +
 +static int commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans,
 +                              bool is_real_trans);
 +
 +
 +static plugin_ref ha_default_plugin(THD *thd)
 +{
 +  if (thd->variables.table_plugin)
 +    return thd->variables.table_plugin;
 +  return my_plugin_lock(thd, global_system_variables.table_plugin);
 +}
 +
 +static plugin_ref ha_default_tmp_plugin(THD *thd)
 +{
 +  if (thd->variables.tmp_table_plugin)
 +    return thd->variables.tmp_table_plugin;
 +  if (global_system_variables.tmp_table_plugin)
 +    return my_plugin_lock(thd, global_system_variables.tmp_table_plugin);
 +  return ha_default_plugin(thd);
 +}
 +
 +
 +/** @brief
 +  Return the default storage engine handlerton for thread
 +
 +  SYNOPSIS
 +    ha_default_handlerton(thd)
 +    thd         current thread
 +
 +  RETURN
 +    pointer to handlerton
 +*/
 +handlerton *ha_default_handlerton(THD *thd)
 +{
 +  plugin_ref plugin= ha_default_plugin(thd);
 +  DBUG_ASSERT(plugin);
 +  handlerton *hton= plugin_hton(plugin);
 +  DBUG_ASSERT(hton);
 +  return hton;
 +}
 +
 +
 +handlerton *ha_default_tmp_handlerton(THD *thd)
 +{
 +  plugin_ref plugin= ha_default_tmp_plugin(thd);
 +  DBUG_ASSERT(plugin);
 +  handlerton *hton= plugin_hton(plugin);
 +  DBUG_ASSERT(hton);
 +  return hton;
 +}
 +
 +
 +/** @brief
 +  Return the storage engine handlerton for the supplied name
 +  
 +  SYNOPSIS
 +    ha_resolve_by_name(thd, name)
 +    thd         current thread
 +    name        name of storage engine
 +  
 +  RETURN
 +    pointer to storage engine plugin handle
 +*/
 +plugin_ref ha_resolve_by_name(THD *thd, const LEX_STRING *name, bool tmp_table)
 +{
 +  const LEX_STRING *table_alias;
 +  plugin_ref plugin;
 +
 +redo:
 +  /* my_strnncoll is a macro and gcc doesn't do early expansion of macro */
 +  if (thd && !my_charset_latin1.coll->strnncoll(&my_charset_latin1,
 +                           (const uchar *)name->str, name->length,
 +                           (const uchar *)STRING_WITH_LEN("DEFAULT"), 0))
 +    return tmp_table ?  ha_default_tmp_plugin(thd) : ha_default_plugin(thd);
 +
 +  if ((plugin= my_plugin_lock_by_name(thd, name, MYSQL_STORAGE_ENGINE_PLUGIN)))
 +  {
 +    handlerton *hton= plugin_hton(plugin);
 +    if (hton && !(hton->flags & HTON_NOT_USER_SELECTABLE))
 +      return plugin;
 +      
 +    /*
 +      unlocking plugin immediately after locking is relatively low cost.
 +    */
 +    plugin_unlock(thd, plugin);
 +  }
 +
 +  /*
 +    We check for the historical aliases.
 +  */
 +  for (table_alias= sys_table_aliases; table_alias->str; table_alias+= 2)
 +  {
 +    if (!my_strnncoll(&my_charset_latin1,
 +                      (const uchar *)name->str, name->length,
 +                      (const uchar *)table_alias->str, table_alias->length))
 +    {
 +      name= table_alias + 1;
 +      goto redo;
 +    }
 +  }
 +
 +  return NULL;
 +}
 +
 +
 +plugin_ref ha_lock_engine(THD *thd, const handlerton *hton)
 +{
 +  if (hton)
 +  {
 +    st_plugin_int *plugin= hton2plugin[hton->slot];
 +    return my_plugin_lock(thd, plugin_int_to_ref(plugin));
 +  }
 +  return NULL;
 +}
 +
 +
 +handlerton *ha_resolve_by_legacy_type(THD *thd, enum legacy_db_type db_type)
 +{
 +  plugin_ref plugin;
 +  switch (db_type) {
 +  case DB_TYPE_DEFAULT:
 +    return ha_default_handlerton(thd);
 +  default:
 +    if (db_type > DB_TYPE_UNKNOWN && db_type < DB_TYPE_DEFAULT &&
 +        (plugin= ha_lock_engine(thd, installed_htons[db_type])))
 +      return plugin_hton(plugin);
 +    /* fall through */
 +  case DB_TYPE_UNKNOWN:
 +    return NULL;
 +  }
 +}
 +
 +
 +/**
 +  Use other database handler if databasehandler is not compiled in.
 +*/
 +handlerton *ha_checktype(THD *thd, handlerton *hton, bool no_substitute)
 +{
 +  if (ha_storage_engine_is_enabled(hton))
 +    return hton;
 +
 +  if (no_substitute)
 +    return NULL;
 +
 +  return ha_default_handlerton(thd);
 +} /* ha_checktype */
 +
 +
 +handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc,
 +                         handlerton *db_type)
 +{
 +  handler *file;
 +  DBUG_ENTER("get_new_handler");
 +  DBUG_PRINT("enter", ("alloc: 0x%lx", (long) alloc));
 +
 +  if (db_type && db_type->state == SHOW_OPTION_YES && db_type->create)
 +  {
 +    if ((file= db_type->create(db_type, share, alloc)))
 +      file->init();
 +    DBUG_RETURN(file);
 +  }
 +  /*
 +    Try the default table type
 +    Here the call to current_thd() is ok as we call this function a lot of
 +    times but we enter this branch very seldom.
 +  */
 +  file= get_new_handler(share, alloc, ha_default_handlerton(current_thd));
 +  DBUG_RETURN(file);
 +}
 +
 +
 +#ifdef WITH_PARTITION_STORAGE_ENGINE
 +handler *get_ha_partition(partition_info *part_info)
 +{
 +  ha_partition *partition;
 +  DBUG_ENTER("get_ha_partition");
 +  if ((partition= new ha_partition(partition_hton, part_info)))
 +  {
 +    if (partition->initialize_partition(current_thd->mem_root))
 +    {
 +      delete partition;
 +      partition= 0;
 +    }
 +    else
 +      partition->init();
 +  }
 +  else
 +  {
 +    my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), 
 +             static_cast<int>(sizeof(ha_partition)));
 +  }
 +  DBUG_RETURN(((handler*) partition));
 +}
 +#endif
 +
 +
 +static const char **handler_errmsgs;
 +
 +C_MODE_START
 +static const char **get_handler_errmsgs(int nr)
 +{
 +  return handler_errmsgs;
 +}
 +C_MODE_END
 +
 +
 +/**
 +  Register handler error messages for use with my_error().
 +
 +  @retval
 +    0           OK
 +  @retval
 +    !=0         Error
 +*/
 +
 +int ha_init_errors(void)
 +{
 +#define SETMSG(nr, msg) handler_errmsgs[(nr) - HA_ERR_FIRST]= (msg)
 +
 +  /* Allocate a pointer array for the error message strings. */
 +  /* Zerofill it to avoid uninitialized gaps. */
 +  if (! (handler_errmsgs= (const char**) my_malloc(HA_ERR_ERRORS * sizeof(char*),
 +                                                   MYF(MY_WME | MY_ZEROFILL))))
 +    return 1;
 +
 +  /* Set the dedicated error messages. */
 +  SETMSG(HA_ERR_KEY_NOT_FOUND,          ER_DEFAULT(ER_KEY_NOT_FOUND));
 +  SETMSG(HA_ERR_FOUND_DUPP_KEY,         ER_DEFAULT(ER_DUP_KEY));
 +  SETMSG(HA_ERR_RECORD_CHANGED,         "Update which is recoverable");
 +  SETMSG(HA_ERR_WRONG_INDEX,            "Wrong index given to function");
 +  SETMSG(HA_ERR_CRASHED,                ER_DEFAULT(ER_NOT_KEYFILE));
 +  SETMSG(HA_ERR_WRONG_IN_RECORD,        ER_DEFAULT(ER_CRASHED_ON_USAGE));
 +  SETMSG(HA_ERR_OUT_OF_MEM,             "Table handler out of memory");
 +  SETMSG(HA_ERR_NOT_A_TABLE,            "Incorrect file format '%.64s'");
 +  SETMSG(HA_ERR_WRONG_COMMAND,          "Command not supported");
 +  SETMSG(HA_ERR_OLD_FILE,               ER_DEFAULT(ER_OLD_KEYFILE));
 +  SETMSG(HA_ERR_NO_ACTIVE_RECORD,       "No record read in update");
 +  SETMSG(HA_ERR_RECORD_DELETED,         "Intern record deleted");
 +  SETMSG(HA_ERR_RECORD_FILE_FULL,       ER_DEFAULT(ER_RECORD_FILE_FULL));
 +  SETMSG(HA_ERR_INDEX_FILE_FULL,        "No more room in index file '%.64s'");
 +  SETMSG(HA_ERR_END_OF_FILE,            "End in next/prev/first/last");
 +  SETMSG(HA_ERR_UNSUPPORTED,            ER_DEFAULT(ER_ILLEGAL_HA));
 +  SETMSG(HA_ERR_TO_BIG_ROW,             "Too big row");
 +  SETMSG(HA_WRONG_CREATE_OPTION,        "Wrong create option");
 +  SETMSG(HA_ERR_FOUND_DUPP_UNIQUE,      ER_DEFAULT(ER_DUP_UNIQUE));
 +  SETMSG(HA_ERR_UNKNOWN_CHARSET,        "Can't open charset");
 +  SETMSG(HA_ERR_WRONG_MRG_TABLE_DEF,    ER_DEFAULT(ER_WRONG_MRG_TABLE));
 +  SETMSG(HA_ERR_CRASHED_ON_REPAIR,      ER_DEFAULT(ER_CRASHED_ON_REPAIR));
 +  SETMSG(HA_ERR_CRASHED_ON_USAGE,       ER_DEFAULT(ER_CRASHED_ON_USAGE));
 +  SETMSG(HA_ERR_LOCK_WAIT_TIMEOUT,      ER_DEFAULT(ER_LOCK_WAIT_TIMEOUT));
 +  SETMSG(HA_ERR_LOCK_TABLE_FULL,        ER_DEFAULT(ER_LOCK_TABLE_FULL));
 +  SETMSG(HA_ERR_READ_ONLY_TRANSACTION,  ER_DEFAULT(ER_READ_ONLY_TRANSACTION));
 +  SETMSG(HA_ERR_LOCK_DEADLOCK,          ER_DEFAULT(ER_LOCK_DEADLOCK));
 +  SETMSG(HA_ERR_CANNOT_ADD_FOREIGN,     ER_DEFAULT(ER_CANNOT_ADD_FOREIGN));
 +  SETMSG(HA_ERR_NO_REFERENCED_ROW,      ER_DEFAULT(ER_NO_REFERENCED_ROW_2));
 +  SETMSG(HA_ERR_ROW_IS_REFERENCED,      ER_DEFAULT(ER_ROW_IS_REFERENCED_2));
 +  SETMSG(HA_ERR_NO_SAVEPOINT,           "No savepoint with that name");
 +  SETMSG(HA_ERR_NON_UNIQUE_BLOCK_SIZE,  "Non unique key block size");
 +  SETMSG(HA_ERR_NO_SUCH_TABLE,          "No such table: '%.64s'");
 +  SETMSG(HA_ERR_TABLE_EXIST,            ER_DEFAULT(ER_TABLE_EXISTS_ERROR));
 +  SETMSG(HA_ERR_NO_CONNECTION,          "Could not connect to storage engine");
 +  SETMSG(HA_ERR_TABLE_DEF_CHANGED,      ER_DEFAULT(ER_TABLE_DEF_CHANGED));
 +  SETMSG(HA_ERR_FOREIGN_DUPLICATE_KEY,  "FK constraint would lead to duplicate key");
 +  SETMSG(HA_ERR_TABLE_NEEDS_UPGRADE,    "Table upgrade required. Please do \"REPAIR TABLE %`\" or dump/reload to fix it");
 +  SETMSG(HA_ERR_TABLE_READONLY,         ER_DEFAULT(ER_OPEN_AS_READONLY));
 +  SETMSG(HA_ERR_AUTOINC_READ_FAILED,    ER_DEFAULT(ER_AUTOINC_READ_FAILED));
 +  SETMSG(HA_ERR_AUTOINC_ERANGE,         ER_DEFAULT(ER_WARN_DATA_OUT_OF_RANGE));
 +  SETMSG(HA_ERR_TOO_MANY_CONCURRENT_TRXS, ER_DEFAULT(ER_TOO_MANY_CONCURRENT_TRXS));
 +  SETMSG(HA_ERR_INDEX_COL_TOO_LONG,	ER_DEFAULT(ER_INDEX_COLUMN_TOO_LONG));
 +  SETMSG(HA_ERR_INDEX_CORRUPT,		ER_DEFAULT(ER_INDEX_CORRUPT));
 +  SETMSG(HA_FTS_INVALID_DOCID,		"Invalid InnoDB FTS Doc ID");
 +  SETMSG(HA_ERR_TABLE_IN_FK_CHECK,	ER_DEFAULT(ER_TABLE_IN_FK_CHECK));
 +  SETMSG(HA_ERR_DISK_FULL,              ER_DEFAULT(ER_DISK_FULL));
 +  SETMSG(HA_ERR_FTS_TOO_MANY_WORDS_IN_PHRASE,  "Too many words in a FTS phrase or proximity search");
++  SETMSG(HA_ERR_FK_DEPTH_EXCEEDED,      ER_DEFAULT(ER_FK_DEPTH_EXCEEDED));
++  SETMSG(HA_MISSING_CREATE_OPTION,      ER_DEFAULT(ER_MISSING_HA_CREATE_OPTION));
++  SETMSG(HA_ERR_SE_OUT_OF_MEMORY,       ER_DEFAULT(ER_ENGINE_OUT_OF_MEMORY));
++  SETMSG(HA_ERR_TABLE_CORRUPT,          ER_DEFAULT(ER_TABLE_CORRUPT));
++  SETMSG(HA_ERR_QUERY_INTERRUPTED,      ER_DEFAULT(ER_QUERY_INTERRUPTED));
++  SETMSG(HA_ERR_TABLESPACE_MISSING,     ER_DEFAULT(ER_TABLESPACE_MISSING));
++  SETMSG(HA_ERR_TABLESPACE_IS_NOT_EMPTY,ER_DEFAULT(ER_TABLESPACE_IS_NOT_EMPTY));
++  SETMSG(HA_ERR_WRONG_FILE_NAME,        ER_DEFAULT(ER_WRONG_FILE_NAME));
++  SETMSG(HA_ERR_NOT_ALLOWED_COMMAND,    ER_DEFAULT(ER_NOT_ALLOWED_COMMAND));
++  SETMSG(HA_ERR_COMPUTE_FAILED,         "Compute virtual column value failed");
 +
 +  /* Register the error messages for use with my_error(). */
 +  return my_error_register(get_handler_errmsgs, HA_ERR_FIRST, HA_ERR_LAST);
 +}
 +
 +
 +/**
 +  Unregister handler error messages.
 +
 +  @retval
 +    0           OK
 +  @retval
 +    !=0         Error
 +*/
 +static int ha_finish_errors(void)
 +{
 +  /* Allocate a pointer array for the error message strings. */
 +  my_error_unregister(HA_ERR_FIRST, HA_ERR_LAST);
 +  my_free(handler_errmsgs);
 +  handler_errmsgs= 0;
 +  return 0;
 +}
 +
 +static volatile int32 need_full_discover_for_existence= 0;
 +static volatile int32 engines_with_discover_table_names= 0;
 +static volatile int32 engines_with_discover= 0;
 +
 +static int full_discover_for_existence(handlerton *, const char *, const char *)
 +{ return 0; }
 +
 +static int ext_based_existence(handlerton *, const char *, const char *)
 +{ return 0; }
 +
 +static int hton_ext_based_table_discovery(handlerton *hton, LEX_STRING *db,
 +                             MY_DIR *dir, handlerton::discovered_list *result)
 +{
 +  /*
 +    tablefile_extensions[0] is the metadata file, see
 +    the comment above tablefile_extensions declaration
 +  */
 +  return extension_based_table_discovery(dir, hton->tablefile_extensions[0],
 +                                         result);
 +}
 +
 +static void update_discovery_counters(handlerton *hton, int val)
 +{
 +  if (hton->discover_table_existence == full_discover_for_existence)
 +    my_atomic_add32(&need_full_discover_for_existence,  val);
 +
 +  if (hton->discover_table_names)
 +    my_atomic_add32(&engines_with_discover_table_names, val);
 +
 +  if (hton->discover_table)
 +    my_atomic_add32(&engines_with_discover, val);
 +}
 +
 +int ha_finalize_handlerton(st_plugin_int *plugin)
 +{
 +  handlerton *hton= (handlerton *)plugin->data;
 +  DBUG_ENTER("ha_finalize_handlerton");
 +
 +  /* hton can be NULL here, if ha_initialize_handlerton() failed. */
 +  if (!hton)
 +    goto end;
 +
 +  switch (hton->state) {
 +  case SHOW_OPTION_NO:
 +  case SHOW_OPTION_DISABLED:
 +    break;
 +  case SHOW_OPTION_YES:
 +    if (installed_htons[hton->db_type] == hton)
 +      installed_htons[hton->db_type]= NULL;
 +    break;
 +  };
 +
 +  if (hton->panic)
 +    hton->panic(hton, HA_PANIC_CLOSE);
 +
 +  if (plugin->plugin->deinit)
 +  {
 +    /*
 +      Today we have no defined/special behavior for uninstalling
 +      engine plugins.
 +    */
 +    DBUG_PRINT("info", ("Deinitializing plugin: '%s'", plugin->name.str));
 +    if (plugin->plugin->deinit(NULL))
 +    {
 +      DBUG_PRINT("warning", ("Plugin '%s' deinit function returned error.",
 +                             plugin->name.str));
 +    }
 +  }
 +
 +  free_sysvar_table_options(hton);
 +  update_discovery_counters(hton, -1);
 +
 +  /*
 +    In case a plugin is uninstalled and re-installed later, it should
 +    reuse an array slot. Otherwise the number of uninstall/install
 +    cycles would be limited.
 +  */
 +  if (hton->slot != HA_SLOT_UNDEF)
 +  {
 +    /* Make sure we are not unpluging another plugin */
 +    DBUG_ASSERT(hton2plugin[hton->slot] == plugin);
 +    DBUG_ASSERT(hton->slot < MAX_HA);
 +    hton2plugin[hton->slot]= NULL;
 +  }
 +
 +  my_free(hton);
 +
 + end:
 +  DBUG_RETURN(0);
 +}
 +
 +
 +int ha_initialize_handlerton(st_plugin_int *plugin)
 +{
 +  handlerton *hton;
 +  static const char *no_exts[]= { 0 };
 +  DBUG_ENTER("ha_initialize_handlerton");
 +  DBUG_PRINT("plugin", ("initialize plugin: '%s'", plugin->name.str));
 +
 +  hton= (handlerton *)my_malloc(sizeof(handlerton),
 +                                MYF(MY_WME | MY_ZEROFILL));
 +  if (hton == NULL)
 +  {
 +    sql_print_error("Unable to allocate memory for plugin '%s' handlerton.",
 +                    plugin->name.str);
 +    goto err_no_hton_memory;
 +  }
 +
 +  hton->tablefile_extensions= no_exts;
 +  hton->discover_table_names= hton_ext_based_table_discovery;
 +
 +  hton->slot= HA_SLOT_UNDEF;
 +  /* Historical Requirement */
 +  plugin->data= hton; // shortcut for the future
 +  if (plugin->plugin->init && plugin->plugin->init(hton))
 +  {
 +    sql_print_error("Plugin '%s' init function returned error.",
 +		    plugin->name.str);
 +    goto err;
 +  }
 +
 +  // hton_ext_based_table_discovery() works only when discovery
 +  // is supported and the engine if file-based.
 +  if (hton->discover_table_names == hton_ext_based_table_discovery &&
 +      (!hton->discover_table || !hton->tablefile_extensions[0]))
 +    hton->discover_table_names= NULL;
 +
 +  // default discover_table_existence implementation
 +  if (!hton->discover_table_existence && hton->discover_table)
 +  {
 +    if (hton->tablefile_extensions[0])
 +      hton->discover_table_existence= ext_based_existence;
 +    else
 +      hton->discover_table_existence= full_discover_for_existence;
 +  }
 +
 +  switch (hton->state) {
 +  case SHOW_OPTION_NO:
 +    break;
 +  case SHOW_OPTION_YES:
 +    {
 +      uint tmp;
 +      ulong fslot;
 +
 +      DBUG_EXECUTE_IF("unstable_db_type", {
 +                        static int i= (int) DB_TYPE_FIRST_DYNAMIC;
 +                        hton->db_type= (enum legacy_db_type)++i;
 +                      });
 +
 +      /* now check the db_type for conflict */
 +      if (hton->db_type <= DB_TYPE_UNKNOWN ||
 +          hton->db_type >= DB_TYPE_DEFAULT ||
 +          installed_htons[hton->db_type])
 +      {
 +        int idx= (int) DB_TYPE_FIRST_DYNAMIC;
 +
 +        while (idx < (int) DB_TYPE_DEFAULT && installed_htons[idx])
 +          idx++;
 +
 +        if (idx == (int) DB_TYPE_DEFAULT)
 +        {
 +          sql_print_warning("Too many storage engines!");
 +	  goto err_deinit;
 +        }
 +        if (hton->db_type != DB_TYPE_UNKNOWN)
 +          sql_print_warning("Storage engine '%s' has conflicting typecode. "
 +                            "Assigning value %d.", plugin->plugin->name, idx);
 +        hton->db_type= (enum legacy_db_type) idx;
 +      }
 +
 +      /*
 +        In case a plugin is uninstalled and re-installed later, it should
 +        reuse an array slot. Otherwise the number of uninstall/install
 +        cycles would be limited. So look for a free slot.
 +      */
 +      DBUG_PRINT("plugin", ("total_ha: %lu", total_ha));
 +      for (fslot= 0; fslot < total_ha; fslot++)
 +      {
 +        if (!hton2plugin[fslot])
 +          break;
 +      }
 +      if (fslot < total_ha)
 +        hton->slot= fslot;
 +      else
 +      {
 +        if (total_ha >= MAX_HA)
 +        {
 +          sql_print_error("Too many plugins loaded. Limit is %lu. "
 +                          "Failed on '%s'", (ulong) MAX_HA, plugin->name.str);
 +          goto err_deinit;
 +        }
 +        hton->slot= total_ha++;
 +      }
 +      installed_htons[hton->db_type]= hton;
 +      tmp= hton->savepoint_offset;
 +      hton->savepoint_offset= savepoint_alloc_size;
 +      savepoint_alloc_size+= tmp;
 +      hton2plugin[hton->slot]=plugin;
 +      if (hton->prepare)
 +      {
 +        total_ha_2pc++;
 +        if (tc_log && tc_log != get_tc_log_implementation())
 +        {
 +          total_ha_2pc--;
 +          hton->prepare= 0;
 +          push_warning_printf(current_thd, Sql_condition::WARN_LEVEL_WARN,
 +                              ER_UNKNOWN_ERROR,
 +                              "Cannot enable tc-log at run-time. "
 +                              "XA features of %s are disabled",
 +                              plugin->name.str);
 +        }
 +      }
 +      break;
 +    }
 +    /* fall through */
 +  default:
 +    hton->state= SHOW_OPTION_DISABLED;
 +    break;
 +  }
 +  
 +  /* 
 +    This is entirely for legacy. We will create a new "disk based" hton and a 
 +    "memory" hton which will be configurable longterm. We should be able to 
 +    remove partition and myisammrg.
 +  */
 +  switch (hton->db_type) {
 +  case DB_TYPE_HEAP:
 +    heap_hton= hton;
 +    break;
 +  case DB_TYPE_MYISAM:
 +    myisam_hton= hton;
 +    break;
 +  case DB_TYPE_PARTITION_DB:
 +    partition_hton= hton;
 +    break;
 +  default:
 +    break;
 +  };
 +
 +  resolve_sysvar_table_options(hton);
 +  update_discovery_counters(hton, 1);
 +
 +  DBUG_RETURN(0);
 +
 +err_deinit:
 +  /* 
 +    Let plugin do its inner deinitialization as plugin->init() 
 +    was successfully called before.
 +  */
 +  if (plugin->plugin->deinit)
 +    (void) plugin->plugin->deinit(NULL);
 +          
 +err:
 +  my_free(hton);
 +err_no_hton_memory:
 +  plugin->data= NULL;
 +  DBUG_RETURN(1);
 +}
 +
 +int ha_init()
 +{
 +  int error= 0;
 +  DBUG_ENTER("ha_init");
 +
 +  DBUG_ASSERT(total_ha < MAX_HA);
 +  /*
 +    Check if there is a transaction-capable storage engine besides the
 +    binary log (which is considered a transaction-capable storage engine in
 +    counting total_ha)
 +  */
 +  opt_using_transactions= total_ha>(ulong)opt_bin_log;
 +  savepoint_alloc_size+= sizeof(SAVEPOINT);
 +  DBUG_RETURN(error);
 +}
 +
 +int ha_end()
 +{
 +  int error= 0;
 +  DBUG_ENTER("ha_end");
 +
 +
 +  /* 
 +    This should be eventualy based  on the graceful shutdown flag.
 +    So if flag is equal to HA_PANIC_CLOSE, the deallocate
 +    the errors.
 +  */
 +  if (ha_finish_errors())
 +    error= 1;
 +
 +  DBUG_RETURN(error);
 +}
 +
 +static my_bool dropdb_handlerton(THD *unused1, plugin_ref plugin,
 +                                 void *path)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->drop_database)
 +    hton->drop_database(hton, (char *)path);
 +  return FALSE;
 +}
 +
 +
 +void ha_drop_database(char* path)
 +{
 +  plugin_foreach(NULL, dropdb_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, path);
 +}
 +
 +
 +static my_bool checkpoint_state_handlerton(THD *unused1, plugin_ref plugin,
 +                                           void *disable)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->checkpoint_state)
 +    hton->checkpoint_state(hton, (int) *(bool*) disable);
 +  return FALSE;
 +}
 +
 +
 +void ha_checkpoint_state(bool disable)
 +{
 +  plugin_foreach(NULL, checkpoint_state_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &disable);
 +}
 +
 +
 +struct st_commit_checkpoint_request {
 +  void *cookie;
 +  void (*pre_hook)(void *);
 +};
 +
 +static my_bool commit_checkpoint_request_handlerton(THD *unused1, plugin_ref plugin,
 +                                           void *data)
 +{
 +  st_commit_checkpoint_request *st= (st_commit_checkpoint_request *)data;
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->commit_checkpoint_request)
 +  {
 +    void *cookie= st->cookie;
 +    if (st->pre_hook)
 +      (*st->pre_hook)(cookie);
 +    (*hton->commit_checkpoint_request)(hton, cookie);
 +  }
 +  return FALSE;
 +}
 +
 +
 +/*
 +  Invoke commit_checkpoint_request() in all storage engines that implement it.
 +
 +  If pre_hook is non-NULL, the hook will be called prior to each invocation.
 +*/
 +void
 +ha_commit_checkpoint_request(void *cookie, void (*pre_hook)(void *))
 +{
 +  st_commit_checkpoint_request st;
 +  st.cookie= cookie;
 +  st.pre_hook= pre_hook;
 +  plugin_foreach(NULL, commit_checkpoint_request_handlerton,
 +                 MYSQL_STORAGE_ENGINE_PLUGIN, &st);
 +}
 +
 +
 +
 +static my_bool closecon_handlerton(THD *thd, plugin_ref plugin,
 +                                   void *unused)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  /*
 +    there's no need to rollback here as all transactions must
 +    be rolled back already
 +  */
 +  if (hton->state == SHOW_OPTION_YES && thd_get_ha_data(thd, hton))
 +  {
 +    if (hton->close_connection)
 +      hton->close_connection(hton, thd);
 +    /* make sure ha_data is reset and ha_data_lock is released */
 +    thd_set_ha_data(thd, hton, NULL);
 +  }
 +  return FALSE;
 +}
 +
 +/**
 +  @note
 +    don't bother to rollback here, it's done already
 +*/
 +void ha_close_connection(THD* thd)
 +{
 +  plugin_foreach(thd, closecon_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, 0);
 +}
 +
 +static my_bool kill_handlerton(THD *thd, plugin_ref plugin,
 +                               void *level)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +
 +  if (hton->state == SHOW_OPTION_YES && hton->kill_query &&
 +      thd_get_ha_data(thd, hton))
 +    hton->kill_query(hton, thd, *(enum thd_kill_levels *) level);
 +  return FALSE;
 +}
 +
 +void ha_kill_query(THD* thd, enum thd_kill_levels level)
 +{
 +  DBUG_ENTER("ha_kill_query");
 +  plugin_foreach(thd, kill_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &level);
 +  DBUG_VOID_RETURN;
 +}
 +
 +
 +/* ========================================================================
 + ======================= TRANSACTIONS ===================================*/
 +
 +/**
 +  Transaction handling in the server
 +  ==================================
 +
 +  In each client connection, MySQL maintains two transactional
 +  states:
 +  - a statement transaction,
 +  - a standard, also called normal transaction.
 +
 +  Historical note
 +  ---------------
 +  "Statement transaction" is a non-standard term that comes
 +  from the times when MySQL supported BerkeleyDB storage engine.
 +
 +  First of all, it should be said that in BerkeleyDB auto-commit
 +  mode auto-commits operations that are atomic to the storage
 +  engine itself, such as a write of a record, and are too
 +  high-granular to be atomic from the application perspective
 +  (MySQL). One SQL statement could involve many BerkeleyDB
 +  auto-committed operations and thus BerkeleyDB auto-commit was of
 +  little use to MySQL.
 +
 +  Secondly, instead of SQL standard savepoints, BerkeleyDB
 +  provided the concept of "nested transactions". In a nutshell,
 +  transactions could be arbitrarily nested, but when the parent
 +  transaction was committed or aborted, all its child (nested)
 +  transactions were handled committed or aborted as well.
 +  Commit of a nested transaction, in turn, made its changes
 +  visible, but not durable: it destroyed the nested transaction,
 +  all its changes would become available to the parent and
 +  currently active nested transactions of this parent.
 +
 +  So the mechanism of nested transactions was employed to
 +  provide "all or nothing" guarantee of SQL statements
 +  required by the standard.
 +  A nested transaction would be created at start of each SQL
 +  statement, and destroyed (committed or aborted) at statement
 +  end. Such nested transaction was internally referred to as
 +  a "statement transaction" and gave birth to the term.
 +
 +  (Historical note ends)
 +
 +  Since then a statement transaction is started for each statement
 +  that accesses transactional tables or uses the binary log.  If
 +  the statement succeeds, the statement transaction is committed.
 +  If the statement fails, the transaction is rolled back. Commits
 +  of statement transactions are not durable -- each such
 +  transaction is nested in the normal transaction, and if the
 +  normal transaction is rolled back, the effects of all enclosed
 +  statement transactions are undone as well.  Technically,
 +  a statement transaction can be viewed as a savepoint which is
 +  maintained automatically in order to make effects of one
 +  statement atomic.
 +
 +  The normal transaction is started by the user and is ended
 +  usually upon a user request as well. The normal transaction
 +  encloses transactions of all statements issued between
 +  its beginning and its end.
 +  In autocommit mode, the normal transaction is equivalent
 +  to the statement transaction.
 +
 +  Since MySQL supports PSEA (pluggable storage engine
 +  architecture), more than one transactional engine can be
 +  active at a time. Hence transactions, from the server
 +  point of view, are always distributed. In particular,
 +  transactional state is maintained independently for each
 +  engine. In order to commit a transaction the two phase
 +  commit protocol is employed.
 +
 +  Not all statements are executed in context of a transaction.
 +  Administrative and status information statements do not modify
 +  engine data, and thus do not start a statement transaction and
 +  also have no effect on the normal transaction. Examples of such
 +  statements are SHOW STATUS and RESET SLAVE.
 +
 +  Similarly DDL statements are not transactional,
 +  and therefore a transaction is [almost] never started for a DDL
 +  statement. The difference between a DDL statement and a purely
 +  administrative statement though is that a DDL statement always
 +  commits the current transaction before proceeding, if there is
 +  any.
 +
 +  At last, SQL statements that work with non-transactional
 +  engines also have no effect on the transaction state of the
 +  connection. Even though they are written to the binary log,
 +  and the binary log is, overall, transactional, the writes
 +  are done in "write-through" mode, directly to the binlog
 +  file, followed with a OS cache sync, in other words,
 +  bypassing the binlog undo log (translog).
 +  They do not commit the current normal transaction.
 +  A failure of a statement that uses non-transactional tables
 +  would cause a rollback of the statement transaction, but
 +  in case there no non-transactional tables are used,
 +  no statement transaction is started.
 +
 +  Data layout
 +  -----------
 +
 +  The server stores its transaction-related data in
 +  thd->transaction. This structure has two members of type
 +  THD_TRANS. These members correspond to the statement and
 +  normal transactions respectively:
 +
 +  - thd->transaction.stmt contains a list of engines
 +  that are participating in the given statement
 +  - thd->transaction.all contains a list of engines that
 +  have participated in any of the statement transactions started
 +  within the context of the normal transaction.
 +  Each element of the list contains a pointer to the storage
 +  engine, engine-specific transactional data, and engine-specific
 +  transaction flags.
 +
 +  In autocommit mode thd->transaction.all is empty.
 +  Instead, data of thd->transaction.stmt is
 +  used to commit/rollback the normal transaction.
 +
 +  The list of registered engines has a few important properties:
 +  - no engine is registered in the list twice
 +  - engines are present in the list a reverse temporal order --
 +  new participants are always added to the beginning of the list.
 +
 +  Transaction life cycle
 +  ----------------------
 +
 +  When a new connection is established, thd->transaction
 +  members are initialized to an empty state.
 +  If a statement uses any tables, all affected engines
 +  are registered in the statement engine list. In
 +  non-autocommit mode, the same engines are registered in
 +  the normal transaction list.
 +  At the end of the statement, the server issues a commit
 +  or a roll back for all engines in the statement list.
 +  At this point transaction flags of an engine, if any, are
 +  propagated from the statement list to the list of the normal
 +  transaction.
 +  When commit/rollback is finished, the statement list is
 +  cleared. It will be filled in again by the next statement,
 +  and emptied again at the next statement's end.
 +
 +  The normal transaction is committed in a similar way
 +  (by going over all engines in thd->transaction.all list)
 +  but at different times:
 +  - upon COMMIT SQL statement is issued by the user
 +  - implicitly, by the server, at the beginning of a DDL statement
 +  or SET AUTOCOMMIT={0|1} statement.
 +
 +  The normal transaction can be rolled back as well:
 +  - if the user has requested so, by issuing ROLLBACK SQL
 +  statement
 +  - if one of the storage engines requested a rollback
 +  by setting thd->transaction_rollback_request. This may
 +  happen in case, e.g., when the transaction in the engine was
 +  chosen a victim of the internal deadlock resolution algorithm
 +  and rolled back internally. When such a situation happens, there
 +  is little the server can do and the only option is to rollback
 +  transactions in all other participating engines.  In this case
 +  the rollback is accompanied by an error sent to the user.
 +
 +  As follows from the use cases above, the normal transaction
 +  is never committed when there is an outstanding statement
 +  transaction. In most cases there is no conflict, since
 +  commits of the normal transaction are issued by a stand-alone
 +  administrative or DDL statement, thus no outstanding statement
 +  transaction of the previous statement exists. Besides,
 +  all statements that manipulate with the normal transaction
 +  are prohibited in stored functions and triggers, therefore
 +  no conflicting situation can occur in a sub-statement either.
 +  The remaining rare cases when the server explicitly has
 +  to commit the statement transaction prior to committing the normal
 +  one cover error-handling scenarios (see for example
 +  SQLCOM_LOCK_TABLES).
 +
 +  When committing a statement or a normal transaction, the server
 +  either uses the two-phase commit protocol, or issues a commit
 +  in each engine independently. The two-phase commit protocol
 +  is used only if:
 +  - all participating engines support two-phase commit (provide
 +    handlerton::prepare PSEA API call) and
 +  - transactions in at least two engines modify data (i.e. are
 +  not read-only).
 +
 +  Note that the two phase commit is used for
 +  statement transactions, even though they are not durable anyway.
 +  This is done to ensure logical consistency of data in a multiple-
 +  engine transaction.
 +  For example, imagine that some day MySQL supports unique
 +  constraint checks deferred till the end of statement. In such
 +  case a commit in one of the engines may yield ER_DUP_KEY,
 +  and MySQL should be able to gracefully abort statement
 +  transactions of other participants.
 +
 +  After the normal transaction has been committed,
 +  thd->transaction.all list is cleared.
 +
 +  When a connection is closed, the current normal transaction, if
 +  any, is rolled back.
 +
 +  Roles and responsibilities
 +  --------------------------
 +
 +  The server has no way to know that an engine participates in
 +  the statement and a transaction has been started
 +  in it unless the engine says so. Thus, in order to be
 +  a part of a transaction, the engine must "register" itself.
 +  This is done by invoking trans_register_ha() server call.
 +  Normally the engine registers itself whenever handler::external_lock()
 +  is called. trans_register_ha() can be invoked many times: if
 +  an engine is already registered, the call does nothing.
 +  In case autocommit is not set, the engine must register itself
 +  twice -- both in the statement list and in the normal transaction
 +  list.
 +  In which list to register is a parameter of trans_register_ha().
 +
 +  Note, that although the registration interface in itself is
 +  fairly clear, the current usage practice often leads to undesired
 +  effects. E.g. since a call to trans_register_ha() in most engines
 +  is embedded into implementation of handler::external_lock(), some
 +  DDL statements start a transaction (at least from the server
 +  point of view) even though they are not expected to. E.g.
 +  CREATE TABLE does not start a transaction, since
 +  handler::external_lock() is never called during CREATE TABLE. But
 +  CREATE TABLE ... SELECT does, since handler::external_lock() is
 +  called for the table that is being selected from. This has no
 +  practical effects currently, but must be kept in mind
 +  nevertheless.
 +
 +  Once an engine is registered, the server will do the rest
 +  of the work.
 +
 +  During statement execution, whenever any of data-modifying
 +  PSEA API methods is used, e.g. handler::write_row() or
 +  handler::update_row(), the read-write flag is raised in the
 +  statement transaction for the involved engine.
 +  Currently All PSEA calls are "traced", and the data can not be
 +  changed in a way other than issuing a PSEA call. Important:
 +  unless this invariant is preserved the server will not know that
 +  a transaction in a given engine is read-write and will not
 +  involve the two-phase commit protocol!
 +
 +  At the end of a statement, server call trans_commit_stmt is
 +  invoked. This call in turn invokes handlerton::prepare()
 +  for every involved engine. Prepare is followed by a call
 +  to handlerton::commit_one_phase() If a one-phase commit
 +  will suffice, handlerton::prepare() is not invoked and
 +  the server only calls handlerton::commit_one_phase().
 +  At statement commit, the statement-related read-write
 +  engine flag is propagated to the corresponding flag in the
 +  normal transaction.  When the commit is complete, the list
 +  of registered engines is cleared.
 +
 +  Rollback is handled in a similar fashion.
 +
 +  Additional notes on DDL and the normal transaction.
 +  ---------------------------------------------------
 +
 +  DDLs and operations with non-transactional engines
 +  do not "register" in thd->transaction lists, and thus do not
 +  modify the transaction state. Besides, each DDL in
 +  MySQL is prefixed with an implicit normal transaction commit
 +  (a call to trans_commit_implicit()), and thus leaves nothing
 +  to modify.
 +  However, as it has been pointed out with CREATE TABLE .. SELECT,
 +  some DDL statements can start a *new* transaction.
 +
 +  Behaviour of the server in this case is currently badly
 +  defined.
 +  DDL statements use a form of "semantic" logging
 +  to maintain atomicity: if CREATE TABLE .. SELECT failed,
 +  the newly created table is deleted.
 +  In addition, some DDL statements issue interim transaction
 +  commits: e.g. ALTER TABLE issues a commit after data is copied
 +  from the original table to the internal temporary table. Other
 +  statements, e.g. CREATE TABLE ... SELECT do not always commit
 +  after itself.
 +  And finally there is a group of DDL statements such as
 +  RENAME/DROP TABLE that doesn't start a new transaction
 +  and doesn't commit.
 +
 +  This diversity makes it hard to say what will happen if
 +  by chance a stored function is invoked during a DDL --
 +  whether any modifications it makes will be committed or not
 +  is not clear. Fortunately, SQL grammar of few DDLs allows
 +  invocation of a stored function.
 +
 +  A consistent behaviour is perhaps to always commit the normal
 +  transaction after all DDLs, just like the statement transaction
 +  is always committed at the end of all statements.
 +*/
 +
 +/**
 +  Register a storage engine for a transaction.
 +
 +  Every storage engine MUST call this function when it starts
 +  a transaction or a statement (that is it must be called both for the
 +  "beginning of transaction" and "beginning of statement").
 +  Only storage engines registered for the transaction/statement
 +  will know when to commit/rollback it.
 +
 +  @note
 +    trans_register_ha is idempotent - storage engine may register many
 +    times per transaction.
 +
 +*/
 +void trans_register_ha(THD *thd, bool all, handlerton *ht_arg)
 +{
 +  THD_TRANS *trans;
 +  Ha_trx_info *ha_info;
 +  DBUG_ENTER("trans_register_ha");
 +  DBUG_PRINT("enter",("%s", all ? "all" : "stmt"));
 +
 +  if (all)
 +  {
 +    trans= &thd->transaction.all;
 +    thd->server_status|= SERVER_STATUS_IN_TRANS;
 +    if (thd->tx_read_only)
 +      thd->server_status|= SERVER_STATUS_IN_TRANS_READONLY;
 +    DBUG_PRINT("info", ("setting SERVER_STATUS_IN_TRANS"));
 +  }
 +  else
 +    trans= &thd->transaction.stmt;
 +
 +  ha_info= thd->ha_data[ht_arg->slot].ha_info + (all ? 1 : 0);
 +
 +  if (ha_info->is_started())
 +    DBUG_VOID_RETURN; /* already registered, return */
 +
 +  ha_info->register_ha(trans, ht_arg);
 +
 +  trans->no_2pc|=(ht_arg->prepare==0);
 +  if (thd->transaction.xid_state.xid.is_null())
 +    thd->transaction.xid_state.xid.set(thd->query_id);
 +  DBUG_VOID_RETURN;
 +}
 +
 +
 +static int prepare_or_error(handlerton *ht, THD *thd, bool all)
 +{
 +  int err= ht->prepare(ht, thd, all);
 +  status_var_increment(thd->status_var.ha_prepare_count);
 +  if (err)
 +  {
 +    /* avoid sending error, if we're going to replay the transaction */
 +#ifdef WITH_WSREP
 +    if (ht != wsrep_hton ||
 +        err == EMSGSIZE || thd->wsrep_conflict_state != MUST_REPLAY)
 +#endif
 +      my_error(ER_ERROR_DURING_COMMIT, MYF(0), err);
 +  }
 +  return err;
 +}
 +
 +
 +/**
 +  @retval
 +    0   ok
 +  @retval
 +    1   error, transaction was rolled back
 +*/
 +int ha_prepare(THD *thd)
 +{
 +  int error=0, all=1;
 +  THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
 +  Ha_trx_info *ha_info= trans->ha_list;
 +  DBUG_ENTER("ha_prepare");
 +
 +  if (ha_info)
 +  {
 +    for (; ha_info; ha_info= ha_info->next())
 +    {
 +      handlerton *ht= ha_info->ht();
 +      if (ht->prepare)
 +      {
 +        if (prepare_or_error(ht, thd, all))
 +        {
 +          ha_rollback_trans(thd, all);
 +          error=1;
 +          break;
 +        }
 +      }
 +      else
 +      {
 +        push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN,
 +                            ER_GET_ERRNO, ER_THD(thd, ER_GET_ERRNO),
 +                            HA_ERR_WRONG_COMMAND,
 +                            ha_resolve_storage_engine_name(ht));
 +
 +      }
 +    }
 +  }
 +
 +  DBUG_RETURN(error);
 +}
 +
 +/**
 +  Check if we can skip the two-phase commit.
 +
 +  A helper function to evaluate if two-phase commit is mandatory.
 +  As a side effect, propagates the read-only/read-write flags
 +  of the statement transaction to its enclosing normal transaction.
 +  
 +  If we have at least two engines with read-write changes we must
 +  run a two-phase commit. Otherwise we can run several independent
 +  commits as the only transactional engine has read-write changes
 +  and others are read-only.
 +
 +  @retval   0   All engines are read-only.
 +  @retval   1   We have the only engine with read-write changes.
 +  @retval   >1  More than one engine have read-write changes.
 +                Note: return value might NOT be the exact number of
 +                engines with read-write changes.
 +*/
 +
 +static
 +uint
 +ha_check_and_coalesce_trx_read_only(THD *thd, Ha_trx_info *ha_list,
 +                                    bool all)
 +{
 +  /* The number of storage engines that have actual changes. */
 +  unsigned rw_ha_count= 0;
 +  Ha_trx_info *ha_info;
 +
 +  for (ha_info= ha_list; ha_info; ha_info= ha_info->next())
 +  {
 +    if (ha_info->is_trx_read_write())
 +      ++rw_ha_count;
 +
 +    if (! all)
 +    {
 +      Ha_trx_info *ha_info_all= &thd->ha_data[ha_info->ht()->slot].ha_info[1];
 +      DBUG_ASSERT(ha_info != ha_info_all);
 +      /*
 +        Merge read-only/read-write information about statement
 +        transaction to its enclosing normal transaction. Do this
 +        only if in a real transaction -- that is, if we know
 +        that ha_info_all is registered in thd->transaction.all.
 +        Since otherwise we only clutter the normal transaction flags.
 +      */
 +      if (ha_info_all->is_started()) /* FALSE if autocommit. */
 +        ha_info_all->coalesce_trx_with(ha_info);
 +    }
 +    else if (rw_ha_count > 1)
 +    {
 +      /*
 +        It is a normal transaction, so we don't need to merge read/write
 +        information up, and the need for two-phase commit has been
 +        already established. Break the loop prematurely.
 +      */
 +      break;
 +    }
 +  }
 +  return rw_ha_count;
 +}
 +
 +
 +/**
 +  @retval
 +    0   ok
 +  @retval
 +    1   transaction was rolled back
 +  @retval
 +    2   error during commit, data may be inconsistent
 +
 +  @todo
 +    Since we don't support nested statement transactions in 5.0,
 +    we can't commit or rollback stmt transactions while we are inside
 +    stored functions or triggers. So we simply do nothing now.
 +    TODO: This should be fixed in later ( >= 5.1) releases.
 +*/
 +int ha_commit_trans(THD *thd, bool all)
 +{
 +  int error= 0, cookie;
 +  /*
 +    'all' means that this is either an explicit commit issued by
 +    user, or an implicit commit issued by a DDL.
 +  */
 +  THD_TRANS *trans= all ? &thd->transaction.all : &thd->transaction.stmt;
 +  /*
 +    "real" is a nick name for a transaction for which a commit will
 +    make persistent changes. E.g. a 'stmt' transaction inside a 'all'
 +    transation is not 'real': even though it's possible to commit it,
 +    the changes are not durable as they might be rolled back if the
 +    enclosing 'all' transaction is rolled back.
 +  */
 +  bool is_real_trans= ((all || thd->transaction.all.ha_list == 0) &&
 +                       !(thd->variables.option_bits & OPTION_GTID_BEGIN));
 +  Ha_trx_info *ha_info= trans->ha_list;
 +  bool need_prepare_ordered, need_commit_ordered;
 +  my_xid xid;
 +  DBUG_ENTER("ha_commit_trans");
 +  DBUG_PRINT("info",("thd: %p  option_bits: %lu  all: %d",
 +                     thd, (ulong) thd->variables.option_bits, all));
 +
 +  /* Just a random warning to test warnings pushed during autocommit. */
 +  DBUG_EXECUTE_IF("warn_during_ha_commit_trans",
 +    push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
 +                 ER_WARNING_NOT_COMPLETE_ROLLBACK,
 +                 ER_THD(thd, ER_WARNING_NOT_COMPLETE_ROLLBACK)););
 +
 +  DBUG_PRINT("info",
 +             ("all: %d  thd->in_sub_stmt: %d  ha_info: %p  is_real_trans: %d",
 +              all, thd->in_sub_stmt, ha_info, is_real_trans));
 +  /*
 +    We must not commit the normal transaction if a statement
 +    transaction is pending. Otherwise statement transaction
 +    flags will not get propagated to its normal transaction's
 +    counterpart.
 +  */
 +  DBUG_ASSERT(thd->transaction.stmt.ha_list == NULL ||
 +              trans == &thd->transaction.stmt);
 +
 +  if (thd->in_sub_stmt)
 +  {
 +    DBUG_ASSERT(0);
 +    /*
 +      Since we don't support nested statement transactions in 5.0,
 +      we can't commit or rollback stmt transactions while we are inside
 +      stored functions or triggers. So we simply do nothing now.
 +      TODO: This should be fixed in later ( >= 5.1) releases.
 +    */
 +    if (!all)
 +      DBUG_RETURN(0);
 +    /*
 +      We assume that all statements which commit or rollback main transaction
 +      are prohibited inside of stored functions or triggers. So they should
 +      bail out with error even before ha_commit_trans() call. To be 100% safe
 +      let us throw error in non-debug builds.
 +    */
 +    my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
 +    DBUG_RETURN(2);
 +  }
 +
 +#ifdef WITH_ARIA_STORAGE_ENGINE
 +    ha_maria::implicit_commit(thd, TRUE);
 +#endif
 +
 +  if (!ha_info)
 +  {
 +    /*
 +      Free resources and perform other cleanup even for 'empty' transactions.
 +    */
 +    if (is_real_trans)
 +      thd->transaction.cleanup();
 +    DBUG_RETURN(0);
 +  }
 +
 +  DBUG_EXECUTE_IF("crash_commit_before", DBUG_SUICIDE(););
 +
 +  /* Close all cursors that can not survive COMMIT */
 +  if (is_real_trans)                          /* not a statement commit */
 +    thd->stmt_map.close_transient_cursors();
 +
 +  uint rw_ha_count= ha_check_and_coalesce_trx_read_only(thd, ha_info, all);
 +  /* rw_trans is TRUE when we in a transaction changing data */
 +  bool rw_trans= is_real_trans && (rw_ha_count > 0);
 +  MDL_request mdl_request;
 +  DBUG_PRINT("info", ("is_real_trans: %d  rw_trans:  %d  rw_ha_count: %d",
 +                      is_real_trans, rw_trans, rw_ha_count));
 +
 +  if (rw_trans)
 +  {
 +    /*
 +      Acquire a metadata lock which will ensure that COMMIT is blocked
 +      by an active FLUSH TABLES WITH READ LOCK (and vice versa:
 +      COMMIT in progress blocks FTWRL).
 +
 +      We allow the owner of FTWRL to COMMIT; we assume that it knows
 +      what it does.
 +    */
 +    mdl_request.init(MDL_key::COMMIT, "", "", MDL_INTENTION_EXCLUSIVE,
 +                     MDL_EXPLICIT);
 +
 +    if (!WSREP(thd) &&
 +      thd->mdl_context.acquire_lock(&mdl_request,
 +                                    thd->variables.lock_wait_timeout))
 +    {
 +      ha_rollback_trans(thd, all);
 +      DBUG_RETURN(1);
 +    }
 +
 +    DEBUG_SYNC(thd, "ha_commit_trans_after_acquire_commit_lock");
 +  }
 +
 +  if (rw_trans &&
 +      opt_readonly &&
 +      !(thd->security_ctx->master_access & SUPER_ACL) &&
 +      !thd->slave_thread)
 +  {
 +    my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--read-only");
 +    goto err;
 +  }
 +
 +  if (trans->no_2pc || (rw_ha_count <= 1))
 +  {
 +    error= ha_commit_one_phase(thd, all);
 +    goto done;
 +  }
 +
 +  need_prepare_ordered= FALSE;
 +  need_commit_ordered= FALSE;
 +  xid= thd->transaction.xid_state.xid.get_my_xid();
 +
 +  for (Ha_trx_info *hi= ha_info; hi; hi= hi->next())
 +  {
 +    handlerton *ht= hi->ht();
 +    /*
 +      Do not call two-phase commit if this particular
 +      transaction is read-only. This allows for simpler
 +      implementation in engines that are always read-only.
 +    */
 +    if (! hi->is_trx_read_write())
 +      continue;
 +    /*
 +      Sic: we know that prepare() is not NULL since otherwise
 +      trans->no_2pc would have been set.
 +    */
 +    if (prepare_or_error(ht, thd, all))
 +      goto err;
 +
 +    need_prepare_ordered|= (ht->prepare_ordered != NULL);
 +    need_commit_ordered|= (ht->commit_ordered != NULL);
 +  }
 +  DEBUG_SYNC(thd, "ha_commit_trans_after_prepare");
 +  DBUG_EXECUTE_IF("crash_commit_after_prepare", DBUG_SUICIDE(););
 +
 +  if (!error && WSREP_ON && wsrep_is_wsrep_xid(&thd->transaction.xid_state.xid))
 +  {
 +    // xid was rewritten by wsrep
 +    xid= wsrep_xid_seqno(thd->transaction.xid_state.xid);
 +  }
 +
 +  if (!is_real_trans)
 +  {
 +    error= commit_one_phase_2(thd, all, trans, is_real_trans);
 +    goto done;
 +  }
 +
 +  DEBUG_SYNC(thd, "ha_commit_trans_before_log_and_order");
 +  cookie= tc_log->log_and_order(thd, xid, all, need_prepare_ordered,
 +                                need_commit_ordered);
 +  if (!cookie)
 +    goto err;
 +
 +  DEBUG_SYNC(thd, "ha_commit_trans_after_log_and_order");
 +  DBUG_EXECUTE_IF("crash_commit_after_log", DBUG_SUICIDE(););
 +
 +  error= commit_one_phase_2(thd, all, trans, is_real_trans) ? 2 : 0;
 +
 +  DBUG_EXECUTE_IF("crash_commit_before_unlog", DBUG_SUICIDE(););
 +  if (tc_log->unlog(cookie, xid))
 +  {
 +    error= 2;                                /* Error during commit */
 +    goto end;
 +  }
 +
 +done:
 +  DBUG_EXECUTE_IF("crash_commit_after", DBUG_SUICIDE(););
 +
 +  mysql_mutex_assert_not_owner(&LOCK_prepare_ordered);
 +  mysql_mutex_assert_not_owner(mysql_bin_log.get_log_lock());
 +  mysql_mutex_assert_not_owner(&LOCK_after_binlog_sync);
 +  mysql_mutex_assert_not_owner(&LOCK_commit_ordered);
 +  RUN_HOOK(transaction, after_commit, (thd, FALSE));
 +  goto end;
 +
 +  /* Come here if error and we need to rollback. */
 +err:
 +  error= 1;                                  /* Transaction was rolled back */
 +  /*
 +    In parallel replication, rollback is delayed, as there is extra replication
 +    book-keeping to be done before rolling back and allowing a conflicting
 +    transaction to continue (MDEV-7458).
 +  */
 +  if (!(thd->rgi_slave && thd->rgi_slave->is_parallel_exec))
 +    ha_rollback_trans(thd, all);
 +
 +end:
 +  if (rw_trans && mdl_request.ticket)
 +  {
 +    /*
 +      We do not always immediately release transactional locks
 +      after ha_commit_trans() (see uses of ha_enable_transaction()),
 +      thus we release the commit blocker lock as soon as it's
 +      not needed.
 +    */
 +    thd->mdl_context.release_lock(mdl_request.ticket);
 +  }
 +  DBUG_RETURN(error);
 +}
 +
 +/**
 +  @note
 +  This function does not care about global read lock. A caller should.
 +
 +  @param[in]  all  Is set in case of explicit commit
 +                   (COMMIT statement), or implicit commit
 +                   issued by DDL. Is not set when called
 +                   at the end of statement, even if
 +                   autocommit=1.
 +*/
 +
 +int ha_commit_one_phase(THD *thd, bool all)
 +{
 +  THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
 +  /*
 +    "real" is a nick name for a transaction for which a commit will
 +    make persistent changes. E.g. a 'stmt' transaction inside a 'all'
 +    transaction is not 'real': even though it's possible to commit it,
 +    the changes are not durable as they might be rolled back if the
 +    enclosing 'all' transaction is rolled back.
 +    We establish the value of 'is_real_trans' by checking
 +    if it's an explicit COMMIT/BEGIN statement, or implicit
 +    commit issued by DDL (all == TRUE), or if we're running
 +    in autocommit mode (it's only in the autocommit mode
 +    ha_commit_one_phase() can be called with an empty
 +    transaction.all.ha_list, see why in trans_register_ha()).
 +  */
 +  bool is_real_trans= ((all || thd->transaction.all.ha_list == 0) &&
 +                       !(thd->variables.option_bits & OPTION_GTID_BEGIN));
 +  int res;
 +  DBUG_ENTER("ha_commit_one_phase");
 +  if (is_real_trans)
 +  {
 +    DEBUG_SYNC(thd, "ha_commit_one_phase");
 +    if ((res= thd->wait_for_prior_commit()))
 +      DBUG_RETURN(res);
 +  }
 +  res= commit_one_phase_2(thd, all, trans, is_real_trans);
 +  DBUG_RETURN(res);
 +}
 +
 +
 +static int
 +commit_one_phase_2(THD *thd, bool all, THD_TRANS *trans, bool is_real_trans)
 +{
 +  int error= 0;
 +  Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
 +  DBUG_ENTER("commit_one_phase_2");
 +  if (is_real_trans)
 +    DEBUG_SYNC(thd, "commit_one_phase_2");
 +  if (ha_info)
 +  {
 +    for (; ha_info; ha_info= ha_info_next)
 +    {
 +      int err;
 +      handlerton *ht= ha_info->ht();
 +      if ((err= ht->commit(ht, thd, all)))
 +      {
 +        my_error(ER_ERROR_DURING_COMMIT, MYF(0), err);
 +        error=1;
 +      }
 +      /* Should this be done only if is_real_trans is set ? */
 +      status_var_increment(thd->status_var.ha_commit_count);
 +      ha_info_next= ha_info->next();
 +      ha_info->reset(); /* keep it conveniently zero-filled */
 +    }
 +    trans->ha_list= 0;
 +    trans->no_2pc=0;
 +    if (all)
 +    {
 +#ifdef HAVE_QUERY_CACHE
 +      if (thd->transaction.changed_tables)
 +        query_cache.invalidate(thd, thd->transaction.changed_tables);
 +#endif
 +    }
 +  }
 +  /* Free resources and perform other cleanup even for 'empty' transactions. */
 +  if (is_real_trans)
 +  {
 +    thd->has_waiter= false;
 +    thd->transaction.cleanup();
 +  }
 +
 +  DBUG_RETURN(error);
 +}
 +
 +
 +int ha_rollback_trans(THD *thd, bool all)
 +{
 +  int error=0;
 +  THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
 +  Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
 +  /*
 +    "real" is a nick name for a transaction for which a commit will
 +    make persistent changes. E.g. a 'stmt' transaction inside a 'all'
 +    transaction is not 'real': even though it's possible to commit it,
 +    the changes are not durable as they might be rolled back if the
 +    enclosing 'all' transaction is rolled back.
 +    We establish the value of 'is_real_trans' by checking
 +    if it's an explicit COMMIT or BEGIN statement, or implicit
 +    commit issued by DDL (in these cases all == TRUE),
 +    or if we're running in autocommit mode (it's only in the autocommit mode
 +    ha_commit_one_phase() is called with an empty
 +    transaction.all.ha_list, see why in trans_register_ha()).
 +  */
 +  bool is_real_trans=all || thd->transaction.all.ha_list == 0;
 +  DBUG_ENTER("ha_rollback_trans");
 +
 +  /*
 +    We must not rollback the normal transaction if a statement
 +    transaction is pending.
 +  */
 +  DBUG_ASSERT(thd->transaction.stmt.ha_list == NULL ||
 +              trans == &thd->transaction.stmt);
 +
 +#ifdef HAVE_REPLICATION
 +  if (is_real_trans)
 +  {
 +    /*
 +      In parallel replication, if we need to rollback during commit, we must
 +      first inform following transactions that we are going to abort our commit
 +      attempt. Otherwise those following transactions can run too early, and
 +      possibly cause replication to fail. See comments in retry_event_group().
 +
 +      There were several bugs with this in the past that were very hard to
 +      track down (MDEV-7458, MDEV-8302). So we add here an assertion for
 +      rollback without signalling following transactions. And in release
 +      builds, we explicitly do the signalling before rolling back.
 +    */
 +    DBUG_ASSERT(!(thd->rgi_slave && thd->rgi_slave->did_mark_start_commit));
 +    if (thd->rgi_slave && thd->rgi_slave->did_mark_start_commit)
 +      thd->rgi_slave->unmark_start_commit();
 +  }
 +#endif
 +
 +  if (thd->in_sub_stmt)
 +  {
 +    DBUG_ASSERT(0);
 +    /*
 +      If we are inside stored function or trigger we should not commit or
 +      rollback current statement transaction. See comment in ha_commit_trans()
 +      call for more information.
 +    */
 +    if (!all)
 +      DBUG_RETURN(0);
 +    my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
 +    DBUG_RETURN(1);
 +  }
 +
 +  if (ha_info)
 +  {
 +    /* Close all cursors that can not survive ROLLBACK */
 +    if (is_real_trans)                          /* not a statement commit */
 +      thd->stmt_map.close_transient_cursors();
 +
 +    for (; ha_info; ha_info= ha_info_next)
 +    {
 +      int err;
 +      handlerton *ht= ha_info->ht();
 +      if ((err= ht->rollback(ht, thd, all)))
 +      { // cannot happen
 +        my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err);
 +        error=1;
 +      }
 +      status_var_increment(thd->status_var.ha_rollback_count);
 +      ha_info_next= ha_info->next();
 +      ha_info->reset(); /* keep it conveniently zero-filled */
 +    }
 +    trans->ha_list= 0;
 +    trans->no_2pc=0;
 +  }
 +
 +  /*
 +    Thanks to possibility of MDL deadlock rollback request can come even if
 +    transaction hasn't been started in any transactional storage engine.
 +  */
 +  if (is_real_trans && thd->transaction_rollback_request &&
 +      thd->transaction.xid_state.xa_state != XA_NOTR)
 +    thd->transaction.xid_state.rm_error= thd->get_stmt_da()->sql_errno();
 +
 +  /* Always cleanup. Even if nht==0. There may be savepoints. */
 +  if (is_real_trans)
 +  {
 +    thd->has_waiter= false;
 +    thd->transaction.cleanup();
 +  }
 +  if (all)
 +    thd->transaction_rollback_request= FALSE;
 +
 +  /*
 +    If a non-transactional table was updated, warn; don't warn if this is a
 +    slave thread (because when a slave thread executes a ROLLBACK, it has
 +    been read from the binary log, so it's 100% sure and normal to produce
 +    error ER_WARNING_NOT_COMPLETE_ROLLBACK. If we sent the warning to the
 +    slave SQL thread, it would not stop the thread but just be printed in
 +    the error log; but we don't want users to wonder why they have this
 +    message in the error log, so we don't send it.
 +
 +    We don't have to test for thd->killed == KILL_SYSTEM_THREAD as
 +    it doesn't matter if a warning is pushed to a system thread or not:
 +    No one will see it...
 +  */
 +  if (is_real_trans && thd->transaction.all.modified_non_trans_table &&
 +      !thd->slave_thread && thd->killed < KILL_CONNECTION)
 +    push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
 +                 ER_WARNING_NOT_COMPLETE_ROLLBACK,
 +                 ER_THD(thd, ER_WARNING_NOT_COMPLETE_ROLLBACK));
 +  (void) RUN_HOOK(transaction, after_rollback, (thd, FALSE));
 +  DBUG_RETURN(error);
 +}
 +
 +
 +struct xahton_st {
 +  XID *xid;
 +  int result;
 +};
 +
 +static my_bool xacommit_handlerton(THD *unused1, plugin_ref plugin,
 +                                   void *arg)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->recover)
 +  {
 +    hton->commit_by_xid(hton, ((struct xahton_st *)arg)->xid);
 +    ((struct xahton_st *)arg)->result= 0;
 +  }
 +  return FALSE;
 +}
 +
 +static my_bool xarollback_handlerton(THD *unused1, plugin_ref plugin,
 +                                     void *arg)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->recover)
 +  {
 +    hton->rollback_by_xid(hton, ((struct xahton_st *)arg)->xid);
 +    ((struct xahton_st *)arg)->result= 0;
 +  }
 +  return FALSE;
 +}
 +
 +
 +int ha_commit_or_rollback_by_xid(XID *xid, bool commit)
 +{
 +  struct xahton_st xaop;
 +  xaop.xid= xid;
 +  xaop.result= 1;
 +
 +  plugin_foreach(NULL, commit ? xacommit_handlerton : xarollback_handlerton,
 +                 MYSQL_STORAGE_ENGINE_PLUGIN, &xaop);
 +
 +  return xaop.result;
 +}
 +
 +
 +#ifndef DBUG_OFF
 +/**
 +  @note
 +    This does not need to be multi-byte safe or anything
 +*/
 +static char* xid_to_str(char *buf, XID *xid)
 +{
 +  int i;
 +  char *s=buf;
 +  *s++='\'';
 +  for (i=0; i < xid->gtrid_length+xid->bqual_length; i++)
 +  {
 +    uchar c=(uchar)xid->data[i];
 +    /* is_next_dig is set if next character is a number */
 +    bool is_next_dig= FALSE;
 +    if (i < XIDDATASIZE)
 +    {
 +      char ch= xid->data[i+1];
 +      is_next_dig= (ch >= '0' && ch <='9');
 +    }
 +    if (i == xid->gtrid_length)
 +    {
 +      *s++='\'';
 +      if (xid->bqual_length)
 +      {
 +        *s++='.';
 +        *s++='\'';
 +      }
 +    }
 +    if (c < 32 || c > 126)
 +    {
 +      *s++='\\';
 +      /*
 +        If next character is a number, write current character with
 +        3 octal numbers to ensure that the next number is not seen
 +        as part of the octal number
 +      */
 +      if (c > 077 || is_next_dig)
 +        *s++=_dig_vec_lower[c >> 6];
 +      if (c > 007 || is_next_dig)
 +        *s++=_dig_vec_lower[(c >> 3) & 7];
 +      *s++=_dig_vec_lower[c & 7];
 +    }
 +    else
 +    {
 +      if (c == '\'' || c == '\\')
 +        *s++='\\';
 +      *s++=c;
 +    }
 +  }
 +  *s++='\'';
 +  *s=0;
 +  return buf;
 +}
 +#endif
 +
 +/**
 +  recover() step of xa.
 +
 +  @note
 +    there are three modes of operation:
 +    - automatic recover after a crash
 +    in this case commit_list != 0, tc_heuristic_recover==0
 +    all xids from commit_list are committed, others are rolled back
 +    - manual (heuristic) recover
 +    in this case commit_list==0, tc_heuristic_recover != 0
 +    DBA has explicitly specified that all prepared transactions should
 +    be committed (or rolled back).
 +    - no recovery (MySQL did not detect a crash)
 +    in this case commit_list==0, tc_heuristic_recover == 0
 +    there should be no prepared transactions in this case.
 +*/
 +struct xarecover_st
 +{
 +  int len, found_foreign_xids, found_my_xids;
 +  XID *list;
 +  HASH *commit_list;
 +  bool dry_run;
 +};
 +
 +static my_bool xarecover_handlerton(THD *unused, plugin_ref plugin,
 +                                    void *arg)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  struct xarecover_st *info= (struct xarecover_st *) arg;
 +  int got;
 +
 +  if (hton->state == SHOW_OPTION_YES && hton->recover)
 +  {
 +    while ((got= hton->recover(hton, info->list, info->len)) > 0 )
 +    {
 +      sql_print_information("Found %d prepared transaction(s) in %s",
 +                            got, hton_name(hton)->str);
 +      for (int i=0; i < got; i ++)
 +      {
 +        my_xid x= WSREP_ON && wsrep_is_wsrep_xid(&info->list[i]) ?
 +                  wsrep_xid_seqno(info->list[i]) :
 +                  info->list[i].get_my_xid();
 +        if (!x) // not "mine" - that is generated by external TM
 +        {
 +#ifndef DBUG_OFF
 +          char buf[XIDDATASIZE*4+6]; // see xid_to_str
 +          sql_print_information("ignore xid %s", xid_to_str(buf, info->list+i));
 +#endif
 +          xid_cache_insert(info->list+i, XA_PREPARED);
 +          info->found_foreign_xids++;
 +          continue;
 +        }
 +        if (info->dry_run)
 +        {
 +          info->found_my_xids++;
 +          continue;
 +        }
 +        // recovery mode
 +        if (info->commit_list ?
 +            my_hash_search(info->commit_list, (uchar *)&x, sizeof(x)) != 0 :
 +            tc_heuristic_recover == TC_HEURISTIC_RECOVER_COMMIT)
 +        {
 +#ifndef DBUG_OFF
 +          char buf[XIDDATASIZE*4+6]; // see xid_to_str
 +          sql_print_information("commit xid %s", xid_to_str(buf, info->list+i));
 +#endif
 +          hton->commit_by_xid(hton, info->list+i);
 +        }
 +        else
 +        {
 +#ifndef DBUG_OFF
 +          char buf[XIDDATASIZE*4+6]; // see xid_to_str
 +          sql_print_information("rollback xid %s",
 +                                xid_to_str(buf, info->list+i));
 +#endif
 +          hton->rollback_by_xid(hton, info->list+i);
 +        }
 +      }
 +      if (got < info->len)
 +        break;
 +    }
 +  }
 +  return FALSE;
 +}
 +
 +int ha_recover(HASH *commit_list)
 +{
 +  struct xarecover_st info;
 +  DBUG_ENTER("ha_recover");
 +  info.found_foreign_xids= info.found_my_xids= 0;
 +  info.commit_list= commit_list;
 +  info.dry_run= (info.commit_list==0 && tc_heuristic_recover==0);
 +  info.list= NULL;
 +
 +  /* commit_list and tc_heuristic_recover cannot be set both */
 +  DBUG_ASSERT(info.commit_list==0 || tc_heuristic_recover==0);
 +  /* if either is set, total_ha_2pc must be set too */
 +  DBUG_ASSERT(info.dry_run || total_ha_2pc>(ulong)opt_bin_log);
 +
 +  if (total_ha_2pc <= (ulong)opt_bin_log)
 +    DBUG_RETURN(0);
 +
 +  if (info.commit_list)
 +    sql_print_information("Starting crash recovery...");
 +
 +  for (info.len= MAX_XID_LIST_SIZE ; 
 +       info.list==0 && info.len > MIN_XID_LIST_SIZE; info.len/=2)
 +  {
 +    info.list=(XID *)my_malloc(info.len*sizeof(XID), MYF(0));
 +  }
 +  if (!info.list)
 +  {
 +    sql_print_error(ER(ER_OUTOFMEMORY),
 +                    static_cast<int>(info.len*sizeof(XID)));
 +    DBUG_RETURN(1);
 +  }
 +
 +  plugin_foreach(NULL, xarecover_handlerton, 
 +                 MYSQL_STORAGE_ENGINE_PLUGIN, &info);
 +
 +  my_free(info.list);
 +  if (info.found_foreign_xids)
 +    sql_print_warning("Found %d prepared XA transactions", 
 +                      info.found_foreign_xids);
 +  if (info.dry_run && info.found_my_xids)
 +  {
 +    sql_print_error("Found %d prepared transactions! It means that mysqld was "
 +                    "not shut down properly last time and critical recovery "
 +                    "information (last binlog or %s file) was manually deleted "
 +                    "after a crash. You have to start mysqld with "
 +                    "--tc-heuristic-recover switch to commit or rollback "
 +                    "pending transactions.",
 +                    info.found_my_xids, opt_tc_log_file);
 +    DBUG_RETURN(1);
 +  }
 +  if (info.commit_list)
 +    sql_print_information("Crash recovery finished.");
 +  DBUG_RETURN(0);
 +}
 +
 +/**
 +  return the list of XID's to a client, the same way SHOW commands do.
 +
 +  @note
 +    I didn't find in XA specs that an RM cannot return the same XID twice,
 +    so mysql_xa_recover does not filter XID's to ensure uniqueness.
 +    It can be easily fixed later, if necessary.
 +*/
 +
 +static my_bool xa_recover_callback(XID_STATE *xs, Protocol *protocol)
 +{
 +  if (xs->xa_state == XA_PREPARED)
 +  {
 +    protocol->prepare_for_resend();
 +    protocol->store_longlong((longlong) xs->xid.formatID, FALSE);
 +    protocol->store_longlong((longlong) xs->xid.gtrid_length, FALSE);
 +    protocol->store_longlong((longlong) xs->xid.bqual_length, FALSE);
 +    protocol->store(xs->xid.data, xs->xid.gtrid_length + xs->xid.bqual_length,
 +                    &my_charset_bin);
 +    if (protocol->write())
 +      return TRUE;
 +  }
 +  return FALSE;
 +}
 +
 +
 +bool mysql_xa_recover(THD *thd)
 +{
 +  List<Item> field_list;
 +  Protocol *protocol= thd->protocol;
 +  MEM_ROOT *mem_root= thd->mem_root;
 +  DBUG_ENTER("mysql_xa_recover");
 +
 +  field_list.push_back(new (mem_root)
 +                       Item_int(thd, "formatID", 0,
 +                                MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
 +  field_list.push_back(new (mem_root)
 +                       Item_int(thd, "gtrid_length", 0,
 +                                MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
 +  field_list.push_back(new (mem_root)
 +                       Item_int(thd, "bqual_length", 0,
 +                                MY_INT32_NUM_DECIMAL_DIGITS), mem_root);
 +  field_list.push_back(new (mem_root)
 +                       Item_empty_string(thd, "data",
 +                                         XIDDATASIZE), mem_root);
 +
 +  if (protocol->send_result_set_metadata(&field_list,
 +                            Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 +    DBUG_RETURN(1);
 +
 +  if (xid_cache_iterate(thd, (my_hash_walk_action) xa_recover_callback,
 +                        protocol))
 +    DBUG_RETURN(1);
 +  my_eof(thd);
 +  DBUG_RETURN(0);
 +}
 +
 +/*
 +  Called by engine to notify TC that a new commit checkpoint has been reached.
 +  See comments on handlerton method commit_checkpoint_request() for details.
 +*/
 +void
 +commit_checkpoint_notify_ha(handlerton *hton, void *cookie)
 +{
 +  tc_log->commit_checkpoint_notify(cookie);
 +}
 +
 +
 +/**
 +  @details
 +  This function should be called when MySQL sends rows of a SELECT result set
 +  or the EOF mark to the client. It releases a possible adaptive hash index
 +  S-latch held by thd in InnoDB and also releases a possible InnoDB query
 +  FIFO ticket to enter InnoDB. To save CPU time, InnoDB allows a thd to
 +  keep them over several calls of the InnoDB handler interface when a join
 +  is executed. But when we let the control to pass to the client they have
 +  to be released because if the application program uses mysql_use_result(),
 +  it may deadlock on the S-latch if the application on another connection
 +  performs another SQL query. In MySQL-4.1 this is even more important because
 +  there a connection can have several SELECT queries open at the same time.
 +
 +  @param thd           the thread handle of the current connection
 +
 +  @return
 +    always 0
 +*/
 +
 +int ha_release_temporary_latches(THD *thd)
 +{
 +  Ha_trx_info *info;
 +
 +  /*
 +    Note that below we assume that only transactional storage engines
 +    may need release_temporary_latches(). If this will ever become false,
 +    we could iterate on thd->open_tables instead (and remove duplicates
 +    as if (!seen[hton->slot]) { seen[hton->slot]=1; ... }).
 +  */
 +  for (info= thd->transaction.stmt.ha_list; info; info= info->next())
 +  {
 +    handlerton *hton= info->ht();
 +    if (hton && hton->release_temporary_latches)
 +        hton->release_temporary_latches(hton, thd);
 +  }
 +  return 0;
 +}
 +
 +/**
 +  Check if all storage engines used in transaction agree that after
 +  rollback to savepoint it is safe to release MDL locks acquired after
 +  savepoint creation.
 +
 +  @param thd   The client thread that executes the transaction.
 +
 +  @return true  - It is safe to release MDL locks.
 +          false - If it is not.
 +*/
 +bool ha_rollback_to_savepoint_can_release_mdl(THD *thd)
 +{
 +  Ha_trx_info *ha_info;
 +  THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt :
 +                                        &thd->transaction.all);
 +
 +  DBUG_ENTER("ha_rollback_to_savepoint_can_release_mdl");
 +
 +  /**
 +    Checking whether it is safe to release metadata locks after rollback to
 +    savepoint in all the storage engines that are part of the transaction.
 +  */
 +  for (ha_info= trans->ha_list; ha_info; ha_info= ha_info->next())
 +  {
 +    handlerton *ht= ha_info->ht();
 +    DBUG_ASSERT(ht);
 +
 +    if (ht->savepoint_rollback_can_release_mdl == 0 ||
 +        ht->savepoint_rollback_can_release_mdl(ht, thd) == false)
 +      DBUG_RETURN(false);
 +  }
 +
 +  DBUG_RETURN(true);
 +}
 +
 +int ha_rollback_to_savepoint(THD *thd, SAVEPOINT *sv)
 +{
 +  int error=0;
 +  THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt :
 +                                        &thd->transaction.all);
 +  Ha_trx_info *ha_info, *ha_info_next;
 +
 +  DBUG_ENTER("ha_rollback_to_savepoint");
 +
 +  trans->no_2pc=0;
 +  /*
 +    rolling back to savepoint in all storage engines that were part of the
 +    transaction when the savepoint was set
 +  */
 +  for (ha_info= sv->ha_list; ha_info; ha_info= ha_info->next())
 +  {
 +    int err;
 +    handlerton *ht= ha_info->ht();
 +    DBUG_ASSERT(ht);
 +    DBUG_ASSERT(ht->savepoint_set != 0);
 +    if ((err= ht->savepoint_rollback(ht, thd,
 +                                     (uchar *)(sv+1)+ht->savepoint_offset)))
 +    { // cannot happen
 +      my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err);
 +      error=1;
 +    }
 +    status_var_increment(thd->status_var.ha_savepoint_rollback_count);
 +    trans->no_2pc|= ht->prepare == 0;
 +  }
 +  /*
 +    rolling back the transaction in all storage engines that were not part of
 +    the transaction when the savepoint was set
 +  */
 +  for (ha_info= trans->ha_list; ha_info != sv->ha_list;
 +       ha_info= ha_info_next)
 +  {
 +    int err;
 +    handlerton *ht= ha_info->ht();
 +    if ((err= ht->rollback(ht, thd, !thd->in_sub_stmt)))
 +    { // cannot happen
 +      my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err);
 +      error=1;
 +    }
 +    status_var_increment(thd->status_var.ha_rollback_count);
 +    ha_info_next= ha_info->next();
 +    ha_info->reset(); /* keep it conveniently zero-filled */
 +  }
 +  trans->ha_list= sv->ha_list;
 +  DBUG_RETURN(error);
 +}
 +
 +/**
 +  @note
 +  according to the sql standard (ISO/IEC 9075-2:2003)
 +  section "4.33.4 SQL-statements and transaction states",
 +  SAVEPOINT is *not* transaction-initiating SQL-statement
 +*/
 +int ha_savepoint(THD *thd, SAVEPOINT *sv)
 +{
 +  int error=0;
 +  THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt :
 +                                        &thd->transaction.all);
 +  Ha_trx_info *ha_info= trans->ha_list;
 +  DBUG_ENTER("ha_savepoint");
 +
 +  for (; ha_info; ha_info= ha_info->next())
 +  {
 +    int err;
 +    handlerton *ht= ha_info->ht();
 +    DBUG_ASSERT(ht);
 +    if (! ht->savepoint_set)
 +    {
 +      my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "SAVEPOINT");
 +      error=1;
 +      break;
 +    }
 +    if ((err= ht->savepoint_set(ht, thd, (uchar *)(sv+1)+ht->savepoint_offset)))
 +    { // cannot happen
 +      my_error(ER_GET_ERRNO, MYF(0), err, hton_name(ht)->str);
 +      error=1;
 +    }
 +    status_var_increment(thd->status_var.ha_savepoint_count);
 +  }
 +  /*
 +    Remember the list of registered storage engines. All new
 +    engines are prepended to the beginning of the list.
 +  */
 +  sv->ha_list= trans->ha_list;
 +
 +  DBUG_RETURN(error);
 +}
 +
 +int ha_release_savepoint(THD *thd, SAVEPOINT *sv)
 +{
 +  int error=0;
 +  Ha_trx_info *ha_info= sv->ha_list;
 +  DBUG_ENTER("ha_release_savepoint");
 +
 +  for (; ha_info; ha_info= ha_info->next())
 +  {
 +    int err;
 +    handlerton *ht= ha_info->ht();
 +    /* Savepoint life time is enclosed into transaction life time. */
 +    DBUG_ASSERT(ht);
 +    if (!ht->savepoint_release)
 +      continue;
 +    if ((err= ht->savepoint_release(ht, thd,
 +                                    (uchar *)(sv+1) + ht->savepoint_offset)))
 +    { // cannot happen
 +      my_error(ER_GET_ERRNO, MYF(0), err, hton_name(ht)->str);
 +      error=1;
 +    }
 +  }
 +  DBUG_RETURN(error);
 +}
 +
 +
 +static my_bool snapshot_handlerton(THD *thd, plugin_ref plugin,
 +                                   void *arg)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES &&
 +      hton->start_consistent_snapshot)
 +  {
 +    hton->start_consistent_snapshot(hton, thd);
 +    *((bool *)arg)= false;
 +  }
 +  return FALSE;
 +}
 +
 +int ha_start_consistent_snapshot(THD *thd)
 +{
 +  bool warn= true;
 +
 +  /*
 +    Holding the LOCK_commit_ordered mutex ensures that we get the same
 +    snapshot for all engines (including the binary log).  This allows us
 +    among other things to do backups with
 +    START TRANSACTION WITH CONSISTENT SNAPSHOT and
 +    have a consistent binlog position.
 +  */
 +  mysql_mutex_lock(&LOCK_commit_ordered);
 +  plugin_foreach(thd, snapshot_handlerton, MYSQL_STORAGE_ENGINE_PLUGIN, &warn);
 +  mysql_mutex_unlock(&LOCK_commit_ordered);
 +
 +  /*
 +    Same idea as when one wants to CREATE TABLE in one engine which does not
 +    exist:
 +  */
 +  if (warn)
 +    push_warning(thd, Sql_condition::WARN_LEVEL_WARN, ER_UNKNOWN_ERROR,
 +                 "This MySQL server does not support any "
 +                 "consistent-read capable storage engine");
 +  return 0;
 +}
 +
 +
 +static my_bool flush_handlerton(THD *thd, plugin_ref plugin,
 +                                void *arg)
 +{
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->flush_logs && 
 +      hton->flush_logs(hton))
 +    return TRUE;
 +  return FALSE;
 +}
 +
 +
 +bool ha_flush_logs(handlerton *db_type)
 +{
 +  if (db_type == NULL)
 +  {
 +    if (plugin_foreach(NULL, flush_handlerton,
 +                          MYSQL_STORAGE_ENGINE_PLUGIN, 0))
 +      return TRUE;
 +  }
 +  else
 +  {
 +    if (db_type->state != SHOW_OPTION_YES ||
 +        (db_type->flush_logs && db_type->flush_logs(db_type)))
 +      return TRUE;
 +  }
 +  return FALSE;
 +}
 +
 +
 +/**
 +  @brief make canonical filename
 +
 +  @param[in]  file     table handler
 +  @param[in]  path     original path
 +  @param[out] tmp_path buffer for canonized path
 +
 +  @details Lower case db name and table name path parts for
 +           non file based tables when lower_case_table_names
 +           is 2 (store as is, compare in lower case).
 +           Filesystem path prefix (mysql_data_home or tmpdir)
 +           is left intact.
 +
 +  @note tmp_path may be left intact if no conversion was
 +        performed.
 +
 +  @retval canonized path
 +
 +  @todo This may be done more efficiently when table path
 +        gets built. Convert this function to something like
 +        ASSERT_CANONICAL_FILENAME.
 +*/
 +const char *get_canonical_filename(handler *file, const char *path,
 +                                   char *tmp_path)
 +{
 +  uint i;
 +  if (lower_case_table_names != 2 || (file->ha_table_flags() & HA_FILE_BASED))
 +    return path;
 +
 +  for (i= 0; i <= mysql_tmpdir_list.max; i++)
 +  {
 +    if (is_prefix(path, mysql_tmpdir_list.list[i]))
 +      return path;
 +  }
 +
 +  /* Ensure that table handler get path in lower case */
 +  if (tmp_path != path)
 +    strmov(tmp_path, path);
 +
 +  /*
 +    we only should turn into lowercase database/table part
 +    so start the process after homedirectory
 +  */
 +  my_casedn_str(files_charset_info, tmp_path + mysql_data_home_len);
 +  return tmp_path;
 +}
 +
 +
 +/** delete a table in the engine
 +
 +  @note
 +  ENOENT and HA_ERR_NO_SUCH_TABLE are not considered errors.
 +  The .frm file will be deleted only if we return 0.
 +*/
 +int ha_delete_table(THD *thd, handlerton *table_type, const char *path,
 +                    const char *db, const char *alias, bool generate_warning)
 +{
 +  handler *file;
 +  char tmp_path[FN_REFLEN];
 +  int error;
 +  TABLE dummy_table;
 +  TABLE_SHARE dummy_share;
 +  DBUG_ENTER("ha_delete_table");
 +
 +  /* table_type is NULL in ALTER TABLE when renaming only .frm files */
 +  if (table_type == NULL || table_type == view_pseudo_hton ||
 +      ! (file=get_new_handler((TABLE_SHARE*)0, thd->mem_root, table_type)))
 +    DBUG_RETURN(0);
 +
 +  bzero((char*) &dummy_table, sizeof(dummy_table));
 +  bzero((char*) &dummy_share, sizeof(dummy_share));
 +  dummy_table.s= &dummy_share;
 +
 +  path= get_canonical_filename(file, path, tmp_path);
 +  if ((error= file->ha_delete_table(path)))
 +  {
 +    /*
 +      it's not an error if the table doesn't exist in the engine.
 +      warn the user, but still report DROP being a success
 +    */
 +    bool intercept= error == ENOENT || error == HA_ERR_NO_SUCH_TABLE;
 +
 +    if (!intercept || generate_warning)
 +    {
 +      /* Fill up strucutures that print_error may need */
 +      dummy_share.path.str= (char*) path;
 +      dummy_share.path.length= strlen(path);
 +      dummy_share.normalized_path= dummy_share.path;
 +      dummy_share.db.str= (char*) db;
 +      dummy_share.db.length= strlen(db);
 +      dummy_share.table_name.str= (char*) alias;
 +      dummy_share.table_name.length= strlen(alias);
 +      dummy_table.alias.set(alias, dummy_share.table_name.length,
 +                            table_alias_charset);
 +      file->change_table_ptr(&dummy_table, &dummy_share);
 +      file->print_error(error, MYF(intercept ? ME_JUST_WARNING : 0));
 +    }
 +    if (intercept)
 +      error= 0;
 +  }
 +  delete file;
 +
 +  DBUG_RETURN(error);
 +}
 +
 +/****************************************************************************
 +** General handler functions
 +****************************************************************************/
 +handler *handler::clone(const char *name, MEM_ROOT *mem_root)
 +{
 +  handler *new_handler= get_new_handler(table->s, mem_root, ht);
 +
 +  if (!new_handler)
 +    return NULL;
 +  if (new_handler->set_ha_share_ref(ha_share))
 +    goto err;
 +
 +  /*
 +    Allocate handler->ref here because otherwise ha_open will allocate it
 +    on this->table->mem_root and we will not be able to reclaim that memory 
 +    when the clone handler object is destroyed.
 +  */
 +
 +  if (!(new_handler->ref= (uchar*) alloc_root(mem_root,
 +                                              ALIGN_SIZE(ref_length)*2)))
 +    goto err;
 +
 +  /*
 +    TODO: Implement a more efficient way to have more than one index open for
 +    the same table instance. The ha_open call is not cachable for clone.
 +
 +    This is not critical as the engines already have the table open
 +    and should be able to use the original instance of the table.
 +  */
 +  if (new_handler->ha_open(table, name, table->db_stat,
 +                           HA_OPEN_IGNORE_IF_LOCKED))
 +    goto err;
 +
 +  return new_handler;
 +
 +err:
 +  delete new_handler;
 +  return NULL;
 +}
 +
 +
 +double handler::keyread_time(uint index, uint ranges, ha_rows rows)
 +{
 +  /*
 +    It is assumed that we will read trough the whole key range and that all
 +    key blocks are half full (normally things are much better). It is also
 +    assumed that each time we read the next key from the index, the handler
 +    performs a random seek, thus the cost is proportional to the number of
 +    blocks read. This model does not take into account clustered indexes -
 +    engines that support that (e.g. InnoDB) may want to overwrite this method.
 +    The model counts in the time to read index entries from cache.
 +  */
 +  ulong len= table->key_info[index].key_length + ref_length;
 +  if (index == table->s->primary_key && table->file->primary_key_is_clustered())
 +    len= table->s->stored_rec_length;
 +  double keys_per_block= (stats.block_size/2.0/len+1);
 +  return (rows + keys_per_block-1)/ keys_per_block +
 +         len*rows/(stats.block_size+1)/TIME_FOR_COMPARE ;
 +}
 +
 +void **handler::ha_data(THD *thd) const
 +{
 +  return thd_ha_data(thd, ht);
 +}
 +
 +THD *handler::ha_thd(void) const
 +{
 +  DBUG_ASSERT(!table || !table->in_use || table->in_use == current_thd);
 +  return (table && table->in_use) ? table->in_use : current_thd;
 +}
 +
 +void handler::unbind_psi()
 +{
 +  /*
 +    Notify the instrumentation that this table is not owned
 +    by this thread any more.
 +  */
 +  PSI_CALL_unbind_table(m_psi);
 +}
 +
 +void handler::rebind_psi()
 +{
 +  /*
 +    Notify the instrumentation that this table is now owned
 +    by this thread.
 +  */
 +  m_psi= PSI_CALL_rebind_table(ha_table_share_psi(), this, m_psi);
 +}
 +
 +
 +PSI_table_share *handler::ha_table_share_psi() const
 +{
 +  return table_share->m_psi;
 +}
 +
 +/** @brief
 +  Open database-handler.
 +
 +  IMPLEMENTATION
 +    Try O_RDONLY if cannot open as O_RDWR
 +    Don't wait for locks if not HA_OPEN_WAIT_IF_LOCKED is set
 +*/
 +int handler::ha_open(TABLE *table_arg, const char *name, int mode,
 +                     uint test_if_locked)
 +{
 +  int error;
 +  DBUG_ENTER("handler::ha_open");
 +  DBUG_PRINT("enter",
 +             ("name: %s  db_type: %d  db_stat: %d  mode: %d  lock_test: %d",
 +              name, ht->db_type, table_arg->db_stat, mode,
 +              test_if_locked));
 +
 +  table= table_arg;
 +  DBUG_ASSERT(table->s == table_share);
 +  DBUG_ASSERT(m_lock_type == F_UNLCK);
 +  DBUG_PRINT("info", ("old m_lock_type: %d F_UNLCK %d", m_lock_type, F_UNLCK));
 +  DBUG_ASSERT(alloc_root_inited(&table->mem_root));
 +
 +  if ((error=open(name,mode,test_if_locked)))
 +  {
 +    if ((error == EACCES || error == EROFS) && mode == O_RDWR &&
 +	(table->db_stat & HA_TRY_READ_ONLY))
 +    {
 +      table->db_stat|=HA_READ_ONLY;
 +      error=open(name,O_RDONLY,test_if_locked);
 +    }
 +  }
 +  if (error)
 +  {
 +    my_errno= error;                            /* Safeguard */
 +    DBUG_PRINT("error",("error: %d  errno: %d",error,errno));
 +  }
 +  else
 +  {
 +    DBUG_ASSERT(m_psi == NULL);
 +    DBUG_ASSERT(table_share != NULL);
 +    /*
 +      Do not call this for partitions handlers, since it may take too much
 +      resources.
 +      So only use the m_psi on table level, not for individual partitions.
 +    */
 +    if (!(test_if_locked & HA_OPEN_NO_PSI_CALL))
 +    {
 +      m_psi= PSI_CALL_open_table(ha_table_share_psi(), this);
 +    }
 +
 +    if (table->s->db_options_in_use & HA_OPTION_READ_ONLY_DATA)
 +      table->db_stat|=HA_READ_ONLY;
 +    (void) extra(HA_EXTRA_NO_READCHECK);	// Not needed in SQL
 +
 +    /* ref is already allocated for us if we're called from handler::clone() */
 +    if (!ref && !(ref= (uchar*) alloc_root(&table->mem_root, 
 +                                          ALIGN_SIZE(ref_length)*2)))
 +    {
 +      ha_close();
 +      error=HA_ERR_OUT_OF_MEM;
 +    }
 +    else
 +      dup_ref=ref+ALIGN_SIZE(ref_length);
 +    cached_table_flags= table_flags();
 +  }
 +  reset_statistics();
 +  internal_tmp_table= MY_TEST(test_if_locked & HA_OPEN_INTERNAL_TABLE);
 +  DBUG_RETURN(error);
 +}
 +
 +int handler::ha_close(void)
 +{
 +  DBUG_ENTER("ha_close");
 +  /*
 +    Increment global statistics for temporary tables.
 +    In_use is 0 for tables that was closed from the table cache.
 +  */
 +  if (table->in_use)
 +    status_var_add(table->in_use->status_var.rows_tmp_read, rows_tmp_read);
 +  PSI_CALL_close_table(m_psi);
 +  m_psi= NULL; /* instrumentation handle, invalid after close_table() */
 +
 +  /* Detach from ANALYZE tracker */
 +  tracker= NULL;
 +  
 +  DBUG_ASSERT(m_lock_type == F_UNLCK);
 +  DBUG_ASSERT(inited == NONE);
 +  DBUG_RETURN(close());
 +}
 +
 +
 +int handler::ha_rnd_next(uchar *buf)
 +{
 +  int result;
 +  DBUG_ENTER("handler::ha_rnd_next");
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(inited == RND);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, MAX_KEY, 0,
 +    { result= rnd_next(buf); })
 +  if (!result)
 +  {
 +    update_rows_read();
 +    increment_statistics(&SSV::ha_read_rnd_next_count);
 +  }
 +  else if (result == HA_ERR_RECORD_DELETED)
 +    increment_statistics(&SSV::ha_read_rnd_deleted_count);
 +  else
 +    increment_statistics(&SSV::ha_read_rnd_next_count);
 +
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  DBUG_RETURN(result);
 +}
 +
 +int handler::ha_rnd_pos(uchar *buf, uchar *pos)
 +{
 +  int result;
 +  DBUG_ENTER("handler::ha_rnd_pos");
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  /* TODO: Find out how to solve ha_rnd_pos when finding duplicate update. */
 +  /* DBUG_ASSERT(inited == RND); */
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, MAX_KEY, 0,
 +    { result= rnd_pos(buf, pos); })
 +  increment_statistics(&SSV::ha_read_rnd_count);
 +  if (!result)
 +    update_rows_read();
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  DBUG_RETURN(result);
 +}
 +
 +int handler::ha_index_read_map(uchar *buf, const uchar *key,
 +                                      key_part_map keypart_map,
 +                                      enum ha_rkey_function find_flag)
 +{
 +  int result;
 +  DBUG_ENTER("handler::ha_index_read_map");
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(inited==INDEX);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
 +    { result= index_read_map(buf, key, keypart_map, find_flag); })
 +  increment_statistics(&SSV::ha_read_key_count);
 +  if (!result)
 +    update_index_statistics();
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  DBUG_RETURN(result);
 +}
 +
 +/*
 +  @note: Other index lookup/navigation functions require prior
 +  handler->index_init() call. This function is different, it requires
 +  that the scan is not initialized, and accepts "uint index" as an argument.
 +*/
 +
 +int handler::ha_index_read_idx_map(uchar *buf, uint index, const uchar *key,
 +                                          key_part_map keypart_map,
 +                                          enum ha_rkey_function find_flag)
 +{
 +  int result;
 +  DBUG_ASSERT(inited==NONE);
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(end_range == NULL);
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, index, 0,
 +    { result= index_read_idx_map(buf, index, key, keypart_map, find_flag); })
 +  increment_statistics(&SSV::ha_read_key_count);
 +  if (!result)
 +  {
 +    update_rows_read();
 +    index_rows_read[index]++;
 +  }
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  return result;
 +}
 +
 +int handler::ha_index_next(uchar * buf)
 +{
 +  int result;
 +  DBUG_ENTER("handler::ha_index_next");
 + DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(inited==INDEX);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
 +    { result= index_next(buf); })
 +  increment_statistics(&SSV::ha_read_next_count);
 +  if (!result)
 +    update_index_statistics();
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  DBUG_RETURN(result);
 +}
 +
 +int handler::ha_index_prev(uchar * buf)
 +{
 +  int result;
 +  DBUG_ENTER("handler::ha_index_prev");
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(inited==INDEX);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
 +    { result= index_prev(buf); })
 +  increment_statistics(&SSV::ha_read_prev_count);
 +  if (!result)
 +    update_index_statistics();
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  DBUG_RETURN(result);
 +}
 +
 +int handler::ha_index_first(uchar * buf)
 +{
 +  int result;
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(inited==INDEX);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
 +    { result= index_first(buf); })
 +  increment_statistics(&SSV::ha_read_first_count);
 +  if (!result)
 +    update_index_statistics();
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  return result;
 +}
 +
 +int handler::ha_index_last(uchar * buf)
 +{
 +  int result;
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(inited==INDEX);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
 +    { result= index_last(buf); })
 +  increment_statistics(&SSV::ha_read_last_count);
 +  if (!result)
 +    update_index_statistics();
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  return result;
 +}
 +
 +int handler::ha_index_next_same(uchar *buf, const uchar *key, uint keylen)
 +{
 +  int result;
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ASSERT(inited==INDEX);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_FETCH_ROW, active_index, 0,
 +    { result= index_next_same(buf, key, keylen); })
 +  increment_statistics(&SSV::ha_read_next_count);
 +  if (!result)
 +    update_index_statistics();
 +  table->status=result ? STATUS_NOT_FOUND: 0;
 +  return result;
 +}
 +
 +/* Initialize handler for random reading, with error handling */
 +
 +int handler::ha_rnd_init_with_error(bool scan)
 +{
 +  int error;
 +  if (!(error= ha_rnd_init(scan)))
 +    return 0;
 +  table->file->print_error(error, MYF(0));
 +  return error;
 +}
 +
 +
 +/**
 +  Read first row (only) from a table.
 +
 +  This is never called for InnoDB tables, as these table types
 +  has the HA_STATS_RECORDS_IS_EXACT set.
 +*/
 +int handler::read_first_row(uchar * buf, uint primary_key)
 +{
 +  register int error;
 +  DBUG_ENTER("handler::read_first_row");
 +
 +  /*
 +    If there is very few deleted rows in the table, find the first row by
 +    scanning the table.
 +    TODO remove the test for HA_READ_ORDER
 +  */
 +  if (stats.deleted < 10 || primary_key >= MAX_KEY ||
 +      !(index_flags(primary_key, 0, 0) & HA_READ_ORDER))
 +  {
 +    if (!(error= ha_rnd_init(1)))
 +    {
 +      while ((error= ha_rnd_next(buf)) == HA_ERR_RECORD_DELETED)
 +        /* skip deleted row */;
 +      const int end_error= ha_rnd_end();
 +      if (!error)
 +        error= end_error;
 +    }
 +  }
 +  else
 +  {
 +    /* Find the first row through the primary key */
 +    if (!(error= ha_index_init(primary_key, 0)))
 +    {
 +      error= ha_index_first(buf);
 +      const int end_error= ha_index_end();
 +      if (!error)
 +        error= end_error;
 +    }
 +  }
 +  DBUG_RETURN(error);
 +}
 +
 +/**
 +  Generate the next auto-increment number based on increment and offset.
 +  computes the lowest number
 +  - strictly greater than "nr"
 +  - of the form: auto_increment_offset + N * auto_increment_increment
 +  If overflow happened then return MAX_ULONGLONG value as an
 +  indication of overflow.
 +  In most cases increment= offset= 1, in which case we get:
 +  @verbatim 1,2,3,4,5,... @endverbatim
 +    If increment=10 and offset=5 and previous number is 1, we get:
 +  @verbatim 1,5,15,25,35,... @endverbatim
 +*/
 +inline ulonglong
 +compute_next_insert_id(ulonglong nr,struct system_variables *variables)
 +{
 +  const ulonglong save_nr= nr;
 +
 +  if (variables->auto_increment_increment == 1)
 +    nr= nr + 1; // optimization of the formula below
 +  else
 +  {
 +    nr= (((nr+ variables->auto_increment_increment -
 +           variables->auto_increment_offset)) /
 +         (ulonglong) variables->auto_increment_increment);
 +    nr= (nr* (ulonglong) variables->auto_increment_increment +
 +         variables->auto_increment_offset);
 +  }
 +
 +  if (unlikely(nr <= save_nr))
 +    return ULONGLONG_MAX;
 +
 +  return nr;
 +}
 +
 +
 +void handler::adjust_next_insert_id_after_explicit_value(ulonglong nr)
 +{
 +  /*
 +    If we have set THD::next_insert_id previously and plan to insert an
 +    explicitly-specified value larger than this, we need to increase
 +    THD::next_insert_id to be greater than the explicit value.
 +  */
 +  if ((next_insert_id > 0) && (nr >= next_insert_id))
 +    set_next_insert_id(compute_next_insert_id(nr, &table->in_use->variables));
 +}
 +
 +
 +/** @brief
 +  Computes the largest number X:
 +  - smaller than or equal to "nr"
 +  - of the form: auto_increment_offset + N * auto_increment_increment
 +  where N>=0.
 +
 +  SYNOPSIS
 +    prev_insert_id
 +      nr            Number to "round down"
 +      variables     variables struct containing auto_increment_increment and
 +                    auto_increment_offset
 +
 +  RETURN
 +    The number X if it exists, "nr" otherwise.
 +*/
 +inline ulonglong
 +prev_insert_id(ulonglong nr, struct system_variables *variables)
 +{
 +  if (unlikely(nr < variables->auto_increment_offset))
 +  {
 +    /*
 +      There's nothing good we can do here. That is a pathological case, where
 +      the offset is larger than the column's max possible value, i.e. not even
 +      the first sequence value may be inserted. User will receive warning.
 +    */
 +    DBUG_PRINT("info",("auto_increment: nr: %lu cannot honour "
 +                       "auto_increment_offset: %lu",
 +                       (ulong) nr, variables->auto_increment_offset));
 +    return nr;
 +  }
 +  if (variables->auto_increment_increment == 1)
 +    return nr; // optimization of the formula below
 +  nr= (((nr - variables->auto_increment_offset)) /
 +       (ulonglong) variables->auto_increment_increment);
 +  return (nr * (ulonglong) variables->auto_increment_increment +
 +          variables->auto_increment_offset);
 +}
 +
 +
 +/**
 +  Update the auto_increment field if necessary.
 +
 +  Updates columns with type NEXT_NUMBER if:
 +
 +  - If column value is set to NULL (in which case
 +    auto_increment_field_not_null is 0)
 +  - If column is set to 0 and (sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO) is not
 +    set. In the future we will only set NEXT_NUMBER fields if one sets them
 +    to NULL (or they are not included in the insert list).
 +
 +    In those cases, we check if the currently reserved interval still has
 +    values we have not used. If yes, we pick the smallest one and use it.
 +    Otherwise:
 +
 +  - If a list of intervals has been provided to the statement via SET
 +    INSERT_ID or via an Intvar_log_event (in a replication slave), we pick the
 +    first unused interval from this list, consider it as reserved.
 +
 +  - Otherwise we set the column for the first row to the value
 +    next_insert_id(get_auto_increment(column))) which is usually
 +    max-used-column-value+1.
 +    We call get_auto_increment() for the first row in a multi-row
 +    statement. get_auto_increment() will tell us the interval of values it
 +    reserved for us.
 +
 +  - In both cases, for the following rows we use those reserved values without
 +    calling the handler again (we just progress in the interval, computing
 +    each new value from the previous one). Until we have exhausted them, then
 +    we either take the next provided interval or call get_auto_increment()
 +    again to reserve a new interval.
 +
 +  - In both cases, the reserved intervals are remembered in
 +    thd->auto_inc_intervals_in_cur_stmt_for_binlog if statement-based
 +    binlogging; the last reserved interval is remembered in
 +    auto_inc_interval_for_cur_row. The number of reserved intervals is
 +    remembered in auto_inc_intervals_count. It differs from the number of
 +    elements in thd->auto_inc_intervals_in_cur_stmt_for_binlog() because the
 +    latter list is cumulative over all statements forming one binlog event
 +    (when stored functions and triggers are used), and collapses two
 +    contiguous intervals in one (see its append() method).
 +
 +    The idea is that generated auto_increment values are predictable and
 +    independent of the column values in the table.  This is needed to be
 +    able to replicate into a table that already has rows with a higher
 +    auto-increment value than the one that is inserted.
 +
 +    After we have already generated an auto-increment number and the user
 +    inserts a column with a higher value than the last used one, we will
 +    start counting from the inserted value.
 +
 +    This function's "outputs" are: the table's auto_increment field is filled
 +    with a value, thd->next_insert_id is filled with the value to use for the
 +    next row, if a value was autogenerated for the current row it is stored in
 +    thd->insert_id_for_cur_row, if get_auto_increment() was called
 +    thd->auto_inc_interval_for_cur_row is modified, if that interval is not
 +    present in thd->auto_inc_intervals_in_cur_stmt_for_binlog it is added to
 +    this list.
 +
 +  @todo
 +    Replace all references to "next number" or NEXT_NUMBER to
 +    "auto_increment", everywhere (see below: there is
 +    table->auto_increment_field_not_null, and there also exists
 +    table->next_number_field, it's not consistent).
 +
 +  @retval
 +    0	ok
 +  @retval
 +    HA_ERR_AUTOINC_READ_FAILED  get_auto_increment() was called and
 +    returned ~(ulonglong) 0
 +  @retval
 +    HA_ERR_AUTOINC_ERANGE storing value in field caused strict mode
 +    failure.
 +*/
 +
 +#define AUTO_INC_DEFAULT_NB_ROWS 1 // Some prefer 1024 here
 +#define AUTO_INC_DEFAULT_NB_MAX_BITS 16
 +#define AUTO_INC_DEFAULT_NB_MAX ((1 << AUTO_INC_DEFAULT_NB_MAX_BITS) - 1)
 +
 +int handler::update_auto_increment()
 +{
 +  ulonglong nr, nb_reserved_values;
 +  bool append= FALSE;
 +  THD *thd= table->in_use;
 +  struct system_variables *variables= &thd->variables;
 +  int result=0, tmp;
 +  enum enum_check_fields save_count_cuted_fields;
 +  DBUG_ENTER("handler::update_auto_increment");
 +
 +  /*
 +    next_insert_id is a "cursor" into the reserved interval, it may go greater
 +    than the interval, but not smaller.
 +  */
 +  DBUG_ASSERT(next_insert_id >= auto_inc_interval_for_cur_row.minimum());
 +
 +  if ((nr= table->next_number_field->val_int()) != 0 ||
 +      (table->auto_increment_field_not_null &&
 +       thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO))
 +  {
 +    /*
 +      Update next_insert_id if we had already generated a value in this
 +      statement (case of INSERT VALUES(null),(3763),(null):
 +      the last NULL needs to insert 3764, not the value of the first NULL plus
 +      1).
 +      Ignore negative values.
 +    */
 +    if ((longlong) nr > 0 || (table->next_number_field->flags & UNSIGNED_FLAG))
 +      adjust_next_insert_id_after_explicit_value(nr);
 +    insert_id_for_cur_row= 0; // didn't generate anything
 +    DBUG_RETURN(0);
 +  }
 +
 +  if ((nr= next_insert_id) >= auto_inc_interval_for_cur_row.maximum())
 +  {
 +    /* next_insert_id is beyond what is reserved, so we reserve more. */
 +    const Discrete_interval *forced=
 +      thd->auto_inc_intervals_forced.get_next();
 +    if (forced != NULL)
 +    {
 +      nr= forced->minimum();
 +      nb_reserved_values= forced->values();
 +    }
 +    else
 +    {
 +      /*
 +        handler::estimation_rows_to_insert was set by
 +        handler::ha_start_bulk_insert(); if 0 it means "unknown".
 +      */
 +      ulonglong nb_desired_values;
 +      /*
 +        If an estimation was given to the engine:
 +        - use it.
 +        - if we already reserved numbers, it means the estimation was
 +        not accurate, then we'll reserve 2*AUTO_INC_DEFAULT_NB_ROWS the 2nd
 +        time, twice that the 3rd time etc.
 +        If no estimation was given, use those increasing defaults from the
 +        start, starting from AUTO_INC_DEFAULT_NB_ROWS.
 +        Don't go beyond a max to not reserve "way too much" (because
 +        reservation means potentially losing unused values).
 +        Note that in prelocked mode no estimation is given.
 +      */
 +
 +      if ((auto_inc_intervals_count == 0) && (estimation_rows_to_insert > 0))
 +        nb_desired_values= estimation_rows_to_insert;
 +      else if ((auto_inc_intervals_count == 0) &&
 +               (thd->lex->many_values.elements > 0))
 +      {
 +        /*
 +          For multi-row inserts, if the bulk inserts cannot be started, the
 +          handler::estimation_rows_to_insert will not be set. But we still
 +          want to reserve the autoinc values.
 +        */
 +        nb_desired_values= thd->lex->many_values.elements;
 +      }
 +      else /* go with the increasing defaults */
 +      {
 +        /* avoid overflow in formula, with this if() */
 +        if (auto_inc_intervals_count <= AUTO_INC_DEFAULT_NB_MAX_BITS)
 +        {
 +          nb_desired_values= AUTO_INC_DEFAULT_NB_ROWS *
 +            (1 << auto_inc_intervals_count);
 +          set_if_smaller(nb_desired_values, AUTO_INC_DEFAULT_NB_MAX);
 +        }
 +        else
 +          nb_desired_values= AUTO_INC_DEFAULT_NB_MAX;
 +      }
 +      get_auto_increment(variables->auto_increment_offset,
 +                         variables->auto_increment_increment,
 +                         nb_desired_values, &nr,
 +                         &nb_reserved_values);
 +      if (nr == ULONGLONG_MAX)
 +        DBUG_RETURN(HA_ERR_AUTOINC_READ_FAILED);  // Mark failure
 +
 +      /*
 +        That rounding below should not be needed when all engines actually
 +        respect offset and increment in get_auto_increment(). But they don't
 +        so we still do it. Wonder if for the not-first-in-index we should do
 +        it. Hope that this rounding didn't push us out of the interval; even
 +        if it did we cannot do anything about it (calling the engine again
 +        will not help as we inserted no row).
 +      */
 +      nr= compute_next_insert_id(nr-1, variables);
 +    }
 +
 +    if (table->s->next_number_keypart == 0)
 +    {
 +      /* We must defer the appending until "nr" has been possibly truncated */
 +      append= TRUE;
 +    }
 +    else
 +    {
 +      /*
 +        For such auto_increment there is no notion of interval, just a
 +        singleton. The interval is not even stored in
 +        thd->auto_inc_interval_for_cur_row, so we are sure to call the engine
 +        for next row.
 +      */
 +      DBUG_PRINT("info",("auto_increment: special not-first-in-index"));
 +    }
 +  }
 +
 +  if (unlikely(nr == ULONGLONG_MAX))
 +      DBUG_RETURN(HA_ERR_AUTOINC_ERANGE);
 +
 +  DBUG_ASSERT(nr != 0);
 +  DBUG_PRINT("info",("auto_increment: %llu  nb_reserved_values: %llu",
 +                     nr, append ? nb_reserved_values : 0));
 +
 +  /* Store field without warning (Warning will be printed by insert) */
 +  save_count_cuted_fields= thd->count_cuted_fields;
 +  thd->count_cuted_fields= CHECK_FIELD_IGNORE;
 +  tmp= table->next_number_field->store((longlong) nr, TRUE);
 +  thd->count_cuted_fields= save_count_cuted_fields;
 +
 +  if (unlikely(tmp))                            // Out of range value in store
 +  {
 +    /*
 +      It's better to return an error here than getting a confusing
 +      'duplicate key error' later.
 +    */
 +    result= HA_ERR_AUTOINC_ERANGE;
 +  }
 +  if (append)
 +  {
 +    auto_inc_interval_for_cur_row.replace(nr, nb_reserved_values,
 +                                          variables->auto_increment_increment);
 +    auto_inc_intervals_count++;
 +    /* Row-based replication does not need to store intervals in binlog */
 +    if (((WSREP(thd) && wsrep_emulate_bin_log ) || mysql_bin_log.is_open())
 +        && !thd->is_current_stmt_binlog_format_row())
 +      thd->auto_inc_intervals_in_cur_stmt_for_binlog.
 +        append(auto_inc_interval_for_cur_row.minimum(),
 +               auto_inc_interval_for_cur_row.values(),
 +               variables->auto_increment_increment);
 +  }
 +
 +  /*
 +    Record this autogenerated value. If the caller then
 +    succeeds to insert this value, it will call
 +    record_first_successful_insert_id_in_cur_stmt()
 +    which will set first_successful_insert_id_in_cur_stmt if it's not
 +    already set.
 +  */
 +  insert_id_for_cur_row= nr;
 +
 +  if (result)                                   // overflow
 +    DBUG_RETURN(result);
 +
 +  /*
 +    Set next insert id to point to next auto-increment value to be able to
 +    handle multi-row statements.
 +  */
 +  set_next_insert_id(compute_next_insert_id(nr, variables));
 +
 +  DBUG_RETURN(0);
 +}
 +
 +
 +/** @brief
 +  MySQL signal that it changed the column bitmap
 +
 +  USAGE
 +    This is for handlers that needs to setup their own column bitmaps.
 +    Normally the handler should set up their own column bitmaps in
 +    index_init() or rnd_init() and in any column_bitmaps_signal() call after
 +    this.
 +
 +    The handler is allowd to do changes to the bitmap after a index_init or
 +    rnd_init() call is made as after this, MySQL will not use the bitmap
 +    for any program logic checking.
 +*/
 +void handler::column_bitmaps_signal()
 +{
 +  DBUG_ENTER("column_bitmaps_signal");
 +  if (table)
 +    DBUG_PRINT("info", ("read_set: 0x%lx  write_set: 0x%lx",
 +                        (long) table->read_set, (long) table->write_set));
 +  DBUG_VOID_RETURN;
 +}
 +
 +
 +/** @brief
 +  Reserves an interval of auto_increment values from the handler.
 +
 +  SYNOPSIS
 +    get_auto_increment()
 +    offset              
 +    increment
 +    nb_desired_values   how many values we want
 +    first_value         (OUT) the first value reserved by the handler
 +    nb_reserved_values  (OUT) how many values the handler reserved
 +
 +  offset and increment means that we want values to be of the form
 +  offset + N * increment, where N>=0 is integer.
 +  If the function sets *first_value to ~(ulonglong)0 it means an error.
 +  If the function sets *nb_reserved_values to ULONGLONG_MAX it means it has
 +  reserved to "positive infinite".
 +*/
 +void handler::get_auto_increment(ulonglong offset, ulonglong increment,
 +                                 ulonglong nb_desired_values,
 +                                 ulonglong *first_value,
 +                                 ulonglong *nb_reserved_values)
 +{
 +  ulonglong nr;
 +  int error;
 +
 +  (void) extra(HA_EXTRA_KEYREAD);
 +  table->mark_columns_used_by_index_no_reset(table->s->next_number_index,
 +                                        table->read_set);
 +  column_bitmaps_signal();
 +
 +  if (ha_index_init(table->s->next_number_index, 1))
 +  {
 +    /* This should never happen, assert in debug, and fail in release build */
 +    DBUG_ASSERT(0);
 +    (void) extra(HA_EXTRA_NO_KEYREAD);
 +    *first_value= ULONGLONG_MAX;
 +    return;
 +  }
 +
 +  if (table->s->next_number_keypart == 0)
 +  {						// Autoincrement at key-start
 +    error= ha_index_last(table->record[1]);
 +    /*
 +      MySQL implicitely assumes such method does locking (as MySQL decides to
 +      use nr+increment without checking again with the handler, in
 +      handler::update_auto_increment()), so reserves to infinite.
 +    */
 +    *nb_reserved_values= ULONGLONG_MAX;
 +  }
 +  else
 +  {
 +    uchar key[MAX_KEY_LENGTH];
 +    key_copy(key, table->record[0],
 +             table->key_info + table->s->next_number_index,
 +             table->s->next_number_key_offset);
 +    error= ha_index_read_map(table->record[1], key,
 +                             make_prev_keypart_map(table->s->
 +                                                   next_number_keypart),
 +                             HA_READ_PREFIX_LAST);
 +    /*
 +      MySQL needs to call us for next row: assume we are inserting ("a",null)
 +      here, we return 3, and next this statement will want to insert
 +      ("b",null): there is no reason why ("b",3+1) would be the good row to
 +      insert: maybe it already exists, maybe 3+1 is too large...
 +    */
 +    *nb_reserved_values= 1;
 +  }
 +
 +  if (error)
 +  {
 +    if (error == HA_ERR_END_OF_FILE || error == HA_ERR_KEY_NOT_FOUND)
 +      /* No entry found, that's fine */;
 +    else
 +      print_error(error, MYF(0));
 +    nr= 1;
 +  }
 +  else
 +    nr= ((ulonglong) table->next_number_field->
 +         val_int_offset(table->s->rec_buff_length)+1);
 +  ha_index_end();
 +  (void) extra(HA_EXTRA_NO_KEYREAD);
 +  *first_value= nr;
 +  return;
 +}
 +
 +
 +void handler::ha_release_auto_increment()
 +{
 +  DBUG_ENTER("ha_release_auto_increment");
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK ||
 +              (!next_insert_id && !insert_id_for_cur_row));
 +  release_auto_increment();
 +  insert_id_for_cur_row= 0;
 +  auto_inc_interval_for_cur_row.replace(0, 0, 0);
 +  auto_inc_intervals_count= 0;
 +  if (next_insert_id > 0)
 +  {
 +    next_insert_id= 0;
 +    /*
 +      this statement used forced auto_increment values if there were some,
 +      wipe them away for other statements.
 +    */
 +    table->in_use->auto_inc_intervals_forced.empty();
 +  }
 +  DBUG_VOID_RETURN;
 +}
 +
 +
 +/**
 +  Construct and emit duplicate key error message using information
 +  from table's record buffer.
 +
 +  @param table    TABLE object which record buffer should be used as
 +                  source for column values.
 +  @param key      Key description.
 +  @param msg      Error message template to which key value should be
 +                  added.
 +  @param errflag  Flags for my_error() call.
 +*/
 +
 +void print_keydup_error(TABLE *table, KEY *key, const char *msg, myf errflag)
 +{
 +  /* Write the duplicated key in the error message */
 +  char key_buff[MAX_KEY_LENGTH];
 +  String str(key_buff,sizeof(key_buff),system_charset_info);
 +
 +  if (key == NULL)
 +  {
 +    /* Key is unknown */
 +    str.copy("", 0, system_charset_info);
 +    my_printf_error(ER_DUP_ENTRY, msg, errflag, str.c_ptr(), "*UNKNOWN*");
 +  }
 +  else
 +  {
 +    /* Table is opened and defined at this point */
 +    key_unpack(&str,table, key);
 +    uint max_length=MYSQL_ERRMSG_SIZE-(uint) strlen(msg);
 +    if (str.length() >= max_length)
 +    {
 +      str.length(max_length-4);
 +      str.append(STRING_WITH_LEN("..."));
 +    }
 +    my_printf_error(ER_DUP_ENTRY, msg, errflag, str.c_ptr_safe(), key->name);
 +  }
 +}
 +
 +/**
 +  Construct and emit duplicate key error message using information
 +  from table's record buffer.
 +
 +  @sa print_keydup_error(table, key, msg, errflag).
 +*/
 +
 +void print_keydup_error(TABLE *table, KEY *key, myf errflag)
 +{
 +  print_keydup_error(table, key,
 +                     ER_THD(table->in_use, ER_DUP_ENTRY_WITH_KEY_NAME),
 +                     errflag);
 +}
 +
 +
 +/**
 +  Print error that we got from handler function.
 +
 +  @note
 +    In case of delete table it's only safe to use the following parts of
 +    the 'table' structure:
 +    - table->s->path
 +    - table->alias
 +*/
 +
 +#define SET_FATAL_ERROR fatal_error=1
 +
 +void handler::print_error(int error, myf errflag)
 +{
 +  bool fatal_error= 0;
 +  DBUG_ENTER("handler::print_error");
 +  DBUG_PRINT("enter",("error: %d",error));
 +
 +  int textno= -1; // impossible value
 +  switch (error) {
 +  case EACCES:
 +    textno=ER_OPEN_AS_READONLY;
 +    break;
 +  case EAGAIN:
 +    textno=ER_FILE_USED;
 +    break;
 +  case ENOENT:
 +    textno=ER_FILE_NOT_FOUND;
 +    break;
 +  case ENOSPC:
 +  case HA_ERR_DISK_FULL:
 +    textno= ER_DISK_FULL;
 +    SET_FATAL_ERROR;                            // Ensure error is logged
 +    break;
 +  case HA_ERR_KEY_NOT_FOUND:
 +  case HA_ERR_NO_ACTIVE_RECORD:
 +  case HA_ERR_RECORD_DELETED:
 +  case HA_ERR_END_OF_FILE:
 +    /*
 +      This errors is not not normally fatal (for example for reads). However
 +      if you get it during an update or delete, then its fatal.
 +      As the user is calling print_error() (which is not done on read), we
 +      assume something when wrong with the update or delete.
 +    */
 +    SET_FATAL_ERROR;
 +    textno=ER_KEY_NOT_FOUND;
 +    break;
 +  case HA_ERR_ABORTED_BY_USER:
 +  {
 +    DBUG_ASSERT(table->in_use->killed);
 +    table->in_use->send_kill_message();
 +    DBUG_VOID_RETURN;
 +  }
 +  case HA_ERR_WRONG_MRG_TABLE_DEF:
 +    textno=ER_WRONG_MRG_TABLE;
 +    break;
 +  case HA_ERR_FOUND_DUPP_KEY:
 +  {
 +    if (table)
 +    {
 +      uint key_nr=get_dup_key(error);
 +      if ((int) key_nr >= 0)
 +      {
 +        print_keydup_error(table,
 +                           key_nr == MAX_KEY ? NULL : &table->key_info[key_nr],
 +                           errflag);
 +        DBUG_VOID_RETURN;
 +      }
 +    }
 +    textno=ER_DUP_KEY;
 +    break;
 +  }
 +  case HA_ERR_FOREIGN_DUPLICATE_KEY:
 +  {
 +    char rec_buf[MAX_KEY_LENGTH];
 +    String rec(rec_buf, sizeof(rec_buf), system_charset_info);
 +    /* Table is opened and defined at this point */
 +
 +    /*
 +      Just print the subset of fields that are part of the first index,
 +      printing the whole row from there is not easy.
 +    */
 +    key_unpack(&rec, table, &table->key_info[0]);
 +
 +    char child_table_name[NAME_LEN + 1];
 +    char child_key_name[NAME_LEN + 1];
 +    if (get_foreign_dup_key(child_table_name, sizeof(child_table_name),
 +                            child_key_name, sizeof(child_key_name)))
 +    {
 +      my_error(ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO, errflag,
 +               table_share->table_name.str, rec.c_ptr_safe(),
 +               child_table_name, child_key_name);
 +      }
 +    else
 +    {
 +      my_error(ER_FOREIGN_DUPLICATE_KEY_WITHOUT_CHILD_INFO, errflag,
 +               table_share->table_name.str, rec.c_ptr_safe());
 +    }
 +    DBUG_VOID_RETURN;
 +  }
 +  case HA_ERR_NULL_IN_SPATIAL:
 +    my_error(ER_CANT_CREATE_GEOMETRY_OBJECT, errflag);
 +    DBUG_VOID_RETURN;
 +  case HA_ERR_FOUND_DUPP_UNIQUE:
 +    textno=ER_DUP_UNIQUE;
 +    break;
 +  case HA_ERR_RECORD_CHANGED:
 +    /*
 +      This is not fatal error when using HANDLER interface
 +      SET_FATAL_ERROR;
 +    */
 +    textno=ER_CHECKREAD;
 +    break;
 +  case HA_ERR_CRASHED:
 +    SET_FATAL_ERROR;
 +    textno=ER_NOT_KEYFILE;
 +    break;
 +  case HA_ERR_WRONG_IN_RECORD:
 +    SET_FATAL_ERROR;
 +    textno= ER_CRASHED_ON_USAGE;
 +    break;
 +  case HA_ERR_CRASHED_ON_USAGE:
 +    SET_FATAL_ERROR;
 +    textno=ER_CRASHED_ON_USAGE;
 +    break;
 +  case HA_ERR_NOT_A_TABLE:
 +    textno= error;
 +    break;
 +  case HA_ERR_CRASHED_ON_REPAIR:
 +    SET_FATAL_ERROR;
 +    textno=ER_CRASHED_ON_REPAIR;
 +    break;
 +  case HA_ERR_OUT_OF_MEM:
 +    textno=ER_OUT_OF_RESOURCES;
 +    break;
 +  case HA_ERR_WRONG_COMMAND:
 +    my_error(ER_ILLEGAL_HA, MYF(0), table_type(), table_share->db.str,
 +             table_share->table_name.str);
 +    DBUG_VOID_RETURN;
 +    break;
 +  case HA_ERR_OLD_FILE:
 +    textno=ER_OLD_KEYFILE;
 +    break;
 +  case HA_ERR_UNSUPPORTED:
 +    textno=ER_UNSUPPORTED_EXTENSION;
 +    break;
 +  case HA_ERR_RECORD_FILE_FULL:
 +  case HA_ERR_INDEX_FILE_FULL:
 +  {
 +    textno=ER_RECORD_FILE_FULL;
 +    /* Write the error message to error log */
 +    errflag|= ME_NOREFRESH;
 +    break;
 +  }
 +  case HA_ERR_LOCK_WAIT_TIMEOUT:
 +    textno=ER_LOCK_WAIT_TIMEOUT;
 +    break;
 +  case HA_ERR_LOCK_TABLE_FULL:
 +    textno=ER_LOCK_TABLE_FULL;
 +    break;
 +  case HA_ERR_LOCK_DEADLOCK:
 +    textno=ER_LOCK_DEADLOCK;
 +    /* cannot continue. the statement was already aborted in the engine */
 +    SET_FATAL_ERROR;
 +    break;
 +  case HA_ERR_READ_ONLY_TRANSACTION:
 +    textno=ER_READ_ONLY_TRANSACTION;
 +    break;
 +  case HA_ERR_CANNOT_ADD_FOREIGN:
 +    textno=ER_CANNOT_ADD_FOREIGN;
 +    break;
 +  case HA_ERR_ROW_IS_REFERENCED:
 +  {
 +    String str;
 +    get_error_message(error, &str);
 +    my_printf_error(ER_ROW_IS_REFERENCED_2,
 +                    ER(str.length() ? ER_ROW_IS_REFERENCED_2 : ER_ROW_IS_REFERENCED),
 +                    errflag, str.c_ptr_safe());
 +    DBUG_VOID_RETURN;
 +  }
 +  case HA_ERR_NO_REFERENCED_ROW:
 +  {
 +    String str;
 +    get_error_message(error, &str);
 +    my_printf_error(ER_NO_REFERENCED_ROW_2,
 +                    ER(str.length() ? ER_NO_REFERENCED_ROW_2 : ER_NO_REFERENCED_ROW),
 +                    errflag, str.c_ptr_safe());
 +    DBUG_VOID_RETURN;
 +  }
 +  case HA_ERR_TABLE_DEF_CHANGED:
 +    textno=ER_TABLE_DEF_CHANGED;
 +    break;
 +  case HA_ERR_NO_SUCH_TABLE:
 +    my_error(ER_NO_SUCH_TABLE_IN_ENGINE, errflag, table_share->db.str,
 +             table_share->table_name.str);
 +    DBUG_VOID_RETURN;
 +  case HA_ERR_RBR_LOGGING_FAILED:
 +    textno= ER_BINLOG_ROW_LOGGING_FAILED;
 +    break;
 +  case HA_ERR_DROP_INDEX_FK:
 +  {
 +    const char *ptr= "???";
 +    uint key_nr= get_dup_key(error);
 +    if ((int) key_nr >= 0)
 +      ptr= table->key_info[key_nr].name;
 +    my_error(ER_DROP_INDEX_FK, errflag, ptr);
 +    DBUG_VOID_RETURN;
 +  }
 +  case HA_ERR_TABLE_NEEDS_UPGRADE:
 +    my_error(ER_TABLE_NEEDS_UPGRADE, errflag,
 +             "TABLE", table_share->table_name.str);
 +    break;
 +  case HA_ERR_NO_PARTITION_FOUND:
 +    textno=ER_WRONG_PARTITION_NAME;
 +    break;
 +  case HA_ERR_TABLE_READONLY:
 +    textno= ER_OPEN_AS_READONLY;
 +    break;
 +  case HA_ERR_AUTOINC_READ_FAILED:
 +    textno= ER_AUTOINC_READ_FAILED;
 +    break;
 +  case HA_ERR_AUTOINC_ERANGE:
 +    textno= error;
 +    my_error(textno, errflag, table->next_number_field->field_name,
 +             table->in_use->get_stmt_da()->current_row_for_warning());
 +    DBUG_VOID_RETURN;
 +    break;
 +  case HA_ERR_TOO_MANY_CONCURRENT_TRXS:
 +    textno= ER_TOO_MANY_CONCURRENT_TRXS;
 +    break;
 +  case HA_ERR_INDEX_COL_TOO_LONG:
 +    textno= ER_INDEX_COLUMN_TOO_LONG;
 +    break;
 +  case HA_ERR_NOT_IN_LOCK_PARTITIONS:
 +    textno=ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET;
 +    break;
 +  case HA_ERR_INDEX_CORRUPT:
 +    textno= ER_INDEX_CORRUPT;
 +    break;
 +  case HA_ERR_UNDO_REC_TOO_BIG:
 +    textno= ER_UNDO_RECORD_TOO_BIG;
 +    break;
 +  case HA_ERR_TABLE_IN_FK_CHECK:
 +    textno= ER_TABLE_IN_FK_CHECK;
 +    break;
 +  default:
 +    {
 +      /* The error was "unknown" to this function.
 +	 Ask handler if it has got a message for this error */
 +      bool temporary= FALSE;
 +      String str;
 +      temporary= get_error_message(error, &str);
 +      if (!str.is_empty())
 +      {
 +	const char* engine= table_type();
 +	if (temporary)
 +	  my_error(ER_GET_TEMPORARY_ERRMSG, errflag, error, str.c_ptr(),
 +                   engine);
 +	else
 +        {
 +          SET_FATAL_ERROR;
 +	  my_error(ER_GET_ERRMSG, errflag, error, str.c_ptr(), engine);
 +        }
 +      }
 +      else
 +        my_error(ER_GET_ERRNO, errflag, error, table_type());
 +      DBUG_VOID_RETURN;
 +    }
 +  }
 +  DBUG_ASSERT(textno > 0);
 +  if (fatal_error)
 +  {
 +    /* Ensure this becomes a true error */
 +    errflag&= ~(ME_JUST_WARNING | ME_JUST_INFO);
 +    if ((debug_assert_if_crashed_table ||
 +                      global_system_variables.log_warnings > 1))
 +    {
 +      /*
 +        Log error to log before we crash or if extended warnings are requested
 +      */
 +      errflag|= ME_NOREFRESH;
 +    }
 +  }    
 +
 +  /* if we got an OS error from a file-based engine, specify a path of error */
 +  if (error < HA_ERR_FIRST && bas_ext()[0])
 +  {
 +    char buff[FN_REFLEN];
 +    strxnmov(buff, sizeof(buff),
 +             table_share->normalized_path.str, bas_ext()[0], NULL);
 +    my_error(textno, errflag, buff, error);
 +  }
 +  else
 +    my_error(textno, errflag, table_share->table_name.str, error);
 +  DBUG_VOID_RETURN;
 +}
 +
 +
 +/**
 +  Return an error message specific to this handler.
 +
 +  @param error  error code previously returned by handler
 +  @param buf    pointer to String where to add error message
 +
 +  @return
 +    Returns true if this is a temporary error
 +*/
 +bool handler::get_error_message(int error, String* buf)
 +{
 +  DBUG_EXECUTE_IF("external_lock_failure",
 +                  buf->set_ascii(STRING_WITH_LEN("KABOOM!")););
 +  return FALSE;
 +}
 +
 +/**
 +  Check for incompatible collation changes.
 +   
 +  @retval
 +    HA_ADMIN_NEEDS_UPGRADE   Table may have data requiring upgrade.
 +  @retval
 +    0                        No upgrade required.
 +*/
 +
 +int handler::check_collation_compatibility()
 +{
 +  ulong mysql_version= table->s->mysql_version;
 +
 +  if (mysql_version < 50124)
 +  {
 +    KEY *key= table->key_info;
 +    KEY *key_end= key + table->s->keys;
 +    for (; key < key_end; key++)
 +    {
 +      KEY_PART_INFO *key_part= key->key_part;
 +      KEY_PART_INFO *key_part_end= key_part + key->user_defined_key_parts;
 +      for (; key_part < key_part_end; key_part++)
 +      {
 +        if (!key_part->fieldnr)
 +          continue;
 +        Field *field= table->field[key_part->fieldnr - 1];
 +        uint cs_number= field->charset()->number;
 +        if ((mysql_version < 50048 &&
 +             (cs_number == 11 || /* ascii_general_ci - bug #29499, bug #27562 */
 +              cs_number == 41 || /* latin7_general_ci - bug #29461 */
 +              cs_number == 42 || /* latin7_general_cs - bug #29461 */
 +              cs_number == 20 || /* latin7_estonian_cs - bug #29461 */
 +              cs_number == 21 || /* latin2_hungarian_ci - bug #29461 */
 +              cs_number == 22 || /* koi8u_general_ci - bug #29461 */
 +              cs_number == 23 || /* cp1251_ukrainian_ci - bug #29461 */
 +              cs_number == 26)) || /* cp1250_general_ci - bug #29461 */
 +             (mysql_version < 50124 &&
 +             (cs_number == 33 || /* utf8_general_ci - bug #27877 */
 +              cs_number == 35))) /* ucs2_general_ci - bug #27877 */
 +          return HA_ADMIN_NEEDS_UPGRADE;
 +      }
 +    }
 +  }
 +
 +  return 0;
 +}
 +
 +
 +int handler::ha_check_for_upgrade(HA_CHECK_OPT *check_opt)
 +{
 +  int error;
 +  KEY *keyinfo, *keyend;
 +  KEY_PART_INFO *keypart, *keypartend;
 +
 +  if (table->s->incompatible_version)
 +    return HA_ADMIN_NEEDS_ALTER;
 +
 +  if (!table->s->mysql_version)
 +  {
 +    /* check for blob-in-key error */
 +    keyinfo= table->key_info;
 +    keyend= table->key_info + table->s->keys;
 +    for (; keyinfo < keyend; keyinfo++)
 +    {
 +      keypart= keyinfo->key_part;
 +      keypartend= keypart + keyinfo->user_defined_key_parts;
 +      for (; keypart < keypartend; keypart++)
 +      {
 +        if (!keypart->fieldnr)
 +          continue;
 +        Field *field= table->field[keypart->fieldnr-1];
 +        if (field->type() == MYSQL_TYPE_BLOB)
 +        {
 +          if (check_opt->sql_flags & TT_FOR_UPGRADE)
 +            check_opt->flags= T_MEDIUM;
 +          return HA_ADMIN_NEEDS_CHECK;
 +        }
 +      }
 +    }
 +  }
 +  if (table->s->frm_version < FRM_VER_TRUE_VARCHAR)
 +    return HA_ADMIN_NEEDS_ALTER;
 +
 +  if ((error= check_collation_compatibility()))
 +    return error;
 +    
 +  return check_for_upgrade(check_opt);
 +}
 +
 +
 +int handler::check_old_types()
 +{
 +  Field** field;
 +
 +  if (!table->s->mysql_version)
 +  {
 +    /* check for bad DECIMAL field */
 +    for (field= table->field; (*field); field++)
 +    {
 +      if ((*field)->type() == MYSQL_TYPE_NEWDECIMAL)
 +      {
 +        return HA_ADMIN_NEEDS_ALTER;
 +      }
 +      if ((*field)->type() == MYSQL_TYPE_VAR_STRING)
 +      {
 +        return HA_ADMIN_NEEDS_ALTER;
 +      }
 +    }
 +  }
 +  return 0;
 +}
 +
 +
 +static bool update_frm_version(TABLE *table)
 +{
 +  char path[FN_REFLEN];
 +  File file;
 +  int result= 1;
 +  DBUG_ENTER("update_frm_version");
 +
 +  /*
 +    No need to update frm version in case table was created or checked
 +    by server with the same version. This also ensures that we do not
 +    update frm version for temporary tables as this code doesn't support
 +    temporary tables.
 +  */
 +  if (table->s->mysql_version == MYSQL_VERSION_ID)
 +    DBUG_RETURN(0);
 +
 +  strxmov(path, table->s->normalized_path.str, reg_ext, NullS);
 +
 +  if ((file= mysql_file_open(key_file_frm,
 +                             path, O_RDWR|O_BINARY, MYF(MY_WME))) >= 0)
 +  {
 +    uchar version[4];
 +
 +    int4store(version, MYSQL_VERSION_ID);
 +
 +    if ((result= mysql_file_pwrite(file, (uchar*) version, 4, 51L, MYF_RW)))
 +      goto err;
 +
 +    table->s->mysql_version= MYSQL_VERSION_ID;
 +  }
 +err:
 +  if (file >= 0)
 +    (void) mysql_file_close(file, MYF(MY_WME));
 +  DBUG_RETURN(result);
 +}
 +
 +
 +
 +/**
 +  @return
 +    key if error because of duplicated keys
 +*/
 +uint handler::get_dup_key(int error)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  DBUG_ENTER("handler::get_dup_key");
 +  table->file->errkey  = (uint) -1;
 +  if (error == HA_ERR_FOUND_DUPP_KEY || error == HA_ERR_FOREIGN_DUPLICATE_KEY ||
 +      error == HA_ERR_FOUND_DUPP_UNIQUE || error == HA_ERR_NULL_IN_SPATIAL ||
 +      error == HA_ERR_DROP_INDEX_FK)
 +    table->file->info(HA_STATUS_ERRKEY | HA_STATUS_NO_LOCK);
 +  DBUG_RETURN(table->file->errkey);
 +}
 +
 +
 +/**
 +  Delete all files with extension from bas_ext().
 +
 +  @param name		Base name of table
 +
 +  @note
 +    We assume that the handler may return more extensions than
 +    was actually used for the file.
 +
 +  @retval
 +    0   If we successfully deleted at least one file from base_ext and
 +    didn't get any other errors than ENOENT
 +  @retval
 +    !0  Error
 +*/
 +int handler::delete_table(const char *name)
 +{
 +  int saved_error= 0;
 +  int error= 0;
 +  int enoent_or_zero;
 +  char buff[FN_REFLEN];
 +
 +  if (ht->discover_table)
 +    enoent_or_zero= 0; // the table may not exist in the engine, it's ok
 +  else
 +    enoent_or_zero= ENOENT;  // the first file of bas_ext() *must* exist
 +
 +  for (const char **ext=bas_ext(); *ext ; ext++)
 +  {
 +    fn_format(buff, name, "", *ext, MY_UNPACK_FILENAME|MY_APPEND_EXT);
 +    if (mysql_file_delete_with_symlink(key_file_misc, buff, MYF(0)))
 +    {
 +      if (my_errno != ENOENT)
 +      {
 +        /*
 +          If error on the first existing file, return the error.
 +          Otherwise delete as much as possible.
 +        */
 +        if (enoent_or_zero)
 +          return my_errno;
 +	saved_error= my_errno;
 +      }
 +    }
 +    else
 +      enoent_or_zero= 0;                        // No error for ENOENT
 +    error= enoent_or_zero;
 +  }
 +  return saved_error ? saved_error : error;
 +}
 +
 +
 +int handler::rename_table(const char * from, const char * to)
 +{
 +  int error= 0;
 +  const char **ext, **start_ext;
 +  start_ext= bas_ext();
 +  for (ext= start_ext; *ext ; ext++)
 +  {
 +    if (rename_file_ext(from, to, *ext))
 +    {
 +      if ((error=my_errno) != ENOENT)
 +	break;
 +      error= 0;
 +    }
 +  }
 +  if (error)
 +  {
 +    /* Try to revert the rename. Ignore errors. */
 +    for (; ext >= start_ext; ext--)
 +      rename_file_ext(to, from, *ext);
 +  }
 +  return error;
 +}
 +
 +
 +void handler::drop_table(const char *name)
 +{
 +  ha_close();
 +  delete_table(name);
 +}
 +
 +
 +/**
 +  Performs checks upon the table.
 +
 +  @param thd                thread doing CHECK TABLE operation
 +  @param check_opt          options from the parser
 +
 +  @retval
 +    HA_ADMIN_OK               Successful upgrade
 +  @retval
 +    HA_ADMIN_NEEDS_UPGRADE    Table has structures requiring upgrade
 +  @retval
 +    HA_ADMIN_NEEDS_ALTER      Table has structures requiring ALTER TABLE
 +  @retval
 +    HA_ADMIN_NOT_IMPLEMENTED
 +*/
 +int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
 +{
 +  int error;
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +
 +  if ((table->s->mysql_version >= MYSQL_VERSION_ID) &&
 +      (check_opt->sql_flags & TT_FOR_UPGRADE))
 +    return 0;
 +
 +  if (table->s->mysql_version < MYSQL_VERSION_ID)
 +  {
 +    if ((error= check_old_types()))
 +      return error;
 +    error= ha_check_for_upgrade(check_opt);
 +    if (error && (error != HA_ADMIN_NEEDS_CHECK))
 +      return error;
 +    if (!error && (check_opt->sql_flags & TT_FOR_UPGRADE))
 +      return 0;
 +  }
 +  if ((error= check(thd, check_opt)))
 +    return error;
 +  /* Skip updating frm version if not main handler. */
 +  if (table->file != this)
 +    return error;
 +  return update_frm_version(table);
 +}
 +
 +/**
 +  A helper function to mark a transaction read-write,
 +  if it is started.
 +*/
 +
 +void handler::mark_trx_read_write_internal()
 +{
 +  Ha_trx_info *ha_info= &ha_thd()->ha_data[ht->slot].ha_info[0];
 +  /*
 +    When a storage engine method is called, the transaction must
 +    have been started, unless it's a DDL call, for which the
 +    storage engine starts the transaction internally, and commits
 +    it internally, without registering in the ha_list.
 +    Unfortunately here we can't know know for sure if the engine
 +    has registered the transaction or not, so we must check.
 +  */
 +  if (ha_info->is_started())
 +  {
 +    DBUG_ASSERT(has_transactions());
 +    /*
 +      table_share can be NULL in ha_delete_table(). See implementation
 +      of standalone function ha_delete_table() in sql_base.cc.
 +    */
 +    if (table_share == NULL || table_share->tmp_table == NO_TMP_TABLE)
 +      ha_info->set_trx_read_write();
 +  }
 +}
 +
 +
 +/**
 +  Repair table: public interface.
 +
 +  @sa handler::repair()
 +*/
 +
 +int handler::ha_repair(THD* thd, HA_CHECK_OPT* check_opt)
 +{
 +  int result;
 +
 +  mark_trx_read_write();
 +
 +  result= repair(thd, check_opt);
 +  DBUG_ASSERT(result == HA_ADMIN_NOT_IMPLEMENTED ||
 +              ha_table_flags() & HA_CAN_REPAIR);
 +
 +  if (result == HA_ADMIN_OK)
 +    result= update_frm_version(table);
 +  return result;
 +}
 +
 +
 +/**
 +  Bulk update row: public interface.
 +
 +  @sa handler::bulk_update_row()
 +*/
 +
 +int
 +handler::ha_bulk_update_row(const uchar *old_data, uchar *new_data,
 +                            uint *dup_key_found)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  mark_trx_read_write();
 +
 +  return bulk_update_row(old_data, new_data, dup_key_found);
 +}
 +
 +
 +/**
 +  Delete all rows: public interface.
 +
 +  @sa handler::delete_all_rows()
 +*/
 +
 +int
 +handler::ha_delete_all_rows()
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  mark_trx_read_write();
 +
 +  return delete_all_rows();
 +}
 +
 +
 +/**
 +  Truncate table: public interface.
 +
 +  @sa handler::truncate()
 +*/
 +
 +int
 +handler::ha_truncate()
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  mark_trx_read_write();
 +
 +  return truncate();
 +}
 +
 +
 +/**
 +  Reset auto increment: public interface.
 +
 +  @sa handler::reset_auto_increment()
 +*/
 +
 +int
 +handler::ha_reset_auto_increment(ulonglong value)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  mark_trx_read_write();
 +
 +  return reset_auto_increment(value);
 +}
 +
 +
 +/**
 +  Optimize table: public interface.
 +
 +  @sa handler::optimize()
 +*/
 +
 +int
 +handler::ha_optimize(THD* thd, HA_CHECK_OPT* check_opt)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  mark_trx_read_write();
 +
 +  return optimize(thd, check_opt);
 +}
 +
 +
 +/**
 +  Analyze table: public interface.
 +
 +  @sa handler::analyze()
 +*/
 +
 +int
 +handler::ha_analyze(THD* thd, HA_CHECK_OPT* check_opt)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  mark_trx_read_write();
 +
 +  return analyze(thd, check_opt);
 +}
 +
 +
 +/**
 +  Check and repair table: public interface.
 +
 +  @sa handler::check_and_repair()
 +*/
 +
 +bool
 +handler::ha_check_and_repair(THD *thd)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_UNLCK);
 +  mark_trx_read_write();
 +
 +  return check_and_repair(thd);
 +}
 +
 +
 +/**
 +  Disable indexes: public interface.
 +
 +  @sa handler::disable_indexes()
 +*/
 +
 +int
 +handler::ha_disable_indexes(uint mode)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  mark_trx_read_write();
 +
 +  return disable_indexes(mode);
 +}
 +
 +
 +/**
 +  Enable indexes: public interface.
 +
 +  @sa handler::enable_indexes()
 +*/
 +
 +int
 +handler::ha_enable_indexes(uint mode)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  mark_trx_read_write();
 +
 +  return enable_indexes(mode);
 +}
 +
 +
 +/**
 +  Discard or import tablespace: public interface.
 +
 +  @sa handler::discard_or_import_tablespace()
 +*/
 +
 +int
 +handler::ha_discard_or_import_tablespace(my_bool discard)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  mark_trx_read_write();
 +
 +  return discard_or_import_tablespace(discard);
 +}
 +
 +
 +bool handler::ha_prepare_inplace_alter_table(TABLE *altered_table,
 +                                             Alter_inplace_info *ha_alter_info)
 +{
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +  mark_trx_read_write();
 +
 +  return prepare_inplace_alter_table(altered_table, ha_alter_info);
 +}
 +
 +
 +bool handler::ha_commit_inplace_alter_table(TABLE *altered_table,
 +                                            Alter_inplace_info *ha_alter_info,
 +                                            bool commit)
 +{
 +   /*
 +     At this point we should have an exclusive metadata lock on the table.
 +     The exception is if we're about to roll back changes (commit= false).
 +     In this case, we might be rolling back after a failed lock upgrade,
 +     so we could be holding the same lock level as for inplace_alter_table().
 +   */
 +   DBUG_ASSERT(ha_thd()->mdl_context.is_lock_owner(MDL_key::TABLE,
 +                                                   table->s->db.str,
 +                                                   table->s->table_name.str,
 +                                                   MDL_EXCLUSIVE) ||
 +               !commit);
 +
 +   return commit_inplace_alter_table(altered_table, ha_alter_info, commit);
 +}
 +
 +
 +/*
 +   Default implementation to support in-place alter table
 +   and old online add/drop index API
 +*/
 +
 +enum_alter_inplace_result
 +handler::check_if_supported_inplace_alter(TABLE *altered_table,
 +                                          Alter_inplace_info *ha_alter_info)
 +{
 +  DBUG_ENTER("check_if_supported_alter");
 +
 +  HA_CREATE_INFO *create_info= ha_alter_info->create_info;
 +
 +  Alter_inplace_info::HA_ALTER_FLAGS inplace_offline_operations=
 +    Alter_inplace_info::ALTER_COLUMN_EQUAL_PACK_LENGTH |
 +    Alter_inplace_info::ALTER_COLUMN_NAME |
 +    Alter_inplace_info::ALTER_COLUMN_DEFAULT |
 +    Alter_inplace_info::ALTER_COLUMN_OPTION |
 +    Alter_inplace_info::CHANGE_CREATE_OPTION |
 +    Alter_inplace_info::ALTER_PARTITIONED |
 +    Alter_inplace_info::ALTER_RENAME;
 +
 +  /* Is there at least one operation that requires copy algorithm? */
 +  if (ha_alter_info->handler_flags & ~inplace_offline_operations)
 +    DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
 +
 +  /*
 +    ALTER TABLE tbl_name CONVERT TO CHARACTER SET .. and
 +    ALTER TABLE table_name DEFAULT CHARSET = .. most likely
 +    change column charsets and so not supported in-place through
 +    old API.
 +
 +    Changing of PACK_KEYS, MAX_ROWS and ROW_FORMAT options were
 +    not supported as in-place operations in old API either.
 +  */
 +  if (create_info->used_fields & (HA_CREATE_USED_CHARSET |
 +                                  HA_CREATE_USED_DEFAULT_CHARSET |
 +                                  HA_CREATE_USED_PACK_KEYS |
 +                                  HA_CREATE_USED_MAX_ROWS) ||
 +      (table->s->row_type != create_info->row_type))
 +    DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
 +
 +  uint table_changes= (ha_alter_info->handler_flags &
 +                       Alter_inplace_info::ALTER_COLUMN_EQUAL_PACK_LENGTH) ?
 +    IS_EQUAL_PACK_LENGTH : IS_EQUAL_YES;
 +  if (table->file->check_if_incompatible_data(create_info, table_changes)
 +      == COMPATIBLE_DATA_YES)
 +    DBUG_RETURN(HA_ALTER_INPLACE_NO_LOCK);
 +
 +  DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
 +}
 +
 +
 +/*
 +   Default implementation to support in-place alter table
 +   and old online add/drop index API
 +*/
 +
 +void handler::notify_table_changed()
 +{
 +  ha_create_partitioning_metadata(table->s->path.str, NULL, CHF_INDEX_FLAG);
 +}
 +
 +
 +void Alter_inplace_info::report_unsupported_error(const char *not_supported,
 +                                                  const char *try_instead)
 +{
 +  if (unsupported_reason == NULL)
 +    my_error(ER_ALTER_OPERATION_NOT_SUPPORTED, MYF(0),
 +             not_supported, try_instead);
 +  else
 +    my_error(ER_ALTER_OPERATION_NOT_SUPPORTED_REASON, MYF(0),
 +             not_supported, unsupported_reason, try_instead);
 +}
 +
 +
 +/**
 +  Rename table: public interface.
 +
 +  @sa handler::rename_table()
 +*/
 +
 +int
 +handler::ha_rename_table(const char *from, const char *to)
 +{
 +  DBUG_ASSERT(m_lock_type == F_UNLCK);
 +  mark_trx_read_write();
 +
 +  return rename_table(from, to);
 +}
 +
 +
 +/**
 +  Delete table: public interface.
 +
 +  @sa handler::delete_table()
 +*/
 +
 +int
 +handler::ha_delete_table(const char *name)
 +{
 +  mark_trx_read_write();
 +  return delete_table(name);
 +}
 +
 +
 +/**
 +  Drop table in the engine: public interface.
 +
 +  @sa handler::drop_table()
 +
 +  The difference between this and delete_table() is that the table is open in
 +  drop_table().
 +*/
 +
 +void
 +handler::ha_drop_table(const char *name)
 +{
 +  DBUG_ASSERT(m_lock_type == F_UNLCK);
 +  mark_trx_read_write();
 +
 +  return drop_table(name);
 +}
 +
 +
 +/**
 +  Create a table in the engine: public interface.
 +
 +  @sa handler::create()
 +*/
 +
 +int
 +handler::ha_create(const char *name, TABLE *form, HA_CREATE_INFO *info_arg)
 +{
 +  DBUG_ASSERT(m_lock_type == F_UNLCK);
 +  mark_trx_read_write();
 +  int error= create(name, form, info_arg);
 +  if (!error &&
 +      !(info_arg->options & (HA_LEX_CREATE_TMP_TABLE | HA_CREATE_TMP_ALTER)))
 +    mysql_audit_create_table(form);
 +  return error;
 +}
 +
 +
 +/**
 +  Create handler files for CREATE TABLE: public interface.
 +
 +  @sa handler::create_partitioning_metadata()
 +*/
 +
 +int
 +handler::ha_create_partitioning_metadata(const char *name,
 +                                         const char *old_name,
 +                                         int action_flag)
 +{
 +  /*
 +    Normally this is done when unlocked, but in fast_alter_partition_table,
 +    it is done on an already locked handler when preparing to alter/rename
 +    partitions.
 +  */
 +  DBUG_ASSERT(m_lock_type == F_UNLCK ||
 +              (!old_name && strcmp(name, table_share->path.str)));
 +  mark_trx_read_write();
 +
 +  return create_partitioning_metadata(name, old_name, action_flag);
 +}
 +
 +
 +/**
 +  Change partitions: public interface.
 +
 +  @sa handler::change_partitions()
 +*/
 +
 +int
 +handler::ha_change_partitions(HA_CREATE_INFO *create_info,
 +                              const char *path,
 +                              ulonglong * const copied,
 +                              ulonglong * const deleted,
 +                              const uchar *pack_frm_data,
 +                              size_t pack_frm_len)
 +{
 +  /*
 +    Must have at least RDLCK or be a TMP table. Read lock is needed to read
 +    from current partitions and write lock will be taken on new partitions.
 +  */
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type != F_UNLCK);
 +
 +  mark_trx_read_write();
 +
 +  return change_partitions(create_info, path, copied, deleted,
 +                           pack_frm_data, pack_frm_len);
 +}
 +
 +
 +/**
 +  Drop partitions: public interface.
 +
 +  @sa handler::drop_partitions()
 +*/
 +
 +int
 +handler::ha_drop_partitions(const char *path)
 +{
 +  DBUG_ASSERT(!table->db_stat);
 +
 +  mark_trx_read_write();
 +
 +  return drop_partitions(path);
 +}
 +
 +
 +/**
 +  Rename partitions: public interface.
 +
 +  @sa handler::rename_partitions()
 +*/
 +
 +int
 +handler::ha_rename_partitions(const char *path)
 +{
 +  DBUG_ASSERT(!table->db_stat);
 +
 +  mark_trx_read_write();
 +
 +  return rename_partitions(path);
 +}
 +
 +
 +/**
 +  Tell the storage engine that it is allowed to "disable transaction" in the
 +  handler. It is a hint that ACID is not required - it was used in NDB for
 +  ALTER TABLE, for example, when data are copied to temporary table.
 +  A storage engine may treat this hint any way it likes. NDB for example
 +  started to commit every now and then automatically.
 +  This hint can be safely ignored.
 +*/
 +int ha_enable_transaction(THD *thd, bool on)
 +{
 +  int error=0;
 +  DBUG_ENTER("ha_enable_transaction");
 +  DBUG_PRINT("enter", ("on: %d", (int) on));
 +
 +  if ((thd->transaction.on= on))
 +  {
 +    /*
 +      Now all storage engines should have transaction handling enabled.
 +      But some may have it enabled all the time - "disabling" transactions
 +      is an optimization hint that storage engine is free to ignore.
 +      So, let's commit an open transaction (if any) now.
 +    */
 +    if (!(error= ha_commit_trans(thd, 0)))
 +      error= trans_commit_implicit(thd);
 +  }
 +  DBUG_RETURN(error);
 +}
 +
 +int handler::index_next_same(uchar *buf, const uchar *key, uint keylen)
 +{
 +  int error;
 +  DBUG_ENTER("handler::index_next_same");
 +  if (!(error=index_next(buf)))
 +  {
 +    my_ptrdiff_t ptrdiff= buf - table->record[0];
 +    uchar *UNINIT_VAR(save_record_0);
 +    KEY *UNINIT_VAR(key_info);
 +    KEY_PART_INFO *UNINIT_VAR(key_part);
 +    KEY_PART_INFO *UNINIT_VAR(key_part_end);
 +
 +    /*
 +      key_cmp_if_same() compares table->record[0] against 'key'.
 +      In parts it uses table->record[0] directly, in parts it uses
 +      field objects with their local pointers into table->record[0].
 +      If 'buf' is distinct from table->record[0], we need to move
 +      all record references. This is table->record[0] itself and
 +      the field pointers of the fields used in this key.
 +    */
 +    if (ptrdiff)
 +    {
 +      save_record_0= table->record[0];
 +      table->record[0]= buf;
 +      key_info= table->key_info + active_index;
 +      key_part= key_info->key_part;
 +      key_part_end= key_part + key_info->user_defined_key_parts;
 +      for (; key_part < key_part_end; key_part++)
 +      {
 +        DBUG_ASSERT(key_part->field);
 +        key_part->field->move_field_offset(ptrdiff);
 +      }
 +    }
 +
 +    if (key_cmp_if_same(table, key, active_index, keylen))
 +    {
 +      table->status=STATUS_NOT_FOUND;
 +      error=HA_ERR_END_OF_FILE;
 +    }
 +
 +    /* Move back if necessary. */
 +    if (ptrdiff)
 +    {
 +      table->record[0]= save_record_0;
 +      for (key_part= key_info->key_part; key_part < key_part_end; key_part++)
 +        key_part->field->move_field_offset(-ptrdiff);
 +    }
 +  }
 +  DBUG_PRINT("return",("%i", error));
 +  DBUG_RETURN(error);
 +}
 +
 +
 +void handler::get_dynamic_partition_info(PARTITION_STATS *stat_info,
 +                                         uint part_id)
 +{
 +  info(HA_STATUS_CONST | HA_STATUS_TIME | HA_STATUS_VARIABLE |
 +       HA_STATUS_NO_LOCK);
 +  stat_info->records=              stats.records;
 +  stat_info->mean_rec_length=      stats.mean_rec_length;
 +  stat_info->data_file_length=     stats.data_file_length;
 +  stat_info->max_data_file_length= stats.max_data_file_length;
 +  stat_info->index_file_length=    stats.index_file_length;
 +  stat_info->delete_length=        stats.delete_length;
 +  stat_info->create_time=          stats.create_time;
 +  stat_info->update_time=          stats.update_time;
 +  stat_info->check_time=           stats.check_time;
 +  stat_info->check_sum=            0;
 +  if (table_flags() & (HA_HAS_OLD_CHECKSUM | HA_HAS_OLD_CHECKSUM))
 +    stat_info->check_sum= checksum();
 +  return;
 +}
 +
 +
 +/*
 +  Updates the global table stats with the TABLE this handler represents
 +*/
 +
 +void handler::update_global_table_stats()
 +{
 +  TABLE_STATS * table_stats;
 +
 +  status_var_add(table->in_use->status_var.rows_read, rows_read);
 +  DBUG_ASSERT(rows_tmp_read == 0);
 +
 +  if (!table->in_use->userstat_running)
 +  {
 +    rows_read= rows_changed= 0;
 +    return;
 +  }
 +
 +  if (rows_read + rows_changed == 0)
 +    return;                                     // Nothing to update.
 +
 +  DBUG_ASSERT(table->s && table->s->table_cache_key.str);
 +
 +  mysql_mutex_lock(&LOCK_global_table_stats);
 +  /* Gets the global table stats, creating one if necessary. */
 +  if (!(table_stats= (TABLE_STATS*)
 +        my_hash_search(&global_table_stats,
 +                    (uchar*) table->s->table_cache_key.str,
 +                    table->s->table_cache_key.length)))
 +  {
 +    if (!(table_stats = ((TABLE_STATS*)
 +                         my_malloc(sizeof(TABLE_STATS),
 +                                   MYF(MY_WME | MY_ZEROFILL)))))
 +    {
 +      /* Out of memory error already given */
 +      goto end;
 +    }
 +    memcpy(table_stats->table, table->s->table_cache_key.str,
 +           table->s->table_cache_key.length);
 +    table_stats->table_name_length= table->s->table_cache_key.length;
 +    table_stats->engine_type= ht->db_type;
 +    /* No need to set variables to 0, as we use MY_ZEROFILL above */
 +
 +    if (my_hash_insert(&global_table_stats, (uchar*) table_stats))
 +    {
 +      /* Out of memory error is already given */
 +      my_free(table_stats);
 +      goto end;
 +    }
 +  }
 +  // Updates the global table stats.
 +  table_stats->rows_read+=    rows_read;
 +  table_stats->rows_changed+= rows_changed;
 +  table_stats->rows_changed_x_indexes+= (rows_changed *
 +                                         (table->s->keys ? table->s->keys :
 +                                          1));
 +  rows_read= rows_changed= 0;
 +end:
 +  mysql_mutex_unlock(&LOCK_global_table_stats);
 +}
 +
 +
 +/*
 +  Updates the global index stats with this handler's accumulated index reads.
 +*/
 +
 +void handler::update_global_index_stats()
 +{
 +  DBUG_ASSERT(table->s);
 +
 +  if (!table->in_use->userstat_running)
 +  {
 +    /* Reset all index read values */
 +    bzero(index_rows_read, sizeof(index_rows_read[0]) * table->s->keys);
 +    return;
 +  }
 +
 +  for (uint index = 0; index < table->s->keys; index++)
 +  {
 +    if (index_rows_read[index])
 +    {
 +      INDEX_STATS* index_stats;
 +      uint key_length;
 +      KEY *key_info = &table->key_info[index];  // Rows were read using this
 +
 +      DBUG_ASSERT(key_info->cache_name);
 +      if (!key_info->cache_name)
 +        continue;
 +      key_length= table->s->table_cache_key.length + key_info->name_length + 1;
 +      mysql_mutex_lock(&LOCK_global_index_stats);
 +      // Gets the global index stats, creating one if necessary.
 +      if (!(index_stats= (INDEX_STATS*) my_hash_search(&global_index_stats,
 +                                                    key_info->cache_name,
 +                                                    key_length)))
 +      {
 +        if (!(index_stats = ((INDEX_STATS*)
 +                             my_malloc(sizeof(INDEX_STATS),
 +                                       MYF(MY_WME | MY_ZEROFILL)))))
 +          goto end;                             // Error is already given
 +
 +        memcpy(index_stats->index, key_info->cache_name, key_length);
 +        index_stats->index_name_length= key_length;
 +        if (my_hash_insert(&global_index_stats, (uchar*) index_stats))
 +        {
 +          my_free(index_stats);
 +          goto end;
 +        }
 +      }
 +      /* Updates the global index stats. */
 +      index_stats->rows_read+= index_rows_read[index];
 +      index_rows_read[index]= 0;
 +end:
 +      mysql_mutex_unlock(&LOCK_global_index_stats);
 +    }
 +  }
 +}
 +
 +
 +/****************************************************************************
 +** Some general functions that isn't in the handler class
 +****************************************************************************/
 +
 +/**
 +  Initiates table-file and calls appropriate database-creator.
 +
 +  @retval
 +   0  ok
 +  @retval
 +   1  error
 +*/
 +int ha_create_table(THD *thd, const char *path,
 +                    const char *db, const char *table_name,
 +                    HA_CREATE_INFO *create_info, LEX_CUSTRING *frm)
 +{
 +  int error= 1;
 +  TABLE table;
 +  char name_buff[FN_REFLEN];
 +  const char *name;
 +  TABLE_SHARE share;
 +  bool temp_table __attribute__((unused)) =
 +    create_info->options & (HA_LEX_CREATE_TMP_TABLE | HA_CREATE_TMP_ALTER);
 +                                 
 +  DBUG_ENTER("ha_create_table");
 +
 +  init_tmp_table_share(thd, &share, db, 0, table_name, path);
 +
 +  if (frm)
 +  {
 +    bool write_frm_now= !create_info->db_type->discover_table &&
 +                        !create_info->tmp_table();
 +
 +    share.frm_image= frm;
 +
 +    // open an frm image
 +    if (share.init_from_binary_frm_image(thd, write_frm_now,
 +                                         frm->str, frm->length))
 +      goto err;
 +  }
 +  else
 +  {
 +    // open an frm file
 +    share.db_plugin= ha_lock_engine(thd, create_info->db_type);
 +
 +    if (open_table_def(thd, &share))
 +      goto err;
 +  }
 +
 +  share.m_psi= PSI_CALL_get_table_share(temp_table, &share);
 +
 +  if (open_table_from_share(thd, &share, "", 0, READ_ALL, 0, &table, true))
 +    goto err;
 +
 +  update_create_info_from_table(create_info, &table);
 +
 +  name= get_canonical_filename(table.file, share.path.str, name_buff);
 +
 +  error= table.file->ha_create(name, &table, create_info);
 +
 +  if (error)
 +  {
 +    if (!thd->is_error())
 +      my_error(ER_CANT_CREATE_TABLE, MYF(0), db, table_name, error);
 +    table.file->print_error(error, MYF(ME_JUST_WARNING));
 +    PSI_CALL_drop_table_share(temp_table, share.db.str, share.db.length,
 +                              share.table_name.str, share.table_name.length);
 +  }
 +
 +  (void) closefrm(&table);
 + 
 +err:
 +  free_table_share(&share);
 +  DBUG_RETURN(error != 0);
 +}
 +
 +void st_ha_check_opt::init()
 +{
 +  flags= sql_flags= 0;
 +  start_time= my_time(0);
 +}
 +
 +
 +/*****************************************************************************
 +  Key cache handling.
 +
 +  This code is only relevant for ISAM/MyISAM tables
 +
 +  key_cache->cache may be 0 only in the case where a key cache is not
 +  initialized or when we where not able to init the key cache in a previous
 +  call to ha_init_key_cache() (probably out of memory)
 +*****************************************************************************/
 +
 +/**
 +  Init a key cache if it has not been initied before.
 +*/
 +int ha_init_key_cache(const char *name, KEY_CACHE *key_cache, void *unused
 +                      __attribute__((unused)))
 +{
 +  DBUG_ENTER("ha_init_key_cache");
 +
 +  if (!key_cache->key_cache_inited)
 +  {
 +    mysql_mutex_lock(&LOCK_global_system_variables);
 +    size_t tmp_buff_size= (size_t) key_cache->param_buff_size;
 +    uint tmp_block_size= (uint) key_cache->param_block_size;
 +    uint division_limit= (uint)key_cache->param_division_limit;
 +    uint age_threshold=  (uint)key_cache->param_age_threshold;
 +    uint partitions=     (uint)key_cache->param_partitions;
 +    uint changed_blocks_hash_size=  (uint)key_cache->changed_blocks_hash_size;
 +    mysql_mutex_unlock(&LOCK_global_system_variables);
 +    DBUG_RETURN(!init_key_cache(key_cache,
 +				tmp_block_size,
 +				tmp_buff_size,
 +				division_limit, age_threshold,
 +                                changed_blocks_hash_size,
 +                                partitions));
 +  }
 +  DBUG_RETURN(0);
 +}
 +
 +
 +/**
 +  Resize key cache.
 +*/
 +int ha_resize_key_cache(KEY_CACHE *key_cache)
 +{
 +  DBUG_ENTER("ha_resize_key_cache");
 +
 +  if (key_cache->key_cache_inited)
 +  {
 +    mysql_mutex_lock(&LOCK_global_system_variables);
 +    size_t tmp_buff_size= (size_t) key_cache->param_buff_size;
 +    long tmp_block_size= (long) key_cache->param_block_size;
 +    uint division_limit= (uint)key_cache->param_division_limit;
 +    uint age_threshold=  (uint)key_cache->param_age_threshold;
 +    uint changed_blocks_hash_size=  (uint)key_cache->changed_blocks_hash_size;
 +    mysql_mutex_unlock(&LOCK_global_system_variables);
 +    DBUG_RETURN(!resize_key_cache(key_cache, tmp_block_size,
 +				  tmp_buff_size,
 +				  division_limit, age_threshold,
 +                                  changed_blocks_hash_size));
 +  }
 +  DBUG_RETURN(0);
 +}
 +
 +
 +/**
 +  Change parameters for key cache (like division_limit)
 +*/
 +int ha_change_key_cache_param(KEY_CACHE *key_cache)
 +{
 +  DBUG_ENTER("ha_change_key_cache_param");
 +
 +  if (key_cache->key_cache_inited)
 +  {
 +    mysql_mutex_lock(&LOCK_global_system_variables);
 +    uint division_limit= (uint)key_cache->param_division_limit;
 +    uint age_threshold=  (uint)key_cache->param_age_threshold;
 +    mysql_mutex_unlock(&LOCK_global_system_variables);
 +    change_key_cache_param(key_cache, division_limit, age_threshold);
 +  }
 +  DBUG_RETURN(0);
 +}
 +
 +
 +/**
 +  Repartition key cache 
 +*/
 +int ha_repartition_key_cache(KEY_CACHE *key_cache)
 +{
 +  DBUG_ENTER("ha_repartition_key_cache");
 +
 +  if (key_cache->key_cache_inited)
 +  {
 +    mysql_mutex_lock(&LOCK_global_system_variables);
 +    size_t tmp_buff_size= (size_t) key_cache->param_buff_size;
 +    long tmp_block_size= (long) key_cache->param_block_size;
 +    uint division_limit= (uint)key_cache->param_division_limit;
 +    uint age_threshold=  (uint)key_cache->param_age_threshold;
 +    uint partitions=     (uint)key_cache->param_partitions;
 +    uint changed_blocks_hash_size=  (uint)key_cache->changed_blocks_hash_size;
 +    mysql_mutex_unlock(&LOCK_global_system_variables);
 +    DBUG_RETURN(!repartition_key_cache(key_cache, tmp_block_size,
 +				       tmp_buff_size,
 +				       division_limit, age_threshold,
 +                                       changed_blocks_hash_size,
 +                                       partitions));
 +  }
 +  DBUG_RETURN(0);
 +}
 +
 +
 +/**
 +  Move all tables from one key cache to another one.
 +*/
 +int ha_change_key_cache(KEY_CACHE *old_key_cache,
 +			KEY_CACHE *new_key_cache)
 +{
 +  mi_change_key_cache(old_key_cache, new_key_cache);
 +  return 0;
 +}
 +
 +
 +static my_bool discover_handlerton(THD *thd, plugin_ref plugin,
 +                                   void *arg)
 +{
 +  TABLE_SHARE *share= (TABLE_SHARE *)arg;
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->discover_table)
 +  {
 +    share->db_plugin= plugin;
 +    int error= hton->discover_table(hton, thd, share);
 +    if (error != HA_ERR_NO_SUCH_TABLE)
 +    {
 +      if (error)
 +      {
 +        DBUG_ASSERT(share->error); // tdc_lock_share needs that
 +        /*
 +          report an error, unless it is "generic" and a more
 +          specific one was already reported
 +        */
 +        if (error != HA_ERR_GENERIC || !thd->is_error())
 +          my_error(ER_GET_ERRNO, MYF(0), error, plugin_name(plugin)->str);
 +        share->db_plugin= 0;
 +      }
 +      else
 +        share->error= OPEN_FRM_OK;
 +
 +      status_var_increment(thd->status_var.ha_discover_count);
 +      return TRUE; // abort the search
 +    }
 +    share->db_plugin= 0;
 +  }
 +
 +  DBUG_ASSERT(share->error == OPEN_FRM_OPEN_ERROR);
 +  return FALSE;    // continue with the next engine
 +}
 +
 +int ha_discover_table(THD *thd, TABLE_SHARE *share)
 +{
 +  DBUG_ENTER("ha_discover_table");
 +  int found;
 +
 +  DBUG_ASSERT(share->error == OPEN_FRM_OPEN_ERROR);   // share is not OK yet
 +
 +  if (!engines_with_discover)
 +    found= FALSE;
 +  else if (share->db_plugin)
 +    found= discover_handlerton(thd, share->db_plugin, share);
 +  else
 +    found= plugin_foreach(thd, discover_handlerton,
 +                        MYSQL_STORAGE_ENGINE_PLUGIN, share);
 +  
 +  if (!found)
 +    open_table_error(share, OPEN_FRM_OPEN_ERROR, ENOENT); // not found
 +
 +  DBUG_RETURN(share->error != OPEN_FRM_OK);
 +}
 +
 +static my_bool file_ext_exists(char *path, size_t path_len, const char *ext)
 +{
 +  strmake(path + path_len, ext, FN_REFLEN - path_len);
 +  return !access(path, F_OK);
 +}
 +
 +struct st_discover_existence_args
 +{
 +  char *path;
 +  size_t  path_len;
 +  const char *db, *table_name;
 +  handlerton *hton;
 +  bool frm_exists;
 +};
 +
 +static my_bool discover_existence(THD *thd, plugin_ref plugin,
 +                                  void *arg)
 +{
 +  st_discover_existence_args *args= (st_discover_existence_args*)arg;
 +  handlerton *ht= plugin_hton(plugin);
 +  if (ht->state != SHOW_OPTION_YES || !ht->discover_table_existence)
 +    return args->frm_exists;
 +
 +  args->hton= ht;
 +
 +  if (ht->discover_table_existence == ext_based_existence)
 +    return file_ext_exists(args->path, args->path_len,
 +                           ht->tablefile_extensions[0]);
 +
 +  return ht->discover_table_existence(ht, args->db, args->table_name);
 +}
 +
 +class Table_exists_error_handler : public Internal_error_handler
 +{
 +public:
 +  Table_exists_error_handler()
 +    : m_handled_errors(0), m_unhandled_errors(0)
 +  {}
 +
 +  bool handle_condition(THD *thd,
 +                        uint sql_errno,
 +                        const char* sqlstate,
 +                        Sql_condition::enum_warning_level level,
 +                        const char* msg,
 +                        Sql_condition ** cond_hdl)
 +  {
 +    *cond_hdl= NULL;
 +    if (sql_errno == ER_NO_SUCH_TABLE ||
 +        sql_errno == ER_NO_SUCH_TABLE_IN_ENGINE ||
 +        sql_errno == ER_WRONG_OBJECT)
 +    {
 +      m_handled_errors++;
 +      return TRUE;
 +    }
 +
 +    if (level == Sql_condition::WARN_LEVEL_ERROR)
 +      m_unhandled_errors++;
 +    return FALSE;
 +  }
 +
 +  bool safely_trapped_errors()
 +  {
 +    return ((m_handled_errors > 0) && (m_unhandled_errors == 0));
 +  }
 +
 +private:
 +  int m_handled_errors;
 +  int m_unhandled_errors;
 +};
 +
 +/**
 +  Check if a given table exists, without doing a full discover, if possible
 +
 +  If the 'hton' is not NULL, it's set to the handlerton of the storage engine
 +  of this table, or to view_pseudo_hton if the frm belongs to a view.
 +
 +  This function takes discovery correctly into account. If frm is found,
 +  it discovers the table to make sure it really exists in the engine.
 +  If no frm is found it discovers the table, in case it still exists in
 +  the engine.
 +
 +  While it tries to cut corners (don't open .frm if no discovering engine is
 +  enabled, no full discovery if all discovering engines support
 +  discover_table_existence, etc), it still *may* be quite expensive
 +  and must be used sparingly.
 +
 +  @retval true    Table exists (even if the error occurred, like bad frm)
 +  @retval false   Table does not exist (one can do CREATE TABLE table_name)
 +
 +  @note if frm exists and the table in engine doesn't, *hton will be set,
 +        but the return value will be false.
 +
 +  @note if frm file exists, but the table cannot be opened (engine not
 +        loaded, frm is invalid), the return value will be true, but
 +        *hton will be NULL.
 +*/
 +bool ha_table_exists(THD *thd, const char *db, const char *table_name,
 +                     handlerton **hton)
 +{
 +  handlerton *dummy;
 +  DBUG_ENTER("ha_table_exists");
 +
 +  if (hton)
 +    *hton= 0;
 +  else if (engines_with_discover)
 +    hton= &dummy;
 +
 +  TDC_element *element= tdc_lock_share(thd, db, table_name);
 +  if (element && element != MY_ERRPTR)
 +  {
 +    if (hton)
 +      *hton= element->share->db_type();
 +    tdc_unlock_share(element);
 +    DBUG_RETURN(TRUE);
 +  }
 +
 +  char path[FN_REFLEN + 1];
 +  size_t path_len = build_table_filename(path, sizeof(path) - 1,
 +                                         db, table_name, "", 0);
 +  st_discover_existence_args args= {path, path_len, db, table_name, 0, true};
 +
 +  if (file_ext_exists(path, path_len, reg_ext))
 +  {
 +    bool exists= true;
 +    if (hton)
 +    {
 +      enum legacy_db_type db_type;
 +      if (dd_frm_type(thd, path, &db_type) != FRMTYPE_VIEW)
 +      {
 +        handlerton *ht= ha_resolve_by_legacy_type(thd, db_type);
 +        if ((*hton= ht))
 +          // verify that the table really exists
 +          exists= discover_existence(thd,
 +                             plugin_int_to_ref(hton2plugin[ht->slot]), &args);
 +      }
 +      else
 +        *hton= view_pseudo_hton;
 +    }
 +    DBUG_RETURN(exists);
 +  }
 +
 +  args.frm_exists= false;
 +  if (plugin_foreach(thd, discover_existence, MYSQL_STORAGE_ENGINE_PLUGIN,
 +                     &args))
 +  {
 +    if (hton)
 +      *hton= args.hton;
 +    DBUG_RETURN(TRUE);
 +  }
 +
 +
 +  if (need_full_discover_for_existence)
 +  {
 +    TABLE_LIST table;
 +    uint flags = GTS_TABLE | GTS_VIEW;
 +
 +    if (!hton)
 +      flags|= GTS_NOLOCK;
 +
 +    Table_exists_error_handler no_such_table_handler;
 +    thd->push_internal_handler(&no_such_table_handler);
 +    table.init_one_table(db, strlen(db), table_name, strlen(table_name),
 +                         table_name, TL_READ);
 +    TABLE_SHARE *share= tdc_acquire_share(thd, &table, flags);
 +    thd->pop_internal_handler();
 +
 +    if (hton && share)
 +    {
 +      *hton= share->db_type();
 +      tdc_release_share(share);
 +    }
 +
 +    // the table doesn't exist if we've caught ER_NO_SUCH_TABLE and nothing else
 +    DBUG_RETURN(!no_such_table_handler.safely_trapped_errors());
 +  }
 +
 +  DBUG_RETURN(FALSE);
 +}
 +
 +/**
 +  Discover all table names in a given database
 +*/
 +extern "C" {
 +
 +static int cmp_file_names(const void *a, const void *b)
 +{
 +  CHARSET_INFO *cs= character_set_filesystem;
 +  char *aa= ((FILEINFO *)a)->name;
 +  char *bb= ((FILEINFO *)b)->name;
 +  return my_strnncoll(cs, (uchar*)aa, strlen(aa), (uchar*)bb, strlen(bb));
 +}
 +
 +static int cmp_table_names(LEX_STRING * const *a, LEX_STRING * const *b)
 +{
 +  return my_strnncoll(&my_charset_bin, (uchar*)((*a)->str), (*a)->length,
 +                                       (uchar*)((*b)->str), (*b)->length);
 +}
 +
 +}
 +
 +Discovered_table_list::Discovered_table_list(THD *thd_arg,
 +                 Dynamic_array<LEX_STRING*> *tables_arg,
 +                 const LEX_STRING *wild_arg) :
 +  thd(thd_arg), with_temps(false), tables(tables_arg)
 +{
 +  if (wild_arg->str && wild_arg->str[0])
 +  {
 +    wild= wild_arg->str;
 +    wend= wild + wild_arg->length;
 +  }
 +  else
 +    wild= 0;
 +}
 +
 +bool Discovered_table_list::add_table(const char *tname, size_t tlen)
 +{
 +  /*
 +    TODO Check with_temps and filter out temp tables.
 +    Implement the check, when we'll have at least one affected engine (with
 +    custom discover_table_names() method, that calls add_table() directly).
 +    Note: avoid comparing the same name twice (here and in add_file).
 +  */
 +  if (wild && my_wildcmp(table_alias_charset, tname, tname + tlen, wild, wend,
 +                         wild_prefix, wild_one, wild_many))
 +      return 0;
 +
 +  LEX_STRING *name= thd->make_lex_string(tname, tlen);
 +  if (!name || tables->append(name))
 +    return 1;
 +  return 0;
 +}
 +
 +bool Discovered_table_list::add_file(const char *fname)
 +{
 +  bool is_temp= strncmp(fname, STRING_WITH_LEN(tmp_file_prefix)) == 0;
 +
 +  if (is_temp && !with_temps)
 +    return 0;
 +
 +  char tname[SAFE_NAME_LEN + 1];
 +  size_t tlen= filename_to_tablename(fname, tname, sizeof(tname), is_temp);
 +  return add_table(tname, tlen);
 +}
 +
 +
 +void Discovered_table_list::sort()
 +{
 +  tables->sort(cmp_table_names);
 +}
 +
 +void Discovered_table_list::remove_duplicates()
 +{
 +  LEX_STRING **src= tables->front();
 +  LEX_STRING **dst= src;
 +  while (++dst <= tables->back())
 +  {
 +    LEX_STRING *s= *src, *d= *dst;
 +    DBUG_ASSERT(strncmp(s->str, d->str, MY_MIN(s->length, d->length)) <= 0);
 +    if ((s->length != d->length || strncmp(s->str, d->str, d->length)))
 +    {
 +      src++;
 +      if (src != dst)
 +        *src= *dst;
 +    }
 +  }
 +  tables->elements(src - tables->front() + 1);
 +}
 +
 +struct st_discover_names_args
 +{
 +  LEX_STRING *db;
 +  MY_DIR *dirp;
 +  Discovered_table_list *result;
 +  uint possible_duplicates;
 +};
 +
 +static my_bool discover_names(THD *thd, plugin_ref plugin,
 +                              void *arg)
 +{
 +  st_discover_names_args *args= (st_discover_names_args *)arg;
 +  handlerton *ht= plugin_hton(plugin);
 +
 +  if (ht->state == SHOW_OPTION_YES && ht->discover_table_names)
 +  {
 +    uint old_elements= args->result->tables->elements();
 +    if (ht->discover_table_names(ht, args->db, args->dirp, args->result))
 +      return 1;
 +
 +    /*
 +      hton_ext_based_table_discovery never discovers a table that has
 +      a corresponding .frm file; but custom engine discover methods might
 +    */
 +    if (ht->discover_table_names != hton_ext_based_table_discovery)
 +      args->possible_duplicates+= args->result->tables->elements() - old_elements;
 +  }
 +
 +  return 0;
 +}
 +
 +/**
 +  Return the list of tables
 +
 +  @param thd
 +  @param db         database to look into
 +  @param dirp       list of files in this database (as returned by my_dir())
 +  @param result     the object to return the list of files in
 +  @param reusable   if true, on return, 'dirp' will be a valid list of all
 +                    non-table files. If false, discovery will work much faster,
 +                    but it will leave 'dirp' corrupted and completely unusable,
 +                    only good for my_dirend().
 +
 +  Normally, reusable=false for SHOW and INFORMATION_SCHEMA, and reusable=true
 +  for DROP DATABASE (as it needs to know and delete non-table files).
 +*/
 +
 +int ha_discover_table_names(THD *thd, LEX_STRING *db, MY_DIR *dirp,
 +                            Discovered_table_list *result, bool reusable)
 +{
 +  int error;
 +  DBUG_ENTER("ha_discover_table_names");
 +
 +  if (engines_with_discover_table_names == 0 && !reusable)
 +  {
 +    error= ext_table_discovery_simple(dirp, result);
 +    result->sort();
 +  }
 +  else
 +  {
 +    st_discover_names_args args= {db, dirp, result, 0};
 +
 +    /* extension_based_table_discovery relies on dirp being sorted */
 +    my_qsort(dirp->dir_entry, dirp->number_of_files,
 +             sizeof(FILEINFO), cmp_file_names);
 +
 +    error= extension_based_table_discovery(dirp, reg_ext, result) ||
 +           plugin_foreach(thd, discover_names,
 +                            MYSQL_STORAGE_ENGINE_PLUGIN, &args);
 +    result->sort();
 +
 +    if (args.possible_duplicates > 0)
 +      result->remove_duplicates();
 +  }
 +
 +  DBUG_RETURN(error);
 +}
 +
 +
 +/**
 +  Read first row between two ranges.
 +  Store ranges for future calls to read_range_next.
 +
 +  @param start_key		Start key. Is 0 if no min range
 +  @param end_key		End key.  Is 0 if no max range
 +  @param eq_range_arg	        Set to 1 if start_key == end_key
 +  @param sorted		Set to 1 if result should be sorted per key
 +
 +  @note
 +    Record is read into table->record[0]
 +
 +  @retval
 +    0			Found row
 +  @retval
 +    HA_ERR_END_OF_FILE	No rows in range
 +  @retval
 +    \#			Error code
 +*/
 +int handler::read_range_first(const key_range *start_key,
 +			      const key_range *end_key,
 +			      bool eq_range_arg, bool sorted)
 +{
 +  int result;
 +  DBUG_ENTER("handler::read_range_first");
 +
 +  eq_range= eq_range_arg;
 +  set_end_range(end_key);
 +  range_key_part= table->key_info[active_index].key_part;
 +
 +  if (!start_key)			// Read first record
 +    result= ha_index_first(table->record[0]);
 +  else
 +    result= ha_index_read_map(table->record[0],
 +                              start_key->key,
 +                              start_key->keypart_map,
 +                              start_key->flag);
 +  if (result)
 +    DBUG_RETURN((result == HA_ERR_KEY_NOT_FOUND) 
 +		? HA_ERR_END_OF_FILE
 +		: result);
 +
 +  if (compare_key(end_range) <= 0)
 +  {
 +    DBUG_RETURN(0);
 +  }
 +  else
 +  {
 +    /*
 +      The last read row does not fall in the range. So request
 +      storage engine to release row lock if possible.
 +    */
 +    unlock_row();
 +    DBUG_RETURN(HA_ERR_END_OF_FILE);
 +  }
 +}
 +
 +
 +/**
 +  Read next row between two ranges.
 +
 +  @note
 +    Record is read into table->record[0]
 +
 +  @retval
 +    0			Found row
 +  @retval
 +    HA_ERR_END_OF_FILE	No rows in range
 +  @retval
 +    \#			Error code
 +*/
 +int handler::read_range_next()
 +{
 +  int result;
 +  DBUG_ENTER("handler::read_range_next");
 +
 +  if (eq_range)
 +  {
 +    /* We trust that index_next_same always gives a row in range */
 +    DBUG_RETURN(ha_index_next_same(table->record[0],
 +                                   end_range->key,
 +                                   end_range->length));
 +  }
 +  result= ha_index_next(table->record[0]);
 +  if (result)
 +    DBUG_RETURN(result);
 +
 +  if (compare_key(end_range) <= 0)
 +  {
 +    DBUG_RETURN(0);
 +  }
 +  else
 +  {
 +    /*
 +      The last read row does not fall in the range. So request
 +      storage engine to release row lock if possible.
 +    */
 +    unlock_row();
 +    DBUG_RETURN(HA_ERR_END_OF_FILE);
 +  }
 +}
 +
 +
 +void handler::set_end_range(const key_range *end_key)
 +{
 +  end_range= 0;
 +  if (end_key)
 +  {
 +    end_range= &save_end_range;
 +    save_end_range= *end_key;
 +    key_compare_result_on_equal=
 +      ((end_key->flag == HA_READ_BEFORE_KEY) ? 1 :
 +       (end_key->flag == HA_READ_AFTER_KEY) ? -1 : 0);
 +  }
 +}
 +
 +
 +/**
 +  Compare if found key (in row) is over max-value.
 +
 +  @param range		range to compare to row. May be 0 for no range
 +
 +  @see also
 +    key.cc::key_cmp()
 +
 +  @return
 +    The return value is SIGN(key_in_row - range_key):
 +
 +    - 0   : Key is equal to range or 'range' == 0 (no range)
 +    - -1  : Key is less than range
 +    - 1   : Key is larger than range
 +*/
 +int handler::compare_key(key_range *range)
 +{
 +  int cmp;
 +  if (!range || in_range_check_pushed_down)
 +    return 0;					// No max range
 +  cmp= key_cmp(range_key_part, range->key, range->length);
 +  if (!cmp)
 +    cmp= key_compare_result_on_equal;
 +  return cmp;
 +}
 +
 +
 +/*
 +  Same as compare_key() but doesn't check have in_range_check_pushed_down.
 +  This is used by index condition pushdown implementation.
 +*/
 +
 +int handler::compare_key2(key_range *range)
 +{
 +  int cmp;
 +  if (!range)
 +    return 0;					// no max range
 +  cmp= key_cmp(range_key_part, range->key, range->length);
 +  if (!cmp)
 +    cmp= key_compare_result_on_equal;
 +  return cmp;
 +}
 +
 +
 +/**
 +  ICP callback - to be called by an engine to check the pushed condition
 +*/
 +extern "C" enum icp_result handler_index_cond_check(void* h_arg)
 +{
 +  handler *h= (handler*)h_arg;
 +  THD *thd= h->table->in_use;
 +  enum icp_result res;
 +
 +  enum thd_kill_levels abort_at= h->has_transactions() ?
 +    THD_ABORT_SOFTLY : THD_ABORT_ASAP;
 +  if (thd_kill_level(thd) > abort_at)
 +    return ICP_ABORTED_BY_USER;
 +
 +  if (h->end_range && h->compare_key2(h->end_range) > 0)
 +    return ICP_OUT_OF_RANGE;
 +  h->increment_statistics(&SSV::ha_icp_attempts);
 +  if ((res= h->pushed_idx_cond->val_int()? ICP_MATCH : ICP_NO_MATCH) ==
 +      ICP_MATCH)
 +    h->increment_statistics(&SSV::ha_icp_match);
 +  return res;
 +}
 +
 +int handler::index_read_idx_map(uchar * buf, uint index, const uchar * key,
 +                                key_part_map keypart_map,
 +                                enum ha_rkey_function find_flag)
 +{
 +  int error, UNINIT_VAR(error1);
 +
 +  error= ha_index_init(index, 0);
 +  if (!error)
 +  {
 +    error= index_read_map(buf, key, keypart_map, find_flag);
 +    error1= ha_index_end();
 +  }
 +  return error ?  error : error1;
 +}
 +
 +
 +/**
 +  Returns a list of all known extensions.
 +
 +    No mutexes, worst case race is a minor surplus memory allocation
 +    We have to recreate the extension map if mysqld is restarted (for example
 +    within libmysqld)
 +
 +  @retval
 +    pointer		pointer to TYPELIB structure
 +*/
 +static my_bool exts_handlerton(THD *unused, plugin_ref plugin,
 +                               void *arg)
 +{
 +  List<char> *found_exts= (List<char> *) arg;
 +  handlerton *hton= plugin_hton(plugin);
 +  List_iterator_fast<char> it(*found_exts);
 +  const char **ext, *old_ext;
 +
 +  for (ext= hton->tablefile_extensions; *ext; ext++)
 +  {
 +    while ((old_ext= it++))
 +    {
 +      if (!strcmp(old_ext, *ext))
 +        break;
 +    }
 +    if (!old_ext)
 +      found_exts->push_back((char *) *ext);
 +
 +    it.rewind();
 +  }
 +  return FALSE;
 +}
 +
 +TYPELIB *ha_known_exts(void)
 +{
 +  if (!known_extensions.type_names || mysys_usage_id != known_extensions_id)
 +  {
 +    List<char> found_exts;
 +    const char **ext, *old_ext;
 +
 +    known_extensions_id= mysys_usage_id;
 +    found_exts.push_back((char*) TRG_EXT);
 +    found_exts.push_back((char*) TRN_EXT);
 +
 +    plugin_foreach(NULL, exts_handlerton,
 +                   MYSQL_STORAGE_ENGINE_PLUGIN, &found_exts);
 +
 +    ext= (const char **) my_once_alloc(sizeof(char *)*
 +                                       (found_exts.elements+1),
 +                                       MYF(MY_WME | MY_FAE));
 +
 +    DBUG_ASSERT(ext != 0);
 +    known_extensions.count= found_exts.elements;
 +    known_extensions.type_names= ext;
 +
 +    List_iterator_fast<char> it(found_exts);
 +    while ((old_ext= it++))
 +      *ext++= old_ext;
 +    *ext= 0;
 +  }
 +  return &known_extensions;
 +}
 +
 +
 +static bool stat_print(THD *thd, const char *type, uint type_len,
 +                       const char *file, uint file_len,
 +                       const char *status, uint status_len)
 +{
 +  Protocol *protocol= thd->protocol;
 +  protocol->prepare_for_resend();
 +  protocol->store(type, type_len, system_charset_info);
 +  protocol->store(file, file_len, system_charset_info);
 +  protocol->store(status, status_len, system_charset_info);
 +  if (protocol->write())
 +    return TRUE;
 +  return FALSE;
 +}
 +
 +
 +static my_bool showstat_handlerton(THD *thd, plugin_ref plugin,
 +                                   void *arg)
 +{
 +  enum ha_stat_type stat= *(enum ha_stat_type *) arg;
 +  handlerton *hton= plugin_hton(plugin);
 +  if (hton->state == SHOW_OPTION_YES && hton->show_status &&
 +      hton->show_status(hton, thd, stat_print, stat))
 +    return TRUE;
 +  return FALSE;
 +}
 +
 +bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
 +{
 +  List<Item> field_list;
 +  Protocol *protocol= thd->protocol;
 +  MEM_ROOT *mem_root= thd->mem_root;
 +  bool result;
 +
 +  field_list.push_back(new (mem_root) Item_empty_string(thd, "Type", 10),
 +                       mem_root);
 +  field_list.push_back(new (mem_root)
 +                       Item_empty_string(thd, "Name", FN_REFLEN), mem_root);
 +  field_list.push_back(new (mem_root)
 +                       Item_empty_string(thd, "Status", 10),
 +                       mem_root);
 +
 +  if (protocol->send_result_set_metadata(&field_list,
 +                            Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 +    return TRUE;
 +
 +  if (db_type == NULL)
 +  {
 +    result= plugin_foreach(thd, showstat_handlerton,
 +                           MYSQL_STORAGE_ENGINE_PLUGIN, &stat);
 +  }
 +  else
 +  {
 +    if (db_type->state != SHOW_OPTION_YES)
 +    {
 +      const LEX_STRING *name= hton_name(db_type);
 +      result= stat_print(thd, name->str, name->length,
 +                         "", 0, "DISABLED", 8) ? 1 : 0;
 +    }
 +    else
 +    {
 +      result= db_type->show_status &&
 +              db_type->show_status(db_type, thd, stat_print, stat) ? 1 : 0;
 +    }
 +  }
 +
 +  /*
 +    We also check thd->is_error() as Innodb may return 0 even if
 +    there was an error.
 +  */
 +  if (!result && !thd->is_error())
 +    my_eof(thd);
 +  else if (!thd->is_error())
 +    my_error(ER_GET_ERRNO, MYF(0), errno, hton_name(db_type)->str);
 +  return result;
 +}
 +
 +/*
 +  Function to check if the conditions for row-based binlogging is
 +  correct for the table.
 +
 +  A row in the given table should be replicated if:
 +  - It's not called by partition engine
 +  - Row-based replication is enabled in the current thread
 +  - The binlog is enabled
 +  - It is not a temporary table
 +  - The binary log is open
 +  - The database the table resides in shall be binlogged (binlog_*_db rules)
 +  - table is not mysql.event
 +
 +  RETURN VALUE
 +    0  No binary logging in row format
 +    1  Row needs to be logged
 +*/
 +
 +inline bool handler::check_table_binlog_row_based(bool binlog_row)
 +{
 +  if (unlikely((table->in_use->variables.sql_log_bin_off)))
 +    return 0;                            /* Called by partitioning engine */
 +  if (unlikely((!check_table_binlog_row_based_done)))
 +  {
 +    check_table_binlog_row_based_done= 1;
 +    check_table_binlog_row_based_result=
 +      check_table_binlog_row_based_internal(binlog_row);
 +  }
 +  return check_table_binlog_row_based_result;
 +}
 +
 +bool handler::check_table_binlog_row_based_internal(bool binlog_row)
 +{
 +  THD *thd= table->in_use;
 +
 +#ifdef WITH_WSREP
 +  /* only InnoDB tables will be replicated through binlog emulation */
 +  if (binlog_row &&
 +      ((WSREP_EMULATE_BINLOG(thd) &&
 +       table->file->partition_ht()->db_type != DB_TYPE_INNODB) ||
 +       (thd->wsrep_ignore_table == true)))
 +    return 0;
 +#endif
 +
 +  return (table->s->cached_row_logging_check &&
 +          thd->is_current_stmt_binlog_format_row() &&
 +          /*
 +            Wsrep partially enables binary logging if it have not been
 +            explicitly turned on. As a result we return 'true' if we are in
 +            wsrep binlog emulation mode and the current thread is not a wsrep
 +            applier or replayer thread. This decision is not affected by
 +            @@sql_log_bin as we want the events to make into the binlog
 +            cache only to filter them later before they make into binary log
 +            file.
 +
 +            However, we do return 'false' if binary logging was temporarily
 +            turned off (see tmp_disable_binlog(A)).
 +
 +            Otherwise, return 'true' if binary logging is on.
 +          */
 +          IF_WSREP(((WSREP_EMULATE_BINLOG(thd) &&
 +                     (thd->wsrep_exec_mode != REPL_RECV)) ||
 +                    ((WSREP(thd) ||
 +                      (thd->variables.option_bits & OPTION_BIN_LOG)) &&
 +                     mysql_bin_log.is_open())),
 +                   (thd->variables.option_bits & OPTION_BIN_LOG) &&
 +                   mysql_bin_log.is_open()));
 +}
 +
 +
 +/** @brief
 +   Write table maps for all (manually or automatically) locked tables
 +   to the binary log. Also, if binlog_annotate_row_events is ON,
 +   write Annotate_rows event before the first table map.
 +
 +   SYNOPSIS
 +     write_locked_table_maps()
 +       thd     Pointer to THD structure
 +
 +   DESCRIPTION
 +       This function will generate and write table maps for all tables
 +       that are locked by the thread 'thd'.
 +
 +   RETURN VALUE
 +       0   All OK
 +       1   Failed to write all table maps
 +
 +   SEE ALSO
 +       THD::lock
 +*/
 +
 +static int write_locked_table_maps(THD *thd)
 +{
 +  DBUG_ENTER("write_locked_table_maps");
 +  DBUG_PRINT("enter", ("thd: 0x%lx  thd->lock: 0x%lx "
 +                       "thd->extra_lock: 0x%lx",
 +                       (long) thd, (long) thd->lock, (long) thd->extra_lock));
 +
 +  DBUG_PRINT("debug", ("get_binlog_table_maps(): %d", thd->get_binlog_table_maps()));
 +
 +  MYSQL_LOCK *locks[2];
 +  locks[0]= thd->extra_lock;
 +  locks[1]= thd->lock;
 +  my_bool with_annotate= thd->variables.binlog_annotate_row_events &&
 +    thd->query() && thd->query_length();
 +
 +  for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i )
 +  {
 +    MYSQL_LOCK const *const lock= locks[i];
 +    if (lock == NULL)
 +      continue;
 +
 +    TABLE **const end_ptr= lock->table + lock->table_count;
 +    for (TABLE **table_ptr= lock->table ; 
 +         table_ptr != end_ptr ;
 +         ++table_ptr)
 +    {
 +      TABLE *const table= *table_ptr;
 +      DBUG_PRINT("info", ("Checking table %s", table->s->table_name.str));
 +      if (table->current_lock == F_WRLCK &&
 +          table->file->check_table_binlog_row_based(0))
 +      {
 +        /*
 +          We need to have a transactional behavior for SQLCOM_CREATE_TABLE
 +          (e.g. CREATE TABLE... SELECT * FROM TABLE) in order to keep a
 +          compatible behavior with the STMT based replication even when
 +          the table is not transactional. In other words, if the operation
 +          fails while executing the insert phase nothing is written to the
 +          binlog.
 +
 +          Note that at this point, we check the type of a set of tables to
 +          create the table map events. In the function binlog_log_row(),
 +          which calls the current function, we check the type of the table
 +          of the current row.
 +        */
 +        bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
 +          table->file->has_transactions();
 +        int const error= thd->binlog_write_table_map(table, has_trans,
 +                                                     &with_annotate);
 +        /*
 +          If an error occurs, it is the responsibility of the caller to
 +          roll back the transaction.
 +        */
 +        if (unlikely(error))
 +          DBUG_RETURN(1);
 +      }
 +    }
 +  }
 +  DBUG_RETURN(0);
 +}
 +
 +
 +typedef bool Log_func(THD*, TABLE*, bool, const uchar*, const uchar*);
 +
 +
 +
 +static int binlog_log_row_internal(TABLE* table,
 +                                   const uchar *before_record,
 +                                   const uchar *after_record,
 +                                   Log_func *log_func)
 +{
 +  bool error= 0;
 +  THD *const thd= table->in_use;
 +
 +  /*
 +    If there are no table maps written to the binary log, this is
 +    the first row handled in this statement. In that case, we need
 +    to write table maps for all locked tables to the binary log.
 +  */
 +  if (likely(!(error= ((thd->get_binlog_table_maps() == 0 &&
 +                        write_locked_table_maps(thd))))))
 +  {
 +    /*
 +      We need to have a transactional behavior for SQLCOM_CREATE_TABLE
 +      (i.e. CREATE TABLE... SELECT * FROM TABLE) in order to keep a
 +      compatible behavior with the STMT based replication even when
 +      the table is not transactional. In other words, if the operation
 +      fails while executing the insert phase nothing is written to the
 +      binlog.
 +    */
 +    bool const has_trans= thd->lex->sql_command == SQLCOM_CREATE_TABLE ||
 +      table->file->has_transactions();
 +    error= (*log_func)(thd, table, has_trans, before_record, after_record);
 +  }
 +  return error ? HA_ERR_RBR_LOGGING_FAILED : 0;
 +}
 +
 +static inline int binlog_log_row(TABLE* table,
 +                                 const uchar *before_record,
 +                                 const uchar *after_record,
 +                                 Log_func *log_func)
 +{
 +  if (!table->file->check_table_binlog_row_based(1))
 +    return 0;
 +  return binlog_log_row_internal(table, before_record, after_record, log_func);
 +}
 +
 +
 +int handler::ha_external_lock(THD *thd, int lock_type)
 +{
 +  int error;
 +  DBUG_ENTER("handler::ha_external_lock");
 +  /*
 +    Whether this is lock or unlock, this should be true, and is to verify that
 +    if get_auto_increment() was called (thus may have reserved intervals or
 +    taken a table lock), ha_release_auto_increment() was too.
 +  */
 +  DBUG_ASSERT(next_insert_id == 0);
 +  /* Consecutive calls for lock without unlocking in between is not allowed */
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              ((lock_type != F_UNLCK && m_lock_type == F_UNLCK) ||
 +               lock_type == F_UNLCK));
 +  /* SQL HANDLER call locks/unlock while scanning (RND/INDEX). */
 +  DBUG_ASSERT(inited == NONE || table->open_by_handler);
 +
 +  if (MYSQL_HANDLER_RDLOCK_START_ENABLED() ||
 +      MYSQL_HANDLER_WRLOCK_START_ENABLED() ||
 +      MYSQL_HANDLER_UNLOCK_START_ENABLED())
 +  {
 +    if (lock_type == F_RDLCK)
 +    {
 +      MYSQL_HANDLER_RDLOCK_START(table_share->db.str,
 +                                 table_share->table_name.str);
 +    }
 +    else if (lock_type == F_WRLCK)
 +    {
 +      MYSQL_HANDLER_WRLOCK_START(table_share->db.str,
 +                                 table_share->table_name.str);
 +    }
 +    else if (lock_type == F_UNLCK)
 +    {
 +      MYSQL_HANDLER_UNLOCK_START(table_share->db.str,
 +                                 table_share->table_name.str);
 +    }
 +  }
 +
 +  ha_statistic_increment(&SSV::ha_external_lock_count);
 +
 +  /*
 +    We cache the table flags if the locking succeeded. Otherwise, we
 +    keep them as they were when they were fetched in ha_open().
 +  */
 +  MYSQL_TABLE_LOCK_WAIT(m_psi, PSI_TABLE_EXTERNAL_LOCK, lock_type,
 +    { error= external_lock(thd, lock_type); })
 +
 +  DBUG_EXECUTE_IF("external_lock_failure", error= HA_ERR_GENERIC;);
 +
 +  if (error == 0)
 +  {
 +    m_lock_type= lock_type;
 +    cached_table_flags= table_flags();
 +    if (table_share->tmp_table == NO_TMP_TABLE)
 +      mysql_audit_external_lock(thd, table_share, lock_type);
 +  }
 +
 +  if (MYSQL_HANDLER_RDLOCK_DONE_ENABLED() ||
 +      MYSQL_HANDLER_WRLOCK_DONE_ENABLED() ||
 +      MYSQL_HANDLER_UNLOCK_DONE_ENABLED())
 +  {
 +    if (lock_type == F_RDLCK)
 +    {
 +      MYSQL_HANDLER_RDLOCK_DONE(error);
 +    }
 +    else if (lock_type == F_WRLCK)
 +    {
 +      MYSQL_HANDLER_WRLOCK_DONE(error);
 +    }
 +    else if (lock_type == F_UNLCK)
 +    {
 +      MYSQL_HANDLER_UNLOCK_DONE(error);
 +    }
 +  }
 +  DBUG_RETURN(error);
 +}
 +
 +
 +/** @brief
 +  Check handler usage and reset state of file to after 'open'
 +*/
 +int handler::ha_reset()
 +{
 +  DBUG_ENTER("ha_reset");
 +  /* Check that we have called all proper deallocation functions */
 +  DBUG_ASSERT((uchar*) table->def_read_set.bitmap +
 +              table->s->column_bitmap_size ==
 +              (uchar*) table->def_write_set.bitmap);
 +  DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set));
 +  DBUG_ASSERT(table->key_read == 0);
 +  /* ensure that ha_index_end / ha_rnd_end has been called */
 +  DBUG_ASSERT(inited == NONE);
 +  /* reset the bitmaps to point to defaults */
 +  table->default_column_bitmaps();
 +  pushed_cond= NULL;
 +  tracker= NULL;
 +  mark_trx_read_write_done= check_table_binlog_row_based_done=
 +    check_table_binlog_row_based_result= 0;
 +  /* Reset information about pushed engine conditions */
 +  cancel_pushed_idx_cond();
 +  /* Reset information about pushed index conditions */
 +  DBUG_RETURN(reset());
 +}
 +
 +
 +int handler::ha_write_row(uchar *buf)
 +{
 +  int error;
 +  Log_func *log_func= Write_rows_log_event::binlog_row_logging_function;
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  DBUG_ENTER("handler::ha_write_row");
 +  DEBUG_SYNC_C("ha_write_row_start");
 +
 +  MYSQL_INSERT_ROW_START(table_share->db.str, table_share->table_name.str);
 +  mark_trx_read_write();
 +  increment_statistics(&SSV::ha_write_count);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_WRITE_ROW, MAX_KEY, 0,
 +                      { error= write_row(buf); })
 +
 +  MYSQL_INSERT_ROW_DONE(error);
 +  if (likely(!error))
 +  {
 +    rows_changed++;
 +    error= binlog_log_row(table, 0, buf, log_func);
 +  }
 +  DEBUG_SYNC_C("ha_write_row_end");
 +  DBUG_RETURN(error);
 +}
 +
 +
 +int handler::ha_update_row(const uchar *old_data, uchar *new_data)
 +{
 +  int error;
 +  Log_func *log_func= Update_rows_log_event::binlog_row_logging_function;
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +
 +  /*
 +    Some storage engines require that the new record is in record[0]
 +    (and the old record is in record[1]).
 +   */
 +  DBUG_ASSERT(new_data == table->record[0]);
 +  DBUG_ASSERT(old_data == table->record[1]);
 +
 +  MYSQL_UPDATE_ROW_START(table_share->db.str, table_share->table_name.str);
 +  mark_trx_read_write();
 +  increment_statistics(&SSV::ha_update_count);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_UPDATE_ROW, active_index, 0,
 +                      { error= update_row(old_data, new_data);})
 +
 +  MYSQL_UPDATE_ROW_DONE(error);
 +  if (likely(!error))
 +  {
 +    rows_changed++;
 +    error= binlog_log_row(table, old_data, new_data, log_func);
 +  }
 +  return error;
 +}
 +
 +int handler::ha_delete_row(const uchar *buf)
 +{
 +  int error;
 +  Log_func *log_func= Delete_rows_log_event::binlog_row_logging_function;
 +  DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
 +              m_lock_type == F_WRLCK);
 +  /*
 +    Normally table->record[0] is used, but sometimes table->record[1] is used.
 +  */
 +  DBUG_ASSERT(buf == table->record[0] ||
 +              buf == table->record[1]);
 +
 +  MYSQL_DELETE_ROW_START(table_share->db.str, table_share->table_name.str);
 +  mark_trx_read_write();
 +  increment_statistics(&SSV::ha_delete_count);
 +
 +  TABLE_IO_WAIT(tracker, m_psi, PSI_TABLE_DELETE_ROW, active_index, 0,
 +    { error= delete_row(buf);})
 +  MYSQL_DELETE_ROW_DONE(error);
 +  if (likely(!error))
 +  {
 +    rows_changed++;
 +    error= binlog_log_row(table, buf, 0, log_func);
 +  }
 +  return error;
 +}
 +
 +
 +
 +/** @brief
 +  use_hidden_primary_key() is called in case of an update/delete when
 +  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
 +  but we don't have a primary key
 +*/
 +void handler::use_hidden_primary_key()
 +{
 +  /* fallback to use all columns in the table to identify row */
 +  table->column_bitmaps_set(&table->s->all_set, table->write_set);
 +}
 +
 +
 +/**
 +  Get an initialized ha_share.
 +
 +  @return Initialized ha_share
 +    @retval NULL    ha_share is not yet initialized.
 +    @retval != NULL previous initialized ha_share.
 +
 +  @note
 +  If not a temp table, then LOCK_ha_data must be held.
 +*/
 +
 +Handler_share *handler::get_ha_share_ptr()
 +{
 +  DBUG_ENTER("handler::get_ha_share_ptr");
 +  DBUG_ASSERT(ha_share && table_share);
 +
 +#ifndef DBUG_OFF
 +  if (table_share->tmp_table == NO_TMP_TABLE)
 +    mysql_mutex_assert_owner(&table_share->LOCK_ha_data);
 +#endif
 +
 +  DBUG_RETURN(*ha_share);
 +}
 +
 +
 +/**
 +  Set ha_share to be used by all instances of the same table/partition.
 +
 +  @param ha_share    Handler_share to be shared.
 +
 +  @note
 +  If not a temp table, then LOCK_ha_data must be held.
 +*/
 +
 +void handler::set_ha_share_ptr(Handler_share *arg_ha_share)
 +{
 +  DBUG_ENTER("handler::set_ha_share_ptr");
 +  DBUG_ASSERT(ha_share);
 +#ifndef DBUG_OFF
 +  if (table_share->tmp_table == NO_TMP_TABLE)
 +    mysql_mutex_assert_owner(&table_share->LOCK_ha_data);
 +#endif
 +
 +  *ha_share= arg_ha_share;
 +  DBUG_VOID_RETURN;
 +}
 +
 +
 +/**
 +  Take a lock for protecting shared handler data.
 +*/
 +
 +void handler::lock_shared_ha_data()
 +{
 +  DBUG_ASSERT(table_share);
 +  if (table_share->tmp_table == NO_TMP_TABLE)
 +    mysql_mutex_lock(&table_share->LOCK_ha_data);
 +}
 +
 +
 +/**
 +  Release lock for protecting ha_share.
 +*/
 +
 +void handler::unlock_shared_ha_data()
 +{
 +  DBUG_ASSERT(table_share);
 +  if (table_share->tmp_table == NO_TMP_TABLE)
 +    mysql_mutex_unlock(&table_share->LOCK_ha_data);
 +}
 +
 +/** @brief
 +  Dummy function which accept information about log files which is not need
 +  by handlers
 +*/
 +void signal_log_not_needed(struct handlerton, char *log_file)
 +{
 +  DBUG_ENTER("signal_log_not_needed");
 +  DBUG_PRINT("enter", ("logfile '%s'", log_file));
 +  DBUG_VOID_RETURN;
 +}
 +
 +void handler::set_lock_type(enum thr_lock_type lock)
 +{
 +  table->reginfo.lock_type= lock;
 +}
 +
 +#ifdef WITH_WSREP
 +/**
 +  @details
 +  This function makes the storage engine to force the victim transaction
 +  to abort. Currently, only innodb has this functionality, but any SE
 +  implementing the wsrep API should provide this service to support
 +  multi-master operation.
 +
 +  @note Aborting the transaction does NOT end it, it still has to
 +  be rolled back with hton->rollback().
 +
 +  @param bf_thd       brute force THD asking for the abort
 +  @param victim_thd   victim THD to be aborted
 +
 +  @return
 +    always 0
 +*/
 +
 +int ha_abort_transaction(THD *bf_thd, THD *victim_thd, my_bool signal)
 +{
 +  DBUG_ENTER("ha_abort_transaction");
 +  if (!WSREP(bf_thd) &&
 +      !(bf_thd->variables.wsrep_OSU_method == WSREP_OSU_RSU &&
 +        bf_thd->wsrep_exec_mode == TOTAL_ORDER)) {
 +    DBUG_RETURN(0);
 +  }
 +
 +  THD_TRANS *trans= &victim_thd->transaction.all;
 +  Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
 +
 +  for (; ha_info; ha_info= ha_info_next)
 +  {
 +    handlerton *hton= ha_info->ht();
 +    if (!hton->abort_transaction)
 +    {
 +      /* Skip warning for binlog SE */
 +      if (hton->db_type != DB_TYPE_BINLOG)
 +      {
 +        WSREP_WARN("Cannot abort transaction.");
 +      }
 +    }
 +    else
 +    {
 +      hton->abort_transaction(hton, bf_thd, victim_thd, signal);
 +    }
 +    ha_info_next= ha_info->next();
 +  }
 +  DBUG_RETURN(0);
 +}
 +
 +void ha_fake_trx_id(THD *thd)
 +{
 +  DBUG_ENTER("ha_fake_trx_id");
 +
 +  bool no_fake_trx_id= true;
 +
 +  if (!WSREP(thd))
 +  {
 +    DBUG_VOID_RETURN;
 +  }
 +
 +  /* Try statement transaction if standard one is not set. */
 +  THD_TRANS *trans= (thd->transaction.all.ha_list) ?  &thd->transaction.all :
 +    &thd->transaction.stmt;
 +
 +  Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
 +
 +  for (; ha_info; ha_info= ha_info_next)
 +  {
 +    handlerton *hton= ha_info->ht();
 +    if (hton->fake_trx_id)
 +    {
 +      hton->fake_trx_id(hton, thd);
 +
 +      /* Got a fake trx id. */
 +      no_fake_trx_id= false;
 +
 +      /*
 +        We need transaction ID from just one storage engine providing
 +        fake_trx_id (which will most likely be the case).
 +      */
 +      break;
 +    }
 +    ha_info_next= ha_info->next();
 +  }
 +
 +  if (unlikely(no_fake_trx_id))
 +    WSREP_WARN("Cannot get fake transaction ID from storage engine.");
 +
 +  DBUG_VOID_RETURN;
 +}
 +#endif /* WITH_WSREP */
 +
 +
 +#ifdef TRANS_LOG_MGM_EXAMPLE_CODE
 +/*
 +  Example of transaction log management functions based on assumption that logs
 +  placed into a directory
 +*/
 +#include <my_dir.h>
 +#include <my_sys.h>
 +int example_of_iterator_using_for_logs_cleanup(handlerton *hton)
 +{
 +  void *buffer;
 +  int res= 1;
 +  struct handler_iterator iterator;
 +  struct handler_log_file_data data;
 +
 +  if (!hton->create_iterator)
 +    return 1; /* iterator creator is not supported */
 +
 +  if ((*hton->create_iterator)(hton, HA_TRANSACTLOG_ITERATOR, &iterator) !=
 +      HA_ITERATOR_OK)
 +  {
 +    /* error during creation of log iterator or iterator is not supported */
 +    return 1;
 +  }
 +  while((*iterator.next)(&iterator, (void*)&data) == 0)
 +  {
 +    printf("%s\n", data.filename.str);
 +    if (data.status == HA_LOG_STATUS_FREE &&
 +        mysql_file_delete(INSTRUMENT_ME,
 +                          data.filename.str, MYF(MY_WME)))
 +      goto err;
 +  }
 +  res= 0;
 +err:
 +  (*iterator.destroy)(&iterator);
 +  return res;
 +}
 +
 +
 +/*
 +  Here we should get info from handler where it save logs but here is
 +  just example, so we use constant.
 +  IMHO FN_ROOTDIR ("/") is safe enough for example, because nobody has
 +  rights on it except root and it consist of directories only at lest for
 +  *nix (sorry, can't find windows-safe solution here, but it is only example).
 +*/
 +#define fl_dir FN_ROOTDIR
 +
 +
 +/** @brief
 +  Dummy function to return log status should be replaced by function which
 +  really detect the log status and check that the file is a log of this
 +  handler.
 +*/
 +enum log_status fl_get_log_status(char *log)
 +{
 +  MY_STAT stat_buff;
 +  if (mysql_file_stat(INSTRUMENT_ME, log, &stat_buff, MYF(0)))
 +    return HA_LOG_STATUS_INUSE;
 +  return HA_LOG_STATUS_NOSUCHLOG;
 +}
 +
 +
 +struct fl_buff
 +{
 +  LEX_STRING *names;
 +  enum log_status *statuses;
 +  uint32 entries;
 +  uint32 current;
 +};
 +
 +
 +int fl_log_iterator_next(struct handler_iterator *iterator,
 +                          void *iterator_object)
 +{
 +  struct fl_buff *buff= (struct fl_buff *)iterator->buffer;
 +  struct handler_log_file_data *data=
 +    (struct handler_log_file_data *) iterator_object;
 +  if (buff->current >= buff->entries)
 +    return 1;
 +  data->filename= buff->names[buff->current];
 +  data->status= buff->statuses[buff->current];
 +  buff->current++;
 +  return 0;
 +}
 +
 +
 +void fl_log_iterator_destroy(struct handler_iterator *iterator)
 +{
 +  my_free(iterator->buffer);
 +}
 +
 +
 +/** @brief
 +  returns buffer, to be assigned in handler_iterator struct
 +*/
 +enum handler_create_iterator_result
 +fl_log_iterator_buffer_init(struct handler_iterator *iterator)
 +{
 +  MY_DIR *dirp;
 +  struct fl_buff *buff;
 +  char *name_ptr;
 +  uchar *ptr;
 +  FILEINFO *file;
 +  uint32 i;
 +
 +  /* to be able to make my_free without crash in case of error */
 +  iterator->buffer= 0;
 +
 +  if (!(dirp = my_dir(fl_dir, MYF(MY_THREAD_SPECIFIC))))
 +  {
 +    return HA_ITERATOR_ERROR;
 +  }
 +  if ((ptr= (uchar*)my_malloc(ALIGN_SIZE(sizeof(fl_buff)) +
 +                             ((ALIGN_SIZE(sizeof(LEX_STRING)) +
 +                               sizeof(enum log_status) +
 +                               + FN_REFLEN + 1) *
 +                              (uint) dirp->number_off_files),
 +                             MYF(MY_THREAD_SPECIFIC))) == 0)
 +  {
 +    return HA_ITERATOR_ERROR;
 +  }
 +  buff= (struct fl_buff *)ptr;
 +  buff->entries= buff->current= 0;
 +  ptr= ptr + (ALIGN_SIZE(sizeof(fl_buff)));
 +  buff->names= (LEX_STRING*) (ptr);
 +  ptr= ptr + ((ALIGN_SIZE(sizeof(LEX_STRING)) *
 +               (uint) dirp->number_off_files));
 +  buff->statuses= (enum log_status *)(ptr);
 +  name_ptr= (char *)(ptr + (sizeof(enum log_status) *
 +                            (uint) dirp->number_off_files));
 +  for (i=0 ; i < (uint) dirp->number_off_files  ; i++)
 +  {
 +    enum log_status st;
 +    file= dirp->dir_entry + i;
 +    if ((file->name[0] == '.' &&
 +         ((file->name[1] == '.' && file->name[2] == '\0') ||
 +            file->name[1] == '\0')))
 +      continue;
 +    if ((st= fl_get_log_status(file->name)) == HA_LOG_STATUS_NOSUCHLOG)
 +      continue;
 +    name_ptr= strxnmov(buff->names[buff->entries].str= name_ptr,
 +                       FN_REFLEN, fl_dir, file->name, NullS);
 +    buff->names[buff->entries].length= (name_ptr -
 +                                        buff->names[buff->entries].str);
 +    buff->statuses[buff->entries]= st;
 +    buff->entries++;
 +  }
 +
 +  iterator->buffer= buff;
 +  iterator->next= &fl_log_iterator_next;
 +  iterator->destroy= &fl_log_iterator_destroy;
 +  my_dirend(dirp);
 +  return HA_ITERATOR_OK;
 +}
 +
 +
 +/* An example of a iterator creator */
 +enum handler_create_iterator_result
 +fl_create_iterator(enum handler_iterator_type type,
 +                   struct handler_iterator *iterator)
 +{
 +  switch(type) {
 +  case HA_TRANSACTLOG_ITERATOR:
 +    return fl_log_iterator_buffer_init(iterator);
 +  default:
 +    return HA_ITERATOR_UNSUPPORTED;
 +  }
 +}
 +#endif /*TRANS_LOG_MGM_EXAMPLE_CODE*/
 +
 +
 +bool HA_CREATE_INFO::check_conflicting_charset_declarations(CHARSET_INFO *cs)
 +{
 +  if ((used_fields & HA_CREATE_USED_DEFAULT_CHARSET) &&
 +      /* DEFAULT vs explicit, or explicit vs DEFAULT */
 +      (((default_table_charset == NULL) != (cs == NULL)) ||
 +      /* Two different explicit character sets */
 +       (default_table_charset && cs &&
 +        !my_charset_same(default_table_charset, cs))))
 +  {
 +    my_error(ER_CONFLICTING_DECLARATIONS, MYF(0),
 +             "CHARACTER SET ", default_table_charset ?
 +                               default_table_charset->csname : "DEFAULT",
 +             "CHARACTER SET ", cs ? cs->csname : "DEFAULT");
 +    return true;
 +  }
 +  return false;
 +}
 +
 +/* Remove all indexes for a given table from global index statistics */
 +
 +static
 +int del_global_index_stats_for_table(THD *thd, uchar* cache_key, uint cache_key_length)
 +{
 +  int res = 0;
 +  DBUG_ENTER("del_global_index_stats_for_table");
 +
 +  mysql_mutex_lock(&LOCK_global_index_stats);
 +
 +  for (uint i= 0; i < global_index_stats.records;)
 +  {
 +    INDEX_STATS *index_stats =
 +      (INDEX_STATS*) my_hash_element(&global_index_stats, i);
 +
 +    /* We search correct db\0table_name\0 string */
 +    if (index_stats &&
 +	index_stats->index_name_length >= cache_key_length &&
 +	!memcmp(index_stats->index, cache_key, cache_key_length))
 +    {
 +      res= my_hash_delete(&global_index_stats, (uchar*)index_stats);
 +      /*
 +          In our HASH implementation on deletion one elements
 +          is moved into a place where a deleted element was,
 +          and the last element is moved into the empty space.
 +          Thus we need to re-examine the current element, but
 +          we don't have to restart the search from the beginning.
 +      */
 +    }
 +    else
 +      i++;
 +  }
 +
 +  mysql_mutex_unlock(&LOCK_global_index_stats);
 +  DBUG_RETURN(res);
 +}
 +
 +/* Remove a table from global table statistics */
 +
 +int del_global_table_stat(THD *thd, LEX_STRING *db, LEX_STRING *table)
 +{
 +  TABLE_STATS *table_stats;
 +  int res = 0;
 +  uchar *cache_key;
 +  uint cache_key_length;
 +  DBUG_ENTER("del_global_table_stat");
 +
 +  cache_key_length= db->length + 1 + table->length + 1;
 +
 +  if(!(cache_key= (uchar *)my_malloc(cache_key_length,
 +                                     MYF(MY_WME | MY_ZEROFILL))))
 +  {
 +    /* Out of memory error already given */
 +    res = 1;
 +    goto end;
 +  }
 +
 +  memcpy(cache_key, db->str, db->length);
 +  memcpy(cache_key + db->length + 1, table->str, table->length);
 +
 +  res= del_global_index_stats_for_table(thd, cache_key, cache_key_length);
 +
 +  mysql_mutex_lock(&LOCK_global_table_stats);
 +
 +  if((table_stats= (TABLE_STATS*) my_hash_search(&global_table_stats,
 +                                                cache_key,
 +                                                cache_key_length)))
 +    res= my_hash_delete(&global_table_stats, (uchar*)table_stats);
 +
 +  my_free(cache_key);
 +  mysql_mutex_unlock(&LOCK_global_table_stats);
 +
 +end:
 +  DBUG_RETURN(res);
 +}
 +
 +/* Remove a index from global index statistics */
 +
 +int del_global_index_stat(THD *thd, TABLE* table, KEY* key_info)
 +{
 +  INDEX_STATS *index_stats;
 +  uint key_length= table->s->table_cache_key.length + key_info->name_length + 1;
 +  int res = 0;
 +  DBUG_ENTER("del_global_index_stat");
 +  mysql_mutex_lock(&LOCK_global_index_stats);
 +
 +  if((index_stats= (INDEX_STATS*) my_hash_search(&global_index_stats,
 +                                                key_info->cache_name,
 +                                                key_length)))
 +    res= my_hash_delete(&global_index_stats, (uchar*)index_stats);
 +
 +  mysql_mutex_unlock(&LOCK_global_index_stats);
 +  DBUG_RETURN(res);
 +}
diff --cc sql/share/errmsg-utf8.txt
index 8dfa519,0000000..7c3c4ab
mode 100644,000000..100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@@ -1,7216 -1,0 +1,7234 @@@
 +languages czech=cze latin2, danish=dan latin1, dutch=nla latin1, english=eng latin1, estonian=est latin7, french=fre latin1, german=ger latin1, greek=greek greek, hungarian=hun latin2, italian=ita latin1, japanese=jpn ujis, korean=kor euckr, norwegian-ny=norwegian-ny latin1, norwegian=nor latin1, polish=pol latin2, portuguese=por latin1, romanian=rum latin2, russian=rus koi8r, serbian=serbian cp1250, slovak=slo latin2, spanish=spa latin1, swedish=swe latin1, ukrainian=ukr koi8u, bulgarian=bgn cp1251;
 +
 +default-language eng
 +
 +start-error-number 1000
 +
 +ER_HASHCHK  
 +        eng "hashchk"
 +ER_NISAMCHK  
 +        eng "isamchk"
 +ER_NO  
 +        cze "NE"
 +        dan "NEJ"
 +        nla "NEE"
 +        eng "NO"
 +        est "EI"
 +        fre "NON"
 +        ger "Nein"
 +        greek "ΟΧΙ"
 +        hun "NEM"
 +        kor "아니오"
 +        nor "NEI"
 +        norwegian-ny "NEI"
 +        pol "NIE"
 +        por "NÃO"
 +        rum "NU"
 +        rus "НЕТ"
 +        serbian "NE"
 +        slo "NIE"
 +        ukr "НІ"
 +ER_YES  
 +        cze "ANO"
 +        dan "JA"
 +        nla "JA"
 +        eng "YES"
 +        est "JAH"
 +        fre "OUI"
 +        ger "Ja"
 +        greek "ΝΑΙ"
 +        hun "IGEN"
 +        ita "SI"
 +        kor "예"
 +        nor "JA"
 +        norwegian-ny "JA"
 +        pol "TAK"
 +        por "SIM"
 +        rum "DA"
 +        rus "ДА"
 +        serbian "DA"
 +        slo "Áno"
 +        spa "SI"
 +        ukr "ТАК"
 +ER_CANT_CREATE_FILE  
 +        cze "Nemohu vytvořit soubor '%-.200s' (chybový kód: %M)"
 +        dan "Kan ikke oprette filen '%-.200s' (Fejlkode: %M)"
 +        nla "Kan file '%-.200s' niet aanmaken (Errcode: %M)"
 +        eng "Can't create file '%-.200s' (errno: %M)"
 +        est "Ei suuda luua faili '%-.200s' (veakood: %M)"
 +        fre "Ne peut créer le fichier '%-.200s' (Errcode: %M)"
 +        ger "Kann Datei '%-.200s' nicht erzeugen (Fehler: %M)"
 +        greek "Αδύνατη η δημιουργία του αρχείου '%-.200s' (κωδικός λάθους: %M)"
 +        hun "A '%-.200s' file nem hozhato letre (hibakod: %M)"
 +        ita "Impossibile creare il file '%-.200s' (errno: %M)"
 +        jpn "ファイル '%-.200s' を作成できません。(エラー番号: %M)"
 +        kor "화일 '%-.200s'를 만들지 못했습니다. (에러번호: %M)"
 +        nor "Kan ikke opprette fila '%-.200s' (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje opprette fila '%-.200s' (Feilkode: %M)"
 +        pol "Nie można stworzyć pliku '%-.200s' (Kod błędu: %M)"
 +        por "Não pode criar o arquivo '%-.200s' (erro no. %M)"
 +        rum "Nu pot sa creez fisierul '%-.200s' (Eroare: %M)"
 +        rus "Невозможно создать файл '%-.200s' (ошибка: %M)"
 +        serbian "Ne mogu da kreiram file '%-.200s' (errno: %M)"
 +        slo "Nemôžem vytvoriť súbor '%-.200s' (chybový kód: %M)"
 +        spa "No puedo crear archivo '%-.200s' (Error: %M)"
 +        swe "Kan inte skapa filen '%-.200s' (Felkod: %M)"
 +        ukr "Не можу створити файл '%-.200s' (помилка: %M)"
 +ER_CANT_CREATE_TABLE  
 +        cze "Nemohu vytvořit tabulku %`s.%`s (chybový kód: %M)"
 +        dan "Kan ikke oprette tabellen %`s.%`s (Fejlkode: %M)"
 +        nla "Kan tabel %`s.%`s niet aanmaken (Errcode: %M)"
 +        eng "Can't create table %`s.%`s (errno: %M)"
 +        jps "%`s.%`s テーブルが作れません.(errno: %M)",
 +        est "Ei suuda luua tabelit %`s.%`s (veakood: %M)"
 +        fre "Ne peut créer la table %`s.%`s (Errcode: %M)"
 +        ger "Kann Tabelle %`s.%`s nicht erzeugen (Fehler: %M)"
 +        greek "Αδύνατη η δημιουργία του πίνακα %`s.%`s (κωδικός λάθους: %M)"
 +        hun "A %`s.%`s tabla nem hozhato letre (hibakod: %M)"
 +        ita "Impossibile creare la tabella %`s.%`s (errno: %M)"
 +        jpn "%`s.%`s テーブルが作れません.(errno: %M)"
 +        kor "테이블 %`s.%`s를 만들지 못했습니다. (에러번호: %M)"
 +        nor "Kan ikke opprette tabellen %`s.%`s (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje opprette tabellen %`s.%`s (Feilkode: %M)"
 +        pol "Nie można stworzyć tabeli %`s.%`s (Kod błędu: %M)"
 +        por "Não pode criar a tabela %`s.%`s (erro no. %M)"
 +        rum "Nu pot sa creez tabla %`s.%`s (Eroare: %M)"
 +        rus "Невозможно создать таблицу %`s.%`s (ошибка: %M)"
 +        serbian "Ne mogu da kreiram tabelu %`s.%`s (errno: %M)"
 +        slo "Nemôžem vytvoriť tabuľku %`s.%`s (chybový kód: %M)"
 +        spa "No puedo crear tabla %`s.%`s (Error: %M)"
 +        swe "Kan inte skapa tabellen %`s.%`s (Felkod: %M)"
 +        ukr "Не можу створити таблицю %`s.%`s (помилка: %M)"
 +ER_CANT_CREATE_DB  
 +        cze "Nemohu vytvořit databázi '%-.192s' (chybový kód: %M)"
 +        dan "Kan ikke oprette databasen '%-.192s' (Fejlkode: %M)"
 +        nla "Kan database '%-.192s' niet aanmaken (Errcode: %M)"
 +        eng "Can't create database '%-.192s' (errno: %M)"
 +        est "Ei suuda luua andmebaasi '%-.192s' (veakood: %M)"
 +        fre "Ne peut créer la base '%-.192s' (Erreur %M)"
 +        ger "Kann Datenbank '%-.192s' nicht erzeugen (Fehler: %M)"
 +        greek "Αδύνατη η δημιουργία της βάσης δεδομένων '%-.192s' (κωδικός λάθους: %M)"
 +        hun "Az '%-.192s' adatbazis nem hozhato letre (hibakod: %M)"
 +        ita "Impossibile creare il database '%-.192s' (errno: %M)"
 +        jpn "データベース '%-.192s' を作成できません。(エラー番号: %M)"
 +        kor "데이타베이스 '%-.192s'를 만들지 못했습니다.. (에러번호: %M)"
 +        nor "Kan ikke opprette databasen '%-.192s' (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje opprette databasen '%-.192s' (Feilkode: %M)"
 +        pol "Nie można stworzyć bazy danych '%-.192s' (Kod błędu: %M)"
 +        por "Não pode criar o banco de dados '%-.192s' (erro no. %M)"
 +        rum "Nu pot sa creez baza de date '%-.192s' (Eroare: %M)"
 +        rus "Невозможно создать базу данных '%-.192s' (ошибка: %M)"
 +        serbian "Ne mogu da kreiram bazu '%-.192s' (errno: %M)"
 +        slo "Nemôžem vytvoriť databázu '%-.192s' (chybový kód: %M)"
 +        spa "No puedo crear base de datos '%-.192s' (Error: %M)"
 +        swe "Kan inte skapa databasen '%-.192s' (Felkod: %M)"
 +        ukr "Не можу створити базу данних '%-.192s' (помилка: %M)"
 +ER_DB_CREATE_EXISTS  
 +        cze "Nemohu vytvořit databázi '%-.192s'; databáze již existuje"
 +        dan "Kan ikke oprette databasen '%-.192s'; databasen eksisterer"
 +        nla "Kan database '%-.192s' niet aanmaken; database bestaat reeds"
 +        eng "Can't create database '%-.192s'; database exists"
 +        est "Ei suuda luua andmebaasi '%-.192s': andmebaas juba eksisteerib"
 +        fre "Ne peut créer la base '%-.192s'; elle existe déjà"
 +        ger "Kann Datenbank '%-.192s' nicht erzeugen. Datenbank existiert bereits"
 +        greek "Αδύνατη η δημιουργία της βάσης δεδομένων '%-.192s'; Η βάση δεδομένων υπάρχει ήδη"
 +        hun "Az '%-.192s' adatbazis nem hozhato letre Az adatbazis mar letezik"
 +        ita "Impossibile creare il database '%-.192s'; il database esiste"
 +        jpn "データベース '%-.192s' を作成できません。データベースはすでに存在します。"
 +        kor "데이타베이스 '%-.192s'를 만들지 못했습니다.. 데이타베이스가 존재함"
 +        nor "Kan ikke opprette databasen '%-.192s'; databasen eksisterer"
 +        norwegian-ny "Kan ikkje opprette databasen '%-.192s'; databasen eksisterer"
 +        pol "Nie można stworzyć bazy danych '%-.192s'; baza danych już istnieje"
 +        por "Não pode criar o banco de dados '%-.192s'; este banco de dados já existe"
 +        rum "Nu pot sa creez baza de date '%-.192s'; baza de date exista deja"
 +        rus "Невозможно создать базу данных '%-.192s'. База данных уже существует"
 +        serbian "Ne mogu da kreiram bazu '%-.192s'; baza već postoji."
 +        slo "Nemôžem vytvoriť databázu '%-.192s'; databáza existuje"
 +        spa "No puedo crear base de datos '%-.192s'; la base de datos ya existe"
 +        swe "Databasen '%-.192s' existerar redan"
 +        ukr "Не можу створити базу данних '%-.192s'. База данних існує"
 +ER_DB_DROP_EXISTS  
 +        cze "Nemohu zrušit databázi '%-.192s', databáze neexistuje"
 +        dan "Kan ikke slette (droppe) '%-.192s'; databasen eksisterer ikke"
 +        nla "Kan database '%-.192s' niet verwijderen; database bestaat niet"
 +        eng "Can't drop database '%-.192s'; database doesn't exist"
 +        est "Ei suuda kustutada andmebaasi '%-.192s': andmebaasi ei eksisteeri"
 +        fre "Ne peut effacer la base '%-.192s'; elle n'existe pas"
 +        ger "Kann Datenbank '%-.192s' nicht löschen; Datenbank nicht vorhanden"
 +        greek "Αδύνατη η διαγραφή της βάσης δεδομένων '%-.192s'. Η βάση δεδομένων δεν υπάρχει"
 +        hun "A(z) '%-.192s' adatbazis nem szuntetheto meg. Az adatbazis nem letezik"
 +        ita "Impossibile cancellare '%-.192s'; il database non esiste"
 +        jpn "データベース '%-.192s' を削除できません。データベースは存在しません。"
 +        kor "데이타베이스 '%-.192s'를 제거하지 못했습니다. 데이타베이스가 존재하지 않음 "
 +        nor "Kan ikke fjerne (drop) '%-.192s'; databasen eksisterer ikke"
 +        norwegian-ny "Kan ikkje fjerne (drop) '%-.192s'; databasen eksisterer ikkje"
 +        pol "Nie można usun?ć bazy danych '%-.192s'; baza danych nie istnieje"
 +        por "Não pode eliminar o banco de dados '%-.192s'; este banco de dados não existe"
 +        rum "Nu pot sa drop baza de date '%-.192s'; baza da date este inexistenta"
 +        rus "Невозможно удалить базу данных '%-.192s'. Такой базы данных нет"
 +        serbian "Ne mogu da izbrišem bazu '%-.192s'; baza ne postoji."
 +        slo "Nemôžem zmazať databázu '%-.192s'; databáza neexistuje"
 +        spa "No puedo eliminar base de datos '%-.192s'; la base de datos no existe"
 +        swe "Kan inte radera databasen '%-.192s'; databasen finns inte"
 +        ukr "Не можу видалити базу данних '%-.192s'. База данних не існує"
 +ER_DB_DROP_DELETE  
 +        cze "Chyba při rušení databáze (nemohu vymazat '%-.192s', chyba %M)"
 +        dan "Fejl ved sletning (drop) af databasen (kan ikke slette '%-.192s', Fejlkode %M)"
 +        nla "Fout bij verwijderen database (kan '%-.192s' niet verwijderen, Errcode: %M)"
 +        eng "Error dropping database (can't delete '%-.192s', errno: %M)"
 +        est "Viga andmebaasi kustutamisel (ei suuda kustutada faili '%-.192s', veakood: %M)"
 +        fre "Ne peut effacer la base '%-.192s' (erreur %M)"
 +        ger "Fehler beim Löschen der Datenbank ('%-.192s' kann nicht gelöscht werden, Fehler: %M)"
 +        greek "Παρουσιάστηκε πρόβλημα κατά τη διαγραφή της βάσης δεδομένων (αδύνατη η διαγραφή '%-.192s', κωδικός λάθους: %M)"
 +        hun "Adatbazis megszuntetesi hiba ('%-.192s' nem torolheto, hibakod: %M)"
 +        ita "Errore durante la cancellazione del database (impossibile cancellare '%-.192s', errno: %M)"
 +        jpn "データベース削除エラー ('%-.192s' を削除できません。エラー番号: %M)"
 +        kor "데이타베이스 제거 에러('%-.192s'를 삭제할 수 없읍니다, 에러번호: %M)"
 +        nor "Feil ved fjerning (drop) av databasen (kan ikke slette '%-.192s', feil %M)"
 +        norwegian-ny "Feil ved fjerning (drop) av databasen (kan ikkje slette '%-.192s', feil %M)"
 +        pol "Bł?d podczas usuwania bazy danych (nie można usun?ć '%-.192s', bł?d %M)"
 +        por "Erro ao eliminar banco de dados (não pode eliminar '%-.192s' - erro no. %M)"
 +        rum "Eroare dropuind baza de date (nu pot sa sterg '%-.192s', Eroare: %M)"
 +        rus "Ошибка при удалении базы данных (невозможно удалить '%-.192s', ошибка: %M)"
 +        serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem '%-.192s', errno: %M)"
 +        slo "Chyba pri mazaní databázy (nemôžem zmazať '%-.192s', chybový kód: %M)"
 +        spa "Error eliminando la base de datos(no puedo borrar '%-.192s', error %M)"
 +        swe "Fel vid radering av databasen (Kan inte radera '%-.192s'. Felkod: %M)"
 +        ukr "Не можу видалити базу данних (Не можу видалити '%-.192s', помилка: %M)"
 +ER_DB_DROP_RMDIR  
 +        cze "Chyba při rušení databáze (nemohu vymazat adresář '%-.192s', chyba %M)"
 +        dan "Fejl ved sletting af database (kan ikke slette folderen '%-.192s', Fejlkode %M)"
 +        nla "Fout bij verwijderen database (kan rmdir '%-.192s' niet uitvoeren, Errcode: %M)"
 +        eng "Error dropping database (can't rmdir '%-.192s', errno: %M)"
 +        est "Viga andmebaasi kustutamisel (ei suuda kustutada kataloogi '%-.192s', veakood: %M)"
 +        fre "Erreur en effaçant la base (rmdir '%-.192s', erreur %M)"
 +        ger "Fehler beim Löschen der Datenbank (Verzeichnis '%-.192s' kann nicht gelöscht werden, Fehler: %M)"
 +        greek "Παρουσιάστηκε πρόβλημα κατά τη διαγραφή της βάσης δεδομένων (αδύνατη η διαγραφή του φακέλλου '%-.192s', κωδικός λάθους: %M)"
 +        hun "Adatbazis megszuntetesi hiba ('%-.192s' nem szuntetheto meg, hibakod: %M)"
 +        ita "Errore durante la cancellazione del database (impossibile rmdir '%-.192s', errno: %M)"
 +       jpn "データベース削除エラー (ディレクトリ '%-.192s' を削除できません。エラー番号: %M)"
 +        kor "데이타베이스 제거 에러(rmdir '%-.192s'를 할 수 없읍니다, 에러번호: %M)"
 +        nor "Feil ved sletting av database (kan ikke slette katalogen '%-.192s', feil %M)"
 +        norwegian-ny "Feil ved sletting av database (kan ikkje slette katalogen '%-.192s', feil %M)"
 +        pol "Bł?d podczas usuwania bazy danych (nie można wykonać rmdir '%-.192s', bł?d %M)"
 +        por "Erro ao eliminar banco de dados (não pode remover diretório '%-.192s' - erro no. %M)"
 +        rum "Eroare dropuind baza de date (nu pot sa rmdir '%-.192s', Eroare: %M)"
 +        rus "Невозможно удалить базу данных (невозможно удалить каталог '%-.192s', ошибка: %M)"
 +        serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem direktorijum '%-.192s', errno: %M)"
 +        slo "Chyba pri mazaní databázy (nemôžem vymazať adresár '%-.192s', chybový kód: %M)"
 +        spa "Error eliminando la base de datos (No puedo borrar directorio '%-.192s', error %M)"
 +        swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.192s'. Felkod: %M)"
 +        ukr "Не можу видалити базу данних (Не можу видалити теку '%-.192s', помилка: %M)"
 +ER_CANT_DELETE_FILE  
 +        cze "Chyba při výmazu '%-.192s' (chybový kód: %M)"
 +        dan "Fejl ved sletning af '%-.192s' (Fejlkode: %M)"
 +        nla "Fout bij het verwijderen van '%-.192s' (Errcode: %M)"
 +        eng "Error on delete of '%-.192s' (errno: %M)"
 +        est "Viga '%-.192s' kustutamisel (veakood: %M)"
 +        fre "Erreur en effaçant '%-.192s' (Errcode: %M)"
 +        ger "Fehler beim Löschen von '%-.192s' (Fehler: %M)"
 +        greek "Παρουσιάστηκε πρόβλημα κατά τη διαγραφή '%-.192s' (κωδικός λάθους: %M)"
 +        hun "Torlesi hiba: '%-.192s' (hibakod: %M)"
 +        ita "Errore durante la cancellazione di '%-.192s' (errno: %M)"
 +	jpn "ファイル '%-.192s' の削除エラー (エラー番号: %M)"
 +        kor "'%-.192s' 삭제 중 에러 (에러번호: %M)"
 +        nor "Feil ved sletting av '%-.192s' (Feilkode: %M)"
 +        norwegian-ny "Feil ved sletting av '%-.192s' (Feilkode: %M)"
 +        pol "Bł?d podczas usuwania '%-.192s' (Kod błędu: %M)"
 +        por "Erro na remoção de '%-.192s' (erro no. %M)"
 +        rum "Eroare incercind sa delete '%-.192s' (Eroare: %M)"
 +        rus "Ошибка при удалении '%-.192s' (ошибка: %M)"
 +        serbian "Greška pri brisanju '%-.192s' (errno: %M)"
 +        slo "Chyba pri mazaní '%-.192s' (chybový kód: %M)"
 +        spa "Error en el borrado de '%-.192s' (Error: %M)"
 +        swe "Kan inte radera filen '%-.192s' (Felkod: %M)"
 +        ukr "Не можу видалити '%-.192s' (помилка: %M)"
 +ER_CANT_FIND_SYSTEM_REC  
 +        cze "Nemohu číst záznam v systémové tabulce"
 +        dan "Kan ikke læse posten i systemfolderen"
 +        nla "Kan record niet lezen in de systeem tabel"
 +        eng "Can't read record in system table"
 +        est "Ei suuda lugeda kirjet süsteemsest tabelist"
 +        fre "Ne peut lire un enregistrement de la table 'system'"
 +        ger "Datensatz in der Systemtabelle nicht lesbar"
 +        greek "Αδύνατη η ανάγνωση εγγραφής από πίνακα του συστήματος"
 +        hun "Nem olvashato rekord a rendszertablaban"
 +        ita "Impossibile leggere il record dalla tabella di sistema"
 +        jpn "システム表のレコードを読み込めません。"
 +        kor "system 테이블에서 레코드를 읽을 수 없습니다."
 +        nor "Kan ikke lese posten i systemkatalogen"
 +        norwegian-ny "Kan ikkje lese posten i systemkatalogen"
 +        pol "Nie można odczytać rekordu z tabeli systemowej"
 +        por "Não pode ler um registro numa tabela do sistema"
 +        rum "Nu pot sa citesc cimpurile in tabla de system (system table)"
 +        rus "Невозможно прочитать запись в системной таблице"
 +        serbian "Ne mogu da pročitam slog iz sistemske tabele"
 +        slo "Nemôžem čítať záznam v systémovej tabuľke"
 +        spa "No puedo leer el registro en la tabla del sistema"
 +        swe "Hittar inte posten i systemregistret"
 +        ukr "Не можу зчитати запис з системної таблиці"
 +ER_CANT_GET_STAT  
 +        cze "Nemohu získat stav '%-.200s' (chybový kód: %M)"
 +        dan "Kan ikke læse status af '%-.200s' (Fejlkode: %M)"
 +        nla "Kan de status niet krijgen van '%-.200s' (Errcode: %M)"
 +        eng "Can't get status of '%-.200s' (errno: %M)"
 +        est "Ei suuda lugeda '%-.200s' olekut (veakood: %M)"
 +        fre "Ne peut obtenir le status de '%-.200s' (Errcode: %M)"
 +        ger "Kann Status von '%-.200s' nicht ermitteln (Fehler: %M)"
 +        greek "Αδύνατη η λήψη πληροφοριών για την κατάσταση του '%-.200s' (κωδικός λάθους: %M)"
 +        hun "A(z) '%-.200s' statusza nem allapithato meg (hibakod: %M)"
 +        ita "Impossibile leggere lo stato di '%-.200s' (errno: %M)"
 +        jpn "'%-.200s' の状態を取得できません。(エラー番号: %M)"
 +        kor "'%-.200s'의 상태를 얻지 못했습니다. (에러번호: %M)"
 +        nor "Kan ikke lese statusen til '%-.200s' (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje lese statusen til '%-.200s' (Feilkode: %M)"
 +        pol "Nie można otrzymać statusu '%-.200s' (Kod błędu: %M)"
 +        por "Não pode obter o status de '%-.200s' (erro no. %M)"
 +        rum "Nu pot sa obtin statusul lui '%-.200s' (Eroare: %M)"
 +        rus "Невозможно получить статусную информацию о '%-.200s' (ошибка: %M)"
 +        serbian "Ne mogu da dobijem stanje file-a '%-.200s' (errno: %M)"
 +        slo "Nemôžem zistiť stav '%-.200s' (chybový kód: %M)"
 +        spa "No puedo obtener el estado de '%-.200s' (Error: %M)"
 +        swe "Kan inte läsa filinformationen (stat) från '%-.200s' (Felkod: %M)"
 +        ukr "Не можу отримати статус '%-.200s' (помилка: %M)"
 +ER_CANT_GET_WD  
 +        cze "Chyba při zjišťování pracovní adresář (chybový kód: %M)"
 +        dan "Kan ikke læse aktive folder (Fejlkode: %M)"
 +        nla "Kan de werkdirectory niet krijgen (Errcode: %M)"
 +        eng "Can't get working directory (errno: %M)"
 +        est "Ei suuda identifitseerida jooksvat kataloogi (veakood: %M)"
 +        fre "Ne peut obtenir le répertoire de travail (Errcode: %M)"
 +        ger "Kann Arbeitsverzeichnis nicht ermitteln (Fehler: %M)"
 +        greek "Ο φάκελλος εργασίας δεν βρέθηκε (κωδικός λάθους: %M)"
 +        hun "A munkakonyvtar nem allapithato meg (hibakod: %M)"
 +        ita "Impossibile leggere la directory di lavoro (errno: %M)"
 +        jpn "作業ディレクトリを取得できません。(エラー番号: %M)"
 +        kor "수행 디렉토리를 찾지 못했습니다. (에러번호: %M)"
 +        nor "Kan ikke lese aktiv katalog(Feilkode: %M)"
 +        norwegian-ny "Kan ikkje lese aktiv katalog(Feilkode: %M)"
 +        pol "Nie można rozpoznać aktualnego katalogu (Kod błędu: %M)"
 +        por "Não pode obter o diretório corrente (erro no. %M)"
 +        rum "Nu pot sa obtin directorul current (working directory) (Eroare: %M)"
 +        rus "Невозможно определить рабочий каталог (ошибка: %M)"
 +        serbian "Ne mogu da dobijem trenutni direktorijum (errno: %M)"
 +        slo "Nemôžem zistiť pracovný adresár (chybový kód: %M)"
 +        spa "No puedo acceder al directorio (Error: %M)"
 +        swe "Kan inte inte läsa aktivt bibliotek. (Felkod: %M)"
 +        ukr "Не можу визначити робочу теку (помилка: %M)"
 +ER_CANT_LOCK  
 +        cze "Nemohu uzamknout soubor (chybový kód: %M)"
 +        dan "Kan ikke låse fil (Fejlkode: %M)"
 +        nla "Kan de file niet blokeren (Errcode: %M)"
 +        eng "Can't lock file (errno: %M)"
 +        est "Ei suuda lukustada faili (veakood: %M)"
 +        fre "Ne peut verrouiller le fichier (Errcode: %M)"
 +        ger "Datei kann nicht gesperrt werden (Fehler: %M)"
 +        greek "Το αρχείο δεν μπορεί να κλειδωθεί (κωδικός λάθους: %M)"
 +        hun "A file nem zarolhato. (hibakod: %M)"
 +        ita "Impossibile il locking il file (errno: %M)"
 +        jpn "ファイルをロックできません。(エラー番号: %M)"
 +        kor "화일을 잠그지(lock) 못했습니다. (에러번호: %M)"
 +        nor "Kan ikke låse fila (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje låse fila (Feilkode: %M)"
 +        pol "Nie można zablokować pliku (Kod błędu: %M)"
 +        por "Não pode travar o arquivo (erro no. %M)"
 +        rum "Nu pot sa lock fisierul (Eroare: %M)"
 +        rus "Невозможно поставить блокировку на файле (ошибка: %M)"
 +        serbian "Ne mogu da zaključam file (errno: %M)"
 +        slo "Nemôžem zamknúť súbor (chybový kód: %M)"
 +        spa "No puedo bloquear archivo: (Error: %M)"
 +        swe "Kan inte låsa filen. (Felkod: %M)"
 +        ukr "Не можу заблокувати файл (помилка: %M)"
 +ER_CANT_OPEN_FILE  
 +	cze "Nemohu otevřít soubor '%-.200s' (chybový kód: %M)"
 +        dan "Kan ikke åbne fil: '%-.200s' (Fejlkode: %M)"
 +        nla "Kan de file '%-.200s' niet openen (Errcode: %M)"
 +        eng "Can't open file: '%-.200s' (errno: %M)"
 +        est "Ei suuda avada faili '%-.200s' (veakood: %M)"
 +        fre "Ne peut ouvrir le fichier: '%-.200s' (Errcode: %M)"
 +        ger "Kann Datei '%-.200s' nicht öffnen (Fehler: %M)"
 +        greek "Δεν είναι δυνατό να ανοιχτεί το αρχείο: '%-.200s' (κωδικός λάθους: %M)"
 +        hun "A '%-.200s' file nem nyithato meg (hibakod: %M)"
 +        ita "Impossibile aprire il file: '%-.200s' (errno: %M)"
 +        jpn "ファイル '%-.200s' をオープンできません。(エラー番号: %M)"
 +        kor "화일을 열지 못했습니다.: '%-.200s' (에러번호: %M)"
 +        nor "Kan ikke åpne fila: '%-.200s' (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje åpne fila: '%-.200s' (Feilkode: %M)"
 +        pol "Nie można otworzyć pliku: '%-.200s' (Kod błędu: %M)"
 +        por "Não pode abrir o arquivo '%-.200s' (erro no. %M)"
 +        rum "Nu pot sa deschid fisierul: '%-.200s' (Eroare: %M)"
 +        rus "Невозможно открыть файл: '%-.200s' (ошибка: %M)"
 +        serbian "Ne mogu da otvorim file: '%-.200s' (errno: %M)"
 +        slo "Nemôžem otvoriť súbor: '%-.200s' (chybový kód: %M)"
 +        spa "No puedo abrir archivo: '%-.200s' (Error: %M)"
 +        swe "Kan inte använda '%-.200s' (Felkod: %M)"
 +        ukr "Не можу відкрити файл: '%-.200s' (помилка: %M)"
 +ER_FILE_NOT_FOUND  
 +        cze "Nemohu najít soubor '%-.200s' (chybový kód: %M)"
 +        dan "Kan ikke finde fila: '%-.200s' (Fejlkode: %M)"
 +        nla "Kan de file: '%-.200s' niet vinden (Errcode: %M)"
 +        eng "Can't find file: '%-.200s' (errno: %M)"
 +        est "Ei suuda leida faili '%-.200s' (veakood: %M)"
 +        fre "Ne peut trouver le fichier: '%-.200s' (Errcode: %M)"
 +        ger "Kann Datei '%-.200s' nicht finden (Fehler: %M)"
 +        greek "Δεν βρέθηκε το αρχείο: '%-.200s' (κωδικός λάθους: %M)"
 +        hun "A(z) '%-.200s' file nem talalhato (hibakod: %M)"
 +        ita "Impossibile trovare il file: '%-.200s' (errno: %M)"
 +        jpn "ファイル '%-.200s' が見つかりません。(エラー番号: %M)"
 +        kor "화일을 찾지 못했습니다.: '%-.200s' (에러번호: %M)"
 +        nor "Kan ikke finne fila: '%-.200s' (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje finne fila: '%-.200s' (Feilkode: %M)"
 +        pol "Nie można znaleĽć pliku: '%-.200s' (Kod błędu: %M)"
 +        por "Não pode encontrar o arquivo '%-.200s' (erro no. %M)"
 +        rum "Nu pot sa gasesc fisierul: '%-.200s' (Eroare: %M)"
 +        rus "Невозможно найти файл: '%-.200s' (ошибка: %M)"
 +        serbian "Ne mogu da pronađem file: '%-.200s' (errno: %M)"
 +        slo "Nemôžem nájsť súbor: '%-.200s' (chybový kód: %M)"
 +        spa "No puedo encontrar archivo: '%-.200s' (Error: %M)"
 +        swe "Hittar inte filen '%-.200s' (Felkod: %M)"
 +        ukr "Не можу знайти файл: '%-.200s' (помилка: %M)"
 +ER_CANT_READ_DIR  
 +        cze "Nemohu číst adresář '%-.192s' (chybový kód: %M)"
 +        dan "Kan ikke læse folder '%-.192s' (Fejlkode: %M)"
 +        nla "Kan de directory niet lezen van '%-.192s' (Errcode: %M)"
 +        eng "Can't read dir of '%-.192s' (errno: %M)"
 +        est "Ei suuda lugeda kataloogi '%-.192s' (veakood: %M)"
 +        fre "Ne peut lire le répertoire de '%-.192s' (Errcode: %M)"
 +        ger "Verzeichnis von '%-.192s' nicht lesbar (Fehler: %M)"
 +        greek "Δεν είναι δυνατό να διαβαστεί ο φάκελλος του '%-.192s' (κωδικός λάθους: %M)"
 +        hun "A(z) '%-.192s' konyvtar nem olvashato. (hibakod: %M)"
 +        ita "Impossibile leggere la directory di '%-.192s' (errno: %M)"
 +        jpn "ディレクトリ '%-.192s' を読み込めません。(エラー番号: %M)"
 +        kor "'%-.192s'디렉토리를 읽지 못했습니다. (에러번호: %M)"
 +        nor "Kan ikke lese katalogen '%-.192s' (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje lese katalogen '%-.192s' (Feilkode: %M)"
 +        pol "Nie można odczytać katalogu '%-.192s' (Kod błędu: %M)"
 +        por "Não pode ler o diretório de '%-.192s' (erro no. %M)"
 +        rum "Nu pot sa citesc directorul '%-.192s' (Eroare: %M)"
 +        rus "Невозможно прочитать каталог '%-.192s' (ошибка: %M)"
 +        serbian "Ne mogu da pročitam direktorijum '%-.192s' (errno: %M)"
 +        slo "Nemôžem čítať adresár '%-.192s' (chybový kód: %M)"
 +        spa "No puedo leer el directorio de '%-.192s' (Error: %M)"
 +        swe "Kan inte läsa från bibliotek '%-.192s' (Felkod: %M)"
 +        ukr "Не можу прочитати теку '%-.192s' (помилка: %M)"
 +ER_CANT_SET_WD  
 +	cze "Nemohu změnit adresář na '%-.192s' (chybový kód: %M)"
 +        dan "Kan ikke skifte folder til '%-.192s' (Fejlkode: %M)"
 +        nla "Kan de directory niet veranderen naar '%-.192s' (Errcode: %M)"
 +        eng "Can't change dir to '%-.192s' (errno: %M)"
 +        est "Ei suuda siseneda kataloogi '%-.192s' (veakood: %M)"
 +        fre "Ne peut changer le répertoire pour '%-.192s' (Errcode: %M)"
 +        ger "Kann nicht in das Verzeichnis '%-.192s' wechseln (Fehler: %M)"
 +        greek "Αδύνατη η αλλαγή του τρέχοντος καταλόγου σε '%-.192s' (κωδικός λάθους: %M)"
 +        hun "Konyvtarvaltas nem lehetseges a(z) '%-.192s'-ba. (hibakod: %M)"
 +        ita "Impossibile cambiare la directory in '%-.192s' (errno: %M)"
 +        jpn "ディレクトリ '%-.192s' に移動できません。(エラー番号: %M)"
 +        kor "'%-.192s'디렉토리로 이동할 수 없었습니다. (에러번호: %M)"
 +        nor "Kan ikke skifte katalog til '%-.192s' (Feilkode: %M)"
 +        norwegian-ny "Kan ikkje skifte katalog til '%-.192s' (Feilkode: %M)"
 +        pol "Nie można zmienić katalogu na '%-.192s' (Kod błędu: %M)"
 +        por "Não pode mudar para o diretório '%-.192s' (erro no. %M)"
 +        rum "Nu pot sa schimb directorul '%-.192s' (Eroare: %M)"
 +        rus "Невозможно перейти в каталог '%-.192s' (ошибка: %M)"
 +        serbian "Ne mogu da promenim direktorijum na '%-.192s' (errno: %M)"
 +        slo "Nemôžem vojsť do adresára '%-.192s' (chybový kód: %M)"
 +        spa "No puedo cambiar al directorio de '%-.192s' (Error: %M)"
 +        swe "Kan inte byta till '%-.192s' (Felkod: %M)"
 +        ukr "Не можу перейти у теку '%-.192s' (помилка: %M)"
 +ER_CHECKREAD  
 +        cze "Záznam byl změněn od posledního čtení v tabulce '%-.192s'"
 +        dan "Posten er ændret siden sidste læsning '%-.192s'"
 +        nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.192s'"
 +        eng "Record has changed since last read in table '%-.192s'"
 +        est "Kirje tabelis '%-.192s' on muutunud viimasest lugemisest saadik"
 +        fre "Enregistrement modifié depuis sa dernière lecture dans la table '%-.192s'"
 +        ger "Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.192s' geändert"
 +        greek "Η εγγραφή έχει αλλάξει από την τελευταία φορά που ανασύρθηκε από τον πίνακα '%-.192s'"
 +        hun "A(z) '%-.192s' tablaban talalhato rekord megvaltozott az utolso olvasas ota"
 +        ita "Il record e` cambiato dall'ultima lettura della tabella '%-.192s'"
 +        jpn "表 '%-.192s' の最後の読み込み時点から、レコードが変化しました。"
 +        kor "테이블 '%-.192s'에서 마지막으로 읽은 후 Record가 변경되었습니다."
 +        nor "Posten har blitt endret siden den ble lest '%-.192s'"
 +        norwegian-ny "Posten har vorte endra sidan den sist vart lesen '%-.192s'"
 +        pol "Rekord został zmieniony od ostaniego odczytania z tabeli '%-.192s'"
 +        por "Registro alterado desde a última leitura da tabela '%-.192s'"
 +        rum "Cimpul a fost schimbat de la ultima citire a tabelei '%-.192s'"
 +        rus "Запись изменилась с момента последней выборки в таблице '%-.192s'"
 +        serbian "Slog je promenjen od zadnjeg čitanja tabele '%-.192s'"
 +        slo "Záznam bol zmenený od posledného čítania v tabuľke '%-.192s'"
 +        spa "El registro ha cambiado desde la ultima lectura de la tabla '%-.192s'"
 +        swe "Posten har förändrats sedan den lästes i register '%-.192s'"
 +        ukr "Запис було змінено з часу останнього читання з таблиці '%-.192s'"
 +ER_DISK_FULL
 +        cze "Disk je plný (%s), čekám na uvolnění nějakého místa ... (chybový kód: %M)"
 +        dan "Ikke mere diskplads (%s). Venter på at få frigjort plads... (Fejlkode: %M)"
 +        nla "Schijf vol (%s). Aan het wachten totdat er ruimte vrij wordt gemaakt... (Errcode: %M)"
 +        eng "Disk full (%s); waiting for someone to free some space... (errno: %M)"
 +        est "Ketas täis (%s). Ootame kuni tekib vaba ruumi... (veakood: %M)"
 +        fre "Disque plein (%s). J'attend que quelqu'un libère de l'espace... (Errcode: %M)"
 +        ger "Festplatte voll (%s). Warte, bis jemand Platz schafft ... (Fehler: %M)"
 +        greek "Δεν υπάρχει χώρος στο δίσκο (%s). Παρακαλώ, περιμένετε να ελευθερωθεί χώρος... (κωδικός λάθους: %M)"
 +        hun "A lemez megtelt (%s). (hibakod: %M)"
 +        ita "Disco pieno (%s). In attesa che qualcuno liberi un po' di spazio... (errno: %M)"
 +        jpn "ディスク領域不足です(%s)。(エラー番号: %M)"
 +        kor "Disk full (%s). 다른 사람이 지울때까지 기다립니다... (에러번호: %M)"
 +        nor "Ikke mer diskplass (%s). Venter på å få frigjort plass... (Feilkode: %M)"
 +        norwegian-ny "Ikkje meir diskplass (%s). Ventar på å få frigjort plass... (Feilkode: %M)"
 +        pol "Dysk pełny (%s). Oczekiwanie na zwolnienie miejsca... (Kod błędu: %M)"
 +        por "Disco cheio (%s). Aguardando alguém liberar algum espaço... (erro no. %M)"
 +        rum "Hard-disk-ul este plin (%s). Astept sa se elibereze ceva spatiu... (Eroare: %M)"
 +        rus "Диск заполнен. (%s). Ожидаем, пока кто-то не уберет после себя мусор... (ошибка: %M)"
 +        serbian "Disk je pun (%s). Čekam nekoga da dođe i oslobodi nešto mesta... (errno: %M)"
 +        slo "Disk je plný (%s), čakám na uvoľnenie miesta... (chybový kód: %M)"
 +        spa "Disco lleno (%s). Esperando para que se libere algo de espacio... (Error: %M)"
 +        swe "Disken är full (%s). Väntar tills det finns ledigt utrymme... (Felkod: %M)"
 +        ukr "Диск заповнений (%s). Вичикую, доки звільниться трохи місця... (помилка: %M)"
 +ER_DUP_KEY 23000 
 +        cze "Nemohu zapsat, zdvojený klíč v tabulce '%-.192s'"
 +        dan "Kan ikke skrive, flere ens nøgler i tabellen '%-.192s'"
 +        nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.192s'"
 +        eng "Can't write; duplicate key in table '%-.192s'"
 +        est "Ei saa kirjutada, korduv võti tabelis '%-.192s'"
 +        fre "Ecriture impossible, doublon dans une clé de la table '%-.192s'"
 +        ger "Kann nicht speichern, Grund: doppelter Schlüssel in Tabelle '%-.192s'"
 +        greek "Δεν είναι δυνατή η καταχώρηση, η τιμή υπάρχει ήδη στον πίνακα '%-.192s'"
 +        hun "Irasi hiba, duplikalt kulcs a '%-.192s' tablaban."
 +        ita "Scrittura impossibile: chiave duplicata nella tabella '%-.192s'"
 +        jpn "書き込めません。表 '%-.192s' に重複するキーがあります。"
 +        kor "기록할 수 없읍니다., 테이블 '%-.192s'에서 중복 키"
 +        nor "Kan ikke skrive, flere like nøkler i tabellen '%-.192s'"
 +        norwegian-ny "Kan ikkje skrive, flere like nyklar i tabellen '%-.192s'"
 +        pol "Nie można zapisać, powtórzone klucze w tabeli '%-.192s'"
 +        por "Não pode gravar. Chave duplicada na tabela '%-.192s'"
 +        rum "Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.192s'"
 +        rus "Невозможно произвести запись, дублирующийся ключ в таблице '%-.192s'"
 +        serbian "Ne mogu da pišem pošto postoji duplirani ključ u tabeli '%-.192s'"
 +        slo "Nemôžem zapísať, duplikát kľúča v tabuľke '%-.192s'"
 +        spa "No puedo escribir, clave duplicada en la tabla '%-.192s'"
 +        swe "Kan inte skriva, dubbel söknyckel i register '%-.192s'"
 +        ukr "Не можу записати, дублюючийся ключ в таблиці '%-.192s'"
 +ER_ERROR_ON_CLOSE  
 +	cze "Chyba při zavírání '%-.192s' (chybový kód: %M)"
 +        dan "Fejl ved lukning af '%-.192s' (Fejlkode: %M)"
 +        nla "Fout bij het sluiten van '%-.192s' (Errcode: %M)"
 +        eng "Error on close of '%-.192s' (errno: %M)"
 +        est "Viga faili '%-.192s' sulgemisel (veakood: %M)"
 +        fre "Erreur a la fermeture de '%-.192s' (Errcode: %M)"
 +        ger "Fehler beim Schließen von '%-.192s' (Fehler: %M)"
 +        greek "Παρουσιάστηκε πρόβλημα κλείνοντας το '%-.192s' (κωδικός λάθους: %M)"
 +        hun "Hiba a(z) '%-.192s' zarasakor. (hibakod: %M)"
 +        ita "Errore durante la chiusura di '%-.192s' (errno: %M)"
 +        jpn "'%-.192s' のクローズ時エラー (エラー番号: %M)"
 +        kor "'%-.192s'닫는 중 에러 (에러번호: %M)"
 +        nor "Feil ved lukking av '%-.192s' (Feilkode: %M)"
 +        norwegian-ny "Feil ved lukking av '%-.192s' (Feilkode: %M)"
 +        pol "Bł?d podczas zamykania '%-.192s' (Kod błędu: %M)"
 +        por "Erro ao fechar '%-.192s' (erro no. %M)"
 +        rum "Eroare inchizind '%-.192s' (errno: %M)"
 +        rus "Ошибка при закрытии '%-.192s' (ошибка: %M)"
 +        serbian "Greška pri zatvaranju '%-.192s' (errno: %M)"
 +        slo "Chyba pri zatváraní '%-.192s' (chybový kód: %M)"
 +        spa "Error en el cierre de '%-.192s' (Error: %M)"
 +        swe "Fick fel vid stängning av '%-.192s' (Felkod: %M)"
 +        ukr "Не можу закрити '%-.192s' (помилка: %M)"
 +ER_ERROR_ON_READ  
 +        cze "Chyba při čtení souboru '%-.200s' (chybový kód: %M)"
 +        dan "Fejl ved læsning af '%-.200s' (Fejlkode: %M)"
 +        nla "Fout bij het lezen van file '%-.200s' (Errcode: %M)"
 +        eng "Error reading file '%-.200s' (errno: %M)"
 +        est "Viga faili '%-.200s' lugemisel (veakood: %M)"
 +        fre "Erreur en lecture du fichier '%-.200s' (Errcode: %M)"
 +        ger "Fehler beim Lesen der Datei '%-.200s' (Fehler: %M)"
 +        greek "Πρόβλημα κατά την ανάγνωση του αρχείου '%-.200s' (κωδικός λάθους: %M)"
 +        hun "Hiba a '%-.200s'file olvasasakor. (hibakod: %M)"
 +        ita "Errore durante la lettura del file '%-.200s' (errno: %M)"
 +        jpn "ファイル '%-.200s' の読み込みエラー (エラー番号: %M)"
 +        kor "'%-.200s'화일 읽기 에러 (에러번호: %M)"
 +        nor "Feil ved lesing av '%-.200s' (Feilkode: %M)"
 +        norwegian-ny "Feil ved lesing av '%-.200s' (Feilkode: %M)"
 +        pol "Bł?d podczas odczytu pliku '%-.200s' (Kod błędu: %M)"
 +        por "Erro ao ler arquivo '%-.200s' (erro no. %M)"
 +        rum "Eroare citind fisierul '%-.200s' (errno: %M)"
 +        rus "Ошибка чтения файла '%-.200s' (ошибка: %M)"
 +        serbian "Greška pri čitanju file-a '%-.200s' (errno: %M)"
 +        slo "Chyba pri čítaní súboru '%-.200s' (chybový kód: %M)"
 +        spa "Error leyendo el fichero '%-.200s' (Error: %M)"
 +        swe "Fick fel vid läsning av '%-.200s' (Felkod %M)"
 +        ukr "Не можу прочитати файл '%-.200s' (помилка: %M)"
 +ER_ERROR_ON_RENAME  
 +        cze "Chyba při přejmenování '%-.210s' na '%-.210s' (chybový kód: %M)"
 +        dan "Fejl ved omdøbning af '%-.210s' til '%-.210s' (Fejlkode: %M)"
 +        nla "Fout bij het hernoemen van '%-.210s' naar '%-.210s' (Errcode: %M)"
 +        eng "Error on rename of '%-.210s' to '%-.210s' (errno: %M)"
 +        est "Viga faili '%-.210s' ümbernimetamisel '%-.210s'-ks (veakood: %M)"
 +        fre "Erreur en renommant '%-.210s' en '%-.210s' (Errcode: %M)"
 +        ger "Fehler beim Umbenennen von '%-.210s' in '%-.210s' (Fehler: %M)"
 +        greek "Πρόβλημα κατά την μετονομασία του αρχείου '%-.210s' to '%-.210s' (κωδικός λάθους: %M)"
 +        hun "Hiba a '%-.210s' file atnevezesekor '%-.210s'. (hibakod: %M)"
 +        ita "Errore durante la rinominazione da '%-.210s' a '%-.210s' (errno: %M)"
 +        jpn "'%-.210s' の名前を '%-.210s' に変更できません (エラー番号: %M)"
 +        kor "'%-.210s'를 '%-.210s'로 이름 변경중 에러 (에러번호: %M)"
 +        nor "Feil ved omdøping av '%-.210s' til '%-.210s' (Feilkode: %M)"
 +        norwegian-ny "Feil ved omdøyping av '%-.210s' til '%-.210s' (Feilkode: %M)"
 +        pol "Bł?d podczas zmieniania nazwy '%-.210s' na '%-.210s' (Kod błędu: %M)"
 +        por "Erro ao renomear '%-.210s' para '%-.210s' (erro no. %M)"
 +        rum "Eroare incercind sa renumesc '%-.210s' in '%-.210s' (errno: %M)"
 +        rus "Ошибка при переименовании '%-.210s' в '%-.210s' (ошибка: %M)"
 +        serbian "Greška pri promeni imena '%-.210s' na '%-.210s' (errno: %M)"
 +        slo "Chyba pri premenovávaní '%-.210s' na '%-.210s' (chybový kód: %M)"
 +        spa "Error en el renombrado de '%-.210s' a '%-.210s' (Error: %M)"
 +        swe "Kan inte byta namn från '%-.210s' till '%-.210s' (Felkod: %M)"
 +        ukr "Не можу перейменувати '%-.210s' у '%-.210s' (помилка: %M)"
 +ER_ERROR_ON_WRITE  
 +	cze "Chyba při zápisu do souboru '%-.200s' (chybový kód: %M)"
 +        dan "Fejl ved skriving av filen '%-.200s' (Fejlkode: %M)"
 +        nla "Fout bij het wegschrijven van file '%-.200s' (Errcode: %M)"
 +        eng "Error writing file '%-.200s' (errno: %M)"
 +        est "Viga faili '%-.200s' kirjutamisel (veakood: %M)"
 +        fre "Erreur d'écriture du fichier '%-.200s' (Errcode: %M)"
 +        ger "Fehler beim Speichern der Datei '%-.200s' (Fehler: %M)"
 +        greek "Πρόβλημα κατά την αποθήκευση του αρχείου '%-.200s' (κωδικός λάθους: %M)"
 +        hun "Hiba a '%-.200s' file irasakor. (hibakod: %M)"
 +        ita "Errore durante la scrittura del file '%-.200s' (errno: %M)"
 +        jpn "ファイル '%-.200s' の書き込みエラー (エラー番号: %M)"
 +        kor "'%-.200s'화일 기록 중 에러 (에러번호: %M)"
 +        nor "Feil ved skriving av fila '%-.200s' (Feilkode: %M)"
 +        norwegian-ny "Feil ved skriving av fila '%-.200s' (Feilkode: %M)"
 +        pol "Bł?d podczas zapisywania pliku '%-.200s' (Kod błędu: %M)"
 +        por "Erro ao gravar arquivo '%-.200s' (erro no. %M)"
 +        rum "Eroare scriind fisierul '%-.200s' (errno: %M)"
 +        rus "Ошибка записи в файл '%-.200s' (ошибка: %M)"
 +        serbian "Greška pri upisu '%-.200s' (errno: %M)"
 +        slo "Chyba pri zápise do súboru '%-.200s' (chybový kód: %M)"
 +        spa "Error escribiendo el archivo '%-.200s' (Error: %M)"
 +        swe "Fick fel vid skrivning till '%-.200s' (Felkod %M)"
 +        ukr "Не можу записати файл '%-.200s' (помилка: %M)"
 +ER_FILE_USED  
 +        cze "'%-.192s' je zamčen proti změnám"
 +        dan "'%-.192s' er låst mod opdateringer"
 +        nla "'%-.192s' is geblokeerd tegen veranderingen"
 +        eng "'%-.192s' is locked against change"
 +        est "'%-.192s' on lukustatud muudatuste vastu"
 +        fre "'%-.192s' est verrouillé contre les modifications"
 +        ger "'%-.192s' ist für Änderungen gesperrt"
 +        greek "'%-.192s' δεν επιτρέπονται αλλαγές"
 +        hun "'%-.192s' a valtoztatas ellen zarolva"
 +        ita "'%-.192s' e` soggetto a lock contro i cambiamenti"
 +        jpn "'%-.192s' はロックされています。"
 +        kor "'%-.192s'가 변경할 수 없도록 잠겨있읍니다."
 +        nor "'%-.192s' er låst mot oppdateringer"
 +        norwegian-ny "'%-.192s' er låst mot oppdateringar"
 +        pol "'%-.192s' jest zablokowany na wypadek zmian"
 +        por "'%-.192s' está com travamento contra alterações"
 +        rum "'%-.192s' este blocat pentry schimbari (loccked against change)"
 +        rus "'%-.192s' заблокирован для изменений"
 +        serbian "'%-.192s' je zaključan za upis"
 +        slo "'%-.192s' je zamknutý proti zmenám"
 +        spa "'%-.192s' esta bloqueado contra cambios"
 +        swe "'%-.192s' är låst mot användning"
 +        ukr "'%-.192s' заблокований на внесення змін"
 +ER_FILSORT_ABORT  
 +        cze "Třídění přerušeno"
 +        dan "Sortering afbrudt"
 +        nla "Sorteren afgebroken"
 +        eng "Sort aborted"
 +        est "Sorteerimine katkestatud"
 +        fre "Tri alphabétique abandonné"
 +        ger "Sortiervorgang abgebrochen"
 +        greek "Η διαδικασία ταξινόμισης ακυρώθηκε"
 +        hun "Sikertelen rendezes"
 +        ita "Operazione di ordinamento abbandonata"
 +        jpn "ソート処理を中断しました。"
 +        kor "소트가 중단되었습니다."
 +        nor "Sortering avbrutt"
 +        norwegian-ny "Sortering avbrote"
 +        pol "Sortowanie przerwane"
 +        por "Ordenação abortada"
 +        rum "Sortare intrerupta"
 +        rus "Сортировка прервана"
 +        serbian "Sortiranje je prekinuto"
 +        slo "Triedenie prerušené"
 +        spa "Ordeancion cancelada"
 +        swe "Sorteringen avbruten"
 +        ukr "Сортування перервано"
 +ER_FORM_NOT_FOUND  
 +        cze "Pohled '%-.192s' pro '%-.192s' neexistuje"
 +        dan "View '%-.192s' eksisterer ikke for '%-.192s'"
 +        nla "View '%-.192s' bestaat niet voor '%-.192s'"
 +        eng "View '%-.192s' doesn't exist for '%-.192s'"
 +        est "Vaade '%-.192s' ei eksisteeri '%-.192s' jaoks"
 +        fre "La vue (View) '%-.192s' n'existe pas pour '%-.192s'"
 +        ger "View '%-.192s' existiert für '%-.192s' nicht"
 +        greek "Το View '%-.192s' δεν υπάρχει για '%-.192s'"
 +        hun "A(z) '%-.192s' nezet nem letezik a(z) '%-.192s'-hoz"
 +        ita "La view '%-.192s' non esiste per '%-.192s'"
 +        jpn "ビュー '%-.192s' は '%-.192s' に存在しません。"
 +        kor "뷰 '%-.192s'가 '%-.192s'에서는 존재하지 않읍니다."
 +        nor "View '%-.192s' eksisterer ikke for '%-.192s'"
 +        norwegian-ny "View '%-.192s' eksisterar ikkje for '%-.192s'"
 +        pol "Widok '%-.192s' nie istnieje dla '%-.192s'"
 +        por "Visão '%-.192s' não existe para '%-.192s'"
 +        rum "View '%-.192s' nu exista pentru '%-.192s'"
 +        rus "Представление '%-.192s' не существует для '%-.192s'"
 +        serbian "View '%-.192s' ne postoji za '%-.192s'"
 +        slo "Pohľad '%-.192s' neexistuje pre '%-.192s'"
 +        spa "La vista '%-.192s' no existe para '%-.192s'"
 +        swe "Formulär '%-.192s' finns inte i '%-.192s'"
 +        ukr "Вигляд '%-.192s' не існує для '%-.192s'"
 +ER_GET_ERRNO  
 +        nla "Fout %M van tabel handler %s"
 +        eng "Got error %M from storage engine %s"
 +        fre "Reçu l'erreur %M du handler de la table %s"
 +        ger "Fehler %M von Speicher-Engine %s"
 +        greek "Ελήφθη μήνυμα λάθους %M από τον χειριστή πίνακα (table handler) %s"
 +        ita "Rilevato l'errore %M dal gestore delle tabelle %s"
 +        nor "Mottok feil %M fra tabell håndterer %s"
 +        norwegian-ny "Mottok feil %M fra tabell handterar %s"
 +        pol "Otrzymano bł?d %M z obsługi tabeli %s"
 +        por "Obteve erro %M no manipulador de tabelas %s"
 +        rum "Eroarea %M obtinuta din handlerul tabelei %s"
 +        rus "Получена ошибка %M от обработчика таблиц %s"
 +        spa "Error %M desde el manejador de la tabla %s"
 +        swe "Fick felkod %M från databashanteraren %s"
 +        ukr "Отримано помилку %M від дескриптора таблиці %s"
 +ER_ILLEGAL_HA  
 +        eng "Storage engine %s of the table %`s.%`s doesn't have this option"
 +        ger "Diese Option gibt es nicht in Speicher-Engine %s für %`s.%`s"
 +        rus "Обработчик %s таблицы %`s.%`s не поддерживает эту возможность"
 +        ukr "Дескриптор %s таблиці %`s.%`s не має цієї властивості"
 +ER_KEY_NOT_FOUND  
 +        cze "Nemohu najít záznam v '%-.192s'"
 +        dan "Kan ikke finde posten i '%-.192s'"
 +        nla "Kan record niet vinden in '%-.192s'"
 +        eng "Can't find record in '%-.192s'"
 +        est "Ei suuda leida kirjet '%-.192s'-s"
 +        fre "Ne peut trouver l'enregistrement dans '%-.192s'"
 +        ger "Kann Datensatz in '%-.192s' nicht finden"
 +        greek "Αδύνατη η ανεύρεση εγγραφής στο '%-.192s'"
 +        hun "Nem talalhato a rekord '%-.192s'-ben"
 +        ita "Impossibile trovare il record in '%-.192s'"
 +        jpn "'%-.192s' にレコードが見つかりません。"
 +        kor "'%-.192s'에서 레코드를 찾을 수 없읍니다."
 +        nor "Kan ikke finne posten i '%-.192s'"
 +        norwegian-ny "Kan ikkje finne posten i '%-.192s'"
 +        pol "Nie można znaleĽć rekordu w '%-.192s'"
 +        por "Não pode encontrar registro em '%-.192s'"
 +        rum "Nu pot sa gasesc recordul in '%-.192s'"
 +        rus "Невозможно найти запись в '%-.192s'"
 +        serbian "Ne mogu da pronađem slog u '%-.192s'"
 +        slo "Nemôžem nájsť záznam v '%-.192s'"
 +        spa "No puedo encontrar el registro en '%-.192s'"
 +	swe "Hittar inte posten '%-.192s'"
 +        ukr "Не можу записати у '%-.192s'"
 +ER_NOT_FORM_FILE  
 +        cze "Nesprávná informace v souboru '%-.200s'"
 +        dan "Forkert indhold i: '%-.200s'"
 +        nla "Verkeerde info in file: '%-.200s'"
 +        eng "Incorrect information in file: '%-.200s'"
 +        est "Vigane informatsioon failis '%-.200s'"
 +        fre "Information erronnée dans le fichier: '%-.200s'"
 +        ger "Falsche Information in Datei '%-.200s'"
 +        greek "Λάθος πληροφορίες στο αρχείο: '%-.200s'"
 +        hun "Ervenytelen info a file-ban: '%-.200s'"
 +        ita "Informazione errata nel file: '%-.200s'"
 +        jpn "ファイル '%-.200s' 内の情報が不正です。"
 +        kor "화일의 부정확한 정보: '%-.200s'"
 +        nor "Feil informasjon i filen: '%-.200s'"
 +        norwegian-ny "Feil informasjon i fila: '%-.200s'"
 +        pol "Niewła?ciwa informacja w pliku: '%-.200s'"
 +        por "Informação incorreta no arquivo '%-.200s'"
 +        rum "Informatie incorecta in fisierul: '%-.200s'"
 +        rus "Некорректная информация в файле '%-.200s'"
 +        serbian "Pogrešna informacija u file-u: '%-.200s'"
 +        slo "Nesprávna informácia v súbore: '%-.200s'"
 +        spa "Informacion erronea en el archivo: '%-.200s'"
 +        swe "Felaktig fil: '%-.200s'"
 +        ukr "Хибна інформація у файлі: '%-.200s'"
 +ER_NOT_KEYFILE  
 +        cze "Nesprávný klíč pro tabulku '%-.200s'; pokuste se ho opravit"
 +        dan "Fejl i indeksfilen til tabellen '%-.200s'; prøv at reparere den"
 +        nla "Verkeerde zoeksleutel file voor tabel: '%-.200s'; probeer het te repareren"
 +        eng "Incorrect key file for table '%-.200s'; try to repair it"
 +        est "Tabeli '%-.200s' võtmefail on vigane; proovi seda parandada"
 +        fre "Index corrompu dans la table: '%-.200s'; essayez de le réparer"
 +        ger "Fehlerhafte Index-Datei für Tabelle '%-.200s'; versuche zu reparieren"
 +        greek "Λάθος αρχείο ταξινόμισης (key file) για τον πίνακα: '%-.200s'; Παρακαλώ, διορθώστε το!"
 +        hun "Ervenytelen kulcsfile a tablahoz: '%-.200s'; probalja kijavitani!"
 +        ita "File chiave errato per la tabella : '%-.200s'; prova a riparalo"
 +        jpn "表 '%-.200s' の索引ファイル(key file)の内容が不正です。修復を試行してください。"
 +        kor "'%-.200s' 테이블의 부정확한 키 존재. 수정하시오!"
 +        nor "Tabellen '%-.200s' har feil i nøkkelfilen; forsøk å reparer den"
 +        norwegian-ny "Tabellen '%-.200s' har feil i nykkelfila; prøv å reparere den"
 +        pol "Niewła?ciwy plik kluczy dla tabeli: '%-.200s'; spróbuj go naprawić"
 +        por "Arquivo de índice incorreto para tabela '%-.200s'; tente repará-lo"
 +        rum "Cheia fisierului incorecta pentru tabela: '%-.200s'; incearca s-o repari"
 +        rus "Некорректный индексный файл для таблицы: '%-.200s'. Попробуйте восстановить его"
 +        serbian "Pogrešan key file za tabelu: '%-.200s'; probajte da ga ispravite"
 +        slo "Nesprávny kľúč pre tabuľku '%-.200s'; pokúste sa ho opraviť"
 +        spa "Clave de archivo erronea para la tabla: '%-.200s'; intente repararlo"
 +        swe "Fatalt fel vid hantering av register '%-.200s'; kör en reparation"
 +        ukr "Хибний файл ключей для таблиці: '%-.200s'; Спробуйте його відновити"
 +ER_OLD_KEYFILE  
 +        cze "Starý klíčový soubor pro '%-.192s'; opravte ho."
 +        dan "Gammel indeksfil for tabellen '%-.192s'; reparer den"
 +        nla "Oude zoeksleutel file voor tabel '%-.192s'; repareer het!"
 +        eng "Old key file for table '%-.192s'; repair it!"
 +        est "Tabeli '%-.192s' võtmefail on aegunud; paranda see!"
 +        fre "Vieux fichier d'index pour la table '%-.192s'; réparez le!"
 +        ger "Alte Index-Datei für Tabelle '%-.192s'. Bitte reparieren"
 +        greek "Παλαιό αρχείο ταξινόμισης (key file) για τον πίνακα '%-.192s'; Παρακαλώ, διορθώστε το!"
 +        hun "Regi kulcsfile a '%-.192s'tablahoz; probalja kijavitani!"
 +        ita "File chiave vecchio per la tabella '%-.192s'; riparalo!"
 +        jpn "表 '%-.192s' の索引ファイル(key file)は古い形式です。修復してください。"
 +        kor "'%-.192s' 테이블의 이전버젼의 키 존재. 수정하시오!"
 +        nor "Gammel nøkkelfil for tabellen '%-.192s'; reparer den!"
 +        norwegian-ny "Gammel nykkelfil for tabellen '%-.192s'; reparer den!"
 +        pol "Plik kluczy dla tabeli '%-.192s' jest starego typu; napraw go!"
 +        por "Arquivo de índice desatualizado para tabela '%-.192s'; repare-o!"
 +        rum "Cheia fisierului e veche pentru tabela '%-.192s'; repar-o!"
 +        rus "Старый индексный файл для таблицы '%-.192s'; отремонтируйте его!"
 +        serbian "Zastareo key file za tabelu '%-.192s'; ispravite ga"
 +        slo "Starý kľúčový súbor pre '%-.192s'; opravte ho!"
 +        spa "Clave de archivo antigua para la tabla '%-.192s'; reparelo!"
 +        swe "Gammal nyckelfil '%-.192s'; reparera registret"
 +        ukr "Старий файл ключей для таблиці '%-.192s'; Відновіть його!"
 +ER_OPEN_AS_READONLY  
 +        cze "'%-.192s' je jen pro čtení"
 +        dan "'%-.192s' er skrivebeskyttet"
 +        nla "'%-.192s' is alleen leesbaar"
 +        eng "Table '%-.192s' is read only"
 +        est "Tabel '%-.192s' on ainult lugemiseks"
 +        fre "'%-.192s' est en lecture seulement"
 +        ger "Tabelle '%-.192s' ist nur lesbar"
 +        greek "'%-.192s' επιτρέπεται μόνο η ανάγνωση"
 +        hun "'%-.192s' irasvedett"
 +        ita "'%-.192s' e` di sola lettura"
 +        jpn "表 '%-.192s' は読み込み専用です。"
 +        kor "테이블 '%-.192s'는 읽기전용 입니다."
 +        nor "'%-.192s' er skrivebeskyttet"
 +        norwegian-ny "'%-.192s' er skrivetryggja"
 +        pol "'%-.192s' jest tylko do odczytu"
 +        por "Tabela '%-.192s' é somente para leitura"
 +        rum "Tabela '%-.192s' e read-only"
 +        rus "Таблица '%-.192s' предназначена только для чтения"
 +        serbian "Tabelu '%-.192s' je dozvoljeno samo čitati"
 +        slo "'%-.192s' is čítať only"
 +        spa "'%-.192s' es de solo lectura"
 +        swe "'%-.192s' är skyddad mot förändring"
 +        ukr "Таблиця '%-.192s' тільки для читання"
 +ER_OUTOFMEMORY HY001 S1001
 +        cze "Málo paměti. Přestartujte daemona a zkuste znovu (je potřeba %d bytů)"
 +        dan "Ikke mere hukommelse. Genstart serveren og prøv igen (mangler %d bytes)"
 +        nla "Geen geheugen meer. Herstart server en probeer opnieuw (%d bytes nodig)"
 +        eng "Out of memory; restart server and try again (needed %d bytes)"
 +        est "Mälu  sai otsa. Proovi MariaDB uuesti käivitada (puudu jäi %d baiti)"
 +        fre "Manque de mémoire. Redémarrez le démon et ré-essayez (%d octets nécessaires)"
 +        ger "Kein Speicher vorhanden (%d Bytes benötigt). Bitte Server neu starten"
 +        greek "Δεν υπάρχει διαθέσιμη μνήμη. Προσπαθήστε πάλι, επανεκινώντας τη διαδικασία (demon) (χρειάζονται %d bytes)"
 +        hun "Nincs eleg memoria. Inditsa ujra a demont, es probalja ismet. (%d byte szukseges.)"
 +        ita "Memoria esaurita. Fai ripartire il demone e riprova (richiesti %d bytes)"
 +        jpn "メモリが不足しています。サーバーを再起動してみてください。(%d バイトの割り当てに失敗)"
 +        kor "Out of memory. 데몬을 재 실행 후 다시 시작하시오 (needed %d bytes)"
 +        nor "Ikke mer minne. Star på nytt tjenesten og prøv igjen (trengte %d byter)"
 +        norwegian-ny "Ikkje meir minne. Start på nytt tenesten og prøv igjen (trengte %d bytar)"
 +        pol "Zbyt mało pamięci. Uruchom ponownie demona i spróbuj ponownie (potrzeba %d bajtów)"
 +        por "Sem memória. Reinicie o programa e tente novamente (necessita de %d bytes)"
 +        rum "Out of memory. Porneste daemon-ul din nou si incearca inca o data (e nevoie de %d bytes)"
 +        rus "Недостаточно памяти. Перезапустите сервер и попробуйте еще раз (нужно %d байт)"
 +        serbian "Nema memorije. Restartujte MariaDB server i probajte ponovo (potrebno je %d byte-ova)"
 +        slo "Málo pamäti. Reštartujte daemona a skúste znova (je potrebných %d bytov)"
 +        spa "Memoria insuficiente. Reinicie el demonio e intentelo otra vez (necesita %d bytes)"
 +        swe "Oväntat slut på minnet, starta om programmet och försök på nytt (Behövde %d bytes)"
 +        ukr "Брак пам'яті. Рестартуйте сервер та спробуйте знову (потрібно %d байтів)"
 +ER_OUT_OF_SORTMEMORY HY001 S1001
 +        cze "Málo paměti pro třídění. Zvyšte velikost třídícího bufferu"
 +        dan "Ikke mere sorteringshukommelse. Øg sorteringshukommelse (sort buffer size) for serveren"
 +        nla "Geen geheugen om te sorteren. Verhoog de server sort buffer size"
 +        eng "Out of sort memory, consider increasing server sort buffer size"
 +        est "Mälu sai sorteerimisel otsa. Suurenda MariaDB-i sorteerimispuhvrit"
 +        fre "Manque de mémoire pour le tri. Augmentez-la."
 +        ger "Kein Speicher zum Sortieren vorhanden. sort_buffer_size sollte im Server erhöht werden"
 +        greek "Δεν υπάρχει διαθέσιμη μνήμη για ταξινόμιση. Αυξήστε το sort buffer size για τη διαδικασία (demon)"
 +        hun "Nincs eleg memoria a rendezeshez. Novelje a rendezo demon puffermeretet"
 +        ita "Memoria per gli ordinamenti esaurita. Incrementare il 'sort_buffer' al demone"
 +        jpn "ソートメモリが不足しています。ソートバッファサイズ(sort buffer size)の増加を検討してください。"
 +        kor "Out of sort memory. daemon sort buffer의 크기를 증가시키세요"
 +        nor "Ikke mer sorteringsminne. Vurder å øke sorteringsminnet (sort buffer size) for tjenesten"
 +        norwegian-ny "Ikkje meir sorteringsminne. Vurder å auke sorteringsminnet (sorteringsbuffer storleik) for tenesten"
 +        pol "Zbyt mało pamięci dla sortowania. Zwiększ wielko?ć bufora demona dla sortowania"
 +        por "Não há memória suficiente para ordenação. Considere aumentar o tamanho do retentor (buffer) de ordenação."
 +        rum "Out of memory pentru sortare. Largeste marimea buffer-ului pentru sortare in daemon (sort buffer size)"
 +        rus "Недостаточно памяти для сортировки. Увеличьте размер буфера сортировки на сервере"
 +        serbian "Nema memorije za sortiranje. Povećajte veličinu sort buffer-a MariaDB server-u"
 +        slo "Málo pamäti pre triedenie, zvýšte veľkosť triediaceho bufferu"
 +        spa "Memoria de ordenacion insuficiente. Incremente el tamano del buffer de ordenacion"
 +        swe "Sorteringsbufferten räcker inte till. Kontrollera startparametrarna"
 +        ukr "Брак пам'яті для сортування. Треба збільшити розмір буфера сортування у сервера"
 +ER_UNEXPECTED_EOF  
 +	cze "Neočekávaný konec souboru při čtení '%-.192s' (chybový kód: %M)"
 +        dan "Uventet afslutning på fil (eof) ved læsning af filen '%-.192s' (Fejlkode: %M)"
 +        nla "Onverwachte eof gevonden tijdens het lezen van file '%-.192s' (Errcode: %M)"
 +        eng "Unexpected EOF found when reading file '%-.192s' (errno: %M)"
 +        est "Ootamatu faililõpumärgend faili '%-.192s' lugemisel (veakood: %M)"
 +        fre "Fin de fichier inattendue en lisant '%-.192s' (Errcode: %M)"
 +        ger "Unerwartetes Ende beim Lesen der Datei '%-.192s' (Fehler: %M)"
 +        greek "Κατά τη διάρκεια της ανάγνωσης, βρέθηκε απροσδόκητα το τέλος του αρχείου '%-.192s' (κωδικός λάθους: %M)"
 +        hun "Varatlan filevege-jel a '%-.192s'olvasasakor. (hibakod: %M)"
 +        ita "Fine del file inaspettata durante la lettura del file '%-.192s' (errno: %M)"
 +        jpn "ファイル '%-.192s' を読み込み中に予期せずファイルの終端に達しました。(エラー番号: %M)"
 +        kor "'%-.192s' 화일을 읽는 도중 잘못된 eof을 발견 (에러번호: %M)"
 +        nor "Uventet slutt på fil (eof) ved lesing av filen '%-.192s' (Feilkode: %M)"
 +        norwegian-ny "Uventa slutt på fil (eof) ved lesing av fila '%-.192s' (Feilkode: %M)"
 +        pol "Nieoczekiwany 'eof' napotkany podczas czytania z pliku '%-.192s' (Kod błędu: %M)"
 +        por "Encontrado fim de arquivo inesperado ao ler arquivo '%-.192s' (erro no. %M)"
 +        rum "Sfirsit de fisier neasteptat in citirea fisierului '%-.192s' (errno: %M)"
 +        rus "Неожиданный конец файла '%-.192s' (ошибка: %M)"
 +        serbian "Neočekivani kraj pri čitanju file-a '%-.192s' (errno: %M)"
 +        slo "Neočakávaný koniec súboru pri čítaní '%-.192s' (chybový kód: %M)"
 +        spa "Inesperado fin de ficheroU mientras leiamos el archivo '%-.192s' (Error: %M)"
 +        swe "Oväntat filslut vid läsning från '%-.192s' (Felkod: %M)"
 +        ukr "Хибний кінець файлу '%-.192s' (помилка: %M)"
 +ER_CON_COUNT_ERROR 08004 
 +        cze "Příliš mnoho spojení"
 +        dan "For mange forbindelser (connections)"
 +        nla "Te veel verbindingen"
 +        eng "Too many connections"
 +        est "Liiga palju samaaegseid ühendusi"
 +        fre "Trop de connexions"
 +        ger "Zu viele Verbindungen"
 +        greek "Υπάρχουν πολλές συνδέσεις..."
 +        hun "Tul sok kapcsolat"
 +        ita "Troppe connessioni"
 +        jpn "接続が多すぎます。"
 +        kor "너무 많은 연결... max_connection을 증가 시키시오..."
 +        nor "For mange tilkoblinger (connections)"
 +        norwegian-ny "For mange tilkoplingar (connections)"
 +        pol "Zbyt wiele poł?czeń"
 +        por "Excesso de conexões"
 +        rum "Prea multe conectiuni"
 +        rus "Слишком много соединений"
 +        serbian "Previše konekcija"
 +        slo "Príliš mnoho spojení"
 +        spa "Demasiadas conexiones"
 +        swe "För många anslutningar"
 +        ukr "Забагато з'єднань"
 +ER_OUT_OF_RESOURCES  
 +        cze "Málo prostoru/paměti pro thread"
 +        dan "Udgået for tråde/hukommelse"
 +        nla "Geen thread geheugen meer; controleer of mysqld of andere processen al het beschikbare geheugen gebruikt. Zo niet, dan moet u wellicht 'ulimit' gebruiken om mysqld toe te laten meer geheugen te benutten, of u kunt extra swap ruimte toevoegen"
 +        eng "Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space"
 +        est "Mälu sai otsa. Võimalik, et aitab swap-i lisamine või käsu 'ulimit' abil MariaDB-le rohkema mälu kasutamise lubamine"
 +        fre "Manque de 'threads'/mémoire"
 +        ger "Kein Speicher mehr vorhanden. Prüfen Sie, ob mysqld oder ein anderer Prozess den gesamten Speicher verbraucht. Wenn nicht, sollten Sie mit 'ulimit' dafür sorgen, dass mysqld mehr Speicher benutzen darf, oder mehr Swap-Speicher einrichten"
 +        greek "Πρόβλημα με τη διαθέσιμη μνήμη (Out of thread space/memory)"
 +        hun "Elfogyott a thread-memoria"
 +        ita "Fine dello spazio/memoria per i thread"
 +        jpn "メモリが不足しています。mysqld やその他のプロセスがメモリーを使い切っていないか確認して下さい。メモリーを使い切っていない場合、'ulimit'の設定等で mysqld のメモリー使用最大量を多くするか、スワップ領域を増やす必要があるかもしれません。"
 +# This message failed to convert from euc-kr, skipped
 +        nor "Tomt for tråd plass/minne"
 +        norwegian-ny "Tomt for tråd plass/minne"
 +        pol "Zbyt mało miejsca/pamięci dla w?tku"
 +        por "Sem memória. Verifique se o mysqld ou algum outro processo está usando toda memória disponível. Se não, você pode ter que usar 'ulimit' para permitir ao mysqld usar mais memória ou você pode adicionar mais área de 'swap'"
 +        rum "Out of memory;  Verifica daca mysqld sau vreun alt proces foloseste toate memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui memoria disponbila. Altfel, trebuie sa folosesi 'ulimit' ca sa permiti lui mysqld sa foloseasca mai multa memorie ori adauga mai mult spatiu pentru swap (swap space)"
 +        rus "Недостаточно памяти; удостоверьтесь, что mysqld или какой-либо другой процесс не занимает всю доступную память. Если нет, то вы можете использовать ulimit, чтобы выделить для mysqld больше памяти, или увеличить объем файла подкачки"
 +        serbian "Nema memorije; Proverite da li MariaDB server ili neki drugi proces koristi svu slobodnu memoriju. (UNIX: Ako ne, probajte da upotrebite 'ulimit' komandu da biste dozvolili daemon-u da koristi više memorije ili probajte da dodate više swap memorije)"
 +        slo "Málo miesta-pamäti pre vlákno"
 +        spa "Memoria/espacio de tranpaso insuficiente"
 +        swe "Fick slut på minnet.  Kontrollera om mysqld eller någon annan process använder allt tillgängligt minne. Om inte, försök använda 'ulimit' eller allokera mera swap"
 +        ukr "Брак пам'яті;  Перевірте чи mysqld або якісь інші процеси використовують усю доступну пам'ять. Як ні, то ви можете скористатися 'ulimit', аби дозволити mysqld використовувати більше пам'яті або ви можете додати більше місця під свап"
 +ER_BAD_HOST_ERROR 08S01 
 +        cze "Nemohu zjistit jméno stroje pro Vaši adresu"
 +        dan "Kan ikke få værtsnavn for din adresse"
 +        nla "Kan de hostname niet krijgen van uw adres"
 +        eng "Can't get hostname for your address"
 +        est "Ei suuda lahendada IP aadressi masina nimeks"
 +        fre "Ne peut obtenir de hostname pour votre adresse"
 +        ger "Kann Hostnamen für diese Adresse nicht erhalten"
 +        greek "Δεν έγινε γνωστό το hostname για την address σας"
 +        hun "A gepnev nem allapithato meg a cimbol"
 +        ita "Impossibile risalire al nome dell'host dall'indirizzo (risoluzione inversa)"
 +        jpn "IPアドレスからホスト名を解決できません。"
 +        kor "당신의 컴퓨터의 호스트이름을 얻을 수 없읍니다."
 +        nor "Kan ikke få tak i vertsnavn for din adresse"
 +        norwegian-ny "Kan ikkje få tak i vertsnavn for di adresse"
 +        pol "Nie można otrzymać nazwy hosta dla twojego adresu"
 +        por "Não pode obter nome do 'host' para seu endereço"
 +        rum "Nu pot sa obtin hostname-ul adresei tale"
 +        rus "Невозможно получить имя хоста для вашего адреса"
 +        serbian "Ne mogu da dobijem ime host-a za vašu IP adresu"
 +        slo "Nemôžem zistiť meno hostiteľa pre vašu adresu"
 +        spa "No puedo obtener el nombre de maquina de tu direccion"
 +        swe "Kan inte hitta 'hostname' för din adress"
 +        ukr "Не можу визначити ім'я хосту для вашої адреси"
 +ER_HANDSHAKE_ERROR 08S01 
 +        cze "Chyba při ustavování spojení"
 +        dan "Forkert håndtryk (handshake)"
 +        nla "Verkeerde handshake"
 +        eng "Bad handshake"
 +        est "Väär handshake"
 +        fre "Mauvais 'handshake'"
 +        ger "Ungültiger Handshake"
 +        greek "Η αναγνώριση (handshake) δεν έγινε σωστά"
 +        hun "A kapcsolatfelvetel nem sikerult (Bad handshake)"
 +        ita "Negoziazione impossibile"
 +        jpn "ハンドシェイクエラー"
 +        nor "Feil håndtrykk (handshake)"
 +        norwegian-ny "Feil handtrykk (handshake)"
 +        pol "Zły uchwyt(handshake)"
 +        por "Negociação de acesso falhou"
 +        rum "Prost inceput de conectie (bad handshake)"
 +        rus "Некорректное приветствие"
 +        serbian "Loš početak komunikacije (handshake)"
 +        slo "Chyba pri nadväzovaní spojenia"
 +        spa "Protocolo erroneo"
 +        swe "Fel vid initiering av kommunikationen med klienten"
 +        ukr "Невірна установка зв'язку"
 +ER_DBACCESS_DENIED_ERROR 42000 
 +        cze "Přístup pro uživatele '%s'@'%s' k databázi '%-.192s' není povolen"
 +        dan "Adgang nægtet bruger: '%s'@'%s' til databasen '%-.192s'"
 +        nla "Toegang geweigerd voor gebruiker: '%s'@'%s' naar database '%-.192s'"
 +        eng "Access denied for user '%s'@'%s' to database '%-.192s'"
 +        jps "ユーザー '%s'@'%s' の '%-.192s' データベースへのアクセスを拒否します",
 +        est "Ligipääs keelatud kasutajale '%s'@'%s' andmebaasile '%-.192s'"
 +        fre "Accès refusé pour l'utilisateur: '%s'@'%s'. Base '%-.192s'"
 +        ger "Benutzer '%s'@'%s' hat keine Zugriffsberechtigung für Datenbank '%-.192s'"
 +        greek "Δεν επιτέρεται η πρόσβαση στο χρήστη: '%s'@'%s' στη βάση δεδομένων '%-.192s'"
 +        hun "A(z) '%s'@'%s' felhasznalo szamara tiltott eleres az '%-.192s' adabazishoz."
 +        ita "Accesso non consentito per l'utente: '%s'@'%s' al database '%-.192s'"
 +        jpn "ユーザー '%s'@'%s' の '%-.192s' データベースへのアクセスを拒否します"
 +        kor "'%s'@'%s' 사용자는 '%-.192s' 데이타베이스에 접근이 거부 되었습니다."
 +        nor "Tilgang nektet for bruker: '%s'@'%s' til databasen '%-.192s' nektet"
 +        norwegian-ny "Tilgang ikkje tillate for brukar: '%s'@'%s' til databasen '%-.192s' nekta"
 +        por "Acesso negado para o usuário '%s'@'%s' ao banco de dados '%-.192s'"
 +        rum "Acces interzis pentru utilizatorul: '%s'@'%s' la baza de date '%-.192s'"
 +        rus "Для пользователя '%s'@'%s' доступ к базе данных '%-.192s' закрыт"
 +        serbian "Pristup je zabranjen korisniku '%s'@'%s' za bazu '%-.192s'"
 +        slo "Zakázaný prístup pre užívateľa: '%s'@'%s' k databázi '%-.192s'"
 +        spa "Acceso negado para usuario: '%s'@'%s' para la base de datos '%-.192s'"
 +        swe "Användare '%s'@'%s' är ej berättigad att använda databasen %-.192s"
 +        ukr "Доступ заборонено для користувача: '%s'@'%s' до бази данних '%-.192s'"
 +ER_ACCESS_DENIED_ERROR 28000 
 +        cze "Přístup pro uživatele '%s'@'%s' (s heslem %s)"
 +        dan "Adgang nægtet bruger: '%s'@'%s' (Bruger adgangskode: %s)"
 +        nla "Toegang geweigerd voor gebruiker: '%s'@'%s' (Wachtwoord gebruikt: %s)"
 +        eng "Access denied for user '%s'@'%s' (using password: %s)"
 +        jps "ユーザー '%s'@'%s' を拒否します.uUsing password: %s)",
 +        est "Ligipääs keelatud kasutajale '%s'@'%s' (kasutab parooli: %s)"
 +        fre "Accès refusé pour l'utilisateur: '%s'@'%s' (mot de passe: %s)"
 +        ger "Benutzer '%s'@'%s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)"
 +        greek "Δεν επιτέρεται η πρόσβαση στο χρήστη: '%s'@'%s' (χρήση password: %s)"
 +        hun "A(z) '%s'@'%s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)"
 +        ita "Accesso non consentito per l'utente: '%s'@'%s' (Password: %s)"
 +        jpn "ユーザー '%s'@'%s' を拒否します.uUsing password: %s)"
 +        kor "'%s'@'%s' 사용자는 접근이 거부 되었습니다. (using password: %s)"
 +        nor "Tilgang nektet for bruker: '%s'@'%s' (Bruker passord: %s)"
 +        norwegian-ny "Tilgang ikke tillate for brukar: '%s'@'%s' (Brukar passord: %s)"
 +        por "Acesso negado para o usuário '%s'@'%s' (senha usada: %s)"
 +        rum "Acces interzis pentru utilizatorul: '%s'@'%s' (Folosind parola: %s)"
 +        rus "Доступ закрыт для пользователя '%s'@'%s' (был использован пароль: %s)"
 +        serbian "Pristup je zabranjen korisniku '%s'@'%s' (koristi lozinku: '%s')"
 +        slo "Zakázaný prístup pre užívateľa: '%s'@'%s' (použitie hesla: %s)"
 +        spa "Acceso negado para usuario: '%s'@'%s' (Usando clave: %s)"
 +        swe "Användare '%s'@'%s' är ej berättigad att logga in (Använder lösen: %s)"
 +        ukr "Доступ заборонено для користувача: '%s'@'%s' (Використано пароль: %s)"
 +ER_NO_DB_ERROR 3D000 
 +        cze "Nebyla vybrána žádná databáze"
 +        dan "Ingen database valgt"
 +        nla "Geen database geselecteerd"
 +        eng "No database selected"
 +        est "Andmebaasi ei ole valitud"
 +        fre "Aucune base n'a été sélectionnée"
 +        ger "Keine Datenbank ausgewählt"
 +        greek "Δεν επιλέχθηκε βάση δεδομένων"
 +        hun "Nincs kivalasztott adatbazis"
 +        ita "Nessun database selezionato"
 +        jpn "データベースが選択されていません。"
 +        kor "선택된 데이타베이스가 없습니다."
 +        nor "Ingen database valgt"
 +        norwegian-ny "Ingen database vald"
 +        pol "Nie wybrano żadnej bazy danych"
 +        por "Nenhum banco de dados foi selecionado"
 +        rum "Nici o baza de data nu a fost selectata inca"
 +        rus "База данных не выбрана"
 +        serbian "Ni jedna baza nije selektovana"
 +        slo "Nebola vybraná databáza"
 +        spa "Base de datos no seleccionada"
 +        swe "Ingen databas i användning"
 +        ukr "Базу данних не вибрано"
 +ER_UNKNOWN_COM_ERROR 08S01 
 +        cze "Neznámý příkaz"
 +        dan "Ukendt kommando"
 +        nla "Onbekend commando"
 +        eng "Unknown command"
 +        est "Tundmatu käsk"
 +        fre "Commande inconnue"
 +        ger "Unbekannter Befehl"
 +        greek "Αγνωστη εντολή"
 +        hun "Ervenytelen parancs"
 +        ita "Comando sconosciuto"
 +        jpn "不明なコマンドです。"
 +        kor "명령어가 뭔지 모르겠어요..."
 +        nor "Ukjent kommando"
 +        norwegian-ny "Ukjent kommando"
 +        pol "Nieznana komenda"
 +        por "Comando desconhecido"
 +        rum "Comanda invalida"
 +        rus "Неизвестная команда коммуникационного протокола"
 +        serbian "Nepoznata komanda"
 +        slo "Neznámy príkaz"
 +        spa "Comando desconocido"
 +        swe "Okänt kommando"
 +        ukr "Невідома команда"
 +ER_BAD_NULL_ERROR 23000 
 +        cze "Sloupec '%-.192s' nemůže být null"
 +        dan "Kolonne '%-.192s' kan ikke være NULL"
 +        nla "Kolom '%-.192s' kan niet null zijn"
 +        eng "Column '%-.192s' cannot be null"
 +        est "Tulp '%-.192s' ei saa omada nullväärtust"
 +        fre "Le champ '%-.192s' ne peut être vide (null)"
 +        ger "Feld '%-.192s' darf nicht NULL sein"
 +        greek "Το πεδίο '%-.192s' δεν μπορεί να είναι κενό (null)"
 +        hun "A(z) '%-.192s' oszlop erteke nem lehet nulla"
 +        ita "La colonna '%-.192s' non puo` essere nulla"
 +        jpn "列 '%-.192s' は null にできません。"
 +        kor "칼럼 '%-.192s'는 널(Null)이 되면 안됩니다. "
 +        nor "Kolonne '%-.192s' kan ikke vere null"
 +        norwegian-ny "Kolonne '%-.192s' kan ikkje vere null"
 +        pol "Kolumna '%-.192s' nie może być null"
 +        por "Coluna '%-.192s' não pode ser vazia"
 +        rum "Coloana '%-.192s' nu poate sa fie null"
 +        rus "Столбец '%-.192s' не может принимать величину NULL"
 +        serbian "Kolona '%-.192s' ne može biti NULL"
 +        slo "Pole '%-.192s' nemôže byť null"
 +        spa "La columna '%-.192s' no puede ser nula"
 +        swe "Kolumn '%-.192s' får inte vara NULL"
 +        ukr "Стовбець '%-.192s' не може бути нульовим"
 +ER_BAD_DB_ERROR 42000 
 +        cze "Neznámá databáze '%-.192s'"
 +        dan "Ukendt database '%-.192s'"
 +        nla "Onbekende database '%-.192s'"
 +        eng "Unknown database '%-.192s'"
 +        est "Tundmatu andmebaas '%-.192s'"
 +        fre "Base '%-.192s' inconnue"
 +        ger "Unbekannte Datenbank '%-.192s'"
 +        greek "Αγνωστη βάση δεδομένων '%-.192s'"
 +        hun "Ervenytelen adatbazis: '%-.192s'"
 +        ita "Database '%-.192s' sconosciuto"
 +        jpn "'%-.192s' は不明なデータベースです。"
 +        kor "데이타베이스 '%-.192s'는 알수 없음"
 +        nor "Ukjent database '%-.192s'"
 +        norwegian-ny "Ukjent database '%-.192s'"
 +        pol "Nieznana baza danych '%-.192s'"
 +        por "Banco de dados '%-.192s' desconhecido"
 +        rum "Baza de data invalida '%-.192s'"
 +        rus "Неизвестная база данных '%-.192s'"
 +        serbian "Nepoznata baza '%-.192s'"
 +        slo "Neznáma databáza '%-.192s'"
 +        spa "Base de datos desconocida '%-.192s'"
 +        swe "Okänd databas: '%-.192s'"
 +        ukr "Невідома база данних '%-.192s'"
 +ER_TABLE_EXISTS_ERROR 42S01 
 +        cze "Tabulka '%-.192s' již existuje"
 +        dan "Tabellen '%-.192s' findes allerede"
 +        nla "Tabel '%-.192s' bestaat al"
 +        eng "Table '%-.192s' already exists"
 +        est "Tabel '%-.192s' juba eksisteerib"
 +        fre "La table '%-.192s' existe déjà"
 +        ger "Tabelle '%-.192s' bereits vorhanden"
 +        greek "Ο πίνακας '%-.192s' υπάρχει ήδη"
 +        hun "A(z) '%-.192s' tabla mar letezik"
 +        ita "La tabella '%-.192s' esiste gia`"
 +        jpn "表 '%-.192s' はすでに存在します。"
 +        kor "테이블 '%-.192s'는 이미 존재함"
 +        nor "Tabellen '%-.192s' eksisterer allerede"
 +        norwegian-ny "Tabellen '%-.192s' eksisterar allereide"
 +        pol "Tabela '%-.192s' już istnieje"
 +        por "Tabela '%-.192s' já existe"
 +        rum "Tabela '%-.192s' exista deja"
 +        rus "Таблица '%-.192s' уже существует"
 +        serbian "Tabela '%-.192s' već postoji"
 +        slo "Tabuľka '%-.192s' už existuje"
 +        spa "La tabla  '%-.192s' ya existe"
 +        swe "Tabellen '%-.192s' finns redan"
 +        ukr "Таблиця '%-.192s' вже існує"
 +ER_BAD_TABLE_ERROR 42S02 
 +        cze "Neznámá tabulka '%-.100s'"
 +        dan "Ukendt tabel '%-.100s'"
 +        nla "Onbekende tabel '%-.100s'"
 +        eng "Unknown table '%-.100s'"
 +        est "Tundmatu tabel '%-.100s'"
 +        fre "Table '%-.100s' inconnue"
 +        ger "Unbekannte Tabelle '%-.100s'"
 +        greek "Αγνωστος πίνακας '%-.100s'"
 +        hun "Ervenytelen tabla: '%-.100s'"
 +        ita "Tabella '%-.100s' sconosciuta"
 +        jpn "'%-.100s' は不明な表です。"
 +        kor "테이블 '%-.100s'는 알수 없음"
 +        nor "Ukjent tabell '%-.100s'"
 +        norwegian-ny "Ukjent tabell '%-.100s'"
 +        pol "Nieznana tabela '%-.100s'"
 +        por "Tabela '%-.100s' desconhecida"
 +        rum "Tabela '%-.100s' este invalida"
 +        rus "Неизвестная таблица '%-.100s'"
 +        serbian "Nepoznata tabela '%-.100s'"
 +        slo "Neznáma tabuľka '%-.100s'"
 +        spa "Tabla '%-.100s' desconocida"
 +        swe "Okänd tabell '%-.100s'"
 +        ukr "Невідома таблиця '%-.100s'"
 +ER_NON_UNIQ_ERROR 23000 
 +        cze "Sloupec '%-.192s' v %-.192s není zcela jasný"
 +        dan "Felt: '%-.192s' i tabel %-.192s er ikke entydigt"
 +        nla "Kolom: '%-.192s' in %-.192s is niet eenduidig"
 +        eng "Column '%-.192s' in %-.192s is ambiguous"
 +        est "Väli '%-.192s' %-.192s-s ei ole ühene"
 +        fre "Champ: '%-.192s' dans %-.192s est ambigu"
 +        ger "Feld '%-.192s' in %-.192s ist nicht eindeutig"
 +        greek "Το πεδίο: '%-.192s' σε %-.192s δεν έχει καθοριστεί"
 +        hun "A(z) '%-.192s' oszlop %-.192s-ben ketertelmu"
 +        ita "Colonna: '%-.192s' di %-.192s e` ambigua"
 +        jpn "列 '%-.192s' は %-.192s 内で曖昧です。"
 +        kor "칼럼: '%-.192s' in '%-.192s' 이 모호함"
 +        nor "Felt: '%-.192s' i tabell %-.192s er ikke entydig"
 +        norwegian-ny "Kolonne: '%-.192s' i tabell %-.192s er ikkje eintydig"
 +        pol "Kolumna: '%-.192s' w  %-.192s jest dwuznaczna"
 +        por "Coluna '%-.192s' em '%-.192s' é ambígua"
 +        rum "Coloana: '%-.192s' in %-.192s este ambigua"
 +        rus "Столбец '%-.192s' в %-.192s задан неоднозначно"
 +        serbian "Kolona '%-.192s' u %-.192s nije jedinstvena u kontekstu"
 +        slo "Pole: '%-.192s' v %-.192s je nejasné"
 +        spa "La columna: '%-.192s' en %-.192s es ambigua"
 +        swe "Kolumn '%-.192s' i %-.192s är inte unik"
 +        ukr "Стовбець '%-.192s' у %-.192s визначений неоднозначно"
 +ER_SERVER_SHUTDOWN 08S01 
 +        cze "Probíhá ukončování práce serveru"
 +        dan "Database nedlukning er i gang"
 +        nla "Bezig met het stoppen van de server"
 +        eng "Server shutdown in progress"
 +        est "Serveri seiskamine käib"
 +        fre "Arrêt du serveur en cours"
 +        ger "Der Server wird heruntergefahren"
 +        greek "Εναρξη διαδικασίας αποσύνδεσης του εξυπηρετητή (server shutdown)"
 +        hun "A szerver leallitasa folyamatban"
 +        ita "Shutdown del server in corso"
 +        jpn "サーバーをシャットダウン中です。"
 +        kor "Server가 셧다운 중입니다."
 +        nor "Database nedkobling er i gang"
 +        norwegian-ny "Tenar nedkopling er i gang"
 +        pol "Trwa kończenie działania serwera"
 +        por "'Shutdown' do servidor em andamento"
 +        rum "Terminarea serverului este in desfasurare"
 +        rus "Сервер находится в процессе остановки"
 +        serbian "Gašenje servera je u toku"
 +        slo "Prebieha ukončovanie práce servera"
 +        spa "Desconexion de servidor en proceso"
 +        swe "Servern går nu ned"
 +        ukr "Завершується работа сервера"
 +ER_BAD_FIELD_ERROR 42S22 S0022
 +        cze "Neznámý sloupec '%-.192s' v %-.192s"
 +        dan "Ukendt kolonne '%-.192s' i tabel %-.192s"
 +        nla "Onbekende kolom '%-.192s' in %-.192s"
 +        eng "Unknown column '%-.192s' in '%-.192s'"
 +        est "Tundmatu tulp '%-.192s' '%-.192s'-s"
 +        fre "Champ '%-.192s' inconnu dans %-.192s"
 +        ger "Unbekanntes Tabellenfeld '%-.192s' in %-.192s"
 +        greek "Αγνωστο πεδίο '%-.192s' σε '%-.192s'"
 +        hun "A(z) '%-.192s' oszlop ervenytelen '%-.192s'-ben"
 +        ita "Colonna sconosciuta '%-.192s' in '%-.192s'"
 +        jpn "列 '%-.192s' は '%-.192s' にはありません。"
 +        kor "Unknown 칼럼 '%-.192s' in '%-.192s'"
 +        nor "Ukjent kolonne '%-.192s' i tabell %-.192s"
 +        norwegian-ny "Ukjent felt '%-.192s' i tabell %-.192s"
 +        pol "Nieznana kolumna '%-.192s' w  %-.192s"
 +        por "Coluna '%-.192s' desconhecida em '%-.192s'"
 +        rum "Coloana invalida '%-.192s' in '%-.192s'"
 +        rus "Неизвестный столбец '%-.192s' в '%-.192s'"
 +        serbian "Nepoznata kolona '%-.192s' u '%-.192s'"
 +        slo "Neznáme pole '%-.192s' v '%-.192s'"
 +        spa "La columna '%-.192s' en %-.192s es desconocida"
 +        swe "Okänd kolumn '%-.192s' i %-.192s"
 +        ukr "Невідомий стовбець '%-.192s' у '%-.192s'"
 +ER_WRONG_FIELD_WITH_GROUP 42000 S1009
 +        cze "Použité '%-.192s' nebylo v group by"
 +        dan "Brugte '%-.192s' som ikke var i group by"
 +        nla "Opdracht gebruikt '%-.192s' dat niet in de GROUP BY voorkomt"
 +        eng "'%-.192s' isn't in GROUP BY"
 +        est "'%-.192s' puudub GROUP BY klauslis"
 +        fre "'%-.192s' n'est pas dans 'group by'"
 +        ger "'%-.192s' ist nicht in GROUP BY vorhanden"
 +        greek "Χρησιμοποιήθηκε '%-.192s' που δεν υπήρχε στο group by"
 +        hun "Used '%-.192s' with wasn't in group by"
 +        ita "Usato '%-.192s' che non e` nel GROUP BY"
 +        jpn "'%-.192s' はGROUP BY句で指定されていません。"
 +        kor "'%-.192s'은 GROUP BY속에 없음"
 +        nor "Brukte '%-.192s' som ikke var i group by"
 +        norwegian-ny "Brukte '%-.192s' som ikkje var i group by"
 +        pol "Użyto '%-.192s' bez umieszczenia w group by"
 +        por "'%-.192s' não está em 'GROUP BY'"
 +        rum "'%-.192s' nu exista in clauza GROUP BY"
 +        rus "'%-.192s' не присутствует в GROUP BY"
 +        serbian "Entitet '%-.192s' nije naveden u komandi 'GROUP BY'"
 +        slo "Použité '%-.192s' nebolo v 'group by'"
 +        spa "Usado '%-.192s' el cual no esta group by"
 +        swe "'%-.192s' finns inte i GROUP BY"
 +        ukr "'%-.192s' не є у GROUP BY"
 +ER_WRONG_GROUP_FIELD 42000 S1009
 +        cze "Nemohu použít group na '%-.192s'"
 +        dan "Kan ikke gruppere på '%-.192s'"
 +        nla "Kan '%-.192s' niet groeperen"
 +        eng "Can't group on '%-.192s'"
 +        est "Ei saa grupeerida '%-.192s' järgi"
 +        fre "Ne peut regrouper '%-.192s'"
 +        ger "Gruppierung über '%-.192s' nicht möglich"
 +        greek "Αδύνατη η ομαδοποίηση (group on) '%-.192s'"
 +        hun "A group nem hasznalhato: '%-.192s'"
 +        ita "Impossibile raggruppare per '%-.192s'"
 +        jpn "'%-.192s' でのグループ化はできません。"
 +        kor "'%-.192s'를 그룹할 수 없음"
 +        nor "Kan ikke gruppere på '%-.192s'"
 +        norwegian-ny "Kan ikkje gruppere på '%-.192s'"
 +        pol "Nie można grupować po '%-.192s'"
 +        por "Não pode agrupar em '%-.192s'"
 +        rum "Nu pot sa grupez pe (group on) '%-.192s'"
 +        rus "Невозможно произвести группировку по '%-.192s'"
 +        serbian "Ne mogu da grupišem po '%-.192s'"
 +        slo "Nemôžem použiť 'group' na '%-.192s'"
 +        spa "No puedo agrupar por '%-.192s'"
 +        swe "Kan inte använda GROUP BY med '%-.192s'"
 +        ukr "Не можу групувати по '%-.192s'"
 +ER_WRONG_SUM_SELECT 42000 S1009
 +        cze "Příkaz obsahuje zároveň funkci sum a sloupce"
 +        dan "Udtrykket har summer (sum) funktioner og kolonner i samme udtryk"
 +        nla "Opdracht heeft totaliseer functies en kolommen in dezelfde opdracht"
 +        eng "Statement has sum functions and columns in same statement"
 +        est "Lauses on korraga nii tulbad kui summeerimisfunktsioonid"
 +        fre "Vous demandez la fonction sum() et des champs dans la même commande"
 +        ger "Die Verwendung von Summierungsfunktionen und Spalten im selben Befehl ist nicht erlaubt"
 +        greek "Η διατύπωση περιέχει sum functions και columns στην ίδια διατύπωση"
 +        ita "Il comando ha una funzione SUM e una colonna non specificata nella GROUP BY"
 +        jpn "集計関数と通常の列が同時に指定されています。"
 +        kor "Statement 가 sum기능을 동작중이고 칼럼도 동일한 statement입니다."
 +        nor "Uttrykket har summer (sum) funksjoner og kolonner i samme uttrykk"
 +        norwegian-ny "Uttrykket har summer (sum) funksjoner og kolonner i same uttrykk"
 +        pol "Zapytanie ma funkcje sumuj?ce i kolumny w tym samym zapytaniu"
 +        por "Cláusula contém funções de soma e colunas juntas"
 +        rum "Comanda are functii suma si coloane in aceeasi comanda"
 +        rus "Выражение содержит групповые функции и столбцы, но не включает GROUP BY. А как вы умудрились получить это сообщение об ошибке?"
 +        serbian "Izraz ima 'SUM' agregatnu funkciju i kolone u isto vreme"
 +        slo "Príkaz obsahuje zároveň funkciu 'sum' a poľa"
 +        spa "El estamento tiene funciones de suma y columnas en el mismo estamento"
 +        swe "Kommandot har både sum functions och enkla funktioner"
 +        ukr "У виразі використано підсумовуючі функції поряд з іменами стовбців"
 +ER_WRONG_VALUE_COUNT 21S01 
 +        cze "Počet sloupců neodpovídá zadané hodnotě"
 +        dan "Kolonne tæller stemmer ikke med antallet af værdier"
 +        nla "Het aantal kolommen komt niet overeen met het aantal opgegeven waardes"
 +        eng "Column count doesn't match value count"
 +        est "Tulpade arv erineb väärtuste arvust"
 +        ger "Die Anzahl der Spalten entspricht nicht der Anzahl der Werte"
 +        greek "Το Column count δεν ταιριάζει με το value count"
 +        hun "Az oszlopban levo ertek nem egyezik meg a szamitott ertekkel"
 +        ita "Il numero delle colonne non e` uguale al numero dei valori"
 +        jpn "列数が値の個数と一致しません。"
 +        kor "칼럼의 카운트가 값의 카운트와 일치하지 않습니다."
 +        nor "Felt telling stemmer verdi telling"
 +        norwegian-ny "Kolonne telling stemmer verdi telling"
 +        pol "Liczba kolumn nie odpowiada liczbie warto?ci"
 +        por "Contagem de colunas não confere com a contagem de valores"
 +        rum "Numarul de coloane nu este acelasi cu numarul valoarei"
 +        rus "Количество столбцов не совпадает с количеством значений"
 +        serbian "Broj kolona ne odgovara broju vrednosti"
 +        slo "Počet polí nezodpovedá zadanej hodnote"
 +        spa "La columna con count no tiene valores para contar"
 +        swe "Antalet kolumner motsvarar inte antalet värden"
 +        ukr "Кількість стовбців не співпадає з кількістю значень"
 +ER_TOO_LONG_IDENT 42000 S1009
 +        cze "Jméno identifikátoru '%-.100s' je příliš dlouhé"
 +        dan "Navnet '%-.100s' er for langt"
 +        nla "Naam voor herkenning '%-.100s' is te lang"
 +        eng "Identifier name '%-.100s' is too long"
 +        est "Identifikaatori '%-.100s' nimi on liiga pikk"
 +        fre "Le nom de l'identificateur '%-.100s' est trop long"
 +        ger "Name des Bezeichners '%-.100s' ist zu lang"
 +        greek "Το identifier name '%-.100s' είναι πολύ μεγάλο"
 +        hun "A(z) '%-.100s' azonositonev tul hosszu."
 +        ita "Il nome dell'identificatore '%-.100s' e` troppo lungo"
 +        jpn "識別子名 '%-.100s' は長すぎます。"
 +        kor "Identifier '%-.100s'는 너무 길군요."
 +        nor "Identifikator '%-.100s' er for lang"
 +        norwegian-ny "Identifikator '%-.100s' er for lang"
 +        pol "Nazwa identyfikatora '%-.100s' jest zbyt długa"
 +        por "Nome identificador '%-.100s' é longo demais"
 +        rum "Numele indentificatorului '%-.100s' este prea lung"
 +        rus "Слишком длинный идентификатор '%-.100s'"
 +        serbian "Ime '%-.100s' je predugačko"
 +        slo "Meno identifikátora '%-.100s' je príliš dlhé"
 +        spa "El nombre del identificador '%-.100s' es demasiado grande"
 +        swe "Kolumnnamn '%-.100s' är för långt"
 +        ukr "Ім'я ідентифікатора '%-.100s' задовге"
 +ER_DUP_FIELDNAME 42S21 S1009
 +        cze "Zdvojené jméno sloupce '%-.192s'"
 +        dan "Feltnavnet '%-.192s' findes allerede"
 +        nla "Dubbele kolom naam '%-.192s'"
 +        eng "Duplicate column name '%-.192s'"
 +        est "Kattuv tulba nimi '%-.192s'"
 +        fre "Nom du champ '%-.192s' déjà utilisé"
 +        ger "Doppelter Spaltenname: '%-.192s'"
 +        greek "Επανάληψη column name '%-.192s'"
 +        hun "Duplikalt oszlopazonosito: '%-.192s'"
 +        ita "Nome colonna duplicato '%-.192s'"
 +        jpn "列名 '%-.192s' は重複してます。"
 +        kor "중복된 칼럼 이름: '%-.192s'"
 +        nor "Feltnavnet '%-.192s' eksisterte fra før"
 +        norwegian-ny "Feltnamnet '%-.192s' eksisterte frå før"
 +        pol "Powtórzona nazwa kolumny '%-.192s'"
 +        por "Nome da coluna '%-.192s' duplicado"
 +        rum "Numele coloanei '%-.192s' e duplicat"
 +        rus "Дублирующееся имя столбца '%-.192s'"
 +        serbian "Duplirano ime kolone '%-.192s'"
 +        slo "Opakované meno poľa '%-.192s'"
 +        spa "Nombre de columna duplicado '%-.192s'"
 +        swe "Kolumnnamn '%-.192s finns flera gånger"
 +        ukr "Дублююче ім'я стовбця '%-.192s'"
 +ER_DUP_KEYNAME 42000 S1009
 +        cze "Zdvojené jméno klíče '%-.192s'"
 +        dan "Indeksnavnet '%-.192s' findes allerede"
 +        nla "Dubbele zoeksleutel naam '%-.192s'"
 +        eng "Duplicate key name '%-.192s'"
 +        est "Kattuv võtme nimi '%-.192s'"
 +        fre "Nom de clef '%-.192s' déjà utilisé"
 +        ger "Doppelter Name für Schlüssel vorhanden: '%-.192s'"
 +        greek "Επανάληψη key name '%-.192s'"
 +        hun "Duplikalt kulcsazonosito: '%-.192s'"
 +        ita "Nome chiave duplicato '%-.192s'"
 +        jpn "索引名 '%-.192s' は重複しています。"
 +        kor "중복된 키 이름 : '%-.192s'"
 +        nor "Nøkkelnavnet '%-.192s' eksisterte fra før"
 +        norwegian-ny "Nøkkelnamnet '%-.192s' eksisterte frå før"
 +        pol "Powtórzony nazwa klucza '%-.192s'"
 +        por "Nome da chave '%-.192s' duplicado"
 +        rum "Numele cheiei '%-.192s' e duplicat"
 +        rus "Дублирующееся имя ключа '%-.192s'"
 +        serbian "Duplirano ime ključa '%-.192s'"
 +        slo "Opakované meno kľúča '%-.192s'"
 +        spa "Nombre de clave duplicado '%-.192s'"
 +        swe "Nyckelnamn '%-.192s' finns flera gånger"
 +        ukr "Дублююче ім'я ключа '%-.192s'"
 +# When using this error code, please use ER(ER_DUP_ENTRY_WITH_KEY_NAME)
 +# for the message string.  See, for example, code in handler.cc.
 +ER_DUP_ENTRY 23000 S1009
 +	cze "Zdvojený klíč '%-.192s' (číslo klíče %d)"
 +	dan "Ens værdier '%-.192s' for indeks %d"
 +	nla "Dubbele ingang '%-.192s' voor zoeksleutel %d"
 +	eng "Duplicate entry '%-.192s' for key %d"
 +	est "Kattuv väärtus '%-.192s' võtmele %d"
 +	fre "Duplicata du champ '%-.192s' pour la clef %d"
 +	ger "Doppelter Eintrag '%-.192s' für Schlüssel %d"
 +	greek "Διπλή εγγραφή '%-.192s' για το κλειδί %d"
 +	hun "Duplikalt bejegyzes '%-.192s' a %d kulcs szerint."
 +	ita "Valore duplicato '%-.192s' per la chiave %d"
 +	jpn "'%-.192s' は索引 %d で重複しています。"
 +	kor "중복된 입력 값 '%-.192s': key %d"
 +	nor "Like verdier '%-.192s' for nøkkel %d"
 +	norwegian-ny "Like verdiar '%-.192s' for nykkel %d"
 +	pol "Powtórzone wystąpienie '%-.192s' dla klucza %d"
 +	por "Entrada '%-.192s' duplicada para a chave %d"
 +	rum "Cimpul '%-.192s' e duplicat pentru cheia %d"
 +	rus "Дублирующаяся запись '%-.192s' по ключу %d"
 +	serbian "Dupliran unos '%-.192s' za ključ '%d'"
 +	slo "Opakovaný kľúč '%-.192s' (číslo kľúča %d)"
 +	spa "Entrada duplicada '%-.192s' para la clave %d"
 +	swe "Dublett '%-.192s' för nyckel %d"
 +	ukr "Дублюючий запис '%-.192s' для ключа %d"
 +ER_WRONG_FIELD_SPEC 42000 S1009
 +        cze "Chybná specifikace sloupce '%-.192s'"
 +        dan "Forkert kolonnespecifikaton for felt '%-.192s'"
 +        nla "Verkeerde kolom specificatie voor kolom '%-.192s'"
 +        eng "Incorrect column specifier for column '%-.192s'"
 +        est "Vigane tulba kirjeldus tulbale '%-.192s'"
 +        fre "Mauvais paramètre de champ pour le champ '%-.192s'"
 +        ger "Falsche Spezifikation für Feld '%-.192s'"
 +        greek "Εσφαλμένο column specifier για το πεδίο '%-.192s'"
 +        hun "Rossz oszlopazonosito: '%-.192s'"
 +        ita "Specifica errata per la colonna '%-.192s'"
 +        jpn "列 '%-.192s' の定義が不正です。"
 +        kor "칼럼 '%-.192s'의 부정확한 칼럼 정의자"
 +        nor "Feil kolonne spesifikator for felt '%-.192s'"
 +        norwegian-ny "Feil kolonne spesifikator for kolonne '%-.192s'"
 +        pol "Błędna specyfikacja kolumny dla kolumny '%-.192s'"
 +        por "Especificador de coluna incorreto para a coluna '%-.192s'"
 +        rum "Specificandul coloanei '%-.192s' este incorect"
 +        rus "Некорректный определитель столбца для столбца '%-.192s'"
 +        serbian "Pogrešan naziv kolone za kolonu '%-.192s'"
 +        slo "Chyba v špecifikácii poľa '%-.192s'"
 +        spa "Especificador de columna erroneo para la columna '%-.192s'"
 +        swe "Felaktigt kolumntyp för kolumn '%-.192s'"
 +        ukr "Невірний специфікатор стовбця '%-.192s'"
 +ER_PARSE_ERROR 42000 s1009
 +        cze "%s blízko '%-.80s' na řádku %d"
 +        dan "%s nær '%-.80s' på linje %d"
 +        nla "%s bij '%-.80s' in regel %d"
 +        eng "%s near '%-.80s' at line %d"
 +        est "%s '%-.80s' ligidal real %d"
 +        fre "%s près de '%-.80s' à la ligne %d"
 +        ger "%s bei '%-.80s' in Zeile %d"
 +        greek "%s πλησίον '%-.80s' στη γραμμή %d"
 +        hun "A %s a '%-.80s'-hez kozeli a %d sorban"
 +        ita "%s vicino a '%-.80s' linea %d"
 +        jpn "%s : '%-.80s' 付近 %d 行目"
 +        kor "'%s' 에러 같읍니다. ('%-.80s' 명령어 라인 %d)"
 +        nor "%s nær '%-.80s' på linje %d"
 +        norwegian-ny "%s attmed '%-.80s' på line %d"
 +        pol "%s obok '%-.80s' w linii %d"
 +        por "%s próximo a '%-.80s' na linha %d"
 +        rum "%s linga '%-.80s' pe linia %d"
 +        rus "%s около '%-.80s' на строке %d"
 +        serbian "'%s' u iskazu '%-.80s' na liniji %d"
 +        slo "%s blízko '%-.80s' na riadku %d"
 +        spa "%s cerca '%-.80s' en la linea %d"
 +        swe "%s nära '%-.80s' på rad %d"
 +        ukr "%s біля '%-.80s' в строці %d"
 +ER_EMPTY_QUERY 42000  
 +        cze "Výsledek dotazu je prázdný"
 +        dan "Forespørgsel var tom"
 +        nla "Query was leeg"
 +        eng "Query was empty"
 +        est "Tühi päring"
 +        fre "Query est vide"
 +        ger "Leere Abfrage"
 +        greek "Το ερώτημα (query) που θέσατε ήταν κενό"
 +        hun "Ures lekerdezes."
 +        ita "La query e` vuota"
 +        jpn "クエリが空です。"
 +        kor "쿼리결과가 없습니다."
 +        nor "Forespørsel var tom"
 +        norwegian-ny "Førespurnad var tom"
 +        pol "Zapytanie było puste"
 +        por "Consulta (query) estava vazia"
 +        rum "Query-ul a fost gol"
 +        rus "Запрос оказался пустым"
 +        serbian "Upit je bio prazan"
 +        slo "Výsledok požiadavky bol prázdny"
 +        spa "La query estaba vacia"
 +        swe "Frågan var tom"
 +        ukr "Пустий запит"
 +ER_NONUNIQ_TABLE 42000 S1009
 +        cze "Nejednoznačná tabulka/alias: '%-.192s'"
 +        dan "Tabellen/aliaset: '%-.192s' er ikke unikt"
 +        nla "Niet unieke waarde tabel/alias: '%-.192s'"
 +        eng "Not unique table/alias: '%-.192s'"
 +        est "Ei ole unikaalne tabel/alias '%-.192s'"
 +        fre "Table/alias: '%-.192s' non unique"
 +        ger "Tabellenname/Alias '%-.192s' nicht eindeutig"
 +        greek "Αδύνατη η ανεύρεση unique table/alias: '%-.192s'"
 +        hun "Nem egyedi tabla/alias: '%-.192s'"
 +        ita "Tabella/alias non unico: '%-.192s'"
 +        jpn "表名/別名 '%-.192s' は一意ではありません。"
 +        kor "Unique 하지 않은 테이블/alias: '%-.192s'"
 +        nor "Ikke unikt tabell/alias: '%-.192s'"
 +        norwegian-ny "Ikkje unikt tabell/alias: '%-.192s'"
 +        pol "Tabela/alias nie s? unikalne: '%-.192s'"
 +        por "Tabela/alias '%-.192s' não única"
 +        rum "Tabela/alias: '%-.192s' nu este unic"
 +        rus "Повторяющаяся таблица/псевдоним '%-.192s'"
 +        serbian "Tabela ili alias nisu bili jedinstveni: '%-.192s'"
 +        slo "Nie jednoznačná tabuľka/alias: '%-.192s'"
 +        spa "Tabla/alias: '%-.192s' es no unica"
 +        swe "Icke unikt tabell/alias: '%-.192s'"
 +        ukr "Неунікальна таблиця/псевдонім: '%-.192s'"
 +ER_INVALID_DEFAULT 42000 S1009
 +        cze "Chybná defaultní hodnota pro '%-.192s'"
 +        dan "Ugyldig standardværdi for '%-.192s'"
 +        nla "Foutieve standaard waarde voor '%-.192s'"
 +        eng "Invalid default value for '%-.192s'"
 +        est "Vigane vaikeväärtus '%-.192s' jaoks"
 +        fre "Valeur par défaut invalide pour '%-.192s'"
 +        ger "Fehlerhafter Vorgabewert (DEFAULT) für '%-.192s'"
 +        greek "Εσφαλμένη προκαθορισμένη τιμή (default value) για '%-.192s'"
 +        hun "Ervenytelen ertek: '%-.192s'"
 +        ita "Valore di default non valido per '%-.192s'"
 +        jpn "'%-.192s' へのデフォルト値が無効です。"
 +        kor "'%-.192s'의 유효하지 못한 디폴트 값을 사용하셨습니다."
 +        nor "Ugyldig standardverdi for '%-.192s'"
 +        norwegian-ny "Ugyldig standardverdi for '%-.192s'"
 +        pol "Niewła?ciwa warto?ć domy?lna dla '%-.192s'"
 +        por "Valor padrão (default) inválido para '%-.192s'"
 +        rum "Valoarea de default este invalida pentru '%-.192s'"
 +        rus "Некорректное значение по умолчанию для '%-.192s'"
 +        serbian "Loša default vrednost za '%-.192s'"
 +        slo "Chybná implicitná hodnota pre '%-.192s'"
 +        spa "Valor por defecto invalido para '%-.192s'"
 +        swe "Ogiltigt DEFAULT värde för '%-.192s'"
 +        ukr "Невірне значення по замовчуванню для '%-.192s'"
 +ER_MULTIPLE_PRI_KEY 42000 S1009
 +        cze "Definováno více primárních klíčů"
 +        dan "Flere primærnøgler specificeret"
 +        nla "Meerdere primaire zoeksleutels gedefinieerd"
 +        eng "Multiple primary key defined"
 +        est "Mitut primaarset võtit ei saa olla"
 +        fre "Plusieurs clefs primaires définies"
 +        ger "Mehrere Primärschlüssel (PRIMARY KEY) definiert"
 +        greek "Περισσότερα από ένα primary key ορίστηκαν"
 +        hun "Tobbszoros elsodleges kulcs definialas."
 +        ita "Definite piu` chiave primarie"
 +        jpn "PRIMARY KEY が複数定義されています。"
 +        kor "Multiple primary key가 정의되어 있슴"
 +        nor "Fleire primærnøkle spesifisert"
 +        norwegian-ny "Fleire primærnyklar spesifisert"
 +        pol "Zdefiniowano wiele kluczy podstawowych"
 +        por "Definida mais de uma chave primária"
 +        rum "Chei primare definite de mai multe ori"
 +        rus "Указано несколько первичных ключей"
 +        serbian "Definisani višestruki primarni ključevi"
 +        slo "Zadefinovaných viac primárnych kľúčov"
 +        spa "Multiples claves primarias definidas"
 +        swe "Flera PRIMARY KEY använda"
 +        ukr "Первинного ключа визначено неодноразово"
 +ER_TOO_MANY_KEYS 42000 S1009
 +        cze "Zadáno příliš mnoho klíčů, je povoleno nejvíce %d klíčů"
 +        dan "For mange nøgler specificeret. Kun %d nøgler må bruges"
 +        nla "Teveel zoeksleutels gedefinieerd. Maximaal zijn %d zoeksleutels toegestaan"
 +        eng "Too many keys specified; max %d keys allowed"
 +        est "Liiga palju võtmeid. Maksimaalselt võib olla %d võtit"
 +        fre "Trop de clefs sont définies. Maximum de %d clefs alloué"
 +        ger "Zu viele Schlüssel definiert. Maximal %d Schlüssel erlaubt"
 +        greek "Πάρα πολλά key ορίσθηκαν. Το πολύ %d επιτρέπονται"
 +        hun "Tul sok kulcs. Maximum %d kulcs engedelyezett."
 +        ita "Troppe chiavi. Sono ammesse max %d chiavi"
 +        jpn "索引の数が多すぎます。最大 %d 個までです。"
 +        kor "너무 많은 키가 정의되어 있읍니다.. 최대 %d의 키가 가능함"
 +        nor "For mange nøkler spesifisert. Maks %d nøkler tillatt"
 +        norwegian-ny "For mange nykler spesifisert. Maks %d nyklar tillatt"
 +        pol "Okre?lono zbyt wiele kluczy. Dostępnych jest maksymalnie %d kluczy"
 +        por "Especificadas chaves demais. O máximo permitido são %d chaves"
 +        rum "Prea multe chei. Numarul de chei maxim este %d"
 +        rus "Указано слишком много ключей. Разрешается указывать не более %d ключей"
 +        serbian "Navedeno je previše ključeva. Maksimum %d ključeva je dozvoljeno"
 +        slo "Zadaných ríliš veľa kľúčov. Najviac %d kľúčov je povolených"
 +        spa "Demasiadas claves primarias declaradas. Un maximo de %d claves son permitidas"
 +        swe "För många nycklar använda. Man får ha högst %d nycklar"
 +        ukr "Забагато ключів зазначено. Дозволено не більше %d ключів"
 +ER_TOO_MANY_KEY_PARTS 42000 S1009
 +        cze "Zadáno příliš mnoho část klíčů, je povoleno nejvíce %d částí"
 +        dan "For mange nøgledele specificeret. Kun %d dele må bruges"
 +        nla "Teveel zoeksleutel onderdelen gespecificeerd. Maximaal %d onderdelen toegestaan"
 +        eng "Too many key parts specified; max %d parts allowed"
 +        est "Võti koosneb liiga paljudest osadest. Maksimaalselt võib olla %d osa"
 +        fre "Trop de parties specifiées dans la clef. Maximum de %d parties"
 +        ger "Zu viele Teilschlüssel definiert. Maximal %d Teilschlüssel erlaubt"
 +        greek "Πάρα πολλά key parts ορίσθηκαν. Το πολύ %d επιτρέπονται"
 +        hun "Tul sok kulcsdarabot definialt. Maximum %d resz engedelyezett"
 +        ita "Troppe parti di chiave specificate. Sono ammesse max %d parti"
 +        jpn "索引のキー列指定が多すぎます。最大 %d 個までです。"
 +        kor "너무 많은 키 부분(parts)들이 정의되어 있읍니다.. 최대 %d 부분이 가능함"
 +        nor "For mange nøkkeldeler spesifisert. Maks %d deler tillatt"
 +        norwegian-ny "For mange nykkeldelar spesifisert. Maks %d delar tillatt"
 +        pol "Okre?lono zbyt wiele czę?ci klucza. Dostępnych jest maksymalnie %d czę?ci"
 +        por "Especificadas partes de chave demais. O máximo permitido são %d partes"
 +        rum "Prea multe chei. Numarul de chei maxim este %d"
 +        rus "Указано слишком много частей составного ключа. Разрешается указывать не более %d частей"
 +        serbian "Navedeno je previše delova ključa. Maksimum %d delova je dozvoljeno"
 +        slo "Zadaných ríliš veľa častí kľúčov. Je povolených najviac %d častí"
 +        spa "Demasiadas partes de clave declaradas. Un maximo de %d partes son permitidas"
 +        swe "För många nyckeldelar använda. Man får ha högst %d nyckeldelar"
 +        ukr "Забагато частин ключа зазначено. Дозволено не більше %d частин"
 +ER_TOO_LONG_KEY 42000 S1009
 +        cze "Zadaný klíč byl příliš dlouhý, největší délka klíče je %d"
 +        dan "Specificeret nøgle var for lang. Maksimal nøglelængde er %d"
 +        nla "Gespecificeerde zoeksleutel was te lang. De maximale lengte is %d"
 +        eng "Specified key was too long; max key length is %d bytes"
 +        est "Võti on liiga pikk. Maksimaalne võtmepikkus on %d"
 +        fre "La clé est trop longue. Longueur maximale: %d"
 +        ger "Schlüssel ist zu lang. Die maximale Schlüssellänge beträgt %d"
 +        greek "Το κλειδί που ορίσθηκε είναι πολύ μεγάλο. Το μέγιστο μήκος είναι %d"
 +        hun "A megadott kulcs tul hosszu. Maximalis kulcshosszusag: %d"
 +        ita "La chiave specificata e` troppo lunga. La max lunghezza della chiave e` %d"
 +        jpn "索引のキーが長すぎます。最大 %d バイトまでです。"
 +        kor "정의된 키가 너무 깁니다. 최대 키의 길이는 %d입니다."
 +        nor "Spesifisert nøkkel var for lang. Maks nøkkellengde er is %d"
 +        norwegian-ny "Spesifisert nykkel var for lang. Maks nykkellengde er %d"
 +        pol "Zdefinowany klucz jest zbyt długi. Maksymaln? długo?ci? klucza jest %d"
 +        por "Chave especificada longa demais. O comprimento de chave máximo permitido é %d"
 +        rum "Cheia specificata este prea lunga. Marimea maxima a unei chei este de %d"
 +        rus "Указан слишком длинный ключ. Максимальная длина ключа составляет %d байт"
 +        serbian "Navedeni ključ je predug. Maksimalna dužina ključa je %d"
 +        slo "Zadaný kľúč je príliš dlhý, najväčšia dĺžka kľúča je %d"
 +        spa "Declaracion de clave demasiado larga. La maxima longitud de clave es %d"
 +        swe "För lång nyckel. Högsta tillåtna nyckellängd är %d"
 +        ukr "Зазначений ключ задовгий. Найбільша довжина ключа %d байтів"
 +ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009
 +        cze "Klíčový sloupec '%-.192s' v tabulce neexistuje"
 +        dan "Nøglefeltet '%-.192s' eksisterer ikke i tabellen"
 +        nla "Zoeksleutel kolom '%-.192s' bestaat niet in tabel"
 +        eng "Key column '%-.192s' doesn't exist in table"
 +        est "Võtme tulp '%-.192s' puudub tabelis"
 +        fre "La clé '%-.192s' n'existe pas dans la table"
 +        ger "In der Tabelle gibt es kein Schlüsselfeld '%-.192s'"
 +        greek "Το πεδίο κλειδί '%-.192s' δεν υπάρχει στον πίνακα"
 +        hun "A(z) '%-.192s'kulcsoszlop nem letezik a tablaban"
 +        ita "La colonna chiave '%-.192s' non esiste nella tabella"
 +        jpn "キー列 '%-.192s' は表にありません。"
 +        kor "Key 칼럼 '%-.192s'는 테이블에 존재하지 않습니다."
 +        nor "Nøkkel felt '%-.192s' eksiterer ikke i tabellen"
 +        norwegian-ny "Nykkel kolonne '%-.192s' eksiterar ikkje i tabellen"
 +        pol "Kolumna '%-.192s' zdefiniowana w kluczu nie istnieje w tabeli"
 +        por "Coluna chave '%-.192s' não existe na tabela"
 +        rum "Coloana cheie '%-.192s' nu exista in tabela"
 +        rus "Ключевой столбец '%-.192s' в таблице не существует"
 +        serbian "Ključna kolona '%-.192s' ne postoji u tabeli"
 +        slo "Kľúčový stĺpec '%-.192s' v tabuľke neexistuje"
 +        spa "La columna clave '%-.192s' no existe en la tabla"
 +        swe "Nyckelkolumn '%-.192s' finns inte"
 +        ukr "Ключовий стовбець '%-.192s' не існує у таблиці"
 +ER_BLOB_USED_AS_KEY 42000 S1009
 +        eng "BLOB column %`s can't be used in key specification in the %s table"
 +        ger "BLOB-Feld %`s kann beim %s Tabellen nicht als Schlüssel verwendet werden"
 +        rus "Столбец типа BLOB %`s не может быть использован как значение ключа в %s таблице"
 +        ukr "BLOB стовбець %`s не може бути використаний у визначенні ключа в %s таблиці"
 +ER_TOO_BIG_FIELDLENGTH 42000 S1009
 +        cze "Příliš velká délka sloupce '%-.192s' (nejvíce %lu). Použijte BLOB"
 +        dan "For stor feltlængde for kolonne '%-.192s' (maks = %lu). Brug BLOB i stedet"
 +        nla "Te grote kolomlengte voor '%-.192s' (max = %lu). Maak hiervoor gebruik van het type BLOB"
 +        eng "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead"
 +        est "Tulba '%-.192s' pikkus on liiga pikk (maksimaalne pikkus: %lu). Kasuta BLOB väljatüüpi"
 +        fre "Champ '%-.192s' trop long (max = %lu). Utilisez un BLOB"
 +        ger "Feldlänge für Feld '%-.192s' zu groß (maximal %lu). BLOB- oder TEXT-Spaltentyp verwenden!"
 +        greek "Πολύ μεγάλο μήκος για το πεδίο '%-.192s' (max = %lu). Παρακαλώ χρησιμοποιείστε τον τύπο BLOB"
 +        hun "A(z) '%-.192s' oszlop tul hosszu. (maximum = %lu). Hasznaljon BLOB tipust inkabb."
 +        ita "La colonna '%-.192s' e` troppo grande (max=%lu). Utilizza un BLOB."
 +        jpn "列 '%-.192s' のサイズ定義が大きすぎます (最大 %lu まで)。代わりに BLOB または TEXT を使用してください。"
 +        kor "칼럼 '%-.192s'의 칼럼 길이가 너무 깁니다 (최대 = %lu). 대신에 BLOB를 사용하세요."
 +        nor "For stor nøkkellengde for kolonne '%-.192s' (maks = %lu). Bruk BLOB istedenfor"
 +        norwegian-ny "For stor nykkellengde for felt '%-.192s' (maks = %lu). Bruk BLOB istadenfor"
 +        pol "Zbyt duża długo?ć kolumny '%-.192s' (maks. = %lu). W zamian użyj typu BLOB"
 +        por "Comprimento da coluna '%-.192s' grande demais (max = %lu); use BLOB em seu lugar"
 +        rum "Lungimea coloanei '%-.192s' este prea lunga (maximum = %lu). Foloseste BLOB mai bine"
 +        rus "Слишком большая длина столбца '%-.192s' (максимум = %lu). Используйте тип BLOB или TEXT вместо текущего"
 +        serbian "Previše podataka za kolonu '%-.192s' (maksimum je %lu). Upotrebite BLOB polje"
 +        slo "Príliš veľká dĺžka pre pole '%-.192s' (maximum = %lu). Použite BLOB"
 +        spa "Longitud de columna demasiado grande para la columna '%-.192s' (maximo = %lu).Usar BLOB en su lugar"
 +        swe "För stor kolumnlängd angiven för '%-.192s' (max= %lu). Använd en BLOB instället"
 +        ukr "Задовга довжина стовбця '%-.192s' (max = %lu). Використайте тип BLOB"
 +ER_WRONG_AUTO_KEY 42000 S1009
 +        cze "Můžete mít pouze jedno AUTO pole a to musí být definováno jako klíč"
 +        dan "Der kan kun specificeres eet AUTO_INCREMENT-felt, og det skal være indekseret"
 +        nla "Er kan slechts 1 autofield zijn en deze moet als zoeksleutel worden gedefinieerd."
 +        eng "Incorrect table definition; there can be only one auto column and it must be defined as a key"
 +        est "Vigane tabelikirjeldus; Tabelis tohib olla üks auto_increment tüüpi tulp ning see peab olema defineeritud võtmena"
 +        fre "Un seul champ automatique est permis et il doit être indexé"
 +        ger "Falsche Tabellendefinition. Es darf nur eine AUTO_INCREMENT-Spalte geben, und diese muss als Schlüssel definiert werden"
 +        greek "Μπορεί να υπάρχει μόνο ένα auto field και πρέπει να έχει ορισθεί σαν key"
 +        hun "Csak egy auto mezo lehetseges, es azt kulcskent kell definialni."
 +        ita "Puo` esserci solo un campo AUTO e deve essere definito come chiave"
 +        jpn "不正な表定義です。AUTO_INCREMENT列は1個までで、索引を定義する必要があります。"
 +        kor "부정확한 테이블 정의; 테이블은 하나의 auto 칼럼이 존재하고 키로 정의되어져야 합니다."
 +        nor "Bare ett auto felt kan være definert som nøkkel."
 +        norwegian-ny "Bare eitt auto felt kan være definert som nøkkel."
 +        pol "W tabeli może być tylko jedno pole auto i musi ono być zdefiniowane jako klucz"
 +        por "Definição incorreta de tabela. Somente é permitido um único campo auto-incrementado e ele tem que ser definido como chave"
 +        rum "Definitia tabelei este incorecta; Nu pot fi mai mult de o singura coloana de tip auto si aceasta trebuie definita ca cheie"
 +        rus "Некорректное определение таблицы: может существовать только один автоинкрементный столбец, и он должен быть определен как ключ"
 +        serbian "Pogrešna definicija tabele; U tabeli može postojati samo jedna 'AUTO' kolona i ona mora biti istovremeno definisana kao kolona ključa"
 +        slo "Môžete mať iba jedno AUTO pole a to musí byť definované ako kľúč"
 +        spa "Puede ser solamente un campo automatico y este debe ser definido como una clave"
 +        swe "Det får finnas endast ett AUTO_INCREMENT-fält och detta måste vara en nyckel"
 +        ukr "Невірне визначення таблиці; Може бути лише один автоматичний стовбець, що повинен бути визначений як ключ"
 +ER_UNUSED_9
 +        eng "You should never see it"
 +ER_NORMAL_SHUTDOWN  
 +        cze "%s (%s): normální ukončení\n"
 +        dan "%s (%s): Normal nedlukning\n"
 +        nla "%s (%s): Normaal afgesloten \n"
 +        eng "%s (%s): Normal shutdown\n"
 +        est "%s (%s): MariaDB lõpetas\n"
 +        fre "%s (%s): Arrêt normal du serveur\n"
 +        ger "%s (%s): Normal heruntergefahren\n"
 +        greek "%s (%s): Φυσιολογική διαδικασία shutdown\n"
 +        hun "%s (%s): Normal leallitas\n"
 +        ita "%s (%s): Shutdown normale\n"
 +        jpn "%s (%s): 通常シャットダウン\n"
 +        kor "%s (%s): 정상적인 shutdown\n"
 +        nor "%s (%s): Normal avslutning\n"
 +        norwegian-ny "%s (%s): Normal nedkopling\n"
 +        pol "%s (%s): Standardowe zakończenie działania\n"
 +        por "%s (%s): 'Shutdown' normal\n"
 +        rum "%s (%s): Terminare normala\n"
 +        rus "%s (%s): Корректная остановка\n"
 +        serbian "%s (%s): Normalno gašenje\n"
 +        slo "%s (%s): normálne ukončenie\n"
 +        spa "%s (%s): Apagado normal\n"
 +        swe "%s (%s): Normal avslutning\n"
 +        ukr "%s (%s): Нормальне завершення\n"
 +ER_GOT_SIGNAL  
 +        cze "%s: přijat signal %d, končím\n"
 +        dan "%s: Fangede signal %d. Afslutter!!\n"
 +        nla "%s: Signaal %d. Systeem breekt af!\n"
 +        eng "%s: Got signal %d. Aborting!\n"
 +        est "%s: sain signaali %d. Lõpetan!\n"
 +        fre "%s: Reçu le signal %d. Abandonne!\n"
 +        ger "%s: Signal %d erhalten. Abbruch!\n"
 +        greek "%s: Ελήφθη το μήνυμα %d. Η διαδικασία εγκαταλείπεται!\n"
 +        hun "%s: %d jelzes. Megszakitva!\n"
 +        ita "%s: Ricevuto segnale %d. Interruzione!\n"
 +        jpn "%s: シグナル %d を受信しました。強制終了します!\n"
 +        kor "%s: %d 신호가 들어왔음. 중지!\n"
 +        nor "%s: Oppdaget signal %d. Avslutter!\n"
 +        norwegian-ny "%s: Oppdaga signal %d. Avsluttar!\n"
 +        pol "%s: Otrzymano sygnał %d. Kończenie działania!\n"
 +        por "%s: Obteve sinal %d. Abortando!\n"
 +        rum "%s: Semnal %d obtinut. Aborting!\n"
 +        rus "%s: Получен сигнал %d. Прекращаем!\n"
 +        serbian "%s: Dobio signal %d. Prekidam!\n"
 +        slo "%s: prijatý signál %d, ukončenie (Abort)!\n"
 +        spa "%s: Recibiendo signal %d. Abortando!\n"
 +        swe "%s: Fick signal %d. Avslutar!\n"
 +        ukr "%s: Отримано сигнал %d. Перериваюсь!\n"
 +ER_SHUTDOWN_COMPLETE  
 +        cze "%s: ukončení práce hotovo\n"
 +        dan "%s: Server lukket\n"
 +        nla "%s: Afsluiten afgerond\n"
 +        eng "%s: Shutdown complete\n"
 +        est "%s: Lõpp\n"
 +        fre "%s: Arrêt du serveur terminé\n"
 +        ger "%s: Herunterfahren beendet\n"
 +        greek "%s: Η διαδικασία Shutdown ολοκληρώθηκε\n"
 +        hun "%s: A leallitas kesz\n"
 +        ita "%s: Shutdown completato\n"
 +        jpn "%s: シャットダウン完了\n"
 +        kor "%s: Shutdown 이 완료됨!\n"
 +        nor "%s: Avslutning komplett\n"
 +        norwegian-ny "%s: Nedkopling komplett\n"
 +        pol "%s: Zakończenie działania wykonane\n"
 +        por "%s: 'Shutdown' completo\n"
 +        rum "%s: Terminare completa\n"
 +        rus "%s: Остановка завершена\n"
 +        serbian "%s: Gašenje završeno\n"
 +        slo "%s: práca ukončená\n"
 +        spa "%s: Apagado completado\n"
 +        swe "%s: Avslutning klar\n"
 +        ukr "%s: Роботу завершено\n"
 +ER_FORCING_CLOSE 08S01 
 +        cze "%s: násilné uzavření threadu %ld uživatele '%-.48s'\n"
 +        dan "%s: Forceret nedlukning af tråd: %ld  bruger: '%-.48s'\n"
 +        nla "%s: Afsluiten afgedwongen van thread %ld  gebruiker: '%-.48s'\n"
 +        eng "%s: Forcing close of thread %ld  user: '%-.48s'\n"
 +        est "%s: Sulgen jõuga lõime %ld  kasutaja: '%-.48s'\n"
 +        fre "%s: Arrêt forcé de la tâche (thread) %ld  utilisateur: '%-.48s'\n"
 +        ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.48s'\n"
 +        greek "%s: Το thread θα κλείσει %ld  user: '%-.48s'\n"
 +        hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.48s'\n"
 +        ita "%s: Forzata la chiusura del thread %ld utente: '%-.48s'\n"
 +        jpn "%s: スレッド %ld を強制終了します (ユーザー: '%-.48s')\n"
 +        kor "%s: thread %ld의 강제 종료 user: '%-.48s'\n"
 +        nor "%s: Påtvinget avslutning av tråd %ld  bruker: '%-.48s'\n"
 +        norwegian-ny "%s: Påtvinga avslutning av tråd %ld  brukar: '%-.48s'\n"
 +        pol "%s: Wymuszenie zamknięcia w?tku %ld  użytkownik: '%-.48s'\n"
 +        por "%s: Forçando finalização da 'thread' %ld - usuário '%-.48s'\n"
 +        rum "%s: Terminare fortata a thread-ului %ld  utilizatorului: '%-.48s'\n"
 +        rus "%s: Принудительно закрываем поток %ld  пользователя: '%-.48s'\n"
 +        serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.48s'\n"
 +        slo "%s: násilné ukončenie vlákna %ld užívateľa '%-.48s'\n"
 +        spa "%s: Forzando a cerrar el thread %ld  usuario: '%-.48s'\n"
 +        swe "%s: Stänger av tråd %ld; användare: '%-.48s'\n"
 +        ukr "%s: Прискорюю закриття гілки %ld користувача: '%-.48s'\n"
 +ER_IPSOCK_ERROR 08S01 
 +        cze "Nemohu vytvořit IP socket"
 +        dan "Kan ikke oprette IP socket"
 +        nla "Kan IP-socket niet openen"
 +        eng "Can't create IP socket"
 +        est "Ei suuda luua IP socketit"
 +        fre "Ne peut créer la connexion IP (socket)"
 +        ger "Kann IP-Socket nicht erzeugen"
 +        greek "Δεν είναι δυνατή η δημιουργία IP socket"
 +        hun "Az IP socket nem hozhato letre"
 +        ita "Impossibile creare il socket IP"
 +        jpn "IPソケットを作成できません。"
 +        kor "IP 소켓을 만들지 못했습니다."
 +        nor "Kan ikke opprette IP socket"
 +        norwegian-ny "Kan ikkje opprette IP socket"
 +        pol "Nie można stworzyć socket'u IP"
 +        por "Não pode criar o soquete IP"
 +        rum "Nu pot crea IP socket"
 +        rus "Невозможно создать IP-сокет"
 +        serbian "Ne mogu da kreiram IP socket"
 +        slo "Nemôžem vytvoriť IP socket"
 +        spa "No puedo crear IP socket"
 +        swe "Kan inte skapa IP-socket"
 +        ukr "Не можу створити IP роз'єм"
 +ER_NO_SUCH_INDEX 42S12 S1009
 +        cze "Tabulka '%-.192s' nemá index odpovídající CREATE INDEX. Vytvořte tabulku znovu"
 +        dan "Tabellen '%-.192s' har ikke den nøgle, som blev brugt i CREATE INDEX. Genopret tabellen"
 +        nla "Tabel '%-.192s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw"
 +        eng "Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table"
 +        est "Tabelil '%-.192s' puuduvad võtmed. Loo tabel uuesti"
 +        fre "La table '%-.192s' n'a pas d'index comme celle utilisée dans CREATE INDEX. Recréez la table"
 +        ger "Tabelle '%-.192s' besitzt keinen wie den in CREATE INDEX verwendeten Index. Tabelle neu anlegen"
 +        greek "Ο πίνακας '%-.192s' δεν έχει ευρετήριο (index) σαν αυτό που χρησιμοποιείτε στην CREATE INDEX. Παρακαλώ, ξαναδημιουργήστε τον πίνακα"
 +        hun "A(z) '%-.192s' tablahoz nincs meg a CREATE INDEX altal hasznalt index. Alakitsa at a tablat"
 +        ita "La tabella '%-.192s' non ha nessun indice come quello specificatato dalla CREATE INDEX. Ricrea la tabella"
 +        jpn "表 '%-.192s' に以前CREATE INDEXで作成された索引がありません。表を作り直してください。"
 +        kor "테이블 '%-.192s'는 인덱스를 만들지 않았습니다. alter 테이블명령을 이용하여 테이블을 수정하세요..."
 +        nor "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Gjenopprett tabellen"
 +        norwegian-ny "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Oprett tabellen på nytt"
 +        pol "Tabela '%-.192s' nie ma indeksu takiego jak w CREATE INDEX. Stwórz tabelę"
 +        por "Tabela '%-.192s' não possui um índice como o usado em CREATE INDEX. Recrie a tabela"
 +        rum "Tabela '%-.192s' nu are un index ca acela folosit in CREATE INDEX. Re-creeaza tabela"
 +        rus "В таблице '%-.192s' нет такого индекса, как в CREATE INDEX. Создайте таблицу заново"
 +        serbian "Tabela '%-.192s' nema isti indeks kao onaj upotrebljen pri komandi 'CREATE INDEX'. Napravite tabelu ponovo"
 +        slo "Tabuľka '%-.192s' nemá index zodpovedajúci CREATE INDEX. Vytvorte tabulku znova"
 +        spa "La tabla '%-.192s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla"
 +        swe "Tabellen '%-.192s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen"
 +        ukr "Таблиця '%-.192s' має індекс, що не співпадає з вказанним у CREATE INDEX. Створіть таблицю знову"
 +ER_WRONG_FIELD_TERMINATORS 42000 S1009
 +        cze "Argument separátoru položek nebyl očekáván. Přečtěte si manuál"
 +        dan "Felt adskiller er ikke som forventet, se dokumentationen"
 +        nla "De argumenten om velden te scheiden zijn anders dan verwacht. Raadpleeg de handleiding"
 +        eng "Field separator argument is not what is expected; check the manual"
 +        est "Väljade eraldaja erineb oodatust. Tutvu kasutajajuhendiga"
 +        fre "Séparateur de champs inconnu.  Vérifiez dans le manuel"
 +        ger "Feldbegrenzer-Argument ist nicht in der erwarteten Form. Bitte im Handbuch nachlesen"
 +        greek "Ο διαχωριστής πεδίων δεν είναι αυτός που αναμενόταν. Παρακαλώ ανατρέξτε στο manual"
 +        hun "A mezoelvalaszto argumentumok nem egyeznek meg a varttal. Nezze meg a kezikonyvben!"
 +        ita "L'argomento 'Field separator' non e` quello atteso. Controlla il manuale"
 +        jpn "フィールド区切り文字が予期せぬ使われ方をしています。マニュアルを確認して下さい。"
 +        kor "필드 구분자 인수들이 완전하지 않습니다. 메뉴얼을 찾아 보세요."
 +        nor "Felt skiller argumentene er ikke som forventet, se dokumentasjonen"
 +        norwegian-ny "Felt skiljer argumenta er ikkje som venta, sjå dokumentasjonen"
 +        pol "Nie oczekiwano separatora. SprawdĽ podręcznik"
 +        por "Argumento separador de campos não é o esperado. Cheque o manual"
 +        rum "Argumentul pentru separatorul de cimpuri este diferit de ce ma asteptam. Verifica manualul"
 +        rus "Аргумент разделителя полей - не тот, который ожидался. Обращайтесь к документации"
 +        serbian "Argument separatora polja nije ono što se očekivalo. Proverite uputstvo MariaDB server-a"
 +        slo "Argument oddeľovač polí nezodpovedá požiadavkám. Skontrolujte v manuáli"
 +        spa "Los separadores de argumentos del campo no son los especificados. Comprueba el manual"
 +        swe "Fältseparatorerna är vad som förväntades. Kontrollera mot manualen"
 +        ukr "Хибний розділювач полів. Почитайте документацію"
 +ER_BLOBS_AND_NO_TERMINATED 42000 S1009
 +        cze "Není možné použít pevný rowlength s BLOBem. Použijte 'fields terminated by'."
 +        dan "Man kan ikke bruge faste feltlængder med BLOB. Brug i stedet 'fields terminated by'."
 +        nla "Bij het gebruik van BLOBs is het niet mogelijk om vaste rijlengte te gebruiken. Maak s.v.p. gebruik van 'fields terminated by'."
 +        eng "You can't use fixed rowlength with BLOBs; please use 'fields terminated by'"
 +        est "BLOB-tüüpi väljade olemasolul ei saa kasutada fikseeritud väljapikkust. Vajalik 'fields terminated by' määrang."
 +        fre "Vous ne pouvez utiliser des lignes de longueur fixe avec des BLOBs. Utiliser 'fields terminated by'."
 +        ger "Eine feste Zeilenlänge kann für BLOB-Felder nicht verwendet werden. Bitte 'fields terminated by' verwenden"
 +        greek "Δεν μπορείτε να χρησιμοποιήσετε fixed rowlength σε BLOBs. Παρακαλώ χρησιμοποιείστε 'fields terminated by'."
 +        hun "Fix hosszusagu BLOB-ok nem hasznalhatok. Hasznalja a 'mezoelvalaszto jelet' ."
 +        ita "Non possono essere usate righe a lunghezza fissa con i BLOB. Usa 'FIELDS TERMINATED BY'."
 +        jpn "BLOBには固定長レコードが使用できません。'FIELDS TERMINATED BY'句を使用して下さい。"
 +        kor "BLOB로는 고정길이의 lowlength를 사용할 수 없습니다. 'fields terminated by'를 사용하세요."
 +        nor "En kan ikke bruke faste feltlengder med BLOB. Vennlisgt bruk 'fields terminated by'."
 +        norwegian-ny "Ein kan ikkje bruke faste feltlengder med BLOB. Vennlisgt bruk 'fields terminated by'."
 +        pol "Nie można użyć stałej długo?ci wiersza z polami typu BLOB. Użyj 'fields terminated by'."
 +        por "Você não pode usar comprimento de linha fixo com BLOBs. Por favor, use campos com comprimento limitado."
 +        rum "Nu poti folosi lungime de cimp fix pentru BLOB-uri. Foloseste 'fields terminated by'."
 +        rus "Фиксированный размер записи с полями типа BLOB использовать нельзя, применяйте 'fields terminated by'"
 +        serbian "Ne možete koristiti fiksnu veličinu sloga kada imate BLOB polja. Molim koristite 'fields terminated by' opciju."
 +        slo "Nie je možné použiť fixnú dĺžku s BLOBom. Použite 'fields terminated by'."
 +        spa "No puedes usar longitudes de filas fijos con BLOBs. Por favor usa 'campos terminados por '."
 +        swe "Man kan inte använda fast radlängd med blobs. Använd 'fields terminated by'"
 +        ukr "Не можна використовувати сталу довжину строки з BLOB. Зкористайтеся 'fields terminated by'"
 +ER_TEXTFILE_NOT_READABLE  
 +        cze "Soubor '%-.128s' musí být v adresáři databáze nebo čitelný pro všechny"
 +        dan "Filen '%-.128s' skal være i database-folderen, eller kunne læses af alle"
 +        nla "Het bestand '%-.128s' dient in de database directory voor the komen of leesbaar voor iedereen te zijn."
 +        eng "The file '%-.128s' must be in the database directory or be readable by all"
 +        est "Fail '%-.128s' peab asuma andmebaasi kataloogis või olema kõigile loetav"
 +        fre "Le fichier '%-.128s' doit être dans le répertoire de la base et lisible par tous"
 +        ger "Datei '%-.128s' muss im Datenbank-Verzeichnis vorhanden oder lesbar für alle sein"
 +        greek "Το αρχείο '%-.128s' πρέπει να υπάρχει στο database directory ή να μπορεί να διαβαστεί από όλους"
 +        hun "A(z) '%-.128s'-nak az adatbazis konyvtarban kell lennie, vagy mindenki szamara olvashatonak"
 +        ita "Il file '%-.128s' deve essere nella directory del database e deve essere leggibile da tutti"
 +        jpn "ファイル '%-.128s' はデータベースディレクトリにあるか、全てのユーザーから読める必要があります。"
 +        kor "'%-.128s' 화일는 데이타베이스 디렉토리에 존재하거나 모두에게 읽기 가능하여야 합니다."
 +        nor "Filen '%-.128s' må være i database-katalogen for å være lesbar for alle"
 +        norwegian-ny "Filen '%-.128s' må være i database-katalogen for å være lesbar for alle"
 +        pol "Plik '%-.128s' musi znajdować sie w katalogu bazy danych lub mieć prawa czytania przez wszystkich"
 +        por "Arquivo '%-.128s' tem que estar no diretório do banco de dados ou ter leitura possível para todos"
 +        rum "Fisierul '%-.128s' trebuie sa fie in directorul bazei de data sau trebuie sa poata sa fie citit de catre toata lumea (verifica permisiile)"
 +        rus "Файл '%-.128s' должен находиться в том же каталоге, что и база данных, или быть общедоступным для чтения"
 +        serbian "File '%-.128s' mora biti u direktorijumu gde su file-ovi baze i mora imati odgovarajuća prava pristupa"
 +        slo "Súbor '%-.128s' musí byť v adresári databázy, alebo čitateľný pre všetkých"
 +        spa "El archivo '%-.128s' debe estar en el directorio de la base de datos o ser de lectura por todos"
 +        swe "Textfilen '%-.128s' måste finnas i databasbiblioteket eller vara läsbar för alla"
 +        ukr "Файл '%-.128s' повинен бути у теці бази данних або мати встановлене право на читання для усіх"
 +ER_FILE_EXISTS_ERROR  
 +        cze "Soubor '%-.200s' již existuje"
 +        dan "Filen '%-.200s' eksisterer allerede"
 +        nla "Het bestand '%-.200s' bestaat reeds"
 +        eng "File '%-.200s' already exists"
 +        est "Fail '%-.200s' juba eksisteerib"
 +        fre "Le fichier '%-.200s' existe déjà"
 +        ger "Datei '%-.200s' bereits vorhanden"
 +        greek "Το αρχείο '%-.200s' υπάρχει ήδη"
 +        hun "A '%-.200s' file mar letezik."
 +        ita "Il file '%-.200s' esiste gia`"
 +        jpn "ファイル '%-.200s' はすでに存在します。"
 +        kor "'%-.200s' 화일은 이미 존재합니다."
 +        nor "Filen '%-.200s' eksisterte allerede"
 +        norwegian-ny "Filen '%-.200s' eksisterte allereide"
 +        pol "Plik '%-.200s' już istnieje"
 +        por "Arquivo '%-.200s' já existe"
 +        rum "Fisierul '%-.200s' exista deja"
 +        rus "Файл '%-.200s' уже существует"
 +        serbian "File '%-.200s' već postoji"
 +        slo "Súbor '%-.200s' už existuje"
 +        spa "El archivo '%-.200s' ya existe"
 +        swe "Filen '%-.200s' existerar redan"
 +        ukr "Файл '%-.200s' вже існує"
 +ER_LOAD_INFO  
 +        cze "Záznamů: %ld  Vymazáno: %ld  Přeskočeno: %ld  Varování: %ld"
 +        dan "Poster: %ld  Fjernet: %ld  Sprunget over: %ld  Advarsler: %ld"
 +        nla "Records: %ld  Verwijderd: %ld  Overgeslagen: %ld  Waarschuwingen: %ld"
 +        eng "Records: %ld  Deleted: %ld  Skipped: %ld  Warnings: %ld"
 +        est "Kirjeid: %ld  Kustutatud: %ld  Vahele jäetud: %ld  Hoiatusi: %ld"
 +        fre "Enregistrements: %ld  Effacés: %ld  Non traités: %ld  Avertissements: %ld"
 +        ger "Datensätze: %ld  Gelöscht: %ld  Ausgelassen: %ld  Warnungen: %ld"
 +        greek "Εγγραφές: %ld  Διαγραφές: %ld  Παρεκάμφθησαν: %ld  Προειδοποιήσεις: %ld"
 +        hun "Rekordok: %ld  Torolve: %ld  Skipped: %ld  Warnings: %ld"
 +        ita "Records: %ld  Cancellati: %ld  Saltati: %ld  Avvertimenti: %ld"
 +        jpn "レコード数: %ld  削除: %ld  スキップ: %ld  警告: %ld"
 +        kor "레코드: %ld개  삭제: %ld개  스킵: %ld개  경고: %ld개"
 +        nor "Poster: %ld  Fjernet: %ld  Hoppet over: %ld  Advarsler: %ld"
 +        norwegian-ny "Poster: %ld  Fjerna: %ld  Hoppa over: %ld  Åtvaringar: %ld"
 +        pol "Recordów: %ld  Usuniętych: %ld  Pominiętych: %ld  Ostrzeżeń: %ld"
 +        por "Registros: %ld - Deletados: %ld - Ignorados: %ld - Avisos: %ld"
 +        rum "Recorduri: %ld  Sterse: %ld  Sarite (skipped): %ld  Atentionari (warnings): %ld"
 +        rus "Записей: %ld  Удалено: %ld  Пропущено: %ld  Предупреждений: %ld"
 +        serbian "Slogova: %ld  Izbrisano: %ld  Preskočeno: %ld  Upozorenja: %ld"
 +        slo "Záznamov: %ld  Zmazaných: %ld  Preskočených: %ld  Varovania: %ld"
 +        spa "Registros: %ld  Borrados: %ld  Saltados: %ld  Peligros: %ld"
 +        swe "Rader: %ld  Bortagna: %ld  Dubletter: %ld  Varningar: %ld"
 +        ukr "Записів: %ld  Видалено: %ld  Пропущено: %ld  Застережень: %ld"
 +ER_ALTER_INFO  
 +        cze "Záznamů: %ld  Zdvojených: %ld"
 +        dan "Poster: %ld  Ens: %ld"
 +        nla "Records: %ld  Dubbel: %ld"
 +        eng "Records: %ld  Duplicates: %ld"
 +        est "Kirjeid: %ld  Kattuvaid: %ld"
 +        fre "Enregistrements: %ld  Doublons: %ld"
 +        ger "Datensätze: %ld  Duplikate: %ld"
 +        greek "Εγγραφές: %ld  Επαναλήψεις: %ld"
 +        hun "Rekordok: %ld  Duplikalva: %ld"
 +        ita "Records: %ld  Duplicati: %ld"
 +        jpn "レコード数: %ld  重複: %ld"
 +        kor "레코드: %ld개  중복: %ld개"
 +        nor "Poster: %ld  Like: %ld"
 +        norwegian-ny "Poster: %ld  Like: %ld"
 +        pol "Rekordów: %ld  Duplikatów: %ld"
 +        por "Registros: %ld - Duplicados: %ld"
 +        rum "Recorduri: %ld  Duplicate: %ld"
 +        rus "Записей: %ld  Дубликатов: %ld"
 +        serbian "Slogova: %ld  Duplikata: %ld"
 +        slo "Záznamov: %ld  Opakovaných: %ld"
 +        spa "Registros: %ld  Duplicados: %ld"
 +        swe "Rader: %ld  Dubletter: %ld"
 +        ukr "Записів: %ld  Дублікатів: %ld"
 +ER_WRONG_SUB_KEY  
 +        cze "Chybná podčást klíče -- není to řetězec nebo je delší než délka části klíče"
 +        dan "Forkert indeksdel. Den anvendte nøgledel er ikke en streng eller længden er større end nøglelængden"
 +        nla "Foutief sub-gedeelte van de zoeksleutel. De gebruikte zoeksleutel is geen onderdeel van een string of of de gebruikte lengte is langer dan de zoeksleutel"
 +        eng "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys"
 +        est "Vigane võtme osa. Kasutatud võtmeosa ei ole string tüüpi, määratud pikkus on pikem kui võtmeosa või tabelihandler ei toeta seda tüüpi võtmeid"
 +        fre "Mauvaise sous-clef. Ce n'est pas un 'string' ou la longueur dépasse celle définie dans la clef"
 +        ger "Falscher Unterteilschlüssel. Der verwendete Schlüsselteil ist entweder kein String, die verwendete Länge ist länger als der Teilschlüssel oder die Speicher-Engine unterstützt keine Unterteilschlüssel"
 +        greek "Εσφαλμένο sub part key. Το χρησιμοποιούμενο key part δεν είναι string ή το μήκος του είναι μεγαλύτερο"
 +        hun "Rossz alkulcs. A hasznalt kulcsresz nem karaktersorozat vagy hosszabb, mint a kulcsresz"
 +        ita "Sotto-parte della chiave errata. La parte di chiave utilizzata non e` una stringa o la lunghezza e` maggiore della parte di chiave."
 +        jpn "キーのプレフィックスが不正です。キーが文字列ではないか、プレフィックス長がキーよりも長いか、ストレージエンジンが一意索引のプレフィックス指定をサポートしていません。"
 +        kor "부정확한 서버 파트 키. 사용된 키 파트가 스트링이 아니거나 키 파트의 길이가 너무 깁니다."
 +        nor "Feil delnøkkel. Den brukte delnøkkelen er ikke en streng eller den oppgitte lengde er lengre enn nøkkel lengden"
 +        norwegian-ny "Feil delnykkel. Den brukte delnykkelen er ikkje ein streng eller den oppgitte lengda er lengre enn nykkellengden"
 +        pol "Błędna podczę?ć klucza. Użyta czę?ć klucza nie jest łańcuchem lub użyta długo?ć  jest większa niż czę?ć klucza"
 +        por "Sub parte da chave incorreta. A parte da chave usada não é uma 'string' ou o comprimento usado é maior que parte da chave ou o manipulador de tabelas não suporta sub chaves únicas"
 +        rum "Componentul cheii este incorrect. Componentul folosit al cheii nu este un sir sau lungimea folosita este mai lunga decit lungimea cheii"
 +        rus "Некорректная часть ключа. Используемая часть ключа не является строкой, указанная длина больше, чем длина части ключа, или обработчик таблицы не поддерживает уникальные части ключа"
 +        serbian "Pogrešan pod-ključ dela ključa. Upotrebljeni deo ključa nije string, upotrebljena dužina je veća od dela ključa ili handler tabela ne podržava jedinstvene pod-ključeve"
 +        slo "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part"
 +        spa "Parte de la clave es erronea. Una parte de la clave no es una cadena o la longitud usada es tan grande como la parte de la clave"
 +        swe "Felaktig delnyckel. Nyckeldelen är inte en sträng eller den angivna längden är längre än kolumnlängden"
 +        ukr "Невірна частина ключа. Використана частина ключа не є строкою, задовга або вказівник таблиці не підтримує унікальних частин ключей"
 +ER_CANT_REMOVE_ALL_FIELDS 42000 
 +        cze "Není možné vymazat všechny položky s ALTER TABLE. Použijte DROP TABLE"
 +        dan "Man kan ikke slette alle felter med ALTER TABLE. Brug DROP TABLE i stedet."
 +        nla "Het is niet mogelijk alle velden te verwijderen met ALTER TABLE. Gebruik a.u.b. DROP TABLE hiervoor!"
 +        eng "You can't delete all columns with ALTER TABLE; use DROP TABLE instead"
 +        est "ALTER TABLE kasutades ei saa kustutada kõiki tulpasid. Kustuta tabel DROP TABLE abil"
 +        fre "Vous ne pouvez effacer tous les champs avec ALTER TABLE. Utilisez DROP TABLE"
 +        ger "Mit ALTER TABLE können nicht alle Felder auf einmal gelöscht werden. Dafür DROP TABLE verwenden"
 +        greek "Δεν είναι δυνατή η διαγραφή όλων των πεδίων με ALTER TABLE. Παρακαλώ χρησιμοποιείστε DROP TABLE"
 +        hun "Az osszes mezo nem torolheto az ALTER TABLE-lel. Hasznalja a DROP TABLE-t helyette"
 +        ita "Non si possono cancellare tutti i campi con una ALTER TABLE. Utilizzare DROP TABLE"
 +        jpn "ALTER TABLE では全ての列の削除はできません。DROP TABLE を使用してください。"
 +        kor "ALTER TABLE 명령으로는 모든 칼럼을 지울 수 없습니다. DROP TABLE 명령을 이용하세요."
 +        nor "En kan ikke slette alle felt med ALTER TABLE. Bruk DROP TABLE isteden."
 +        norwegian-ny "Ein kan ikkje slette alle felt med ALTER TABLE. Bruk DROP TABLE istadenfor."
 +        pol "Nie można usun?ć wszystkich pól wykorzystuj?c ALTER TABLE. W zamian użyj DROP TABLE"
 +        por "Você não pode deletar todas as colunas com ALTER TABLE; use DROP TABLE em seu lugar"
 +        rum "Nu poti sterge toate coloanele cu ALTER TABLE. Foloseste DROP TABLE in schimb"
 +        rus "Нельзя удалить все столбцы с помощью ALTER TABLE. Используйте  DROP TABLE"
 +        serbian "Ne možete da izbrišete sve kolone pomoću komande 'ALTER TABLE'. Upotrebite komandu 'DROP TABLE' ako želite to da uradite"
 +        slo "One nemôžem zmazať all fields with ALTER TABLE; use DROP TABLE instead"
 +        spa "No puede borrar todos los campos con ALTER TABLE. Usa DROP TABLE para hacerlo"
 +        swe "Man kan inte radera alla fält med ALTER TABLE. Använd DROP TABLE istället"
 +        ukr "Не можливо видалити всі стовбці за допомогою ALTER TABLE. Для цього скористайтеся DROP TABLE"
 +ER_CANT_DROP_FIELD_OR_KEY 42000 
 +        cze "Nemohu zrušit (DROP %s) %`-.192s. Zkontrolujte, zda neexistují záznamy/klíče"
 +        dan "Kan ikke udføre DROP %s %`-.192s. Undersøg om feltet/nøglen eksisterer."
 +        nla "DROP %s: Kan %`-.192s niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat."
 +        eng "Can't DROP %s %`-.192s; check that it exists"
 +        est "Ei suuda kustutada (DROP %s) %`-.192s. Kontrolli kas tulp/võti eksisteerib"
 +        fre "Ne peut effacer (DROP %s) %`-.192s. Vérifiez s'il existe"
 +        ger "DROP %s: Kann %`-.192s nicht löschen. Existiert es?"
 +        greek "Αδύνατη η διαγραφή (DROP %s) %`-.192s. Παρακαλώ ελέγξτε αν το πεδίο/κλειδί υπάρχει"
 +        hun "A DROP %s %`-.192s nem lehetseges. Ellenorizze, hogy a mezo/kulcs letezik-e"
 +        ita "Impossibile cancellare (DROP %s) %`-.192s. Controllare che il campo chiave esista"
 +        nor "Kan ikke DROP %s %`-.192s. Undersøk om felt/nøkkel eksisterer."
 +        norwegian-ny "Kan ikkje DROP %s %`-.192s. Undersøk om felt/nøkkel eksisterar."
 +        pol "Nie można wykonać operacji DROP %s %`-.192s. SprawdĽ, czy to pole/klucz istnieje"
 +        por "Não se pode fazer DROP %s %`-.192s. Confira se esta coluna/chave existe"
 +        rum "Nu pot sa DROP %s %`-.192s. Verifica daca coloana/cheia exista"
 +        rus "Невозможно удалить (DROP %s) %`-.192s. Убедитесь что он действительно существует"
 +        serbian "Ne mogu da izvršim komandu drop 'DROP %s' na %`-.192s. Proverite da li ta kolona (odnosno ključ) postoji"
 +        slo "Nemôžem zrušiť (DROP %s) %`-.192s. Skontrolujte, či neexistujú záznamy/kľúče"
 +        spa "No puedo eliminar (DROP %s) %`-.192s. compuebe que el campo/clave existe"
 +        swe "Kan inte ta bort (DROP %s) %`-.192s. Kontrollera att begränsningen/fältet/nyckel finns"
 +        ukr "Не можу DROP %s %`-.192s. Перевірте, чи він існує"
 +ER_INSERT_INFO  
 +        cze "Záznamů: %ld  Zdvojených: %ld  Varování: %ld"
 +        dan "Poster: %ld  Ens: %ld  Advarsler: %ld"
 +        nla "Records: %ld  Dubbel: %ld  Waarschuwing: %ld"
 +        eng "Records: %ld  Duplicates: %ld  Warnings: %ld"
 +        est "Kirjeid: %ld  Kattuvaid: %ld  Hoiatusi: %ld"
 +        fre "Enregistrements: %ld  Doublons: %ld  Avertissements: %ld"
 +        ger "Datensätze: %ld  Duplikate: %ld  Warnungen: %ld"
 +        greek "Εγγραφές: %ld  Επαναλήψεις: %ld  Προειδοποιήσεις: %ld"
 +        hun "Rekordok: %ld  Duplikalva: %ld  Warnings: %ld"
 +        ita "Records: %ld  Duplicati: %ld  Avvertimenti: %ld"
 +        jpn "レコード数: %ld  重複数: %ld  警告: %ld"
 +        kor "레코드: %ld개  중복: %ld개  경고: %ld개"
 +        nor "Poster: %ld  Like: %ld  Advarsler: %ld"
 +        norwegian-ny "Postar: %ld  Like: %ld  Åtvaringar: %ld"
 +        pol "Rekordów: %ld  Duplikatów: %ld  Ostrzeżeń: %ld"
 +        por "Registros: %ld - Duplicados: %ld - Avisos: %ld"
 +        rum "Recorduri: %ld  Duplicate: %ld  Atentionari (warnings): %ld"
 +        rus "Записей: %ld  Дубликатов: %ld  Предупреждений: %ld"
 +        serbian "Slogova: %ld  Duplikata: %ld  Upozorenja: %ld"
 +        slo "Záznamov: %ld  Opakovaných: %ld  Varovania: %ld"
 +        spa "Registros: %ld  Duplicados: %ld  Peligros: %ld"
 +        swe "Rader: %ld  Dubletter: %ld  Varningar: %ld"
 +        ukr "Записів: %ld  Дублікатів: %ld  Застережень: %ld"
 +ER_UPDATE_TABLE_USED
 +        eng "Table '%-.192s' is specified twice, both as a target for '%s' and as a separate source for data"
 +        swe "Table '%-.192s' är använd två gånger. Både för '%s' och för att hämta data"
 +ER_NO_SUCH_THREAD  
 +        cze "Neznámá identifikace threadu: %lu"
 +        dan "Ukendt tråd id: %lu"
 +        nla "Onbekend thread id: %lu"
 +        eng "Unknown thread id: %lu"
 +        est "Tundmatu lõim: %lu"
 +        fre "Numéro de tâche inconnu: %lu"
 +        ger "Unbekannte Thread-ID: %lu"
 +        greek "Αγνωστο thread id: %lu"
 +        hun "Ervenytelen szal (thread) id: %lu"
 +        ita "Thread id: %lu sconosciuto"
 +        jpn "不明なスレッドIDです: %lu"
 +        kor "알수 없는 쓰레드 id: %lu"
 +        nor "Ukjent tråd id: %lu"
 +        norwegian-ny "Ukjent tråd id: %lu"
 +        pol "Nieznany identyfikator w?tku: %lu"
 +        por "'Id' de 'thread' %lu desconhecido"
 +        rum "Id-ul: %lu thread-ului este necunoscut"
 +        rus "Неизвестный номер потока: %lu"
 +        serbian "Nepoznat thread identifikator: %lu"
 +        slo "Neznáma identifikácia vlákna: %lu"
 +        spa "Identificador del thread: %lu  desconocido"
 +        swe "Finns ingen tråd med id %lu"
 +        ukr "Невідомий ідентифікатор гілки: %lu"
 +ER_KILL_DENIED_ERROR  
 +        cze "Nejste vlastníkem threadu %lu"
 +        dan "Du er ikke ejer af tråden %lu"
 +        nla "U bent geen bezitter van thread %lu"
 +        eng "You are not owner of thread %lu"
 +        est "Ei ole lõime %lu omanik"
 +        fre "Vous n'êtes pas propriétaire de la tâche no: %lu"
 +        ger "Sie sind nicht Eigentümer von Thread %lu"
 +        greek "Δεν είσθε owner του thread %lu"
 +        hun "A %lu thread-nek mas a tulajdonosa"
 +        ita "Utente non proprietario del thread %lu"
 +        jpn "スレッド %lu のオーナーではありません。"
 +        kor "쓰레드(Thread) %lu의 소유자가 아닙니다."
 +        nor "Du er ikke eier av tråden %lu"
 +        norwegian-ny "Du er ikkje eigar av tråd %lu"
 +        pol "Nie jeste? wła?cicielem w?tku %lu"
 +        por "Você não é proprietário da 'thread' %lu"
 +        rum "Nu sinteti proprietarul threadului %lu"
 +        rus "Вы не являетесь владельцем потока %lu"
 +        serbian "Vi niste vlasnik thread-a %lu"
 +        slo "Nie ste vlastníkom vlákna %lu"
 +        spa "Tu no eres el propietario del thread%lu"
 +        swe "Du är inte ägare till tråd %lu"
 +        ukr "Ви не володар гілки %lu"
 +ER_NO_TABLES_USED  
 +        cze "Nejsou použity žádné tabulky"
 +        dan "Ingen tabeller i brug"
 +        nla "Geen tabellen gebruikt."
 +        eng "No tables used"
 +        est "Ühtegi tabelit pole kasutusel"
 +        fre "Aucune table utilisée"
 +        ger "Keine Tabellen verwendet"
 +        greek "Δεν χρησιμοποιήθηκαν πίνακες"
 +        hun "Nincs hasznalt tabla"
 +        ita "Nessuna tabella usata"
 +        jpn "表が指定されていません。"
 +        kor "어떤 테이블도 사용되지 않았습니다."
 +        nor "Ingen tabeller i bruk"
 +        norwegian-ny "Ingen tabellar i bruk"
 +        pol "Nie ma żadej użytej tabeli"
 +        por "Nenhuma tabela usada"
 +        rum "Nici o tabela folosita"
 +        rus "Никакие таблицы не использованы"
 +        serbian "Nema upotrebljenih tabela"
 +        slo "Nie je použitá žiadna tabuľka"
 +        spa "No ha tablas usadas"
 +        swe "Inga tabeller angivna"
 +        ukr "Не використано таблиць"
 +ER_TOO_BIG_SET  
 +        cze "Příliš mnoho řetězců pro sloupec %-.192s a SET"
 +        dan "For mange tekststrenge til specifikationen af SET i kolonne %-.192s"
 +        nla "Teveel strings voor kolom %-.192s en SET"
 +        eng "Too many strings for column %-.192s and SET"
 +        est "Liiga palju string tulbale %-.192s tüübile SET"
 +        fre "Trop de chaînes dans la colonne %-.192s avec SET"
 +        ger "Zu viele Strings für Feld %-.192s und SET angegeben"
 +        greek "Πάρα πολλά strings για το πεδίο %-.192s και SET"
 +        hun "Tul sok karakter: %-.192s es SET"
 +        ita "Troppe stringhe per la colonna %-.192s e la SET"
 +        jpn "SET型の列 '%-.192s' のメンバーの数が多すぎます。"
 +        kor "칼럼 %-.192s와 SET에서 스트링이 너무 많습니다."
 +        nor "For mange tekststrenger kolonne %-.192s og SET"
 +        norwegian-ny "For mange tekststrengar felt %-.192s og SET"
 +        pol "Zbyt wiele łańcuchów dla kolumny %-.192s i polecenia SET"
 +        por "'Strings' demais para coluna '%-.192s' e SET"
 +        rum "Prea multe siruri pentru coloana %-.192s si SET"
 +        rus "Слишком много значений для столбца %-.192s в SET"
 +        serbian "Previše string-ova za kolonu '%-.192s' i komandu 'SET'"
 +        slo "Príliš mnoho reťazcov pre pole %-.192s a SET"
 +        spa "Muchas strings para columna %-.192s y SET"
 +        swe "För många alternativ till kolumn %-.192s för SET"
 +        ukr "Забагато строк для стовбця %-.192s та SET"
 +ER_NO_UNIQUE_LOGFILE  
 +        cze "Nemohu vytvořit jednoznačné jméno logovacího souboru %-.200s.(1-999)\n"
 +        dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)\n"
 +        nla "Het is niet mogelijk een unieke naam te maken voor de logfile %-.200s.(1-999)\n"
 +        eng "Can't generate a unique log-filename %-.200s.(1-999)\n"
 +        est "Ei suuda luua unikaalset logifaili nime %-.200s.(1-999)\n"
 +        fre "Ne peut générer un unique nom de journal %-.200s.(1-999)\n"
 +        ger "Kann keinen eindeutigen Dateinamen für die Logdatei %-.200s(1-999) erzeugen\n"
 +        greek "Αδύνατη η δημιουργία unique log-filename %-.200s.(1-999)\n"
 +        hun "Egyedi log-filenev nem generalhato: %-.200s.(1-999)\n"
 +        ita "Impossibile generare un nome del file log unico %-.200s.(1-999)\n"
 +        jpn "一意なログファイル名 %-.200s.(1-999) を生成できません。\n"
 +        kor "Unique 로그화일 '%-.200s'를 만들수 없습니다.(1-999)\n"
 +        nor "Kan ikke lage unikt loggfilnavn %-.200s.(1-999)\n"
 +        norwegian-ny "Kan ikkje lage unikt loggfilnavn %-.200s.(1-999)\n"
 +        pol "Nie można stworzyć unikalnej nazwy pliku z logiem %-.200s.(1-999)\n"
 +        por "Não pode gerar um nome de arquivo de 'log' único '%-.200s'.(1-999)\n"
 +        rum "Nu pot sa generez un nume de log unic %-.200s.(1-999)\n"
 +        rus "Невозможно создать уникальное имя файла журнала %-.200s.(1-999)\n"
 +        serbian "Ne mogu da generišem jedinstveno ime log-file-a: '%-.200s.(1-999)'\n"
 +        slo "Nemôžem vytvoriť unikátne meno log-súboru %-.200s.(1-999)\n"
 +        spa "No puede crear un unico archivo log %-.200s.(1-999)\n"
 +        swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n"
 +        ukr "Не можу згенерувати унікальне ім'я log-файлу %-.200s.(1-999)\n"
 +ER_TABLE_NOT_LOCKED_FOR_WRITE  
 +        cze "Tabulka '%-.192s' byla zamčena s READ a nemůže být změněna"
 +        dan "Tabellen '%-.192s' var låst med READ lås og kan ikke opdateres"
 +        nla "Tabel '%-.192s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen."
 +        eng "Table '%-.192s' was locked with a READ lock and can't be updated"
 +        est "Tabel '%-.192s' on lukustatud READ lukuga ning ei ole muudetav"
 +        fre "Table '%-.192s' verrouillée lecture (READ): modification impossible"
 +        ger "Tabelle '%-.192s' ist mit Lesesperre versehen und kann nicht aktualisiert werden"
 +        greek "Ο πίνακας '%-.192s' έχει κλειδωθεί με READ lock και δεν επιτρέπονται αλλαγές"
 +        hun "A(z) '%-.192s' tabla zarolva lett (READ lock) es nem lehet frissiteni"
 +        ita "La tabella '%-.192s' e` soggetta a lock in lettura e non puo` essere aggiornata"
 +        jpn "表 '%-.192s' はREADロックされていて、更新できません。"
 +        kor "테이블 '%-.192s'는 READ 락이 잠겨있어서 갱신할 수 없습니다."
 +        nor "Tabellen '%-.192s' var låst med READ lås og kan ikke oppdateres"
 +        norwegian-ny "Tabellen '%-.192s' var låst med READ lås og kan ikkje oppdaterast"
 +        pol "Tabela '%-.192s' została zablokowana przez READ i nie może zostać zaktualizowana"
 +        por "Tabela '%-.192s' foi travada com trava de leitura e não pode ser atualizada"
 +        rum "Tabela '%-.192s' a fost locked cu un READ lock si nu poate fi actualizata"
 +        rus "Таблица '%-.192s' заблокирована уровнем READ lock и не может быть изменена"
 +        serbian "Tabela '%-.192s' je zaključana READ lock-om; iz nje se može samo čitati ali u nju se ne može pisati"
 +        slo "Tabuľka '%-.192s' bola zamknutá s READ a nemôže byť zmenená"
 +        spa "Tabla '%-.192s' fue trabada con un READ lock y no puede ser actualizada"
 +        swe "Tabell '%-.192s' kan inte uppdateras emedan den är låst för läsning"
 +        ukr "Таблицю '%-.192s' заблоковано тільки для читання, тому її не можна оновити"
 +ER_TABLE_NOT_LOCKED  
 +        cze "Tabulka '%-.192s' nebyla zamčena s LOCK TABLES"
 +        dan "Tabellen '%-.192s' var ikke låst med LOCK TABLES"
 +        nla "Tabel '%-.192s' was niet gelocked met LOCK TABLES"
 +        eng "Table '%-.192s' was not locked with LOCK TABLES"
 +        est "Tabel '%-.192s' ei ole lukustatud käsuga LOCK TABLES"
 +        fre "Table '%-.192s' non verrouillée: utilisez LOCK TABLES"
 +        ger "Tabelle '%-.192s' wurde nicht mit LOCK TABLES gesperrt"
 +        greek "Ο πίνακας '%-.192s' δεν έχει κλειδωθεί με LOCK TABLES"
 +        hun "A(z) '%-.192s' tabla nincs zarolva a LOCK TABLES-szel"
 +        ita "Non e` stato impostato il lock per la tabella '%-.192s' con LOCK TABLES"
 +        jpn "表 '%-.192s' は LOCK TABLES でロックされていません。"
 +        kor "테이블 '%-.192s'는 LOCK TABLES 명령으로 잠기지 않았습니다."
 +        nor "Tabellen '%-.192s' var ikke låst med LOCK TABLES"
 +        norwegian-ny "Tabellen '%-.192s' var ikkje låst med LOCK TABLES"
 +        pol "Tabela '%-.192s' nie została zablokowana poleceniem LOCK TABLES"
 +        por "Tabela '%-.192s' não foi travada com LOCK TABLES"
 +        rum "Tabela '%-.192s' nu a fost locked cu LOCK TABLES"
 +        rus "Таблица '%-.192s' не была заблокирована с помощью LOCK TABLES"
 +        serbian "Tabela '%-.192s' nije bila zaključana komandom 'LOCK TABLES'"
 +        slo "Tabuľka '%-.192s' nebola zamknutá s LOCK TABLES"
 +        spa "Tabla '%-.192s' no fue trabada con LOCK TABLES"
 +        swe "Tabell '%-.192s' är inte låst med LOCK TABLES"
 +        ukr "Таблицю '%-.192s' не було блоковано з LOCK TABLES"
 +ER_BLOB_CANT_HAVE_DEFAULT 42000 
 +        cze "Blob položka '%-.192s' nemůže mít defaultní hodnotu"
 +        dan "BLOB feltet '%-.192s' kan ikke have en standard værdi"
 +        nla "Blob veld '%-.192s' can geen standaardwaarde bevatten"
 +        eng "BLOB/TEXT column '%-.192s' can't have a default value"
 +        est "BLOB-tüüpi tulp '%-.192s' ei saa omada vaikeväärtust"
 +        fre "BLOB '%-.192s' ne peut avoir de valeur par défaut"
 +        ger "BLOB/TEXT-Feld '%-.192s' darf keinen Vorgabewert (DEFAULT) haben"
 +        greek "Τα Blob πεδία '%-.192s' δεν μπορούν να έχουν προκαθορισμένες τιμές (default value)"
 +        hun "A(z) '%-.192s' blob objektumnak nem lehet alapertelmezett erteke"
 +        ita "Il campo BLOB '%-.192s' non puo` avere un valore di default"
 +        jpn "BLOB/TEXT 列 '%-.192s' にはデフォルト値を指定できません。"
 +        kor "BLOB 칼럼 '%-.192s' 는 디폴트 값을 가질 수 없습니다."
 +        nor "Blob feltet '%-.192s' kan ikke ha en standard verdi"
 +        norwegian-ny "Blob feltet '%-.192s' kan ikkje ha ein standard verdi"
 +        pol "Pole typu blob '%-.192s' nie może mieć domy?lnej warto?ci"
 +        por "Coluna BLOB '%-.192s' não pode ter um valor padrão (default)"
 +        rum "Coloana BLOB '%-.192s' nu poate avea o valoare default"
 +        rus "Невозможно указывать значение по умолчанию для столбца BLOB '%-.192s'"
 +        serbian "BLOB kolona '%-.192s' ne može imati default vrednost"
 +        slo "Pole BLOB '%-.192s' nemôže mať implicitnú hodnotu"
 +        spa "Campo Blob '%-.192s' no puede tener valores patron"
 +        swe "BLOB fält '%-.192s' kan inte ha ett DEFAULT-värde"
 +        ukr "Стовбець BLOB '%-.192s' не може мати значення по замовчуванню"
 +ER_WRONG_DB_NAME 42000 
 +        cze "Nepřípustné jméno databáze '%-.100s'"
 +        dan "Ugyldigt database navn '%-.100s'"
 +        nla "Databasenaam '%-.100s' is niet getoegestaan"
 +        eng "Incorrect database name '%-.100s'"
 +        est "Vigane andmebaasi nimi '%-.100s'"
 +        fre "Nom de base de donnée illégal: '%-.100s'"
 +        ger "Unerlaubter Datenbankname '%-.100s'"
 +        greek "Λάθος όνομα βάσης δεδομένων '%-.100s'"
 +        hun "Hibas adatbazisnev: '%-.100s'"
 +        ita "Nome database errato '%-.100s'"
 +        jpn "データベース名 '%-.100s' は不正です。"
 +        kor "'%-.100s' 데이타베이스의 이름이 부정확합니다."
 +        nor "Ugyldig database navn '%-.100s'"
 +        norwegian-ny "Ugyldig database namn '%-.100s'"
 +        pol "Niedozwolona nazwa bazy danych '%-.100s'"
 +        por "Nome de banco de dados '%-.100s' incorreto"
 +        rum "Numele bazei de date este incorect '%-.100s'"
 +        rus "Некорректное имя базы данных '%-.100s'"
 +        serbian "Pogrešno ime baze '%-.100s'"
 +        slo "Neprípustné meno databázy '%-.100s'"
 +        spa "Nombre de base de datos ilegal '%-.100s'"
 +        swe "Felaktigt databasnamn '%-.100s'"
 +        ukr "Невірне ім'я бази данних '%-.100s'"
 +ER_WRONG_TABLE_NAME 42000 
 +        cze "Nepřípustné jméno tabulky '%-.100s'"
 +        dan "Ugyldigt tabel navn '%-.100s'"
 +        nla "Niet toegestane tabelnaam '%-.100s'"
 +        eng "Incorrect table name '%-.100s'"
 +        est "Vigane tabeli nimi '%-.100s'"
 +        fre "Nom de table illégal: '%-.100s'"
 +        ger "Unerlaubter Tabellenname '%-.100s'"
 +        greek "Λάθος όνομα πίνακα '%-.100s'"
 +        hun "Hibas tablanev: '%-.100s'"
 +        ita "Nome tabella errato '%-.100s'"
 +        jpn "表名 '%-.100s' は不正です。"
 +        kor "'%-.100s' 테이블 이름이 부정확합니다."
 +        nor "Ugyldig tabell navn '%-.100s'"
 +        norwegian-ny "Ugyldig tabell namn '%-.100s'"
 +        pol "Niedozwolona nazwa tabeli '%-.100s'..."
 +        por "Nome de tabela '%-.100s' incorreto"
 +        rum "Numele tabelei este incorect '%-.100s'"
 +        rus "Некорректное имя таблицы '%-.100s'"
 +        serbian "Pogrešno ime tabele '%-.100s'"
 +        slo "Neprípustné meno tabuľky '%-.100s'"
 +        spa "Nombre de tabla ilegal '%-.100s'"
 +        swe "Felaktigt tabellnamn '%-.100s'"
 +        ukr "Невірне ім'я таблиці '%-.100s'"
 +ER_TOO_BIG_SELECT 42000 
 +        cze "Zadaný SELECT by procházel příliš mnoho záznamů a trval velmi dlouho. Zkontrolujte tvar WHERE a je-li SELECT v pořádku, použijte SET SQL_BIG_SELECTS=1"
 +        dan "SELECT ville undersøge for mange poster og ville sandsynligvis tage meget lang tid. Undersøg WHERE delen og brug SET SQL_BIG_SELECTS=1 hvis udtrykket er korrekt"
 +        nla "Het SELECT-statement zou te veel records analyseren en dus veel tijd in beslagnemen. Kijk het WHERE-gedeelte van de query na en kies SET SQL_BIG_SELECTS=1 als het stament in orde is."
 +        eng "The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay"
 +        est "SELECT lause peab läbi vaatama suure hulga kirjeid ja võtaks tõenäoliselt liiga kaua aega. Tasub kontrollida WHERE klauslit ja vajadusel kasutada käsku SET SQL_BIG_SELECTS=1"
 +        fre "SELECT va devoir examiner beaucoup d'enregistrements ce qui va prendre du temps. Vérifiez la clause WHERE et utilisez SET SQL_BIG_SELECTS=1 si SELECT se passe bien"
 +        ger "Die Ausführung des SELECT würde zu viele Datensätze untersuchen und wahrscheinlich sehr lange dauern. Bitte WHERE-Klausel überprüfen und gegebenenfalls SET SQL_BIG_SELECTS=1 oder SET MAX_JOIN_SIZE=# verwenden"
 +        greek "Το SELECT θα εξετάσει μεγάλο αριθμό εγγραφών και πιθανώς θα καθυστερήσει. Παρακαλώ εξετάστε τις παραμέτρους του WHERE και χρησιμοποιείστε SET SQL_BIG_SELECTS=1 αν το SELECT είναι σωστό"
 +        hun "A SELECT tul sok rekordot fog megvizsgalni es nagyon sokaig fog tartani. Ellenorizze a WHERE-t es hasznalja a SET SQL_BIG_SELECTS=1 beallitast, ha a SELECT okay"
 +        ita "La SELECT dovrebbe esaminare troppi record e usare troppo tempo. Controllare la WHERE e usa SET SQL_BIG_SELECTS=1 se e` tutto a posto."
 +        jpn "SELECTがMAX_JOIN_SIZEを超える行数を処理しました。WHERE句を確認し、SELECT文に問題がなければ、 SET SQL_BIG_SELECTS=1 または SET MAX_JOIN_SIZE=# を使用して下さい。"
 +        kor "SELECT 명령에서 너무 많은 레코드를 찾기 때문에 많은 시간이 소요됩니다. 따라서 WHERE 문을 점검하거나, 만약 SELECT가 ok되면  SET SQL_BIG_SELECTS=1 옵션을 사용하세요."
 +        nor "SELECT ville undersøke for mange poster og ville sannsynligvis ta veldig lang tid. Undersøk WHERE klausulen og bruk SET SQL_BIG_SELECTS=1 om SELECTen er korrekt"
 +        norwegian-ny "SELECT ville undersøkje for mange postar og ville sannsynligvis ta veldig lang tid. Undersøk WHERE klausulen og bruk SET SQL_BIG_SELECTS=1 om SELECTen er korrekt"
 +        pol "Operacja SELECT będzie dotyczyła zbyt wielu rekordów i prawdopodobnie zajmie bardzo dużo czasu. SprawdĽ warunek WHERE i użyj SQL_OPTION BIG_SELECTS=1 je?li operacja SELECT jest poprawna"
 +        por "O SELECT examinaria registros demais e provavelmente levaria muito tempo. Cheque sua cláusula WHERE e use SET SQL_BIG_SELECTS=1, se o SELECT estiver correto"
 +        rum "SELECT-ul ar examina prea multe cimpuri si probabil ar lua prea mult timp; verifica clauza WHERE si foloseste SET SQL_BIG_SELECTS=1 daca SELECT-ul e okay"
 +        rus "Для такой выборки SELECT должен будет просмотреть слишком много записей и, видимо, это займет очень много времени. Проверьте ваше указание WHERE, и, если в нем все в порядке, укажите SET SQL_BIG_SELECTS=1"
 +        serbian "Komanda 'SELECT' će ispitati previše slogova i potrošiti previše vremena. Proverite vaš 'WHERE' filter i upotrebite 'SET OPTION SQL_BIG_SELECTS=1' ako želite baš ovakvu komandu"
 +        slo "Zadaná požiadavka SELECT by prechádzala príliš mnoho záznamov a trvala by príliš dlho. Skontrolujte tvar WHERE a ak je v poriadku, použite SET SQL_BIG_SELECTS=1"
 +        spa "El SELECT puede examinar muchos registros y probablemente con mucho tiempo. Verifique tu WHERE y usa SET SQL_BIG_SELECTS=1 si el SELECT esta correcto"
 +        swe "Den angivna frågan skulle läsa mer än MAX_JOIN_SIZE rader.  Kontrollera din WHERE och använd SET SQL_BIG_SELECTS=1 eller SET MAX_JOIN_SIZE=# ifall du vill hantera stora joins"
 +        ukr "Запиту SELECT потрібно обробити багато записів, що, певне, займе дуже багато часу. Перевірте ваше WHERE та використовуйте SET SQL_BIG_SELECTS=1, якщо цей запит SELECT є вірним"
 +ER_UNKNOWN_ERROR  
 +        cze "Neznámá chyba"
 +        dan "Ukendt fejl"
 +        nla "Onbekende Fout"
 +        eng "Unknown error"
 +        est "Tundmatu viga"
 +        fre "Erreur inconnue"
 +        ger "Unbekannter Fehler"
 +        greek "Προέκυψε άγνωστο λάθος"
 +        hun "Ismeretlen hiba"
 +        ita "Errore sconosciuto"
 +        jpn "不明なエラー"
 +        kor "알수 없는 에러입니다."
 +        nor "Ukjent feil"
 +        norwegian-ny "Ukjend feil"
 +        por "Erro desconhecido"
 +        rum "Eroare unknown"
 +        rus "Неизвестная ошибка"
 +        serbian "Nepoznata greška"
 +        slo "Neznámá chyba"
 +        spa "Error desconocido"
 +        swe "Okänt fel"
 +        ukr "Невідома помилка"
 +ER_UNKNOWN_PROCEDURE 42000 
 +        cze "Neznámá procedura %-.192s"
 +        dan "Ukendt procedure %-.192s"
 +        nla "Onbekende procedure %-.192s"
 +        eng "Unknown procedure '%-.192s'"
 +        est "Tundmatu protseduur '%-.192s'"
 +        fre "Procédure %-.192s inconnue"
 +        ger "Unbekannte Prozedur '%-.192s'"
 +        greek "Αγνωστη διαδικασία '%-.192s'"
 +        hun "Ismeretlen eljaras: '%-.192s'"
 +        ita "Procedura '%-.192s' sconosciuta"
 +        jpn "'%-.192s' は不明なプロシージャです。"
 +        kor "알수 없는 수행문 : '%-.192s'"
 +        nor "Ukjent prosedyre %-.192s"
 +        norwegian-ny "Ukjend prosedyre %-.192s"
 +        pol "Unkown procedure %-.192s"
 +        por "'Procedure' '%-.192s' desconhecida"
 +        rum "Procedura unknown '%-.192s'"
 +        rus "Неизвестная процедура '%-.192s'"
 +        serbian "Nepoznata procedura '%-.192s'"
 +        slo "Neznámá procedúra '%-.192s'"
 +        spa "Procedimiento desconocido %-.192s"
 +        swe "Okänd procedur: %-.192s"
 +        ukr "Невідома процедура '%-.192s'"
 +ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000 
 +        cze "Chybný počet parametrů procedury %-.192s"
 +        dan "Forkert antal  parametre til proceduren %-.192s"
 +        nla "Foutief aantal parameters doorgegeven aan procedure %-.192s"
 +        eng "Incorrect parameter count to procedure '%-.192s'"
 +        est "Vale parameetrite hulk protseduurile '%-.192s'"
 +        fre "Mauvais nombre de paramètres pour la procedure %-.192s"
 +        ger "Falsche Parameterzahl für Prozedur '%-.192s'"
 +        greek "Λάθος αριθμός παραμέτρων στη διαδικασία '%-.192s'"
 +        hun "Rossz parameter a(z) '%-.192s'eljaras szamitasanal"
 +        ita "Numero di parametri errato per la procedura '%-.192s'"
 +        jpn "プロシージャ '%-.192s' へのパラメータ数が不正です。"
 +        kor "'%-.192s' 수행문에 대한 부정확한 파라메터"
 +        nor "Feil parameter antall til prosedyren %-.192s"
 +        norwegian-ny "Feil parameter tal til prosedyra %-.192s"
 +        pol "Incorrect parameter count to procedure %-.192s"
 +        por "Número de parâmetros incorreto para a 'procedure' '%-.192s'"
 +        rum "Procedura '%-.192s' are un numar incorect de parametri"
 +        rus "Некорректное количество параметров для процедуры '%-.192s'"
 +        serbian "Pogrešan broj parametara za proceduru '%-.192s'"
 +        slo "Chybný počet parametrov procedúry '%-.192s'"
 +        spa "Equivocado parametro count para procedimiento %-.192s"
 +        swe "Felaktigt antal parametrar till procedur %-.192s"
 +        ukr "Хибна кількість параметрів процедури '%-.192s'"
 +ER_WRONG_PARAMETERS_TO_PROCEDURE  
 +        cze "Chybné parametry procedury %-.192s"
 +        dan "Forkert(e) parametre til proceduren %-.192s"
 +        nla "Foutieve parameters voor procedure %-.192s"
 +        eng "Incorrect parameters to procedure '%-.192s'"
 +        est "Vigased parameetrid protseduurile '%-.192s'"
 +        fre "Paramètre erroné pour la procedure %-.192s"
 +        ger "Falsche Parameter für Prozedur '%-.192s'"
 +        greek "Λάθος παράμετροι στην διαδικασία '%-.192s'"
 +        hun "Rossz parameter a(z) '%-.192s' eljarasban"
 +        ita "Parametri errati per la procedura '%-.192s'"
 +        jpn "プロシージャ '%-.192s' へのパラメータが不正です。"
 +        kor "'%-.192s' 수행문에 대한 부정확한 파라메터"
 +        nor "Feil parametre til prosedyren %-.192s"
 +        norwegian-ny "Feil parameter til prosedyra %-.192s"
 +        pol "Incorrect parameters to procedure %-.192s"
 +        por "Parâmetros incorretos para a 'procedure' '%-.192s'"
 +        rum "Procedura '%-.192s' are parametrii incorecti"
 +        rus "Некорректные параметры для процедуры '%-.192s'"
 +        serbian "Pogrešni parametri prosleđeni proceduri '%-.192s'"
 +        slo "Chybné parametre procedúry '%-.192s'"
 +        spa "Equivocados parametros para procedimiento %-.192s"
 +        swe "Felaktiga parametrar till procedur %-.192s"
 +        ukr "Хибний параметер процедури '%-.192s'"
 +ER_UNKNOWN_TABLE 42S02 
 +        cze "Neznámá tabulka '%-.192s' v %-.32s"
 +        dan "Ukendt tabel '%-.192s' i %-.32s"
 +        nla "Onbekende tabel '%-.192s' in %-.32s"
 +        eng "Unknown table '%-.192s' in %-.32s"
 +        est "Tundmatu tabel '%-.192s' %-.32s-s"
 +        fre "Table inconnue '%-.192s' dans %-.32s"
 +        ger "Unbekannte Tabelle '%-.192s' in '%-.32s'"
 +        greek "Αγνωστος πίνακας '%-.192s' σε %-.32s"
 +        hun "Ismeretlen tabla: '%-.192s' %-.32s-ban"
 +        ita "Tabella '%-.192s' sconosciuta in %-.32s"
 +        jpn "'%-.192s' は %-.32s では不明な表です。"
 +        kor "알수 없는 테이블 '%-.192s' (데이타베이스 %-.32s)"
 +        nor "Ukjent tabell '%-.192s' i %-.32s"
 +        norwegian-ny "Ukjend tabell '%-.192s' i %-.32s"
 +        pol "Unknown table '%-.192s' in %-.32s"
 +        por "Tabela '%-.192s' desconhecida em '%-.32s'"
 +        rum "Tabla '%-.192s' invalida in %-.32s"
 +        rus "Неизвестная таблица '%-.192s' в %-.32s"
 +        serbian "Nepoznata tabela '%-.192s' u '%-.32s'"
 +        slo "Neznáma tabuľka '%-.192s' v %-.32s"
 +        spa "Tabla desconocida '%-.192s' in %-.32s"
 +        swe "Okänd tabell '%-.192s' i '%-.32s'"
 +        ukr "Невідома таблиця '%-.192s' у %-.32s"
 +ER_FIELD_SPECIFIED_TWICE 42000 
 +        cze "Položka '%-.192s' je zadána dvakrát"
 +        dan "Feltet '%-.192s' er anvendt to gange"
 +        nla "Veld '%-.192s' is dubbel gespecificeerd"
 +        eng "Column '%-.192s' specified twice"
 +        est "Tulp '%-.192s' on määratletud topelt"
 +        fre "Champ '%-.192s' spécifié deux fois"
 +        ger "Feld '%-.192s' wurde zweimal angegeben"
 +        greek "Το πεδίο '%-.192s' έχει ορισθεί δύο φορές"
 +        hun "A(z) '%-.192s' mezot ketszer definialta"
 +        ita "Campo '%-.192s' specificato 2 volte"
 +        jpn "列 '%-.192s' は2回指定されています。"
 +        kor "칼럼 '%-.192s'는 두번 정의되어 있읍니다."
 +        nor "Feltet '%-.192s' er spesifisert to ganger"
 +        norwegian-ny "Feltet '%-.192s' er spesifisert to gangar"
 +        pol "Field '%-.192s' specified twice"
 +        por "Coluna '%-.192s' especificada duas vezes"
 +        rum "Coloana '%-.192s' specificata de doua ori"
 +        rus "Столбец '%-.192s' указан дважды"
 +        serbian "Kolona '%-.192s' je navedena dva puta"
 +        slo "Pole '%-.192s' je zadané dvakrát"
 +        spa "Campo '%-.192s' especificado dos veces"
 +        swe "Fält '%-.192s' är redan använt"
 +        ukr "Стовбець '%-.192s' зазначено двічі"
 +ER_INVALID_GROUP_FUNC_USE  
 +        cze "Nesprávné použití funkce group"
 +        dan "Forkert brug af grupperings-funktion"
 +        nla "Ongeldig gebruik van GROUP-functie"
 +        eng "Invalid use of group function"
 +        est "Vigane grupeerimisfunktsiooni kasutus"
 +        fre "Utilisation invalide de la clause GROUP"
 +        ger "Falsche Verwendung einer Gruppierungsfunktion"
 +        greek "Εσφαλμένη χρήση της group function"
 +        hun "A group funkcio ervenytelen hasznalata"
 +        ita "Uso non valido di una funzione di raggruppamento"
 +        jpn "集計関数の使用方法が不正です。"
 +        kor "잘못된 그룹 함수를 사용하였습니다."
 +        por "Uso inválido de função de agrupamento (GROUP)"
 +        rum "Folosire incorecta a functiei group"
 +        rus "Неправильное использование групповых функций"
 +        serbian "Pogrešna upotreba 'GROUP' funkcije"
 +        slo "Nesprávne použitie funkcie GROUP"
 +        spa "Invalido uso de función en grupo"
 +        swe "Felaktig användning av SQL grupp function"
 +        ukr "Хибне використання функції групування"
 +ER_UNSUPPORTED_EXTENSION 42000 
 +        cze "Tabulka '%-.192s' používá rozšíření, které v této verzi MySQL není"
 +        dan "Tabellen '%-.192s' bruger et filtypenavn som ikke findes i denne MariaDB version"
 +        nla "Tabel '%-.192s' gebruikt een extensie, die niet in deze MariaDB-versie voorkomt."
 +        eng "Table '%-.192s' uses an extension that doesn't exist in this MariaDB version"
 +        est "Tabel '%-.192s' kasutab laiendust, mis ei eksisteeri antud MariaDB versioonis"
 +        fre "Table '%-.192s' : utilise une extension invalide pour cette version de MariaDB"
 +        ger "Tabelle '%-.192s' verwendet eine Erweiterung, die in dieser MariaDB-Version nicht verfügbar ist"
 +        greek "Ο πίνακς '%-.192s' χρησιμοποιεί κάποιο extension που δεν υπάρχει στην έκδοση αυτή της MariaDB"
 +        hun "A(z) '%-.192s' tabla olyan bovitest hasznal, amely nem letezik ebben a MariaDB versioban."
 +        ita "La tabella '%-.192s' usa un'estensione che non esiste in questa versione di MariaDB"
 +	jpn "表 '%-.192s' は、このMySQLバージョンには無い機能を使用しています。"
 +        kor "테이블 '%-.192s'는 확장명령을 이용하지만 현재의 MariaDB 버젼에서는 존재하지 않습니다."
 +        nor "Table '%-.192s' uses a extension that doesn't exist in this MariaDB version"
 +        norwegian-ny "Table '%-.192s' uses a extension that doesn't exist in this MariaDB version"
 +        pol "Table '%-.192s' uses a extension that doesn't exist in this MariaDB version"
 +        por "Tabela '%-.192s' usa uma extensão que não existe nesta versão do MariaDB"
 +        rum "Tabela '%-.192s' foloseste o extensire inexistenta in versiunea curenta de MariaDB"
 +        rus "В таблице '%-.192s' используются возможности, не поддерживаемые в этой версии MariaDB"
 +        serbian "Tabela '%-.192s' koristi ekstenziju koje ne postoji u ovoj verziji MariaDB-a"
 +        slo "Tabuľka '%-.192s' používa rozšírenie, ktoré v tejto verzii MariaDB nie je"
 +        spa "Tabla '%-.192s' usa una extensión que no existe en esta MariaDB versión"
 +        swe "Tabell '%-.192s' har en extension som inte finns i denna version av MariaDB"
 +        ukr "Таблиця '%-.192s' використовує розширення, що не існує у цій версії MariaDB"
 +ER_TABLE_MUST_HAVE_COLUMNS 42000 
 +        cze "Tabulka musí mít alespoň jeden sloupec"
 +        dan "En tabel skal have mindst een kolonne"
 +        nla "Een tabel moet minstens 1 kolom bevatten"
 +        eng "A table must have at least 1 column"
 +        est "Tabelis peab olema vähemalt üks tulp"
 +        fre "Une table doit comporter au moins une colonne"
 +        ger "Eine Tabelle muss mindestens eine Spalte besitzen"
 +        greek "Ενας πίνακας πρέπει να έχει τουλάχιστον ένα πεδίο"
 +        hun "A tablanak legalabb egy oszlopot tartalmazni kell"
 +        ita "Una tabella deve avere almeno 1 colonna"
 +        jpn "表には最低でも1個の列が必要です。"
 +        kor "하나의 테이블에서는 적어도 하나의 칼럼이 존재하여야 합니다."
 +        por "Uma tabela tem que ter pelo menos uma (1) coluna"
 +        rum "O tabela trebuie sa aiba cel putin o coloana"
 +        rus "В таблице должен быть как минимум один столбец"
 +        serbian "Tabela mora imati najmanje jednu kolonu"
 +        slo "Tabuľka musí mať aspoň 1 pole"
 +        spa "Una tabla debe tener al menos 1 columna"
 +        swe "Tabeller måste ha minst 1 kolumn"
 +        ukr "Таблиця повинна мати хочаб один стовбець"
 +ER_RECORD_FILE_FULL  
 +        cze "Tabulka '%-.192s' je plná"
 +        dan "Tabellen '%-.192s' er fuld"
 +        nla "De tabel '%-.192s' is vol"
 +        eng "The table '%-.192s' is full"
 +        est "Tabel '%-.192s' on täis"
 +        fre "La table '%-.192s' est pleine"
 +        ger "Tabelle '%-.192s' ist voll"
 +        greek "Ο πίνακας '%-.192s' είναι γεμάτος"
 +        hun "A '%-.192s' tabla megtelt"
 +        ita "La tabella '%-.192s' e` piena"
 +        jpn "表 '%-.192s' は満杯です。"
 +        kor "테이블 '%-.192s'가 full났습니다. "
 +        por "Tabela '%-.192s' está cheia"
 +        rum "Tabela '%-.192s' e plina"
 +        rus "Таблица '%-.192s' переполнена"
 +        serbian "Tabela '%-.192s' je popunjena do kraja"
 +        slo "Tabuľka '%-.192s' je plná"
 +        spa "La tabla '%-.192s' está llena"
 +        swe "Tabellen '%-.192s' är full"
 +        ukr "Таблиця '%-.192s' заповнена"
 +ER_UNKNOWN_CHARACTER_SET 42000 
 +        cze "Neznámá znaková sada: '%-.64s'"
 +        dan "Ukendt tegnsæt: '%-.64s'"
 +        nla "Onbekende character set: '%-.64s'"
 +        eng "Unknown character set: '%-.64s'"
 +        est "Vigane kooditabel '%-.64s'"
 +        fre "Jeu de caractères inconnu: '%-.64s'"
 +        ger "Unbekannter Zeichensatz: '%-.64s'"
 +        greek "Αγνωστο character set: '%-.64s'"
 +        hun "Ervenytelen karakterkeszlet: '%-.64s'"
 +        ita "Set di caratteri '%-.64s' sconosciuto"
 +        jpn "不明な文字コードセット: '%-.64s'"
 +        kor "알수없는 언어 Set: '%-.64s'"
 +        por "Conjunto de caracteres '%-.64s' desconhecido"
 +        rum "Set de caractere invalid: '%-.64s'"
 +        rus "Неизвестная кодировка '%-.64s'"
 +        serbian "Nepoznati karakter-set: '%-.64s'"
 +        slo "Neznáma znaková sada: '%-.64s'"
 +        spa "Juego de caracteres desconocido: '%-.64s'"
 +        swe "Okänd teckenuppsättning: '%-.64s'"
 +        ukr "Невідома кодова таблиця: '%-.64s'"
 +ER_TOO_MANY_TABLES  
 +        cze "Příliš mnoho tabulek, MySQL jich může mít v joinu jen %d"
 +        dan "For mange tabeller. MariaDB kan kun bruge %d tabeller i et join"
 +        nla "Teveel tabellen. MariaDB kan slechts %d tabellen in een join bevatten"
 +        eng "Too many tables; MariaDB can only use %d tables in a join"
 +        est "Liiga palju tabeleid. MariaDB suudab JOINiga ühendada kuni %d tabelit"
 +        fre "Trop de tables. MariaDB ne peut utiliser que %d tables dans un JOIN"
 +        ger "Zu viele Tabellen. MariaDB kann in einem Join maximal %d Tabellen verwenden"
 +        greek "Πολύ μεγάλος αριθμός πινάκων. Η MariaDB μπορεί να χρησιμοποιήσει %d πίνακες σε διαδικασία join"
 +        hun "Tul sok tabla. A MariaDB csak %d tablat tud kezelni osszefuzeskor"
 +        ita "Troppe tabelle. MariaDB puo` usare solo %d tabelle in una join"
 +        jpn "表が多すぎます。MySQLがJOINできる表は %d 個までです。"
 +        kor "너무 많은 테이블이 Join되었습니다. MariaDB에서는 JOIN시 %d개의 테이블만 사용할 수 있습니다."
 +        por "Tabelas demais. O MariaDB pode usar somente %d tabelas em uma junção (JOIN)"
 +        rum "Prea multe tabele. MariaDB nu poate folosi mai mult de %d tabele intr-un join"
 +        rus "Слишком много таблиц. MariaDB может использовать только %d таблиц в соединении"
 +        serbian "Previše tabela. MariaDB može upotrebiti maksimum %d tabela pri 'JOIN' operaciji"
 +        slo "Príliš mnoho tabuliek. MariaDB môže použiť len %d v JOIN-e"
 +        spa "Muchas tablas. MariaDB solamente puede usar %d tablas en un join"
 +        swe "För många tabeller. MariaDB can ha högst %d tabeller i en och samma join"
 +        ukr "Забагато таблиць. MariaDB може використовувати лише %d таблиць у об'єднанні"
 +ER_TOO_MANY_FIELDS  
 +        cze "Příliš mnoho položek"
 +        dan "For mange felter"
 +        nla "Te veel velden"
 +        eng "Too many columns"
 +        est "Liiga palju tulpasid"
 +        fre "Trop de champs"
 +        ger "Zu viele Felder"
 +        greek "Πολύ μεγάλος αριθμός πεδίων"
 +        hun "Tul sok mezo"
 +        ita "Troppi campi"
 +        jpn "列が多すぎます。"
 +        kor "칼럼이 너무 많습니다."
 +        por "Colunas demais"
 +        rum "Prea multe coloane"
 +        rus "Слишком много столбцов"
 +        serbian "Previše kolona"
 +        slo "Príliš mnoho polí"
 +        spa "Muchos campos"
 +        swe "För många fält"
 +        ukr "Забагато стовбців"
 +ER_TOO_BIG_ROWSIZE 42000 
 +        cze "Řádek je příliš velký. Maximální velikost řádku, nepočítaje položky blob, je %ld. Musíte změnit některé položky na blob"
 +        dan "For store poster. Max post størrelse, uden BLOB's, er %ld. Du må lave nogle felter til BLOB's"
 +        nla "Rij-grootte is groter dan toegestaan. Maximale rij grootte, blobs niet meegeteld, is %ld. U dient sommige velden in blobs te veranderen."
 +        eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs"
 +        est "Liiga pikk kirje. Kirje maksimumpikkus arvestamata BLOB-tüüpi välju on %ld. Muuda mõned väljad BLOB-tüüpi väljadeks"
 +        fre "Ligne trop grande. Le taille maximale d'une ligne, sauf les BLOBs, est %ld. Changez le type de quelques colonnes en BLOB"
 +        ger "Zeilenlänge zu groß. Die maximale Zeilenlänge für den verwendeten Tabellentyp (ohne BLOB-Felder) beträgt %ld. Einige Felder müssen in BLOB oder TEXT umgewandelt werden"
 +        greek "Πολύ μεγάλο μέγεθος εγγραφής. Το μέγιστο μέγεθος εγγραφής, χωρίς να υπολογίζονται τα blobs, είναι %ld. Πρέπει να ορίσετε κάποια πεδία σαν blobs"
 +        hun "Tul nagy sormeret. A maximalis sormeret (nem szamolva a blob objektumokat) %ld. Nehany mezot meg kell valtoztatnia"
 +        ita "Riga troppo grande. La massima grandezza di una riga, non contando i BLOB, e` %ld. Devi cambiare alcuni campi in BLOB"
 +        jpn "行サイズが大きすぎます。この表の最大行サイズは BLOB を含まずに %ld です。格納時のオーバーヘッドも含まれます(マニュアルを確認してください)。列をTEXTまたはBLOBに変更する必要があります。"
 +        kor "너무 큰 row 사이즈입니다. BLOB를 계산하지 않고 최대 row 사이즈는 %ld입니다. 얼마간의 필드들을 BLOB로 바꾸셔야 겠군요.."
 +        por "Tamanho de linha grande demais. O máximo tamanho de linha, não contando BLOBs, é %ld. Você tem que mudar alguns campos para BLOBs"
 +        rum "Marimea liniei (row) prea mare. Marimea maxima a liniei, excluzind BLOB-urile este de %ld. Trebuie sa schimbati unele cimpuri in BLOB-uri"
 +        rus "Слишком большой размер записи. Максимальный размер строки, исключая поля BLOB, - %ld. Возможно, вам следует изменить тип некоторых полей на BLOB"
 +        serbian "Prevelik slog. Maksimalna veličina sloga, ne računajući BLOB polja, je %ld. Trebali bi da promenite tip nekih polja u BLOB"
 +        slo "Riadok je príliš veľký. Maximálna veľkosť riadku, okrem 'BLOB', je %ld. Musíte zmeniť niektoré položky na BLOB"
 +        spa "Tamaño de línea muy grande. Máximo tamaño de línea, no contando blob, es %ld. Tu tienes que cambiar algunos campos para blob"
 +        swe "För stor total radlängd. Den högst tillåtna radlängden, förutom BLOBs, är %ld. Ändra några av dina fält till BLOB"
 +        ukr "Задовга строка. Найбільшою довжиною строки, не рахуючи BLOB, є %ld. Вам потрібно привести деякі стовбці до типу BLOB"
 +ER_STACK_OVERRUN  
 +        cze "Přetečení zásobníku threadu: použito %ld z %ld. Použijte 'mysqld --thread_stack=#' k zadání většího zásobníku"
 +        dan "Thread stack brugt:  Brugt: %ld af en %ld stak.  Brug 'mysqld --thread_stack=#' for at allokere en større stak om nødvendigt"
 +        nla "Thread stapel overrun:  Gebruikte: %ld van een %ld stack. Gebruik 'mysqld --thread_stack=#' om een grotere stapel te definieren (indien noodzakelijk)."
 +        eng "Thread stack overrun:  Used: %ld of a %ld stack.  Use 'mysqld --thread_stack=#' to specify a bigger stack if needed"
 +        fre "Débordement de la pile des tâches (Thread stack). Utilisées: %ld pour une pile de %ld.  Essayez 'mysqld --thread_stack=#' pour indiquer une plus grande valeur"
 +        ger "Thread-Stack-Überlauf. Benutzt: %ld von %ld Stack. 'mysqld --thread_stack=#' verwenden, um bei Bedarf einen größeren Stack anzulegen"
 +        greek "Stack overrun στο thread:  Used: %ld of a %ld stack.  Παρακαλώ χρησιμοποιείστε 'mysqld --thread_stack=#' για να ορίσετε ένα μεγαλύτερο stack αν χρειάζεται"
 +        hun "Thread verem tullepes:  Used: %ld of a %ld stack. Hasznalja a 'mysqld --thread_stack=#' nagyobb verem definialasahoz"
 +        ita "Thread stack overrun:  Usati: %ld di uno stack di %ld.  Usa 'mysqld --thread_stack=#' per specificare uno stack piu` grande."
 +        jpn "スレッドスタック不足です(使用: %ld ; サイズ: %ld)。必要に応じて、より大きい値で 'mysqld --thread_stack=#' の指定をしてください。"
 +        kor "쓰레드 스택이 넘쳤습니다.  사용: %ld개 스택: %ld개.  만약 필요시 더큰 스택을 원할때에는 'mysqld --thread_stack=#' 를 정의하세요"
 +        por "Estouro da pilha do 'thread'. Usados %ld de uma pilha de %ld. Use 'mysqld --thread_stack=#' para especificar uma pilha maior, se necessário"
 +        rum "Stack-ul thread-ului a fost depasit (prea mic):  Folositi: %ld intr-un stack de %ld.  Folositi 'mysqld --thread_stack=#' ca sa specifici un stack mai mare"
 +        rus "Стек потоков переполнен:  использовано: %ld из %ld стека.  Применяйте 'mysqld --thread_stack=#' для указания большего размера стека, если необходимо"
 +        serbian "Prepisivanje thread stack-a:  Upotrebljeno: %ld od %ld stack memorije.  Upotrebite 'mysqld --thread_stack=#' da navedete veći stack ako je potrebno"
 +        slo "Pretečenie zásobníku vlákna:  použité: %ld z %ld.  Použite 'mysqld --thread_stack=#' k zadaniu väčšieho zásobníka"
 +        spa "Sobrecarga de la pila de thread:  Usada: %ld de una %ld pila.  Use 'mysqld --thread_stack=#' para especificar una mayor pila si necesario"
 +        swe "Trådstacken tog slut:  Har använt %ld av %ld bytes.  Använd 'mysqld --thread_stack=#' ifall du behöver en större stack"
 +        ukr "Стек гілок переповнено:  Використано: %ld з %ld. Використовуйте 'mysqld --thread_stack=#' аби зазначити більший стек, якщо необхідно"
 +ER_WRONG_OUTER_JOIN 42000 
 +        cze "V OUTER JOIN byl nalezen křížový odkaz. Prověřte ON podmínky"
 +        dan "Krydsreferencer fundet i OUTER JOIN; check dine ON conditions"
 +        nla "Gekruiste afhankelijkheid gevonden in OUTER JOIN. Controleer uw ON-conditions"
 +        eng "Cross dependency found in OUTER JOIN; examine your ON conditions"
 +        est "Ristsõltuvus OUTER JOIN klauslis. Kontrolli oma ON tingimusi"
 +        fre "Dépendance croisée dans une clause OUTER JOIN. Vérifiez la condition ON"
 +        ger "OUTER JOIN enthält fehlerhafte Abhängigkeiten. In ON verwendete Bedingungen überprüfen"
 +        greek "Cross dependency βρέθηκε σε OUTER JOIN.  Παρακαλώ εξετάστε τις συνθήκες που θέσατε στο ON"
 +        hun "Keresztfuggoseg van az OUTER JOIN-ban. Ellenorizze az ON felteteleket"
 +        ita "Trovata una dipendenza incrociata nella OUTER JOIN. Controlla le condizioni ON"
 +        jpn "OUTER JOINに相互依存が見つかりました。ON句の条件を確認して下さい。"
 +        por "Dependência cruzada encontrada em junção externa (OUTER JOIN); examine as condições utilizadas nas cláusulas 'ON'"
 +        rum "Dependinta incrucisata (cross dependency) gasita in OUTER JOIN.  Examinati conditiile ON"
 +        rus "В OUTER JOIN обнаружена перекрестная зависимость. Внимательно проанализируйте свои условия ON"
 +        serbian "Unakrsna zavisnost pronađena u komandi 'OUTER JOIN'. Istražite vaše 'ON' uslove"
 +        slo "V OUTER JOIN bol nájdený krížový odkaz.  Skontrolujte podmienky ON"
 +        spa "Dependencia cruzada encontrada en OUTER JOIN.  Examine su condición ON"
 +        swe "Felaktigt referens i OUTER JOIN.  Kontrollera ON-uttrycket"
 +        ukr "Перехресна залежність у OUTER JOIN. Перевірте умову ON"
 +ER_NULL_COLUMN_IN_INDEX 42000 
 +        eng "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler"
 +        swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.192s' till NOT NULL eller använd en annan hanterare"
 +ER_CANT_FIND_UDF  
 +        cze "Nemohu načíst funkci '%-.192s'"
 +        dan "Kan ikke læse funktionen '%-.192s'"
 +        nla "Kan functie '%-.192s' niet laden"
 +        eng "Can't load function '%-.192s'"
 +        est "Ei suuda avada funktsiooni '%-.192s'"
 +        fre "Imposible de charger la fonction '%-.192s'"
 +        ger "Kann Funktion '%-.192s' nicht laden"
 +        greek "Δεν είναι δυνατή η διαδικασία load για τη συνάρτηση '%-.192s'"
 +        hun "A(z) '%-.192s' fuggveny nem toltheto be"
 +        ita "Impossibile caricare la funzione '%-.192s'"
 +        jpn "関数 '%-.192s' をロードできません。"
 +        kor "'%-.192s' 함수를 로드하지 못했습니다."
 +        por "Não pode carregar a função '%-.192s'"
 +        rum "Nu pot incarca functia '%-.192s'"
 +        rus "Невозможно загрузить функцию '%-.192s'"
 +        serbian "Ne mogu da učitam funkciju '%-.192s'"
 +        slo "Nemôžem načítať funkciu '%-.192s'"
 +        spa "No puedo cargar función '%-.192s'"
 +        swe "Kan inte ladda funktionen '%-.192s'"
 +        ukr "Не можу завантажити функцію '%-.192s'"
 +ER_CANT_INITIALIZE_UDF  
 +        cze "Nemohu inicializovat funkci '%-.192s'; %-.80s"
 +        dan "Kan ikke starte funktionen '%-.192s'; %-.80s"
 +        nla "Kan functie '%-.192s' niet initialiseren; %-.80s"
 +        eng "Can't initialize function '%-.192s'; %-.80s"
 +        est "Ei suuda algväärtustada funktsiooni '%-.192s'; %-.80s"
 +        fre "Impossible d'initialiser la fonction '%-.192s'; %-.80s"
 +        ger "Kann Funktion '%-.192s' nicht initialisieren: %-.80s"
 +        greek "Δεν είναι δυνατή η έναρξη της συνάρτησης '%-.192s'; %-.80s"
 +        hun "A(z) '%-.192s' fuggveny nem inicializalhato; %-.80s"
 +        ita "Impossibile inizializzare la funzione '%-.192s'; %-.80s"
 +        jpn "関数 '%-.192s' を初期化できません。; %-.80s"
 +        kor "'%-.192s' 함수를 초기화 하지 못했습니다.; %-.80s"
 +        por "Não pode inicializar a função '%-.192s' - '%-.80s'"
 +        rum "Nu pot initializa functia '%-.192s'; %-.80s"
 +        rus "Невозможно инициализировать функцию '%-.192s'; %-.80s"
 +        serbian "Ne mogu da inicijalizujem funkciju '%-.192s'; %-.80s"
 +        slo "Nemôžem inicializovať funkciu '%-.192s'; %-.80s"
 +        spa "No puedo inicializar función '%-.192s'; %-.80s"
 +        swe "Kan inte initialisera funktionen '%-.192s'; '%-.80s'"
 +        ukr "Не можу ініціалізувати функцію '%-.192s'; %-.80s"
 +ER_UDF_NO_PATHS  
 +        cze "Pro sdílenou knihovnu nejsou povoleny cesty"
 +        dan "Angivelse af sti ikke tilladt for delt bibliotek"
 +        nla "Geen pad toegestaan voor shared library"
 +        eng "No paths allowed for shared library"
 +        est "Teegi nimes ei tohi olla kataloogi"
 +        fre "Chemin interdit pour les bibliothèques partagées"
 +        ger "Keine Pfade gestattet für Shared Library"
 +        greek "Δεν βρέθηκαν paths για την shared library"
 +        hun "Nincs ut a megosztott konyvtarakhoz (shared library)"
 +        ita "Non sono ammessi path per le librerie condivisa"
 +        jpn "共有ライブラリにはパスを指定できません。"
 +        kor "공유 라이버러리를 위한 패스가 정의되어 있지 않습니다."
 +        por "Não há caminhos (paths) permitidos para biblioteca compartilhada"
 +        rum "Nici un paths nu e permis pentru o librarie shared"
 +        rus "Недопустимо указывать пути для динамических библиотек"
 +        serbian "Ne postoje dozvoljene putanje do share-ovane biblioteke"
 +        slo "Neprípustné žiadne cesty k zdieľanej knižnici"
 +        spa "No pasos permitidos para librarias conjugadas"
 +        swe "Man får inte ange sökväg för dynamiska bibliotek"
 +        ukr "Не дозволено використовувати путі для розділюваних бібліотек"
 +ER_UDF_EXISTS  
 +        cze "Funkce '%-.192s' již existuje"
 +        dan "Funktionen '%-.192s' findes allerede"
 +        nla "Functie '%-.192s' bestaat reeds"
 +        eng "Function '%-.192s' already exists"
 +        est "Funktsioon '%-.192s' juba eksisteerib"
 +        fre "La fonction '%-.192s' existe déjà"
 +        ger "Funktion '%-.192s' existiert schon"
 +        greek "Η συνάρτηση '%-.192s' υπάρχει ήδη"
 +        hun "A '%-.192s' fuggveny mar letezik"
 +        ita "La funzione '%-.192s' esiste gia`"
 +        jpn "関数 '%-.192s' はすでに定義されています。"
 +        kor "'%-.192s' 함수는 이미 존재합니다."
 +        por "Função '%-.192s' já existe"
 +        rum "Functia '%-.192s' exista deja"
 +        rus "Функция '%-.192s' уже существует"
 +        serbian "Funkcija '%-.192s' već postoji"
 +        slo "Funkcia '%-.192s' už existuje"
 +        spa "Función '%-.192s' ya existe"
 +        swe "Funktionen '%-.192s' finns redan"
 +        ukr "Функція '%-.192s' вже існує"
 +ER_CANT_OPEN_LIBRARY  
 +        cze "Nemohu otevřít sdílenou knihovnu '%-.192s' (errno: %d, %-.128s)"
 +        dan "Kan ikke åbne delt bibliotek '%-.192s' (errno: %d, %-.128s)"
 +        nla "Kan shared library '%-.192s' niet openen (Errcode: %d, %-.128s)"
 +        eng "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
 +        est "Ei suuda avada jagatud teeki '%-.192s' (veakood: %d, %-.128s)"
 +        fre "Impossible d'ouvrir la bibliothèque partagée '%-.192s' (errno: %d, %-.128s)"
 +        ger "Kann Shared Library '%-.192s' nicht öffnen (Fehler: %d, %-.128s)"
 +        greek "Δεν είναι δυνατή η ανάγνωση της shared library '%-.192s' (κωδικός λάθους: %d, %-.128s)"
 +        hun "A(z) '%-.192s' megosztott konyvtar nem hasznalhato (hibakod: %d, %-.128s)"
 +        ita "Impossibile aprire la libreria condivisa '%-.192s' (errno: %d, %-.128s)"
 +        jpn "共有ライブラリ '%-.192s' を開く事ができません。(エラー番号: %d, %-.128s)"
 +        kor "'%-.192s' 공유 라이버러리를 열수 없습니다.(에러번호: %d, %-.128s)"
 +        nor "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
 +        norwegian-ny "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
 +        pol "Can't open shared library '%-.192s' (errno: %d, %-.128s)"
 +        por "Não pode abrir biblioteca compartilhada '%-.192s' (erro no. %d, %-.128s)"
 +        rum "Nu pot deschide libraria shared '%-.192s' (Eroare: %d, %-.128s)"
 +        rus "Невозможно открыть динамическую библиотеку '%-.192s' (ошибка: %d, %-.128s)"
 +        serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.192s' (errno: %d, %-.128s)"
 +        slo "Nemôžem otvoriť zdieľanú knižnicu '%-.192s' (chybový kód: %d, %-.128s)"
 +        spa "No puedo abrir libraria conjugada '%-.192s' (errno: %d, %-.128s)"
 +        swe "Kan inte öppna det dynamiska biblioteket '%-.192s' (Felkod: %d, %-.128s)"
 +        ukr "Не можу відкрити розділювану бібліотеку '%-.192s' (помилка: %d, %-.128s)"
 +ER_CANT_FIND_DL_ENTRY
 +        cze "Nemohu najít funkci '%-.128s' v knihovně"
 +        dan "Kan ikke finde funktionen '%-.128s' i bibliotek"
 +        nla "Kan functie '%-.128s' niet in library vinden"
 +        eng "Can't find symbol '%-.128s' in library"
 +        est "Ei leia funktsiooni '%-.128s' antud teegis"
 +        fre "Impossible de trouver la fonction '%-.128s' dans la bibliothèque"
 +        ger "Kann Funktion '%-.128s' in der Library nicht finden"
 +        greek "Δεν είναι δυνατή η ανεύρεση της συνάρτησης '%-.128s' στην βιβλιοθήκη"
 +        hun "A(z) '%-.128s' fuggveny nem talalhato a konyvtarban"
 +        ita "Impossibile trovare la funzione '%-.128s' nella libreria"
 +        jpn "関数 '%-.128s' は共有ライブラリー中にありません。"
 +        kor "라이버러리에서 '%-.128s' 함수를 찾을 수 없습니다."
 +        por "Não pode encontrar a função '%-.128s' na biblioteca"
 +        rum "Nu pot gasi functia '%-.128s' in libraria"
 +        rus "Невозможно отыскать символ '%-.128s' в библиотеке"
 +        serbian "Ne mogu da pronadjem funkciju '%-.128s' u biblioteci"
 +        slo "Nemôžem nájsť funkciu '%-.128s' v knižnici"
 +        spa "No puedo encontrar función '%-.128s' en libraria"
 +        swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket"
 +        ukr "Не можу знайти функцію '%-.128s' у бібліотеці"
 +ER_FUNCTION_NOT_DEFINED  
 +        cze "Funkce '%-.192s' není definována"
 +        dan "Funktionen '%-.192s' er ikke defineret"
 +        nla "Functie '%-.192s' is niet gedefinieerd"
 +        eng "Function '%-.192s' is not defined"
 +        est "Funktsioon '%-.192s' ei ole defineeritud"
 +        fre "La fonction '%-.192s' n'est pas définie"
 +        ger "Funktion '%-.192s' ist nicht definiert"
 +        greek "Η συνάρτηση '%-.192s' δεν έχει ορισθεί"
 +        hun "A '%-.192s' fuggveny nem definialt"
 +        ita "La funzione '%-.192s' non e` definita"
 +        jpn "関数 '%-.192s' は定義されていません。"
 +        kor "'%-.192s' 함수가 정의되어 있지 않습니다."
 +        por "Função '%-.192s' não está definida"
 +        rum "Functia '%-.192s' nu e definita"
 +        rus "Функция '%-.192s' не определена"
 +        serbian "Funkcija '%-.192s' nije definisana"
 +        slo "Funkcia '%-.192s' nie je definovaná"
 +        spa "Función '%-.192s' no está definida"
 +        swe "Funktionen '%-.192s' är inte definierad"
 +        ukr "Функцію '%-.192s' не визначено"
 +ER_HOST_IS_BLOCKED  
 +        cze "Stroj '%-.64s' je zablokován kvůli mnoha chybám při připojování. Odblokujete použitím 'mysqladmin flush-hosts'"
 +        dan "Værten '%-.64s' er blokeret på grund af mange fejlforespørgsler. Lås op med 'mysqladmin flush-hosts'"
 +        nla "Host '%-.64s' is geblokkeeerd vanwege te veel verbindings fouten. Deblokkeer met 'mysqladmin flush-hosts'"
 +        eng "Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"
 +        est "Masin '%-.64s' on blokeeritud hulgaliste ühendusvigade tõttu. Blokeeringu saab tühistada 'mysqladmin flush-hosts' käsuga"
 +        fre "L'hôte '%-.64s' est bloqué à cause d'un trop grand nombre d'erreur de connexion. Débloquer le par 'mysqladmin flush-hosts'"
 +        ger "Host '%-.64s' blockiert wegen zu vieler Verbindungsfehler. Aufheben der Blockierung mit 'mysqladmin flush-hosts'"
 +        greek "Ο υπολογιστής '%-.64s' έχει αποκλεισθεί λόγω πολλαπλών λαθών σύνδεσης. Προσπαθήστε να διορώσετε με 'mysqladmin flush-hosts'"
 +        hun "A '%-.64s' host blokkolodott, tul sok kapcsolodasi hiba miatt. Hasznalja a 'mysqladmin flush-hosts' parancsot"
 +        ita "Sistema '%-.64s' bloccato a causa di troppi errori di connessione. Per sbloccarlo: 'mysqladmin flush-hosts'"
 +        jpn "接続エラーが多いため、ホスト '%-.64s' は拒否されました。'mysqladmin flush-hosts' で解除できます。"
 +        kor "너무 많은 연결오류로 인하여 호스트 '%-.64s'는 블락되었습니다. 'mysqladmin flush-hosts'를 이용하여 블락을 해제하세요"
 +        por "'Host' '%-.64s' está bloqueado devido a muitos erros de conexão. Desbloqueie com 'mysqladmin flush-hosts'"
 +        rum "Host-ul '%-.64s' e blocat din cauza multelor erori de conectie. Poti deploca folosind 'mysqladmin flush-hosts'"
 +        rus "Хост '%-.64s' заблокирован из-за слишком большого количества ошибок соединения. Разблокировать его можно с помощью 'mysqladmin flush-hosts'"
 +        serbian "Host '%-.64s' je blokiran zbog previše grešaka u konekciji.  Možete ga odblokirati pomoću komande 'mysqladmin flush-hosts'"
 +        spa "Servidor '%-.64s' está bloqueado por muchos errores de conexión.  Desbloquear con 'mysqladmin flush-hosts'"
 +        swe "Denna dator, '%-.64s', är blockerad pga många felaktig paket. Gör 'mysqladmin flush-hosts' för att ta bort alla blockeringarna"
 +        ukr "Хост '%-.64s' заблоковано з причини великої кількості помилок з'єднання. Для розблокування використовуйте 'mysqladmin flush-hosts'"
 +ER_HOST_NOT_PRIVILEGED  
 +        cze "Stroj '%-.64s' nemá povoleno se k tomuto MySQL serveru připojit"
 +        dan "Værten '%-.64s' kan ikke tilkoble denne MariaDB-server"
 +        nla "Het is host '%-.64s' is niet toegestaan verbinding te maken met deze MariaDB server"
 +        eng "Host '%-.64s' is not allowed to connect to this MariaDB server"
 +        est "Masinal '%-.64s' puudub ligipääs sellele MariaDB serverile"
 +        fre "Le hôte '%-.64s' n'est pas authorisé à se connecter à ce serveur MariaDB"
 +        ger "Host '%-.64s' hat keine Berechtigung, sich mit diesem MariaDB-Server zu verbinden"
 +        greek "Ο υπολογιστής '%-.64s' δεν έχει δικαίωμα σύνδεσης με τον MariaDB server"
 +        hun "A '%-.64s' host szamara nem engedelyezett a kapcsolodas ehhez a MariaDB szerverhez"
 +        ita "Al sistema '%-.64s' non e` consentita la connessione a questo server MariaDB"
 +        jpn "ホスト '%-.64s' からのこの MySQL server への接続は許可されていません。"
 +        kor "'%-.64s' 호스트는 이 MariaDB서버에 접속할 허가를 받지 못했습니다."
 +        por "'Host' '%-.64s' não tem permissão para se conectar com este servidor MariaDB"
 +        rum "Host-ul '%-.64s' nu este permis a se conecta la aceste server MariaDB"
 +        rus "Хосту '%-.64s' не разрешается подключаться к этому серверу MariaDB"
 +        serbian "Host-u '%-.64s' nije dozvoljeno da se konektuje na ovaj MariaDB server"
 +        spa "Servidor '%-.64s' no está permitido para conectar con este servidor MariaDB"
 +        swe "Denna dator, '%-.64s', har inte privileger att använda denna MariaDB server"
 +        ukr "Хосту '%-.64s' не доволено зв'язуватись з цим сервером MariaDB"
 +ER_PASSWORD_ANONYMOUS_USER 42000 
 +        cze "Používáte MySQL jako anonymní uživatel a anonymní uživatelé nemají povoleno měnit hesla"
 +        dan "Du bruger MariaDB som anonym bruger. Anonyme brugere må ikke ændre adgangskoder"
 +        nla "U gebruikt MariaDB als anonieme gebruiker en deze mogen geen wachtwoorden wijzigen"
 +        eng "You are using MariaDB as an anonymous user and anonymous users are not allowed to modify user settings"
 +        est "Te kasutate MariaDB-i anonüümse kasutajana, kelledel pole parooli muutmise õigust"
 +        fre "Vous utilisez un utilisateur anonyme et les utilisateurs anonymes ne sont pas autorisés à changer les mots de passe"
 +        ger "Sie benutzen MariaDB als anonymer Benutzer und dürfen daher keine Passwörter ändern"
 +        greek "Χρησιμοποιείτε την MariaDB σαν anonymous user και έτσι δεν μπορείτε να αλλάξετε τα passwords άλλων χρηστών"
 +        hun "Nevtelen (anonymous) felhasznalokent nem negedelyezett a jelszovaltoztatas"
 +        ita "Impossibile cambiare la password usando MariaDB come utente anonimo"
 +        jpn "MySQL を匿名ユーザーで使用しているので、パスワードの変更はできません。"
 +        kor "당신은 MariaDB서버에 익명의 사용자로 접속을 하셨습니다.익명의 사용자는 암호를 변경할 수 없습니다."
 +        por "Você está usando o MariaDB como usuário anônimo e usuários anônimos não têm permissão para mudar senhas"
 +        rum "Dumneavoastra folositi MariaDB ca un utilizator anonim si utilizatorii anonimi nu au voie sa schimbe setarile utilizatorilor."
 +        rus "Вы используете MariaDB от имени анонимного пользователя, а анонимным пользователям не разрешается менять пароли"
 +        serbian "Vi koristite MariaDB kao anonimni korisnik a anonimnim korisnicima nije dozvoljeno da menjaju lozinke"
 +        spa "Tu estás usando MariaDB como un usuario anonimo y usuarios anonimos no tienen permiso para cambiar las claves"
 +        swe "Du använder MariaDB som en anonym användare och som sådan får du inte ändra ditt lösenord"
 +        ukr "Ви використовуєте MariaDB як анонімний користувач, тому вам не дозволено змінювати паролі"
 +ER_PASSWORD_NOT_ALLOWED 42000 
 +        cze "Na změnu hesel ostatním musíte mít právo provést update tabulek v databázi mysql"
 +        dan "Du skal have tilladelse til at opdatere tabeller i MariaDB databasen for at ændre andres adgangskoder"
 +        nla "U moet tabel update priveleges hebben in de mysql database om wachtwoorden voor anderen te mogen wijzigen"
 +        eng "You must have privileges to update tables in the mysql database to be able to change passwords for others"
 +        est "Teiste paroolide muutmiseks on nõutav tabelite muutmisõigus 'mysql' andmebaasis"
 +        fre "Vous devez avoir le privilège update sur les tables de la base de donnée mysql pour pouvoir changer les mots de passe des autres"
 +        ger "Sie benötigen die Berechtigung zum Aktualisieren von Tabellen in der Datenbank 'mysql', um die Passwörter anderer Benutzer ändern zu können"
 +        greek "Πρέπει να έχετε δικαίωμα διόρθωσης πινάκων (update) στη βάση δεδομένων mysql για να μπορείτε να αλλάξετε τα passwords άλλων χρηστών"
 +        hun "Onnek tabla-update joggal kell rendelkeznie a mysql adatbazisban masok jelszavanak megvaltoztatasahoz"
 +        ita "E` necessario il privilegio di update sulle tabelle del database mysql per cambiare le password per gli altri utenti"
 +        jpn "他のユーザーのパスワードを変更するためには、mysqlデータベースの表を更新する権限が必要です。"
 +        kor "당신은 다른사용자들의 암호를 변경할 수 있도록 데이타베이스 변경권한을 가져야 합니다."
 +        por "Você deve ter privilégios para atualizar tabelas no banco de dados mysql para ser capaz de mudar a senha de outros"
 +        rum "Trebuie sa aveti privilegii sa actualizati tabelele in bazele de date mysql ca sa puteti sa schimati parolele altora"
 +        rus "Для того чтобы изменять пароли других пользователей, у вас должны быть привилегии на изменение таблиц в базе данных mysql"
 +        serbian "Morate imati privilegije da možete da update-ujete određene tabele ako želite da menjate lozinke za druge korisnike"
 +        spa "Tu debes de tener permiso para actualizar tablas en la base de datos mysql para cambiar las claves para otros"
 +        swe "För att ändra lösenord för andra måste du ha rättigheter att uppdatera mysql-databasen"
 +        ukr "Ви повині мати право на оновлення таблиць у базі данних mysql, аби мати можливість змінювати пароль іншим"
 +ER_PASSWORD_NO_MATCH 28000 
 +        cze "V tabulce user není žádný odpovídající řádek"
 +        dan "Kan ikke finde nogen tilsvarende poster i bruger tabellen"
 +        nla "Kan geen enkele passende rij vinden in de gebruikers tabel"
 +        eng "Can't find any matching row in the user table"
 +        est "Ei leia vastavat kirjet kasutajate tabelis"
 +        fre "Impossible de trouver un enregistrement correspondant dans la table user"
 +        ger "Kann keinen passenden Datensatz in Tabelle 'user' finden"
 +        greek "Δεν είναι δυνατή η ανεύρεση της αντίστοιχης εγγραφής στον πίνακα των χρηστών"
 +        hun "Nincs megegyezo sor a user tablaban"
 +        ita "Impossibile trovare la riga corrispondente nella tabella user"
 +        jpn "ユーザーテーブルに該当するレコードが見つかりません。"
 +        kor "사용자 테이블에서 일치하는 것을 찾을 수 없읍니다."
 +        por "Não pode encontrar nenhuma linha que combine na tabela usuário (user table)"
 +        rum "Nu pot gasi nici o linie corespunzatoare in tabela utilizatorului"
 +        rus "Невозможно отыскать подходящую запись в таблице пользователей"
 +        serbian "Ne mogu da pronađem odgovarajući slog u 'user' tabeli"
 +        spa "No puedo encontrar una línea correponsdiente en la tabla user"
 +        swe "Hittade inte användaren i 'user'-tabellen"
 +        ukr "Не можу знайти відповідних записів у таблиці користувача"
 +ER_UPDATE_INFO  
 +        cze "Nalezených řádků: %ld  Změněno: %ld  Varování: %ld"
 +        dan "Poster fundet: %ld  Ændret: %ld  Advarsler: %ld"
 +        nla "Passende rijen: %ld  Gewijzigd: %ld  Waarschuwingen: %ld"
 +        eng "Rows matched: %ld  Changed: %ld  Warnings: %ld"
 +        est "Sobinud kirjeid: %ld  Muudetud: %ld  Hoiatusi: %ld"
 +        fre "Enregistrements correspondants: %ld  Modifiés: %ld  Warnings: %ld"
 +        ger "Datensätze gefunden: %ld  Geändert: %ld  Warnungen: %ld"
 +        hun "Megegyezo sorok szama: %ld  Valtozott: %ld  Warnings: %ld"
 +        ita "Rows riconosciute: %ld  Cambiate: %ld  Warnings: %ld"
 +        jpn "該当した行: %ld  変更: %ld  警告: %ld"
 +        kor "일치하는 Rows : %ld개 변경됨: %ld개  경고: %ld개"
 +        por "Linhas que combinaram: %ld - Alteradas: %ld - Avisos: %ld"
 +        rum "Linii identificate (matched): %ld  Schimbate: %ld  Atentionari (warnings): %ld"
 +        rus "Совпало записей: %ld  Изменено: %ld  Предупреждений: %ld"
 +        serbian "Odgovarajućih slogova: %ld  Promenjeno: %ld  Upozorenja: %ld"
 +        spa "Líneas correspondientes: %ld  Cambiadas: %ld  Avisos: %ld"
 +        swe "Rader: %ld  Uppdaterade: %ld  Varningar: %ld"
 +        ukr "Записів відповідає: %ld  Змінено: %ld  Застережень: %ld"
 +ER_CANT_CREATE_THREAD  
 +        cze "Nemohu vytvořit nový thread (errno %M). Pokud je ještě nějaká volná paměť, podívejte se do manuálu na část o chybách specifických pro jednotlivé operační systémy"
 +        dan "Kan ikke danne en ny tråd (fejl nr. %M). Hvis computeren ikke er løbet tør for hukommelse, kan du se i brugervejledningen for en mulig operativ-system - afhængig fejl"
 +        nla "Kan geen nieuwe thread aanmaken (Errcode: %M). Indien er geen tekort aan geheugen is kunt u de handleiding consulteren over een mogelijke OS afhankelijke fout"
 +        eng "Can't create a new thread (errno %M); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug"
 +        est "Ei suuda luua uut lõime (veakood %M). Kui mälu ei ole otsas, on tõenäoliselt tegemist operatsioonisüsteemispetsiifilise veaga"
 +        fre "Impossible de créer une nouvelle tâche (errno %M). S'il reste de la mémoire libre, consultez le manual pour trouver un éventuel bug dépendant de l'OS"
 +        ger "Kann keinen neuen Thread erzeugen (Fehler: %M). Sollte noch Speicher verfügbar sein, bitte im Handbuch wegen möglicher Fehler im Betriebssystem nachschlagen"
 +        hun "Uj thread letrehozasa nem lehetseges (Hibakod: %M). Amenyiben van meg szabad memoria, olvassa el a kezikonyv operacios rendszerfuggo hibalehetosegekrol szolo reszet"
 +        ita "Impossibile creare un nuovo thread (errno %M). Se non ci sono problemi di memoria disponibile puoi consultare il manuale per controllare possibili problemi dipendenti dal SO"
 +        jpn "新規にスレッドを作成できません。(エラー番号 %M) もしも使用可能メモリーの不足でなければ、OS依存のバグである可能性があります。"
 +        kor "새로운 쓰레드를 만들 수 없습니다.(에러번호 %M). 만약 여유메모리가 있다면 OS-dependent버그 의 메뉴얼 부분을 찾아보시오."
 +        nor "Can't create a new thread (errno %M); if you are not out of available memory you can consult the manual for any possible OS dependent bug"
 +        norwegian-ny "Can't create a new thread (errno %M); if you are not out of available memory you can consult the manual for any possible OS dependent bug"
 +        pol "Can't create a new thread (errno %M); if you are not out of available memory you can consult the manual for any possible OS dependent bug"
 +        por "Não pode criar uma nova 'thread' (erro no. %M). Se você não estiver sem memória disponível, você pode consultar o manual sobre um possível 'bug' dependente do sistema operacional"
 +        rum "Nu pot crea un thread nou (Eroare %M). Daca mai aveti memorie disponibila in sistem, puteti consulta manualul - ar putea exista un potential bug in legatura cu sistemul de operare"
 +        rus "Невозможно создать новый поток (ошибка %M). Если это не ситуация, связанная с нехваткой памяти, то вам следует изучить документацию на предмет описания возможной ошибки работы в конкретной ОС"
 +        serbian "Ne mogu da kreiram novi thread (errno %M). Ako imate još slobodne memorije, trebali biste da pogledate u priručniku da li je ovo specifična greška vašeg operativnog sistema"
 +        spa "No puedo crear un nuevo thread (errno %M). Si tu está con falta de memoria disponible, tu puedes consultar el Manual para posibles problemas con SO"
 +        swe "Kan inte skapa en ny tråd (errno %M)"
 +        ukr "Не можу створити нову гілку (помилка %M). Якщо ви не використали усю пам'ять, то прочитайте документацію до вашої ОС - можливо це помилка ОС"
 +ER_WRONG_VALUE_COUNT_ON_ROW 21S01 
 +        cze "Počet sloupců neodpovídá počtu hodnot na řádku %lu"
 +        dan "Kolonne antallet stemmer ikke overens med antallet af værdier i post %lu"
 +        nla "Kolom aantal komt niet overeen met waarde aantal in rij %lu"
 +        eng "Column count doesn't match value count at row %lu"
 +        est "Tulpade hulk erineb väärtuste hulgast real %lu"
 +        ger "Anzahl der Felder stimmt nicht mit der Anzahl der Werte in Zeile %lu überein"
 +        hun "Az oszlopban talalhato ertek nem egyezik meg a %lu sorban szamitott ertekkel"
 +        ita "Il numero delle colonne non corrisponde al conteggio alla riga %lu"
 +        jpn "%lu 行目で、列の数が値の数と一致しません。"
 +        kor "Row %lu에서 칼럼 카운트와 value 카운터와 일치하지 않습니다."
 +        por "Contagem de colunas não confere com a contagem de valores na linha %lu"
 +        rum "Numarul de coloane nu corespunde cu numarul de valori la linia %lu"
 +        rus "Количество столбцов не совпадает с количеством значений в записи %lu"
 +        serbian "Broj kolona ne odgovara broju vrednosti u slogu %lu"
 +        spa "El número de columnas no corresponde al número en la línea %lu"
 +        swe "Antalet kolumner motsvarar inte antalet värden på rad: %lu"
 +        ukr "Кількість стовбців не співпадає з кількістю значень у строці %lu"
 +ER_CANT_REOPEN_TABLE  
 +        cze "Nemohu znovuotevřít tabulku: '%-.192s"
 +        dan "Kan ikke genåbne tabel '%-.192s"
 +        nla "Kan tabel niet opnieuw openen: '%-.192s"
 +        eng "Can't reopen table: '%-.192s'"
 +        est "Ei suuda taasavada tabelit '%-.192s'"
 +        fre "Impossible de réouvrir la table: '%-.192s"
 +        ger "Kann Tabelle'%-.192s' nicht erneut öffnen"
 +        hun "Nem lehet ujra-megnyitni a tablat: '%-.192s"
 +        ita "Impossibile riaprire la tabella: '%-.192s'"
 +        jpn "表を再オープンできません。: '%-.192s'"
 +        kor "테이블을 다시 열수 없군요: '%-.192s"
 +        nor "Can't reopen table: '%-.192s"
 +        norwegian-ny "Can't reopen table: '%-.192s"
 +        pol "Can't reopen table: '%-.192s"
 +        por "Não pode reabrir a tabela '%-.192s"
 +        rum "Nu pot redeschide tabela: '%-.192s'"
 +        rus "Невозможно заново открыть таблицу '%-.192s'"
 +        serbian "Ne mogu da ponovo otvorim tabelu '%-.192s'"
 +        slo "Can't reopen table: '%-.192s"
 +        spa "No puedo reabrir tabla: '%-.192s"
 +        swe "Kunde inte stänga och öppna tabell '%-.192s"
 +        ukr "Не можу перевідкрити таблицю: '%-.192s'"
 +ER_INVALID_USE_OF_NULL 22004 
 +        cze "Neplatné užití hodnoty NULL"
 +        dan "Forkert brug af nulværdi (NULL)"
 +        nla "Foutief gebruik van de NULL waarde"
 +        eng "Invalid use of NULL value"
 +        est "NULL väärtuse väärkasutus"
 +        fre "Utilisation incorrecte de la valeur NULL"
 +        ger "Unerlaubte Verwendung eines NULL-Werts"
 +        hun "A NULL ervenytelen hasznalata"
 +        ita "Uso scorretto del valore NULL"
 +        jpn "NULL 値の使用方法が不適切です。"
 +        kor "NULL 값을 잘못 사용하셨군요..."
 +        por "Uso inválido do valor NULL"
 +        rum "Folosirea unei value NULL e invalida"
 +        rus "Неправильное использование величины NULL"
 +        serbian "Pogrešna upotreba vrednosti NULL"
 +        spa "Invalido uso de valor NULL"
 +        swe "Felaktig använding av NULL"
 +        ukr "Хибне використання значення NULL"
 +ER_REGEXP_ERROR 42000 
 +        cze "Regulární výraz vrátil chybu '%-.64s'"
 +        dan "Fik fejl '%-.64s' fra regexp"
 +        nla "Fout '%-.64s' ontvangen van regexp"
 +        eng "Got error '%-.64s' from regexp"
 +        est "regexp tagastas vea '%-.64s'"
 +        fre "Erreur '%-.64s' provenant de regexp"
 +        ger "regexp lieferte Fehler '%-.64s'"
 +        hun "'%-.64s' hiba a regularis kifejezes hasznalata soran (regexp)"
 +        ita "Errore '%-.64s' da regexp"
 +        jpn "regexp がエラー '%-.64s' を返しました。"
 +        kor "regexp에서 '%-.64s'가 났습니다."
 +        por "Obteve erro '%-.64s' em regexp"
 +        rum "Eroarea '%-.64s' obtinuta din expresia regulara (regexp)"
 +        rus "Получена ошибка '%-.64s' от регулярного выражения"
 +        serbian "Funkcija regexp je vratila grešku '%-.64s'"
 +        spa "Obtenido error '%-.64s' de regexp"
 +        swe "Fick fel '%-.64s' från REGEXP"
 +        ukr "Отримано помилку '%-.64s' від регулярного виразу"
 +ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000 
 +        cze "Pokud není žádná GROUP BY klauzule, není dovoleno současné použití GROUP položek (MIN(),MAX(),COUNT()...) s ne GROUP položkami"
 +        dan "Sammenblanding af GROUP kolonner (MIN(),MAX(),COUNT()...) uden GROUP kolonner er ikke tilladt, hvis der ikke er noget GROUP BY prædikat"
 +        nla "Het mixen van GROUP kolommen (MIN(),MAX(),COUNT()...) met no-GROUP kolommen is foutief indien er geen GROUP BY clausule is"
 +        eng "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause"
 +        est "GROUP tulpade (MIN(),MAX(),COUNT()...) kooskasutamine tavaliste tulpadega ilma GROUP BY klauslita ei ole lubatud"
 +        fre "Mélanger les colonnes GROUP (MIN(),MAX(),COUNT()...) avec des colonnes normales est interdit s'il n'y a pas de clause GROUP BY"
 +        ger "Das Vermischen von GROUP-Feldern (MIN(),MAX(),COUNT()...) mit Nicht-GROUP-Feldern ist nicht zulässig, wenn keine GROUP-BY-Klausel vorhanden ist"
 +        hun "A GROUP mezok (MIN(),MAX(),COUNT()...) kevert hasznalata nem lehetseges GROUP BY hivatkozas nelkul"
 +        ita "Il mescolare funzioni di aggregazione (MIN(),MAX(),COUNT()...) e non e` illegale se non c'e` una clausula GROUP BY"
 +        jpn "GROUP BY句が無い場合、集計関数(MIN(),MAX(),COUNT(),...)と通常の列を同時に使用できません。"
 +        kor "Mixing of GROUP 칼럼s (MIN(),MAX(),COUNT(),...) with no GROUP 칼럼s is illegal if there is no GROUP BY clause"
 +        por "Mistura de colunas agrupadas (com MIN(), MAX(), COUNT(), ...) com colunas não agrupadas é ilegal, se não existir uma cláusula de agrupamento (cláusula GROUP BY)"
 +        rum "Amestecarea de coloane GROUP (MIN(),MAX(),COUNT()...) fara coloane GROUP este ilegala daca nu exista o clauza GROUP BY"
 +        rus "Одновременное использование сгруппированных (GROUP) столбцов (MIN(),MAX(),COUNT(),...) с несгруппированными столбцами является некорректным, если в выражении есть GROUP BY"
 +        serbian "Upotreba agregatnih funkcija (MIN(),MAX(),COUNT()...) bez 'GROUP' kolona je pogrešna ako ne postoji 'GROUP BY' iskaz"
 +        spa "Mezcla de columnas GROUP (MIN(),MAX(),COUNT()...) con no GROUP columnas es ilegal si no hat la clausula GROUP BY"
 +        swe "Man får ha både GROUP-kolumner (MIN(),MAX(),COUNT()...) och fält i en fråga om man inte har en GROUP BY-del"
 +        ukr "Змішування GROUP стовбців (MIN(),MAX(),COUNT()...) з не GROUP стовбцями є забороненим, якщо не має GROUP BY"
 +ER_NONEXISTING_GRANT 42000 
 +        cze "Neexistuje odpovídající grant pro uživatele '%-.48s' na stroji '%-.64s'"
 +        dan "Denne tilladelse findes ikke for brugeren '%-.48s' på vært '%-.64s'"
 +        nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s'"
 +        eng "There is no such grant defined for user '%-.48s' on host '%-.64s'"
 +        est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s'"
 +        fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s'"
 +        ger "Für Benutzer '%-.48s' auf Host '%-.64s' gibt es keine solche Berechtigung"
 +        hun "A '%-.48s' felhasznalonak nincs ilyen joga a '%-.64s' host-on"
 +        ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s'"
 +        jpn "ユーザー '%-.48s' (ホスト '%-.64s' 上) は許可されていません。"
 +        kor "사용자 '%-.48s' (호스트 '%-.64s')를 위하여 정의된 그런 승인은 없습니다."
 +        por "Não existe tal permissão (grant) definida para o usuário '%-.48s' no 'host' '%-.64s'"
 +        rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.48s' de pe host-ul '%-.64s'"
 +        rus "Такие права не определены для пользователя '%-.48s' на хосте '%-.64s'"
 +        serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s'"
 +        spa "No existe permiso definido para usuario '%-.48s' en el servidor '%-.64s'"
 +        swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s'"
 +        ukr "Повноважень не визначено для користувача '%-.48s' з хосту '%-.64s'"
 +ER_TABLEACCESS_DENIED_ERROR 42000 
 +        cze "%-.32s příkaz nepřístupný pro uživatele: '%s'@'%s' pro tabulku '%-.192s'"
 +        dan "%-.32s-kommandoen er ikke tilladt for brugeren '%s'@'%s' for tabellen '%-.192s'"
 +        nla "%-.32s commando geweigerd voor gebruiker: '%s'@'%s' voor tabel '%-.192s'"
 +        eng "%-.32s command denied to user '%s'@'%s' for table '%-.192s'"
 +        jps "コマンド %-.32s は ユーザー '%s'@'%s' ,テーブル '%-.192s' に対して許可されていません",
 +        est "%-.32s käsk ei ole lubatud kasutajale '%s'@'%s' tabelis '%-.192s'"
 +        fre "La commande '%-.32s' est interdite à l'utilisateur: '%s'@'%s' sur la table '%-.192s'"
 +        ger "%-.32s Befehl nicht erlaubt für Benutzer '%s'@'%s' auf Tabelle '%-.192s'"
 +        hun "%-.32s parancs a '%s'@'%s' felhasznalo szamara nem engedelyezett a '%-.192s' tablaban"
 +        ita "Comando %-.32s negato per l'utente: '%s'@'%s' sulla tabella '%-.192s'"
 +        jpn "コマンド %-.32s は ユーザー '%s'@'%s' ,テーブル '%-.192s' に対して許可されていません"
 +        kor "'%-.32s' 명령은 다음 사용자에게 거부되었습니다. : '%s'@'%s' for 테이블 '%-.192s'"
 +        por "Comando '%-.32s' negado para o usuário '%s'@'%s' na tabela '%-.192s'"
 +        rum "Comanda %-.32s interzisa utilizatorului: '%s'@'%s' pentru tabela '%-.192s'"
 +        rus "Команда %-.32s запрещена пользователю '%s'@'%s' для таблицы '%-.192s'"
 +        serbian "%-.32s komanda zabranjena za korisnika '%s'@'%s' za tabelu '%-.192s'"
 +        spa "%-.32s comando negado para usuario: '%s'@'%s' para tabla '%-.192s'"
 +        swe "%-.32s ej tillåtet för '%s'@'%s' för tabell '%-.192s'"
 +        ukr "%-.32s команда заборонена користувачу: '%s'@'%s' у таблиці '%-.192s'"
 +ER_COLUMNACCESS_DENIED_ERROR 42000 
 +        cze "%-.32s příkaz nepřístupný pro uživatele: '%s'@'%s' pro sloupec '%-.192s' v tabulce '%-.192s'"
 +        dan "%-.32s-kommandoen er ikke tilladt for brugeren '%s'@'%s' for kolonne '%-.192s' in tabellen '%-.192s'"
 +        nla "%-.32s commando geweigerd voor gebruiker: '%s'@'%s' voor kolom '%-.192s' in tabel '%-.192s'"
 +        eng "%-.32s command denied to user '%s'@'%s' for column '%-.192s' in table '%-.192s'"
 +        jps "コマンド %-.32s は ユーザー '%s'@'%s'¥n カラム '%-.192s' テーブル '%-.192s' に対して許可されていません",
 +        est "%-.32s käsk ei ole lubatud kasutajale '%s'@'%s' tulbale '%-.192s' tabelis '%-.192s'"
 +        fre "La commande '%-.32s' est interdite à l'utilisateur: '%s'@'%s' sur la colonne '%-.192s' de la table '%-.192s'"
 +        ger "%-.32s Befehl nicht erlaubt für Benutzer '%s'@'%s' und Feld '%-.192s' in Tabelle '%-.192s'"
 +        hun "%-.32s parancs a '%s'@'%s' felhasznalo szamara nem engedelyezett a '%-.192s' mezo eseten a '%-.192s' tablaban"
 +        ita "Comando %-.32s negato per l'utente: '%s'@'%s' sulla colonna '%-.192s' della tabella '%-.192s'"
 +        jpn "コマンド %-.32s は ユーザー '%s'@'%s'\n カラム '%-.192s' テーブル '%-.192s' に対して許可されていません"
 +        kor "'%-.32s' 명령은 다음 사용자에게 거부되었습니다. : '%s'@'%s' for 칼럼 '%-.192s' in 테이블 '%-.192s'"
 +        por "Comando '%-.32s' negado para o usuário '%s'@'%s' na coluna '%-.192s', na tabela '%-.192s'"
 +        rum "Comanda %-.32s interzisa utilizatorului: '%s'@'%s' pentru coloana '%-.192s' in tabela '%-.192s'"
 +        rus "Команда %-.32s запрещена пользователю '%s'@'%s' для столбца '%-.192s' в таблице '%-.192s'"
 +        serbian "%-.32s komanda zabranjena za korisnika '%s'@'%s' za kolonu '%-.192s' iz tabele '%-.192s'"
 +        spa "%-.32s comando negado para usuario: '%s'@'%s' para columna '%-.192s' en la tabla '%-.192s'"
 +        swe "%-.32s ej tillåtet för '%s'@'%s' för kolumn '%-.192s' i tabell '%-.192s'"
 +        ukr "%-.32s команда заборонена користувачу: '%s'@'%s' для стовбця '%-.192s' у таблиці '%-.192s'"
 +ER_ILLEGAL_GRANT_FOR_TABLE 42000 
 +        cze "Neplatný příkaz GRANT/REVOKE. Prosím, přečtěte si v manuálu, jaká privilegia je možné použít."
 +        dan "Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres."
 +        nla "Foutief GRANT/REVOKE commando. Raadpleeg de handleiding welke priveleges gebruikt kunnen worden."
 +        eng "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used"
 +        est "Vigane GRANT/REVOKE käsk. Tutvu kasutajajuhendiga"
 +        fre "Commande GRANT/REVOKE incorrecte. Consultez le manuel."
 +        ger "Unzulässiger GRANT- oder REVOKE-Befehl. Verfügbare Berechtigungen sind im Handbuch aufgeführt"
 +        greek "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used."
 +        hun "Ervenytelen GRANT/REVOKE parancs. Kerem, nezze meg a kezikonyvben, milyen jogok lehetsegesek"
 +        ita "Comando GRANT/REVOKE illegale. Prego consultare il manuale per sapere quali privilegi possono essere usati."
 +        jpn "不正な GRANT/REVOKE コマンドです。どの権限で利用可能かはマニュアルを参照して下さい。"
 +        kor "잘못된 GRANT/REVOKE 명령. 어떤 권리와 승인이 사용되어 질 수 있는지 메뉴얼을 보시오."
 +        nor "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used."
 +        norwegian-ny "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used."
 +        pol "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used."
 +        por "Comando GRANT/REVOKE ilegal. Por favor consulte no manual quais privilégios podem ser usados."
 +        rum "Comanda GRANT/REVOKE ilegala. Consultati manualul in privinta privilegiilor ce pot fi folosite."
 +        rus "Неверная команда GRANT или REVOKE. Обратитесь к документации, чтобы выяснить, какие привилегии можно использовать"
 +        serbian "Pogrešna 'GRANT' odnosno 'REVOKE' komanda. Molim Vas pogledajte u priručniku koje vrednosti mogu biti upotrebljene."
 +        slo "Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used."
 +        spa "Ilegal comando GRANT/REVOKE. Por favor consulte el manual para cuales permisos pueden ser usados."
 +        swe "Felaktigt GRANT-privilegium använt"
 +        ukr "Хибна GRANT/REVOKE команда; прочитайте документацію стосовно того, які права можна використовувати"
 +ER_GRANT_WRONG_HOST_OR_USER 42000 
 +        cze "Argument příkazu GRANT uživatel nebo stroj je příliš dlouhý"
 +        dan "Værts- eller brugernavn for langt til GRANT"
 +        nla "De host of gebruiker parameter voor GRANT is te lang"
 +        eng "The host or user argument to GRANT is too long"
 +        est "Masina või kasutaja nimi GRANT lauses on liiga pikk"
 +        fre "L'hôte ou l'utilisateur donné en argument à GRANT est trop long"
 +        ger "Das Host- oder User-Argument für GRANT ist zu lang"
 +        hun "A host vagy felhasznalo argumentuma tul hosszu a GRANT parancsban"
 +        ita "L'argomento host o utente per la GRANT e` troppo lungo"
 +        jpn "GRANTコマンドへの、ホスト名やユーザー名が長すぎます。"
 +        kor "승인(GRANT)을 위하여 사용한 사용자나 호스트의 값들이 너무 깁니다."
 +        por "Argumento de 'host' ou de usuário para o GRANT é longo demais"
 +        rum "Argumentul host-ului sau utilizatorului pentru GRANT e prea lung"
 +        rus "Слишком длинное имя пользователя/хоста для GRANT"
 +        serbian "Argument 'host' ili 'korisnik' prosleđen komandi 'GRANT' je predugačak"
 +        spa "El argumento para servidor o usuario para GRANT es demasiado grande"
 +        swe "Felaktigt maskinnamn eller användarnamn använt med GRANT"
 +        ukr "Аргумент host або user для GRANT задовгий"
 +ER_NO_SUCH_TABLE 42S02 
 +        cze "Tabulka '%-.192s.%-.192s' neexistuje"
 +        dan "Tabellen '%-.192s.%-.192s' eksisterer ikke"
 +        nla "Tabel '%-.192s.%-.192s' bestaat niet"
 +        eng "Table '%-.192s.%-.192s' doesn't exist"
 +        est "Tabelit '%-.192s.%-.192s' ei eksisteeri"
 +        fre "La table '%-.192s.%-.192s' n'existe pas"
 +        ger "Tabelle '%-.192s.%-.192s' existiert nicht"
 +        hun "A '%-.192s.%-.192s' tabla nem letezik"
 +        ita "La tabella '%-.192s.%-.192s' non esiste"
 +        jpn "表 '%-.192s.%-.192s' は存在しません。"
 +        kor "테이블 '%-.192s.%-.192s' 는 존재하지 않습니다."
 +        nor "Table '%-.192s.%-.192s' doesn't exist"
 +        norwegian-ny "Table '%-.192s.%-.192s' doesn't exist"
 +        pol "Table '%-.192s.%-.192s' doesn't exist"
 +        por "Tabela '%-.192s.%-.192s' não existe"
 +        rum "Tabela '%-.192s.%-.192s' nu exista"
 +        rus "Таблица '%-.192s.%-.192s' не существует"
 +        serbian "Tabela '%-.192s.%-.192s' ne postoji"
 +        slo "Table '%-.192s.%-.192s' doesn't exist"
 +        spa "Tabla '%-.192s.%-.192s' no existe"
 +        swe "Det finns ingen tabell som heter '%-.192s.%-.192s'"
 +        ukr "Таблиця '%-.192s.%-.192s' не існує"
 +ER_NONEXISTING_TABLE_GRANT 42000 
 +        cze "Neexistuje odpovídající grant pro uživatele '%-.48s' na stroji '%-.64s' pro tabulku '%-.192s'"
 +        dan "Denne tilladelse eksisterer ikke for brugeren '%-.48s' på vært '%-.64s' for tabellen '%-.192s'"
 +        nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s' op tabel '%-.192s'"
 +        eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on table '%-.192s'"
 +        est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s' tabelile '%-.192s'"
 +        fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s' sur la table '%-.192s'"
 +        ger "Eine solche Berechtigung ist für User '%-.48s' auf Host '%-.64s' an Tabelle '%-.192s' nicht definiert"
 +        hun "A '%-.48s' felhasznalo szamara a '%-.64s' host '%-.192s' tablajaban ez a parancs nem engedelyezett"
 +        ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s' sulla tabella '%-.192s'"
 +        jpn "ユーザー '%-.48s' (ホスト '%-.64s' 上) の表 '%-.192s' への権限は定義されていません。"
 +        kor "사용자 '%-.48s'(호스트 '%-.64s')는 테이블 '%-.192s'를 사용하기 위하여 정의된 승인은 없습니다. "
 +        por "Não existe tal permissão (grant) definido para o usuário '%-.48s' no 'host' '%-.64s', na tabela '%-.192s'"
 +        rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.48s' de pe host-ul '%-.64s' pentru tabela '%-.192s'"
 +        rus "Такие права не определены для пользователя '%-.48s' на компьютере '%-.64s' для таблицы '%-.192s'"
 +        serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s' tabeli '%-.192s'"
 +        spa "No existe tal permiso definido para usuario '%-.48s' en el servidor '%-.64s' en la tabla '%-.192s'"
 +        swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s' för tabell '%-.192s'"
 +        ukr "Повноважень не визначено для користувача '%-.48s' з хосту '%-.64s' для таблиці '%-.192s'"
 +ER_NOT_ALLOWED_COMMAND 42000 
 +        cze "Použitý příkaz není v této verzi MySQL povolen"
 +        dan "Den brugte kommando er ikke tilladt med denne udgave af MariaDB"
 +        nla "Het used commando is niet toegestaan in deze MariaDB versie"
 +        eng "The used command is not allowed with this MariaDB version"
 +        est "Antud käsk ei ole lubatud käesolevas MariaDB versioonis"
 +        fre "Cette commande n'existe pas dans cette version de MariaDB"
 +        ger "Der verwendete Befehl ist in dieser MariaDB-Version nicht zulässig"
 +        hun "A hasznalt parancs nem engedelyezett ebben a MariaDB verzioban"
 +        ita "Il comando utilizzato non e` supportato in questa versione di MariaDB"
 +        jpn "このMySQLバージョンでは利用できないコマンドです。"
 +        kor "사용된 명령은 현재의 MariaDB 버젼에서는 이용되지 않습니다."
 +        por "Comando usado não é permitido para esta versão do MariaDB"
 +        rum "Comanda folosita nu este permisa pentru aceasta versiune de MariaDB"
 +        rus "Эта команда не допускается в данной  версии MariaDB"
 +        serbian "Upotrebljena komanda nije dozvoljena sa ovom verzijom MariaDB servera"
 +        spa "El comando usado no es permitido con esta versión de MariaDB"
 +        swe "Du kan inte använda detta kommando med denna MariaDB version"
 +        ukr "Використовувана команда не дозволена у цій версії MariaDB"
 +ER_SYNTAX_ERROR 42000 
 +        cze "Vaše syntaxe je nějaká divná"
 +        dan "Der er en fejl i SQL syntaksen"
 +        nla "Er is iets fout in de gebruikte syntax"
 +        eng "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use"
 +        est "Viga SQL süntaksis"
 +        fre "Erreur de syntaxe"
 +        ger "Fehler in der SQL-Syntax. Bitte die korrekte Syntax im Handbuch nachschlagen"
 +        greek "You have an error in your SQL syntax"
 +        hun "Szintaktikai hiba"
 +        ita "Errore di sintassi nella query SQL"
 +        jpn "SQL構文エラーです。バージョンに対応するマニュアルを参照して正しい構文を確認してください。"
 +        kor "SQL 구문에 오류가 있습니다."
 +        nor "Something is wrong in your syntax"
 +        norwegian-ny "Something is wrong in your syntax"
 +        pol "Something is wrong in your syntax"
 +        por "Você tem um erro de sintaxe no seu SQL"
 +        rum "Aveti o eroare in sintaxa RSQL"
 +        rus "У вас ошибка в запросе. Изучите документацию по используемой версии MariaDB на предмет корректного синтаксиса"
 +        serbian "Imate grešku u vašoj SQL sintaksi"
 +        slo "Something is wrong in your syntax"
 +        spa "Algo está equivocado en su sintax"
 +        swe "Du har något fel i din syntax"
 +        ukr "У вас помилка у синтаксисі SQL"
 +ER_DELAYED_CANT_CHANGE_LOCK  
 +        cze "Zpožděný insert threadu nebyl schopen získat požadovaný zámek pro tabulku %-.192s"
 +        dan "Forsinket indsættelse tråden (delayed insert thread) kunne ikke opnå lås på tabellen %-.192s"
 +        nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.192s"
 +        eng "Delayed insert thread couldn't get requested lock for table %-.192s"
 +        est "INSERT DELAYED lõim ei suutnud saada soovitud lukku tabelile %-.192s"
 +        fre "La tâche 'delayed insert' n'a pas pu obtenir le verrou démandé sur la table %-.192s"
 +        ger "Verzögerter (DELAYED) Einfüge-Thread konnte die angeforderte Sperre für Tabelle '%-.192s' nicht erhalten"
 +        hun "A kesleltetett beillesztes (delayed insert) thread nem kapott zatolast a %-.192s tablahoz"
 +        ita "Il thread di inserimento ritardato non riesce ad ottenere il lock per la tabella %-.192s"
 +        jpn "'Delayed insert'スレッドが表 '%-.192s' のロックを取得できませんでした。"
 +        kor "지연된 insert 쓰레드가 테이블 %-.192s의 요구된 락킹을 처리할 수 없었습니다."
 +        por "'Thread' de inserção retardada (atrasada) pois não conseguiu obter a trava solicitada para tabela '%-.192s'"
 +        rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.192s"
 +        rus "Поток, обслуживающий отложенную вставку (delayed insert), не смог получить запрашиваемую блокировку на таблицу %-.192s"
 +        serbian "Prolongirani 'INSERT' thread nije mogao da dobije traženo zaključavanje tabele '%-.192s'"
 +        spa "Thread de inserción retarda no pudiendo bloquear para la tabla %-.192s"
 +        swe "DELAYED INSERT-tråden kunde inte låsa tabell '%-.192s'"
 +        ukr "Гілка для INSERT DELAYED не може отримати блокування для таблиці %-.192s"
 +ER_TOO_MANY_DELAYED_THREADS  
 +        cze "Příliš mnoho zpožděných threadů"
 +        dan "For mange slettede tråde (threads) i brug"
 +        nla "Te veel 'delayed' threads in gebruik"
 +        eng "Too many delayed threads in use"
 +        est "Liiga palju DELAYED lõimesid kasutusel"
 +        fre "Trop de tâche 'delayed' en cours"
 +        ger "Zu viele verzögerte (DELAYED) Threads in Verwendung"
 +        hun "Tul sok kesletetett thread (delayed)"
 +        ita "Troppi threads ritardati in uso"
 +        jpn "'Delayed insert'スレッドが多すぎます。"
 +        kor "너무 많은 지연 쓰레드를 사용하고 있습니다."
 +        por "Excesso de 'threads' retardadas (atrasadas) em uso"
 +        rum "Prea multe threaduri aminate care sint in uz"
 +        rus "Слишком много потоков, обслуживающих отложенную вставку (delayed insert)"
 +        serbian "Previše prolongiranih thread-ova je u upotrebi"
 +        spa "Muchos threads retardados en uso"
 +        swe "Det finns redan 'max_delayed_threads' trådar i använding"
 +        ukr "Забагато затриманих гілок використовується"
 +ER_ABORTING_CONNECTION 08S01 
 +        cze "Zrušeno spojení %ld do databáze: '%-.192s' uživatel: '%-.48s' (%-.64s)"
 +        dan "Afbrudt forbindelse %ld til database: '%-.192s' bruger: '%-.48s' (%-.64s)"
 +        nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' (%-.64s)"
 +        eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
 +        est "Ühendus katkestatud %ld andmebaasile: '%-.192s' kasutajale: '%-.48s' (%-.64s)"
 +        fre "Connection %ld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' (%-.64s)"
 +        ger "Abbruch der Verbindung %ld zur Datenbank '%-.192s'. Benutzer: '%-.48s' (%-.64s)"
 +        hun "Megszakitott kapcsolat %ld db: '%-.192s' adatbazishoz, felhasznalo: '%-.48s' (%-.64s)"
 +        ita "Interrotta la connessione %ld al db: '%-.192s' utente: '%-.48s' (%-.64s)"
 +        jpn "接続 %ld が中断されました。データベース: '%-.192s' ユーザー: '%-.48s' (%-.64s)"
 +        kor "데이타베이스 접속을 위한 연결 %ld가 중단됨 : '%-.192s' 사용자: '%-.48s' (%-.64s)"
 +        nor "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
 +        norwegian-ny "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
 +        pol "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
 +        por "Conexão %ld abortou para o banco de dados '%-.192s' - usuário '%-.48s' (%-.64s)"
 +        rum "Conectie terminata %ld la baza de date: '%-.192s' utilizator: '%-.48s' (%-.64s)"
 +        rus "Прервано соединение %ld к базе данных '%-.192s' пользователя '%-.48s' (%-.64s)"
 +        serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' (%-.64s)"
 +        slo "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)"
 +        spa "Conexión abortada %ld para db: '%-.192s' usuario: '%-.48s' (%-.64s)"
 +        swe "Avbröt länken för tråd %ld till db '%-.192s', användare '%-.48s' (%-.64s)"
 +        ukr "Перервано з'єднання %ld до бази данних: '%-.192s' користувача: '%-.48s' (%-.64s)"
 +ER_NET_PACKET_TOO_LARGE 08S01 
 +        cze "Zjištěn příchozí packet delší než 'max_allowed_packet'"
 +        dan "Modtog en datapakke som var større end 'max_allowed_packet'"
 +        nla "Groter pakket ontvangen dan 'max_allowed_packet'"
 +        eng "Got a packet bigger than 'max_allowed_packet' bytes"
 +        est "Saabus suurem pakett kui lubatud 'max_allowed_packet' muutujaga"
 +        fre "Paquet plus grand que 'max_allowed_packet' reçu"
 +        ger "Empfangenes Paket ist größer als 'max_allowed_packet' Bytes"
 +        hun "A kapott csomag nagyobb, mint a maximalisan engedelyezett: 'max_allowed_packet'"
 +        ita "Ricevuto un pacchetto piu` grande di 'max_allowed_packet'"
 +        jpn "'max_allowed_packet'よりも大きなパケットを受信しました。"
 +        kor "'max_allowed_packet'보다 더큰 패킷을 받았습니다."
 +        por "Obteve um pacote maior do que a taxa máxima de pacotes definida (max_allowed_packet)"
 +        rum "Un packet mai mare decit 'max_allowed_packet' a fost primit"
 +        rus "Полученный пакет больше, чем 'max_allowed_packet'"
 +        serbian "Primio sam mrežni paket veći od definisane vrednosti 'max_allowed_packet'"
 +        spa "Obtenido un paquete mayor que 'max_allowed_packet'"
 +        swe "Kommunkationspaketet är större än 'max_allowed_packet'"
 +        ukr "Отримано пакет більший ніж max_allowed_packet"
 +ER_NET_READ_ERROR_FROM_PIPE 08S01 
 +        cze "Zjištěna chyba při čtení z roury spojení"
 +        dan "Fik læsefejl fra forbindelse (connection pipe)"
 +        nla "Kreeg leesfout van de verbindings pipe"
 +        eng "Got a read error from the connection pipe"
 +        est "Viga ühendustoru lugemisel"
 +        fre "Erreur de lecture reçue du pipe de connexion"
 +        ger "Lese-Fehler bei einer Verbindungs-Pipe"
 +        hun "Olvasasi hiba a kapcsolat soran"
 +        ita "Rilevato un errore di lettura dalla pipe di connessione"
 +        jpn "接続パイプの読み込みエラーです。"
 +        kor "연결 파이프로부터 에러가 발생하였습니다."
 +        por "Obteve um erro de leitura no 'pipe' da conexão"
 +        rum "Eroare la citire din cauza lui 'connection pipe'"
 +        rus "Получена ошибка чтения от потока соединения (connection pipe)"
 +        serbian "Greška pri čitanju podataka sa pipe-a"
 +        spa "Obtenido un error de lectura de la conexión pipe"
 +        swe "Fick läsfel från klienten vid läsning från 'PIPE'"
 +        ukr "Отримано помилку читання з комунікаційного каналу"
 +ER_NET_FCNTL_ERROR 08S01 
 +        cze "Zjištěna chyba fcntl()"
 +        dan "Fik fejlmeddelelse fra fcntl()"
 +        nla "Kreeg fout van fcntl()"
 +        eng "Got an error from fcntl()"
 +        est "fcntl() tagastas vea"
 +        fre "Erreur reçue de fcntl() "
 +        ger "fcntl() lieferte einen Fehler"
 +        hun "Hiba a fcntl() fuggvenyben"
 +        ita "Rilevato un errore da fcntl()"
 +        jpn "fcntl()がエラーを返しました。"
 +        kor "fcntl() 함수로부터 에러가 발생하였습니다."
 +        por "Obteve um erro em fcntl()"
 +        rum "Eroare obtinuta de la fcntl()"
 +        rus "Получена ошибка от fcntl()"
 +        serbian "Greška pri izvršavanju funkcije fcntl()"
 +        spa "Obtenido un error de fcntl()"
 +        swe "Fick fatalt fel från 'fcntl()'"
 +        ukr "Отримано помилкку від fcntl()"
 +ER_NET_PACKETS_OUT_OF_ORDER 08S01 
 +        cze "Příchozí packety v chybném pořadí"
 +        dan "Modtog ikke datapakker i korrekt rækkefølge"
 +        nla "Pakketten in verkeerde volgorde ontvangen"
 +        eng "Got packets out of order"
 +        est "Paketid saabusid vales järjekorras"
 +        fre "Paquets reçus dans le désordre"
 +        ger "Pakete nicht in der richtigen Reihenfolge empfangen"
 +        hun "Helytelen sorrendben erkezett adatcsomagok"
 +        ita "Ricevuti pacchetti non in ordine"
 +        jpn "不正な順序のパケットを受信しました。"
 +        kor "순서가 맞지않는 패킷을 받았습니다."
 +        por "Obteve pacotes fora de ordem"
 +        rum "Packets care nu sint ordonati au fost gasiti"
 +        rus "Пакеты получены в неверном порядке"
 +        serbian "Primio sam mrežne pakete van reda"
 +        spa "Obtenido paquetes desordenados"
 +        swe "Kommunikationspaketen kom i fel ordning"
 +        ukr "Отримано пакети у неналежному порядку"
 +ER_NET_UNCOMPRESS_ERROR 08S01 
 +        cze "Nemohu rozkomprimovat komunikační packet"
 +        dan "Kunne ikke dekomprimere kommunikations-pakke (communication packet)"
 +        nla "Communicatiepakket kon niet worden gedecomprimeerd"
 +        eng "Couldn't uncompress communication packet"
 +        est "Viga andmepaketi lahtipakkimisel"
 +        fre "Impossible de décompresser le paquet reçu"
 +        ger "Kommunikationspaket lässt sich nicht entpacken"
 +        hun "A kommunikacios adatcsomagok nem tomorithetok ki"
 +        ita "Impossibile scompattare i pacchetti di comunicazione"
 +        jpn "圧縮パケットの展開ができませんでした。"
 +        kor "통신 패킷의 압축해제를 할 수 없었습니다."
 +        por "Não conseguiu descomprimir pacote de comunicação"
 +        rum "Nu s-a putut decompresa pachetul de comunicatie (communication packet)"
 +        rus "Невозможно распаковать пакет, полученный через коммуникационный протокол"
 +        serbian "Ne mogu da dekompresujem mrežne pakete"
 +        spa "No puedo descomprimir paquetes de comunicación"
 +        swe "Kunde inte packa up kommunikationspaketet"
 +        ukr "Не можу декомпресувати комунікаційний пакет"
 +ER_NET_READ_ERROR 08S01 
 +        cze "Zjištěna chyba při čtení komunikačního packetu"
 +        dan "Fik fejlmeddelelse ved læsning af kommunikations-pakker (communication packets)"
 +        nla "Fout bij het lezen van communicatiepakketten"
 +        eng "Got an error reading communication packets"
 +        est "Viga andmepaketi lugemisel"
 +        fre "Erreur de lecture des paquets reçus"
 +        ger "Fehler beim Lesen eines Kommunikationspakets"
 +        hun "HIba a kommunikacios adatcsomagok olvasasa soran"
 +        ita "Rilevato un errore ricevendo i pacchetti di comunicazione"
 +        jpn "パケットの受信でエラーが発生しました。"
 +        kor "통신 패킷을 읽는 중 오류가 발생하였습니다."
 +        por "Obteve um erro na leitura de pacotes de comunicação"
 +        rum "Eroare obtinuta citind pachetele de comunicatie (communication packets)"
 +        rus "Получена ошибка в процессе получения пакета через коммуникационный протокол "
 +        serbian "Greška pri primanju mrežnih paketa"
 +        spa "Obtenido un error leyendo paquetes de comunicación"
 +        swe "Fick ett fel vid läsning från klienten"
 +        ukr "Отримано помилку читання комунікаційних пакетів"
 +ER_NET_READ_INTERRUPTED 08S01 
 +        cze "Zjištěn timeout při čtení komunikačního packetu"
 +        dan "Timeout-fejl ved læsning af kommunukations-pakker (communication packets)"
 +        nla "Timeout bij het lezen van communicatiepakketten"
 +        eng "Got timeout reading communication packets"
 +        est "Kontrollaja ületamine andmepakettide lugemisel"
 +        fre "Timeout en lecture des paquets reçus"
 +        ger "Zeitüberschreitung beim Lesen eines Kommunikationspakets"
 +        hun "Idotullepes a kommunikacios adatcsomagok olvasasa soran"
 +        ita "Rilevato un timeout ricevendo i pacchetti di comunicazione"
 +        jpn "パケットの受信でタイムアウトが発生しました。"
 +        kor "통신 패킷을 읽는 중 timeout이 발생하였습니다."
 +        por "Obteve expiração de tempo (timeout) na leitura de pacotes de comunicação"
 +        rum "Timeout obtinut citind pachetele de comunicatie (communication packets)"
 +        rus "Получен таймаут ожидания пакета через коммуникационный протокол "
 +        serbian "Vremenski limit za čitanje mrežnih paketa je istekao"
 +        spa "Obtenido timeout leyendo paquetes de comunicación"
 +        swe "Fick 'timeout' vid läsning från klienten"
 +        ukr "Отримано затримку читання комунікаційних пакетів"
 +ER_NET_ERROR_ON_WRITE 08S01 
 +        cze "Zjištěna chyba při zápisu komunikačního packetu"
 +        dan "Fik fejlmeddelelse ved skrivning af kommunukations-pakker (communication packets)"
 +        nla "Fout bij het schrijven van communicatiepakketten"
 +        eng "Got an error writing communication packets"
 +        est "Viga andmepaketi kirjutamisel"
 +        fre "Erreur d'écriture des paquets envoyés"
 +        ger "Fehler beim Schreiben eines Kommunikationspakets"
 +        hun "Hiba a kommunikacios csomagok irasa soran"
 +        ita "Rilevato un errore inviando i pacchetti di comunicazione"
 +        jpn "パケットの送信でエラーが発生しました。"
 +        kor "통신 패킷을 기록하는 중 오류가 발생하였습니다."
 +        por "Obteve um erro na escrita de pacotes de comunicação"
 +        rum "Eroare in scrierea pachetelor de comunicatie (communication packets)"
 +        rus "Получена ошибка при передаче пакета через коммуникационный протокол "
 +        serbian "Greška pri slanju mrežnih paketa"
 +        spa "Obtenido un error de escribiendo paquetes de comunicación"
 +        swe "Fick ett fel vid skrivning till klienten"
 +        ukr "Отримано помилку запису комунікаційних пакетів"
 +ER_NET_WRITE_INTERRUPTED 08S01 
 +        cze "Zjištěn timeout při zápisu komunikačního packetu"
 +        dan "Timeout-fejl ved skrivning af kommunukations-pakker (communication packets)"
 +        nla "Timeout bij het schrijven van communicatiepakketten"
 +        eng "Got timeout writing communication packets"
 +        est "Kontrollaja ületamine andmepakettide kirjutamisel"
 +        fre "Timeout d'écriture des paquets envoyés"
 +        ger "Zeitüberschreitung beim Schreiben eines Kommunikationspakets"
 +        hun "Idotullepes a kommunikacios csomagok irasa soran"
 +        ita "Rilevato un timeout inviando i pacchetti di comunicazione"
 +        jpn "パケットの送信でタイムアウトが発生しました。"
 +        kor "통신 패팃을 기록하는 중 timeout이 발생하였습니다."
 +        por "Obteve expiração de tempo ('timeout') na escrita de pacotes de comunicação"
 +        rum "Timeout obtinut scriind pachetele de comunicatie (communication packets)"
 +        rus "Получен таймаут в процессе передачи пакета через коммуникационный протокол "
 +        serbian "Vremenski limit za slanje mrežnih paketa je istekao"
 +        spa "Obtenido timeout escribiendo paquetes de comunicación"
 +        swe "Fick 'timeout' vid skrivning till klienten"
 +        ukr "Отримано затримку запису комунікаційних пакетів"
 +ER_TOO_LONG_STRING 42000 
 +        cze "Výsledný řetězec je delší než 'max_allowed_packet'"
 +        dan "Strengen med resultater er større end 'max_allowed_packet'"
 +        nla "Resultaat string is langer dan 'max_allowed_packet'"
 +        eng "Result string is longer than 'max_allowed_packet' bytes"
 +        est "Tulemus on pikem kui lubatud 'max_allowed_packet' muutujaga"
 +        fre "La chaîne résultat est plus grande que 'max_allowed_packet'"
 +        ger "Ergebnis-String ist länger als 'max_allowed_packet' Bytes"
 +        hun "Ez eredmeny sztring nagyobb, mint a lehetseges maximum: 'max_allowed_packet'"
 +        ita "La stringa di risposta e` piu` lunga di 'max_allowed_packet'"
 +        jpn "結果の文字列が 'max_allowed_packet' よりも大きいです。"
 +        por "'String' resultante é mais longa do que 'max_allowed_packet'"
 +        rum "Sirul rezultat este mai lung decit 'max_allowed_packet'"
 +        rus "Результирующая строка больше, чем 'max_allowed_packet'"
 +        serbian "Rezultujuči string je duži nego što to dozvoljava parametar servera 'max_allowed_packet'"
 +        spa "La string resultante es mayor que max_allowed_packet"
 +        swe "Resultatsträngen är längre än max_allowed_packet"
 +        ukr "Строка результату довша ніж max_allowed_packet"
 +ER_TABLE_CANT_HANDLE_BLOB 42000 
 +        cze "Typ použité tabulky (%s) nepodporuje BLOB/TEXT sloupce"
 +        dan "Denne tabeltype (%s) understøtter ikke brug af BLOB og TEXT kolonner"
 +        nla "Het gebruikte tabel type (%s) ondersteunt geen BLOB/TEXT kolommen"
 +        eng "Storage engine %s doesn't support BLOB/TEXT columns"
 +        est "Valitud tabelitüüp (%s) ei toeta BLOB/TEXT tüüpi välju"
 +        fre "Ce type de table (%s) ne supporte pas les colonnes BLOB/TEXT"
 +        ger "Der verwendete Tabellentyp (%s) unterstützt keine BLOB- und TEXT-Felder"
 +        hun "A hasznalt tabla tipus (%s) nem tamogatja a BLOB/TEXT mezoket"
 +        ita "Il tipo di tabella usata (%s) non supporta colonne di tipo BLOB/TEXT"
 +        por "Tipo de tabela usado (%s) não permite colunas BLOB/TEXT"
 +        rum "Tipul de tabela folosit (%s) nu suporta coloane de tip BLOB/TEXT"
 +        rus "%s таблицы не поддерживают типы BLOB/TEXT"
 +        serbian "Iskorišteni tip tabele (%s) ne podržava kolone tipa 'BLOB' odnosno 'TEXT'"
 +        spa "El tipo de tabla usada (%s) no permite soporte para columnas BLOB/TEXT"
 +        swe "Den använda tabelltypen (%s) kan inte hantera BLOB/TEXT-kolumner"
 +        ukr "%s таблиці не підтримують BLOB/TEXT стовбці"
 +ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000 
 +        cze "Typ použité tabulky (%s) nepodporuje AUTO_INCREMENT sloupce"
 +        dan "Denne tabeltype understøtter (%s) ikke brug af AUTO_INCREMENT kolonner"
 +        nla "Het gebruikte tabel type (%s) ondersteunt geen AUTO_INCREMENT kolommen"
 +        eng "Storage engine %s doesn't support AUTO_INCREMENT columns"
 +        est "Valitud tabelitüüp (%s) ei toeta AUTO_INCREMENT tüüpi välju"
 +        fre "Ce type de table (%s) ne supporte pas les colonnes AUTO_INCREMENT"
 +        ger "Der verwendete Tabellentyp (%s) unterstützt keine AUTO_INCREMENT-Felder"
 +        hun "A hasznalt tabla tipus (%s) nem tamogatja az AUTO_INCREMENT tipusu mezoket"
 +        ita "Il tipo di tabella usata (%s) non supporta colonne di tipo AUTO_INCREMENT"
 +        por "Tipo de tabela usado (%s) não permite colunas AUTO_INCREMENT"
 +        rum "Tipul de tabela folosit (%s) nu suporta coloane de tip AUTO_INCREMENT"
 +        rus "%s таблицы не поддерживают автоинкрементные столбцы"
 +        serbian "Iskorišteni tip tabele (%s) ne podržava kolone tipa 'AUTO_INCREMENT'"
 +        spa "El tipo de tabla usada (%s) no permite soporte para columnas AUTO_INCREMENT"
 +        swe "Den använda tabelltypen (%s) kan inte hantera AUTO_INCREMENT-kolumner"
 +        ukr "%s таблиці не підтримують AUTO_INCREMENT стовбці"
 +ER_DELAYED_INSERT_TABLE_LOCKED  
 +        cze "INSERT DELAYED není možno s tabulkou '%-.192s' použít, protože je zamčená pomocí LOCK TABLES"
 +        dan "INSERT DELAYED kan ikke bruges med tabellen '%-.192s', fordi tabellen er låst med LOCK TABLES"
 +        nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.192s', vanwege een 'lock met LOCK TABLES"
 +        eng "INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES"
 +        est "INSERT DELAYED ei saa kasutada tabeli '%-.192s' peal, kuna see on lukustatud LOCK TABLES käsuga"
 +        fre "INSERT DELAYED ne peut être utilisé avec la table '%-.192s', car elle est verrouée avec LOCK TABLES"
 +        ger "INSERT DELAYED kann für Tabelle '%-.192s' nicht verwendet werden, da sie mit LOCK TABLES gesperrt ist"
 +        greek "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
 +        hun "Az INSERT DELAYED nem hasznalhato a '%-.192s' tablahoz, mert a tabla zarolt (LOCK TABLES)"
 +        ita "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.192s', perche` soggetta a lock da 'LOCK TABLES'"
 +        jpn "表 '%-.192s' はLOCK TABLESでロックされているため、INSERT DELAYEDを使用できません。"
 +        kor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
 +        nor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
 +        norwegian-ny "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
 +        pol "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
 +        por "INSERT DELAYED não pode ser usado com a tabela '%-.192s', porque ela está travada com LOCK TABLES"
 +        rum "INSERT DELAYED nu poate fi folosit cu tabela '%-.192s', deoarece este locked folosing LOCK TABLES"
 +        rus "Нельзя использовать INSERT DELAYED для таблицы '%-.192s', потому что она заблокирована с помощью LOCK TABLES"
 +        serbian "Komanda 'INSERT DELAYED' ne može biti iskorištena u tabeli '%-.192s', zbog toga što je zaključana komandom 'LOCK TABLES'"
 +        slo "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES"
 +        spa "INSERT DELAYED no puede ser usado con tablas '%-.192s', porque esta bloqueada con LOCK TABLES"
 +        swe "INSERT DELAYED kan inte användas med tabell '%-.192s', emedan den är låst med LOCK TABLES"
 +        ukr "INSERT DELAYED не може бути використано з таблицею '%-.192s', тому що її заблоковано з LOCK TABLES"
 +ER_WRONG_COLUMN_NAME 42000 
 +        cze "Nesprávné jméno sloupce '%-.100s'"
 +        dan "Forkert kolonnenavn '%-.100s'"
 +        nla "Incorrecte kolom naam '%-.100s'"
 +        eng "Incorrect column name '%-.100s'"
 +        est "Vigane tulba nimi '%-.100s'"
 +        fre "Nom de colonne '%-.100s' incorrect"
 +        ger "Falscher Spaltenname '%-.100s'"
 +        hun "Ervenytelen mezonev: '%-.100s'"
 +        ita "Nome colonna '%-.100s' non corretto"
 +        jpn "列名 '%-.100s' は不正です。"
 +        por "Nome de coluna '%-.100s' incorreto"
 +        rum "Nume increct de coloana '%-.100s'"
 +        rus "Неверное имя столбца '%-.100s'"
 +        serbian "Pogrešno ime kolone '%-.100s'"
 +        spa "Incorrecto nombre de columna '%-.100s'"
 +        swe "Felaktigt kolumnnamn '%-.100s'"
 +        ukr "Невірне ім'я стовбця '%-.100s'"
 +ER_WRONG_KEY_COLUMN 42000 
 +        eng "The storage engine %s can't index column %`s"
 +        ger "Die Speicher-Engine %s kann die Spalte %`s nicht indizieren"
 +        rus "Обработчик таблиц %s не может проиндексировать столбец %`s"
 +        ukr "Вказівник таблиц %s не може індексувати стовбець %`s"
 +ER_WRONG_MRG_TABLE  
 +        cze "Všechny tabulky v MERGE tabulce nejsou definovány stejně"
 +        dan "Tabellerne i MERGE er ikke defineret ens"
 +        nla "Niet alle tabellen in de MERGE tabel hebben identieke gedefinities"
 +        eng "Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist"
 +        est "Kõik tabelid MERGE tabeli määratluses ei ole identsed"
 +        fre "Toutes les tables de la table de type MERGE n'ont pas la même définition"
 +        ger "Nicht alle Tabellen in der MERGE-Tabelle sind gleich definiert"
 +        hun "A MERGE tablaban talalhato tablak definicioja nem azonos"
 +        ita "Non tutte le tabelle nella tabella di MERGE sono definite in maniera identica"
 +        jpn "MERGE表の構成表がオープンできません。列定義が異なるか、MyISAM表ではないか、存在しません。"
 +        kor "All tables in the MERGE table are not defined identically"
 +        nor "All tables in the MERGE table are not defined identically"
 +        norwegian-ny "All tables in the MERGE table are not defined identically"
 +        pol "All tables in the MERGE table are not defined identically"
 +        por "Todas as tabelas contidas na tabela fundida (MERGE) não estão definidas identicamente"
 +        rum "Toate tabelele din tabela MERGE nu sint definite identic"
 +        rus "Не все таблицы в MERGE определены одинаково"
 +        serbian "Tabele iskorištene u 'MERGE' tabeli nisu definisane na isti način"
 +        slo "All tables in the MERGE table are not defined identically"
 +        spa "Todas las tablas en la MERGE tabla no estan definidas identicamente"
 +        swe "Tabellerna i MERGE-tabellen är inte identiskt definierade"
 +        ukr "Таблиці у MERGE TABLE мають різну структуру"
 +ER_DUP_UNIQUE 23000 
 +        cze "Kvůli unique constraintu nemozu zapsat do tabulky '%-.192s'"
 +        dan "Kan ikke skrive til tabellen '%-.192s' fordi det vil bryde CONSTRAINT regler"
 +        nla "Kan niet opslaan naar table '%-.192s' vanwege 'unique' beperking"
 +        eng "Can't write, because of unique constraint, to table '%-.192s'"
 +        est "Ei suuda kirjutada tabelisse '%-.192s', kuna see rikub ühesuse kitsendust"
 +        fre "Écriture impossible à cause d'un index UNIQUE sur la table '%-.192s'"
 +        ger "Schreiben in Tabelle '%-.192s' nicht möglich wegen einer Eindeutigkeitsbeschränkung (unique constraint)"
 +        hun "A '%-.192s' nem irhato, az egyedi mezok miatt"
 +        jpn "一意性制約違反のため、表 '%-.192s' に書き込めません。"
 +        ita "Impossibile scrivere nella tabella '%-.192s' per limitazione di unicita`"
 +        por "Não pode gravar, devido à restrição UNIQUE, na tabela '%-.192s'"
 +        rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.192s'"
 +        rus "Невозможно записать в таблицу '%-.192s' из-за ограничений уникального ключа"
 +        serbian "Zbog provere jedinstvenosti ne mogu da upišem podatke u tabelu '%-.192s'"
 +        spa "No puedo escribir, debido al único constraint, para tabla '%-.192s'"
 +        swe "Kan inte skriva till tabell '%-.192s'; UNIQUE-test"
 +        ukr "Не можу записати до таблиці '%-.192s', з причини вимог унікальності"
 +ER_BLOB_KEY_WITHOUT_LENGTH 42000 
 +        cze "BLOB sloupec '%-.192s' je použit ve specifikaci klíče bez délky"
 +        dan "BLOB kolonnen '%-.192s' brugt i nøglespecifikation uden nøglelængde"
 +        nla "BLOB kolom '%-.192s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte"
 +        eng "BLOB/TEXT column '%-.192s' used in key specification without a key length"
 +        est "BLOB-tüüpi tulp '%-.192s' on kasutusel võtmes ilma pikkust määratlemata"
 +        fre "La colonne '%-.192s' de type BLOB est utilisée dans une définition d'index sans longueur d'index"
 +        ger "BLOB- oder TEXT-Spalte '%-.192s' wird in der Schlüsseldefinition ohne Schlüssellängenangabe verwendet"
 +        greek "BLOB column '%-.192s' used in key specification without a key length"
 +        hun "BLOB mezo '%-.192s' hasznalt a mezo specifikacioban, a mezohossz megadasa nelkul"
 +        ita "La colonna '%-.192s' di tipo BLOB e` usata in una chiave senza specificarne la lunghezza"
 +        jpn "BLOB列 '%-.192s' をキーに使用するには長さ指定が必要です。"
 +        kor "BLOB column '%-.192s' used in key specification without a key length"
 +        nor "BLOB column '%-.192s' used in key specification without a key length"
 +        norwegian-ny "BLOB column '%-.192s' used in key specification without a key length"
 +        pol "BLOB column '%-.192s' used in key specification without a key length"
 +        por "Coluna BLOB '%-.192s' usada na especificação de chave sem o comprimento da chave"
 +        rum "Coloana BLOB '%-.192s' este folosita in specificarea unei chei fara ca o lungime de cheie sa fie folosita"
 +        rus "Столбец типа BLOB '%-.192s' был указан в определении ключа без указания длины ключа"
 +        serbian "BLOB kolona '%-.192s' je upotrebljena u specifikaciji ključa bez navođenja dužine ključa"
 +        slo "BLOB column '%-.192s' used in key specification without a key length"
 +        spa "Columna BLOB column '%-.192s' usada en especificación de clave sin tamaño de la clave"
 +        swe "Du har inte angett någon nyckellängd för BLOB '%-.192s'"
 +        ukr "Стовбець BLOB '%-.192s' використано у визначенні ключа без вказання довжини ключа"
 +ER_PRIMARY_CANT_HAVE_NULL 42000 
 +        cze "Všechny části primárního klíče musejí být NOT NULL; pokud potřebujete NULL, použijte UNIQUE"
 +        dan "Alle dele af en PRIMARY KEY skal være NOT NULL;  Hvis du skal bruge NULL i nøglen, brug UNIQUE istedet"
 +        nla "Alle delen van een PRIMARY KEY moeten NOT NULL zijn; Indien u NULL in een zoeksleutel nodig heeft kunt u UNIQUE gebruiken"
 +        eng "All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead"
 +        est "Kõik PRIMARY KEY peavad olema määratletud NOT NULL piiranguga; vajadusel kasuta UNIQUE tüüpi võtit"
 +        fre "Toutes les parties d'un index PRIMARY KEY doivent être NOT NULL; Si vous avez besoin d'un NULL dans l'index, utilisez un index UNIQUE"
 +        ger "Alle Teile eines PRIMARY KEY müssen als NOT NULL definiert sein. Wenn NULL in einem Schlüssel benötigt wird, muss ein UNIQUE-Schlüssel verwendet werden"
 +        hun "Az elsodleges kulcs teljes egeszeben csak NOT NULL tipusu lehet; Ha NULL mezot szeretne a kulcskent, hasznalja inkabb a UNIQUE-ot"
 +        ita "Tutte le parti di una chiave primaria devono essere dichiarate NOT NULL; se necessitano valori NULL nelle chiavi utilizzare UNIQUE"
 +        jpn "PRIMARY KEYの列は全てNOT NULLでなければいけません。UNIQUE索引であればNULLを含むことが可能です。"
 +        por "Todas as partes de uma chave primária devem ser não-nulas. Se você precisou usar um valor nulo (NULL) em uma chave, use a cláusula UNIQUE em seu lugar"
 +        rum "Toate partile unei chei primare (PRIMARY KEY) trebuie sa fie NOT NULL; Daca aveti nevoie de NULL in vreo cheie, folositi UNIQUE in schimb"
 +        rus "Все части первичного ключа (PRIMARY KEY) должны быть определены как NOT NULL; Если вам нужна поддержка величин NULL в ключе, воспользуйтесь индексом UNIQUE"
 +        serbian "Svi delovi primarnog ključa moraju biti različiti od NULL;  Ako Vam ipak treba NULL vrednost u ključu, upotrebite 'UNIQUE'"
 +        spa "Todas las partes de un PRIMARY KEY deben ser NOT NULL;  Si necesitas NULL en una clave, use UNIQUE"
 +        swe "Alla delar av en PRIMARY KEY måste vara NOT NULL;  Om du vill ha en nyckel med NULL, använd UNIQUE istället"
 +        ukr "Усі частини PRIMARY KEY повинні бути NOT NULL; Якщо ви потребуєте NULL у ключі, скористайтеся UNIQUE"
 +ER_TOO_MANY_ROWS 42000 
 +        cze "Výsledek obsahuje více než jeden řádek"
 +        dan "Resultatet bestod af mere end een række"
 +        nla "Resultaat bevatte meer dan een rij"
 +        eng "Result consisted of more than one row"
 +        est "Tulemis oli rohkem kui üks kirje"
 +        fre "Le résultat contient plus d'un enregistrement"
 +        ger "Ergebnis besteht aus mehr als einer Zeile"
 +        hun "Az eredmeny tobb, mint egy sort tartalmaz"
 +        ita "Il risultato consiste di piu` di una riga"
 +        jpn "結果が2行以上です。"
 +        por "O resultado consistiu em mais do que uma linha"
 +        rum "Resultatul constista din mai multe linii"
 +        rus "В результате возвращена более чем одна строка"
 +        serbian "Rezultat je sačinjen od više slogova"
 +        spa "Resultado compuesto de mas que una línea"
 +        swe "Resultet bestod av mera än en rad"
 +        ukr "Результат знаходиться у більше ніж одній строці"
 +ER_REQUIRES_PRIMARY_KEY 42000 
 +        cze "Tento typ tabulky vyžaduje primární klíč"
 +        dan "Denne tabeltype kræver en primærnøgle"
 +        nla "Dit tabel type heeft een primaire zoeksleutel nodig"
 +        eng "This table type requires a primary key"
 +        est "Antud tabelitüüp nõuab primaarset võtit"
 +        fre "Ce type de table nécessite une clé primaire (PRIMARY KEY)"
 +        ger "Dieser Tabellentyp benötigt einen Primärschlüssel (PRIMARY KEY)"
 +        hun "Az adott tablatipushoz elsodleges kulcs hasznalata kotelezo"
 +        ita "Questo tipo di tabella richiede una chiave primaria"
 +        jpn "使用のストレージエンジンでは、PRIMARY KEYが必要です。"
 +        por "Este tipo de tabela requer uma chave primária"
 +        rum "Aceast tip de tabela are nevoie de o cheie primara"
 +        rus "Этот тип таблицы требует определения первичного ключа"
 +        serbian "Ovaj tip tabele zahteva da imate definisan primarni ključ"
 +        spa "Este tipo de tabla necesita de una primary key"
 +        swe "Denna tabelltyp kräver en PRIMARY KEY"
 +        ukr "Цей тип таблиці потребує первинного ключа"
 +ER_NO_RAID_COMPILED  
 +        cze "Tato verze MySQL není zkompilována s podporou RAID"
 +        dan "Denne udgave af MariaDB er ikke oversat med understøttelse af RAID"
 +        nla "Deze versie van MariaDB is niet gecompileerd met RAID ondersteuning"
 +        eng "This version of MariaDB is not compiled with RAID support"
 +        est "Antud MariaDB versioon on kompileeritud ilma RAID toeta"
 +        fre "Cette version de MariaDB n'est pas compilée avec le support RAID"
 +        ger "Diese MariaDB-Version ist nicht mit RAID-Unterstützung kompiliert"
 +        hun "Ezen leforditott MariaDB verzio nem tartalmaz RAID support-ot"
 +        ita "Questa versione di MYSQL non e` compilata con il supporto RAID"
 +        jpn "このバージョンのMySQLはRAIDサポートを含めてコンパイルされていません。"
 +        por "Esta versão do MariaDB não foi compilada com suporte a RAID"
 +        rum "Aceasta versiune de MariaDB, nu a fost compilata cu suport pentru RAID"
 +        rus "Эта версия MariaDB скомпилирована без поддержки RAID"
 +        serbian "Ova verzija MariaDB servera nije kompajlirana sa podrškom za RAID uređaje"
 +        spa "Esta versión de MariaDB no es compilada con soporte RAID"
 +        swe "Denna version av MariaDB är inte kompilerad med RAID"
 +        ukr "Ця версія MariaDB не зкомпільована з підтримкою RAID"
 +ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE  
 +        cze "Update tabulky bez WHERE s klíčem není v módu bezpečných update dovoleno"
 +        dan "Du bruger sikker opdaterings modus ('safe update mode') og du forsøgte at opdatere en tabel uden en WHERE klausul, der gør brug af et KEY felt"
 +        nla "U gebruikt 'safe update mode' en u probeerde een tabel te updaten zonder een WHERE met een KEY kolom"
 +        eng "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column"
 +        est "Katse muuta tabelit turvalises rezhiimis ilma WHERE klauslita"
 +        fre "Vous êtes en mode 'safe update' et vous essayez de faire un UPDATE sans clause WHERE utilisant un index"
 +        ger "MariaDB läuft im sicheren Aktualisierungsmodus (safe update mode). Sie haben versucht, eine Tabelle zu aktualisieren, ohne in der WHERE-Klausel ein KEY-Feld anzugeben"
 +        hun "On a biztonsagos update modot hasznalja, es        WHERE that uses a KEY column"
 +        ita "In modalita` 'safe update' si e` cercato di aggiornare una tabella senza clausola WHERE su una chiave"
 +        jpn "'safe update mode'で、索引を利用するWHERE句の無い更新処理を実行しようとしました。"
 +        por "Você está usando modo de atualização seguro e tentou atualizar uma tabela sem uma cláusula WHERE que use uma coluna chave"
 +        rus "Вы работаете в режиме безопасных обновлений (safe update mode) и попробовали изменить таблицу без использования ключевого столбца в части WHERE"
 +        serbian "Vi koristite safe update mod servera, a probali ste da promenite podatke bez 'WHERE' komande koja koristi kolonu ključa"
 +        spa "Tu estás usando modo de actualización segura y tentado actualizar una tabla sin un WHERE que usa una KEY columna"
 +        swe "Du använder 'säker uppdateringsmod' och försökte uppdatera en tabell utan en WHERE-sats som använder sig av en nyckel"
 +        ukr "Ви у режимі безпечного оновлення та намагаєтесь оновити таблицю без оператора WHERE, що використовує KEY стовбець"
 +ER_KEY_DOES_NOT_EXITS 42000 S1009
 +        cze "Klíč '%-.192s' v tabulce '%-.192s' neexistuje"
 +        dan "Nøglen '%-.192s' eksisterer ikke i tabellen '%-.192s'"
 +        nla "Zoeksleutel '%-.192s' bestaat niet in tabel '%-.192s'"
 +        eng "Key '%-.192s' doesn't exist in table '%-.192s'"
 +        est "Võti '%-.192s' ei eksisteeri tabelis '%-.192s'"
 +        fre "L'index '%-.192s' n'existe pas sur la table '%-.192s'"
 +        ger "Schlüssel '%-.192s' existiert in der Tabelle '%-.192s' nicht"
 +        hun "A '%-.192s' kulcs nem letezik a '%-.192s' tablaban"
 +        ita "La chiave '%-.192s' non esiste nella tabella '%-.192s'"
 +        jpn "索引 '%-.192s' は表 '%-.192s' には存在しません。"
 +        por "Chave '%-.192s' não existe na tabela '%-.192s'"
 +        rus "Ключ '%-.192s' не существует в таблице '%-.192s'"
 +        serbian "Ključ '%-.192s' ne postoji u tabeli '%-.192s'"
 +        spa "Clave '%-.192s' no existe en la tabla '%-.192s'"
 +        swe "Nyckel '%-.192s' finns inte in tabell '%-.192s'"
 +        ukr "Ключ '%-.192s' не існує в таблиці '%-.192s'"
 +ER_CHECK_NO_SUCH_TABLE 42000 
 +        cze "Nemohu otevřít tabulku"
 +        dan "Kan ikke åbne tabellen"
 +        nla "Kan tabel niet openen"
 +        eng "Can't open table"
 +        est "Ei suuda avada tabelit"
 +        fre "Impossible d'ouvrir la table"
 +        ger "Kann Tabelle nicht öffnen"
 +        hun "Nem tudom megnyitni a tablat"
 +        ita "Impossibile aprire la tabella"
 +        jpn "表をオープンできません。"
 +        por "Não pode abrir a tabela"
 +        rus "Невозможно открыть таблицу"
 +        serbian "Ne mogu da otvorim tabelu"
 +        spa "No puedo abrir tabla"
 +        swe "Kan inte öppna tabellen"
 +        ukr "Не можу відкрити таблицю"
 +ER_CHECK_NOT_IMPLEMENTED 42000 
 +        cze "Handler tabulky nepodporuje %s"
 +        dan "Denne tabeltype understøtter ikke %s"
 +        nla "De 'handler' voor de tabel ondersteund geen %s"
 +        eng "The storage engine for the table doesn't support %s"
 +        est "Antud tabelitüüp ei toeta %s käske"
 +        fre "Ce type de table ne supporte pas les %s"
 +        ger "Die Speicher-Engine für diese Tabelle unterstützt kein %s"
 +        greek "The handler for the table doesn't support %s"
 +        hun "A tabla kezeloje (handler) nem tamogatja az %s"
 +        ita "Il gestore per la tabella non supporta il %s"
 +        jpn "この表のストレージエンジンは '%s' を利用できません。"
 +        kor "The handler for the table doesn't support %s"
 +        nor "The handler for the table doesn't support %s"
 +        norwegian-ny "The handler for the table doesn't support %s"
 +        pol "The handler for the table doesn't support %s"
 +        por "O manipulador de tabela não suporta %s"
 +        rum "The handler for the table doesn't support %s"
 +        rus "Обработчик таблицы не поддерживает этого: %s"
 +        serbian "Handler za ovu tabelu ne dozvoljava %s komande"
 +        slo "The handler for the table doesn't support %s"
 +        spa "El manipulador de la tabla no permite soporte para %s"
 +        swe "Tabellhanteraren för denna tabell kan inte göra %s"
 +        ukr "Вказівник таблиці не підтримуе %s"
 +ER_CANT_DO_THIS_DURING_AN_TRANSACTION 25000 
 +        cze "Provedení tohoto příkazu není v transakci dovoleno"
 +        dan "Du må ikke bruge denne kommando i en transaktion"
 +        nla "Het is u niet toegestaan dit commando uit te voeren binnen een transactie"
 +        eng "You are not allowed to execute this command in a transaction"
 +        est "Seda käsku ei saa kasutada transaktsiooni sees"
 +        fre "Vous n'êtes pas autorisé à exécute cette commande dans une transaction"
 +        ger "Sie dürfen diesen Befehl nicht in einer Transaktion ausführen"
 +        hun "Az On szamara nem engedelyezett a parancs vegrehajtasa a tranzakcioban"
 +        ita "Non puoi eseguire questo comando in una transazione"
 +        jpn "このコマンドはトランザクション内で実行できません。"
 +        por "Não lhe é permitido executar este comando em uma transação"
 +        rus "Вам не разрешено выполнять эту команду в транзакции"
 +        serbian "Nije Vam dozvoljeno da izvršite ovu komandu u transakciji"
 +        spa "No tienes el permiso para ejecutar este comando en una transición"
 +        swe "Du får inte utföra detta kommando i en transaktion"
 +        ukr "Вам не дозволено виконувати цю команду в транзакції"
 +ER_ERROR_DURING_COMMIT  
 +        cze "Chyba %M při COMMIT"
 +        dan "Modtog fejl %M mens kommandoen COMMIT blev udført"
 +        nla "Kreeg fout %M tijdens COMMIT"
 +        eng "Got error %M during COMMIT"
 +        est "Viga %M käsu COMMIT täitmisel"
 +        fre "Erreur %M lors du COMMIT"
 +        ger "Fehler %M beim COMMIT"
 +        hun "%M hiba a COMMIT vegrehajtasa soran"
 +        ita "Rilevato l'errore %M durante il COMMIT"
 +        jpn "COMMIT中にエラー %M が発生しました。"
 +        por "Obteve erro %M durante COMMIT"
 +        rus "Получена ошибка %M в процессе COMMIT"
 +        serbian "Greška %M za vreme izvršavanja komande 'COMMIT'"
 +        spa "Obtenido error %M durante COMMIT"
 +        swe "Fick fel %M vid COMMIT"
 +        ukr "Отримано помилку %M під час COMMIT"
 +ER_ERROR_DURING_ROLLBACK  
 +        cze "Chyba %M při ROLLBACK"
 +        dan "Modtog fejl %M mens kommandoen ROLLBACK blev udført"
 +        nla "Kreeg fout %M tijdens ROLLBACK"
 +        eng "Got error %M during ROLLBACK"
 +        est "Viga %M käsu ROLLBACK täitmisel"
 +        fre "Erreur %M lors du ROLLBACK"
 +        ger "Fehler %M beim ROLLBACK"
 +        hun "%M hiba a ROLLBACK vegrehajtasa soran"
 +        ita "Rilevato l'errore %M durante il ROLLBACK"
 +        jpn "ROLLBACK中にエラー %M が発生しました。"
 +        por "Obteve erro %M durante ROLLBACK"
 +        rus "Получена ошибка %M в процессе ROLLBACK"
 +        serbian "Greška %M za vreme izvršavanja komande 'ROLLBACK'"
 +        spa "Obtenido error %M durante ROLLBACK"
 +        swe "Fick fel %M vid ROLLBACK"
 +        ukr "Отримано помилку %M під час ROLLBACK"
 +ER_ERROR_DURING_FLUSH_LOGS  
 +        cze "Chyba %M při FLUSH_LOGS"
 +        dan "Modtog fejl %M mens kommandoen FLUSH_LOGS blev udført"
 +        nla "Kreeg fout %M tijdens FLUSH_LOGS"
 +        eng "Got error %M during FLUSH_LOGS"
 +        est "Viga %M käsu FLUSH_LOGS täitmisel"
 +        fre "Erreur %M lors du FLUSH_LOGS"
 +        ger "Fehler %M bei FLUSH_LOGS"
 +        hun "%M hiba a FLUSH_LOGS vegrehajtasa soran"
 +        ita "Rilevato l'errore %M durante il FLUSH_LOGS"
 +        jpn "FLUSH_LOGS中にエラー %M が発生しました。"
 +        por "Obteve erro %M durante FLUSH_LOGS"
 +        rus "Получена ошибка %M в процессе FLUSH_LOGS"
 +        serbian "Greška %M za vreme izvršavanja komande 'FLUSH_LOGS'"
 +        spa "Obtenido error %M durante FLUSH_LOGS"
 +        swe "Fick fel %M vid FLUSH_LOGS"
 +        ukr "Отримано помилку %M під час FLUSH_LOGS"
 +ER_ERROR_DURING_CHECKPOINT  
 +        cze "Chyba %M při CHECKPOINT"
 +        dan "Modtog fejl %M mens kommandoen CHECKPOINT blev udført"
 +        nla "Kreeg fout %M tijdens CHECKPOINT"
 +        eng "Got error %M during CHECKPOINT"
 +        est "Viga %M käsu CHECKPOINT täitmisel"
 +        fre "Erreur %M lors du CHECKPOINT"
 +        ger "Fehler %M bei CHECKPOINT"
 +        hun "%M hiba a CHECKPOINT vegrehajtasa soran"
 +        ita "Rilevato l'errore %M durante il CHECKPOINT"
 +        jpn "CHECKPOINT中にエラー %M が発生しました。"
 +        por "Obteve erro %M durante CHECKPOINT"
 +        rus "Получена ошибка %M в процессе CHECKPOINT"
 +        serbian "Greška %M za vreme izvršavanja komande 'CHECKPOINT'"
 +        spa "Obtenido error %M durante CHECKPOINT"
 +        swe "Fick fel %M vid CHECKPOINT"
 +        ukr "Отримано помилку %M під час CHECKPOINT"
 +ER_NEW_ABORTING_CONNECTION 08S01 
 +        cze "Spojení %lld do databáze: '%-.192s' uživatel: '%-.48s' stroj: '%-.64s' (%-.64s) bylo přerušeno"
 +        dan "Afbrød forbindelsen %lld til databasen '%-.192s' bruger: '%-.48s' vært: '%-.64s' (%-.64s)"
 +        nla "Afgebroken verbinding %lld naar db: '%-.192s' gebruiker: '%-.48s' host: '%-.64s' (%-.64s)"
 +        eng "Aborted connection %lld to db: '%-.192s' user: '%-.48s' host: '%-.64s' (%-.64s)"
 +        est "Ühendus katkestatud %lld andmebaas: '%-.192s' kasutaja: '%-.48s' masin: '%-.64s' (%-.64s)"
 +        fre "Connection %lld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' hôte: '%-.64s' (%-.64s)"
 +        ger "Abbruch der Verbindung %lld zur Datenbank '%-.192s'. Benutzer: '%-.48s', Host: '%-.64s' (%-.64s)"
 +        ita "Interrotta la connessione %lld al db: ''%-.192s' utente: '%-.48s' host: '%-.64s' (%-.64s)"
 +        jpn "接続 %lld が中断されました。データベース: '%-.192s' ユーザー: '%-.48s' ホスト: '%-.64s' (%-.64s)"
 +        por "Conexão %lld abortada para banco de dados '%-.192s' - usuário '%-.48s' - 'host' '%-.64s' ('%-.64s')"
 +        rus "Прервано соединение %lld к базе данных '%-.192s' пользователя '%-.48s' с хоста '%-.64s' (%-.64s)"
 +        serbian "Prekinuta konekcija broj %lld ka bazi: '%-.192s' korisnik je bio: '%-.48s' a host: '%-.64s' (%-.64s)"
 +        spa "Abortada conexión %lld para db: '%-.192s' usuario: '%-.48s' servidor: '%-.64s' (%-.64s)"
 +        swe "Avbröt länken för tråd %lld till db '%-.192s', användare '%-.48s', host '%-.64s' (%-.64s)"
 +        ukr "Перервано з'єднання %lld до бази данних: '%-.192s' користувач: '%-.48s' хост: '%-.64s' (%-.64s)"
 +ER_UNUSED_10
 +        eng "You should never see it"
 +ER_FLUSH_MASTER_BINLOG_CLOSED  
 +        eng "Binlog closed, cannot RESET MASTER"
 +        ger "Binlog geschlossen. Kann RESET MASTER nicht ausführen"
 +        jpn "バイナリログがクローズされています。RESET MASTER を実行できません。"
 +        por "Binlog fechado. Não pode fazer RESET MASTER"
 +        rus "Двоичный журнал обновления закрыт, невозможно выполнить RESET MASTER"
 +        serbian "Binarni log file zatvoren, ne mogu da izvršim komandu 'RESET MASTER'"
 +        ukr "Реплікаційний лог закрито, не можу виконати RESET MASTER"
 +ER_INDEX_REBUILD  
 +        cze "Přebudování indexu dumpnuté tabulky '%-.192s' nebylo úspěšné"
 +        dan "Kunne ikke genopbygge indekset for den dumpede tabel '%-.192s'"
 +        nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.192s'"
 +        eng "Failed rebuilding the index of  dumped table '%-.192s'"
 +        fre "La reconstruction de l'index de la table copiée '%-.192s' a échoué"
 +        ger "Neuerstellung des Index der Dump-Tabelle '%-.192s' fehlgeschlagen"
 +        greek "Failed rebuilding the index of dumped table '%-.192s'"
 +        hun "Failed rebuilding the index of dumped table '%-.192s'"
 +        ita "Fallita la ricostruzione dell'indice della tabella copiata '%-.192s'"
 +        jpn "ダンプ表 '%-.192s' の索引再構築に失敗しました。"
 +        por "Falhou na reconstrução do índice da tabela 'dumped' '%-.192s'"
 +        rus "Ошибка перестройки индекса сохраненной таблицы '%-.192s'"
 +        serbian "Izgradnja indeksa dump-ovane tabele '%-.192s' nije uspela"
 +        spa "Falla reconstruyendo el indice de la tabla dumped '%-.192s'"
 +        ukr "Невдале відновлення індекса переданої таблиці '%-.192s'"
 +ER_MASTER  
 +        cze "Chyba masteru: '%-.64s'"
 +        dan "Fejl fra master: '%-.64s'"
 +        nla "Fout van master: '%-.64s'"
 +        eng "Error from master: '%-.64s'"
 +        fre "Erreur reçue du maître: '%-.64s'"
 +        ger "Fehler vom Master: '%-.64s'"
 +        ita "Errore dal master: '%-.64s"
 +        jpn "マスターでエラーが発生: '%-.64s'"
 +        por "Erro no 'master' '%-.64s'"
 +        rus "Ошибка от головного сервера: '%-.64s'"
 +        serbian "Greška iz glavnog servera '%-.64s' u klasteru"
 +        spa "Error del master: '%-.64s'"
 +        swe "Fel från master: '%-.64s'"
 +        ukr "Помилка від головного: '%-.64s'"
 +ER_MASTER_NET_READ 08S01 
 +        cze "Síťová chyba při čtení z masteru"
 +        dan "Netværksfejl ved læsning fra master"
 +        nla "Net fout tijdens lezen van master"
 +        eng "Net error reading from master"
 +        fre "Erreur de lecture réseau reçue du maître"
 +        ger "Netzfehler beim Lesen vom Master"
 +        ita "Errore di rete durante la ricezione dal master"
 +        jpn "マスターからのデータ受信中のネットワークエラー"
 +        por "Erro de rede lendo do 'master'"
 +        rus "Возникла ошибка чтения в процессе коммуникации с головным сервером"
 +        serbian "Greška u primanju mrežnih paketa sa glavnog servera u klasteru"
 +        spa "Error de red leyendo del master"
 +        swe "Fick nätverksfel vid läsning från master"
 +        ukr "Мережева помилка читання від головного"
 +ER_MASTER_NET_WRITE 08S01 
 +        cze "Síťová chyba při zápisu na master"
 +        dan "Netværksfejl ved skrivning til master"
 +        nla "Net fout tijdens schrijven naar master"
 +        eng "Net error writing to master"
 +        fre "Erreur d'écriture réseau reçue du maître"
 +        ger "Netzfehler beim Schreiben zum Master"
 +        ita "Errore di rete durante l'invio al master"
 +        jpn "マスターへのデータ送信中のネットワークエラー"
 +        por "Erro de rede gravando no 'master'"
 +        rus "Возникла ошибка записи в процессе коммуникации с головным сервером"
 +        serbian "Greška u slanju mrežnih paketa na glavni server u klasteru"
 +        spa "Error de red escribiendo para el master"
 +        swe "Fick nätverksfel vid skrivning till master"
 +        ukr "Мережева помилка запису до головного"
 +ER_FT_MATCHING_KEY_NOT_FOUND  
 +        cze "Žádný sloupec nemá vytvořen fulltextový index"
 +        dan "Kan ikke finde en FULLTEXT nøgle som svarer til kolonne listen"
 +        nla "Kan geen FULLTEXT index vinden passend bij de kolom lijst"
 +        eng "Can't find FULLTEXT index matching the column list"
 +        est "Ei suutnud leida FULLTEXT indeksit, mis kattuks kasutatud tulpadega"
 +        fre "Impossible de trouver un index FULLTEXT correspondant à cette liste de colonnes"
 +        ger "Kann keinen FULLTEXT-Index finden, der der Feldliste entspricht"
 +        ita "Impossibile trovare un indice FULLTEXT che corrisponda all'elenco delle colonne"
 +        jpn "列リストに対応する全文索引(FULLTEXT)が見つかりません。"
 +        por "Não pode encontrar um índice para o texto todo que combine com a lista de colunas"
 +        rus "Невозможно отыскать полнотекстовый (FULLTEXT) индекс, соответствующий списку столбцов"
 +        serbian "Ne mogu da pronađem 'FULLTEXT' indeks koli odgovara listi kolona"
 +        spa "No puedo encontrar índice FULLTEXT correspondiendo a la lista de columnas"
 +        swe "Hittar inte ett FULLTEXT-index i kolumnlistan"
 +        ukr "Не можу знайти FULLTEXT індекс, що відповідає переліку стовбців"
 +ER_LOCK_OR_ACTIVE_TRANSACTION  
 +        cze "Nemohu provést zadaný příkaz, protože existují aktivní zamčené tabulky nebo aktivní transakce"
 +        dan "Kan ikke udføre den givne kommando fordi der findes aktive, låste tabeller eller fordi der udføres en transaktion"
 +        nla "Kan het gegeven commando niet uitvoeren, want u heeft actieve gelockte tabellen of een actieve transactie"
 +        eng "Can't execute the given command because you have active locked tables or an active transaction"
 +        est "Ei suuda täita antud käsku kuna on aktiivseid lukke või käimasolev transaktsioon"
 +        fre "Impossible d'exécuter la commande car vous avez des tables verrouillées ou une transaction active"
 +        ger "Kann den angegebenen Befehl wegen einer aktiven Tabellensperre oder einer aktiven Transaktion nicht ausführen"
 +        ita "Impossibile eseguire il comando richiesto: tabelle sotto lock o transazione in atto"
 +        jpn "すでにアクティブな表ロックやトランザクションがあるため、コマンドを実行できません。"
 +        por "Não pode executar o comando dado porque você tem tabelas ativas travadas ou uma transação ativa"
 +        rus "Невозможно выполнить указанную команду, поскольку у вас присутствуют активно заблокированные таблица или открытая транзакция"
 +        serbian "Ne mogu da izvršim datu komandu zbog toga što su tabele zaključane ili je transakcija u toku"
 +        spa "No puedo ejecutar el comando dado porque tienes tablas bloqueadas o una transición activa"
 +        swe "Kan inte utföra kommandot emedan du har en låst tabell eller an aktiv transaktion"
 +        ukr "Не можу виконати подану команду тому, що таблиця заблокована або виконується транзакція"
 +ER_UNKNOWN_SYSTEM_VARIABLE  
 +        cze "Neznámá systémová proměnná '%-.64s'"
 +        dan "Ukendt systemvariabel '%-.64s'"
 +        nla "Onbekende systeem variabele '%-.64s'"
 +        eng "Unknown system variable '%-.64s'"
 +        est "Tundmatu süsteemne muutuja '%-.64s'"
 +        fre "Variable système '%-.64s' inconnue"
 +        ger "Unbekannte Systemvariable '%-.64s'"
 +        ita "Variabile di sistema '%-.64s' sconosciuta"
 +        jpn "'%-.64s' は不明なシステム変数です。"
 +        por "Variável de sistema '%-.64s' desconhecida"
 +        rus "Неизвестная системная переменная '%-.64s'"
 +        serbian "Nepoznata sistemska promenljiva '%-.64s'"
 +        spa "Desconocida variable de sistema '%-.64s'"
 +        swe "Okänd systemvariabel: '%-.64s'"
 +        ukr "Невідома системна змінна '%-.64s'"
 +ER_CRASHED_ON_USAGE  
 +        cze "Tabulka '%-.192s' je označena jako porušená a měla by být opravena"
 +        dan "Tabellen '%-.192s' er markeret med fejl og bør repareres"
 +        nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en dient te worden gerepareerd"
 +        eng "Table '%-.192s' is marked as crashed and should be repaired"
 +        est "Tabel '%-.192s' on märgitud vigaseks ja tuleb parandada"
 +        fre "La table '%-.192s' est marquée 'crashed' et devrait être réparée"
 +        ger "Tabelle '%-.192s' ist als defekt markiert und sollte repariert werden"
 +        ita "La tabella '%-.192s' e` segnalata come corrotta e deve essere riparata"
 +        jpn "表 '%-.192s' は壊れています。修復が必要です。"
 +        por "Tabela '%-.192s' está marcada como danificada e deve ser reparada"
 +        rus "Таблица '%-.192s' помечена как испорченная и должна пройти проверку и ремонт"
 +        serbian "Tabela '%-.192s' je markirana kao oštećena i trebala bi biti popravljena"
 +        spa "Tabla '%-.192s' está marcada como crashed y debe ser reparada"
 +        swe "Tabell '%-.192s' är trasig och bör repareras med REPAIR TABLE"
 +        ukr "Таблицю '%-.192s' марковано як зіпсовану та її потрібно відновити"
 +ER_CRASHED_ON_REPAIR  
 +        cze "Tabulka '%-.192s' je označena jako porušená a poslední (automatická?) oprava se nezdařila"
 +        dan "Tabellen '%-.192s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede"
 +        nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte"
 +        eng "Table '%-.192s' is marked as crashed and last (automatic?) repair failed"
 +        est "Tabel '%-.192s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus"
 +        fre "La table '%-.192s' est marquée 'crashed' et le dernier 'repair' a échoué"
 +        ger "Tabelle '%-.192s' ist als defekt markiert und der letzte (automatische?) Reparaturversuch schlug fehl"
 +        ita "La tabella '%-.192s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita"
 +        jpn "表 '%-.192s' は壊れています。修復(自動?)にも失敗しています。"
 +        por "Tabela '%-.192s' está marcada como danificada e a última reparação (automática?) falhou"
 +        rus "Таблица '%-.192s' помечена как испорченная и последний (автоматический?) ремонт не был успешным"
 +        serbian "Tabela '%-.192s' je markirana kao oštećena, a zadnja (automatska?) popravka je bila neuspela"
 +        spa "Tabla '%-.192s' está marcada como crashed y la última reparación (automactica?) falló"
 +        swe "Tabell '%-.192s' är trasig och senast (automatiska?) reparation misslyckades"
 +        ukr "Таблицю '%-.192s' марковано як зіпсовану та останнє (автоматичне?) відновлення не вдалося"
 +ER_WARNING_NOT_COMPLETE_ROLLBACK  
 +        dan "Advarsel: Visse data i tabeller der ikke understøtter transaktioner kunne ikke tilbagestilles"
 +        nla "Waarschuwing: Roll back mislukt voor sommige buiten transacties gewijzigde tabellen"
 +        eng "Some non-transactional changed tables couldn't be rolled back"
 +        est "Hoiatus: mõnesid transaktsioone mittetoetavaid tabeleid ei suudetud tagasi kerida"
 +        fre "Attention: certaines tables ne supportant pas les transactions ont été changées et elles ne pourront pas être restituées"
 +        ger "Änderungen an einigen nicht transaktionalen Tabellen konnten nicht zurückgerollt werden"
 +        ita "Attenzione: Alcune delle modifiche alle tabelle non transazionali non possono essere ripristinate (roll back impossibile)"
 +        jpn "トランザクション対応ではない表への変更はロールバックされません。"
 +        por "Aviso: Algumas tabelas não-transacionais alteradas não puderam ser reconstituídas (rolled back)"
 +        rus "Внимание: по некоторым измененным нетранзакционным таблицам невозможно будет произвести откат транзакции"
 +        serbian "Upozorenje: Neke izmenjene tabele ne podržavaju komandu 'ROLLBACK'"
 +        spa "Aviso:  Algunas tablas no transancionales no pueden tener rolled back"
 +        swe "Warning:  Några icke transaktionella tabeller kunde inte återställas vid ROLLBACK"
 +        ukr "Застереження: Деякі нетранзакційні зміни таблиць не можна буде повернути"
 +ER_TRANS_CACHE_FULL  
 +        dan "Fler-udtryks transaktion krævede mere plads en 'max_binlog_cache_size' bytes. Forhøj værdien af denne variabel og prøv igen"
 +        nla "Multi-statement transactie vereist meer dan 'max_binlog_cache_size' bytes opslag. Verhoog deze mysqld variabele en probeer opnieuw"
 +        eng "Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again"
 +        est "Mitme lausendiga transaktsioon nõudis rohkem ruumi kui lubatud 'max_binlog_cache_size' muutujaga. Suurenda muutuja väärtust ja proovi uuesti"
 +        fre "Cette transaction à commandes multiples nécessite plus de 'max_binlog_cache_size' octets de stockage, augmentez cette variable de mysqld et réessayez"
 +        ger "Transaktionen, die aus mehreren Befehlen bestehen, benötigten mehr als 'max_binlog_cache_size' Bytes an Speicher. Btte vergrössern Sie diese Server-Variable versuchen Sie es noch einmal"
 +        ita "La transazione a comandi multipli (multi-statement) ha richiesto piu` di 'max_binlog_cache_size' bytes di disco: aumentare questa variabile di mysqld e riprovare"
 +        jpn "複数ステートメントから成るトランザクションが 'max_binlog_cache_size' 以上の容量を必要としました。このシステム変数を増加して、再試行してください。"
 +        por "Transações multi-declaradas (multi-statement transactions) requeriram mais do que o valor limite (max_binlog_cache_size) de bytes para armazenagem. Aumente o valor desta variável do mysqld e tente novamente"
 +        rus "Транзакции, включающей большое количество команд, потребовалось более чем 'max_binlog_cache_size' байт. Увеличьте эту переменную сервера mysqld и попробуйте еще раз"
 +        spa "Multipla transición necesita mas que 'max_binlog_cache_size' bytes de almacenamiento. Aumente esta variable mysqld y tente de nuevo"
 +        swe "Transaktionen krävde mera än 'max_binlog_cache_size' minne. Öka denna mysqld-variabel och försök på nytt"
 +        ukr "Транзакція з багатьма виразами вимагає більше ніж 'max_binlog_cache_size' байтів для зберігання. Збільште цю змінну mysqld та спробуйте знову"
 +ER_SLAVE_MUST_STOP  
 +        dan "Denne handling kunne ikke udføres med kørende slave '%2$*1$s', brug først kommandoen STOP SLAVE '%2$*1$s'"
 +        nla "Deze operatie kan niet worden uitgevoerd met een actieve slave '%2$*1$s', doe eerst STOP SLAVE '%2$*1$s'"
 +        eng "This operation cannot be performed as you have a running slave '%2$*1$s'; run STOP SLAVE '%2$*1$s' first"
 +        fre "Cette opération ne peut être réalisée avec un esclave '%2$*1$s' actif, faites STOP SLAVE '%2$*1$s' d'abord"
 +        ger "Diese Operation kann bei einem aktiven Slave '%2$*1$s' nicht durchgeführt werden. Bitte zuerst STOP SLAVE '%2$*1$s' ausführen"
 +        ita "Questa operazione non puo' essere eseguita con un database 'slave' '%2$*1$s' che gira, lanciare prima STOP SLAVE '%2$*1$s'"
 +        por "Esta operação não pode ser realizada com um 'slave' '%2$*1$s' em execução. Execute STOP SLAVE '%2$*1$s' primeiro"
 +        rus "Эту операцию невозможно выполнить при работающем потоке подчиненного сервера %2$*1$s. Сначала выполните STOP SLAVE '%2$*1$s'"
 +        serbian "Ova operacija ne može biti izvršena dok je aktivan podređeni '%2$*1$s' server. Zadajte prvo komandu 'STOP SLAVE '%2$*1$s'' da zaustavite podređeni server."
 +        spa "Esta operación no puede ser hecha con el esclavo '%2$*1$s' funcionando, primero use STOP SLAVE '%2$*1$s'"
 +        swe "Denna operation kan inte göras under replikering; Du har en aktiv förbindelse till '%2$*1$s'. Gör STOP SLAVE '%2$*1$s' först"
 +        ukr "Операція не може бути виконана з запущеним підлеглим '%2$*1$s', спочатку виконайте STOP SLAVE '%2$*1$s'"
 +ER_SLAVE_NOT_RUNNING  
 +        dan "Denne handling kræver en kørende slave. Konfigurer en slave og brug kommandoen START SLAVE"
 +        nla "Deze operatie vereist een actieve slave, configureer slave en doe dan START SLAVE"
 +        eng "This operation requires a running slave; configure slave and do START SLAVE"
 +        fre "Cette opération nécessite un esclave actif, configurez les esclaves et faites START SLAVE"
 +        ger "Diese Operation benötigt einen aktiven Slave. Bitte Slave konfigurieren und mittels START SLAVE aktivieren"
 +        ita "Questa operaione richiede un database 'slave', configurarlo ed eseguire START SLAVE"
 +        jpn "この処理は、稼働中のスレーブでなければ実行できません。スレーブの設定をしてSTART SLAVEコマンドを実行してください。"
 +        por "Esta operação requer um 'slave' em execução. Configure  o 'slave' e execute START SLAVE"
 +        rus "Для этой операции требуется работающий подчиненный сервер. Сначала выполните START SLAVE"
 +        serbian "Ova operacija zahteva da je aktivan podređeni server. Konfigurišite prvo podređeni server i onda izvršite komandu 'START SLAVE'"
 +        spa "Esta operación necesita el esclavo funcionando, configure esclavo y haga el START SLAVE"
 +        swe "Denna operation kan endast göras under replikering; Konfigurera slaven och gör START SLAVE"
 +        ukr "Операція вимагає запущеного підлеглого, зконфігуруйте підлеглого та виконайте START SLAVE"
 +ER_BAD_SLAVE  
 +        dan "Denne server er ikke konfigureret som slave. Ret in config-filen eller brug kommandoen CHANGE MASTER TO"
 +        nla "De server is niet geconfigureerd als slave, fix in configuratie bestand of met CHANGE MASTER TO"
 +        eng "The server is not configured as slave; fix in config file or with CHANGE MASTER TO"
 +        fre "Le server n'est pas configuré comme un esclave, changez le fichier de configuration ou utilisez CHANGE MASTER TO"
 +        ger "Der Server ist nicht als Slave konfiguriert. Bitte in der Konfigurationsdatei oder mittels CHANGE MASTER TO beheben"
 +        ita "Il server non e' configurato come 'slave', correggere il file di configurazione cambiando CHANGE MASTER TO"
 +        jpn "このサーバーはスレーブとして設定されていません。コンフィグファイルかCHANGE MASTER TOコマンドで設定して下さい。"
 +        por "O servidor não está configurado como 'slave'. Acerte o arquivo de configuração ou use CHANGE MASTER TO"
 +        rus "Этот сервер не настроен как подчиненный. Внесите исправления в конфигурационном файле или с помощью CHANGE MASTER TO"
 +        serbian "Server nije konfigurisan kao podređeni server, ispravite konfiguracioni file ili na njemu izvršite komandu 'CHANGE MASTER TO'"
 +        spa "El servidor no está configurado como esclavo, edite el archivo config file o con CHANGE MASTER TO"
 +        swe "Servern är inte konfigurerade som en replikationsslav. Ändra konfigurationsfilen eller gör CHANGE MASTER TO"
 +        ukr "Сервер не зконфігуровано як підлеглий, виправте це у файлі конфігурації або з CHANGE MASTER TO"
 +ER_MASTER_INFO  
 +        eng "Could not initialize master info structure for '%.*s'; more error messages can be found in the MariaDB error log"
 +        fre "Impossible d'initialiser les structures d'information de maître '%.*s', vous trouverez des messages d'erreur supplémentaires dans le journal des erreurs de MariaDB"
 +        ger "Konnte Master-Info-Struktur '%.*s' nicht initialisieren. Weitere Fehlermeldungen können im MariaDB-Error-Log eingesehen werden"
 +        jpn "'master info '%.*s''構造体の初期化ができませんでした。MariaDBエラーログでエラーメッセージを確認してください。"
 +        serbian "Nisam mogao da inicijalizujem informacionu strukturu glavnog servera, proverite da li imam privilegije potrebne za pristup file-u 'master.info' '%.*s'"
 +        swe "Kunde inte initialisera replikationsstrukturerna för '%.*s'. See MariaDB fel fil för mera information"
 +ER_SLAVE_THREAD
 +        dan "Kunne ikke danne en slave-tråd; check systemressourcerne"
 +        nla "Kon slave thread niet aanmaken, controleer systeem resources"
 +        eng "Could not create slave thread; check system resources"
 +        fre "Impossible de créer une tâche esclave, vérifiez les ressources système"
 +        ger "Konnte Slave-Thread nicht starten. Bitte System-Ressourcen überprüfen"
 +        ita "Impossibile creare il thread 'slave', controllare le risorse di sistema"
 +        jpn "スレーブスレッドを作成できません。システムリソースを確認してください。"
 +        por "Não conseguiu criar 'thread' de 'slave'. Verifique os recursos do sistema"
 +        rus "Невозможно создать поток подчиненного сервера. Проверьте системные ресурсы"
 +        serbian "Nisam mogao da startujem thread za podređeni server, proverite sistemske resurse"
 +        spa "No puedo crear el thread esclavo, verifique recursos del sistema"
 +        swe "Kunde inte starta en tråd för replikering"
 +        ukr "Не можу створити підлеглу гілку, перевірте системні ресурси"
 +ER_TOO_MANY_USER_CONNECTIONS 42000 
 +        dan "Brugeren %-.64s har allerede mere end 'max_user_connections' aktive forbindelser"
 +        nla "Gebruiker %-.64s heeft reeds meer dan 'max_user_connections' actieve verbindingen"
 +        eng "User %-.64s already has more than 'max_user_connections' active connections"
 +        est "Kasutajal %-.64s on juba rohkem ühendusi kui lubatud 'max_user_connections' muutujaga"
 +        fre "L'utilisateur %-.64s possède déjà plus de 'max_user_connections' connexions actives"
 +        ger "Benutzer '%-.64s' hat mehr als 'max_user_connections' aktive Verbindungen"
 +        ita "L'utente %-.64s ha gia' piu' di 'max_user_connections' connessioni attive"
 +        jpn "ユーザー '%-.64s' はすでに 'max_user_connections' 以上のアクティブな接続を行っています。"
 +        por "Usuário '%-.64s' já possui mais que o valor máximo de conexões (max_user_connections) ativas"
 +        rus "У пользователя %-.64s уже больше чем 'max_user_connections' активных соединений"
 +        serbian "Korisnik %-.64s već ima više aktivnih konekcija nego što je to određeno 'max_user_connections' promenljivom"
 +        spa "Usario %-.64s ya tiene mas que 'max_user_connections' conexiones activas"
 +        swe "Användare '%-.64s' har redan 'max_user_connections' aktiva inloggningar"
 +        ukr "Користувач %-.64s вже має більше ніж 'max_user_connections' активних з'єднань"
 +ER_SET_CONSTANTS_ONLY  
 +        dan "Du må kun bruge konstantudtryk med SET"
 +        nla "U mag alleen constante expressies gebruiken bij SET"
 +        eng "You may only use constant expressions in this statement"
 +        est "Ainult konstantsed suurused on lubatud SET klauslis"
 +        fre "Seules les expressions constantes sont autorisées avec SET"
 +        ger "Bei diesem Befehl dürfen nur konstante Ausdrücke verwendet werden"
 +        ita "Si possono usare solo espressioni costanti con SET"
 +        jpn "SET処理が失敗しました。"
 +        por "Você pode usar apenas expressões constantes com SET"
 +        rus "С этой командой вы можете использовать только константные выражения"
 +        serbian "Možete upotrebiti samo konstantan iskaz sa komandom 'SET'"
 +        spa "Tu solo debes usar expresiones constantes con SET"
 +        swe "Man kan endast använda konstantuttryck med SET"
 +        ukr "Можна використовувати лише вирази зі сталими у SET"
 +ER_LOCK_WAIT_TIMEOUT  
 +        dan "Lock wait timeout overskredet"
 +        nla "Lock wacht tijd overschreden"
 +        eng "Lock wait timeout exceeded; try restarting transaction"
 +        est "Kontrollaeg ületatud luku järel ootamisel; Proovi transaktsiooni otsast alata"
 +        fre "Timeout sur l'obtention du verrou"
 +        ger "Beim Warten auf eine Sperre wurde die zulässige Wartezeit überschritten. Bitte versuchen Sie, die Transaktion neu zu starten"
 +        ita "E' scaduto il timeout per l'attesa del lock"
 +        jpn "ロック待ちがタイムアウトしました。トランザクションを再試行してください。"
 +        por "Tempo de espera (timeout) de travamento excedido. Tente reiniciar a transação."
 +        rus "Таймаут ожидания блокировки истек; попробуйте перезапустить транзакцию"
 +        serbian "Vremenski limit za zaključavanje tabele je istekao; Probajte da ponovo startujete transakciju"
 +        spa "Tiempo de bloqueo de espera excedido"
 +        swe "Fick inte ett lås i tid ; Försök att starta om transaktionen"
 +        ukr "Затримку очікування блокування вичерпано"
 +ER_LOCK_TABLE_FULL  
 +        dan "Det totale antal låse overstiger størrelsen på låse-tabellen"
 +        nla "Het totale aantal locks overschrijdt de lock tabel grootte"
 +        eng "The total number of locks exceeds the lock table size"
 +        est "Lukkude koguarv ületab lukutabeli suuruse"
 +        fre "Le nombre total de verrou dépasse la taille de la table des verrous"
 +        ger "Die Gesamtzahl der Sperren überschreitet die Größe der Sperrtabelle"
 +        ita "Il numero totale di lock e' maggiore della grandezza della tabella di lock"
 +        jpn "ロックの数が多すぎます。"
 +        por "O número total de travamentos excede o tamanho da tabela de travamentos"
 +        rus "Общее количество блокировок превысило размеры таблицы блокировок"
 +        serbian "Broj totalnih zaključavanja tabele premašuje veličinu tabele zaključavanja"
 +        spa "El número total de bloqueos excede el tamaño de bloqueo de la tabla"
 +        swe "Antal lås överskrider antalet reserverade lås"
 +        ukr "Загальна кількість блокувань перевищила розмір блокувань для таблиці"
 +ER_READ_ONLY_TRANSACTION 25000 
 +        dan "Update lås kan ikke opnås under en READ UNCOMMITTED transaktion"
 +        nla "Update locks kunnen niet worden verkregen tijdens een READ UNCOMMITTED transactie"
 +        eng "Update locks cannot be acquired during a READ UNCOMMITTED transaction"
 +        est "Uuenduslukke ei saa kasutada READ UNCOMMITTED transaktsiooni käigus"
 +        fre "Un verrou en update ne peut être acquit pendant une transaction READ UNCOMMITTED"
 +        ger "Während einer READ-UNCOMMITTED-Transaktion können keine UPDATE-Sperren angefordert werden"
 +        ita "I lock di aggiornamento non possono essere acquisiti durante una transazione 'READ UNCOMMITTED'"
 +        jpn "読み込み専用トランザクションです。"
 +        por "Travamentos de atualização não podem ser obtidos durante uma transação de tipo READ UNCOMMITTED"
 +        rus "Блокировки обновлений нельзя получить в процессе чтения не принятой (в режиме READ UNCOMMITTED) транзакции"
 +        serbian "Zaključavanja izmena ne mogu biti realizovana sve dok traje 'READ UNCOMMITTED' transakcija"
 +        spa "Bloqueos de actualización no pueden ser adqueridos durante una transición READ UNCOMMITTED"
 +        swe "Updateringslås kan inte göras när man använder READ UNCOMMITTED"
 +        ukr "Оновити блокування не можливо на протязі транзакції READ UNCOMMITTED"
 +ER_DROP_DB_WITH_READ_LOCK  
 +        dan "DROP DATABASE er ikke tilladt mens en tråd holder på globalt read lock"
 +        nla "DROP DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit"
 +        eng "DROP DATABASE not allowed while thread is holding global read lock"
 +        est "DROP DATABASE ei ole lubatud kui lõim omab globaalset READ lukku"
 +        fre "DROP DATABASE n'est pas autorisée pendant qu'une tâche possède un verrou global en lecture"
 +        ger "DROP DATABASE ist nicht erlaubt, solange der Thread eine globale Lesesperre hält"
 +        ita "DROP DATABASE non e' permesso mentre il thread ha un lock globale di lettura"
 +        jpn "グローバルリードロックを保持している間は、DROP DATABASE を実行できません。"
 +        por "DROP DATABASE não permitido enquanto uma 'thread' está mantendo um travamento global de leitura"
 +        rus "Не допускается DROP DATABASE, пока поток держит глобальную блокировку чтения"
 +        serbian "Komanda 'DROP DATABASE' nije dozvoljena dok thread globalno zaključava čitanje podataka"
 +        spa "DROP DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global"
 +        swe "DROP DATABASE är inte tillåtet när man har ett globalt läslås"
 +        ukr "DROP DATABASE не дозволено доки гілка перебуває під загальним блокуванням читання"
 +ER_CREATE_DB_WITH_READ_LOCK  
 +        dan "CREATE DATABASE er ikke tilladt mens en tråd holder på globalt read lock"
 +        nla "CREATE DATABASE niet toegestaan terwijl thread een globale 'read lock' bezit"
 +        eng "CREATE DATABASE not allowed while thread is holding global read lock"
 +        est "CREATE DATABASE ei ole lubatud kui lõim omab globaalset READ lukku"
 +        fre "CREATE DATABASE n'est pas autorisée pendant qu'une tâche possède un verrou global en lecture"
 +        ger "CREATE DATABASE ist nicht erlaubt, solange der Thread eine globale Lesesperre hält"
 +        ita "CREATE DATABASE non e' permesso mentre il thread ha un lock globale di lettura"
 +        jpn "グローバルリードロックを保持している間は、CREATE DATABASE を実行できません。"
 +        por "CREATE DATABASE não permitido enquanto uma 'thread' está mantendo um travamento global de leitura"
 +        rus "Не допускается CREATE DATABASE, пока поток держит глобальную блокировку чтения"
 +        serbian "Komanda 'CREATE DATABASE' nije dozvoljena dok thread globalno zaključava čitanje podataka"
 +        spa "CREATE DATABASE no permitido mientras un thread está ejerciendo un bloqueo de lectura global"
 +        swe "CREATE DATABASE är inte tillåtet när man har ett globalt läslås"
 +        ukr "CREATE DATABASE не дозволено доки гілка перебуває під загальним блокуванням читання"
 +ER_WRONG_ARGUMENTS  
 +        nla "Foutieve parameters voor %s"
 +        eng "Incorrect arguments to %s"
 +        est "Vigased parameetrid %s-le"
 +        fre "Mauvais arguments à %s"
 +        ger "Falsche Argumente für %s"
 +        ita "Argomenti errati a %s"
 +        jpn "%s の引数が不正です"
 +        por "Argumentos errados para %s"
 +        rus "Неверные параметры для %s"
 +        serbian "Pogrešni argumenti prosleđeni na %s"
 +        spa "Argumentos errados para %s"
 +        swe "Felaktiga argument till %s"
 +        ukr "Хибний аргумент для %s"
 +ER_NO_PERMISSION_TO_CREATE_USER 42000 
 +        nla "'%s'@'%s' mag geen nieuwe gebruikers creeren"
 +        eng "'%s'@'%s' is not allowed to create new users"
 +        est "Kasutajal '%s'@'%s' ei ole lubatud luua uusi kasutajaid"
 +        fre "'%s'@'%s' n'est pas autorisé à créer de nouveaux utilisateurs"
 +        ger "'%s'@'%s' ist nicht berechtigt, neue Benutzer hinzuzufügen"
 +        ita "A '%s'@'%s' non e' permesso creare nuovi utenti"
 +        por "Não é permitido a '%s'@'%s' criar novos usuários"
 +        rus "'%s'@'%s' не разрешается создавать новых пользователей"
 +        serbian "Korisniku '%s'@'%s' nije dozvoljeno da kreira nove korisnike"
 +        spa "'%s'@'%s' no es permitido para crear nuevos usuarios"
 +        swe "'%s'@'%s' har inte rättighet att skapa nya användare"
 +        ukr "Користувачу '%s'@'%s' не дозволено створювати нових користувачів"
 +ER_UNION_TABLES_IN_DIFFERENT_DIR  
 +        nla "Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren"
 +        eng "Incorrect table definition; all MERGE tables must be in the same database"
 +        est "Vigane tabelimääratlus; kõik MERGE tabeli liikmed peavad asuma samas andmebaasis"
 +        fre "Définition de table incorrecte; toutes les tables MERGE doivent être dans la même base de donnée"
 +        ger "Falsche Tabellendefinition. Alle MERGE-Tabellen müssen sich in derselben Datenbank befinden"
 +        ita "Definizione della tabella errata; tutte le tabelle di tipo MERGE devono essere nello stesso database"
 +        jpn "不正な表定義です。MERGE表の構成表はすべて同じデータベース内になければなりません。"
 +        por "Definição incorreta da tabela. Todas as tabelas contidas na junção devem estar no mesmo banco de dados."
 +        rus "Неверное определение таблицы; Все таблицы в MERGE должны принадлежать одной и той же базе данных"
 +        serbian "Pogrešna definicija tabele; sve 'MERGE' tabele moraju biti u istoj bazi podataka"
 +        spa "Incorrecta definición de la tabla; Todas las tablas MERGE deben estar en el mismo banco de datos"
 +        swe "Felaktig tabelldefinition; alla tabeller i en MERGE-tabell måste vara i samma databas"
 +ER_LOCK_DEADLOCK 40001 
 +        nla "Deadlock gevonden tijdens lock-aanvraag poging; Probeer herstart van de transactie"
 +        eng "Deadlock found when trying to get lock; try restarting transaction"
 +        est "Lukustamisel tekkis tupik (deadlock); alusta transaktsiooni otsast"
 +        fre "Deadlock découvert en essayant d'obtenir les verrous : essayez de redémarrer la transaction"
 +        ger "Beim Versuch, eine Sperre anzufordern, ist ein Deadlock aufgetreten. Versuchen Sie, die Transaktion neu zu starten"
 +        ita "Trovato deadlock durante il lock; Provare a far ripartire la transazione"
 +        jpn "ロック取得中にデッドロックが検出されました。トランザクションを再試行してください。"
 +        por "Encontrado um travamento fatal (deadlock) quando tentava obter uma trava. Tente reiniciar a transação."
 +        rus "Возникла тупиковая ситуация в процессе получения блокировки; Попробуйте перезапустить транзакцию"
 +        serbian "Unakrsno zaključavanje pronađeno kada sam pokušao da dobijem pravo na zaključavanje; Probajte da restartujete transakciju"
 +        spa "Encontrado deadlock cuando tentando obtener el bloqueo; Tente recomenzar la transición"
 +        swe "Fick 'DEADLOCK' vid låsförsök av block/rad. Försök att starta om transaktionen"
 +ER_TABLE_CANT_HANDLE_FT  
 +        nla "Het gebruikte tabel type (%s) ondersteund geen FULLTEXT indexen"
 +        eng "The storage engine %s doesn't support FULLTEXT indexes"
 +        est "Antud tabelitüüp (%s) ei toeta FULLTEXT indekseid"
 +        fre "Le type de table utilisé (%s) ne supporte pas les index FULLTEXT"
 +        ger "Der verwendete Tabellentyp (%s) unterstützt keine FULLTEXT-Indizes"
 +        ita "La tabella usata (%s) non supporta gli indici FULLTEXT"
 +        por "O tipo de tabela utilizado (%s) não suporta índices de texto completo (fulltext indexes)"
 +        rus "Используемый тип таблиц (%s) не поддерживает полнотекстовых индексов"
 +        serbian "Upotrebljeni tip tabele (%s) ne podržava 'FULLTEXT' indekse"
 +        spa "El tipo de tabla usada (%s) no soporta índices FULLTEXT"
 +        swe "Tabelltypen (%s) har inte hantering av FULLTEXT-index"
 +        ukr "Використаний тип таблиці (%s) не підтримує FULLTEXT індексів"
 +ER_CANNOT_ADD_FOREIGN  
 +        nla "Kan foreign key beperking niet toevoegen"
 +        eng "Cannot add foreign key constraint"
 +        fre "Impossible d'ajouter des contraintes d'index externe"
 +        ger "Fremdschlüssel-Beschränkung kann nicht hinzugefügt werden"
 +        ita "Impossibile aggiungere il vincolo di integrita' referenziale (foreign key constraint)"
 +        jpn "外部キー制約を追加できません。"
 +        por "Não pode acrescentar uma restrição de chave estrangeira"
 +        rus "Невозможно добавить ограничения внешнего ключа"
 +        serbian "Ne mogu da dodam proveru spoljnog ključa"
 +        spa "No puede adicionar clave extranjera constraint"
 +        swe "Kan inte lägga till 'FOREIGN KEY constraint'"
 +ER_NO_REFERENCED_ROW 23000 
 +        nla "Kan onderliggende rij niet toevoegen: foreign key beperking gefaald"
 +        eng "Cannot add or update a child row: a foreign key constraint fails"
 +        fre "Impossible d'ajouter un enregistrement fils : une constrainte externe l'empèche"
 +        ger "Hinzufügen oder Aktualisieren eines Kind-Datensatzes schlug aufgrund einer Fremdschlüssel-Beschränkung fehl"
 +        greek "Cannot add a child row: a foreign key constraint fails"
 +        hun "Cannot add a child row: a foreign key constraint fails"
 +        ita "Impossibile aggiungere la riga: un vincolo d'integrita' referenziale non e' soddisfatto"
 +        jpn "親キーがありません。外部キー制約違反です。"
 +        norwegian-ny "Cannot add a child row: a foreign key constraint fails"
 +        por "Não pode acrescentar uma linha filha: uma restrição de chave estrangeira falhou"
 +        rus "Невозможно добавить или обновить дочернюю строку: проверка ограничений внешнего ключа не выполняется"
 +        spa "No puede adicionar una línea hijo: falla de clave extranjera constraint"
 +        swe "FOREIGN KEY-konflikt:  Kan inte skriva barn"
 +ER_ROW_IS_REFERENCED 23000 
 +        eng "Cannot delete or update a parent row: a foreign key constraint fails"
 +        fre "Impossible de supprimer un enregistrement père : une constrainte externe l'empèche"
 +        ger "Löschen oder Aktualisieren eines Eltern-Datensatzes schlug aufgrund einer Fremdschlüssel-Beschränkung fehl"
 +        greek "Cannot delete a parent row: a foreign key constraint fails"
 +        hun "Cannot delete a parent row: a foreign key constraint fails"
 +        ita "Impossibile cancellare la riga: un vincolo d'integrita' referenziale non e' soddisfatto"
 +        jpn "子レコードがあります。外部キー制約違反です。"
 +        por "Não pode apagar uma linha pai: uma restrição de chave estrangeira falhou"
 +        rus "Невозможно удалить или обновить родительскую строку: проверка ограничений внешнего ключа не выполняется"
 +        serbian "Ne mogu da izbrišem roditeljski slog: provera spoljnog ključa je neuspela"
 +        spa "No puede deletar una línea padre: falla de clave extranjera constraint"
 +        swe "FOREIGN KEY-konflikt:  Kan inte radera fader"
 +ER_CONNECT_TO_MASTER 08S01 
 +        nla "Fout bij opbouwen verbinding naar master: %-.128s"
 +        eng "Error connecting to master: %-.128s"
 +        ger "Fehler bei der Verbindung zum Master: %-.128s"
 +        ita "Errore durante la connessione al master: %-.128s"
 +        jpn "マスターへの接続エラー: %-.128s"
 +        por "Erro conectando com o master: %-.128s"
 +        rus "Ошибка соединения с головным сервером: %-.128s"
 +        spa "Error de coneccion a master: %-.128s"
 +        swe "Fick fel vid anslutning till master: %-.128s"
 +ER_QUERY_ON_MASTER  
 +        nla "Fout bij uitvoeren query op master: %-.128s"
 +        eng "Error running query on master: %-.128s"
 +        ger "Beim Ausführen einer Abfrage auf dem Master trat ein Fehler auf: %-.128s"
 +        ita "Errore eseguendo una query sul master: %-.128s"
 +        jpn "マスターでのクエリ実行エラー: %-.128s"
 +        por "Erro rodando consulta no master: %-.128s"
 +        rus "Ошибка выполнения запроса на головном сервере: %-.128s"
 +        spa "Error executando el query en master: %-.128s"
 +        swe "Fick fel vid utförande av command på mastern: %-.128s"
 +ER_ERROR_WHEN_EXECUTING_COMMAND  
 +        nla "Fout tijdens uitvoeren van commando %s: %-.128s"
 +        eng "Error when executing command %s: %-.128s"
 +        est "Viga käsu %s täitmisel: %-.128s"
 +        ger "Fehler beim Ausführen des Befehls %s: %-.128s"
 +        ita "Errore durante l'esecuzione del comando %s: %-.128s"
 +        jpn "%s コマンドの実行エラー: %-.128s"
 +        por "Erro quando executando comando %s: %-.128s"
 +        rus "Ошибка при выполнении команды %s: %-.128s"
 +        serbian "Greška pri izvršavanju komande %s: %-.128s"
 +        spa "Error de %s: %-.128s"
 +        swe "Fick fel vid utförande av %s: %-.128s"
 +ER_WRONG_USAGE  
 +        nla "Foutief gebruik van %s en %s"
 +        eng "Incorrect usage of %s and %s"
 +        est "Vigane %s ja %s kasutus"
 +        ger "Falsche Verwendung von %s und %s"
 +        ita "Uso errato di %s e %s"
 +        jpn "%s の %s に関する不正な使用法です。"
 +        por "Uso errado de %s e %s"
 +        rus "Неверное использование %s и %s"
 +        serbian "Pogrešna upotreba %s i %s"
 +        spa "Equivocado uso de %s y  %s"
 +        swe "Felaktig använding av %s and %s"
 +        ukr "Wrong usage of %s and %s"
 +ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 21000 
 +        nla "De gebruikte SELECT commando's hebben een verschillend aantal kolommen"
 +        eng "The used SELECT statements have a different number of columns"
 +        est "Tulpade arv kasutatud SELECT lausetes ei kattu"
 +        ger "Die verwendeten SELECT-Befehle liefern unterschiedliche Anzahlen von Feldern zurück"
 +        ita "La SELECT utilizzata ha un numero di colonne differente"
 +        jpn "使用のSELECT文が返す列数が違います。"
 +        por "Os comandos SELECT usados têm diferente número de colunas"
 +        rus "Использованные операторы выборки (SELECT) дают разное количество столбцов"
 +        serbian "Upotrebljene 'SELECT' komande adresiraju različit broj kolona"
 +        spa "El comando SELECT usado tiene diferente número de columnas"
 +        swe "SELECT-kommandona har olika antal kolumner"
 +ER_CANT_UPDATE_WITH_READLOCK  
 +        nla "Kan de query niet uitvoeren vanwege een conflicterende read lock"
 +        eng "Can't execute the query because you have a conflicting read lock"
 +        est "Ei suuda täita päringut konfliktse luku tõttu"
 +        ger "Augrund eines READ-LOCK-Konflikts kann die Abfrage nicht ausgeführt werden"
 +        ita "Impossibile eseguire la query perche' c'e' un conflitto con in lock di lettura"
 +        jpn "競合するリードロックを保持しているので、クエリを実行できません。"
 +        por "Não posso executar a consulta porque você tem um conflito de travamento de leitura"
 +        rus "Невозможно исполнить запрос, поскольку у вас установлены конфликтующие блокировки чтения"
 +        serbian "Ne mogu da izvršim upit zbog toga što imate zaključavanja čitanja podataka u konfliktu"
 +        spa "No puedo ejecutar el query  porque usted tiene conflicto de traba de lectura"
 +        swe "Kan inte utföra kommandot emedan du har ett READ-lås"
 +ER_MIXING_NOT_ALLOWED  
 +        nla "Het combineren van transactionele en niet-transactionele tabellen is uitgeschakeld."
 +        eng "Mixing of transactional and non-transactional tables is disabled"
 +        est "Transaktsioone toetavate ning mittetoetavate tabelite kooskasutamine ei ole lubatud"
 +        ger "Die gleichzeitige Verwendung von Tabellen mit und ohne Transaktionsunterstützung ist deaktiviert"
 +        ita "E' disabilitata la possibilita' di mischiare tabelle transazionali e non-transazionali"
 +        jpn "トランザクション対応の表と非対応の表の同時使用は無効化されています。"
 +        por "Mistura de tabelas transacional e não-transacional está desabilitada"
 +        rus "Использование транзакционных таблиц наряду с нетранзакционными запрещено"
 +        serbian "Mešanje tabela koje podržavaju transakcije i onih koje ne podržavaju transakcije je isključeno"
 +        spa "Mezla de transancional y no-transancional tablas está deshabilitada"
 +        swe "Blandning av transaktionella och icke-transaktionella tabeller är inaktiverat"
 +ER_DUP_ARGUMENT  
 +        nla "Optie '%s' tweemaal gebruikt in opdracht"
 +        eng "Option '%s' used twice in statement"
 +        est "Määrangut '%s' on lauses kasutatud topelt"
 +        ger "Option '%s' wird im Befehl zweimal verwendet"
 +        ita "L'opzione '%s' e' stata usata due volte nel comando"
 +        jpn "オプション '%s' が2度使用されています。"
 +        por "Opção '%s' usada duas vezes no comando"
 +        rus "Опция '%s' дважды использована в выражении"
 +        spa "Opción '%s' usada dos veces en el comando"
 +        swe "Option '%s' användes två gånger"
 +ER_USER_LIMIT_REACHED 42000 
 +        nla "Gebruiker '%-.64s' heeft het maximale gebruik van de '%s' faciliteit overschreden (huidige waarde: %ld)"
 +        eng "User '%-.64s' has exceeded the '%s' resource (current value: %ld)"
 +        ger "Benutzer '%-.64s' hat die Ressourcenbeschränkung '%s' überschritten (aktueller Wert: %ld)"
 +        ita "L'utente '%-.64s' ha ecceduto la risorsa '%s' (valore corrente: %ld)"
 +        jpn "ユーザー '%-.64s' はリソースの上限 '%s' に達しました。(現在値: %ld)"
 +        por "Usuário '%-.64s' tem excedido o '%s' recurso (atual valor: %ld)"
 +        rus "Пользователь '%-.64s' превысил использование ресурса '%s' (текущее значение: %ld)"
 +        spa "Usuario '%-.64s' ha excedido el recurso '%s' (actual valor: %ld)"
 +        swe "Användare '%-.64s' har överskridit '%s' (nuvarande värde: %ld)"
 +ER_SPECIFIC_ACCESS_DENIED_ERROR 42000 
 +        nla "Toegang geweigerd. U moet het %-.128s privilege hebben voor deze operatie"
 +        eng "Access denied; you need (at least one of) the %-.128s privilege(s) for this operation"
 +        ger "Kein Zugriff. Hierfür wird die Berechtigung %-.128s benötigt"
 +        ita "Accesso non consentito. Serve il privilegio %-.128s per questa operazione"
 +        jpn "アクセスは拒否されました。この操作には %-.128s 権限が(複数の場合はどれか1つ)必要です。"
 +        por "Acesso negado. Você precisa o privilégio %-.128s para essa operação"
 +        rus "В доступе отказано. Вам нужны привилегии %-.128s для этой операции"
 +        spa "Acceso negado. Usted necesita el privilegio %-.128s para esta operación"
 +        swe "Du har inte privlegiet '%-.128s' som behövs för denna operation"
 +        ukr "Access denied. You need the %-.128s privilege for this operation"
 +ER_LOCAL_VARIABLE  
 +        nla "Variabele '%-.64s' is SESSION en kan niet worden gebruikt met SET GLOBAL"
 +        eng "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL"
 +        ger "Variable '%-.64s' ist eine lokale Variable und kann nicht mit SET GLOBAL verändert werden"
 +        ita "La variabile '%-.64s' e' una variabile locale ( SESSION ) e non puo' essere cambiata usando SET GLOBAL"
 +        jpn "変数 '%-.64s' はセッション変数です。SET GLOBALでは使用できません。"
 +        por "Variável '%-.64s' é uma SESSION variável e não pode ser usada com SET GLOBAL"
 +        rus "Переменная '%-.64s' является потоковой (SESSION) переменной и не может быть изменена с помощью SET GLOBAL"
 +        spa "Variable '%-.64s' es una SESSION variable y no puede ser usada con SET GLOBAL"
 +        swe "Variabel '%-.64s' är en SESSION variabel och kan inte ändrad med SET GLOBAL"
 +ER_GLOBAL_VARIABLE  
 +        nla "Variabele '%-.64s' is GLOBAL en dient te worden gewijzigd met SET GLOBAL"
 +        eng "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL"
 +        ger "Variable '%-.64s' ist eine globale Variable und muss mit SET GLOBAL verändert werden"
 +        ita "La variabile '%-.64s' e' una variabile globale ( GLOBAL ) e deve essere cambiata usando SET GLOBAL"
 +        jpn "変数 '%-.64s' はグローバル変数です。SET GLOBALを使用してください。"
 +        por "Variável '%-.64s' é uma GLOBAL variável e deve ser configurada com SET GLOBAL"
 +        rus "Переменная '%-.64s' является глобальной (GLOBAL) переменной, и ее следует изменять с помощью SET GLOBAL"
 +        spa "Variable '%-.64s' es una GLOBAL variable y no puede ser configurada con SET GLOBAL"
 +        swe "Variabel '%-.64s' är en GLOBAL variabel och bör sättas med SET GLOBAL"
 +ER_NO_DEFAULT 42000 
 +        nla "Variabele '%-.64s' heeft geen standaard waarde"
 +        eng "Variable '%-.64s' doesn't have a default value"
 +        ger "Variable '%-.64s' hat keinen Vorgabewert"
 +        ita "La variabile '%-.64s' non ha un valore di default"
 +        jpn "変数 '%-.64s' にはデフォルト値がありません。"
 +        por "Variável '%-.64s' não tem um valor padrão"
 +        rus "Переменная '%-.64s' не имеет значения по умолчанию"
 +        spa "Variable '%-.64s' no tiene un valor patrón"
 +        swe "Variabel '%-.64s' har inte ett DEFAULT-värde"
 +ER_WRONG_VALUE_FOR_VAR 42000 
 +        nla "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.200s'"
 +        eng "Variable '%-.64s' can't be set to the value of '%-.200s'"
 +        ger "Variable '%-.64s' kann nicht auf '%-.200s' gesetzt werden"
 +        ita "Alla variabile '%-.64s' non puo' essere assegato il valore '%-.200s'"
 +        jpn "変数 '%-.64s' に値 '%-.200s' を設定できません。"
 +        por "Variável '%-.64s' não pode ser configurada para o valor de '%-.200s'"
 +        rus "Переменная '%-.64s' не может быть установлена в значение '%-.200s'"
 +        spa "Variable '%-.64s' no puede ser configurada para el valor de '%-.200s'"
 +        swe "Variabel '%-.64s' kan inte sättas till '%-.200s'"
 +ER_WRONG_TYPE_FOR_VAR 42000 
 +        nla "Foutief argumenttype voor variabele '%-.64s'"
 +        eng "Incorrect argument type to variable '%-.64s'"
 +        ger "Falscher Argumenttyp für Variable '%-.64s'"
 +        ita "Tipo di valore errato per la variabile '%-.64s'"
 +        jpn "変数 '%-.64s' への値の型が不正です。"
 +        por "Tipo errado de argumento para variável '%-.64s'"
 +        rus "Неверный тип аргумента для переменной '%-.64s'"
 +        spa "Tipo de argumento equivocado para variable '%-.64s'"
 +        swe "Fel typ av argument till variabel '%-.64s'"
 +ER_VAR_CANT_BE_READ  
 +        nla "Variabele '%-.64s' kan alleen worden gewijzigd, niet gelezen"
 +        eng "Variable '%-.64s' can only be set, not read"
 +        ger "Variable '%-.64s' kann nur verändert, nicht gelesen werden"
 +        ita "Alla variabile '%-.64s' e' di sola scrittura quindi puo' essere solo assegnato un valore, non letto"
 +        jpn "変数 '%-.64s' は書き込み専用です。読み込みはできません。"
 +        por "Variável '%-.64s' somente pode ser configurada, não lida"
 +        rus "Переменная '%-.64s' может быть только установлена, но не считана"
 +        spa "Variable '%-.64s' solamente puede ser configurada, no leída"
 +        swe "Variabeln '%-.64s' kan endast sättas, inte läsas"
 +ER_CANT_USE_OPTION_HERE 42000 
 +        nla "Foutieve toepassing/plaatsing van '%s'"
 +        eng "Incorrect usage/placement of '%s'"
 +        ger "Falsche Verwendung oder Platzierung von '%s'"
 +        ita "Uso/posizione di '%s' sbagliato"
 +        jpn "'%s' の使用法または場所が不正です。"
 +        por "Errado uso/colocação de '%s'"
 +        rus "Неверное использование или в неверном месте указан '%s'"
 +        spa "Equivocado uso/colocación de '%s'"
 +        swe "Fel använding/placering av '%s'"
 +ER_NOT_SUPPORTED_YET 42000 
 +        nla "Deze versie van MariaDB ondersteunt nog geen '%s'"
 +        eng "This version of MariaDB doesn't yet support '%s'"
 +        ger "Diese MariaDB-Version unterstützt '%s' nicht"
 +        ita "Questa versione di MariaDB non supporta ancora '%s'"
 +        jpn "このバージョンのMariaDBでは、まだ '%s' を利用できません。"
 +        por "Esta versão de MariaDB não suporta ainda '%s'"
 +        rus "Эта версия MariaDB пока еще не поддерживает '%s'"
 +        spa "Esta versión de MariaDB no soporta todavia '%s'"
 +        swe "Denna version av MariaDB kan ännu inte utföra '%s'"
 +ER_MASTER_FATAL_ERROR_READING_BINLOG  
 +        nla "Kreeg fatale fout %d: '%-.320s' van master tijdens lezen van data uit binaire log"
 +        eng "Got fatal error %d from master when reading data from binary log: '%-.320s'"
 +        ger "Schwerer Fehler %d: '%-.320s vom Master beim Lesen des binären Logs"
 +        ita "Errore fatale %d: '%-.320s' dal master leggendo i dati dal log binario"
 +        jpn "致命的なエラー %d: '%-.320s' がマスターでバイナリログ読み込み中に発生しました。"
 +        por "Obteve fatal erro %d: '%-.320s' do master quando lendo dados do binary log"
 +        rus "Получена неисправимая ошибка %d: '%-.320s' от головного сервера в процессе выборки данных из двоичного журнала"
 +        spa "Recibió fatal error %d: '%-.320s' del master cuando leyendo datos del binary log"
 +        swe "Fick fatalt fel %d: '%-.320s' från master vid läsning av binärloggen"
 +ER_SLAVE_IGNORED_TABLE  
 +        eng "Slave SQL thread ignored the query because of replicate-*-table rules"
 +        ger "Slave-SQL-Thread hat die Abfrage aufgrund von replicate-*-table-Regeln ignoriert"
 +        jpn "replicate-*-table ルールに従って、スレーブSQLスレッドはクエリを無視しました。"
 +        nla "Slave SQL thread negeerde de query vanwege replicate-*-table opties"
 +        por "Slave SQL thread ignorado a consulta devido às normas de replicação-*-tabela"
 +        spa "Slave SQL thread ignorado el query debido a las reglas de replicación-*-tabla"
 +        swe "Slav SQL tråden ignorerade frågan pga en replicate-*-table regel"
 +ER_INCORRECT_GLOBAL_LOCAL_VAR  
 +        eng "Variable '%-.192s' is a %s variable"
 +        serbian "Promenljiva '%-.192s' je %s promenljiva"
 +        ger "Variable '%-.192s' ist eine %s-Variable"
 +        jpn "変数 '%-.192s' は %s 変数です。"
 +        nla "Variabele '%-.192s' is geen %s variabele"
 +        spa "Variable '%-.192s' es una %s variable"
 +        swe "Variabel '%-.192s' är av typ %s"
 +ER_WRONG_FK_DEF 42000 
 +        eng "Incorrect foreign key definition for '%-.192s': %s"
 +        ger "Falsche Fremdschlüssel-Definition für '%-.192s': %s"
 +        jpn "外部キー '%-.192s' の定義の不正: %s"
 +        nla "Incorrecte foreign key definitie voor '%-.192s': %s"
 +        por "Definição errada da chave estrangeira para '%-.192s': %s"
 +        spa "Equivocada definición de llave extranjera para '%-.192s': %s"
 +        swe "Felaktig FOREIGN KEY-definition för '%-.192s': %s"
 +ER_KEY_REF_DO_NOT_MATCH_TABLE_REF  
 +        eng "Key reference and table reference don't match"
 +        ger "Schlüssel- und Tabellenverweis passen nicht zusammen"
 +        jpn "外部キーの参照表と定義が一致しません。"
 +        nla "Sleutel- en tabelreferentie komen niet overeen"
 +        por "Referência da chave e referência da tabela não coincidem"
 +        spa "Referencia de llave y referencia de tabla no coinciden"
 +        swe "Nyckelreferensen och tabellreferensen stämmer inte överens"
 +ER_OPERAND_COLUMNS 21000 
 +        eng "Operand should contain %d column(s)"
 +        ger "Operand sollte %d Spalte(n) enthalten"
 +        jpn "オペランドに %d 個の列が必要です。"
 +        nla "Operand behoort %d kolommen te bevatten"
 +        rus "Операнд должен содержать %d колонок"
 +        spa "Operando debe tener %d columna(s)"
 +        ukr "Операнд має складатися з %d стовбців"
 +ER_SUBQUERY_NO_1_ROW 21000 
 +        eng "Subquery returns more than 1 row"
 +        ger "Unterabfrage lieferte mehr als einen Datensatz zurück"
 +        jpn "サブクエリが2行以上の結果を返します。"
 +        nla "Subquery retourneert meer dan 1 rij"
 +        por "Subconsulta retorna mais que 1 registro"
 +        rus "Подзапрос возвращает более одной записи"
 +        spa "Subconsulta retorna mas que 1 línea"
 +        swe "Subquery returnerade mer än 1 rad"
 +        ukr "Підзапит повертає більш нiж 1 запис"
 +ER_UNKNOWN_STMT_HANDLER  
 +        dan "Unknown prepared statement handler (%.*s) given to %s"
 +        eng "Unknown prepared statement handler (%.*s) given to %s"
 +        ger "Unbekannter Prepared-Statement-Handler (%.*s) für %s angegeben"
 +        jpn "'%.*s' はプリペアードステートメントの不明なハンドルです。(%s で指定されました)"
 +        nla "Onebekende prepared statement handler (%.*s) voor %s aangegeven"
 +        por "Desconhecido manipulador de declaração preparado (%.*s) determinado para %s"
 +        spa "Desconocido preparado comando handler (%.*s) dado para %s"
 +        swe "Okänd PREPARED STATEMENT id (%.*s) var given till %s"
 +        ukr "Unknown prepared statement handler (%.*s) given to %s"
 +ER_CORRUPT_HELP_DB  
 +        eng "Help database is corrupt or does not exist"
 +        ger "Die Hilfe-Datenbank ist beschädigt oder existiert nicht"
 +        jpn "ヘルプデータベースは壊れているか存在しません。"
 +        nla "Help database is beschadigd of bestaat niet"
 +        por "Banco de dado de ajuda corrupto ou não existente"
 +        spa "Base de datos Help está corrupto o no existe"
 +        swe "Hjälpdatabasen finns inte eller är skadad"
 +ER_CYCLIC_REFERENCE  
 +        eng "Cyclic reference on subqueries"
 +        ger "Zyklischer Verweis in Unterabfragen"
 +        jpn "サブクエリの参照がループしています。"
 +        nla "Cyclische verwijzing in subqueries"
 +        por "Referência cíclica em subconsultas"
 +        rus "Циклическая ссылка на подзапрос"
 +        spa "Cíclica referencia en subconsultas"
 +        swe "Cyklisk referens i subqueries"
 +        ukr "Циклічне посилання на підзапит"
 +ER_AUTO_CONVERT  
 +        eng "Converting column '%s' from %s to %s"
 +        ger "Feld '%s' wird von %s nach %s umgewandelt"
 +        jpn "列 '%s' を %s から %s へ変換します。"
 +        nla "Veld '%s' wordt van %s naar %s geconverteerd"
 +        por "Convertendo coluna '%s' de %s para %s"
 +        rus "Преобразование поля '%s' из %s в %s"
 +        spa "Convirtiendo columna '%s' de %s para %s"
 +        swe "Konvertar kolumn '%s' från %s till %s"
 +        ukr "Перетворення стовбца '%s' з %s у %s"
 +ER_ILLEGAL_REFERENCE 42S22 
 +        eng "Reference '%-.64s' not supported (%s)"
 +        ger "Verweis '%-.64s' wird nicht unterstützt (%s)"
 +        jpn "'%-.64s' の参照はできません。(%s)"
 +        nla "Verwijzing '%-.64s' niet ondersteund (%s)"
 +        por "Referência '%-.64s' não suportada (%s)"
 +        rus "Ссылка '%-.64s' не поддерживается (%s)"
 +        spa "Referencia '%-.64s' no soportada (%s)"
 +        swe "Referens '%-.64s' stöds inte (%s)"
 +        ukr "Посилання '%-.64s' не пiдтримуется (%s)"
 +ER_DERIVED_MUST_HAVE_ALIAS 42000 
 +        eng "Every derived table must have its own alias"
 +        ger "Für jede abgeleitete Tabelle muss ein eigener Alias angegeben werden"
 +        jpn "導出表には別名が必須です。"
 +        nla "Voor elke afgeleide tabel moet een unieke alias worden gebruikt"
 +        por "Cada tabela derivada deve ter seu próprio alias"
 +        spa "Cada tabla derivada debe tener su propio alias"
 +        swe "Varje 'derived table' måste ha sitt eget alias"
 +ER_SELECT_REDUCED 01000 
 +        eng "Select %u was reduced during optimization"
 +        ger "Select %u wurde während der Optimierung reduziert"
 +        jpn "Select %u は最適化によって減らされました。"
 +        nla "Select %u werd geredureerd tijdens optimtalisatie"
 +        por "Select %u foi reduzido durante otimização"
 +        rus "Select %u был упразднен в процессе оптимизации"
 +        spa "Select %u fué reducido durante optimización"
 +        swe "Select %u reducerades vid optimiering"
 +        ukr "Select %u was скасовано при оптимiзацii"
 +ER_TABLENAME_NOT_ALLOWED_HERE 42000 
 +        eng "Table '%-.192s' from one of the SELECTs cannot be used in %-.32s"
 +        ger "Tabelle '%-.192s', die in einem der SELECT-Befehle verwendet wurde, kann nicht in %-.32s verwendet werden"
 +        jpn "特定のSELECTのみで使用の表 '%-.192s' は %-.32s では使用できません。"
 +        nla "Tabel '%-.192s' uit een van de SELECTS kan niet in %-.32s gebruikt worden"
 +        por "Tabela '%-.192s' de um dos SELECTs não pode ser usada em %-.32s"
 +        spa "Tabla '%-.192s' de uno de los SELECT no puede ser usada en %-.32s"
 +        swe "Tabell '%-.192s' från en SELECT kan inte användas i %-.32s"
 +ER_NOT_SUPPORTED_AUTH_MODE 08004 
 +        eng "Client does not support authentication protocol requested by server; consider upgrading MariaDB client"
 +        ger "Client unterstützt das vom Server erwartete Authentifizierungsprotokoll nicht. Bitte aktualisieren Sie Ihren MariaDB-Client"
 +        jpn "クライアントはサーバーが要求する認証プロトコルに対応できません。MariaDBクライアントのアップグレードを検討してください。"
 +        nla "Client ondersteunt het door de server verwachtte authenticatieprotocol niet. Overweeg een nieuwere MariaDB client te gebruiken"
 +        por "Cliente não suporta o protocolo de autenticação exigido pelo servidor; considere a atualização do cliente MariaDB"
 +        spa "Cliente no soporta protocolo de autenticación solicitado por el servidor; considere actualizar el cliente MariaDB"
 +        swe "Klienten stöder inte autentiseringsprotokollet som begärts av servern; överväg uppgradering av klientprogrammet."
 +ER_SPATIAL_CANT_HAVE_NULL 42000 
 +        eng "All parts of a SPATIAL index must be NOT NULL"
 +        ger "Alle Teile eines SPATIAL-Index müssen als NOT NULL deklariert sein"
 +        jpn "空間索引のキー列は NOT NULL でなければいけません。"
 +        nla "Alle delete van een  SPATIAL index dienen als NOT NULL gedeclareerd te worden"
 +        por "Todas as partes de uma SPATIAL index devem ser NOT NULL"
 +        spa "Todas las partes de una SPATIAL index deben ser NOT NULL"
 +        swe "Alla delar av en SPATIAL index måste vara NOT NULL"
 +ER_COLLATION_CHARSET_MISMATCH 42000 
 +        eng "COLLATION '%s' is not valid for CHARACTER SET '%s'"
 +        ger "COLLATION '%s' ist für CHARACTER SET '%s' ungültig"
 +        jpn "COLLATION '%s' は CHARACTER SET '%s' に適用できません。"
 +        nla "COLLATION '%s' is niet geldig voor CHARACTER SET '%s'"
 +        por "COLLATION '%s' não é válida para CHARACTER SET '%s'"
 +        spa "COLLATION '%s' no es válido para CHARACTER SET '%s'"
 +        swe "COLLATION '%s' är inte tillåtet för CHARACTER SET '%s'"
 +ER_SLAVE_WAS_RUNNING  
 +        eng "Slave is already running"
 +        ger "Slave läuft bereits"
 +        jpn "スレーブはすでに稼働中です。"
 +        nla "Slave is reeds actief"
 +        por "O slave já está rodando"
 +        spa "Slave ya está funcionando"
 +        swe "Slaven har redan startat"
 +ER_SLAVE_WAS_NOT_RUNNING  
 +        eng "Slave already has been stopped"
 +        ger "Slave wurde bereits angehalten"
 +        jpn "スレーブはすでに停止しています。"
 +        nla "Slave is reeds gestopt"
 +        por "O slave já está parado"
 +        spa "Slave ya fué parado"
 +        swe "Slaven har redan stoppat"
 +ER_TOO_BIG_FOR_UNCOMPRESS  
 +        eng "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)"
 +        ger "Unkomprimierte Daten sind zu groß. Die maximale Größe beträgt %d (wahrscheinlich wurde die Länge der unkomprimierten Daten beschädigt)"
 +        jpn "展開後のデータが大きすぎます。最大サイズは %d です。(展開後データの長さ情報が壊れている可能性もあります。)"
 +        nla "Ongecomprimeerder data is te groot; de maximum lengte is %d (waarschijnlijk, de lengte van de gecomprimeerde data was beschadigd)"
 +        por "Tamanho muito grande dos dados des comprimidos. O máximo tamanho é %d. (provavelmente, o comprimento dos dados descomprimidos está corrupto)"
 +        spa "Tamaño demasiado grande para datos descomprimidos. El máximo tamaño es %d. (probablemente, extensión de datos descomprimidos fué corrompida)"
 +ER_ZLIB_Z_MEM_ERROR  
 +        eng "ZLIB: Not enough memory"
 +        ger "ZLIB: Nicht genug Speicher"
 +        jpn "ZLIB: メモリ不足です。"
 +        nla "ZLIB: Onvoldoende geheugen"
 +        por "ZLIB: Não suficiente memória disponível"
 +        spa "Z_MEM_ERROR: No suficiente memoria para zlib"
 +ER_ZLIB_Z_BUF_ERROR  
 +        eng "ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)"
 +        ger "ZLIB: Im Ausgabepuffer ist nicht genug Platz vorhanden (wahrscheinlich wurde die Länge der unkomprimierten Daten beschädigt)"
 +        jpn "ZLIB: 出力バッファに十分な空きがありません。(展開後データの長さ情報が壊れている可能性もあります。)"
 +        nla "ZLIB: Onvoldoende ruimte in uitgaande buffer (waarschijnlijk, de lengte van de ongecomprimeerde data was beschadigd)"
 +        por "ZLIB: Não suficiente espaço no buffer emissor (provavelmente, o comprimento dos dados descomprimidos está corrupto)"
 +        spa "Z_BUF_ERROR: No suficiente espacio en el búfer de salida para zlib (probablemente, extensión de datos descomprimidos fué corrompida)"
 +ER_ZLIB_Z_DATA_ERROR  
 +        eng "ZLIB: Input data corrupted"
 +        ger "ZLIB: Eingabedaten beschädigt"
 +        jpn "ZLIB: 入力データが壊れています。"
 +        nla "ZLIB: Invoer data beschadigd"
 +        por "ZLIB: Dados de entrada está corrupto"
 +        spa "ZLIB: Dato de entrada fué corrompido para zlib"
 +ER_CUT_VALUE_GROUP_CONCAT  
 +        eng "Row %u was cut by GROUP_CONCAT()"
 +ER_WARN_TOO_FEW_RECORDS 01000 
 +        eng "Row %lu doesn't contain data for all columns"
 +        ger "Zeile %lu enthält nicht für alle Felder Daten"
 +        jpn "行 %lu はすべての列へのデータを含んでいません。"
 +        nla "Rij %lu bevat niet de data voor alle kolommen"
 +        por "Conta de registro é menor que a conta de coluna na linha %lu"
 +        spa "Línea %lu no contiene datos para todas las columnas"
 +ER_WARN_TOO_MANY_RECORDS 01000 
 +        eng "Row %lu was truncated; it contained more data than there were input columns"
 +        ger "Zeile %lu gekürzt, die Zeile enthielt mehr Daten, als es Eingabefelder gibt"
 +        jpn "行 %lu はデータを切り捨てられました。列よりも多いデータを含んでいました。"
 +        nla "Regel %lu ingekort, bevatte meer data dan invoer kolommen"
 +        por "Conta de registro é maior que a conta de coluna na linha %lu"
 +        spa "Línea %lu fué truncada; La misma contine mas datos que las que existen en las columnas de entrada"
 +ER_WARN_NULL_TO_NOTNULL 22004 
 +        eng "Column set to default value; NULL supplied to NOT NULL column '%s' at row %lu"
 +        ger "Feld auf Vorgabewert gesetzt, da NULL für NOT-NULL-Feld '%s' in Zeile %lu angegeben"
 +        jpn "列にデフォルト値が設定されました。NOT NULLの列 '%s' に 行 %lu で NULL が与えられました。"
 +        por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %lu"
 +        spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la línea %lu"
 +ER_WARN_DATA_OUT_OF_RANGE 22003 
 +        eng "Out of range value for column '%s' at row %lu"
 +WARN_DATA_TRUNCATED 01000 
 +        eng "Data truncated for column '%s' at row %lu"
 +        ger "Daten abgeschnitten für Feld '%s' in Zeile %lu"
 +        jpn "列 '%s' の 行 %lu でデータが切り捨てられました。"
 +        por "Dado truncado para coluna '%s' na linha %lu"
 +        spa "Datos truncados para columna '%s' en la línea %lu"
 +ER_WARN_USING_OTHER_HANDLER  
 +        eng "Using storage engine %s for table '%s'"
 +        ger "Für Tabelle '%s' wird Speicher-Engine %s benutzt"
 +        jpn "ストレージエンジン %s が表 '%s' に利用されています。"
 +        por "Usando engine de armazenamento %s para tabela '%s'"
 +        spa "Usando motor de almacenamiento %s para tabla '%s'"
 +        swe "Använder handler %s för tabell '%s'"
 +ER_CANT_AGGREGATE_2COLLATIONS
 +        eng "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'"
 +        ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s) und (%s, %s) für Operation '%s'"
 +        jpn "照合順序 (%s,%s) と (%s,%s) の混在は操作 '%s' では不正です。"
 +        por "Combinação ilegal de collations (%s,%s) e (%s,%s) para operação '%s'"
 +        spa "Ilegal mezcla de collations (%s,%s) y (%s,%s) para operación '%s'"
 +ER_DROP_USER  
 +        eng "Cannot drop one or more of the requested users"
 +        ger "Kann einen oder mehrere der angegebenen Benutzer nicht löschen"
 +ER_REVOKE_GRANTS  
 +        eng "Can't revoke all privileges for one or more of the requested users"
 +        ger "Kann nicht alle Berechtigungen widerrufen, die für einen oder mehrere Benutzer gewährt wurden"
 +        jpn "指定されたユーザーから指定された全ての権限を剥奪することができませんでした。"
 +        por "Não pode revocar todos os privilégios, grant para um ou mais dos usuários pedidos"
 +        spa "No puede revocar todos los privilegios, derecho para uno o mas de los usuarios solicitados"
 +ER_CANT_AGGREGATE_3COLLATIONS  
 +        eng "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'"
 +        ger "Unerlaubte Mischung von Sortierreihenfolgen (%s, %s), (%s, %s), (%s, %s) für Operation '%s'"
 +        jpn "照合順序 (%s,%s), (%s,%s), (%s,%s) の混在は操作 '%s' では不正です。"
 +        por "Ilegal combinação de collations (%s,%s), (%s,%s), (%s,%s) para operação '%s'"
 +        spa "Ilegal mezcla de collations (%s,%s), (%s,%s), (%s,%s) para operación '%s'"
 +ER_CANT_AGGREGATE_NCOLLATIONS  
 +        eng "Illegal mix of collations for operation '%s'"
 +        ger "Unerlaubte Mischung von Sortierreihenfolgen für Operation '%s'"
 +        jpn "操作 '%s' では不正な照合順序の混在です。"
 +        por "Ilegal combinação de collations para operação '%s'"
 +        spa "Ilegal mezcla de collations para operación '%s'"
 +ER_VARIABLE_IS_NOT_STRUCT  
 +        eng "Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)"
 +        ger "Variable '%-.64s' ist keine Variablen-Komponente (kann nicht als XXXX.variablen_name verwendet werden)"
 +        jpn "変数 '%-.64s' は構造変数の構成要素ではありません。(XXXX.変数名 という指定はできません。)"
 +        por "Variável '%-.64s' não é uma variável componente (Não pode ser usada como XXXX.variável_nome)"
 +        spa "Variable '%-.64s' no es una variable componente (No puede ser usada como XXXX.variable_name)"
 +ER_UNKNOWN_COLLATION  
 +        eng "Unknown collation: '%-.64s'"
 +        ger "Unbekannte Sortierreihenfolge: '%-.64s'"
 +        jpn "不明な照合順序: '%-.64s'"
 +        por "Collation desconhecida: '%-.64s'"
 +        spa "Collation desconocida: '%-.64s'"
 +ER_SLAVE_IGNORED_SSL_PARAMS  
 +        eng "SSL parameters in CHANGE MASTER are ignored because this MariaDB slave was compiled without SSL support; they can be used later if MariaDB slave with SSL is started"
 +        ger "SSL-Parameter in CHANGE MASTER werden ignoriert, weil dieser MariaDB-Slave ohne SSL-Unterstützung kompiliert wurde. Sie können aber später verwendet werden, wenn ein MariaDB-Slave mit SSL gestartet wird"
 +        jpn "このMySQLスレーブはSSLサポートを含めてコンパイルされていないので、CHANGE MASTER のSSLパラメータは無視されました。今後SSLサポートを持つMySQLスレーブを起動する際に利用されます。"
 +        por "SSL parâmetros em CHANGE MASTER são ignorados porque este escravo MariaDB foi compilado sem o SSL suporte. Os mesmos podem ser usados mais tarde quando o escravo MariaDB com SSL seja iniciado."
 +        spa "Parametros SSL en CHANGE MASTER son ignorados porque este slave MariaDB fue compilado sin soporte SSL; pueden ser usados despues cuando el slave MariaDB con SSL sea inicializado"
 +ER_SERVER_IS_IN_SECURE_AUTH_MODE  
 +        eng "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format"
 +        ger "Server läuft im Modus --secure-auth, aber '%s'@'%s' hat ein Passwort im alten Format. Bitte Passwort ins neue Format ändern"
 +        jpn "サーバーは --secure-auth モードで稼働しています。しかし '%s'@'%s' は古い形式のパスワードを使用しています。新しい形式のパスワードに変更してください。"
 +        por "Servidor está rodando em --secure-auth modo, porêm '%s'@'%s' tem senha no formato antigo; por favor troque a senha para o novo formato"
 +        rus "Сервер запущен в режиме --secure-auth (безопасной авторизации), но для пользователя '%s'@'%s' пароль сохранён в старом формате; необходимо обновить формат пароля"
 +        spa "Servidor está rodando en modo --secure-auth, pero '%s'@'%s' tiene clave en el antiguo formato; por favor cambie la clave para el nuevo formato"
 +ER_WARN_FIELD_RESOLVED  
 +        eng "Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d"
 +        ger "Feld oder Verweis '%-.192s%s%-.192s%s%-.192s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelöst"
 +        jpn "フィールドまたは参照 '%-.192s%s%-.192s%s%-.192s' は SELECT #%d ではなく、SELECT #%d で解決されました。"
 +        por "Campo ou referência '%-.192s%s%-.192s%s%-.192s' de SELECT #%d foi resolvido em SELECT #%d"
 +        rus "Поле или ссылка '%-.192s%s%-.192s%s%-.192s' из SELECTа #%d была найдена в SELECTе #%d"
 +        spa "Campo o referencia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d fue resolvido en SELECT #%d"
 +        ukr "Стовбець або посилання '%-.192s%s%-.192s%s%-.192s' із SELECTу #%d було знайдене у SELECTі #%d"
 +ER_BAD_SLAVE_UNTIL_COND  
 +        eng "Incorrect parameter or combination of parameters for START SLAVE UNTIL"
 +        ger "Falscher Parameter oder falsche Kombination von Parametern für START SLAVE UNTIL"
 +        jpn "START SLAVE UNTIL へのパラメータまたはその組み合わせが不正です。"
 +        por "Parâmetro ou combinação de parâmetros errado para START SLAVE UNTIL"
 +        spa "Parametro equivocado o combinación de parametros para START SLAVE UNTIL"
 +ER_MISSING_SKIP_SLAVE  
 +        eng "It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart"
 +        ger "Es wird empfohlen, mit --skip-slave-start zu starten, wenn mit START SLAVE UNTIL eine Schritt-für-Schritt-Replikation ausgeführt wird. Ansonsten gibt es Probleme, wenn ein Slave-Server unerwartet neu startet"
 +        jpn "START SLAVE UNTIL で段階的にレプリケーションを行う際には、--skip-slave-start オプションを使うことを推奨します。使わない場合、スレーブのmysqldが不慮の再起動をすると問題が発生します。"
 +        por "É recomendado para rodar com --skip-slave-start quando fazendo replicação passo-por-passo com START SLAVE UNTIL, de outra forma você não está seguro em caso de inesperada reinicialição do mysqld escravo"
 +        spa "Es recomendado rodar con --skip-slave-start cuando haciendo replicación step-by-step con START SLAVE UNTIL, a menos que usted no esté seguro en caso de inesperada reinicialización del mysqld slave"
 +ER_UNTIL_COND_IGNORED  
 +        eng "SQL thread is not to be started so UNTIL options are ignored"
 +        ger "SQL-Thread soll nicht gestartet werden. Daher werden UNTIL-Optionen ignoriert"
 +        jpn "スレーブSQLスレッドが開始されないため、UNTILオプションは無視されました。"
 +        por "Thread SQL não pode ser inicializado tal que opções UNTIL são ignoradas"
 +        spa "SQL thread no es inicializado tal que opciones UNTIL son ignoradas"
 +ER_WRONG_NAME_FOR_INDEX 42000 
 +        eng "Incorrect index name '%-.100s'"
 +        ger "Falscher Indexname '%-.100s'"
 +        jpn "索引名 '%-.100s' は不正です。"
 +        por "Incorreto nome de índice '%-.100s'"
 +        spa "Nombre de índice incorrecto '%-.100s'"
 +        swe "Felaktigt index namn '%-.100s'"
 +ER_WRONG_NAME_FOR_CATALOG 42000 
 +        eng "Incorrect catalog name '%-.100s'"
 +        ger "Falscher Katalogname '%-.100s'"
 +        jpn "カタログ名 '%-.100s' は不正です。"
 +        por "Incorreto nome de catálogo '%-.100s'"
 +        spa "Nombre de catalog incorrecto '%-.100s'"
 +        swe "Felaktigt katalog namn '%-.100s'"
 +ER_WARN_QC_RESIZE  
 +        eng "Query cache failed to set size %llu; new query cache size is %lu"
 +        ger "Änderung der Query-Cache-Größe auf %llu fehlgeschlagen; neue Query-Cache-Größe ist %lu"
 +        por "Falha em Query cache para configurar tamanho %llu, novo tamanho de query cache é %lu"
 +        rus "Кеш запросов не может установить размер %llu, новый размер кеша зпросов - %lu"
 +        spa "Query cache fallada para configurar tamaño %llu, nuevo tamaño de query cache es %lu"
 +        swe "Storleken av "Query cache" kunde inte sättas till %llu, ny storlek är %lu"
 +        ukr "Кеш запитів неспроможен встановити розмір %llu, новий розмір кеша запитів - %lu"
 +ER_BAD_FT_COLUMN  
 +        eng "Column '%-.192s' cannot be part of FULLTEXT index"
 +        ger "Feld '%-.192s' kann nicht Teil eines FULLTEXT-Index sein"
 +        jpn "列 '%-.192s' は全文索引のキーにはできません。"
 +        por "Coluna '%-.192s' não pode ser parte de índice FULLTEXT"
 +        spa "Columna '%-.192s' no puede ser parte de FULLTEXT index"
 +        swe "Kolumn '%-.192s' kan inte vara del av ett FULLTEXT index"
 +ER_UNKNOWN_KEY_CACHE  
 +        eng "Unknown key cache '%-.100s'"
 +        ger "Unbekannter Schlüssel-Cache '%-.100s'"
 +        jpn "'%-.100s' は不明なキーキャッシュです。"
 +        por "Key cache desconhecida '%-.100s'"
 +        spa "Desconocida key cache '%-.100s'"
 +        swe "Okänd nyckel cache '%-.100s'"
 +ER_WARN_HOSTNAME_WONT_WORK  
 +        eng "MariaDB is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work"
 +        ger "MariaDB wurde mit --skip-name-resolve gestartet. Diese Option darf nicht verwendet werden, damit diese Rechtevergabe möglich ist"
 +        jpn "MariaDBは --skip-name-resolve モードで起動しています。このオプションを外して再起動しなければ、この権限操作は機能しません。"
 +        por "MariaDB foi inicializado em modo --skip-name-resolve. Você necesita reincializá-lo sem esta opção para este grant funcionar"
 +        spa "MariaDB esta inicializado en modo --skip-name-resolve. Usted necesita reinicializarlo sin esta opción para este derecho funcionar"
 +ER_UNKNOWN_STORAGE_ENGINE 42000 
 +        eng "Unknown storage engine '%s'"
 +        ger "Unbekannte Speicher-Engine '%s'"
 +        jpn "'%s' は不明なストレージエンジンです。"
 +        por "Motor de tabela desconhecido '%s'"
 +        spa "Desconocido motor de tabla '%s'"
 +ER_WARN_DEPRECATED_SYNTAX  
 +        eng "'%s' is deprecated and will be removed in a future release. Please use %s instead"
 +        ger "'%s' ist veraltet. Bitte benutzen Sie '%s'"
 +        jpn "'%s' は将来のリリースで廃止予定です。代わりに %s を使用してください。"
 +        por "'%s' é desatualizado. Use '%s' em seu lugar"
 +        spa "'%s' está desaprobado, use '%s' en su lugar"
 +ER_NON_UPDATABLE_TABLE  
 +        eng "The target table %-.100s of the %s is not updatable"
 +        ger "Die Zieltabelle %-.100s von %s ist nicht aktualisierbar"
 +        jpn "対象表 %-.100s は更新可能ではないので、%s を行えません。"
 +        por "A tabela destino %-.100s do %s não é atualizável"
 +        rus "Таблица %-.100s в %s не может изменятся"
 +        spa "La tabla destino %-.100s del %s no es actualizable"
 +        swe "Tabell %-.100s använd med '%s' är inte uppdateringsbar"
 +        ukr "Таблиця %-.100s у %s не може оновлюватись"
 +ER_FEATURE_DISABLED  
 +        eng "The '%s' feature is disabled; you need MariaDB built with '%s' to have it working"
 +        ger "Das Feature '%s' ist ausgeschaltet, Sie müssen MariaDB mit '%s' übersetzen, damit es verfügbar ist"
 +        jpn "機能 '%s' は無効です。利用するためには '%s' を含めてビルドしたMariaDBが必要です。"
 +        por "O recurso '%s' foi desativado; você necessita MariaDB construído com '%s' para ter isto funcionando"
 +        spa "El recurso '%s' fue deshabilitado; usted necesita construir MariaDB con '%s' para tener eso funcionando"
 +        swe "'%s' är inte aktiverad; För att aktivera detta måste du bygga om MariaDB med '%s' definierad"
 +ER_OPTION_PREVENTS_STATEMENT  
 +        eng "The MariaDB server is running with the %s option so it cannot execute this statement"
 +        ger "Der MariaDB-Server läuft mit der Option %s und kann diese Anweisung deswegen nicht ausführen"
 +        jpn "MariaDBサーバーが %s オプションで実行されているので、このステートメントは実行できません。"
 +        por "O servidor MariaDB está rodando com a opção %s razão pela qual não pode executar esse commando"
 +        spa "El servidor MariaDB está rodando con la opción %s tal que no puede ejecutar este comando"
 +        swe "MariaDB är startad med %s. Pga av detta kan du inte använda detta kommando"
 +ER_DUPLICATED_VALUE_IN_TYPE  
 +        eng "Column '%-.100s' has duplicated value '%-.64s' in %s"
 +        ger "Feld '%-.100s' hat doppelten Wert '%-.64s' in %s"
 +        jpn "列 '%-.100s' で、重複する値 '%-.64s' が %s に指定されています。"
 +        por "Coluna '%-.100s' tem valor duplicado '%-.64s' em %s"
 +        spa "Columna '%-.100s' tiene valor doblado '%-.64s' en %s"
 +ER_TRUNCATED_WRONG_VALUE 22007 
 +        eng "Truncated incorrect %-.32s value: '%-.128s'"
 +        ger "Falscher %-.32s-Wert gekürzt: '%-.128s'"
 +        jpn "不正な %-.32s の値が切り捨てられました。: '%-.128s'"
 +        por "Truncado errado %-.32s valor: '%-.128s'"
 +        spa "Equivocado truncado %-.32s valor: '%-.128s'"
 +ER_TOO_MUCH_AUTO_TIMESTAMP_COLS  
 +        eng "Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause"
 +        ger "Fehlerhafte Tabellendefinition. Es kann nur eine einzige TIMESTAMP-Spalte mit CURRENT_TIMESTAMP als DEFAULT oder in einer ON-UPDATE-Klausel geben"
 +        jpn "不正な表定義です。DEFAULT句またはON UPDATE句に CURRENT_TIMESTAMP をともなうTIMESTAMP型の列は1つまでです。"
 +        por "Incorreta definição de tabela; Pode ter somente uma coluna TIMESTAMP com CURRENT_TIMESTAMP em DEFAULT ou ON UPDATE cláusula"
 +        spa "Incorrecta definición de tabla; Solamente debe haber una columna TIMESTAMP con CURRENT_TIMESTAMP en DEFAULT o ON UPDATE cláusula"
 +ER_INVALID_ON_UPDATE  
 +        eng "Invalid ON UPDATE clause for '%-.192s' column"
 +        ger "Ungültige ON-UPDATE-Klausel für Spalte '%-.192s'"
 +        jpn "列 '%-.192s' に ON UPDATE句は無効です。"
 +        por "Inválida cláusula ON UPDATE para campo '%-.192s'"
 +        spa "Inválido ON UPDATE cláusula para campo '%-.192s'"
 +ER_UNSUPPORTED_PS  
 +        eng "This command is not supported in the prepared statement protocol yet"
 +        ger "Dieser Befehl wird im Protokoll für vorbereitete Anweisungen noch nicht unterstützt"
 +ER_GET_ERRMSG  
 +        dan "Modtog fejl %d '%-.200s' fra %s"
 +        eng "Got error %d '%-.200s' from %s"
 +        ger "Fehler %d '%-.200s' von %s"
 +        jpn "エラー %d '%-.200s' が %s から返されました。"
 +        nor "Mottok feil %d '%-.200s' fa %s"
 +        norwegian-ny "Mottok feil %d '%-.200s' fra %s"
 +ER_GET_TEMPORARY_ERRMSG  
 +        dan "Modtog temporary fejl %d '%-.200s' fra %s"
 +        eng "Got temporary error %d '%-.200s' from %s"
 +        jpn "一時エラー %d '%-.200s' が %s から返されました。"
 +        ger "Temporärer Fehler %d '%-.200s' von %s"
 +        nor "Mottok temporary feil %d '%-.200s' fra %s"
 +        norwegian-ny "Mottok temporary feil %d '%-.200s' fra %s"
 +ER_UNKNOWN_TIME_ZONE  
 +        eng "Unknown or incorrect time zone: '%-.64s'"
 +        ger "Unbekannte oder falsche Zeitzone: '%-.64s'"
 +ER_WARN_INVALID_TIMESTAMP  
 +        eng "Invalid TIMESTAMP value in column '%s' at row %lu"
 +        ger "Ungültiger TIMESTAMP-Wert in Feld '%s', Zeile %lu"
 +ER_INVALID_CHARACTER_STRING  
 +        eng "Invalid %s character string: '%.64s'"
 +        ger "Ungültiger %s-Zeichen-String: '%.64s'"
 +ER_WARN_ALLOWED_PACKET_OVERFLOWED  
 +        eng "Result of %s() was larger than max_allowed_packet (%ld) - truncated"
 +        ger "Ergebnis von %s() war größer als max_allowed_packet (%ld) Bytes und wurde deshalb gekürzt"
 +ER_CONFLICTING_DECLARATIONS  
 +        eng "Conflicting declarations: '%s%s' and '%s%s'"
 +        ger "Widersprüchliche Deklarationen: '%s%s' und '%s%s'"
 +ER_SP_NO_RECURSIVE_CREATE 2F003 
 +        eng "Can't create a %s from within another stored routine"
 +        ger "Kann kein %s innerhalb einer anderen gespeicherten Routine erzeugen"
 +ER_SP_ALREADY_EXISTS 42000 
 +        eng "%s %s already exists"
 +        ger "%s %s existiert bereits"
 +ER_SP_DOES_NOT_EXIST 42000 
 +        eng "%s %s does not exist"
 +        ger "%s %s existiert nicht"
 +ER_SP_DROP_FAILED  
 +        eng "Failed to DROP %s %s"
 +        ger "DROP %s %s ist fehlgeschlagen"
 +ER_SP_STORE_FAILED  
 +        eng "Failed to CREATE %s %s"
 +        ger "CREATE %s %s ist fehlgeschlagen"
 +ER_SP_LILABEL_MISMATCH 42000 
 +        eng "%s with no matching label: %s"
 +        ger "%s ohne passende Marke: %s"
 +ER_SP_LABEL_REDEFINE 42000 
 +        eng "Redefining label %s"
 +        ger "Neudefinition der Marke %s"
 +ER_SP_LABEL_MISMATCH 42000 
 +        eng "End-label %s without match"
 +        ger "Ende-Marke %s ohne zugehörigen Anfang"
 +ER_SP_UNINIT_VAR 01000 
 +        eng "Referring to uninitialized variable %s"
 +        ger "Zugriff auf nichtinitialisierte Variable %s"
 +ER_SP_BADSELECT 0A000 
 +        eng "PROCEDURE %s can't return a result set in the given context"
 +        ger "PROCEDURE %s kann im gegebenen Kontext keine Ergebnismenge zurückgeben"
 +ER_SP_BADRETURN 42000 
 +        eng "RETURN is only allowed in a FUNCTION"
 +        ger "RETURN ist nur innerhalb einer FUNCTION erlaubt"
 +ER_SP_BADSTATEMENT 0A000 
 +        eng "%s is not allowed in stored procedures"
 +        ger "%s ist in gespeicherten Prozeduren nicht erlaubt"
 +ER_UPDATE_LOG_DEPRECATED_IGNORED 42000 
 +        eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MariaDB 5.6."
 +        ger "Das Update-Log ist veraltet und wurde durch das Binär-Log ersetzt. SET SQL_LOG_UPDATE wird ignoriert. Diese Option wird in MariaDB 5.6 entfernt."
 +ER_UPDATE_LOG_DEPRECATED_TRANSLATED 42000 
 +        eng "The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been translated to SET SQL_LOG_BIN. This option will be removed in MariaDB 5.6."
 +        ger "Das Update-Log ist veraltet und wurde durch das Binär-Log ersetzt. SET SQL_LOG_UPDATE wurde in SET SQL_LOG_BIN übersetzt. Diese Option wird in MariaDB 5.6 entfernt."
 +ER_QUERY_INTERRUPTED 70100 
 +        eng "Query execution was interrupted"
 +        ger "Ausführung der Abfrage wurde unterbrochen"
 +ER_SP_WRONG_NO_OF_ARGS 42000 
 +        eng "Incorrect number of arguments for %s %s; expected %u, got %u"
 +        ger "Falsche Anzahl von Argumenten für %s %s; erwarte %u, erhalte %u"
 +ER_SP_COND_MISMATCH 42000 
 +        eng "Undefined CONDITION: %s"
 +        ger "Undefinierte CONDITION: %s"
 +ER_SP_NORETURN 42000 
 +        eng "No RETURN found in FUNCTION %s"
 +        ger "Kein RETURN in FUNCTION %s gefunden"
 +ER_SP_NORETURNEND 2F005 
 +        eng "FUNCTION %s ended without RETURN"
 +        ger "FUNCTION %s endete ohne RETURN"
 +ER_SP_BAD_CURSOR_QUERY 42000 
 +        eng "Cursor statement must be a SELECT"
 +        ger "Cursor-Anweisung muss ein SELECT sein"
 +ER_SP_BAD_CURSOR_SELECT 42000 
 +        eng "Cursor SELECT must not have INTO"
 +        ger "Cursor-SELECT darf kein INTO haben"
 +ER_SP_CURSOR_MISMATCH 42000 
 +        eng "Undefined CURSOR: %s"
 +        ger "Undefinierter CURSOR: %s"
 +ER_SP_CURSOR_ALREADY_OPEN 24000 
 +        eng "Cursor is already open"
 +        ger "Cursor ist schon geöffnet"
 +ER_SP_CURSOR_NOT_OPEN 24000 
 +        eng "Cursor is not open"
 +        ger "Cursor ist nicht geöffnet"
 +ER_SP_UNDECLARED_VAR 42000 
 +        eng "Undeclared variable: %s"
 +        ger "Nicht deklarierte Variable: %s"
 +ER_SP_WRONG_NO_OF_FETCH_ARGS  
 +        eng "Incorrect number of FETCH variables"
 +        ger "Falsche Anzahl von FETCH-Variablen"
 +ER_SP_FETCH_NO_DATA 02000 
 +        eng "No data - zero rows fetched, selected, or processed"
 +        ger "Keine Daten - null Zeilen geholt (fetch), ausgewählt oder verarbeitet"
 +ER_SP_DUP_PARAM 42000 
 +        eng "Duplicate parameter: %s"
 +        ger "Doppelter Parameter: %s"
 +ER_SP_DUP_VAR 42000 
 +        eng "Duplicate variable: %s"
 +        ger "Doppelte Variable: %s"
 +ER_SP_DUP_COND 42000 
 +        eng "Duplicate condition: %s"
 +        ger "Doppelte Bedingung: %s"
 +ER_SP_DUP_CURS 42000 
 +        eng "Duplicate cursor: %s"
 +        ger "Doppelter Cursor: %s"
 +ER_SP_CANT_ALTER  
 +        eng "Failed to ALTER %s %s"
 +        ger "ALTER %s %s fehlgeschlagen"
 +ER_SP_SUBSELECT_NYI 0A000 
 +        eng "Subquery value not supported"
 +        ger "Subquery-Wert wird nicht unterstützt"
 +ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG 0A000
 +        eng "%s is not allowed in stored function or trigger"
 +        ger "%s ist in gespeicherten Funktionen und in Triggern nicht erlaubt"
 +ER_SP_VARCOND_AFTER_CURSHNDLR 42000 
 +        eng "Variable or condition declaration after cursor or handler declaration"
 +        ger "Deklaration einer Variablen oder einer Bedingung nach der Deklaration eines Cursors oder eines Handlers"
 +ER_SP_CURSOR_AFTER_HANDLER 42000 
 +        eng "Cursor declaration after handler declaration"
 +        ger "Deklaration eines Cursors nach der Deklaration eines Handlers"
 +ER_SP_CASE_NOT_FOUND 20000 
 +        eng "Case not found for CASE statement"
 +        ger "Fall für CASE-Anweisung nicht gefunden"
 +ER_FPARSER_TOO_BIG_FILE  
 +        eng "Configuration file '%-.192s' is too big"
 +        ger "Konfigurationsdatei '%-.192s' ist zu groß"
 +        rus "Слишком большой конфигурационный файл '%-.192s'"
 +        ukr "Занадто великий конфігураційний файл '%-.192s'"
 +ER_FPARSER_BAD_HEADER  
 +        eng "Malformed file type header in file '%-.192s'"
 +        ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.192s'"
 +        rus "Неверный заголовок типа файла '%-.192s'"
 +        ukr "Невірний заголовок типу у файлі '%-.192s'"
 +ER_FPARSER_EOF_IN_COMMENT  
 +        eng "Unexpected end of file while parsing comment '%-.200s'"
 +        ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.200s'"
 +        rus "Неожиданный конец файла в коментарии '%-.200s'"
 +        ukr "Несподіванний кінець файлу у коментарі '%-.200s'"
 +ER_FPARSER_ERROR_IN_PARAMETER  
 +        eng "Error while parsing parameter '%-.192s' (line: '%-.192s')"
 +        ger "Fehler beim Parsen des Parameters '%-.192s' (Zeile: '%-.192s')"
 +        rus "Ошибка при распознавании параметра '%-.192s' (строка: '%-.192s')"
 +        ukr "Помилка в роспізнаванні параметру '%-.192s' (рядок: '%-.192s')"
 +ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER  
 +        eng "Unexpected end of file while skipping unknown parameter '%-.192s'"
 +        ger "Unerwartetes Dateiende beim Überspringen des unbekannten Parameters '%-.192s'"
 +        rus "Неожиданный конец файла при пропуске неизвестного параметра '%-.192s'"
 +        ukr "Несподіванний кінець файлу у спробі проминути невідомий параметр '%-.192s'"
 +ER_VIEW_NO_EXPLAIN  
 +        eng "ANALYZE/EXPLAIN/SHOW can not be issued; lacking privileges for underlying table"
 +        ger "ANALYZE/EXPLAIN/SHOW kann nicht verlangt werden. Rechte für zugrunde liegende Tabelle fehlen"
 +        rus "ANALYZE/EXPLAIN/SHOW не может быть выполнено; недостаточно прав на таблицы запроса"
 +        ukr "ANALYZE/EXPLAIN/SHOW не може бути виконано; немає прав на таблиці запиту"
 +ER_FRM_UNKNOWN_TYPE  
 +        eng "File '%-.192s' has unknown type '%-.64s' in its header"
 +        ger "Datei '%-.192s' hat unbekannten Typ '%-.64s' im Header"
 +        rus "Файл '%-.192s' содержит неизвестный тип '%-.64s' в заголовке"
 +        ukr "Файл '%-.192s' має невідомий тип '%-.64s' у заголовку"
 +ER_WRONG_OBJECT  
 +        eng "'%-.192s.%-.192s' is not %s"
 +        ger "'%-.192s.%-.192s' ist nicht %s"
 +        rus "'%-.192s.%-.192s' - не %s"
 +        ukr "'%-.192s.%-.192s' не є %s"
 +ER_NONUPDATEABLE_COLUMN  
 +        eng "Column '%-.192s' is not updatable"
 +        ger "Feld '%-.192s' ist nicht aktualisierbar"
 +        rus "Столбец '%-.192s' не обновляемый"
 +        ukr "Стовбець '%-.192s' не може бути зминений"
 +ER_VIEW_SELECT_DERIVED  
 +        eng "View's SELECT contains a subquery in the FROM clause"
 +        ger "SELECT der View enthält eine Subquery in der FROM-Klausel"
 +        rus "View SELECT содержит подзапрос в конструкции FROM"
 +        ukr "View SELECT має підзапит у конструкції FROM"
 +
 +# Not used any more, syntax error is returned instead
 +ER_VIEW_SELECT_CLAUSE  
 +        eng "View's SELECT contains a '%s' clause"
 +        ger "SELECT der View enthält eine '%s'-Klausel"
 +        rus "View SELECT содержит конструкцию '%s'"
 +        ukr "View SELECT має конструкцію '%s'"
 +ER_VIEW_SELECT_VARIABLE  
 +        eng "View's SELECT contains a variable or parameter"
 +        ger "SELECT der View enthält eine Variable oder einen Parameter"
 +        rus "View SELECT содержит переменную или параметр"
 +        ukr "View SELECT має зминну або параметер"
 +ER_VIEW_SELECT_TMPTABLE  
 +        eng "View's SELECT refers to a temporary table '%-.192s'"
 +        ger "SELECT der View verweist auf eine temporäre Tabelle '%-.192s'"
 +        rus "View SELECT содержит ссылку на временную таблицу '%-.192s'"
 +        ukr "View SELECT використовує тимчасову таблицю '%-.192s'"
 +ER_VIEW_WRONG_LIST  
 +        eng "View's SELECT and view's field list have different column counts"
 +        ger "SELECT- und Feldliste der Views haben unterschiedliche Anzahlen von Spalten"
 +        rus "View SELECT и список полей view имеют разное количество столбцов"
 +        ukr "View SELECT і перелік стовбців view мають різну кількість сковбців"
 +ER_WARN_VIEW_MERGE  
 +        eng "View merge algorithm can't be used here for now (assumed undefined algorithm)"
 +        ger "View-Merge-Algorithmus kann hier momentan nicht verwendet werden (undefinierter Algorithmus wird angenommen)"
 +        rus "Алгоритм слияния view не может быть использован сейчас (алгоритм будет неопеределенным)"
 +        ukr "Алгоритм зливання view не може бути використаний зараз (алгоритм буде невизначений)"
 +ER_WARN_VIEW_WITHOUT_KEY  
 +        eng "View being updated does not have complete key of underlying table in it"
 +        ger "Die aktualisierte View enthält nicht den vollständigen Schlüssel der zugrunde liegenden Tabelle"
 +        rus "Обновляемый view не содержит ключа использованных(ой) в нем таблиц(ы)"
 +        ukr "View, що оновлюеться, не містить повного ключа таблиці(ь), що викорістана в ньюому"
 +ER_VIEW_INVALID  
 +        eng "View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them"
 +ER_SP_NO_DROP_SP  
 +        eng "Can't drop or alter a %s from within another stored routine"
 +        ger "Kann eine %s nicht von innerhalb einer anderen gespeicherten Routine löschen oder ändern"
 +ER_SP_GOTO_IN_HNDLR  
 +        eng "GOTO is not allowed in a stored procedure handler"
 +        ger "GOTO ist im Handler einer gespeicherten Prozedur nicht erlaubt"
 +ER_TRG_ALREADY_EXISTS  
 +        eng "Trigger already exists"
 +        ger "Trigger existiert bereits"
 +ER_TRG_DOES_NOT_EXIST  
 +        eng "Trigger does not exist"
 +        ger "Trigger existiert nicht"
 +ER_TRG_ON_VIEW_OR_TEMP_TABLE  
 +        eng "Trigger's '%-.192s' is view or temporary table"
 +        ger "'%-.192s' des Triggers ist View oder temporäre Tabelle"
 +ER_TRG_CANT_CHANGE_ROW  
 +        eng "Updating of %s row is not allowed in %strigger"
 +        ger "Aktualisieren einer %s-Zeile ist in einem %s-Trigger nicht erlaubt"
 +ER_TRG_NO_SUCH_ROW_IN_TRG  
 +        eng "There is no %s row in %s trigger"
 +        ger "Es gibt keine %s-Zeile im %s-Trigger"
 +ER_NO_DEFAULT_FOR_FIELD  
 +        eng "Field '%-.192s' doesn't have a default value"
 +        ger "Feld '%-.192s' hat keinen Vorgabewert"
 +ER_DIVISION_BY_ZERO 22012 
 +        eng "Division by 0"
 +        ger "Division durch 0"
 +ER_TRUNCATED_WRONG_VALUE_FOR_FIELD  22007
 +        eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %lu"
 +        ger "Falscher %-.32s-Wert: '%-.128s' für Feld '%.192s' in Zeile %lu"
 +ER_ILLEGAL_VALUE_FOR_TYPE 22007 
 +        eng "Illegal %s '%-.192s' value found during parsing"
 +        ger "Nicht zulässiger %s-Wert '%-.192s' beim Parsen gefunden"
 +ER_VIEW_NONUPD_CHECK  
 +        eng "CHECK OPTION on non-updatable view %`-.192s.%`-.192s"
 +        ger "CHECK OPTION auf nicht-aktualisierbarem View %`-.192s.%`-.192s"
 +        rus "CHECK OPTION для необновляемого VIEW %`-.192s.%`-.192s"
 +        ukr "CHECK OPTION для VIEW %`-.192s.%`-.192s що не може бути оновленним"
 +ER_VIEW_CHECK_FAILED 44000
 +        eng "CHECK OPTION failed %`-.192s.%`-.192s"
 +        ger "CHECK OPTION fehlgeschlagen: %`-.192s.%`-.192s"
 +        rus "Проверка CHECK OPTION для VIEW %`-.192s.%`-.192s провалилась"
 +        ukr "Перевірка CHECK OPTION для VIEW %`-.192s.%`-.192s не пройшла"
 +ER_PROCACCESS_DENIED_ERROR 42000 
 +        eng "%-.32s command denied to user '%s'@'%s' for routine '%-.192s'"
 +        ger "Befehl %-.32s nicht zulässig für Benutzer '%s'@'%s' in Routine '%-.192s'"
 +ER_RELAY_LOG_FAIL  
 +        eng "Failed purging old relay logs: %s"
 +        ger "Bereinigen alter Relais-Logs fehlgeschlagen: %s"
 +ER_PASSWD_LENGTH  
 +        eng "Password hash should be a %d-digit hexadecimal number"
 +        ger "Passwort-Hash sollte eine Hexdaezimalzahl mit %d Stellen sein"
 +ER_UNKNOWN_TARGET_BINLOG  
 +        eng "Target log not found in binlog index"
 +        ger "Ziel-Log im Binlog-Index nicht gefunden"
 +ER_IO_ERR_LOG_INDEX_READ  
 +        eng "I/O error reading log index file"
 +        ger "Fehler beim Lesen der Log-Index-Datei"
 +ER_BINLOG_PURGE_PROHIBITED  
 +        eng "Server configuration does not permit binlog purge"
 +        ger "Server-Konfiguration erlaubt keine Binlog-Bereinigung"
 +ER_FSEEK_FAIL  
 +        eng "Failed on fseek()"
 +        ger "fseek() fehlgeschlagen"
 +ER_BINLOG_PURGE_FATAL_ERR  
 +        eng "Fatal error during log purge"
 +        ger "Schwerwiegender Fehler bei der Log-Bereinigung"
 +ER_LOG_IN_USE  
 +        eng "A purgeable log is in use, will not purge"
 +        ger "Ein zu bereinigendes Log wird gerade benutzt, daher keine Bereinigung"
 +ER_LOG_PURGE_UNKNOWN_ERR  
 +        eng "Unknown error during log purge"
 +        ger "Unbekannter Fehler bei Log-Bereinigung"
 +ER_RELAY_LOG_INIT  
 +        eng "Failed initializing relay log position: %s"
 +        ger "Initialisierung der Relais-Log-Position fehlgeschlagen: %s"
 +ER_NO_BINARY_LOGGING  
 +        eng "You are not using binary logging"
 +        ger "Sie verwenden keine Binärlogs"
 +ER_RESERVED_SYNTAX  
 +        eng "The '%-.64s' syntax is reserved for purposes internal to the MariaDB server"
 +        ger "Die Schreibweise '%-.64s' ist für interne Zwecke des MariaDB-Servers reserviert"
 +ER_WSAS_FAILED  
 +        eng "WSAStartup Failed"
 +        ger "WSAStartup fehlgeschlagen"
 +ER_DIFF_GROUPS_PROC  
 +        eng "Can't handle procedures with different groups yet"
 +        ger "Kann Prozeduren mit unterschiedlichen Gruppen noch nicht verarbeiten"
 +ER_NO_GROUP_FOR_PROC  
 +        eng "Select must have a group with this procedure"
 +        ger "SELECT muss bei dieser Prozedur ein GROUP BY haben"
 +ER_ORDER_WITH_PROC  
 +        eng "Can't use ORDER clause with this procedure"
 +        ger "Kann bei dieser Prozedur keine ORDER-BY-Klausel verwenden"
 +ER_LOGGING_PROHIBIT_CHANGING_OF  
 +        eng "Binary logging and replication forbid changing the global server %s"
 +        ger "Binärlogs und Replikation verhindern Wechsel des globalen Servers %s"
 +ER_NO_FILE_MAPPING  
 +        eng "Can't map file: %-.200s, errno: %M"
 +        ger "Kann Datei nicht abbilden: %-.200s, Fehler: %M"
 +ER_WRONG_MAGIC  
 +        eng "Wrong magic in %-.64s"
 +        ger "Falsche magische Zahlen in %-.64s"
 +ER_PS_MANY_PARAM  
 +        eng "Prepared statement contains too many placeholders"
 +        ger "Vorbereitete Anweisung enthält zu viele Platzhalter"
 +ER_KEY_PART_0  
 +        eng "Key part '%-.192s' length cannot be 0"
 +        ger "Länge des Schlüsselteils '%-.192s' kann nicht 0 sein"
 +ER_VIEW_CHECKSUM  
 +        eng "View text checksum failed"
 +        ger "View-Text-Prüfsumme fehlgeschlagen"
 +        rus "Проверка контрольной суммы текста VIEW провалилась"
 +        ukr "Перевірка контрольної суми тексту VIEW не пройшла"
 +ER_VIEW_MULTIUPDATE  
 +        eng "Can not modify more than one base table through a join view '%-.192s.%-.192s'"
 +        ger "Kann nicht mehr als eine Basistabelle über Join-View '%-.192s.%-.192s' ändern"
 +        rus "Нельзя изменить больше чем одну базовую таблицу используя многотабличный VIEW '%-.192s.%-.192s'"
 +        ukr "Неможливо оновити більш ниж одну базову таблицю выкористовуючи VIEW '%-.192s.%-.192s', що містіть декілька таблиць"
 +ER_VIEW_NO_INSERT_FIELD_LIST  
 +        eng "Can not insert into join view '%-.192s.%-.192s' without fields list"
 +        ger "Kann nicht ohne Feldliste in Join-View '%-.192s.%-.192s' einfügen"
 +        rus "Нельзя вставлять записи в многотабличный VIEW '%-.192s.%-.192s' без списка полей"
 +        ukr "Неможливо уставити рядки у VIEW '%-.192s.%-.192s', що містить декілька таблиць, без списку стовбців"
 +ER_VIEW_DELETE_MERGE_VIEW  
 +        eng "Can not delete from join view '%-.192s.%-.192s'"
 +        ger "Kann nicht aus Join-View '%-.192s.%-.192s' löschen"
 +        rus "Нельзя удалять из многотабличного VIEW '%-.192s.%-.192s'"
 +        ukr "Неможливо видалити рядки у VIEW '%-.192s.%-.192s', що містить декілька таблиць"
 +ER_CANNOT_USER  
 +        eng "Operation %s failed for %.256s"
 +        ger "Operation %s schlug fehl für %.256s"
 +        norwegian-ny "Operation %s failed for '%.256s'"
 +ER_XAER_NOTA XAE04
 +        eng "XAER_NOTA: Unknown XID"
 +        ger "XAER_NOTA: Unbekannte XID"
 +ER_XAER_INVAL XAE05
 +        eng "XAER_INVAL: Invalid arguments (or unsupported command)"
 +        ger "XAER_INVAL: Ungültige Argumente (oder nicht unterstützter Befehl)"
 +ER_XAER_RMFAIL XAE07
 +        eng "XAER_RMFAIL: The command cannot be execute