Commit graph

58236 commits

Author SHA1 Message Date
Mikael Ronstrom
2ef1c756db BUG#47838, NULL values in ranges was dropped due to missing else part in store_tuple_to_record, added more tests 2009-10-06 16:22:54 +02:00
Mikael Ronstrom
c6e67a9b04 BUG#47838, NULL values in ranges was dropped due to missing else part in store_tuple_to_record 2009-10-06 16:22:15 +02:00
Mikael Ronstrom
01072e22fe BUG#47776, Fixed character set handling, used wrong length, eventually also found that didn't need to convert to my_strnxfrm-format for column list partitioned tables, also column list partitioned tables can use multi-byte character sets in partition fields as well as where strxfrm multiplies the number of bytes in the string 2009-10-05 16:10:18 +02:00
Mikael Ronstrom
f1437d6afd BUG#47754, used number of parts instead of number of list values as end part for list partitioning in column list partitioning 2009-10-02 11:31:05 +02:00
Mikael Ronstrom
d0627362ad Fixed no_ to num_ change for NDB handler 2009-10-01 17:15:50 +02:00
Mikael Ronstrom
4d624635c5 Added more test cases 2009-10-01 16:50:11 +02:00
Mikael Ronstrom
66ea81cdb1 BUG#47752, missed to sort values in list partitioning 2009-10-01 15:09:20 +02:00
Mikael Ronstrom
dc97402c11 Changed all no_ to num_ to avoid strange names like no_list_values which is not expected to be number of list values, rather a boolea indicating no list values 2009-10-01 15:04:42 +02:00
Mikael Ronstrom
3b29941f5d Forgot to add result files for WL#3352 new test cases 2009-09-15 17:27:10 +02:00
Mikael Ronstrom
6942c25e73 WL#3352, Introducing Column list partitioning, makes it possible to partition on most data types, makes it possible to prune on multi-field partitioning 2009-09-15 17:07:52 +02:00
Joerg Bruehe
905d715f10 Merge 5.1 up into 5.4-build ("trunk"). 2009-08-29 21:26:00 +02:00
Alexander Nozdrin
4bf2c41df4 Merge from mysql-trunk. 2009-08-27 16:46:34 +04:00
Alexander Nozdrin
f76fb67e7c Merge from mysql-trunk-build. 2009-08-27 14:27:30 +04:00
Joerg Bruehe
ee696e4163 Automerge "trunk" (5.4.2 cloning + version number increase to 5.4.3)
into "trunk-build".
2009-08-27 10:44:50 +02:00
Alexander Nozdrin
0108660d12 Fix default.conf 2009-08-26 19:44:27 +04:00
Alexander Nozdrin
09d01ba615 Merge from mysql-5.1-bugteam 2009-08-26 19:43:32 +04:00
unknown
ad49f732b4 Raise version number after cloning 5.4.2-beta 2009-08-26 11:59:49 +02:00
Guilhem Bichot
24ebb184ca fix for Bug#46897 'Test "index_merge_innodb" fails (mostly)':
that was already analyzed by Oracle: EXPLAIN can return 3 or 4 in "rows"; using replace_column to work around this.

mysql-test/include/index_merge2.inc:
  replace "rows" column of some EXPLAINs by "#", if told so
mysql-test/r/index_merge_innodb.result:
  result update
mysql-test/t/index_merge_innodb.test:
  tell index_merge2.inc to accept random "rows" values in some EXPLAINs; we don't do this in index_merge_myisam.test
  which has no randomness here.
2009-08-25 17:53:43 +02:00
Guilhem Bichot
1459b65cf7 Applying fix from Oracle (Marko) for Bug #46657 "InnoDB plugin: invalid read in index_merge_innodb test (Valgrind)" 2009-08-25 17:12:44 +02:00
Joerg Bruehe
03c3e5155d Automerge "trunk" -> "trunk-build". 2009-08-24 22:25:26 +02:00
Davi Arnaut
fc39459504 Bug#45261: Crash, stored procedure + decimal
The problem was that creating a DECIMAL column from a decimal
value could lead to a failed assertion as decimal values can
have a higher precision than those attached to a table. The
assert could be triggered by creating a table from a decimal
with a large (> 30) scale. Also, there was a problem in
calculating the number of digits in the integral and fractional
parts if both exceeded the maximum number of digits permitted
by the new decimal type.

The solution is to ensure that truncation procedure is executed
when deducing a DECIMAL column from a decimal value of higher
precision. If the integer part is equal to or bigger than the
maximum precision for the DECIMAL type (65), the integer part
is truncated to fit and the fractional becomes zero. Otherwise,
the fractional part is truncated to fit into the space left
after the integer part is copied.

