Commit graph

14627 commits

Author SHA1 Message Date
unknown
b66e0f7524 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-02-27 10:57:48 +01:00
unknown
a86e504f59 Merge quad.:/mnt/raid/alik/MySQL/devel/5.0
into  quad.:/mnt/raid/alik/MySQL/devel/5.0-rt-merged


mysql-test/r/view.result:
  Auto merged
2008-02-26 19:23:37 +03:00
unknown
25620347fc Merge kaamos.(none):/data/src/opt/bug33834/my50-bug33834
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/sql_yacc.yy:
  Auto merged
2008-02-26 16:10:31 +03:00
unknown
4f3eab5804 Fix for bug #33834: FRAC_SECOND: Applicability not clear in
documentation

While the manual mentions FRAC_SECOND only for the TIMESTAMPADD()
function, it was also possible to use FRAC_SECOND with DATE_ADD(),
DATE_SUB() and +/- INTERVAL.

Fixed the parser to match the manual, i.e. using FRAC_SECOND for 
anything other than TIMESTAMPADD()/TIMESTAMPDIFF() now produces a 
syntax error.

Additionally, the patch allows MICROSECOND to be used in TIMESTAMPADD/
TIMESTAMPDIFF and marks FRAC_SECOND as deprecated.


mysql-test/r/func_time.result:
  Added a test case for bug #33834.
mysql-test/t/func_time.test:
  Added a test case for bug #33834.
sql/sql_yacc.yy:
  Reject FRAC_SECOND for anything other than TIMESTAMPADD() or
  TIMESTAMPDIFF().
  Allow MICROSECOND to be used with TIMESTAMPADD()/TIMESTAMPDIFF().
  Warn about FRAC_SECOND being a deprecated unit.
2008-02-25 13:25:57 +03:00
unknown
62ba88327f Merge kaamos.(none):/data/src/opt/bug33049/my50-bug33790
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-22 21:25:11 +03:00
unknown
1bee6a3c7c Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0


ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
  Auto merged
2008-02-22 16:36:09 +01:00
unknown
fea2a5d83d BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if
log-slave-updates and circul repl

Slave SQL thread may execute one extra event when there are events
skipped by slave I/O thread (e.g. originated by the same server).
Whereas it was requested not to do so by the UNTIL condition.

This happens because we compare with the end position of previously
executed event. This is fine when there are no skipped by slave I/O
thread events, as end position of previous event equals to start
position of to be executed event. Otherwise this position equals to
start position of skipped event.

This is fixed by:
- reading the event to be executed before checking if the until condition
  is satisfied.
- comparing the start position of the event to be executed. Since we do
  not have the start position available, we compute it by subtracting
  event length from end position (which is available).
- if there are no events on the event queue at the slave sql starting
  time, that meet until condition, we stop immediately, as in this
  case we do not want to wait for next event.


mysql-test/r/rpl_dual_pos_advance.result:
  A test case for BUG#13861.
mysql-test/t/rpl_dual_pos_advance.test:
  A test case for BUG#13861.
sql/log_event.cc:
  Store length of event. This is needed for further calculation of
  the beginning of event.
sql/slave.cc:
  Slave SQL thread may execute one extra event when there are events
  skipped by slave I/O thread (e.g. originated by the same server).
  Whereas it was requested not to do so by the UNTIL condition.
  
  This happens because we compare with the end position of previously
  executed event. This is fine when there are no skipped by slave I/O
  thread events, as end position of previous event equals to start
  position of to be executed event. Otherwise this position equals to
  start position of skipped event.
  
  This is fixed by:
  - reading the event to be executed before checking if the until condition
    is satisfied.
  - comparing the start position of the event to be executed. Since we do
    not have the start position available, we compute it by subtracting
    event length from end position (which is available).
  - if there are no events on the event queue at the slave sql starting
    time, that meet until condition, we stop immediately, as in this
    case we do not want to wait for next event.
sql/slave.h:
  Added master_log_pos parametr to is_until_satisfied().
mysql-test/t/rpl_dual_pos_advance-slave.opt:
  New BitKeeper file ``mysql-test/t/rpl_dual_pos_advance-slave.opt''
2008-02-22 19:07:07 +04:00
unknown
4368dcdc2d Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B30604-5.0-opt
2008-02-22 15:36:27 +02:00
unknown
d702cb12b2 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/mysql-5.0-opt
2008-02-22 15:04:24 +04:00
unknown
012aab7d8b Fix for bug #33049: Assert while running test-as3ap test(mysql-bench
suite)

Under some circumstances a combination of aggregate functions and
GROUP BY in a SELECT query over a VIEW could lead to incorrect
calculation of the result type of the aggregate function. This in
turn could result in incorrect results, or assertion failures on debug
builds.

Fixed by changing the logic in Item_sum_hybrid::fix_fields() so that
the argument's item is dereferenced before calling its type() method.


mysql-test/r/view.result:
  Added a test case for bug #33049.
mysql-test/t/view.test:
  Added a test case for bug #33049.
sql/item_sum.cc:
  When calculating the result type of an aggregate function, dereference
  the argument's item before calling its type() method.
2008-02-22 11:34:18 +03:00
unknown
1a8be8bccb Bug#23588 SHOW COLUMNS on a temporary table causes locking issues
skip lock_type update for temporary tables


mysql-test/r/tablelock.result:
  test result
mysql-test/t/tablelock.test:
  test case
sql/sql_base.cc:
  skip lock_type update for temporary tables
2008-02-22 12:30:17 +04:00
unknown
315665cf67 Bug#32890 Crash after repeated create and drop of tables and views
The problem is that CREATE VIEW statements inside prepared statements
weren't being expanded during the prepare phase, which leads to objects
not being allocated in the appropriate memory arenas.

The solution is to perform the validation of CREATE VIEW statements
during the prepare phase of a prepared statement. The validation
during the prepare phase assures that transformations of the parsed
tree will use the permanent arena of the prepared statement.


mysql-test/r/ps.result:
  Add test case result for Bug#32890
mysql-test/t/ps.test:
  Add test case for Bug#32890
sql/item.h:
  Restore original field name if name is auto generated.
sql/sql_prepare.cc:
  Validate and prepare a CREATE VIEW statement for execution.
sql/sql_view.cc:
  Move privileges check to it's own function.
sql/sql_view.h:
  Export function which check privileges of a CREATE VIEW statement.
2008-02-21 14:58:29 -03:00
unknown
fa7707addf Bug#32025 ndb_waiter does too many roundtrips to ndb_mgmd
- fix test failures that was already there but now are
   more consistent when the 1 second sleep has been removed from
   ndb_waiter


mysql-test/t/ndb_autodiscover.test:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/t/ndb_autodiscover3.test:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
mysql-test/include/ndb_wait_connected.inc:
  Wait until mysqld has reconnected to ndbd after ndbd has been restarted
2008-02-21 13:23:58 +01:00
unknown
fa08b28085 Fix for Bug#34337: Server crash when Altering a view using
a table name.
  
The problem was that fill_defined_view_parts() did not return
an error if a table is going to be altered. That happened if
the table was already in the table cache. In that case,
open_table() returned non-NULL value (valid TABLE-instance from
the cache).
  
The fix is to ensure that an error is thrown even if the table
is in the cache.

(This is a backport of the original patch for 5.1)


mysql-test/r/view.result:
  Fix result file.
mysql-test/r/view_grant.result:
  Fix result file.
mysql-test/t/view.test:
  Add a test case for Bug#34337: Server crash when Altering a view
  using a table name.
mysql-test/t/view_grant.test:
  Fix order-dependency.
sql/sql_view.cc:
  Report an error if we're going to work with a table.
2008-02-21 12:17:32 +03:00
unknown
c3a5c0a076 Merge xiphis.org:/anubis/antony/work/mysql-5.0-engines
into  xiphis.org:/anubis/antony/work/merge.20080220/mysql-5.0
2008-02-20 22:42:24 -08:00
unknown
0e767df5e0 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-02-20 19:25:18 +01:00
unknown
463edf377e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/33266-bug-5.0-opt-mysql
2008-02-20 18:01:53 +03:00
unknown
daffceb4e2 Bug#33266: Incorrect test case for the bug#31048 failing on some platforms.
The test case for the bug#31048 checks that there is no crash on stack
overrun. But due to different stack sizes on different platforms it failed
on some of them.

The new test case check that a query with at least 4 level subquery nesting
works without the stack overrun nesting and other levels of nesting doesn't
cause a crash.


