Commit graph

589 commits

Author SHA1 Message Date
tnurnberg@sin.intern.azundris.com
3b9e5093a3 Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
windows fixies
2007-06-27 13:23:58 +02:00
tnurnberg@sin.intern.azundris.com
dadc4c7499 Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
windows fixies
2007-06-27 09:31:47 +02:00
tnurnberg@sin.intern.azundris.com
31e98955a5 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/ram/work/b29079/b29079.5.0
---
Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB

fix binlog-writing so that end_log_pos is given correctly even
within transactions for both SHOW BINLOG and SHOW MASTER STATUS,
that is as absolute values (from log start) rather than relative
values (from transaction's start).
---
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/22540/50-22540
---
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB

end_log_pos data within a transaction are relative to
the start of the transaction rather than absolute.
we fix those groups in situ before writing the log out.

additional comments and handling for groups with very
large single events, as suggested by Guilhem.
---
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  amd64.(none):/src/bug24732/my50-bug24732
---
Merge maint1.mysql.com:/data/localhome/tsmith/bk/50
into  maint1.mysql.com:/data/localhome/tsmith/bk/maint/50
---
Bug#22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
 
end_log_pos data within a transaction are relative to
the start of the transaction rather than absolute.
we fix those groups in situ before writing the log out.
 
additional comments and handling for groups with very
large single events, as suggested by Guilhem.
---
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/22540/50-22540
---
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  sin.intern.azundris.com:/home/tnurnberg/22540/51-22540
---
Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540
into  sin.intern.azundris.com:/home/tnurnberg/22540/51-22540
2007-06-27 08:18:24 +02:00
tnurnberg@sin.intern.azundris.com
4ca5aabf98 Bug #22540: Incorrect value in column End_log_pos of SHOW BINLOG EVENTS using InnoDB
fix binlog-writing so that end_log_pos is given correctly even
within transactions for both SHOW BINLOG and SHOW MASTER STATUS,
that is as absolute values (from log start) rather than relative
values (from transaction's start).
---
Merge sin.intern.azundris.com:/home/tnurnberg/22540/50-22540
into  sin.intern.azundris.com:/home/tnurnberg/22540/51-22540
---
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  sin.intern.azundris.com:/home/tnurnberg/22540/51-22540
2007-06-25 11:37:10 +02:00
malff/marcsql@weblab.(none)
7e36d37eb0 Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge
2007-06-15 11:36:31 -06:00
malff/marcsql@weblab.(none)
b27172eb70 build warning 2007-06-14 17:43:19 -06:00
malff/marcsql@weblab.(none)
dd2bdfda8d Bug#27857 (Log tables supplies the wrong value for generating AUTO_INCREMENT
numbers)

Before this patch, the code in the class Log_to_csv_event_handler, which is
used by the global LOGGER object to write to the tables mysql.slow_log and
mysql_general_log, was supporting only records of the format defined for
these tables in the database creation scripts.

Also before this patch, the server would allow, with certain limitations,
to perform ALTER TABLE on the LOG TABLES.

As implemented, the behavior of the server, with regards to LOG TABLES,
is inconsistent:
- either ALTER TABLES on LOG TABLES should be prohibited,
and the code writing to these tables can make assumptions on the record
format,
- or ALTER TABLE on LOG TABLES is permitted, in which case the code
writing a record to these tables should be more flexible and honor
new fields.

In particular, adding an AUTO_INCREMENT column to the logs,
does not work as expected (per the bug report).

Given that the ALTER TABLE on log tables statement has been explicitly
implemented to check that the log should be off to perform the operation,
and that current test cases already cover this, the user expectation is
already set that this is a "feature" and should be supported.

With this patch, the server will:
- populate AUTO INCREMENT columns if present,
- populate any additional column with it's default value
when writing a record to the LOG TABLES.

Tests are provided, that detail the precise sequence of statements
a SUPER user might want to perform to add more columns to the log tables.
2007-06-13 22:05:22 -06:00
gkodinov/kgeorge@magare.gmz
949d96f175 Bug #27816: Log tables ran with partitions crashes the server
when logging is enabled.
Currently the partition engine doesn't allow log tables to
be partitioned. But this was not checked and the server crashed.
Fixed by adding a check in ALTER TABLE to disable partitioning the
log tables.
While working on the cause of the problem improved the way the log
thread structures are initialized before opening the log tables.
2007-06-08 17:12:42 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
2c8f4f9791 Added casts to avoid compiler warnings and fixed a wrong type.
---
Added casts and fixed wrong type.
---
Added casts and fixed wrong type.
---
Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
---
Don't give warning that readonly variable is forced to be readonly
mysql-test-run run now fails if we have [Warning] and [ERROR] as tags in .err file
Fixed wrong reference to the mysql manual
Fixed wrong prototype that caused some tests to fail on 64 bit platforms
---
Disabled compiler warnings mainly for Win 64.
---
Added casts to remove compiler warnings on windows
Give warnings also for safe_mutex errors found by test system
Added some warnings from different machines in pushbuild
---
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  mysql.com:/home/my/mysql-5.1
---
Added escapes for double quotes and parenthesis.
---
Archive db fix plus added non-critical warnings
in ignore list.
---
Fixed previously added patch and added new ignored warning.
2007-05-31 17:45:22 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
fc3b3a0a86 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-05-24 13:24:36 +03:00
tsmith@siva.hindu.god
4a4590cd49 Merge siva.hindu.god:/home/tsmith/m/bk/51
into  siva.hindu.god:/home/tsmith/m/bk/maint/51
2007-05-17 14:21:35 -06:00
monty@mysql.com/narttu.mysql.fi
088e2395f1 WL#3817: Simplify string / memory area types and make things more consistent (first part)
The following type conversions was done:

- Changed byte to uchar
- Changed gptr to uchar*
- Change my_string to char *
- Change my_size_t to size_t
- Change size_s to size_t

Removed declaration of byte, gptr, my_string, my_size_t and size_s. 

Following function parameter changes was done:
- All string functions in mysys/strings was changed to use size_t
  instead of uint for string lengths.
- All read()/write() functions changed to use size_t (including vio).
- All protocoll functions changed to use size_t instead of uint
- Functions that used a pointer to a string length was changed to use size_t*
- Changed malloc(), free() and related functions from using gptr to use void *
  as this requires fewer casts in the code and is more in line with how the
  standard functions work.
- Added extra length argument to dirname_part() to return the length of the
  created string.
- Changed (at least) following functions to take uchar* as argument:
  - db_dump()
  - my_net_write()
  - net_write_command()
  - net_store_data()
  - DBUG_DUMP()
  - decimal2bin() & bin2decimal()
- Changed my_compress() and my_uncompress() to use size_t. Changed one
  argument to my_uncompress() from a pointer to a value as we only return
  one value (makes function easier to use).
- Changed type of 'pack_data' argument to packfrm() to avoid casts.
- Changed in readfrm() and writefrom(), ha_discover and handler::discover()
  the type for argument 'frmdata' to uchar** to avoid casts.
- Changed most Field functions to use uchar* instead of char* (reduced a lot of
  casts).
- Changed field->val_xxx(xxx, new_ptr) to take const pointers.

Other changes:
- Removed a lot of not needed casts
- Added a few new cast required by other changes
- Added some cast to my_multi_malloc() arguments for safety (as string lengths
  needs to be uint, not size_t).
- Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done
  explicitely as this conflict was often hided by casting the function to
  hash_get_key).
