Commit graph

56215 commits

Author SHA1 Message Date
Matthias Leich
53b9d62632 Merge of fix for bug 39979 into GCA tree 2008-11-25 13:48:08 +01:00
Matthias Leich
a03ede9bda Merge 5.0 -> 51. of fix for bug 26890 2008-11-25 13:17:50 +01:00
Matthias Leich
ddf5c19272 Merge of fix for Bug 26890 into GCA tree 2008-11-25 12:52:32 +01:00
Ingo Struewing
d857e14cb7 merge 2008-11-25 12:03:02 +01:00
Ramil Kalimullin
4bf94e7a28 Null-merge of backport for #40984. 2008-11-25 13:55:30 +04:00
Guilhem Bichot
3c1e153a82 Manually applying the patch for BUG40954 "Crash in MyISAM index code with concurrency test using partitioned tables"
so that it stops crashing pushbuild2/5.1-maria and we can see the other failures which it hid.

mysql-test/r/partition.result:
  Manually applying the patch for BUG40954 "Crash in MyISAM index code with concurrency test using partitioned tables"
mysql-test/t/partition.test:
  Manually applying the patch for BUG40954 "Crash in MyISAM index code with concurrency test using partitioned tables"
sql/ha_partition.cc:
  Manually applying the patch for BUG40954 "Crash in MyISAM index code with concurrency test using partitioned tables"
2008-11-25 10:05:48 +01:00
Ingo Struewing
eefbc08bc5 merge 2008-11-25 09:29:58 +01:00
Ingo Struewing
f65bd582be merge 2008-11-25 09:27:40 +01:00
Ramil Kalimullin
df8a5474f8 Fix for bug#40984: backport fix from 39585 into 5.0
Problem: in 5.0 'check table for upgrade' doesn't detect
incompatible collation changes made in 5.0.48.

Fix: backport #39585 fix to 5.0


sql/handler.cc:
  Fix for bug#40984: backport fix from 39585 into 5.0
    - backport of #39585 fix
sql/handler.h:
  Fix for bug#40984: backport fix from 39585 into 5.0
    - backport of #39585 fix
2008-11-25 10:22:02 +04:00
Mattias Jonsson
d47f9233f4 merge 2008-11-24 23:18:45 +01:00
Patrick Crews
10548a6ee9 Merge 5.0->5.1 2008-11-24 16:56:48 -05:00
Patrick Crews
2578609322 Bug#40866: mysql-test-run's check of tests provides false failures due to timestamp
Altering how MTR checks global variable status to exclude timestamp
Changed SQL statements to update style.
2008-11-24 16:53:32 -05:00
Mattias Jonsson
d5057740a0 Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
Problem was usage of read_range_first with an empty key.

Solution was to not to give a key if it was empty.

mysql-test/r/partition.result:
  Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
  
  Updated test result.
mysql-test/t/partition.test:
  Bug#40954: Crash in MyISAM index code with concurrency test using partitioned tables
  
  Added test case
2008-11-24 17:24:03 +01:00
Georgi Kodinov
f31d305238 merged bug 39656 to 5.1-bugteam 2008-11-24 18:00:09 +02:00
Georgi Kodinov
c9be1c9f88 merged bug 39656 to 5.0-bugteam 2008-11-24 17:38:52 +02:00
Georgi Kodinov
d795963cba Bug #39656: Behaviour different for agg functions with & without where -
ONLY_FULL_GROUP_BY

The check for non-aggregated columns in queries with aggregate function, but without
GROUP BY was treating all the parts of the query as if they are in the SELECT list.
Fixed by ignoring the non-aggregated fields in the WHERE clause.

mysql-test/r/func_group.result:
  Bug #39656: test case
mysql-test/t/func_group.test:
  Bug #39656: test case
sql/sql_select.cc:
  Bug #39656: ignore the new non-aggregated column refs in a WHERE
  by saving the state so far and then adding only the new values of the other
  parts of the bitmask.
2008-11-24 17:30:47 +02:00
Guilhem Bichot
d55161b75a Two tests which I recently copied from MyISAM to Maria take much longer in Maria (20x, 15 minutes)
so cause timeouts. Probably normal as ALTER TABLE does many syncs in Maria, but have to mark them "big"
for pushbuild2.

