Commit graph

10392 commits

Author SHA1 Message Date
unknown
20c59f9c4b fixes after merge. Updates to test's results.
We now reset the THD members related to auto_increment+binlog in
MYSQL_LOG::write(). This is better than in THD::cleanup_after_query(),
which was not able to distinguish between SELECT myfunc1(),myfunc2()
and INSERT INTO t SELECT myfunc1(),myfunc2() from a binlogging point
of view.
Rows_log_event::exec_event() now calls lex_start() instead of
mysql_init_query() because the latter now does too much (it resets
the binlog format).


mysql-test/extra/rpl_tests/rpl_insert_id.test:
  fix after merge
mysql-test/mysql-test-run.pl:
  -v does not bring useful information when running valgrind; I remove it;
  if you think it's useful add it back.
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Position columns of SHOW BINLOG EVENTS are replaced by # (more robust
  if the size of an event changes).
mysql-test/r/rpl_insert_id.result:
  fix after merge
mysql-test/r/rpl_loaddata.result:
  The binlog positions change, because one event disappeared; indeed there
  was this in the binlog (in the current 5.1!):
  SET INSERT_ID=2;
  SET INSERT_ID=1;
  SET TIMESTAMP=1152540671;
  load data LOCAL INFILE '/tmp/SQL_LOAD_MB-1-2' INTO table t1;
  Two INSERT_ID events, useless and a bug. Goes away afer cleaning up
  auto_increment handling.
mysql-test/r/rpl_switch_stm_row_mixed.result:
  INSERT_ID=5 appears, it's a consequence of having merged the fix
  for BUG#20341
  "stored function inserting into one auto_increment puts bad data in slave".
  In mixed mode, if one substatement of a stored procedure requires row-based,
  the entire procedure uses row-based (was already true for stored functions);
  this is a consequence of not doing the resetting of binlog format inside
  lock_tables() (which didn't work with how the slave thread executes
  row-based binlog events).
mysql-test/t/rpl_switch_stm_row_mixed.test:
  removing the multi-row delayed insert because in RBR the number of events
  which it generates, is not repeatable (probably depends on how the delayed
  thread groups rows, i.e. dependent on timing).
sql/ha_partition.cc:
  update to new prototype
sql/ha_partition.h:
  update to new prototype of the handler:: method.
sql/handler.cc:
  after-merge fixes (manually merging part which was hard to merge in fmtool)
sql/log.cc:
  When we write to the binary log, THD's parameters which influenced this
  write are reset: stmt_depends_on_first_successful_insert_id_in_prev_stmt
  and auto_inc_intervals_in_cur_stmt_for_binlog. This is so that future
  writes are not influenced by those and can write their own values.
  As a consequence, when we don't write to the binlog we do not reset.
  This is to abide by the rule that in a complex statement (using triggers etc),
  the first top- or substatement to generate auto_increment ids
  wins their writing to the binlog (that writing may be done by the statement
  itself or by the caller); so for example for
  INSERT INTO t SELECT myfunc() where myfunc() inserts into auto_increment
  and INSERT INTO t does not, myfunc() will fill
  auto_inc_intervals_in_cur_stmt_for_binlog, which will not be reset when
  myfunc() ends, then INSERT INTO t will write to the binlog and thus
  write the preserved auto_inc_intervals_in_cur_stmt_for_binlog.
sql/log_event.cc:
  mysql_init_query() does too much now to be called in Rows_log_event::exec_event
  (it call mysql_reset_thd_for_next_command() which may switch
  the binlog format now).
  It's ok to call it in Table_map_log_event::exec_event() but its call must
  be before setting the binlog format to "row".
sql/sql_base.cc:
  Resetting the binlog format in lock_tables() was a bad idea of mine;
  it causes problems in execution of row-based binlog events, where
  the thread sets the binlog format by itself and does not want a next
  lock_tables() to reset the binlog format.
  It is also misleading, for a function named lock_tables(), to reset
  the binlog format.
  As a consequence of this change, in mixed binlogging mode, a routine
  is logged either entirely statement-based or entirely row-based, we
  don't switch in the middle (this was already true for prelocked routines,
  now it's also true for stored procedures).
sql/sql_class.cc:
  resetting of auto_increment variables used for binlogging is now done
  when writing to the binary log, no need to do the resetting at the end
  of the statement. It is also more correct this way; consider
  SELECT myfunc1(),myfunc2();
  where both functions insert into the same auto_increment column.
  Binlogging is done in 2 events: "SELECT myfunc1()" and "SELECT myfunc2()".
  So each of those needs to have, in binlog, the INSERT_ID which
  it inserted. But as the 2 function calls are executed under prelocked mode,
  the old code didn't reset auto_inc_intervals_in_cur_stmt_for_binlog
  after the first SELECT was binlogged, and so the INSERT_ID of the first
  SELECT was binlogged for the first SELECT and (wrong) also for the 2nd
  SELECT event.
  stmt_depends_on_first_... has the same logic.
sql/sql_class.h:
  clearer comment
sql/sql_delete.cc:
  unneeded #ifdef. As we temporarily change the binlog format to "statement"
  before calling mysql_delete(), we must restore it afterwards.
sql/sql_insert.cc:
  after-merge fixes.
  No need to reset auto_inc_intervals_in_cur_stmt_for_binlog for every
  row in the delayed insert system thread, because we already reset it
  when writing to the binlog.
sql/sql_parse.cc:
  unneeded #ifdef
2006-07-10 18:41:03 +02:00
unknown
3a3a5622ab Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.1-rpl
into  gbichot3.local:/home/mysql_src/mysql-5.1


mysql-test/mysql-test-run.pl:
  Auto merged
sql/sql_base.cc:
  Auto merged
2006-07-10 13:26:46 +02:00
unknown
de02f1764e Merge chilla.local:/home/mydev/mysql-5.1-amerge
into  chilla.local:/home/mydev/mysql-5.1-aid


sql/ha_federated.cc:
  Auto merged
2006-07-10 12:41:07 +02:00
unknown
9939a66bec Merge gbichot3.local:/home/mysql_src/mysql-5.1-interval-move-next-insert-id
into  gbichot3.local:/home/mysql_src/mysql-5.1


sql/ha_federated.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/handler.cc:
  will fix by hand
mysql-test/extra/rpl_tests/rpl_insert_id.test:
  merge
mysql-test/r/rpl_insert_id.result:
  merge
sql/sql_insert.cc:
  merge
2006-07-09 22:50:02 +02:00
unknown
e0ef4b1e26 post-merge test/result fixes.
mysql-test/r/rpl_switch_stm_row_mixed.result:
  post-merge fix
mysql-test/t/rpl_switch_stm_row_mixed.test:
  post-merge fix (and no need to use a table t12 in some place).
2006-07-09 21:39:21 +02:00
unknown
53641471ac Merge gbichot3.local:/home/mysql_src/mysql-5.1-new-19630
into  gbichot3.local:/home/mysql_src/mysql-5.1


mysql-test/t/disabled.def:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/r/rpl_switch_stm_row_mixed.result:
  manual merge (will fix)
mysql-test/t/rpl_switch_stm_row_mixed.test:
  manual merge (will fix)
2006-07-09 21:17:06 +02:00
unknown
9fe33acbe7 Merge gbichot3.local:/home/mysql_src/mysql-5.1-new-WL3146-handler
into  gbichot3.local:/home/mysql_src/mysql-5.1


sql/sql_insert.cc:
  Auto merged
2006-07-09 18:47:08 +02:00
unknown
60272e750e WL#3146 "less locking in auto_increment":
this is a cleanup patch for our current auto_increment handling:
new names for auto_increment variables in THD, new methods to manipulate them
(see sql_class.h), some move into handler::, causing less backup/restore
work when executing substatements. 
This makes the logic hopefully clearer, less work is is needed in
mysql_insert().
By cleaning up, using different variables for different purposes (instead
of one for 3 things...), we fix those bugs, which someone may want to fix
in 5.0 too:
BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate
statement-based"
BUG#20341 "stored function inserting into one auto_increment puts bad
data in slave"
BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY UPDATE"
(now if a row is updated, LAST_INSERT_ID() will return its id)
and re-fixes:
BUG#6880 "LAST_INSERT_ID() value changes during multi-row INSERT"
(already fixed differently by Ramil in 4.1)
Test of documented behaviour of mysql_insert_id() (there was no test).
The behaviour changes introduced are:
- LAST_INSERT_ID() now returns "the first autogenerated auto_increment value
successfully inserted", instead of "the first autogenerated auto_increment
value if any row was successfully inserted", see auto_increment.test.
Same for mysql_insert_id(), see mysql_client_test.c.
- LAST_INSERT_ID() returns the id of the updated row if ON DUPLICATE KEY
UPDATE, see auto_increment.test. Same for mysql_insert_id(), see
mysql_client_test.c.
- LAST_INSERT_ID() does not change if no autogenerated value was successfully 
inserted (it used to then be 0), see auto_increment.test.
- if in INSERT SELECT no autogenerated value was successfully inserted,
mysql_insert_id() now returns the id of the last inserted row (it already
did this for INSERT VALUES), see mysql_client_test.c.
- if INSERT SELECT uses LAST_INSERT_ID(X), mysql_insert_id() now returns X
(it already did this for INSERT VALUES), see mysql_client_test.c.
- NDB now behaves like other engines wrt SET INSERT_ID: with INSERT IGNORE,
the id passed in SET INSERT_ID is re-used until a row succeeds; SET INSERT_ID
influences not only the first row now.