- Changed some buffers to memory regions to uchar* to avoid casts.
- Changed some string lengths from uint to size_t.
- Changed field->ptr to be uchar* instead of char*. This allowed us to
  get rid of a lot of casts.
- Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar
- Include zlib.h in some files as we needed declaration of crc32()
- Changed MY_FILE_ERROR to be (size_t) -1.
- Changed many variables to hold the result of my_read() / my_write() to be
  size_t. This was needed to properly detect errors (which are
  returned as (size_t) -1).
- Removed some very old VMS code
- Changed packfrm()/unpackfrm() to not be depending on uint size
  (portability fix)
- Removed windows specific code to restore cursor position as this
  causes slowdown on windows and we should not mix read() and pread()
  calls anyway as this is not thread safe. Updated function comment to
  reflect this. Changed function that depended on original behavior of
  my_pwrite() to itself restore the cursor position (one such case).
- Added some missing checking of return value of malloc().
- Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow.
- Changed type of table_def::m_size from my_size_t to ulong to reflect that
  m_size is the number of elements in the array, not a string/memory
  length.
- Moved THD::max_row_length() to table.cc (as it's not depending on THD).
  Inlined max_row_length_blob() into this function.
- More function comments
- Fixed some compiler warnings when compiled without partitions.
- Removed setting of LEX_STRING() arguments in declaration (portability fix).
- Some trivial indentation/variable name changes.
- Some trivial code simplifications:
  - Replaced some calls to alloc_root + memcpy to use
    strmake_root()/strdup_root().
  - Changed some calls from memdup() to strmake() (Safety fix)
  - Simpler loops in client-simple.c
2007-05-10 12:59:39 +03:00
msvensson@pilot.blaudden
53758bb96f Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-05-02 14:46:00 +02:00
istruewing@chilla.local
e327818c28 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into  chilla.local:/home/mydev/mysql-5.1-wl2936-two
2007-04-27 19:09:39 +02:00
msvensson@pilot.blaudden
0246ca9281 Remove dangerous "remove warning" hack, cast to long
will truncate the time value on systems where "long" are 32bit,
instead use time_t as datatype
2007-04-27 15:33:48 +02:00
mats@romeo.(none)
875de0e571 Merge romeo.(none):/home/bkroot/mysql-5.1-rpl
into  romeo.(none):/home/bk/merge-mysql-5.1
2007-04-20 10:46:58 +02:00
serg@sergbook.mysql.com
6bc9bc92df Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.1-wl2936
2007-04-16 10:37:50 +02:00
serg@janus.mylan
3ecbb5a443 wl#2936 - fixing problems 2007-04-13 19:23:02 +02:00
jani@ua141d10.elisa.omakaista.fi
335153121b Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
2007-04-12 12:50:02 +03:00
mats@romeo.(none)
93860556e6 Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b25688-mysql-5.1-rpl
2007-04-12 09:10:45 +02:00
mats@romeo.(none)
11fc24ef24 BUG#25688 (RBR: circular replication may cause STMT_END_F flags to be
skipped):

