summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorSeppo Jaakola <seppo.jaakola@codership.com>2012-06-12 16:34:18 +0300
committerSeppo Jaakola <seppo.jaakola@codership.com>2012-06-12 16:34:18 +0300
commitb96af9a3abe792c8711d59b693509ccd0677a150 (patch)
tree526a4e021acc77d2379cee74873bd3cae1b53fd9 /sql/handler.cc
parent33ffe0dd29b6564e49dde8b1abda914da4b2f178 (diff)
parent9892ace475752e0ddd333500bec91e13ca54d0f3 (diff)
downloadmariadb-git-b96af9a3abe792c8711d59b693509ccd0677a150.tar.gz
references lp:1011983
Merged latest MariaDB development in: bzr merge lp:maria/5.5 => Text conflict in CMakeLists.txt Text conflict in sql/handler.h Text conflict in support-files/CMakeLists.txt 3 conflicts
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 861a63ec88a..8b3573eb23e 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2000, 2011, Oracle and/or its affiliates.
+/* Copyright (c) 2000, 2012, Oracle and/or its affiliates.
Copyright (c) 2009-2011 Monty Program Ab
This program is free software; you can redistribute it and/or modify
@@ -11,8 +11,8 @@
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
/** @file handler.cc
@@ -365,7 +365,8 @@ int ha_init_errors(void)
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_ERR_INDEX_CORRUPT, ER_DEFAULT(ER_INDEX_CORRUPT));
+ SETMSG(HA_ERR_TABLE_IN_FK_CHECK, ER_DEFAULT(ER_TABLE_IN_FK_CHECK));
SETMSG(HA_ERR_DISK_FULL, ER_DEFAULT(ER_DISK_FULL));
/* Register the error messages for use with my_error(). */
@@ -2255,6 +2256,8 @@ double handler::keyread_time(uint index, uint ranges, ha_rows rows)
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 ;
@@ -3106,6 +3109,9 @@ void handler::print_error(int error, myf errflag)
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.