mysql-test/t/subselect.test:
  Corrected test case for the bug#31048.
mysql-test/r/subselect.result:
  Corrected test case for the bug#31048.
2008-02-20 17:41:39 +03:00
unknown
681363e29e Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b32510
into  mysql.com:/home/bar/mysql-work/mysql-5.0.b32510v2


mysql-test/r/ctype_big5.result:
  Auto merged
mysql-test/r/ctype_cp932.result:
  Auto merged
mysql-test/r/ctype_euckr.result:
  Auto merged
mysql-test/r/ctype_gb2312.result:
  Auto merged
mysql-test/r/ctype_gbk.result:
  Auto merged
mysql-test/r/ctype_uca.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_cp932.test:
  Auto merged
mysql-test/t/ctype_uca.test:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2008-02-20 14:38:52 +04:00
unknown
1ac319248f Bug #30604: different flagging of time_zone_used in normal
and ps-protocol
Finding a routine should be a transparent operation as 
far as the binary log is concerned.
But it was influencing the binary log because of the TIMESTAMP
column in the proc table.

Fixed by preserving and restoring the time_zone usage flag when
searching for a stored routine in the proc table.


mysql-test/r/binlog_innodb.result:
  Bug #30604: test case
mysql-test/r/ctype_cp932_binlog.result:
  Bug #30604: updated test results (a procedure call before that)
mysql-test/t/binlog_innodb.test:
  Bug #30604: test case
sql/sp.cc:
  Bug #30604: finding a routine should be a transparent operation as 
  far as the binary log is concerned.
  Fixed by preserving and restoring the time_zone usage flag.
2008-02-19 17:27:18 +02:00
unknown
f802cd5123 BUG#34289 - Incorrect NAME_CONST substitution in stored procedures
breaks replication

NAME_CONST() didn't replicate constant character set and collation
correctly.

With this fix NAME_CONST() inherits collation from the value argument.


mysql-test/r/func_misc.result:
  A test case for BUG#34289.
mysql-test/t/func_misc.test:
  A test case for BUG#34289.
sql/item.cc:
  Inherit collation from value argument.
2008-02-19 18:16:17 +04:00
unknown
18f885ed4c Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/32942/my50-32942


sql/sql_select.cc:
  Auto merged
mysql-test/r/select.result:
  merging
mysql-test/t/select.test:
  merging
2008-02-18 19:18:44 +04:00
unknown
787dbacab2 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-17 16:57:07 +03:00
unknown
d6be1a9b95 Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
Problem is not about intervals and doesn't actually cause 'full table scan'.
We have an optimization for DISTINCT when we have
'DISTINCT field_from_first_join_table' we don't need to read all the
rows from the JOIN-ed table if we found one conforming row.
It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon
that case in the evaluate_join_record() and that doesn't break the
recordreading loop in sub_select().

Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case.


mysql-test/r/select.result:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan".
  
  test result
mysql-test/t/select.test:
  Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan"
  
  test case
sql/sql_select.cc:
  Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
  
  return NESTED_LOOP_NO_MORE_ROWS when we don't need to read rows from
  this table anymore
2008-02-17 15:48:17 +04:00
unknown
4a834b4b12 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
2008-02-17 14:37:39 +03:00
unknown
0946b1d2a7 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
2008-02-15 17:51:35 +01:00
unknown
0529125af1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt


sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2008-02-15 18:34:03 +02:00
unknown
cc2e929ac4 Bug #31887: DML Select statement not returning same results
when executed in version 5

Zero fill is a field attribute only. So we can't always 
propagate  constants for zerofill fields : the values and 
expression results don't have that flag.

Fixed by converting the const value to a string and 
using that in const propagation when the context allows it. 
Disable const propagation for fields with ZEROFILL flag in
all the other cases.


mysql-test/r/compare.result:
  Bug #31887: test case
mysql-test/t/compare.test:
  Bug #31887: test case
sql/item.cc:
  Bug #31887: If the context allows conversion
  of an int constant to a zero-filled string constant
  put the string constant instead of the int constant
  when doing const propagation
sql/mysql_priv.h:
  Bug #31887: a macro to get all the Field_num
  descendant fields.
2008-02-15 15:47:32 +02:00
unknown
e6a063cfd8 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/5.0-bug33931-assert_write_ignored_ev_when_init_slave_fails
2008-02-14 21:38:30 +02:00
unknown
4f3a1e08f8 Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-02-14 20:24:01 +01:00
unknown
2ffb1e2796 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-02-14 16:14:30 +01:00
unknown
50bd4a438e bug#33329 extraneous ROLLBACK in binlog on connection does not use trans tables
changes for an assert and an updated results file.


mysql-test/r/mix_innodb_myisam_binlog.result:
  results file changed as there is no ROLLBACK query in binlog as it must be.
sql/sql_update.cc:
  refining assert as the initial value of transactional_tables has been
  changed to zero.
2008-02-14 16:28:32 +02:00
unknown
55f6727b70 BUG#33946 - Join on Federated tables with Unique index gives error 1430
from storage engine

Federated may crash a server, return wrong result set, return
"ERROR 1030 (HY000): Got error 1430 from storage engine" message
when local (engine=federated) table has a key against nullable
column.

The problem was wrong implementation of function that creates
WHERE clause for remote query from key.


mysql-test/r/federated.result:
  A test case for BUG#33946.
mysql-test/t/federated.test:
  A test case for BUG#33946.
sql/ha_federated.cc:
  Fixed that federated adds " IS NULL " condition to a remote query,
  whereas "IS NOT NULL" requested by original query.
  
  Fixed that federated didn't check for end of key buffer, didn't
  setup key buffer pointer and remaining lenght of key buffer,
  didn't add " AND " between conditions in case original query
  has IS [NOT] NULL condition against nullable column.
  
  Fixed that federated wrongly shifts key buffer pointer by extra
  one byte when key part may be null (was: store_length + 1,
  now: store_length).
2008-02-14 16:27:01 +04:00
unknown
8414bd54ea Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/5.0-bug33931-assert_write_ignored_ev_when_init_slave_fails


sql/slave.cc:
  Auto merged
2008-02-14 13:55:11 +02:00
unknown
c4fc5b096e Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-02-14 12:48:25 +03:00
unknown
be891fc611 Merge host.loc:/home/uchum/work/5.0-opt-gca
into  host.loc:/home/uchum/work/5.0-opt
2008-02-13 19:47:39 +04:00
unknown
7a290b55f7 Fixed bug#31194: Privilege ordering does not order properly
for wildcard values.
The server ignored escape character before wildcards during
the calculation of priority values for sorting of a privilege
list. (Actually the server counted an escape character as an
ordinary wildcard like % or _). I.e. the table name template
with a wildcard character like 'tbl_1' had higher priority in
a privilege list than concrete table name without wildcards
like 'tbl\_1', and some privileges of 'tbl\_1' was hidden
by privileges for 'tbl_1'.

The get_sort function has been modified to ignore escaped
wildcards as usual.



mysql-test/r/grant3.result:
  Added test case for bug#31194.
mysql-test/t/grant3.test:
  Added test case for bug#31194.
sql/sql_acl.cc:
  Fixed bug#31194.
  The server used the wild_prefix escape character (usually \-character)
  like % and _ wildcards in the get_sort function for sorting weights
  calculation.
  
  The get_sort function has been modified to ignore escaped wildcards
  and alone escapes like in the wild_case_compare function.
2008-02-13 19:34:12 +04:00
unknown
247efb9cf0 Fixed bug#33764: Wrong result with IN(), CONCAT() and implicit
type conversion.

Instead of copying of whole character string from a temporary
buffer, the server copied a short-living pointer to that string
into a long-living structure. That has been fixed.


mysql-test/r/select.result:
  Added test case for bug#33764.
mysql-test/t/select.test:
  Added test case for bug#33764.
sql/item_cmpfunc.cc:
  Fixed bug#33764.
  Copying of a pointer has been replaced with an optional copying of
  a whole array to a newly allocated memory space in case of a
  functional source item.
2008-02-13 19:32:19 +04:00
unknown
ded528ca12 Bug #33931 assertion at write_ignored_events_info_to_relay_log if init_slave_thread() fails
and
bug#33932  assertion at handle_slave_sql if init_slave_thread() fails

the asserts were caused by 
  bug33931: having thd deleted at time of executing err: code plus
            a missed initialization;
  bug33932: initialization of slave_is_running member was missed;