Additionally, when unlocking a table we check that the thread is not keeping
a next_insert_id (as the table is unlocked that id is potentially out-of-date);
forgetting about this next_insert_id is done in a new
handler::ha_release_auto_increment().

Finally we prepare for engines capable of reserving finite-length intervals
of auto_increment values: we store such intervals in THD. The next step
(to be done by the replication team in 5.1) is to read those intervals from
THD and actually store them in the statement-based binary log. NDB
will be a good engine to test that.


mysql-test/extra/binlog_tests/binlog.test:
  Testing that if INSERT_ID is set to a value too big for the
  column's type, the binlogged INSERT_ID is the truncated value
  (important if slave has a column of a "wider" numeric type).
  Testing binlogging of INSERT_ID with INSERT DELAYED, to be sure that 
  we binlog an INSERT_ID event only for the delayed rows which use one.
mysql-test/extra/rpl_tests/rpl_insert_id.test:
  Testcase for BUG#20339 "stored procedure using
  LAST_INSERT_ID() does not replicate statement-based".
  Testcase for BUG#20341 "stored function inserting into one
  auto_increment puts bad data in slave".
mysql-test/extra/rpl_tests/rpl_loaddata.test:
  Test that LOAD DATA INFILE sets a value for a future LAST_INSERT_ID().
mysql-test/r/auto_increment.result:
  behaviour change: when INSERT totally fails (not even succeeds
  partially and then rolls back), don't change last_insert_id().
  Behaviour change: LAST_INSERT_ID() is now the first successfully inserted,
  autogenerated, id.
  Behaviour change: if INSERT ON DUPLICATE KEY UPDATE, if the table has auto_increment
  and a row is updated, then LAST_INSERT_ID() returns the id of this row.
mysql-test/r/binlog_row_binlog.result:
  result update
mysql-test/r/binlog_stm_binlog.result:
  result update
mysql-test/r/insert.result:
  result update
mysql-test/r/rpl_insert_id.result:
  result update
mysql-test/r/rpl_loaddata.result:
  result update
mysql-test/r/rpl_ndb_auto_inc.result:
  ndb's behaviour is now like other engines wrt SET INSERT_ID
  in a multi-row INSERT:
  - with INSERT IGNORE: the id passed in SET INSERT_ID is re-used until
  a row succeeds.
  - generally, SET INSERT_ID sets the first value and other values are
  simply computed from this first value, instead of previously where
  the 2nd and subsequent values where not influenced by SET INSERT_ID;
  this good change is due to the removal of "thd->next_insert_id=0"
  from ha_ndbcluster.
mysql-test/t/auto_increment.test:
  A testcase of BUG#19243: if ON DUPLICATE KEY UPDATE updates a row,
  LAST_INSERT_ID() now returns the id of the row.
  Test of new behaviour of last_insert_id() when no autogenerated value was
  inserted, or when only some autogenerated value (not the first of them) was
  inserted.
mysql-test/t/insert.test:
  testing INSERT IGNORE re-using generated values
sql/ha_federated.cc:
  update for new variables.
sql/ha_ndbcluster.cc:
  handler::auto_increment_column_changed not needed, equivalent to
  (insert_id_for_cur_row > 0).
  thd->next_insert_id=0 not needed anymore; it was used to force
  handler::update_auto_increment() to call ha_ndbcluster::get_auto_increment()
  for each row of a multi-row INSERT, now this happens naturally
  because NDB says "I have reserved you *one* value" in get_auto_increment(),
  so handler::update_auto_increment() calls again for next row.
sql/handler.cc:
  More comments, use of new methods and variables. Hopes to be clearer
  than current code.
  thd->prev_insert_id not in THD anymore: it is managed locally by inserters
  (like mysql_insert()).
  THD::clear_next_insert_id is now equivalent to
  handler::next_insert_id > 0.
  get_auto_increment() reserves an interval of values from the engine,
  uses this interval for next rows of the statement, until interval
  is exhausted then it asks for another interval (of a bigger size
  than the first one; size doubles until reaching 65535 then it stays constant).
  If doing statement-based binlogging, intervals are remembered in a list
  for storage in the binlog.
  For "forced" insert_id values (SET INSERT_ID or replication slave),
  forced_auto_inc_intervals is non-empty and the handler takes its intervals
  from there, without calling get_auto_increment().
  ha_release_auto_increment() resets the handler's auto_increment variables;
  it calls release_auto_increment() which is handler-dependent and
  serves to return to the engine any unused tail of the last used
  interval.
  If ending a statement, next_insert_id>0 means that autoinc values have been
  generated or taken from the master's binlog (in a replication slave) so
  we clear those values read from binlog, so that next top- or sub-
  statement does not use them.
sql/handler.h:
  handler::auto_increment_changed can be replaced by
  (handler::insert_id_for_cur_row > 0).
  THD::next_insert_id moves into handler (more natural, and prepares
  for the day when we'll support a single statement inserting into
  two tables - "multi-table INSERT" like we have UPDATE - will this
  happen?).
  This move makes the backup/restore of THD::next_insert_id when entering
  a substatement unneeded, as each substatement has its own handler
  objects.
sql/item_func.cc:
  new names for variables.
  For the setting of what mysql_insert_id() will return to the client,
  LAST_INSERT_ID(X) used to simply pretend that the generated autoinc
  value for the current row was X, but this led to having no reliable
  way to know the really generated value, so we now have a bool:
  thd->arg_of_last_insert_id_function which enables us to know that
  LAST_INSERT_ID(X) was called (and then X can be found in
  thd->first_successful_insert_id_in_prev_stmt).
sql/log.cc:
  new variable names for insert_ids. Removing some unused variables in the slow
  log.
sql/log_event.cc:
  new variable names, comments. Preparing for when master's won't binlog
  LAST_INSERT_ID if it was 0.
sql/set_var.cc:
  new variable names.
  The last change repeats how Bar fixed BUG#20392
  "INSERT_ID session variable has weird value" in 5.0.
sql/sql_class.cc:
  new variables for insert_id. In THD::cleanup_after_query() we fix
  BUG#20339 "stored procedure using LAST_INSERT_ID() does not replicate
  statement-based" (will one want to fix it in 5.0?). Many comments
  about what stored functions do to auto_increment.
  In reset|restore_sub_statement_state(), we need to backup less
  auto_inc variables as some of them have moved to the handler;
  we backup/restore those which are about the current top- or sub-
  statement, *not* those about the statement-based binlog
  (which evolve as the top- and sub-statement execute).
  Because we split THD::last_insert_id into 
  THD::first_successful_insert_id_in_prev_stmt and
  THD::auto_inc_intervals_for_binlog (among others), we fix
  BUG#20341 "stored function inserting into one auto_increment
  puts bad data in slave": indeed we can afford to not backup/restore
  THD::auto_inc_intervals_for_binlog (which fixes the bug) while still
  backing up / restoring THD::first_successful_insert_id_in_prev_stmt
  (ensuring that the top-level LAST_INSERT_ID() is not affected by INSERTs
  done by sub-statements, as is desirable and tested in rpl_insert_id.test).