This patch borrows code and ideas from Martin Hansson's patch.

mysql-test/r/type_newdecimal.result:
  Add test case result for Bug#45261. Also, update test case to
  reflect that an additive operation increases the precision of
  the resulting type by 1.
mysql-test/t/type_newdecimal.test:
  Add test case for Bug#45261
sql/field.cc:
  Added DBUG_ASSERT to ensure object's invariant is maintained.
  Implement method to create a field to hold a decimal value
  from an item.
sql/field.h:
  Explain member variable. Add method to create a new decimal field.
sql/item.cc:
  The precision should only be capped when storing the value
  on a table. Also, this makes it impossible to calculate the
  integer part if Item::decimals (the scale) is larger than the
  precision.
sql/item.h:
  Simplify calculation of integer part.
sql/item_cmpfunc.cc:
  Do not limit the precision. It will be capped later.
sql/item_func.cc:
  Use new method for allocating a new decimal field.
  Add a specialized method for retrieving the precision
  of a user variable item.
sql/item_func.h:
  Add method to return the precision of a user variable.
sql/item_sum.cc:
  Use new method for allocating a new decimal field.
sql/my_decimal.h:
  The integer part could be improperly calculated for a decimal
  with 31 digits in the fractional part.
sql/sql_select.cc:
  Use new method which truncates the integer or decimal parts
  as needed.
2009-08-24 16:47:08 -03:00
Alfranio Correia
e31a41d10b auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-08-24 11:37:44 +01:00
Alfranio Correia
9a632549da auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-08-24 10:24:52 +01:00
Jonathan Perkin
8a2454f8e9 Apply changes from mysql-5.1.38-release clone:
- Add conditionals for bundled zlib and innodb plugin.
 - Apply patch from bug#46834 to install the test suite in RPMs.
 - Add plugins to RPMs.  Disable example plugins.
2009-08-24 10:13:34 +01:00
Alexander Nozdrin
8b72c02a25 Backporting patch for Bug#46650 (Innodb assertion autoinc_lock == lock
in lock_table_remove_low on INSERT SELECT) to mysql-trunk.
2009-08-24 10:48:57 +04:00
Mattias Jonsson
8b0ec01448 merge 2009-08-21 18:00:38 +02:00
Mattias Jonsson
a4e832d69d Bug#46639: 1030 (HY000): Got error 124 from storage engine on
INSERT ... SELECT ...

Problem was that when bulk insert is used on an empty
table/partition, it disables the indexes for better
performance, but in this specific case it also tries
to read from that partition using an index, which is
not possible since it has been disabled.

Solution was to allow index reads on disabled indexes
if there are no records.

Also reverted the patch for bug#38005, since that was a workaround
in the partitioning engine instead of a fix in myisam.

mysql-test/r/partition.result:
  Bug#46639: 1030 (HY000): Got error 124 from storage engine on
  INSERT ... SELECT ...
  
  updated result file
mysql-test/t/partition.test:
  Bug#46639: 1030 (HY000): Got error 124 from storage engine on
  INSERT ... SELECT ...
  
  Added testcase
sql/ha_partition.cc:
  Bug#46639: 1030 (HY000): Got error 124 from storage engine on
  INSERT ... SELECT ...
  
  reverted the patch for bug#38005, since that was a workaround
  around this problem, not needed after fixing it in myisam.
storage/myisam/mi_search.c:
  Bug#46639: 1030 (HY000): Got error 124 from storage engine on
  INSERT ... SELECT ...
  
  Return HA_ERR_END_OF_FILE instead of HA_ERR_WRONG_INDEX
  when there are no rows.
2009-08-21 17:38:29 +02:00
Georgi Kodinov
787a4940ca reverted the fix for bug #46019 from 5.1-bugteam 2009-08-21 17:41:48 +03:00
Georgi Kodinov
8723e9d226 automerge 2009-08-21 17:12:03 +03:00
Georgi Kodinov
66ce3dee92 Revert of the fix for bug #46019. 2009-08-21 17:10:55 +03:00
Martin Hansson
8f75260b7d Merge. 2009-08-21 14:31:40 +02:00
Martin Hansson
b011f1ea1c Merge. 2009-08-21 12:13:03 +02:00
Joerg Bruehe
9433dc0ec3 Upmerge a merge changeset from 5.0 to 5.1, no code change involved. 2009-08-21 11:56:44 +02:00
Ramil Kalimullin
fb9ba3734b Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP
(temporary) TABLE, crash

Problem: if one has an open "HANDLER t1", further "TRUNCATE t1" 
doesn't close the handler and leaves handler table hash in an 
inconsistent state, that may lead to a server crash.

Fix: TRUNCATE should implicitly close all open handlers.

