summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
Diffstat (limited to 'innobase')
-rw-r--r--innobase/btr/btr0sea.c2
-rw-r--r--innobase/include/data0type.ic11
-rw-r--r--innobase/log/log0recv.c18
-rw-r--r--innobase/os/os0file.c7
-rw-r--r--innobase/rem/rem0cmp.c10
-rw-r--r--innobase/row/row0mysql.c18
-rw-r--r--innobase/srv/srv0srv.c14
7 files changed, 72 insertions, 8 deletions
diff --git a/innobase/btr/btr0sea.c b/innobase/btr/btr0sea.c
index 2e08941894c..21b4c12ab56 100644
--- a/innobase/btr/btr0sea.c
+++ b/innobase/btr/btr0sea.c
@@ -452,7 +452,7 @@ btr_search_info_update_slow(
Checks if a guessed position for a tree cursor is right. Note that if
mode is PAGE_CUR_LE, which is used in inserts, and the function returns
TRUE, then cursor->up_match and cursor->low_match both have sensible values. */
-UNIV_INLINE
+static
ibool
btr_search_check_guess(
/*===================*/
diff --git a/innobase/include/data0type.ic b/innobase/include/data0type.ic
index 4a62902eb1b..d82d976d076 100644
--- a/innobase/include/data0type.ic
+++ b/innobase/include/data0type.ic
@@ -107,14 +107,17 @@ dtype_get_pad_char(
ULINT_UNDEFINED if no padding specified */
dtype_t* type) /* in: type */
{
- if (type->mtype == DATA_CHAR) {
- /* space is the padding character for all char strings */
+ if (type->mtype == DATA_CHAR
+ || type->mtype == DATA_VARCHAR
+ || type->mtype == DATA_BINARY
+ || type->mtype == DATA_FIXBINARY) {
+
+ /* Space is the padding character for all char and binary
+ strings */
return((ulint)' ');
}
- ut_ad((type->mtype == DATA_BINARY) || (type->mtype == DATA_VARCHAR));
-
/* No padding specified */
return(ULINT_UNDEFINED);
diff --git a/innobase/log/log0recv.c b/innobase/log/log0recv.c
index f83a49d01a6..5cd5850d1a1 100644
--- a/innobase/log/log0recv.c
+++ b/innobase/log/log0recv.c
@@ -1019,7 +1019,8 @@ loop:
if (recv_addr->state == RECV_NOT_PROCESSED) {
if (!has_printed) {
fprintf(stderr,
-"InnoDB: Starting an apply batch of log records to the database...\n");
+"InnoDB: Starting an apply batch of log records to the database...\n"
+"InnoDB: Progress in percents:");
has_printed = TRUE;
}
@@ -1046,6 +1047,16 @@ loop:
recv_addr = HASH_GET_NEXT(addr_hash, recv_addr);
}
+
+ if (has_printed
+ && (i * 100) / hash_get_n_cells(recv_sys->addr_hash)
+ != ((i + 1) * 100)
+ / hash_get_n_cells(recv_sys->addr_hash)) {
+
+ fprintf(stderr, "%lu ",
+ (i * 100) / hash_get_n_cells(recv_sys->addr_hash));
+
+ }
}
/* Wait until all the pages have been processed */
@@ -1059,6 +1070,11 @@ loop:
mutex_enter(&(recv_sys->mutex));
}
+ if (has_printed) {
+
+ fprintf(stderr, "\n");
+ }
+
if (!allow_ibuf) {
/* Flush all the file pages to disk and invalidate them in
the buffer pool */
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index a7cd31af2ee..ac29b292f6a 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -581,6 +581,13 @@ os_file_flush(
return(TRUE);
}
+ /* Since Linux returns EINVAL if the 'file' is actually a raw device,
+ we choose to ignore that error */
+
+ if (errno == EINVAL) {
+ return(TRUE);
+ }
+
fprintf(stderr,
"InnoDB: Error: the OS said file flush did not succeed\n");
diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c
index 1f2987f0182..47b7021bf27 100644
--- a/innobase/rem/rem0cmp.c
+++ b/innobase/rem/rem0cmp.c
@@ -100,7 +100,15 @@ cmp_types_are_equal(
dtype_t* type1, /* in: type 1 */
dtype_t* type2) /* in: type 2 */
{
- if (type1->mtype != type2->mtype) {
+ if ((type1->mtype == DATA_VARCHAR && type2->mtype == DATA_CHAR)
+ || (type1->mtype == DATA_CHAR && type2->mtype == DATA_VARCHAR)
+ || (type1->mtype == DATA_FIXBINARY && type2->mtype == DATA_BINARY)
+ || (type1->mtype == DATA_BINARY && type2->mtype == DATA_FIXBINARY)) {
+
+ return(TRUE);
+ }
+
+ if (type1->mtype != type2->mtype) {
return(FALSE);
}
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index db2dcb0125f..50ec88c595d 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -1683,6 +1683,8 @@ row_scan_and_check_index(
rec_t* rec;
ibool is_ok = TRUE;
int cmp;
+ ibool contains_null;
+ ulint i;
char err_buf[1000];
*n_rows = 0;
@@ -1728,6 +1730,21 @@ loop:
cmp = cmp_dtuple_rec_with_match(prev_entry, rec,
&matched_fields,
&matched_bytes);
+ contains_null = FALSE;
+
+ /* In a unique secondary index we allow equal key values if
+ they contain SQL NULLs */
+
+ for (i = 0;
+ i < dict_index_get_n_ordering_defined_by_user(index);
+ i++) {
+ if (UNIV_SQL_NULL == dfield_get_len(
+ dtuple_get_nth_field(prev_entry, i))) {
+
+ contains_null = TRUE;
+ }
+ }
+
if (cmp > 0) {
fprintf(stderr,
"Error: index records in a wrong order in index %s\n",
@@ -1741,6 +1758,7 @@ loop:
is_ok = FALSE;
} else if ((index->type & DICT_UNIQUE)
+ && !contains_null
&& matched_fields >=
dict_index_get_n_ordering_defined_by_user(index)) {
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 424bb8a7086..3f8763f91d6 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -2427,7 +2427,19 @@ loop:
background_loop:
/* In this loop we run background operations when the server
- is quiet */
+ is quiet and we also come here about once in 10 seconds */
+
+ srv_main_thread_op_info = "flushing buffer pool pages";
+
+ /* Flush a few oldest pages to make the checkpoint younger */
+
+ n_pages_flushed = buf_flush_batch(BUF_FLUSH_LIST, 10, ut_dulint_max);
+
+ srv_main_thread_op_info = "making checkpoint";
+
+ /* Make a new checkpoint about once in 10 seconds */
+
+ log_checkpoint(TRUE, FALSE);
srv_main_thread_op_info = (char *) "reserving kernel mutex";