Commit graph

399 commits

Author SHA1 Message Date
marko
88fbb7e98d Move ha_innodb.cc and ha_innodb.h from sql to storage/innobase/handler.
This was submitted by Marko to MySQL AB and merged to the MySQL tree by
Brian Aker in the following two changesets:

ChangeSet
  2006/09/07 08:23:58-07:00 brian@zim.(none) 
  Moves Innodb handler to the Innodb storage directory.

ChangeSet
  2006/09/07 16:17:16-07:00 brian@zim.(none) 
  Warning fixes for Windows, and an include fix for Windows for Innodb.

storage/innobase/CMakeLists.txt
  2006/09/07 16:17:13-07:00 brian@zim.(none) +6 -1
  Fixed includes for Windows
2006-09-11 08:51:46 +00:00
marko
006e7c8830 On data tuples being updated or inserted (but not searched for),
set type->len to the prefix_len of the index column, if it is a prefix index.
This should prevent bugs similar to Bug #21638 from occurring.

dict_index_copy_types(): Set type->len to prefix_len if prefix_len != 0.

row_build_index_entry(): Set type->len to prefix_len if prefix_len != 0,
also when the column in the tuple is SQL NULL, because the type information
may be used for interpreting other records during btr_page_reorganize().
2006-09-06 09:23:47 +00:00
marko
9d56e60d97 Merge changes to the "innodb_mysql" test from MySQL AB 2006-09-05 19:29:18 +00:00
marko
96ea617978 Merge change from MySQL AB:
ChangeSet
  2006/08/23 15:12:42-07:00 brian@zim.(none) 
  This is a cleanup of warnings that windows is complaining about. 

sql/ha_innodb.cc
  2006/08/23 15:12:39-07:00 brian@zim.(none) +0 -1
  Removed unused variables