fixed with relocating mi members initialization and removing delete thd
It is safe to do as deletion happens later explicitly in the caller of
init_slave_thread().

Todo: at merging the test is better to be moved into suite/bugs for 5.x (when x>0).


sql/slave.cc:
  adding the bugs simulating code;
  relocating some assignments to satisfy the asserts;
mysql-test/r/rpl_bug33931.result:
  the new result file
mysql-test/t/rpl_bug33931-slave.opt:
  option to spark the simulation code
mysql-test/t/rpl_bug33931.test:
  tests check that slave does not crash as before.
  Slave threads must be in NO running state in the end.
2008-02-13 14:09:41 +02:00
unknown
9e64388d7b Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2008-02-13 12:48:25 +01:00
unknown
c6610b5791 Merge mbp:src/opt/bug33389/my50-bug25162
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-12 22:51:01 +03:00
unknown
d83cd2149b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31590-bug-5.0-opt-mysql
2008-02-12 21:58:41 +03:00
unknown
269966ec36 Merge mysql1000.dsl.inet.fi:/home/andrei/MySQL/FIXES/5.0/bug34427-rpl_vars_warn_slave_err
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/pushed.mysql-5.0-rpl-bug33329-extra_rollback
2008-02-12 12:47:04 +02:00
unknown
2fa3d82847 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-rpl-merge
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2008-02-12 11:22:07 +01:00
unknown
d5092fa9ca Fix for bug #33389: Selecting from a view into a table from within SP
or trigger crashes server

Under some circumstances a combination of VIEWs, subselects with outer
references and PS/SP/triggers could lead to use of uninitialized memory
and server crash as a result.

Fixed by changing the code in Item_field::fix_fields() so that in cases
when the field is a VIEW reference, we first check whether the field
is also an outer reference, and mark it appropriately before returning.


mysql-test/r/view.result:
  Added a test case for bug #33389.
mysql-test/t/view.test:
  Added a test case for bug #33389.
sql/item.cc:
  In cases when in Item_field::fix_fields() from_field is a view reference,
  do not return too early, i.e. before marking the reference as an outer
  one when needed.
2008-02-12 12:43:55 +03:00
unknown
9132dc386b Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2008-02-11 17:37:25 +01:00
unknown
6edd1bd56f Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-02-11 11:19:06 +01:00
unknown
7990712713 Merge mysql1000.dsl.inet.fi:/home/andrei/MySQL/FIXES/5.0/bug33329-extra_rollback_when_innodb_in
into  mysql1000.dsl.inet.fi:/home/andrei/MySQL/MERGE/mysql-5.0-rpl-bug33329-extra_rollback
2008-02-11 11:26:02 +02:00
unknown
e4e7f8c385 bug#34427 slave misses rendezvous in rpl_variables
There was no instruction in the test that enforces the slave successfully connect
to the master.
The way the test was been written allowed the slave to had been late for rendezvous 
so that about-connecting time queries to the master failed and are error-logged
to had been seen in Warnings of pb.

Fixed with adding a sychronization primitive to the test.
No test case is possible, observe error logs on pb.

Todo: revise need of rpl_report.pl's rules due to failing execution of
queries from get_master_verion_and_clock().
Any test should try to use a synchornization primitive like the current fix
makes and do not let the slave to miss successful connecting.


mysql-test/t/rpl_variables.test:
  Completing the test's body with a synch macro to not let
  the slave to miss the successful connecting to the master.
2008-02-08 21:03:10 +02:00
unknown
65c7d3004e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  dipika.(none):/opt/local/work/mysql-5.0-runtime
2008-02-08 18:51:07 +03:00
unknown
213b4dcd9e Fixed bug#15409: Columns with 64-element SET may not be updated with integers.
SET column storing procedure has been modified to be 64bit-clean.


mysql-test/r/type_set.result:
  Added test case for bug#15409.
mysql-test/t/type_set.test:
  Added test case for bug#15409.
sql/field.cc:
  Fixed bug#15409.
  The Field_set::store(longlong nr,...) method incompletely
  calculates a bit mask for the comparison with a given number:
  if that number is greater than 0x7F00 0000 0000 0000 (LONGLONG_MAX),
  it uses zero bit mask instead of 0xFFFF FFFF FFFF FFFF (ULONGLONG_MAX).
  
  Incomplete expression has been replaced with a set_bits macro call.
2008-02-08 16:04:01 +04:00
unknown
7d98c21cdf Bug#33798 prepared statements improperly handle large unsigned ints
The unsignedness of large integer user variables was not being
properly preserved when feeded to prepared statements. This was
happening because the unsigned flags wasn't being updated when
converting the user variable is converted to a parameter.

The solution is to copy the unsigned flag when converting the
user variable to a parameter and take the unsigned flag into
account when converting the integer to a string.


mysql-test/r/binlog.result:
  Add test case result for Bug#33798
mysql-test/r/ps.result:
  Add test case result for Bug#33798
mysql-test/t/binlog.test:
  Add test case for Bug#33798
mysql-test/t/ps.test:
  Add test case for Bug#33798
sql/item.cc:
  Take the unsigned flag into account when converting the
  user variable.
2008-02-08 08:55:55 -02:00
unknown
d8eab97693 Bug#31590: Wrong error message on sort buffer being too small.
The out of memory error was thrown when the sort buffer size were too small.
This led to a user confusion.

Now filesort throws the error message about sort buffer being too small.


mysql-test/t/order_by.test:
  Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
mysql-test/r/order_by.result:
  Added a test case for the bug#31590: Wrong error message on sort buffer being too small.
sql/filesort.cc:
  Bug#31590: Wrong error message on sort buffer being too small.
  Now filesort throws the error message about sort buffer being too small
  instead of out of memory error.
2008-02-08 13:35:00 +03:00
unknown
178f33e05b Merge pilot.mysql.com:/data/msvensson/mysql/bug31004/my50-bug31004
into  pilot.mysql.com:/data/msvensson/mysql/mysql-5.0-runtime


client/mysqltest.c:
  Auto merged
2008-02-07 12:42:49 +01:00
unknown
1027a2a630 Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 11:13:03 +04:00
unknown
a4eaf17ccb innodb_mysql.test, variables.result, variables.test, innodb_mysql.result:
Minor post-fix for bug#34223.


mysql-test/r/innodb_mysql.result:
  Minor post-fix for bug#34223.
mysql-test/r/variables.result:
  Minor post-fix for bug#34223.
mysql-test/t/innodb_mysql.test:
  Minor post-fix for bug#34223.
mysql-test/t/variables.test:
  Minor post-fix for bug#34223.
2008-02-07 11:12:49 +04:00
unknown
65dfdcdfeb Merge host.loc:/home/uchum/work/5.0-opt-34223
into  host.loc:/home/uchum/work/5.0-opt
2008-02-07 04:57:21 +04:00
unknown
6cdd9d5c87 bdb.result:
Minor post-fix for bug#30059.


mysql-test/r/bdb.result:
  Minor post-fix for bug#30059.
2008-02-07 04:54:58 +04:00
unknown
5cf3f53e42 Fixed bug#34223: Failure on assignment to my_innodb_autoextend_increment
and my_innodb_commit_concurrency global variables.

Type of the my_innodb_autoextend_increment and the
my_innodb_commit_concurrency variables has been changed to
GET_ULONG.



mysql-test/r/variables.result:
  Added test case for bug#34223.
mysql-test/t/variables.test:
  Added test case for bug#34223.
sql/mysqld.cc:
  Fixed bug#34223.
  Last update of the getopt_ull_limit_value function introduced
  a sanity check for a variable type (only GET_UINT or GET_ULONG
  are valid types).
  However, my_innodb_autoextend_increment and
  my_innodb_commit_concurrency are declared as GET_LONG.
  Call stack is: 
          sys_var_long_ptr_global::update()
          fix_unsigned()
          getopt_ull_limit_value()
  
  Type of the my_innodb_autoextend_increment and the
  my_innodb_commit_concurrency variables has been changed to
  GET_ULONG.
2008-02-07 04:14:50 +04:00
unknown
3891d43617 Fixed bug#30059.
Server handles truncation for assignment of too-long values
into CHAR/VARCHAR/TEXT columns in a different ways when the
truncated characters are spaces:
1. CHAR(N) columns silently ignore end-space truncation;
2. TEXT columns post a truncation warning/error in the
   non-strict/strict mode.
3. VARCHAR columns always post a truncation note in
   any mode.

Space truncation processing has been synchronised over
CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR
columns has been propagated as standard.