By moving statement end actions from Rows_log_event::do_apply_event() to
Rows_log_event::do_update_pos() they will always be executed, even if
Rows_log_event::do_apply_event() is skipped because the event originated
at the same server. This because Rows_log_event::do_update_pos() is always
executed (unless Rows_log_event::do_apply_event() failed with an error,
in which case the slave stops with an error anyway). 

Adding test case.

Fixing logic to detect if inside a group. If a rotate event occured
when an initial prefix of events for a statement, but for which the
table did contain a key, last_event_start_time is set to zero, causing
rotate to end the group but without unlocking any tables. This left a
lock hanging around, which subsequently triggered an assertion when a
second attempt was made to lock the same sequence of tables.

In order to solve the above problem, a new flag was added to the relay
log info structure that is used to indicate that the replication thread
is currently executing a statement. Using this flag, the replication
thread is in a group if it is either in a statement or inside a trans-
action.

The patch also eliminates some gratuitous header file inclusions that
were not needed (and caused compile errors) and replaced them with
forward definitions.
2007-04-12 08:58:04 +02:00
jani@ua141d10.elisa.omakaista.fi
1e38c22ef8 Small fixes for merge. 2007-04-10 18:01:29 +03:00
jani@ua141d10.elisa.omakaista.fi
b4ba815967 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-04-10 16:28:47 +03:00
tsmith@quadxeon.mysql.com
e9fd9a18e0 Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values
When MySQL logged slow query information to a CSV table, it stored the
query_time and lock_time values with an incorrect formula.