2006-09-05 19:25:38 +00:00
marko
f91cf1eb30 Merge changes from MySQL AB to the innodb_mysql test files. 2006-09-05 12:18:27 +00:00
marko
02c5e44ea7 ibuf_entry_build(): Write prefix_len to the insert buffer instead of type->len
when prefix_len is specified.  Otherwise, btr_page_reorganize() during
insert buffer merge would fail on ROW_FORMAT=COMPACT tables.  (Bug #21638)
2006-09-05 11:43:42 +00:00
marko
cb8f5a5115 setup.sh: Do not bail out if BUILD/compile-innodb* exist already. 2006-09-04 19:18:52 +00:00
marko
5ff9797424 Merge code from MySQL AB:
ChangeSet
  2006/08/25 13:31:15-07:00 brian@zim.(none) 
  Cleanup of unused variables.

sql/ha_innodb.h
  2006/08/25 13:31:11-07:00 brian@zim.(none) +0 -6
  Unused variable
2006-09-04 10:48:23 +00:00
marko
4af9b6d365 Merge code from MySQL AB:
ChangeSet
  2006/08/22 16:24:12-07:00 brian@zim.(none) 
  This changest:
  Plugins now when compiled or not compiled work correctly with status variables. 
  Status variables from plugins now set their own names (removed bit where plugin name was pre-appended this broke Innodb and Cluster)
  A few Makefile cleanups. 

sql/ha_innodb.cc
  2006/08/22 16:24:08-07:00 brian@zim.(none) +16 -6
  Cleanup to make status variables directly in engine
2006-09-04 10:45:05 +00:00
marko
4941acd47a ha_innodb.cc: Adjust the comment related to r784. Apparently it was
changed after review on the MySQL side.
2006-09-04 10:40:43 +00:00
marko
1ce2c0f89f Merge a patch from MySQL AB:
ChangeSet@1.2288, 2006-08-29 15:35:05+02:00, guilhem@gbichot3.local +2 -0
  Fix for BUG#20866 "show table status on innodb raises assertion"
  and its duplicate BUG#19057 "Test 'rpl_row_func003' fails on SuSE SLES9 x86".
  It was an assertion failure, only in debug builds, not present
  in released versions (nothing to document).
  It happened when doing SHOW TABLE STATUS on an InnoDB table
  having an auto_increment column, right after creating the table.

  sql/ha_innodb.cc@1.288, 2006-08-29 15:35:02+02:00, guilhem@gbichot3.local +7 -1
    Before a val_() calls on a Field object, if that field was not marked
    for read, we need to mark it. This is explained here:
    ChangeSet 1.2119.601.1 2006/06/04 18:52:22 monty@mysql.com
    quoting the changeset's comment:
    
      - If a handler needs to call Field->val() or Field->store() on columns
        that are not used in the query, one should install a temporary
        all-columns-used map while doing so. For this, we provide the following
        functions:
      
        my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
        field->val();
        dbug_tmp_restore_column_map(table->read_set, old_map);
      
        and similar for the write map:
      
        my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
        field->val();
        dbug_tmp_restore_column_map(table->write_set, old_map);
      
        If this is not done, you will sooner or later hit a DBUG_ASSERT
        in the field store() / val() functions.
        (For not DBUG binaries, the dbug_tmp_restore_column_map() and
        dbug_tmp_restore_column_map() are inline dummy functions and should
        be optimized away be the compiler).
    
    Note that I verified that the bug didn't exist in non-debug builds.
2006-09-01 08:29:44 +00:00
marko
fb067e41bd Revert the hunk on ha_innobase::innobase_read_and_init_auto_inc()
that was accidentally committed in r782.
2006-09-01 08:19:47 +00:00
heikki
a3c6001751 Fix bug #21784 of a crash in DROP TABLE with concurrent queries on the table 2006-08-31 19:52:25 +00:00
heikki
799b063824 Remove Valgrind warning of Bug #20791 : in new database creation, we read
the doublewrite buffer magic number from uninitialized memory; the code
worked because it was extremely unlikely that the memory would contain the
magic number.
2006-08-31 19:19:22 +00:00
osku
42f9837428 Add a warning comment above the place where we set srv_main_thread_op_info
to "waiting for server activity" that mentions that this string should not
be changed.
2006-08-31 11:01:15 +00:00
marko
279d526570 Remove unused code.
univ.i: Do not #define YYDEBUG, because it is only useful for debugging
the grammar of the Bison-generated InnoDB SQL parser.

row_build(): Remove type==ROW_COPY_ALSO_EXTERNALS, because it is never
passed.
2006-08-31 10:47:31 +00:00
marko
befb1c5308 compile-innodb, compile-innodb-debug:
Replace max-no-ndb compilation flags with --with-plugin=innobase.
2006-08-31 09:36:45 +00:00
marko
41ae786e43 Adapt the InnoDB build scripts to r772.
setup.sh: Create symbolic links to the build scripts instead of copying them.
2006-08-31 07:26:30 +00:00
marko
965a94160d Merge changes from MySQL AB:
ChangeSet
  2006/08/23 13:59:16-07:00 brian@zim.(none) 
  This patch removes need for a innodb to have its own configure. 

univ.i: Replace ../ib_config.h with config.h.

Makefile.i, Makefile.am: Change directory paths.

configure.in: Delete.

plug.in: New file, included from the top-level configure.in.

setup.sh: Replace configure.in with plug.in.
2006-08-30 20:29:01 +00:00
marko
33ed2aa4de Remove dict_col_t::aux, which was only used when copying an index definition
to the data dictionary cache.
2006-08-29 12:11:56 +00:00
marko
27dffa4f7d Split lines before binary operators, not after them. 2006-08-29 08:27:56 +00:00
marko
917941e44c Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
2006-08-29 07:33:51 +00:00
marko
8f18616ef0 Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).  From now on, the following Emacs cc-mode settings apply
when indenting C function bodies in InnoDB:

(setq c-basic-offset 8)
(setq c-label-minimum-indentation 0)
(add-to-list 'c-offsets-alist '(c . 0))
(add-to-list 'c-offsets-alist '(label . [0]))

The indentation rules for function declarations still have not been
formalized, and they must be formatted manually.

Try to limit all lines to at most 79 characters (assuming TAB stops every
8 characters) by splitting lines before opening parenthesis, or at
string constants.

Fix some grammar mistakes in diagnostic output:
 match to, match with -> match
 found from -> found in
 trying rename -> trying to rename

Fix an error in page_check_dir(): it said "supremum not pointed to"
when the infimum was not pointed to.

Enclose commented-out code snippets in #if 0 ... #endif instead of /* ... */.
Add (void*) casts to some %p parameters in fprintf() calls.  Try to
split lines before a binary operator, not after one.  (These three fixes
were not made everywhere.)
2006-08-28 17:42:45 +00:00
osku
bd338cebd9 page_validate(): Add missing space to error print, for real this time,
following an error in r761.
2006-08-28 07:07:13 +00:00
osku
66241d5a8d btr_cur_search_to_nth_level(): Document where cursor is left at in
PAGE_CUR_LE searches.

page_validate(): Add missing space to error print.
2006-08-28 06:15:42 +00:00
marko
42a77e858b Merge a patch from MySQL AB (Mats Kindal):
Lock and unlock prepare_commit_mutex under the same conditions.
2006-08-22 07:20:52 +00:00
marko
d475256ce5 dfield_print_raw(): Make static. Print at most 1000 bytes to avoid
excessive space usage of the error log.
2006-08-17 12:46:19 +00:00
marko
abe9dae496 srv_master_thread(): Add OS_THREAD_DUMMY_RETURN to get rid of a compiler
warning "no return value from a function returning non-void".
2006-08-17 08:51:42 +00:00
osku
475e422b4a Remove all traces of the obsolete concept of replicate spaces. 2006-08-16 08:01:37 +00:00
marko
e87b68e001 row_vers_build_for_semi_consistent_read(): rec_trx_id was uninitialized
in a comparison.  Initialize it.
2006-08-14 11:18:18 +00:00
osku
d2a7614eac btr_cur_get_page(): Remove buggy assertion. 2006-08-14 10:36:58 +00:00
marko
6ccc725f98 innodb.result: Adjust Innodb_rows_inserted and Innodb_rows_updated
to reflect the deleted statements in r420, which somehow reappeared
in the MySQL tree.
2006-08-14 07:52:28 +00:00
marko
2d45f76523 Merge code from MySQL:
ChangeSet@1.2181.173.1  2006-08-02 17:57:06+02:00  ingo@local

Bug#18775 - Temporary table from alter table visible to other threads
Continued implementation of WL#1324 (table name to filename encoding)
Changed back the encoded temp file prefix to #sql.
2006-08-14 07:34:26 +00:00
marko
23573074d6 Merge changes to test files from MySQL AB. The suite innodb.test fails
due to this MySQL change to row0mysql.c not being merged:

http://mysql.bkbits.net:8080/mysql-5.1/diffs/storage/innobase/row/row0mysql.c@1.126.1.1
2006-08-11 09:20:10 +00:00
marko
b0d9c363fc ha_innobase::delete_all_rows(): Correct an error introduced in r705:
Replace the local variable "trx" with "prebuilt->trx".

Also, replace the second invocation of the macro current_thd with
the local variable thd.
2006-08-11 08:44:10 +00:00
marko
122ca35327 Merge a change from MySQL AB:
# ChangeSet
#   2006/07/30 05:16:08+04:00 aivanov@mysql.com 
#   Make innodb_thread_concurrency 0 by default.
#    Fixing test result.
# 
# mysql-test/r/innodb.result
#   2006/07/30 05:16:05+04:00 aivanov@mysql.com +1 -1
#   Make innodb_thread_concurrency 0 by default.
#    Fixing test result.
2006-08-11 08:08:54 +00:00
marko
b4270e7081 Merge a change from MySQL AB (originally implemented by Marko
in the 5.0 tree and now merged to the 5.1 tree):