Binary-encoded string/BLOB columns are not affected.


mysql-test/r/heap.result:
  Updated test case for bug#30059.
mysql-test/r/innodb.result:
  Updated test case for bug#30059.
mysql-test/r/myisam.result:
  Updated test case for bug#30059.
mysql-test/r/strict.result:
  Updated test case for bug#30059.
mysql-test/r/type_binary.result:
  Updated test case for bug#30059.
mysql-test/r/warnings.result:
  Added test case for bug#30059.
mysql-test/t/warnings.test:
  Added test case for bug#30059.
sql/field.cc:
  Fixed bug#30059.
  The report_data_too_long function was replaced with the
  Field_longstr::report_if_important_data method.
  
  The Field_string::store and the Field_blob::store
  methods was synchronized with the Field_varstring::store
  method.
  Changes:
  1. to CHAR(N): posting of space truncation note has been added
     in both (strict and non-strict) modes;
  2. to BLOBs: a check for space truncation has been added,
     a warning in the non-strict mode and an error message in
     the strict mode have been replaced with a truncation note.
  
  Similar parts of Field_string::store, Field_blob::store and
  Field_varstring::store have been moved to the
  Field_longstr::report_if_important_data method.
sql/field.h:
  Fixed bug#30059.
  The Field_longstr::report_if_important_data method has been declared.
2008-02-07 02:33:21 +04:00
unknown
2574d83cc8 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2008-02-06 11:42:18 +01:00
unknown
40f2a6ae99 Minor typo fix for mysql-test-run.pl
mysql-test/mysql-test-run.pl:
  Fix typo (missing $prefix arg to mtr_add_arg(--user=root))
2008-02-05 23:16:52 -07:00
unknown
6210278628 Bug#33329 extraneous ROLLBACK in binlog on connection
does not use trans tables

