summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2005-02-28 12:18:39 +0200
committerunknown <monty@mysql.com>2005-02-28 12:18:39 +0200
commit45a26d449d157fb2f5c4b5ae871eb98728d9ee55 (patch)
treef466a4f954ca82d8aae5e4d3ab0a985e7fdce2f7 /innobase
parent108702a34e37bae22f117a3a7e18e7cead3e63c8 (diff)
parent8e3addf9284742a6b29fb3016b8c612dfd1a5778 (diff)
downloadmariadb-git-45a26d449d157fb2f5c4b5ae871eb98728d9ee55.tar.gz
merge with 4.1
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union client/mysql.cc: Auto merged client/mysqldump.c: Auto merged innobase/dict/dict0dict.c: Auto merged innobase/fil/fil0fil.c: Auto merged innobase/row/row0sel.c: Auto merged mysql-test/r/select_found.result: Auto merged mysql-test/r/type_set.result: Auto merged mysys/default.c: Auto merged sql/field.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_db.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_repl.cc: Auto merged sql/sql_select.cc: Auto merged strings/ctype-simple.c: Auto merged include/mysql_com.h: Merge sql/filesort.cc: merge
Diffstat (limited to 'innobase')
-rw-r--r--innobase/dict/dict0dict.c3
-rw-r--r--innobase/fil/fil0fil.c14
-rw-r--r--innobase/row/row0sel.c9
3 files changed, 16 insertions, 10 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 035c84621ab..e2681369a8e 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -2719,7 +2719,8 @@ scan_more:
/* Starting quote: remember the quote character. */
quote = *sptr;
} else if (*sptr == '#'
- || (0 == memcmp("-- ", sptr, 3))) {
+ || (sptr[0] == '-' && sptr[1] == '-' &&
+ sptr[2] == ' ')) {
for (;;) {
/* In Unix a newline is 0x0A while in Windows
it is 0x0D followed by 0x0A */
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c
index 8da6ad08538..3ff70aece5e 100644
--- a/innobase/fil/fil0fil.c
+++ b/innobase/fil/fil0fil.c
@@ -3817,13 +3817,6 @@ fil_io(
node = UT_LIST_GET_FIRST(space->chain);
for (;;) {
- if (space->id != 0 && node->size == 0) {
- /* We do not know the size of a single-table tablespace
- before we open the file */
-
- break;
- }
-
if (node == NULL) {
fprintf(stderr,
"InnoDB: Error: trying to access page number %lu in space %lu,\n"
@@ -3837,6 +3830,13 @@ fil_io(
ut_error;
}
+ if (space->id != 0 && node->size == 0) {
+ /* We do not know the size of a single-table tablespace
+ before we open the file */
+
+ break;
+ }
+
if (node->size > block_offset) {
/* Found! */
break;
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index e0995c589d1..a2c91ae5ffc 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -3058,14 +3058,19 @@ row_search_for_mysql(
ut_error;
}
- if (trx->n_mysql_tables_in_use == 0) {
+ if (trx->n_mysql_tables_in_use == 0
+ && prebuilt->select_lock_type == LOCK_NONE) {
+ /* Note that if MySQL uses an InnoDB temp table that it
+ created inside LOCK TABLES, then n_mysql_tables_in_use can
+ be zero; in that case select_lock_type is set to LOCK_X in
+ ::start_stmt. */
+
fputs(
"InnoDB: Error: MySQL is trying to perform a SELECT\n"
"InnoDB: but it has not locked any tables in ::external_lock()!\n",
stderr);
trx_print(stderr, trx);
fputc('\n', stderr);
- ut_a(0);
}
/* fprintf(stderr, "Match mode %lu\n search tuple ", (ulong) match_mode);