# ChangeSet
#   2006/07/29 07:17:33+04:00 aivanov@mysql.com 
#   Make innodb_flush_log_at_trx_commit a settable global variable.
# 
# sql/ha_innodb.cc
#   2006/07/29 07:17:29+04:00 aivanov@mysql.com +1 -3
#   Remove innobase_flush_log_at_trx_commit
#   (set srv_flush_log_at_trx_commit directly).
# 
# sql/ha_innodb.h
#   2006/07/29 07:17:29+04:00 aivanov@mysql.com +1 -1
#   Remove innobase_flush_log_at_trx_commit.
#   Declare srv_flush_log_at_trx_commit.
# 
# storage/innobase/include/srv0srv.h
#   2006/07/29 07:17:30+04:00 aivanov@mysql.com +1 -1
#   Change the type of srv_flush_log_at_trx_commit.
# 
# storage/innobase/srv/srv0srv.c
#   2006/07/29 07:17:30+04:00 aivanov@mysql.com +1 -1
#   Change the type of srv_flush_log_at_trx_commit.
#
2006-08-11 08:05:40 +00:00
marko
6389cd96f4 Merge a change from MySQL AB:
# ChangeSet
#   2006/07/28 21:27:01+04:00 sergefp@mysql.com 
#   BUG#14940 "MySQL choose wrong index", v.2
# mysql-test/r/innodb_gis.result
#   2006/07/28 21:26:56+04:00 sergefp@mysql.com +15 -15
#   BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
2006-08-11 08:02:26 +00:00
heikki
ac88d25b33 Remove redundant check_trx_exists() and ut_a() from r701,
as suggested by Marko
2006-08-08 11:38:34 +00:00
marko
b17cae8c6a setup.sh: Link also CMakeLists.txt. 2006-08-08 11:33:49 +00:00
marko
b758497312 Correct all URLs pointing to the MySQL manual. (Bug #21467) 2006-08-08 10:54:57 +00:00
heikki
df475ab785 Add update_thd() to several places in ha_innodb.cc to make sure prebuilt->trx points to the right trx object; in other functions add assertions that prebuilt->trx is for this thd; when 5.1 stabilizes, we can change these assertions to ut_ad() debug version assertions 2006-08-07 15:39:40 +00:00
heikki
5d37f4bad7 Fix Bug #20493 : we must prepare prebuilt->trx to point to the trx of this thd before using it 2006-08-07 15:23:32 +00:00
heikki
f185d66669 Fix Bug#20213 and its duplicates: stress test crashes of InnoDB-5.1 2006-08-07 15:18:22 +00:00
marko
58676efe16 Remove non-varying variable ibuf->meter and related constant IBUF_THRESHOLD. 2006-08-02 08:01:41 +00:00
marko
e79ebe8315 After ut_print_timestamp(), always display " InnoDB:" (note two spaces). 2006-08-02 06:52:44 +00:00
osku
fa832adc86 ut_dbg_assertion_failed(): Print space between timestamp and start of error
message.
2006-08-01 10:20:14 +00:00
marko
49606878fc innodb.result: Set the default value of innodb_thread_concurrency to 8.
This has already been changed in the MySQL source code tree.
2006-07-31 11:17:32 +00:00
marko
52c09c8c9c row_rename_table_for_mysql(): Restore the row_mysql_unlock_data_dictionary()
call that was accidentally removed in r674.
2006-07-31 11:05:14 +00:00
marko
01ce2292ff ha_innobase::start_stmt(): patch from Heikki:
Do not call read_view_close_for_mysql().  (Bug #19834)
2006-07-28 10:17:55 +00:00