There had been two issues.
Rollback statement was recorded in binlog even though a multi-update
had not modified any non-transactional table.
The reason for this artifact was a false initial value of multi_update::transactional_tables.
Yet another artifact that explained on the bug page is that 
`ha_autocommit_or_rollback' works differently depending on whether
a transaction engine has been compiled in. 

Fixed: with setting multi_update::transactional_tables to zero at initialization
time. Multi-update on non-trans table won't cause ROLLBACK in binlog with
either compilation option.

The 2nd mentioned artifact comprises a self-standing issue (to be reported
separately).


mysql-test/r/multi_update.result:
  results changed - there is no ROLLBACK in binlog anymore as it should be
sql/sql_update.cc:
  A wrong assumption on that there were modified transactional table,
  which is nonsense at the very beginning of the query execution.
2008-02-04 16:37:41 +02:00
unknown
74bd1b0faf Updating result file.
mysql-test/r/rpl_user.result:
  Result change.
2008-02-04 13:19:29 +01:00
unknown
86260ead5a Fixes to make rpl_user test pass in pushbuild.
mysql-test/t/rpl_user.test:
  Removing redundant reset master and deleting users from master
  and slave without using binary log.
2008-02-04 12:22:37 +01:00
unknown
f792cf3e38 Bug#32510 LIKE search fails with indexed 'eucjpms' and 'ujis' char column
Problem: some collation handlers called incorrect version
of my_like_range_xxx(), which led to wrong min_str and max_str,
so like range optimizer threw away good records.
Fix: changing the wrong handlers to call proper version of
my_like_range_xxx().


mysql-test/r/ctype_big5.result:
  Adding test
mysql-test/r/ctype_cp932.result:
  Adding test
mysql-test/r/ctype_eucjpms.result:
  Adding test
mysql-test/r/ctype_euckr.result:
  Adding test
mysql-test/r/ctype_gb2312.result:
  Adding test
mysql-test/r/ctype_gbk.result:
  Adding test
mysql-test/r/ctype_sjis.result:
  Adding test
mysql-test/r/ctype_uca.result:
  Adding test
mysql-test/r/ctype_ucs.result:
  Adding test
mysql-test/r/ctype_ujis.result:
  Adding test
mysql-test/t/ctype_big5.test:
  Adding test
mysql-test/t/ctype_cp932.test:
  Adding test
mysql-test/t/ctype_eucjpms.test:
  Adding test
mysql-test/t/ctype_euckr.test:
  Adding test
mysql-test/t/ctype_gb2312.test:
  Adding test
mysql-test/t/ctype_gbk.test:
  Adding test
mysql-test/t/ctype_sjis.test:
  Adding test
mysql-test/t/ctype_uca.test:
  Adding test
mysql-test/t/ctype_ucs.test:
  Adding test
mysql-test/t/ctype_ujis.test:
  Adding test
strings/ctype-euc_kr.c:
  Changing like_range function
strings/ctype-eucjpms.c:
  Changing like_range function
strings/ctype-gb2312.c:
  Changing like_range function
strings/ctype-ucs2.c:
  Changing like_range function
strings/ctype-ujis.c:
  Changing like_range function
mysql-test/include/ctype_like_range_f1f2.inc:
  New BitKeeper file ``mysql-test/include/ctype_like_range_f1f2.inc''
2008-02-04 11:10:40 +04:00
unknown
0a9fa8265b Again blanking out some numbers in file names that is dependent
on the context.


mysql-test/r/mysqlbinlog.result:
  Result file change.
mysql-test/t/mysqlbinlog.test:
  Blanking out yet some numbers in file names.
2008-02-01 17:26:28 +01:00
unknown
818358ed33 Fixes to make tests pass in pushbuild.
mysql-test/r/mysqlbinlog.result:
  Result file change.
mysql-test/t/mysqlbinlog.test:
  Fixing test to not be dependent on the sequence numbers
  for file names generated by mysqlbinlog.
2008-02-01 15:34:34 +01:00
unknown
f7d8fb1cdd Bug#33201 Crash occurs when granting update privilege on one column of a view
When issuing a column level grant on a table which require pre-locking the 
server crashed.

The reason behind the crash was that data structures used by the lock api
wasn't properly reinitialized in the case of a column level grant.


mysql-test/r/grant.result:
  * Added test case
mysql-test/t/grant.test:
  * Added test case
sql/sql_acl.cc:
  * The lock api is dending on the thd->lex object and this variable needs to 
    be re-initialized when opened with a new set of tables than specified in the
    original statement.
2008-02-01 14:10:46 +01:00
unknown
d315117745 Various fixes to make tests pass on Windows.
mysql-test/r/mix_innodb_myisam_binlog.result:
  Result change
mysql-test/t/binlog_start_comment.test:
  Adding --local-load to mysqlbinlog to prevent it from failing
  on Windows. Also adding --short-form.
mysql-test/t/mix_innodb_myisam_binlog.test:
  Extending LIKE pattern to use either \n or \r\n in order to work
  on Windows.
2008-02-01 13:18:27 +01:00
unknown
1b15018547 Changes to make tests pass on vanilla build.
mysql-test/t/binlog_start_comment.test:
  Adding --local-infile=1 to enable local infile for mysql client.
2008-02-01 10:46:02 +01:00
unknown
1919d238e5 Merge mbp.local:/Users/kaa/src/opt/bug25162/my50-bug25162
into  mbp.local:/Users/kaa/src/opt/mysql-5.0-opt
2008-02-01 13:37:22 +05:00
unknown
4d794c2334 Fix for bug #25162: Backing up DB from 5.1 adds 'USING BTREE' to KEYs
on table creates

The problem was in incompatible syntax for key definition in CREATE
TABLE.

5.0 supports only the following syntax for key definition (see "CREATE
TABLE syntax" in the manual):

{INDEX|KEY} [index_name] [index_type] (index_col_name,...)

While 5.1 parser supports the above syntax, the "preferred" syntax was
changed to:

{INDEX|KEY} [index_name] (index_col_name,...) [index_type]

The above syntax is used in 5.1 for the SHOW CREATE TABLE output, which
led to dumps generated by 5.1 being incompatible with 5.0.

Fixed by changing the parser in 5.0 to support both 5.0 and 5.1 syntax
for key definition.


mysql-test/r/create.result:
  Added a test case for bug #25162.
mysql-test/t/create.test:
  Added a test case for bug #25162.
sql/sql_yacc.yy:
  Changed the parser to support both 5.0 and 5.1 syntax for index type
  specification in CREATE TABLE.
2008-02-01 13:00:40 +05:00
unknown
754c3f51ec Bug#30787: Stored function ignores user defined alias.
Simple subselects are pulled into upper selects. This operation substitutes the
pulled subselect for the first item from the select list of the subselect.
If an alias is defined for a subselect it is inherited by the replacement item.
As this is done after fix_fields phase this alias isn't showed if the
replacement item is a stored function. This happens because the Item_func_sp::make_field
function makes send field from its result_field and ignores the defined alias.

Now when an alias is defined the Item_func_sp::make_field function sets it for
the returned field.


mysql-test/t/sp.test:
  Added a test case for the bug#30787: Stored function ignores user defined alias.
mysql-test/r/sp.result:
  Added a test case for the bug#30787: Stored function ignores user defined alias.
sql/item_func.cc:
  Bug#30787: Stored function ignores user defined alias.
  Now when an alias is defined the Item_func_sp::make_field function sets it for
  the returned field.
2008-01-31 23:46:26 +03:00
unknown
dc8e43edb5 Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


include/my_sys.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2008-01-31 16:15:46 +01:00
unknown
cd8a8a1ce0 ndb - bug#34107 patch 2, ndb api
mysql-test/r/ndb_condition_pushdown.result:
  bug#34107 lower scanfilter max size to not hit TUP limit
mysql-test/t/ndb_condition_pushdown.test:
  bug#34107 lower scanfilter max size to not hit TUP limit
ndb/include/ndbapi/ndbapi_limits.h:
  bug#34107 lower scanfilter max size to not hit TUP limit
2008-01-31 13:58:29 +01:00
unknown
1fa5131888 Changes to fix tests in pushbuild.
mysql-test/include/have_local_infile.inc:
  BitKeeper file /data0/mkindahl/mysql-5.0-rpl-merge/mysql-test/include/have_local_infile.inc
mysql-test/r/have_local_infile.require:
  BitKeeper file /data0/mkindahl/mysql-5.0-rpl-merge/mysql-test/r/have_local_infile.require
mysql-test/t/binlog_start_comment.test:
  Test requires that local_infile is on, so added require for that.
mysql-test/t/rpl_sp.test:
  Adding missing sync_slave_with_master causing following tests to fail.
2008-01-31 12:17:40 +01:00
unknown
79f2096460 Disabling rpl_transaction test for non-debug builds.
mysql-test/t/rpl_transaction.test:
  Test only works for debug build.
2008-01-30 18:24:28 +01:00
unknown
55fbcacfa6 Changes to make tests pass in pushbuild.
mysql-test/r/bdb_notembedded.result:
  Result change.
mysql-test/r/rpl_loaddata_map.result:
  Result change.
mysql-test/t/rpl_loaddata_map.test:
  Blanking out file id as well.
2008-01-30 15:58:35 +01:00
unknown
4f01c49d2b Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge


mysql-test/r/view.result:
  Auto merged
2008-01-30 15:36:46 +01:00
unknown
206770562d Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl
into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge


include/my_sys.h:
  Auto merged
mysql-test/r/blackhole.result:
  Auto merged
mysql-test/r/case.result:
  Auto merged
mysql-test/r/mysqlbinlog2.result:
  Auto merged
mysql-test/t/blackhole.test:
  Auto merged
mysql-test/t/case.test:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2008-01-30 11:25:54 +01:00
unknown
6766554fc1 update test result
mysql-test/r/rpl_grant.result:
  update result
2008-01-29 19:21:21 +08:00
unknown
a46b963975 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-01-29 10:14:28 +01:00
unknown
32f5920676 Fix test case for Bug #25347 so that it actually tests the code fix,
and so that it works correctly on Windows.


mysql-test/r/mysqlcheck.result:
  Flush tables before monkeying around with underlying MyISAM data files
mysql-test/t/mysqlcheck.test:
  Fix the test case for bug #25347 so that it actually does test the behavior.
  Also, this makes it work on Windows by ensuring that mysqld doesn't hold the
  underlying MyISAM files open while we try to corrupt them on disk.
  
  Flush tables before monkeying around with underlying MyISAM data files;
  --use-frm, so that mysqlcheck will succeed.
2008-01-27 14:28:50 -07:00
unknown
507c8a1374 Merge sama.ndb.mysql.com:/export/space/pekka/ndb/version/my50-ndb
into  sama.ndb.mysql.com:/export/space/pekka/ndb/version/my50-bug31477
2008-01-27 17:26:27 +01:00
unknown
66b1905fbd ndb - bug#31477 - 5.0
mysql-test/r/ndb_bug31477.result:
  BitKeeper file /export/space/pekka/ndb/version/my50-bug31477/mysql-test/r/ndb_bug31477.result
mysql-test/t/ndb_bug31477.test:
  BitKeeper file /export/space/pekka/ndb/version/my50-bug31477/mysql-test/t/ndb_bug31477.test
ndb/src/common/util/NdbOut.cpp:
  missing comma, causing weird Uint64 printout
ndb/test/ndbapi/testOIBasic.cpp:
  adjust params
ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
  bug#31477 - explicit rewrite of tuxQueryTh
  if active op then non-dirty scan enters lock queue via TUX
  instead of skipping the tuple
ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp:
  bug#31477 - explicit rewrite of tuxQueryTh
  if active op then non-dirty scan enters lock queue via TUX
  instead of skipping the tuple
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
  bug#31477 - explicit rewrite of tuxQueryTh
  if active op then non-dirty scan enters lock queue via TUX
  instead of skipping the tuple
2008-01-27 16:41:29 +01:00
unknown
e30a0dda8f Fixed bug #33833.
Two disjuncts containing equalities of the form key=const1 and key=const2 can
be merged into one if const1 is equal to const2. To check it the common 
collation of the constants were used rather than the collation of the field key.
For example when the default collation of the constants was cases insensitive
while the collation of the field was case sensitive, then two or-ed equality 
predicates key='b' and key='B' incorrectly were merged into one f='b'. As a 
result ref access was used instead of range access and wrong result sets were 
returned in many cases. 
Fixed the problem by comparing constant in the or-ed predicate with collation of
the key field.


mysql-test/r/range.result:
  Added a test case for bug #33833.
mysql-test/t/range.test:
  Added a test case for bug #33833.
sql/item.cc:
  Fixed bug #33833.
  Added the method eq_by_collation that compares two items almost as 
  the method Item::eq, but it rather enforces a given collation for
  the comparison.
sql/item.h:
  Fixed bug #33833.
  Added the method eq_by_collation that compares two items almost as 
  the method Item::eq, but it rather enforces a given collation for
  the comparison.
2008-01-26 21:45:35 -08:00
unknown
9dbd3877b5 Un-break test case on Windows, for bug #25347
mysql-test/t/mysqlcheck.test:
  Use --remove_file and --write_file instead of --exec rm and --exec touch.
2008-01-25 16:00:15 -07:00
unknown
893d98fb4a Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


sql/sql_select.cc:
  Auto merged
2008-01-25 10:03:15 -07:00
unknown
27a337e7c7 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into  mysql.com:/home/marty/MySQL/mysql-5.0-ndb


ndb/include/ndbapi/Ndb.hpp:
  Auto merged
2008-01-25 17:28:35 +01:00
unknown
d2b4d051ea BUG#33862 completely failed DROP USER statement gets replicated
The problem is when create/rename/drop users, the statement was logged regardless of error, even if no data has been changed, the statement was logged.

After this patch, create/rename/drop users don't write the binlog if the statement makes no changes, if the statement does make any changes, log the statement with possible error code.

This patch is based on the patch for BUG#29749, which is not pushed


sql/sql_acl.cc:
  when create/rename/drop users, don't write the binlog if the statement make no changes
mysql-test/r/rpl_user.result:
  New BitKeeper file ``mysql-test/r/rpl_user.result''
mysql-test/t/rpl_user.test:
  New BitKeeper file ``mysql-test/t/rpl_user.test''
2008-01-25 15:02:26 +08:00
unknown
6daa27b184 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2008-01-24 19:25:59 +01:00
unknown
a89ba0c680 Merge quad.:/mnt/raid/alik/MySQL/devel/5.0
into  quad.:/mnt/raid/alik/MySQL/devel/5.0-rt-merged-5.0
2008-01-24 17:37:16 +03:00
unknown
8430df5a07 manual merge 2008-01-23 14:52:40 -07:00
unknown
e7b65baa3f Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-33618


mysql-test/t/sp.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2008-01-23 14:04:46 -07:00
unknown
6fc612e87b correct result to be the same as in 5.0 2008-01-23 21:51:01 +01:00
unknown
e6a077e348 Bug#33618 (Crash in sp_rcontext)
Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)

The server used to crash when REPEAT or another control instruction
was used in conjunction with labels and a LEAVE instruction.

The crash was caused by a missing "pop" of handlers or cursors in the
code representing the stored program. When executing the code in a loop,
this missing "pop" would result in a stack overflow, corrupting memory.

Code generation has been fixed to produce the missing h_pop/c_pop
instructions.

Also, the logic checking that labels at the beginning and the end of a
statement are matched was incorrect, causing Bug 33983.
End labels, when used, must match the label used at the beginning of a block.


mysql-test/r/sp-code.result:
  Bug#33618 (Crash in sp_rcontext)
mysql-test/r/sp-error.result:
  Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)
mysql-test/r/sp.result:
  Bug#33618 (Crash in sp_rcontext)
mysql-test/t/sp-code.test:
  Bug#33618 (Crash in sp_rcontext)
mysql-test/t/sp-error.test:
  Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted)
mysql-test/t/sp.test:
  Bug#33618 (Crash in sp_rcontext)
sql/sp_head.cc:
  Bug#33618 (Crash in sp_rcontext)
sql/sp_head.h:
  Bug#33618 (Crash in sp_rcontext)
sql/sp_rcontext.cc:
  Bug#33618 (Crash in sp_rcontext)
sql/sp_rcontext.h:
  Bug#33618 (Crash in sp_rcontext)
sql/sql_yacc.yy:
  Bug#33618 (Crash in sp_rcontext)
2008-01-23 13:26:41 -07:00
unknown
a12869df8c Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


sql/item_timefunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2008-01-23 11:48:29 -07:00
unknown
616fd55753 Patch contributed by Jocelyn Fournier. CLA received 2007-02-27.
Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed

mysqlcheck tests nullness of the engine type to know whether the
"table" is a view or not.  That also falsely catches tables that 
are severly damaged.

Instead, use SHOW FULL TABLES to test whether a "table" is a view
or not.

(Don't add new function.  Instead, get original data a smarter way.)

Make it safe for use against databases before when views appeared.


client/mysqlcheck.c:
  Use SHOW FULL TABLES to test better whether a name in the table
  list is one of a view.  Checking that the engine is NULL is 
  insufficient.
  
  Implemented suggestion from jimw that involved removing most of 
  original patch and getting data a better way
mysql-test/r/mysqlcheck.result:
  Verify that tables that have NULL/unreadable engine types are 
  processed and not interpreted as views.
mysql-test/t/mysqlcheck.test:
  Verify that tables that have NULL/unreadable engine types are 
  processed and not interpreted as views.
2008-01-23 11:37:46 -05:00
unknown
34f792c3e4 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2008-01-23 15:07:18 +01:00
unknown
c902b26caf Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


sql/set_var.cc:
  Auto merged
2008-01-22 15:44:18 -07:00
unknown
107d6251c4 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/41
2008-01-22 15:43:06 -07:00
unknown
1486a5a744 DictCache.hpp, Ndb.hpp:
Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node
ndb_restore.result, ndb_restore.test:
  Changed test to use information_schema to check auto_increment
DictCache.cpp, Ndb.cpp:
  Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node. When setting the auto_increment value we'll also read up the new value, this is useful if we use the table the first time in this MySQL Server and haven't yet seen the NEXTID value. The kernel will avoid updating since it already has the value but will also read up the NEXTID value to ensure we don't need to do this any more time.
ndb_auto_increment.result:
  Updated result file since it was incorrect


ndb/include/ndbapi/Ndb.hpp:
  Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node
ndb/src/ndbapi/DictCache.hpp:
  Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node
ndb/src/ndbapi/DictCache.cpp:
  Add new variable m_highest_seen when only peeking at auto_increment NEXTID
  and not retrieving to cache. Add new method to check tupleId before calling
  data node. When setting the auto_increment value we'll also read up the new
  value, this is useful if we use the table the first time in this MySQL Server
  and haven't yet seen the NEXTID value. The kernel will avoid updating since it
  already has the value but will also read up the NEXTID value to ensure we
  don't need to do this any more time.
ndb/src/ndbapi/Ndb.cpp:
  Add new variable m_highest_seen when only peeking at auto_increment NEXTID
  and not retrieving to cache. Add new method to check tupleId before calling
  data node. When setting the auto_increment value we'll also read up the new
  value, this is useful if we use the table the first time in this MySQL Server
  and haven't yet seen the NEXTID value. The kernel will avoid updating since
  it already has the value but will also read up the NEXTID value to ensure we
  don't need to do this any more time.
mysql-test/r/ndb_restore.result:
  Changed test to use information_schema to check auto_increment
mysql-test/t/ndb_restore.test:
  Changed test to use information_schema to check auto_increment
mysql-test/r/ndb_auto_increment.result:
  Updated result file since it was incorrect
2008-01-22 14:18:47 +01:00
unknown
f80b593d21 Fixed a PushBuild failure of the system_mysql_db test caused by the lack
of cleanups in the test case for bug33794.
2008-01-20 13:46:55 +03:00
unknown
5410627bce Merge ibm.:/home/alik/Documents/MySQL/devel/5.0
into  ibm.:/home/alik/Documents/MySQL/devel/5.0-rt-merged-5.0
2008-01-19 21:28:21 +03:00
unknown
35b035cfcb Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  lamia.dupka:/home/mhansson/my50-bug33143-again-pushee
2008-01-18 22:45:14 +02:00
unknown
c71a6428d8 BUG#33794 "MySQL crashes executing specific query":
The problem occurred when one had a subquery that had an equality X=Y where 
Y referred to a named select list expression from the parent select. MySQL 
crashed when trying to use the X=Y equality for ref-based access. 

Fixed by allowing non-Item_field items in the described case.


mysql-test/r/subselect.result:
  BUG#33794 "MySQL crashes executing specific query"
  - Testcase
mysql-test/t/subselect.test:
  BUG#33794 "MySQL crashes executing specific query"
  - Testcase
sql/sql_select.cc:
  BUG#33794 "MySQL crashes executing specific query"
  get_store_key() assumed that if it got a reference
    t.key=Item_outer_ref(Item_direct_ref(x)) 
  then x was an Item_field object, which is not the case when one refers to a
  named select list expression out ot subquery.
2008-01-18 22:50:36 +03:00
unknown
a22d1bf622 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug33143/my50-bug33143-again-pushee


sql/item_func.cc:
  Auto merged
mysql-test/r/type_decimal.result:
  Bug#33143: Manual merge
mysql-test/t/type_decimal.test:
  Bug#33143: Manual merge
2008-01-17 18:15:53 +01:00
unknown
8f7c42de65 Merge stella.local:/home2/mydev/mysql-5.0-bug32705
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/myisam.result:
  Bug#32705 - myisam corruption: Key in wrong position
              at page 1024 with ucs2_bin
  Manual merge
mysql-test/t/myisam.test:
  Bug#32705 - myisam corruption: Key in wrong position
              at page 1024 with ucs2_bin
  Manual merge
2008-01-16 12:15:57 +01:00
unknown
4fe64cf67e Bug#32705 - myisam corruption: Key in wrong position
at page 1024 with ucs2_bin
Post-pushbuild fix.
Moved test from myisam.test to ctype_ucs2_def.test.
UCS2 is not always available.


mysql-test/r/ctype_ucs2_def.result:
  Bug#32705 - myisam corruption: Key in wrong position
              at page 1024 with ucs2_bin
  Moved test result from myisam.result to here.
mysql-test/r/myisam.result:
  Bug#32705 - myisam corruption: Key in wrong position
              at page 1024 with ucs2_bin
  Moved test result from here to ctype_ucs2_def.result.
mysql-test/t/ctype_ucs2_def.test:
  Bug#32705 - myisam corruption: Key in wrong position
              at page 1024 with ucs2_bin
  Moved test from myisam.test to here.
  UCS2 is not always available.
mysql-test/t/myisam.test:
  Bug#32705 - myisam corruption: Key in wrong position
              at page 1024 with ucs2_bin
  Moved test from here to ctype_ucs2_def.test.
  UCS2 is not always available.
2008-01-16 11:48:04 +01:00
unknown
18a7ec3079 Merge stella.local:/home2/mydev/mysql-5.0-bug32705
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/myisam.result:
  Manual merge from 4.1
mysql-test/t/myisam.test:
  Manual merge from 4.1
2008-01-15 09:43:47 +01:00
unknown
f9440588f5 Bug#33143: Incorrect ORDER BY for ROUND()/TRUNCATE() result
The ROUND(X, D) function would change the Item::decimals field during
execution to achieve the effect of a dynamic number of decimal digits.
This caused a series of bugs:
Bug #30617:Round() function not working under some circumstances in InnoDB
Bug #33402:ROUND with decimal and non-constant cannot round to 0 decimal places
Bug #30889:filesort and order by with float/numeric crashes server
Fixed by never changing the number of shown digits for DECIMAL when
used with a nonconstant number of decimal digits.


mysql-test/r/type_decimal.result:
  Bug#33143: Test result
mysql-test/t/type_decimal.test:
  Bug#33143: Test case
sql/item_func.cc:
  Bug#33143: 
  - Moved the DECIMAL_MAX_SCALE limitation to fix_length_and_dec.
  - Removed resetting of Item::decimals field.
  - set the frac field of the output value to current scale.
strings/decimal.c:
  Bug#33143: It is necessary to set all digits in the buffer following the 
  rounded one to zero, as they may now be displayed.
2008-01-14 16:16:36 +01:00
unknown
ec25326975 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  lamia.dupka:/home/mhansson/my50-bug31797-pushee
2008-01-12 18:59:05 +02:00
unknown
7bd7e98812 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug31797/my50-bug31797-pushee


sql/item.cc:
  Auto merged
mysql-test/r/group_by.result:
  Bug#31797: Manual merge
mysql-test/t/group_by.test:
  Bug#31797: Manual merge
2008-01-11 19:00:26 +01:00
unknown
df8e9fc234 Bug#31797: error while parsing subqueries -- WHERE is parsed as HAVING
The name resolution for correlated subqueries and HAVING clauses
failed to distinguish which of two was being performed when there 
was a reference to an outer aliased field.
Fixed by adding the condition that HAVING clause name resulotion
is being performed.


mysql-test/r/group_by.result:
  Bug#31797: Test result
mysql-test/t/group_by.test:
  Bug#31797: Test case
sql/item.cc:
  Bug#31797: 
  Corrected function comment.
  The fix, raising the error is restricted to HAVING name resolution.
2008-01-11 18:50:54 +01:00
unknown
72ebb0aada Bug#29477: Not all fields of the target table were checked to have a default
value when inserting into a view.

The mysql_prepare_insert function checks all fields of the target table that
directly or indirectly (through a view) are specified in the INSERT
statement to have a default value. This check can be skipped if the INSERT
statement doesn't mention any insert fields. In case of a view this allows
fields that aren't mentioned in the view to bypass the check.

Now fields of the target table are always checked to have a default value
when insert goes into a view.


mysql-test/t/view.test:
  Added a test case for the bug#29477: Not all fields of the target table were 
  checked to have a default value when inserting into a view.
mysql-test/r/view.result:
  Added a test case for the bug#29477: Not all fields of the target table were 
  checked to have a default value when inserting into a view.
sql/sql_insert.cc:
  Bug#29477: Not all fields of the target table were checked to have a default
  value when inserting into a view.
  Now fields of the target table are always checked to have a default value
  when insert goes into a view.
2008-01-11 20:10:54 +03:00
unknown
84762ce2cb Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


client/mysql.cc:
  Auto merged
2008-01-10 20:43:05 +03:00
unknown
da11be8106 Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.0/mysql-5.0-ndb
into  dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.0/mysql-5.0-ndb-bj


mysql-test/r/view.result:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2008-01-10 20:04:21 +08:00
unknown
7085583c51 Merge kaamos.(none):/data/src/opt/bug33305/my50-bug33305
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-01-10 13:45:11 +03:00
unknown
3dba2ea82a Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/33675-bug-5.0-opt-mysql
2008-01-09 23:19:46 +03:00
unknown
693f81f0f3 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B33133-5.0-opt


sql/sql_base.cc:
  Auto merged
2008-01-09 16:52:11 +02:00
unknown
06b68454ea Bug #33133: Views are not transparent
When resolving references we need to take into consideration
the view "fields" and allow qualified access to them.
Fixed by extending the reference resolution to process view
fields correctly.


mysql-test/r/func_group.result:
  Bug #33133: test case
mysql-test/t/func_group.test:
  Bug #33133: test case
sql/sql_base.cc:
  Bug #33133: allow qualified alias refs to view fields
2008-01-09 16:49:13 +02:00
unknown
9b14ac8d01 Fix for view.test.
the result should be added by 1 by the year(now()) function.


mysql-test/r/view.result:
  SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; 
  the above statement in test file has a year(now()) function, 
  the result should increase by 1 from 2007 year to 2008 year.
2008-01-09 14:51:08 +08:00
unknown
64f02f7db4 Merge gni@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb-bj
into  dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.0/bug29851


sql/ha_ndbcluster.cc:
  Auto merged
2008-01-09 11:17:50 +08:00
unknown
8845553a81 Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
server crash.

The filesort implementation has an optimization for subquery execution which
consists of reusing previously allocated buffers. In particular the call to
the read_buffpek_from_file function might be skipped when a big enough buffer
for buffer descriptors (buffpeks) is already allocated. Beside allocating
memory for buffpeks this function fills allocated buffer with data read from
disk. Skipping it might led to using an arbitrary memory as fields' data and
finally to a crash.

Now the read_buffpek_from_file function is always called. It allocates
new buffer only when necessary, but always fill it with correct data.


sql/filesort.cc:
  Bug#33675: Usage of an uninitialized memory by filesort in a subquery caused
  server crash.Now the read_buffpek_from_file function is always called. It allocates
  new buffer only when necessary, but always fill it with correct data.
mysql-test/r/subselect.result:
  Added a test case for the bug#33675: Usage of an uninitialized memory by
  filesort in a subquery caused server crash.
mysql-test/t/subselect.test:
  Added a test case for the bug#33675: Usage of an uninitialized memory by
  filesort in a subquery caused server crash.
2008-01-09 00:40:41 +03:00
unknown
4abbaf31df Post-merge fixes to make tests pass.
mysql-test/r/blackhole.result:
  Result change.
mysql-test/r/mysqlbinlog2.result:
  Result change.
mysql-test/t/blackhole.test:
  Fixing test to ignore file_id for exec_load_file events.
2008-01-08 22:22:40 +01:00
unknown
10b009d2bb Bug#29770 Two handlers are allowed to catch an error in an stored procedure.
Add test case.


mysql-test/r/sp.result:
  Add test case result for Bug#29770
mysql-test/t/sp.test:
  Add test case for Bug#29770
2008-01-08 18:43:25 -02:00
unknown
b8c8ca6845 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B33256-5.0-opt


sql/field.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
2008-01-07 18:55:05 +02:00
unknown
bbbb77770b Merge mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#32205/5.0
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#32205/mysql-5.0-rpl
2008-01-06 15:39:46 +08:00
unknown
7c136ed959 Fixed some test case after push of BUG#32205
mysql-test/r/binlog_start_comment.result:
  Drop tables used in the test case when done
mysql-test/r/blackhole.result:
  Mask out file_id in show binlog events output
mysql-test/r/case.result:
  Drop table t2 too if it exists at the start of the test
mysql-test/t/blackhole.test:
  Mask out file_id in show binlog events output
mysql-test/t/case.test:
  Drop table t2 too if it exists at the start of the test
2008-01-06 15:27:42 +08:00
unknown
e011346d18 Merge mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/5.0
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#32205/mysql-5.0-rpl
2008-01-06 15:18:45 +08:00
unknown
6acef447d1 Add missing include test file for rpl_server_id test
mysql-test/include/show_binlog_events2.inc:
  New BitKeeper file ``mysql-test/include/show_binlog_events2.inc''
2008-01-06 15:17:47 +08:00
unknown
bd2a1ae07c Merge mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#32205/5.0
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#32205/mysql-5.0-rpl
2008-01-06 13:20:52 +08:00
unknown
48c7c1268a Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


mysql-test/mysql-test-run.pl:
  Auto merged
2008-01-04 19:59:01 -07:00
unknown
8b15e4f37a Merge ssandberg@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  riska.(none):/home/sven/bk/b26395-autocommit-xa/5.0-rpl
2008-01-02 14:23:14 +01:00
unknown
bdad41bace Fix for bug #33305: Test case in 'skip_grants' file need dynamic loading
to be compiled in

The problem was that on a statically built server an attempt to create
a UDF resulted in a different, but reasonable error ("Can't open shared
library" instead of "UDFs are unavailable with the --skip-grant-tables
option"), which caused a failure for the test case for bug #32020.

Fixed by moving the test case for bug #32020 from skip_grants.test to a
separate test to ensure that it is only run when the server is built
with support for dynamically loaded libraries.


mysql-test/r/skip_grants.result:
  Moved the test case for bug #32020 to a separate test.
mysql-test/t/skip_grants.test:
  Moved the test case for bug #32020 to a separate test.
mysql-test/r/udf_skip_grants.result:
  Moved the test case for bug #32020 to a separate test.
mysql-test/t/udf_skip_grants-master.opt:
  Moved the test case for bug #32020 to a separate test.
mysql-test/t/udf_skip_grants.test:
  Moved the test case for bug #32020 to a separate test.
2007-12-24 17:42:13 +03:00
unknown
8be249064a Merge mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/5.0
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/mysql-5.0-rpl
2007-12-24 11:08:39 +08:00
unknown
46bfdbcac0 bug#30435
changes due to non-determinism in value of read_buffer_size.


mysql-test/r/rpl_loaddata_map.result:
  results changed
mysql-test/t/rpl_loaddata_map.test:
  showing only the fact that the buffer size is larger than the packet size.
mysql-test/std_data/bug30435_10k_items.txt:
  data for bug#30435 regression testing
mysql-test/std_data/bug30435_5k.txt:
  data for bug#30435 regression testing
2007-12-23 11:18:46 +02:00
unknown
ff84f4047e bug#30435
refining the test after it failed on pb.


mysql-test/r/rpl_loaddata_map.result:
  results changed
mysql-test/t/rpl_loaddata_map.test:
  refining the test
2007-12-22 19:59:47 +02:00
unknown
ce187c0dc4 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug33435-load_data_read_buffer_size


sql/sql_repl.cc:
  Auto merged
2007-12-21 22:37:10 +02:00
unknown
40d89c44ea BUG#30435 loading large LOAD DATA INFILE breaks slave with
read_buffer_size set on master
BUG#33413 show binlog events fails if binlog has event size of close
          to max_allowed_packet


The size of Append_block replication event was determined solely by
read_buffer_size whereas the rest of replication code deals with
max_allowed_packet.
When the former parameter was set to larger than the latter there were
two artifacts: the master could not read events from binlog;
show master events did not show.

Fixed with 
- fragmenting the used io-cached buffer into pieces each size of less
  than max_allowed_packet (bug#30435)
- incrementing show-binlog-events handling thread's max_allowed_packet
  with the max estimated for the replication header size


include/my_sys.h:
  accessor-macros added in order not to mess with the io cache's implementation
  details in code that merely exploits the io-cache.
sql/sql_repl.cc:
  BUG#33413: incrementing thd->variables.max_allowed_packet with 
  the max estimation for the replication header size (from bug#19402);
  refactoring log_loaded_block() to fragment the io_cache buffer in case
   read_buffer_size > max_allowed_packet.
mysql-test/r/rpl_loaddata_map.result:
  New BitKeeper file ``mysql-test/r/rpl_loaddata_map.result''
mysql-test/t/rpl_loaddata_map-master.opt:
  specific options to trigger  BUG#30435,  BUG#33413 situations
mysql-test/t/rpl_loaddata_map-slave.opt:
  max_allowed_packet to be compatible with the master's version.
mysql-test/t/rpl_loaddata_map.test:
  regression tests for two bugs.
2007-12-21 22:34:43 +02:00
unknown
b5d95f021f BUG#26395: if crash during autocommit update to transactional table on master, slave fails
Now, every transaction (including autocommit transactions) start with
a BEGIN and end with a COMMIT/ROLLBACK in the binlog.
Added a test case, and updated lots of test case result files.


mysql-test/t/rpl_transaction-master.opt:
  BitKeeper file /home/sven/bk/b26395-autocommit-xa/5.0-rpl/mysql-test/t/rpl_transaction-master.opt
mysql-test/t/rpl_transaction-slave.opt:
  BitKeeper file /home/sven/bk/b26395-autocommit-xa/5.0-rpl/mysql-test/t/rpl_transaction-slave.opt
mysql-test/r/mix_innodb_myisam_binlog.result:
  Updated result file
mysql-test/r/multi_update.result:
  Updated result file
mysql-test/r/rpl_transaction.result:
  New result file for new test case.
mysql-test/r/sp_trans_log.result:
  Updated result file
mysql-test/r/variables-big.result:
  Updated result file
mysql-test/t/rpl_transaction.test:
  New test case.
sql/log.cc:
   - Always write BEGIN and COMMIT around statements, even in autocommit
     mode.
   - Added comments for binlog_commit and binlog_rollback.
sql/log_event.cc:
  Added debug trigger to avoid writing xid events to the binlog.
2007-12-21 20:30:23 +01:00
unknown
2ae4b047a3 Bug #33256: CREATE ... SELECT creates obsolete table
w/ Field_date instead of Field_newdate
  
Field_date was still used in temp table creation.
Fixed by using Field_newdate consistently throughout the server
except when reading tables defined with older MySQL version.
No test suite is possible because both Field_date and Field_newdate
return the same values in all the metadata calls. 


mysql-test/r/type_decimal.result:
  Bug #33256: removed redundant warnings
sql/field.h:
  Bug #33256: Add a constructor similar to Field_date::Field_date()
sql/item.cc:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
sql/item_sum.cc:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
sql/item_timefunc.cc:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
sql/item_timefunc.h:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
2007-12-21 12:44:24 +02:00
unknown
76159fdfcc Merge mail.hezx.com:/media/sda3/work/mysql/bkroot/mysql-5.0-rpl
into  mail.hezx.com:/media/sda3/work/mysql/bkwork/bug#28908/5.0
2007-12-21 17:52:25 +08:00
unknown
9d7c0dda31 Merge capulet.kindahl.net:/home/mats/devel/b12691-mysql-5.0-rpl
into  capulet.kindahl.net:/home/mats/devel/fix-mysql-5.0-rpl
2007-12-21 07:52:07 +01:00
unknown
e2937d7f43 BUG#28908 Replication: set global server_id is not setting the session server_id
When set the server-id dynamically, the server_id member of current thread is not updated.

Update the server_id member of current thread after updated the global variable value.


sql/set_var.cc:
  Update server_id of current thread
mysql-test/r/rpl_server_id.result:
  Add test for BUG#28908
mysql-test/t/rpl_server_id.test:
  Add test for BUG#28908
2007-12-21 11:02:48 +08:00
unknown
150590a0bc BUG#12691 (Exec_master_log_pos corrupted with SQL_SLAVE_SKIP_COUNTER):
Complementary patch since LOAD DATA INFILE was not covered in
the previous patch.

This patch adds a check so that the slave skip counter is not
decreased to zero if seeing a BEGIN_LOAD_QUERY_EVENT,
APPEND_BLOCK_EVENT, or CREATE_FILE_EVENT since these cannot
end a group. The group is terminated by an EXECUTE_LOAD_QUERY_
EVENT or DELETE_FILE_EVENT.


mysql-test/r/rpl_slave_skip.result:
  Result change.
mysql-test/t/rpl_slave_skip.test:
  Adding tests to test that the first event of a LOAD DATA INFILE
  can be skipped safely for both transactional and non-transactional
  tables. Also include a case that will generate a DELETE_FILE event
  last in the group, and this should be properly skipped as well.
sql/slave.cc:
  Not decrementing slave skip counter to zero when seeing a
  BEGIN_LOAD_QUERY_EVENT, APPEND_BLOCK_EVENT, or CREATE_FILE_EVENT
  since these cannot end a group.
2007-12-20 16:07:54 +01:00
unknown
8ba2819f96 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31990/50-31990


mysql-test/r/cast.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
mysql-test/t/type_date.test:
  manual merge
2007-12-20 08:35:52 +01:00
unknown
154933ec02 correct invalid values in SET GLOBAL var=DEFAULT
bug#33382


mysql-test/r/variables.result:
  typo in a test case
mysql-test/t/variables.test:
  typo in a test case
sql/set_var.cc:
  correct invalid values in SET GLOBAL var=DEFAULT
2007-12-19 21:31:04 +01:00
unknown
5480cbd69e Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/union.result:
  Bug#32848: Manual merge
mysql-test/t/union.test:
  Bug#32848: Manual merge
2007-12-19 15:59:05 +01:00