mysql-test/suite/parts/t/partition_alter2_1_maria.test:
  test takes 15 minutes with Maria (ALTER TABLE does many syncs in Maria)
mysql-test/suite/parts/t/partition_alter2_2_maria.test:
  test takes 15 minutes with Maria (ALTER TABLE does many syncs in Maria)
2008-11-24 15:53:10 +01:00
Guilhem Bichot
f2d05437d5 In pushbuild2 when testing Maria's recovery, it can happen that a page was not entirely written
(i.e. file's size % 8192 != 0). Don't assert on this, Recovery is supposed to fix it.
2008-11-24 15:23:48 +01:00
Guilhem Bichot
1889e8b075 Under Windows one can get \ instead of / in file names in error messages (fix for pushbuild warning)
mysql-test/lib/mtr_report.pl:
  Under Windows one can get \ instead of / in file names in error messages
2008-11-24 14:57:34 +01:00
unknown
ef5d498348 merge 2008-11-24 09:54:07 +02:00
unknown
094d92e242 Prevent reenabling logging by thread which tries to lock table used by bulk insert.
Scenario of the BUG#40731 ("Maria: hang (probably in page cache) under concurrency"):
      T1: Disable logging for the table
      T1: Start inserting into the table
      T2: Tries to lock the table so waits.
      T2: Tries unlock and relock during the process see that the table has disabled logging and reenables it
      T1: Got DBUG_ASSERT because suddenly start use table with transaction switched on which is not expected during bulk insert

storage/maria/ma_pagecache.c:
  Page type print added for debugging purposes.
storage/maria/ma_recovery.c:
  Check that it was this thred which switched off logging (transactional mode).
storage/maria/maria_def.h:
  Flag for controling which thread switched off transactiona mode for the table added.
2008-11-24 09:48:21 +02:00
Guilhem Bichot
a4c0b51bdc post-merge fix (compiler warning) 2008-11-22 16:21:07 +01:00
Vladislav Vaintroub
3374afe8b0 merge 2008-11-22 01:22:20 +01:00
Vladislav Vaintroub
bebde5dba0 merge 2008-11-22 01:10:38 +01:00
Ingo Struewing
f92c573145 Bug#28234 - global/session scope - documentation vs implementation
Several system variables did not behave like system variables should do.
When trying to SET them or use them in SELECT, they were reported as
"unknown system variable". But they appeared in SHOW VARIABLES.

This has been fixed by removing the "fixed_vars" array of variables
and integrating the variables into the normal system variables chain.
All of these variables do now behave as read-only global-only
variables. Trying to SET them tells they are read-only, trying to
SELECT the session value tells they are global only. Selecting the
global value works. It delivers the same value as SHOW VARIABLES.


mysql-test/r/variables-notembedded.result:
  Bug#28234 - global/session scope - documentation vs implementation
  New test result.
mysql-test/r/variables.result:
  Bug#28234 - global/session scope - documentation vs implementation
  New test result.
mysql-test/t/variables-notembedded.test:
  Bug#28234 - global/session scope - documentation vs implementation
  Added a test for each moved variable that is not present in an
  embedded server.
mysql-test/t/variables.test:
  Bug#28234 - global/session scope - documentation vs implementation
  Added a test for each moved variable that is also present in an
  embedded server.
sql/item_func.cc:
  Bug#28234 - global/session scope - documentation vs implementation
  Added SHOW_BOOL to some Item_func_get_system_var methods.
sql/set_var.cc:
  Bug#28234 - global/session scope - documentation vs implementation
  Moved all variables from the "fixed_vars" array into the normal
  system variables chain by using the new variable class sys_var_const.
  Removed the fixed_show_vars array and its initialization in
  enumerate_sys_vars().
  Removed mysql_append_static_vars(), which added fixed_vars arrays
  to the fixed_show_vars array.
sql/set_var.h:
  Bug#28234 - global/session scope - documentation vs implementation
  Added the new system variable class sys_var_const.
  Removed declaration of mysql_append_static_vars().
sql/slave.cc:
  Bug#28234 - global/session scope - documentation vs implementation
  Moved the definition of show_slave_skip_errors() from sql_repl.cc
  to here and renamed it to print_slave_skip_errors().
  Changed print_slave_skip_errors() to create a static buffer with
  a printable version of the error numbers set.
  Added a call of print_slave_skip_errors() to init_slave_skip_errors().
sql/slave.h:
  Bug#28234 - global/session scope - documentation vs implementation
  Added declaration of slave_skip_error_names.
sql/sql_repl.cc:
  Bug#28234 - global/session scope - documentation vs implementation
  Moved all variables from the "fixed_vars" array into the normal
  system variables chain by using the new variable class sys_var_const.
  Moved the definition of show_slave_skip_errors() to slave.cc and
  modified it to compute the string once at server initialization only.
  Removed the call to mysql_append_static_vars().
2008-11-22 00:22:21 +01:00
Matthias Leich
80a0a5793d Fox for Bug#40889 funcs_1: wrong code within triggers_03e_db_level.inc causes warnings 2008-11-21 22:36:29 +01:00
Matthias Leich
d082cf340c - Fix for Bug#39854 events_scheduling fails sporadically on pushbuild
- restore original state of event_scheduler at the end of the test
- minor fixes around comments, formatting
2008-11-21 22:28:23 +01:00
Horst Hunger
f5890962fe Due to merges. 2008-11-21 17:36:18 +01:00
Horst Hunger
caf290203f Fix for bug#36873 containing the review results. 2008-11-21 15:36:13 +01:00
Guilhem Bichot
33b194c36e Merge of 5.1-main into 5.1-maria. There were no changes to storage/myisam, or mysql-test/t/*myisam*.
However there were three new tests mysql-test/suite/parts/t/partition*myisam.test, of which I make here
copies for Maria.
2008-11-21 15:21:50 +01:00
Alexey Botchkov
3f2044cd6e warning of notused function fixed 2008-11-21 18:15:11 +04:00
Ramil Kalimullin
1b8a4c573c Auto-merge 2008-11-21 17:32:45 +04:00
Ramil Kalimullin
bb38a57abb Auto-merge 2008-11-21 17:20:58 +04:00
Sergey Glukhov
aba0e5a95c null merge 2008-11-21 16:43:06 +04:00
Sergey Glukhov
bd6376f1d1 Bug#34760 Character set autodetection appears to fail
the problem is the same as reported in bug#20835,
so the fix is backport of bug#20835 patch.


mysql-test/r/subselect.result:
  test result
mysql-test/t/subselect.test:
  test case
2008-11-21 16:39:59 +04:00
Vladislav Vaintroub
ff5685d701 Fix broken link in embedded server (Windows) 2008-11-21 11:15:26 +01:00
Ramil Kalimullin
39efef853b Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
returns truncated results

Problem: performig conversion from {INT, DECIMAL, REAL} to CHAR
we incorrectly set its max length in some cases that may lead
to truncated results returned.

Fix: properly set CONVERT({INT, DECIMAL, REAL}, CHAR) result's
max length.


mysql-test/r/ctype_utf8.result:
  Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
  returns truncated results
    - test result.
mysql-test/t/ctype_utf8.test:
  Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
  returns truncated results
    - test case.
sql/item_timefunc.cc:
  Fix for bug#36772: When using UTF8, CONVERT with GROUP BY
  returns truncated results
    - calculating Item_char_typecast::max_length use initial
  argument's charset mbmaxlen instead of from_cs->mbmaxlen,
  as from_cs may differ in some case (see comment above).
2008-11-21 13:48:22 +04:00
Vladislav Vaintroub
0b98b8973b merge 2008-11-21 10:00:21 +01:00
Chad MILLER
75a6be98e0 Merge update for bug 39178 fix. 2008-11-20 09:58:30 -05:00
Chad MILLER
490bc42101 Update to change for bug 39178. Revert error-handling change, perhaps
temporarily if yassl maintainer has plans for other error handling.
2008-11-20 09:51:01 -05:00
Guilhem Bichot
8d96bcda72 During Maria's checkpoint, use the proper mutex to read transaction's short_id
storage/maria/trnman.c:
  During Maria's checkpoint, we walk the list of active transactions; in this list we may find a transaction with a short_id of 0 which means "uninitialized" (is being created right now) and want to ignore this transaction. Such short_id is set under trn->state_lock, so use this mutex to reliably read short_id during checkpoint.
2008-11-20 15:11:00 +01:00
Ramil Kalimullin
c3dc1d6dfb Fix for bug#40770: Server Crash when running with triggers including
variable settings (rpl_sys)

Problem: under certain conditions (e.g. user variables usage in triggers)
accessing a user defined variable we may use a variables hash table that
belongs to already deleted thread. It happens if
thd= new THD;
has the same address as just deleted thd as we use
if (stored_thd == thd)
to check.
That may lead to unpredictable results, server crash etc.

Fix: use thread_id instead of thd address to distinguish threads.

Note: no simple and repeatable test case.


sql/item_func.cc:
  Fix for bug#40770: Server Crash when running with triggers including
  variable settings (rpl_sys)
    - store and use thd->thread_id to distinguish threads instead of
  thread address as it may be the same as just deleted thread had, 
  i.e. we may get (old_thd == new_thd) after
  delete old_thd;
  new_thd= new THD;
    - set entry_thread_id only when we get a real entry, clear it 
  if the hash search fails.
sql/item_func.h:
  Fix for bug#40770: Server Crash when running with triggers including
  variable settings (rpl_sys)
    - Item_func_set_user_var::entry_thread_id introduced.
2008-11-20 15:25:26 +04:00
Ramil Kalimullin
4f597b14a8 Null-merge 2008-11-20 14:51:38 +04:00
Ramil Kalimullin
1cd8b9f700 Fix for bug#40875: Memory leak in FEDERATED handler
Problem: memory leak occurs when we open a federated table
that has its share in the hash.

Fix: free not used memory.

Note: the fix should NOT be merged to 5.1 (the code changed).


sql/ha_federated.cc:
  Fix for bug#40875: Memory leak in FEDERATED handler
    - free memory (tmp_share.scheme) allocated in the parse_url()
  if it isn't used anymore.
2008-11-20 14:08:36 +04:00
Staale Smedseng
e5ae4e2392 A fix for Bug#22891 "session level max_allowed_packet can be
set but is ignored".
                                  
This patch makes @@session.max_allowed_packed and
@@session.net_buffer_length read-only as suggested in the bug
report. The user will have to use SET GLOBAL (and reconnect)
to alter the session values of these variables.
                            
The error string ER_VARIABLE_IS_READONLY is introduced.
                            
Tests are modified accordingly.


sql/set_var.cc:
  The class sys_var_thd_ulong_session_readonly is introduced as
  a specialization of sys_var_thd_ulong implementing a read-only
  session variable. The class overrides check() and
  check_default() to achieve the read-only property for the
  session part of the variable.
sql/set_var.h:
  The class sys_var_thd_ulong_session_readonly is introduced as
  a specialization of sys_var_thd_ulong implementing a read-only
  session variable. The class overrides check() and
  check_default() to achieve the read-only property for the
  session part of the variable.
sql/share/errmsg.txt:
  New error ER_VARIABLE_IS_READONLY.
2008-11-20 08:51:48 +01:00
Matthias Leich
87c97b4785 Fix for Bug#26890 main.multi_update times out
The test itself is not faulty. The testcase timeout
problem happens if this IMHO mid size resource
(space in vardir, virtual memory, amount of disk I/O)
consuming test meets a weak (excessive disk I/O caused
by parallel applications or paging) testing box.

The modifications:
- Move the most time and disk I/O consuming subtest
  for Bug 1820 into its own script (multi_update2)
  This will reduce the likelihood that we exceed the
  testcase timeout.
- Replace error numbers with error names
- Minor improvements of the formatting

-
2008-11-19 19:17:26 +01:00
Vladislav Vaintroub
09ac30f679 Bug#39494 : key_buffer_size > 4GB does not work on 64 bit Windows
Cache size  is truncated via 32bit ulong  in  ha_init_key_cache() and 
ha_resize_key_cache() 

This change fixes the cast to size_t instead of ulong. This cast is safe,
because key_buffer_size parameter is limited to SIZE_T_MAX
2008-11-19 16:02:38 +01:00
Joerg Bruehe
3d0798d07d Merge the 5.0.72 build tag up into 5.1, no source change. 2008-11-19 13:04:34 +01:00
Alexey Botchkov
36c4b37b16 Bug#38293 Libmysqld crash in mysql_library_init if language file missing
additional fix - the 'debug' keyword removed
2008-11-19 15:51:31 +04:00
Alexey Botchkov
9ac2f96015 merging 2008-11-19 14:01:21 +04:00