sql/sql_class.h:
  new variables and methods for auto_increment.
  Some THD members move into handler (those which are really about
  the table being inserted), some stay in THD (those which are
  about what a future LAST_INSERT_ID() should return, or about
  what should be stored into the statement-based binlog).
  THD::next_insert_id moves to handler::.
  THD::clear_next_insert_id removed (had become equivalent
  to next_insert_id > 0).
  THD::last_insert_id becomes four:
  THD::first_successful_insert_id_in_cur_stmt,
  THD::auto_inc_intervals_for_binlog,
  handler::insert_id_for_cur_row,
  THD::first_successful_insert_id_in_prev_stmt.
  THD::current_insert_id becomes:
  THD::first_successful_insert_id_in_prev_stmt_for_binlog
  THD::prev_insert_id is removed, handler can just use
  handler::insert_id_for_cur_row instead (which is more accurate:
  for the first row, prev_insert_id was set before get_auto_increment
  was called, so was 0, causing a call to
  get_auto_increment() for the 2nd row if the 1st row fails;
  here we don't need the call as insert_id_for_cur_row has
  the value of the first row).
  THD::last_insert_id_used becomes: stmt_depends_on_first_row_in_prev_stmt
  THD::insert_id_used is removed (equivalent to
  auto_inc_intervals_for_binlog non empty).
  The interval returned by get_auto_increment() and currently being
  consumed is handler::auto_inc_interval_for_cur_row.
  Comments to explain each of them.
  select_insert::last_insert_id becomes autoinc_value_of_last_inserted_row.
sql/sql_insert.cc:
  the "id" variable is not changed for each row now; it used to compensate for
  this contradiction:
  - thd->last_insert_id supposed job was to keep the id of the first row
  - but it was updated for every row
  - so mysql_insert() made sure to catch its first value and restore it at the end of stmt.
  Now THD keeps the first value in first_successful_insert_id_in_cur_stmt,
  and value of the row in insert_id_for_cur_row. So "id" only serves to fill
  mysql_insert_id(), as depending on some conditions, "id" must be different
  values.
  Prev_insert_id moves from THD to write_record().
  We now set LAST_INSERT_ID() in ON DUPLICATE KEY UPDATE too (BUG#19243).
  In an INSERT DELAYED, we still "reset auto-increment caching" but differently
  (by calling ha_release_auto_increment()).
sql/sql_load.cc:
  no need to fiddle with "id", THD maintains
  THD::first_successful_insert_id_in_cur_stmt by itself and correctly now.
  ha_release_auto_increment() is now (logically) called before we unlock
  the table.
sql/sql_parse.cc:
  update to new variable names.
  Assertion that reset_thd_for_next_command() is not called for every
  substatement of a routine (I'm not against it, but if we do this change,
  statement-based binlogging needs some adjustments).
sql/sql_select.cc:
  update for new variable names
sql/sql_table.cc:
  next_insert_id not needed in mysql_alter_table(), THD manages.
sql/sql_update.cc:
  update for new variable names.
  Even though this is UPDATE, an insert id can be generated (by
  LAST_INSERT_ID(X)) and should be recorded because mysql_insert_id() wants
  to know about it.
sql/structs.h:
  A class for "discrete" intervals (intervals of integer numbers with a certain
  increment between them): Discrete_interval, and a class for a list of such
  intervals: Discrete_intervals_list
tests/mysql_client_test.c:
  tests of behaviour of mysql_insert_id(): there were no such tests, while in
  our manual we document its behaviour. In comments you'll notice the behaviour
  changes introduced (there are 5).
2006-07-09 17:52:19 +02:00
unknown
81a80049aa * Mixed replication mode * :
1) Fix for BUG#19630 "stored function inserting into two auto_increment breaks
statement-based binlog":
a stored function inserting into two such tables may fail to replicate
(inserting wrong data in the slave's copy of the second table) if the slave's
second table had an internal auto_increment counter different from master's.
Because the auto_increment value autogenerated by master for the 2nd table
does not go into binlog, only the first does, so the slave lacks information.
To fix this, if running in mixed binlogging mode, if the stored function or
trigger plans to update two different tables both having auto_increment
columns, we switch to row-based for the whole function.
We don't have a simple solution for statement-based binlogging mode, there
the bug remains and will be documented as a known problem.
Re-enabling rpl_switch_stm_row_mixed.
2) Fix for BUG#20630 "Mixed binlogging mode does not work with stored
functions, triggers, views", which was a documented limitation (in mixed
mode, we didn't detect that a stored function's execution needed row-based
binlogging (due to some UUID() call for example); same for
triggers, same for views (a view created from a SELECT UUID(), and doing
INSERT INTO sometable SELECT theview; would not replicate row-based).
This is implemented by, after parsing a routine's body, remembering in sp_head
that this routine needs row-based binlogging. Then when this routine is used,
the caller is marked to require row-based binlogging too.
Same for views: when we parse a view and detect that its SELECT needs
row-based binary logging, we mark the calling LEX as such.
3) Fix for BUG#20499 "mixed mode with temporary table breaks binlog":
a temporary table containing e.g. UUID has its changes not binlogged,
so any query updating a permanent table with data from the temporary table
will run wrongly on slave. Solution: in mixed mode we don't switch back
from row-based to statement-based when there exists temporary tables.
4) Attempt to test mysqlbinlog on a binlog generated by mysqlbinlog;
impossible due to BUG#11312 and BUG#20329, but test is in place for when
they are fixed.


mysql-test/r/rpl_switch_stm_row_mixed.result:
  testing BUG#19630 "stored function inserting into two auto_increment breaks
  statement-based binlog",
  testing BUG#20930 "Mixed binlogging mode does not work with stored functions,
  triggers, views.
  testing BUG#20499 "mixed mode with temporary table breaks binlog".
  I have carefully checked this big result file, it is correct.
mysql-test/t/disabled.def:
  re-enabling test
mysql-test/t/rpl_switch_stm_row_mixed.test:
  Test for BUG#19630 "stored function inserting into two auto_increment breaks
  statement-based binlog":
  we test that it goes row-based, but only when needed;
  without the bugfix, master and slave's data differed.
  Test for BUG#20499 "mixed mode with temporary table breaks binlog":
  without the bugfix, slave had 2 rows, not 3.
  Test for BUG#20930 "Mixed binlogging mode does not work with stored
  functions, triggers, views".
  Making strings used more different, for easier tracking of "by which routine
  was this binlog line generated".
  Towards the end, an attempt to test mysqlbinlog on a binlog generated by
  the mixed mode; attempt failed because of BUG#11312 and BUG#20929.
sql/item_create.cc:
  fix for build without row-based replication
sql/set_var.cc:
  cosmetic: in_sub_stmt is exactly meant to say if we are in stored
  function/trigger, so better use it.
sql/sp.cc:
  When a routine adds its tables to the top statement's tables, if this routine
  needs row-based binlogging, mark the entire top statement as well.
  Same for triggers.
  Needed for making the mixed replication mode work with stored functions
  and triggers.
sql/sp_head.cc:
  new enum value for sp_head::m_flags, remembers if, when parsing the 
  routine, we found at least one element (UUID(), UDF) requiring row-based
  binlogging.
sql/sp_head.h:
  new enum value for sp_head::m_flags (see sp_head.cc).
  An utility method, intended for attributes of a routine which need
  to propagate upwards to the caller; so far only used for binlogging
  information, but open to any other attribute.
sql/sql_base.cc:
  For BUG#19630 "stored function inserting into two auto_increment
  breaks statement-based binlog":
  When we come to locking tables, we have collected all tables used by
  functions, views and triggers, we detect if we're going to update two tables
  having auto_increment columns. If yes, statement-based binlogging won't work
  (Intvar_log_event records only one insert_id) so, if in mixed binlogging
  mode, switch to row-based.
  For making mixed mode work with stored functions using UUID/UDF:
  when we come to locking tables, we have parsed the whole body so know if
  some elements need row-based. Generation of row-based binlog events
  depends on locked tables, so this is the good place to decide of the binlog
  format.
sql/sql_class.h:
  Fix for BUG#20499 "mixed mode with temporary table breaks binlog".
  Making mixed mode work with stored functions/triggers: don't reset
  back to statement-based if in executing a stored function/trigger.
sql/sql_lex.cc:
  fix for build without row-based replication.
  binlog_row_based_if_mixed moves from st_lex to Query_tables_list, because
  that boolean should not be affected when a SELECT reads the INFORMATION_SCHEMA
  and thus implicitely parses a view or routine's body: this body may
  contain needing-row-based components like UUID() but the SELECT on
  INFORMATION_SCHEMA should not be affected by that and should not use
  row-based; as Query_tables_list is backed-up/reset/restored when parsing
  the view/routine's body, so does binlog_row_based_if_mixed and the
  top SELECT is not affected.
sql/sql_lex.h:
  fix for build without row-based replication.
  binlog_row_based_if_mixed moves from st_lex to Query_tables_list
  (see sql_lex.cc)
