Commit graph

23 commits

Author SHA1 Message Date
marko
a6dadf3657 branches/innodb+: Merge revisions 3312:3459 from branches/zip:
------------------------------------------------------------------------
  r3328 | marko | 2008-12-02 10:16:05 +0200 (Tue, 02 Dec 2008) | 7 lines

  branches/zip: page_cur_insert_rec_zip(): When allocating insert_buf
  from the free list, zero out the DB_TRX_ID and DB_ROLL_PTR of the
  deleted record if the new record would not overwrite these
  fields. This fixes a harmless content mismatch reported by
  page_zip_validate() that was reported as Issue #111.
  rb://55 approved by Sunny Bains.
  ------------------------------------------------------------------------
  r3329 | vasil | 2008-12-02 12:03:17 +0200 (Tue, 02 Dec 2008) | 4 lines

  branches/zip:

  Add entry in the ChangeLog for the release of 1.0.2.
  ------------------------------------------------------------------------
  r3331 | vasil | 2008-12-02 12:09:20 +0200 (Tue, 02 Dec 2008) | 5 lines

  branches/zip:

  Remove an entry from the ChnageLog for a change that was made before
  the release of 1.0.2 but was not included in that release.
  ------------------------------------------------------------------------
  r3333 | vasil | 2008-12-02 12:11:54 +0200 (Tue, 02 Dec 2008) | 4 lines

  branches/zip:

  Now that 1.0.2 is out, the current tree is version 1.0.3.
  ------------------------------------------------------------------------
  r3336 | vasil | 2008-12-02 13:34:36 +0200 (Tue, 02 Dec 2008) | 5 lines

  branches/zip:

  Resurrect a ChangeLog entry that I removed in c3331 with a fake date
  so it does not appear that it has been included in 1.0.2.
  ------------------------------------------------------------------------
  r3361 | vasil | 2008-12-04 18:10:08 +0200 (Thu, 04 Dec 2008) | 9 lines

  branches/zip:

  Fix Mantis issue#103 mysql_addons.c depends on THD internals - please remove it

  Use MySQL's thd_get_thread_id() instead of our own ib_thd_get_thread_id()
  since MySQL implemented the former, see http://bugs.mysql.com/30930.

  Approved by:    Marko (https://svn.innodb.com/rb/r/40, rb://40)
  ------------------------------------------------------------------------
  r3362 | vasil | 2008-12-04 18:49:24 +0200 (Thu, 04 Dec 2008) | 15 lines

  branches/zip:

  Revert our temporary fix for Bug#40360 Binlog related errors with binlog off

  This bug was fixed in MySQL code.

  Our fix went into r2944 and r2947, but this patch does not entirely revert
  those revisions because we want to leave the test case that was introduced
  and also r2944 itself reverted r2935 and r2936. So if we completely revert
  r2944 and r2947 then we would loose the test and will restore r2935 and
  r2936.

  This resolves Issue#108 We should remove ib_bin_log_is_engaged() once mysql
  add an equivallent, see Bug#40360
  ------------------------------------------------------------------------
  r3404 | marko | 2008-12-05 10:02:54 +0200 (Fri, 05 Dec 2008) | 5 lines

  branches/zip: row_undo_mod_del_mark_or_remove_sec_low(): Do not
  complain if the record is not found.  Explain that this is possible
  when a deadlock occurs during an update.  Heikki investigated this
  in Issue #134.
  ------------------------------------------------------------------------
  r3432 | marko | 2008-12-08 14:14:01 +0200 (Mon, 08 Dec 2008) | 4 lines

  branches/zip: ibuf_merge_or_delete_for_page(): Remove the redundant
  checks for ibuf_fixed_addr_page() || fsp_descr_page().  The one at
  the beginning of the function is enough.
  ------------------------------------------------------------------------
  r3456 | marko | 2008-12-09 10:31:26 +0200 (Tue, 09 Dec 2008) | 3 lines

  branches/zip: row_purge_remove_sec_if_poss_low(): Allocate mtr_vers
  from the stack, not with mem_alloc().
  ------------------------------------------------------------------------
  r3459 | vasil | 2008-12-09 11:49:03 +0200 (Tue, 09 Dec 2008) | 152 lines

  branches/zip:

  Merge 2929:3458 from branches/5.1 (resolving conflict in c3257,
  note also that r3363 reverted r2933 so there are not changes in
  mysql-test/innodb-autoinc.result with the current merge):

    ------------------------------------------------------------------------
    r2933 | calvin | 2008-10-30 02:57:31 +0200 (Thu, 30 Oct 2008) | 10 lines
    Changed paths:
       M /branches/5.1/mysql-test/innodb-autoinc.result

    branches/5.1: correct the result file innodb-autoinc.result

    Change the followings:
      auto_increment_increment
      auto_increment_offset

    to
      auto-increment-increment
      auto-increment-offset

    ------------------------------------------------------------------------
    r2981 | marko | 2008-11-07 14:54:10 +0200 (Fri, 07 Nov 2008) | 5 lines
    Changed paths:
       M /branches/5.1/row/row0mysql.c

    branches/5.0: row_mysql_store_col_in_innobase_format(): Correct a misleading
    comment. In the UTF-8 encoding, ASCII takes 1 byte per character, while
    the "latin1" character set (normally ISO-8859-1, but in MySQL it actually
    refers to the Windows Code Page 1252 a.k.a. CP1252, WinLatin1)
    takes 1 to 3 bytes (1 to 2 bytes for the ISO-8859-1 subset).
    ------------------------------------------------------------------------
    r3114 | calvin | 2008-11-14 20:31:48 +0200 (Fri, 14 Nov 2008) | 8 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc

    branches/5.1: fix bug#40386: Not flushing query cache after truncate

    ha_statistics.records can not be 0 unless the table is empty, set to
    1 instead. The original problem of bug#29507 is fixed in the server.

    Additional test was done with the fix of bug#29507 in the server.

    Approved by: Heikki (on IM)
    ------------------------------------------------------------------------
    r3257 | inaam | 2008-11-24 22:06:50 +0200 (Mon, 24 Nov 2008) | 13 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc
       M /branches/5.1/srv/srv0srv.c
       M /branches/5.1/trx/trx0trx.c

    branches/5.1 bug#40760

    The config param innodb_thread_concurrency is dynamically set and is
    read when a thread enters/exits innodb. If the value is changed between
    the enter and exit time the behaviour becomes erratic.
    The fix is not to use srv_thread_concurrency when exiting, instead use
    the flag trx->declared_to_be_inside_innodb.

    rb://57

    Approved by: Marko


    ------------------------------------------------------------------------
    r3363 | calvin | 2008-12-04 19:00:20 +0200 (Thu, 04 Dec 2008) | 13 lines
    Changed paths:
       M /branches/5.1/mysql-test/innodb-autoinc.result

    branches/5.1: revert the changes in r2933

    The changes in r2933 causes test failure on Linux.
    More investigation is needed for Windows.

    Change the followings in innodb-autoinc.result:
      auto-increment-increment
      auto-increment-offset

    back to:
      auto_increment_increment
      auto_increment_offset

    ------------------------------------------------------------------------
    r3412 | vasil | 2008-12-05 10:46:18 +0200 (Fri, 05 Dec 2008) | 7 lines
    Changed paths:
       M /branches/5.1/trx/trx0undo.c

    branches/5.1:

    Add the traditional 2 spaces after the timestamp so the message does
    not look like:

    070223 13:26:01InnoDB: Warning: canno....

    ------------------------------------------------------------------------
    r3458 | vasil | 2008-12-09 11:21:08 +0200 (Tue, 09 Dec 2008) | 51 lines
    Changed paths:
       M /branches/5.1/mysql-test/innodb_bug34300.test

    branches/5.1:

    Merge a change from MySQL to fix the failing innodb_bug34300 mysql-test:

      main.innodb_bug34300           [ fail ]

      mysqltest: At line 11: query 'SET @@max_allowed_packet=16777216' failed: 1621: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value

      Aborting: main.innodb_bug34300 failed in default mode.

    The changeset is this:

      ------------------------------------------------------------
      revno: 2709.1.10
      committer: Staale Smedseng <staale.smedseng@sun.com>
      branch nick: b22891-51-bugteam
      timestamp: Thu 2008-11-20 08:51:48 +0100
      message:
        A fix for Bug#22891 "session level max_allowed_packet can be
        set but is ignored".

        This patch makes @@session.max_allowed_packed and
        @@session.net_buffer_length read-only as suggested in the bug
        report. The user will have to use SET GLOBAL (and reconnect)
        to alter the session values of these variables.

        The error string ER_VARIABLE_IS_READONLY is introduced.

        Tests are modified accordingly.
      modified:
        mysql-test/r/func_compress.result
        mysql-test/r/max_allowed_packet_basic.result
        mysql-test/r/max_allowed_packet_func.result
        mysql-test/r/net_buffer_length_basic.result
        mysql-test/r/packet.result
        mysql-test/r/union.result
        mysql-test/r/variables.result
        mysql-test/t/func_compress.test
        mysql-test/t/innodb_bug34300.test
        mysql-test/t/max_allowed_packet_basic.test
        mysql-test/t/max_allowed_packet_func.test
        mysql-test/t/net_buffer_length_basic.test
        mysql-test/t/packet.test
        mysql-test/t/union.test
        mysql-test/t/variables.test
        sql/set_var.cc
        sql/set_var.h
        sql/share/errmsg.txt
      ------------------------------------------------------------
    ------------------------------------------------------------------------
  ------------------------------------------------------------------------
2008-12-09 11:09:06 +00:00
sunny
4b06a4b130 branches/innodb+: Merge revisions 2460:2579 from branches/zip
The followin mysql-tests failed (and they are known to fail):
main.information_schema        	[ fail ]
main.innodb_file_per_table_basic[ fail ]
main.type_bit_innodb           	[ fail ]

Tested against : MYSQL_SERVER_VERSION  "5.1.28"
2008-08-09 00:15:46 +00:00
inaam
a48c8a2878 branches/innodb+: Merge revisions 2344:2454 from branches/zip 2008-05-14 15:43:19 +00:00
marko
753a5a1df0 branches/zip: Hide some global variables that were accidentally not hidden
in r2276.  Now the following symbols will be exported when InnoDB is built
as a dynamic plugin:

* the virtual method pointer table of class ha_innodb
* the three variables that MySQL will reference when linking at runtime:

	_mysql_plugin_declarations_
	_mysql_plugin_interface_version_
	_mysql_sizeof_struct_st_plugin_

Furthermore, the following symbols are weak globals, to allow us to access
the built-in InnoDB in the mysqld executable, in case it contains a statically
linked InnoDB:

	builtin_innobase_plugin
	innodb_hton_ptr
2008-02-06 16:11:46 +00:00
marko
2c2b06ad75 branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global
symbols.  Use it for all definitions of non-static variables and functions.

lexyy.c, make_flex.sh: Declare yylex as UNIV_INTERN, not static.  It is
referenced from pars0grm.c.

Actually, according to
	nm .libs/ha_innodb.so|grep -w '[ABCE-TVXYZ]'
the following symbols are still global:

* The vtable for class ha_innodb
* pars0grm.c: The function yyparse() and the variables yychar, yylval, yynerrs

The required changes to the Bison-generated file pars0grm.c will be addressed
in a separate commit, which will add a script similar to make_flex.sh.

The class ha_innodb is renamed from class ha_innobase by a #define.  Thus,
there will be no clash with the builtin InnoDB.  However, there will be some
overhead for invoking virtual methods of class ha_innodb.  Ideas for making
the vtable hidden are welcome.  -fvisibility=hidden is not available in GCC 3.
2008-02-06 14:17:36 +00:00
vasil
40e01b2f5a branches/zip:
Move the column trx_weight near the end in the
information_schema.innodb_trx table.

Suggested by:	Ken
Approved by:	Marko
2008-01-16 06:45:16 +00:00
vasil
ff9ef52294 branches/zip:
Change the format of TRX_IDs in INFORMATION_SCHEMA tables from DEC to
HEX.

The current TRX_IDs are hard to remember and track down: 426355, 428466,
428566, etc.

In HEX:
* there are less "digits", the strings are shorter;
* since there are 16 instead of 10 "digits", the chance of having
  repeating ones are smaller.

The above look like 68173, 689B2, 68A16 in HEX.

Discussed with:	Ken
Approved by:	Heikki (via IM)
2007-12-20 14:24:57 +00:00
vasil
204f29acd8 branches/zip:
Non-functional change:
Do not include the terminating '\0' in TRX_I_S_LOCK_ID_MAX_LEN.
2007-12-18 09:44:03 +00:00
vasil
74ab4b6627 branches/zip:
Bugfix: Lock the MySQL mutex LOCK_thread_count before accessing
trx->mysql_query_str to avoid race conditions where MySQL sets it to
NULL after we have checked that it is not NULL and before we access it.
 
Approved by:	Marko
2007-12-17 10:10:39 +00:00
vasil
a3417d902d branches/zip:
* Change terminology:
  wait lock -> requested lock
  waited lock -> blocking lock
  new: requesting transaction (the trx what owns the requested lock)
  new: blocking transaction (the trx that owns the blocking lock)

* Add transaction ids to INFORMATION_SCHEMA.INNODB_LOCK_WAITS. This is
  somewhat redundant because transaction ids can be found in INNODB_LOCKS
  (which can be joined with INNODB_LOCK_WAITS) but would help users to
  write shorter joins (one table less) in some cases where they want to
  find which transaction is blocking which.

Suggested by:	Ken
Approved by:	Heikki
2007-11-29 13:47:09 +00:00
vasil
69a8cc07a9 branches/zip:
Add the transaction's weight to information_schema.innodb_trx table.

Suggested by:	Ken
Approved by:	Heikki
2007-11-28 07:07:23 +00:00
vasil
f72d0e66d8 branches/zip:
Implement a limit on the memory used by the INNODB_TRX, INNODB_LOCKS and
INNODB_LOCK_WAITS tables. The maximum allowed memory is defined with the
macro TRX_I_S_MEM_LIMIT.

Approved by:	Marko (via IM)
2007-11-16 13:12:13 +00:00
vasil
bae2063ac0 branches/zip:
Add the query in information_schema.innodb_trx.trx_query. Add it even
though it is available in information_schema.processlist.info to make
inconsistencies between those two tables obvious.

It is rather confusting to see a transaction shown in innodb_trx and
innodb_locks that holds a lock on one table and the corresponding query
in processlist executing INSERT on another table. We do not want users
to contact us asking to explain that. It is caused by the fact that the
data for innodb_* tables and processlist is fetched at different time.

Approved by:	Marko
2007-11-07 20:38:07 +00:00
vasil
83f470987f branches/zip:
Introduce a generic soultion to the common problem that MySQL do not add
functions needed by us in a reasonable time.

Start with a function that retrieves THD::thread_id, this is needed for
the information_schema.innodb_trx.mysql_thread_id column.

Approved by:	Marko
2007-11-07 14:14:33 +00:00
vasil
e8de094a3f branches/zip:
Add innodb_locks.lock_data column and some relevant tests.
For record locks this column represents the ordering fields of the
locked row in a human readable, SQL-valid, format.

Approved by:	Marko
2007-10-29 13:03:53 +00:00
vasil
468df81b8f branches/zip:
Add the proper macros for checking the correct latching order in trx
information_schema code.

Approved by:	Marko
2007-10-12 11:20:13 +00:00
vasil
202405cc1c branches/zip:
Fix compilation warning:

can_cache_be_updated(): Remove const qualifier because this function needs
to call rw_lock_own().
2007-09-28 04:58:16 +00:00
vasil
a4cc4700be branches/zip:
Copy any data (currently table name and table index) that may be
destroyed after releasing the kernel mutex into internal cache's
storage.

This is done in efficient manner using ha_storage type and a given
string is copied only once into the cache's storage. Later additions of
the same string use the already stored string, thus allocating memory
only once per unique string.

Approved by:	Marko
2007-09-24 12:25:06 +00:00
vasil
757ca350ae branches/zip:
Non-functional: put the code that clears the IS cache into a separate
function.
2007-09-22 09:18:59 +00:00
vasil
9d96ad01e3 branches/zip:
Cosmetic: initialize the members of the cache in the same order as
they are defined in the structure.
2007-09-22 09:03:29 +00:00
vasil
0b7a91c489 branches/zip:
Make comment more clear (hopefully).
2007-09-22 08:36:59 +00:00
vasil
b20fccc23f branches/zip:
Use the newly introduced mem_alloc2() to use the memory that has been
allocated in addition to the requested memory. This is done in order to
avoid wasting memory.

Do not calculate the sizes and offsets of the chunks in advance in
table_cache_init() because it is unknown how much bytes will actually
be allocated by mem_alloc2(). Rather calculate these on the run: after
each chunk is allocated set its size and the offset of the next chunk.

Similar patch approved by:	Marko
2007-09-22 08:34:26 +00:00
vasil
b9982ac9ec Implement INFORMATION_SCHEMA tables innodb_trx, innodb_locks,
innodb_lock_waits. See
https://svn.innodb.com/innobase/InformationSchema/TransactionsAndLocks
for design notes.

Things that need to be resolved before this goes live:
* MySQL must add thd_get_thread_id() function to their code
  http://bugs.mysql.com/30930
* Allocate memory from mem_heap instead of using mem_alloc()
* Copy table name and index name into the cache because they may be
  freed later which will result in referencing freed memory

Approved by:	Marko
2007-09-20 11:23:44 +00:00