Doc. request: the fact should be described in the manual accordingly.


mysql-test/r/handler_myisam.result:
  Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP
  (temporary) TABLE, crash
    - test result.
mysql-test/t/handler_myisam.test:
  Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP
  (temporary) TABLE, crash
    - test case.
sql/sql_delete.cc:
  Fix for bug #46456 [Ver->Prg]: HANDLER OPEN + TRUNCATE + DROP
   (temporary) TABLE, crash
    - remove all truncated tables from the HANDLER's hash.
2009-08-21 10:55:35 +05:00
Joerg Bruehe
3bed8a1759 Merge the correction for the bug#37098 fix into 5.0-build 2009-08-20 22:07:40 +02:00
Joerg Bruehe
8077b5c503 automerge the correction for bug#37098 into 5.1-build 2009-08-20 21:58:27 +02:00
Joerg Bruehe
f9337e4bef Merge the correction to the bug#37098 fix from 5.1 to 5.4. 2009-08-20 21:50:12 +02:00
Joerg Bruehe
17561bf603 Merge the correction to the bug#37098 fix from 5.0 to 5.1. 2009-08-20 21:41:12 +02:00
Joerg Bruehe
73f4511394 Get rid of manual pages which aren't used.
This is a partial correction to the original fix for bug#37098
   Get rid of "Installed (but unpackaged)" files in the RPM build
which used a wrong variable.

man/Makefile.am:
  Correction to the original fix:
  The variable to use is "$(mandir)", "$(manlibdir)" was wrong.
2009-08-20 21:08:09 +02:00
Georgi Kodinov
1317d24b33 merge of bug #46019 to 5.1-bugteam 2009-08-20 17:11:22 +03:00
Martin Hansson
acdbef4520 Bug#46616: Merge
mysql-test/r/auto_increment.result:
  Bug#46616: Test result.
mysql-test/t/auto_increment.test:
  Bug#46616: Test case.
sql/sql_update.cc:
  Bug#46616: Fix.
2009-08-20 14:30:59 +02:00
Martin Hansson
e66fba53a7 Bug#46616: Assertion `!table->auto_increment_field_not_null' on
view manipulations
      
The bespoke flag was not properly reset after last call to 
fill_record. Fixed by resetting in caller mysql_update.

mysql-test/r/auto_increment.result:
  Bug#46616: Test result.
mysql-test/t/auto_increment.test:
  Bug#46616: Test case.
sql/sql_update.cc:
  Bug#46616: Fix.
2009-08-20 13:56:29 +02:00
Alfranio Correia
40b9df3995 BUG#45694 Deadlock in replicated statement is not retried
If the SQL Thread fails to execute an event due to a temporary error (e.g.
ER_LOCK_DEADLOCK) and the option "--slave_transaction_retries" is set the SQL
Thread should not be aborted and the transaction should be restarted from the
beginning and re-executed.

Unfortunately, a wrong interpretation of the THD::is_fatal_error was preventing
this behavior. In a nutshell, "this variable is set to TRUE if an execution of a
compound statement cannot continue. In particular, it is used to disable access
to the CONTINUE or EXIT handlers of stored routines. So even temporary errors
may have this variable set.

To fix the bug, we have done what follows:

   DBUG_ENTER("has_temporary_error");

-  if (thd->is_fatal_error)
-    DBUG_RETURN(0);
-
   DBUG_EXECUTE_IF("all_errors_are_temporary_errors",
                   if (thd->main_da.is_error())
                   {
2009-08-19 16:38:18 +01:00
Alexander Nozdrin
ed1976f143 Fix default.conf 2009-08-19 17:06:33 +04:00
Georgi Kodinov
0665536995 Bug #46019: ERROR 1356 When selecting from within another
view that has Group By
      
Table access rights checking function check_grant() assumed
that no view is opened when it's called.
This is not true with nested views where the inner view
needs materialization. In this case the view is already 
materialized when check_grant() is called for it.
This caused check_grant() to not look for table level
grants on the materialized view table.
Fixed by checking if a view is already materialized and if 
it is check table level grants using the original table name
(not the ones of the materialized temp table).
2009-08-19 15:14:57 +03:00
Georgi Kodinov
40defb1d53 backport of Chad's fix for bug #39326 to 5.0-bugteam 2009-08-19 10:59:17 +03:00
Georgi Kodinov
2dc7c5c8e7 automere 2009-08-17 17:21:08 +03:00
Georgi Kodinov
def7b58466 automerge 2009-08-17 17:14:51 +03:00
Georgi Kodinov
171cb67d0f automerge 2009-08-17 17:13:08 +03:00
Ramil Kalimullin
a6ddf8b18a Automerge 2009-08-14 14:13:16 +05:00