sql/sql_parse.cc:
  For the mixed mode to work with stored functions using UUID and UDF, we need
  to move the switch-back-from-row-to-statement out of
  mysql_execute_command() (which is executed for each statement, causing
  the binlogging mode to change in the middle of the function, which would
  not work)
  The switch to row-based is now done in lock_tables(), no need to keep it
  in mysql_execute_command(); in lock_tables() we also switch back from 
  row-based to statement-based (so in a stored procedure, all statements
  have their binlogging mode). We must however keep a resetting in
  mysql_reset_thd_for_next_command() as e.g. CREATE PROCEDURE does not call
  lock_tables().
sql/sql_view.cc:
  When a view's body needs row-based binlogging (e.g. the view is created
  from SELECT UUID()), propagate this fact to the top st_lex.
sql/sql_yacc.yy:
  use TRUE instead of 1, for binlog_row_based_if_mixed.
2006-07-09 17:00:47 +02:00
unknown
b94d70a639 BUG#19188 incorrect temporary table name of DROP query in replication
manual merge of 5.0 patch and fixing an issue with closing temp tables when no binlog or RBR.
Note, that despite temporary_tables is indeed double-linked list in 5.1 (patch for bug #19881) it is still enough to use only 'next' reference, as it was done for 5.0, when the list is sorted and 
destoyed after.


mysql-test/r/rpl_temporary.result:
  results changed
mysql-test/t/rpl_temporary.test:
  fixing kill stmt for a thread with temp tables. Restoring check of temp table with accent char.
sql/sql_base.cc:
  manual merge part 2. Leaving only extensively refactored close_temporary_tables from local rep.
2006-07-09 00:29:33 +03:00
unknown
e6f010b63e Merge chilla.local:/home/mydev/mysql-5.0--main
into  chilla.local:/home/mydev/mysql-5.0-amerge
2006-07-08 16:50:50 +02:00
unknown
619d8b2c65 Merge chilla.local:/home/mydev/mysql-5.1--main
into  chilla.local:/home/mydev/mysql-5.1-amerge


sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
2006-07-08 10:54:54 +02:00
unknown
1730c0c70d Merge dsl-hkigw8-feb1fb00-100.dhcp.inet.fi:/usr_rh9/home/elkin.rh9/MySQL/TEAM/BARE/5.1
into  dsl-hkigw8-feb1fb00-100.dhcp.inet.fi:/usr_rh9/home/elkin.rh9/MySQL/TEAM/FIXES/5.1/bug19188_graved_temp
2006-07-08 11:03:40 +03:00
unknown
a92e1c4aea BUG#20821 (INSERT DELAYED failes to write some rows to binlog):
Fixing typo and potential memory problem.
Reducing number of concurrent mysqlslap threads since tests fail
in pushbuild due to too many threads.


mysql-test/r/rpl_insert.result:
  Result change.
mysql-test/t/rpl_insert.test:
  Reducing number of threads since it doesn't pass pushbuild.
sql/sql_insert.cc:
  Fixing typo and potential memory problem.
2006-07-08 06:15:24 +02:00
unknown
d0baba6114 Bug #20843 tests fails randomly with assertion in completeClusterFailed
Bug #20902 Alter table invalid schema version with statement-based binlogging
(latter caused by the above)
2006-07-08 03:26:13 +02:00
unknown
e8699b5614 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  jabberwock.site:/home/dlenev/mysql-5.1-bg18437
2006-07-08 01:33:50 +04:00
unknown
9b6a138411 Tweaks for duplicate and missing lines in tests from a huge merge.
mysql-test/r/type_newdecimal.result:
  Make test clean up after itself.
mysql-test/t/ps_1general.test:
  Remove improperly merged lines.
mysql-test/t/type_newdecimal.test:
  Make test clean up after itself.
2006-07-07 16:56:49 -04:00
unknown
b72a72aa0b Add a test case for Bug#18884 "lock table + global read lock = crash"
(the bug itself is not repeatable any more).


mysql-test/r/lock.result:
  Update test results (Bug#18884)
mysql-test/t/lock.test:
  Add a test case for Bug#18884 "lock table + global read lock = crash"
2006-07-08 00:26:18 +04:00
unknown
cb5e134eb3 Merge dsl-hkigw8-feb1fb00-100.dhcp.inet.fi:/usr_rh9/home/elkin.rh9/MySQL/TEAM/BARE/5.1
into  dsl-hkigw8-feb1fb00-100.dhcp.inet.fi:/usr_rh9/home/elkin.rh9/MySQL/TEAM/FIXES/5.1/bug19188_graved_temp


mysql-test/r/rpl_temporary.result:
  use local.
mysql-test/t/rpl_temporary.test:
  use local.
sql/sql_base.cc:
  use local
sql/mysql_priv.h:
  added is_user_table
2006-07-07 22:25:16 +03:00
unknown
4e14d3b77f Merge bk-internal:/home/bk/mysql-5.1
into  devsrv-b.mysql.com:/data0/knielsen/tmp-5.1
2006-07-07 20:33:46 +02:00
unknown
8f107a2610 BUG #19773
Small post-patch fixes


mysql-test/r/federated.result:
  BUG #19773
  
  Test result fixes
mysql-test/t/federated.test:
  BUG #19774
  
  Removed failing line to test.
sql/ha_federated.cc:
  BUG #19773
  
  method declartion and definition not the same.
2006-07-07 11:17:50 -07:00
unknown
719248524e BUG#20902: Test failure in ndb_alter_table3 with statement-based binlogging
Disable test cases ndb_alter_table3, ndb_autodiscover3, ndb_dd_advance,
and ndb_multi in statement-based binlogging mode until bug can be fixed.


mysql-test/t/ndb_alter_table3.test:
  Disable test in statement-based binlogging mode.
mysql-test/t/ndb_autodiscover3.test:
  Disable test in statement-based binlogging mode.
mysql-test/t/ndb_dd_advance.test:
  Disable test in statement-based binlogging mode.
mysql-test/t/ndb_multi.test:
  Disable test in statement-based binlogging mode.
2006-07-07 17:20:49 +02:00
unknown
78942270ed Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  jabberwock.site:/home/dlenev/mysql-5.1-bg18437


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/sql_table.cc:
  Manual merge.
2006-07-07 14:11:35 +04:00
unknown
89e2fba47f Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge-with-5.0
2006-07-07 13:51:47 +04:00
unknown
98311625fa Adding sleep to allow mysqlslap to finish it's job on systems under high load.
mysql-test/t/rpl_insert.test:
  Adding sleep to allow mysqlslap to finish.
2006-07-07 09:25:12 +02:00
unknown
4298f45d01 Merge chilla.local:/home/mydev/mysql-5.1--main
into  chilla.local:/home/mydev/mysql-5.1-amerge
2006-07-07 09:14:09 +02:00
unknown
650e65047a Merge govinda.patg.net:/home/patg/mysql-build/mysql-5.0-merge1
into  govinda.patg.net:/home/patg/mysql-build/mysql-5.1-merge1


mysql-test/r/federated.result:
  BUG #19773
  
  Hand-merge conflicts from 5.0 to 5.1
mysql-test/t/federated.test:
  BUG #19773
  
  Hand-merge conflicts from 5.0 to 5.1
sql/ha_federated.cc:
  BUG #19773
  
  Hand-merge conflicts from 5.0 to 5.1
sql/ha_federated.h:
  BUG #19773
  
  Hand-merge conflicts from 5.0 to 5.1
2006-07-06 16:07:24 -07:00
unknown
07b95e602d Merge ymer.(none):/usr/local/mysql/mysql-5.0-bug19951
into  ymer.(none):/usr/local/mysql/tmp-5.1


mysql-test/t/wait_timeout.test:
  Auto merged
2006-07-07 00:18:03 +02:00
unknown
16c54768ba Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge
2006-07-07 02:18:02 +04:00
unknown
9d332ef794 removed alter table partition error test since it cannot be made predictable... name will change of created file 2006-07-07 00:18:01 +02:00
unknown
5ac016a814 Merge ymer.(none):/usr/local/mysql/mysql-5.0-bug19951
into  ymer.(none):/usr/local/mysql/tmp-5.0
2006-07-06 23:52:05 +02:00
unknown
224082fc6b BUG#19951: Race conditions in test wait_timeout.
Fix random failures in test 'wait_timeout' that depend on exact timing.

1. Force a reconnect initially if necessary, as otherwise slow startup
might have caused a connection timeout before the test can even start.

2. Explicitly disconnect the first connection to remove confusion about
which connection aborts from timeout, causing test failure.


mysql-test/r/wait_timeout.result:
  Fix two races in test.
mysql-test/t/wait_timeout.test:
  Fix two races in test.
2006-07-06 23:49:09 +02:00
unknown
d2dc70dc98 Testcase for BUG#20633 "INSERT DELAYED RAND() or @user_var does not replicate
statement-based" (bugfix was committed today):
we verify that now it works in mixed mode. And a comment.


mysql-test/r/rpl_switch_stm_row_mixed.result:
  result update
mysql-test/t/rpl_switch_stm_row_mixed.test:
  testcase for BUG#20633
sql/sql_insert.cc:
  the #ifdef was not necessary; a comment.
2006-07-06 22:03:35 +02:00
unknown
6e791bb126 Merge chilla.local:/home/mydev/mysql-5.1
into  chilla.local:/home/mydev/mysql-5.1-amerge


scripts/make_binary_distribution.sh:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
2006-07-06 21:45:15 +02:00
unknown
df9b4754b7 Merge bodhi.netgear:/opt/local/work/tmp_merge
into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge-with-5.0


mysql-test/r/create.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
include/my_sys.h:
  Manual merge (second attempt).
mysql-test/r/bdb.result:
  Manual merge (second attempt).
mysql-test/t/bdb.test:
  Manual merge (second attempt).
mysys/my_malloc.c:
  Manual merge (second attempt).
mysys/safemalloc.c:
  Manual merge (second attempt).
sql/ha_federated.cc:
  Manual merge (second attempt).
sql/log_event.cc:
  Manual merge (second attempt).
sql/set_var.cc:
  Manual merge (second attempt).
sql/set_var.h:
  Manual merge (second attempt).
sql/slave.cc:
  Manual merge (second attempt).
sql/slave.h:
  Manual merge (second attempt).
sql/sql_class.h:
  Manual merge (second attempt).
sql/sql_table.cc:
  Manual merge (second attempt).
sql/sql_udf.cc:
  Manual merge (second attempt).
sql/sql_yacc.yy:
  Manual merge (second attempt).
2006-07-06 22:55:48 +04:00
unknown
d2b4e9c8e2 Merge bodhi.netgear:/opt/local/work/mysql-5.1-root
into  bodhi.netgear:/opt/local/work/mysql-5.1-runtime-merge


BitKeeper/etc/ignore:
  auto-union
2006-07-06 22:26:47 +04:00
unknown
925fba7a03 Bug #20820 auto inc table not handled correctly when restored from cluster backup
mysql-test/t/ndb_dd_backuprestore.test:
  make sure only run in default cluster
mysql-test/t/rpl_ndb_dd_advance.test:
  make sure only run in default cluster
mysql-test/t/rpl_ndb_sync.test:
  make sure only run in default cluster
2006-07-06 20:04:48 +02:00
unknown
99e347b154 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
2006-07-06 19:03:33 +02:00
unknown
b78304d215 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb


mysql-test/r/ndb_restore.result:
  manual merge
mysql-test/t/ndb_restore.test:
  manual merge
storage/ndb/tools/restore/consumer_restore.cpp:
  manual merge
2006-07-06 19:02:38 +02:00
unknown
ce554d56a4 Bug #20820 auto inc table not handled correctly when restored from cluster backup 2006-07-06 18:50:44 +02:00
unknown
b5faf11ab6 Merge gbichot3.local:/home/mysql_src/mysql-5.1
into  gbichot3.local:/home/mysql_src/mysql-5.1-new-WL3146-handler


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/rpl_row_create_table.result:
  Auto merged
mysql-test/t/rpl_row_create_table.test:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-07-06 17:56:26 +02:00
unknown
986679a287 Fix for BUG#20649 "mixed replication mode does not work with INSERT DELAYED".
The bug was that if the server was running in mixed binlogging mode,
and an INSERT DELAYED used some needing-row-based components like UUID(),
the server didn't binlog this row-based but statement-based, which
thus failed to insert correct data on the slave.
This changeset implements that when a delayed_insert thread is created,
if the server's global binlog mode is "mixed", that thread will use row-based.
This also fixes BUG#20633 "INSERT DELAYED RAND() or @user_var does not
replicate statement-based": we don't fix it in statement-based mode (would
require bookeeping of rand seeds and user variables used by each row),
but at least it will now work in mixed mode (as row-based will be used).
We re-enable rpl_switch_stm_row_mixed.test (so BUG#18590
which was about re-enabling this test, will be closed) to test the fixes.
Between when it was disabled and now, some good changes to row-based
binlogging (no generation of table map events for non-changed tables)
induce changes in the test's result file.


mysql-test/r/rpl_switch_stm_row_mixed.result:
  result update.
  Note that some pieces of binlog are gone, not due to my test but to changes
  to the row-based binlogging code (non-changed tables don't generate
  table map binlog events now) done while the test was disabled.
mysql-test/t/disabled.def:
  this test works now
mysql-test/t/rpl_switch_stm_row_mixed.test:
  testing fix to make INSERT DELAYED work in mixed mode
sql/sql_insert.cc:
  In mixed binlogging mode, the delayed_insert system thread now always
  uses row-based binlogging.
  This makes replication of INSERT DELAYED VALUES(RAND()) or VALUES(@a)
  work in mixed mode (it does not in statement-based).
2006-07-06 17:54:04 +02:00
unknown
f523685c66 corrected result file
- missing order by
2006-07-06 15:51:13 +02:00
unknown
4ceb9bb090 Merge chilla.local:/home/mydev/mysql-5.0-ateam
into  chilla.local:/home/mydev/mysql-5.1-ateam


libmysqld/lib_sql.cc:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/key.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_delete_table.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/rt_index.c:
  Auto merged
storage/myisam/rt_mbr.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Manual merge
mysql-test/r/key.result:
  Manual merge
mysql-test/t/ctype_utf8.test:
  Manual merge
sql/item_timefunc.cc:
  Manual merge
2006-07-06 13:18:00 +02:00
unknown
0e47753ffd After merge fixes for patch solving bug#18437 "Wrong values inserted with a
before update trigger on NDB table".

Two main changes:
- We use TABLE::read_set/write_set bitmaps for marking fields used by
  statement instead of Field::query_id in 5.1.
- Now when we mark columns used by statement we take into account columns 
  used by table's triggers instead of marking all columns as used if table
  has triggers.


mysql-test/r/federated.result:
  Changed test in order to make it work with RBR.
  RBR changes the way in which we execute "DELETE FROM t1" statement - we don't
  use handler::delete_all_rows() method if RBR is enabled (see bug#19066).
  As result federated engine produces different sequences of statements for
  remote server in non-RBR and in RBR cases. And this changes order of the
  rows inserted by following INSERT statements.
mysql-test/t/federated.test:
  Changed test in order to make it work with RBR.
  RBR changes the way in which we execute "DELETE FROM t1" statement - we don't
  use handler::delete_all_rows() method if RBR is enabled (see bug#19066).
  As result federated engine produces different sequences of statements for
  remote server in non-RBR and in RBR cases. And this changes order of the
  rows inserted by following INSERT statements.
sql/ha_partition.cc:
  Added handling of HA_EXTRA_WRITE_CAN_REPLACE/HA_EXTRA_WRITE_CANNOT_REPLACE
  to ha_partition::extra().
sql/item.cc:
  Adjusted comment after merge. In 5.1 we use TABLE::read_set/write_set
  bitmaps instead of Field::query_id for marking columns used.
sql/log_event.cc:
  Write_rows_log_event::do_before_row_operations():
    Now we explicitly inform handler that we want to replace rows so it can
    promote operation done by write_row() to replace.
sql/mysql_priv.h:
  Removed declaration of mark_fields_used_by_triggers_for_insert_stmt() which
  is no longer used (we have TABLE::mark_columns_needed_for_insert() instead).
sql/sql_insert.cc:
  Adjusted code after merge. Get rid of mark_fields_used_by_triggers_for_insert_stmt()
  as now we use TABLE::mark_columns_needed_for_insert() for the same purprose.
  Aligned places where we call this method with places where we call
  mark_fields_used_by_triggers_for_insert() in 5.0.
  Finally we no longer need to call handler::extra(HA_EXTRA_WRITE_CAN_REPLACE)
  in case of REPLACE statement since in 5.1 write_record() marks all columns
  as used before doing actual row replacement.
sql/sql_load.cc:
  Adjusted code after merge. In 5.1 we use TABLE::mark_columns_needed_for_insert() instead of
  mark_fields_used_by_triggers_for_insert_stmt() routine. We also no longer
  need to call handler::extra(HA_EXTRA_RETRIEVE_ALL_COLS) if we execute LOAD
  DATA REPLACE since in 5.1 write_record() will mark all columns as used before
  doing actual row replacement.
sql/sql_trigger.cc:
  Table_triggers_list::mark_fields_used():
    We use TABLE::read_set/write_set bitmaps for marking fields used instead
    of Field::query_id in 5.1.
sql/sql_trigger.h:
  TABLE::mark_columns_needed_for_* methods no longer need to be friends of
  Table_triggers_list class as intead of dirrectly accessing its private
  members they can use public Table_triggers_list::mark_fields_used() method.
  Also Table_triggers)list::mark_fields_used() no longer needs THD argument.
sql/table.cc:
  TABLE::mark_columns_needed_for_*():
    Now we mark columns which are really used by table's triggers instead of
    marking all columns as used if table has triggers.
2006-07-06 13:33:23 +04:00
unknown
fc3aad740a corrected results 2006-07-06 10:20:49 +02:00
unknown
34349ad272 Merge ngrishakin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  mysql.com:/home/ndbdev/ngrishakin/mysql-5.1-new-ndb
2006-07-06 04:37:53 +02:00
unknown
d191fb6300 ndb_dd_advance test cases
mysql-test/t/ndb_dd_advance.test:
  ndb_dd_advance.test
mysql-test/t/ndb_dd_advance2.test:
  ndb_dd_advance2.test
mysql-test/r/ndb_dd_advance.result:
  ndb_dd_advance.result
mysql-test/r/ndb_dd_advance2.result:
  ndb_dd_advance2.result
2006-07-06 04:37:03 +02:00
unknown
cee36215f0 Merge xiphis.org:/home/antony/work2/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/p2-bug8706.3-merge-5.0


configure.in:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-07-05 17:26:16 -07:00
unknown
5a90386708 Bug #20843 tests fails randomly with assertion in completeClusterFailed
- flush gci needs to be reset on disconnect as cluster may reconnect after --initial with a smaller gci


storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
  Bug #20843 tests fails randomly with assertion in completeClusterFailed
  reenabled test
2006-07-06 01:33:53 +02:00
unknown
e8d7da1116 .del-ndb_dd_advance.result~165b282a93715547:
Delete: mysql-test/r/ndb_dd_advance.result
.del-ndb_dd_advance2.result~89be9fe55c2fda5a:
  Delete: mysql-test/r/ndb_dd_advance2.result
.del-ndb_dd_advance2.test~e9e56bc3e8e8f740:
  Delete: mysql-test/t/ndb_dd_advance2.test
.del-ndb_dd_advance.test~58e757b6c1d33996:
  Delete: mysql-test/t/ndb_dd_advance.test


BitKeeper/deleted/.del-ndb_dd_advance.test~58e757b6c1d33996:
  Delete: mysql-test/t/ndb_dd_advance.test
BitKeeper/deleted/.del-ndb_dd_advance2.test~e9e56bc3e8e8f740:
  Delete: mysql-test/t/ndb_dd_advance2.test
BitKeeper/deleted/.del-ndb_dd_advance2.result~89be9fe55c2fda5a:
  Delete: mysql-test/r/ndb_dd_advance2.result
BitKeeper/deleted/.del-ndb_dd_advance.result~165b282a93715547:
  Delete: mysql-test/r/ndb_dd_advance.result
2006-07-05 23:50:29 +02:00
unknown
2717581764 Merge ngrishakin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/ndbdev/ngrishakin/mysql-5.1
2006-07-05 23:12:49 +02:00
unknown
79a2d0521d disabled ndb_autodiscover3 again 2006-07-05 23:12:48 +02:00
unknown
30de4903ae Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new-maint


BUILD/compile-dist:
  Auto merged
BitKeeper/deleted/.del-partition_innodb.result:
  Auto merged
BitKeeper/deleted/.del-partition_innodb.test:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/create_not_windows.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/wait_timeout.test:
  Auto merged
mysys/my_lib.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/unireg.cc:
  Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
  manuakl merge
mysql-test/lib/mtr_process.pl:
  manuakl merge
mysql-test/mysql-test-run.pl:
  manuakl merge
mysql-test/r/type_newdecimal.result:
  manuakl merge
mysql-test/t/create.test:
  manuakl merge
mysql-test/t/func_group.test:
  manuakl merge
mysql-test/t/type_newdecimal.test:
  manuakl merge
2006-07-05 16:16:09 -04:00
unknown
f481a6a894 BUG#20770: Added some more test cases
mysql-test/r/partition_range.result:
  New test case
mysql-test/t/partition_range.test:
  New test case
sql/partition_info.cc:
  No changes
2006-07-05 16:06:51 -04:00
unknown
f82e49b2b6 Bug #20843 tests fails randomly with assertion in completeClusterFailed
- reenabled test as this now seems fixed
2006-07-05 21:44:11 +02:00
unknown
ae0e8aff42 Switching to use INSERT DELAYED, which it should be, for rpl_insert.
mysql-test/t/rpl_insert.test:
  Fixing to use INSERT DELAYED.
2006-07-05 21:17:00 +02:00
unknown
43179555d9 BUG#20770: DATA DIRECTORY and INDEX DIRECTORY error when ALTER TABLE ADD/DROP/REORGANIZE partition
Also some error in handling options for subpartitions.


mysql-test/r/partition.result:
  New test cases
mysql-test/t/partition.test:
  New test cases
sql/ha_partition.cc:
  Added partition_element to prepare_new_partition so that we can properly set-up table
  before creating partitions.
sql/ha_partition.h:
  Added partition_element to prepare_new_partition so that we can properly set-up table
  before creating partitions.
sql/sql_yacc.yy:
  Ensure that subpartitions always inherit options from the partition they belong to.
  They can change it afterwards but will use the options as set on partition level
  if set at that level.
2006-07-05 12:57:23 -04:00
unknown
77e82450b3 Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into  mysql.com:/home/bk/b20821-mysql-5.1-new-rpl


sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-07-05 17:11:36 +02:00
unknown
53def7bda7 BUG#20821 (INSERT DELAYED fails to write some rows to binlog):
Reverting to old behaviour of writing the query before all rows
have been written.


mysql-test/r/rpl_row_delayed_ins.result:
  Result change
sql/sql_class.cc:
  Adding debug message to binlog_query()
sql/sql_insert.cc:
  - Changing write_delayed() to use a LEX_STRING for the query.
  - Adding query string to class delayed_row.
  - Removing query string from class delayed_insert.
  - Adding code to copy query string and delete it when the row
    is executed.
  - Logging query at first row instead of after all rows are 
    inserted (reverting to old behaviour).
  - Flushing the pending row event after all rows have been inserted.
    This is necessary since binlog_query() is called before all rows
    instead of after.
mysql-test/r/rpl_insert.result:
  New BitKeeper file ``mysql-test/r/rpl_insert.result''
mysql-test/t/rpl_insert.test:
  New BitKeeper file ``mysql-test/t/rpl_insert.test''
2006-07-05 16:58:56 +02:00
unknown
d87e4fbffb After merge fix 2006-07-05 16:23:18 +02:00
unknown
a4a905f3fb Merge mysql.com:/home/mydev/mysql-4.1-bug17877
into  mysql.com:/home/mydev/mysql-5.0-ateam


myisam/mi_key.c:
  Auto merged
mysql-test/r/gis-rtree.result:
  Auto merged
mysql-test/t/gis-rtree.test:
  Auto merged
myisam/mi_check.c:
  SCCS merged
2006-07-05 11:23:21 +02:00
unknown
fef31470d5 Merge mysql.com:/home/mydev/mysql-4.1-bug14400
into  mysql.com:/home/mydev/mysql-5.0-ateam


libmysqld/libmysqld.c:
  Auto merged
myisam/mi_rkey.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
libmysqld/lib_sql.cc:
  Manual merge
mysql-test/r/func_time.result:
  Manual merge
mysql-test/r/gis.result:
  Manual merge
mysql-test/t/func_time.test:
  Manual merge
mysql-test/t/gis.test:
  Manual merge
sql-common/client.c:
  Manual merge
2006-07-05 11:20:10 +02:00
unknown
516fdb7197 Merge mysql.com:/home/mydev/mysql-4.1-bug11824
into  mysql.com:/home/mydev/mysql-5.0-ateam


myisam/mi_create.c:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/key.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/key.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/table.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
sql/field.cc:
  Manual merge
2006-07-05 11:11:40 +02:00
unknown
aad8b89a25 Merge ngrishakin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/ndbdev/ngrishakin/mysql-5.1
2006-07-05 04:48:44 +02:00
unknown
e4e3aa462f Merge bk-internal:/home/bk/mysql-5.1
into  mysql.com:/data0/knielsen/tmp-5.1
2006-07-05 01:56:39 +02:00
unknown
5d44ecd438 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-ndb


sql/ha_ndbcluster.cc:
  Auto merged
2006-07-05 01:56:38 +02:00
unknown
1301d902c0 Bug #20077 Cluster to only support partition by key, needs to error on others 2006-07-05 01:50:16 +02:00
unknown
fed0ef2bc8 Merge rt.int.sifira.dk:/usr/local/mysql/mysql-5.1-pristine
into  rt.int.sifira.dk:/usr/local/mysql/tmp-5.1
2006-07-04 22:42:29 +02:00
unknown
758d4bb80b Fix hardcoded /tmp path (which causes problems when running multiple
tests on a single machine) to use $MYSQLTEST_VARDIR/tmp instead.


mysql-test/r/log_state.result:
  Fix hardcoded /tmp/ path.
mysql-test/t/log_state.test:
  Fix hardcoded /tmp/ path.
2006-07-04 22:37:32 +02:00
unknown
c85c6c07f8 Bug #20077 Cluster to only support partition by key, needs to error on others 2006-07-04 18:29:21 +02:00
unknown
9fecf502a3 fix test. this should remove the problem of
fix for bug#20624  events_logs_tests.test fails randomly


BitKeeper/etc/ignore:
  Added server-tools/instance-manager/net_serv.cc to the ignore list
mysql-test/r/events_logs_tests.result:
  update result
mysql-test/t/events_logs_tests.test:
  fix test. this should remove the problem of 
  Bug #20624  events_logs_tests.test fails randomly
2006-07-04 17:30:39 +02:00
unknown
5e1b558d9f Merge istruewing@bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/mydev/mysql-5.1-amerge
2006-07-04 12:57:24 +02:00
unknown
bc5c62e5a0 disabled ndb_autodiscover3 2006-07-04 12:57:23 +02:00
unknown
bb576ed217 After merge fix 2006-07-04 12:34:23 +02:00
unknown
597ee0392c Merge mysql.com:/home/mydev/mysql-5.0-tmp_merge
into  mysql.com:/home/mydev/mysql-5.1-amerge


mysys/thr_lock.c:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
mysql-test/r/lock_multi.result:
  Manual merge
mysql-test/t/lock_multi.test:
  Manual merge
sql/lock.cc:
  Manual merge
sql/sql_base.cc:
  Manual merge
sql/sql_parse.cc:
  Manual merge
sql/sql_table.cc:
  Manual merge
2006-07-04 10:02:11 +02:00
unknown
2ef57b8362 Renumber events to make tests pass. This must be a result of removing extraneous
COMMITs -- the numbers collapse to fill the gaps.


mysql-test/r/rpl_row_create_table.result:
  Renumber event position.  This must be a result of extraneous COMMITs; see Bug#16206.
  I don't fully understand this, but I can't see any harm to it.
mysql-test/t/rpl_row_create_table.test:
  Renumber event position.  This must be a result of extraneous COMMITs; see Bug#16206.
  I don't fully understand this, but I can't see any harm to it.
2006-07-03 23:17:53 -04:00
unknown
430e94f119 Removed bdb test where the binlog format is indeterminate and updated a test
where it isn't.  Removed a test where the merge was incorrect (and a test 
duplicated.)


mysql-test/r/bdb.result:
  Removed binlog-format-specific test.
  
  Elliot says bdb is going away real soon now anyway.
mysql-test/r/binlog_row_blackhole.result:
  Removed superfluous commits.  Bug#16206.
mysql-test/r/mysqldump.result:
  Merged incorrectly.
mysql-test/t/bdb.test:
  Removed binlog-format-specific test.
  
  Elliot says bdb is going away real soon now anyway.
2006-07-03 18:29:01 -04:00
unknown
058cad7848 Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1


BitKeeper/etc/ignore:
  auto-union
client/mysqldump.c:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/type_timestamp.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/bdb.test:
  Auto merged
mysql-test/t/type_timestamp.test:
  Auto merged
mysys/my_lib.c:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/func_time.result:
  manual merge
mysql-test/r/mysqldump.result:
  manual merge
mysql-test/t/func_time.test:
  manual merge
mysql-test/t/mysqldump.test:
  manual merge
sql/log.cc:
  manual merge
sql/sp_head.cc:
  manual merge
sql/sql_table.cc:
  manual merge
2006-07-03 11:35:58 -04:00
unknown
3e085bd882 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Merge/5.0-kt


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-07-03 13:19:18 +05:00
unknown
d4350444c5 Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1
into  dator5.(none):/home/pappa/bug17138


sql/item_sum.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2006-07-01 19:47:24 -04:00
unknown
44386279a5 Merge mysql.com:/home/dlenev/mysql-5.0-bg18437-3
into  mysql.com:/home/dlenev/mysql-5.1-bg18437


sql/mysql_priv.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
include/my_base.h:
  Manual merge.
mysql-test/r/federated.result:
  Manual merge.
mysql-test/r/ndb_replace.result:
  Manual merge.
mysql-test/t/federated.test:
  Manual merge.
sql/ha_ndbcluster.cc:
  Manual merge.
sql/item.cc:
  Manual merge.
sql/sql_delete.cc:
  Manual merge.
sql/sql_insert.cc:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_trigger.h:
  Manual merge.
sql/sql_update.cc:
  Manual merge.
2006-07-02 02:12:53 +04:00
unknown
ae9724cce1 Fix for bug#18437 "Wrong values inserted with a before update trigger on
NDB table".

SQL-layer was not marking fields which were used in triggers as such. As
result these fields were not always properly retrieved/stored by handler
layer. So one might got wrong values or lost changes in triggers for NDB,
Federated and possibly InnoDB tables.
This fix solves the problem by marking fields used in triggers
appropriately.

Also this patch contains the following cleanup of ha_ndbcluster code:

We no longer rely on reading LEX::sql_command value in handler in order
to determine if we can enable optimization which allows us to handle REPLACE
statement in more efficient way by doing replaces directly in write_row()
method without reporting error to SQL-layer.
Instead we rely on SQL-layer informing us whether this optimization
applicable by calling handler::extra() method with
HA_EXTRA_WRITE_CAN_REPLACE flag.
As result we no longer apply this optimzation in cases when it should not
be used (e.g. if we have on delete triggers on table) and use in some
additional cases when it is applicable (e.g. for LOAD DATA REPLACE).

Finally this patch includes fix for bug#20728 "REPLACE does not work
correctly for NDB table with PK and unique index".
  
This was yet another problem which was caused by improper field mark-up.
During row replacement fields which weren't explicity used in REPLACE
statement were not marked as fields to be saved (updated) so they have
retained values from old row version. The fix is to mark all table
fields as set for REPLACE statement. Note that in 5.1 we already solve
this problem by notifying handler that it should save values from all
fields only in case when real replacement happens.


include/my_base.h:
  Added HA_EXTRA_WRITE_CAN_REPLACE, HA_EXTRA_WRITE_CANNOT_REPLACE - new
  parameters for ha_extra() method. We use them to inform handler that
  write_row() which tries to insert new row into the table and encounters
  some already existing row with same primary/unique key can replace old
  row with new row instead of reporting error.
mysql-test/r/federated.result:
  Additional test for bug#18437 "Wrong values inserted with a before update
  trigger on NDB table".
mysql-test/r/ndb_replace.result:
  Added test for bug #20728 "REPLACE does not work correctly for NDB table
  with PK and unique index". Updated wrong results from older test.
mysql-test/t/federated.test:
  Additional test for bug#18437 "Wrong values inserted with a before update
  trigger on NDB table".
mysql-test/t/ndb_replace.test:
  Added test for bug #20728 "REPLACE does not work correctly for NDB table
  with PK and unique index".
sql/ha_ndbcluster.cc:
  We no longer rely on reading LEX::sql_command value in handler in order
  to determine if we can enable optimization which allows us to handle REPLACE
  statement in more efficient way by doing replaces directly in write_row()
  method without reporting error to SQL-layer.
  Instead we rely on SQL-layer informing us whether this optimization
  applicable by calling handler::extra() method with
  HA_EXTRA_WRITE_CAN_REPLACE flag.
  As result we no longer apply this optimization in cases when it should not
  be used (e.g. if we have on delete triggers on table) and use in some
  additional cases when it is applicable (e.g. for LOAD DATA REPLACE).
sql/item.cc:
  Item_trigger_field::setup_field():
    Added comment explaining why we don't set Field::query_id in this method.
sql/mysql_priv.h:
  mysql_alter_table() function no longer takes handle_duplicates argument.
  Added declaration of mark_fields_used_by_triggers_for_insert_stmt() function.
sql/sql_delete.cc:
  Mark fields which are used by ON DELETE triggers so handler will retrieve
  values for these fields.
sql/sql_insert.cc:
  Explicitly inform handler that we are doing REPLACE (using ha_extra() method)
  in cases when it can promote insert operation done by write_row() to replace.
  Also when we do REPLACE we want to store values for all columns so we should
  inform handler about it.
  Finally we should mark fields used by ON UPDATE/ON DELETE triggers as such
  so handler can properly retrieve/restore values in these fields during
  execution of REPLACE and INSERT ... ON DUPLICATE KEY UPDATE statements.
sql/sql_load.cc:
  Explicitly inform handler that we are doing LOAD DATA REPLACE (using
  ha_extra() method) in cases when it can promote insert operation done by
  write_row() to replace.
  Also when we do replace we want to save (replace) values for all columns
  so we should inform handler about it.
  Finally to properly execute LOAD DATA for table with triggers we should
  mark fields used by ON INSERT triggers as such so handler can properly
  store values for these fields.
sql/sql_parse.cc:
  mysql_alter_table() function no longer takes handle_duplicates argument.
sql/sql_table.cc:
  Got rid of handle_duplicates argument in mysql_alter_table() and
  copy_data_between_tables() functions. These functions were always
  called with handle_duplicates == DUP_ERROR and thus contained dead
  (and probably incorrect) code.
sql/sql_trigger.cc:
  Added Table_triggers_list::mark_fields_used() method which is used to mark
  fields read/set by triggers as such so handlers will be able properly
  retrieve/store values in these fields.
sql/sql_trigger.h:
  Table_triggers_list:
    Added mark_fields_used() method which is used to mark fields read/set by
    triggers as such so handlers will be able properly retrieve/store values
    in these fields. To implement this method added 'trigger_fields' member
    which is array of lists linking items for all fields used in triggers
    grouped by event and action time.
sql/sql_update.cc:
  Mark fields which are used by ON UPDATE triggers so handler will retrieve
  and save values for these fields.
mysql-test/r/ndb_trigger.result:
  Added test for bug#18437 "Wrong values inserted with a before update trigger
  on NDB table".
mysql-test/t/ndb_trigger.test:
  Added test for bug#18437 "Wrong values inserted with a before update trigger
  on NDB table".
2006-07-02 01:51:10 +04:00
unknown
4c2db1bef1 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-runtime


mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-07-01 22:13:42 +04:00
unknown
047e2be28c Post-merge fix 2006-07-01 09:28:41 +04:00
unknown
60d070b273 Merge dator5.(none):/home/pappa/bug20583
into  dator5.(none):/home/pappa/bug17138


mysql-test/r/partition.result:
  manual merge
mysql-test/t/partition.test:
  manual merge
2006-07-01 00:28:04 -04:00
unknown
3ed74d0e8d Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug20583


mysql-test/r/partition.result:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/ha_partition.cc:
  Auto merged
2006-07-01 00:22:25 -04:00
unknown
a8e6d7f6e2 Merge dator5.(none):/home/pappa/clean-mysql-5.1
into  dator5.(none):/home/pappa/bug17138


BUILD/compile-pentium-gcov:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2006-07-01 00:19:23 -04:00
unknown
87d0401593 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/psergey/mysql-5.0-bug16168-merge
2006-07-01 07:04:27 +04:00
unknown
b3523520f8 Reverted wrong bug fix (Bug#11228)
mysql-test/t/key.test:
  Added SHOW CREATE TABLE, which is the proper way to check for table definitions
mysql-test/r/key.result:
  Fixed result after removing wrong bug fix
sql/table.cc:
  Reverted wrong bug fix.
  The intention with the original code was to show that MySQL treats the first
  given unique key as a primary key. Clients can use the marked primary key as a
  real primary key to validate row changes in case of conflicting updates.  The
  ODBC driver (and other drivers) may also use this fact to optimize/check
  updates and handle conflicts.  The marked key also shows what some engines, like InnoDB or NDB,
  will use as it's internal primary key.
  For checking if someone has declared a true PRIMARY KEY, one should use 'SHOW CREATE TABLE'
2006-07-01 01:37:20 +04:00
unknown
c1fa66c3a9 Merge mysql.com:/home/psergey/mysql-4.1-bug16168-push
into  mysql.com:/home/psergey/mysql-5.0-bug16168-merge


mysql-test/t/range.test:
  Auto merged
mysql-test/r/range.result:
  SCCS merged
sql/opt_range.cc:
  SCCS merged
2006-07-01 01:25:59 +04:00
unknown
2b38033260 Manual transfer of the following changeset into the 5.0.23 release clone:
1.2525 06/06/30 18:29:27 monty@mysql.com +3 -0
   Reverted wrong bug fix (Bug#11228)


mysql-test/r/key.result:
  Manual transfer of the following fix into the 5.0.23 release clone:
     1.27 06/06/30 18:29:25 monty@mysql.com +9 -1
     Fixed result after removing wrong bug fix
mysql-test/t/key.test:
  Manual transfer of the following fix into the 5.0.23 release clone:
     1.24 06/06/30 18:29:25 monty@mysql.com +1 -0
     Added SHOW CREATE TABLE, which is the proper way to check for table definitions
sql/table.cc:
  Manual transfer of the following fix into the 5.0.23 release clone:
     1.135 06/06/30 18:29:25 monty@mysql.com +21 -0
     Reverted wrong bug fix.   ...
2006-06-30 19:37:11 +02:00
unknown
9606675ba2 Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0


libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/t/key.test:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/key.result:
  Manual merge
mysql-test/t/mysqldump.test:
  Manual merge
  (Now we have same code as in 4.1 and 5.1)
sql/ha_ndbcluster.cc:
  Manual merge
  Change %ll -> llstr()
tests/mysql_client_test.c:
  manual merge
2006-06-30 19:15:18 +03:00
unknown
e0171231a5 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2006-06-30 19:15:17 +03:00
unknown
66a59b10e9 Reverted wrong bug fix (Bug#11228)
mysql-test/r/key.result:
  Fixed result after removing wrong bug fix
mysql-test/t/key.test:
  Added SHOW CREATE TABLE, which is the proper way to check for table definitions
sql/table.cc:
  Reverted wrong bug fix.
  The intention with the original code was to show that MySQL treats the first
  given unique key as a primary key. Clients can use the marked primary key as a
  real primary key to validate row changes in case of conflicting updates.  The
  ODBC driver (and other drivers) may also use this fact to optimize/check
  updates and handle conflicts.  The marked key also shows what some engines, like InnoDB or NDB,
  will use as it's internal primary key.
  
  For checking if someone has declared a true PRIMARY KEY, one should use 'SHOW CREATE TABLE'
2006-06-30 18:29:27 +03:00
unknown
fc085d77ad Bug#17226: Variable set in cursor on first iteration is assigned
second iterations value

During assignment to the BLOB variable in routine body the value
wasn't copied.


mysql-test/r/sp-vars.result:
  Add result for bug#17226.
mysql-test/t/sp-vars.test:
  Add test case for bug#17226.
sql/field_conv.cc:
  Honor copy_blobs flag.
2006-06-30 18:14:22 +04:00
unknown
9bec41887e Merge moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
into moonbone.local:/work/merge-5.1


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/spatial.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
strings/ctype-mb.c:
  Auto merged
2006-06-30 16:10:26 +04:00
unknown
633cbfb571 BUG#16168: Wrong results from range optimizer, "Use_count: Wrong count for key ..." warnings:
- Added comments.
 - Make SEL_ARG::clone() set SEL_ARG::elements in the created copy.


mysql-test/r/range.result:
  BUG#16168: Testcase
mysql-test/t/range.test:
  BUG#16168: Testcase
2006-06-30 09:05:12 +04:00
unknown
de1499ea59 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-06-30 04:28:04 +03:00
unknown
0343a80b02 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/my/mysql-4.1
2006-06-30 04:27:19 +03:00