If the time was over 59 seconds, this caused incorrect statistics (either the
slow query was not logged, or the time was far from correct).  This change
fixes the method used to store those TIME values in the slow_log table.
2007-04-04 21:40:47 +02:00
jani@ua141d10.elisa.omakaista.fi
e4fde44948 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-04-03 14:51:32 +03:00
msvensson@pilot.blaudden
fc904eaead Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-04-02 11:15:09 +02:00
jani@ua141d10.elisa.omakaista.fi
1c7beca65e Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0-marvel
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-marvel
2007-03-29 17:27:42 +03:00
lars/lthalmann@dl145j.mysql.com
771e05d657 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
2007-03-29 13:49:10 +02:00
tsmith@siva.hindu.god
0d65ee796b Merge siva.hindu.god:/home/tsmith/m/bk/maint/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/51
2007-03-28 19:50:41 -06:00
tsmith@siva.hindu.god
024be23a82 Fix warning on Windows 2007-03-28 19:49:30 -06:00
tsmith@siva.hindu.god
16640ef3fe Merge siva.hindu.god:/home/tsmith/m/bk/maint/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/51
2007-03-28 17:54:11 -06:00
tsmith@siva.hindu.god
979102de3b Remove warning when compiling libmysqld/log.cc 2007-03-28 17:50:06 -06:00
msvensson@pilot.blaudden
0302f48c2d Merge pilot.blaudden:/home/msvensson/mysql/bug27490/my50-bug27490
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-28 18:43:39 +02:00
msvensson@pilot.blaudden
b95a1819bf Merge pilot.blaudden:/home/msvensson/mysql/bug27490/my50-bug27490
into  pilot.blaudden:/home/msvensson/mysql/bug27490/my51-bug27490
2007-03-28 18:37:27 +02:00
msvensson@pilot.blaudden
b82b20cd83 Bug#27490 Function to log to NT event log could allocate memory
- Change 'print_buffer_to_nt_event_log' to overwrite the string
if the buffer is not long enough to hold the ending CR/LF's
- Make functions static
- Remove the "hack" intended to force 'print_buffer_to_nt_event_log'
 never to use "new"
2007-03-28 10:12:33 +02:00
aelkin/elkin@andrepl.(none)
2afa90b5c5 Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where
SF() modified non-ta table.
As the result of this artifact it was not possible to detect whether there were any side-effects when
top-level query ends. 
If the top level query table was not modified and the bit is lost there would be no binlogging.

Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags
telling whether the current query and the current transaction modified any non-ta table.
The flags stmt, all are dropped at the end of the query and the transaction.
2007-03-23 17:12:58 +02:00
mats@romeo.(none)
68ebc7e495 Merge romeo.(none):/home/bkroot/mysql-5.1-new-rpl
into  romeo.(none):/home/bk/b23171-mysql-5.1-new-rpl
2007-03-22 09:05:11 +01:00
msvensson@pilot.blaudden
7c5df4d35b Merge bk-internal:/home/bk/mysql-5.1-new-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-03-21 14:24:50 +01:00
aelkin/elkin@dsl-hkibras1-ff1dc300-249.dhcp.inet.fi
ac1c81ddcf Merge dsl-hkibras1-ff1dc300-249.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.1/bug26079_binlog_max_innodb
into  dsl-hkibras1-ff1dc300-249.dhcp.inet.fi:/home/elkin/MySQL/MAIN/mysql-5.1-new-maint
2007-03-21 13:14:12 +02:00
msvensson@pilot.blaudden
80fb08310e Bug#27070 server logs are created unrequested and in wrong directory
- Avoid defaault log file names looking like <hostname>.pid.slow.log
  by using the FN_REPLACE_EXT flag to 'fn_format'
 - Remove the default log files generated by log_state.test before
   test completes
2007-03-20 11:21:27 +01:00
aelkin/elkin@dsl-hkibras1-ff1dc300-249.dhcp.inet.fi
7c22049dfa Bug #26079 max_binlog_size + innodb = not make new binlog and hang server
There was hanging at binlog_commit by a thread executing autocommit query.

The hang appeared to be due to an overly condtion for early return 
from binlog_commit introduced by bug#20265 fix.

Fixed with reverting the logic back to 5.0 version.
2007-03-20 10:50:10 +02:00
serg@janus.mylan
f813272125 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-03-16 14:09:30 +01:00
msvensson@pilot.blaudden
8a8c69f3fd Fix 6 warnings from win64, where one is a potential bug. 2007-03-08 14:29:29 +01:00
tsmith@quadxeon.mysql.com
79191807ff Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/51
2007-03-07 07:21:24 +01:00
serg@janus.mylan
6aa5c001c5 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-03-06 13:44:57 +01:00
msvensson@pilot.blaudden
f5778fc73e Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-01 18:12:56 +01:00
msvensson@pilot.blaudden
51a71fb667 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
2007-03-01 14:53:32 +01:00
lars/lthalmann@mysql.com/dl145j.mysql.com
2f5a2b2476 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-03-01 11:37:28 +01:00
lars/lthalmann@dl145k.mysql.com
504b4d2dfb Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
2007-02-28 22:32:44 +01:00
jani@ua141d10.elisa.omakaista.fi
bcbc0031eb Fixed compiler warnings. 2007-02-28 22:23:35 +02:00