Commit graph

66718 commits

Author SHA1 Message Date
Mattias Jonsson
3166b9153a merge 2010-08-19 10:22:23 +02:00
Bernt M. Johnsen
67d895d499 Bug#53563 Fix and enable charset/collation tests in funcs_2 2010-08-19 09:31:24 +02:00
Mattias Jonsson
89d7ac6007 merge 2010-08-19 09:20:17 +02:00
Alexander Barkov
89e6eb0b1e Backporting Bug#32391 Character sets: crash with --character-set-server
from mysql-trunk-bugfixing (5.6.1-m5) from mysql-5.5-bugfixing (5.5.6-m3).
2010-08-19 10:00:43 +04:00
Alexander Barkov
cdce606121 Bug#45263 utf32_general_ci, bad effects around CREATE TABLE AS SELECT
Problem: Item_func_hex::val_str() returned data in ASCII format,
which did not match collation.collation pointing to my_charset_utf32_general_ci.
Fix: changing parent class of Item_func_hex to Item_str_ascii_func,
as val_str() implementation is heavily ASCII-oriented.

  mysql-test/r/ctype_utf32.result
  mysql-test/t/ctype_utf32.test
  Adding test case


  sql/item_strfunc.cc
  sql/item_strfunc.h
  - Changing parent class to Item_str_ascii_func
  - Clean-up in Item_func_hex::fix_length_and_dec()
    Using fix_char_length() instead of setting max_length directly.
2010-08-18 16:08:59 +04:00
Jon Olav Hauglid
8f36eaa11e Merge from mysql-5.5-bugfixing to mysql-5.5-runtime 2010-08-18 13:55:37 +02:00
Jon Olav Hauglid
5139bf6c8f Manual merge from mysql-5.5-bugfixing to mysql-5.5-runtime. 2010-08-18 13:29:04 +02:00
Mats Kindahl
f0af63ad50 WL#5363: Thread pool interface
Updating result files containing output of --help --verbose.
2010-08-18 12:53:43 +02:00
d3b7cd3ff2 WL#5370 Keep forward-compatibility when changing
'CREATE TABLE IF NOT EXISTS ... SELECT' behaviour
BUG#47132, BUG#47442, BUG49494, BUG#23992 and BUG#48814 will disappear
automatically after the this patch.
BUG#55617 is fixed by this patch too.
            
This is the 5.5 part.
It implements:
- 'CREATE TABLE IF NOT EXISTS ... SELECT' statement will not insert
  anything and binlog anything if the table already exists.
  It only generate a warning that table already exists.
- A couple of test cases for the behavior changing.
2010-08-18 17:35:41 +08:00
Magne Mahre
bd75361929 Bug #55547 InnoDB is not included when configuring by default
Added InnoDB to the 'default' plugin group, and modified 
the autoconf script so the 'default' group is actually 
built by default.
      
(i.e  ./configure.am == ./configure.am --with-plugins=default ,
instead of being ./configure.am --with-plugins=none )
2010-08-18 10:14:55 +02:00
Alexander Nozdrin
8977575cff Auto-merge from mysql-5.5. 2010-08-18 11:48:38 +04:00
Vasil Dimov
b38eada6ae Merge mysql-5.5-innodb -> mysql-5.5-bugfixing 2010-08-18 10:23:34 +03:00
Alexander Nozdrin
5e638f4755 Auto-merge from mysql-5.5-merge. 2010-08-18 11:17:19 +04:00
Vasil Dimov
02492ae36f Merge mysql-5.5-bugfixing -> mysql-5.5-innodb 2010-08-18 10:14:06 +03:00
b37c8a7a54 The patch is 5.1 part of the worklog. It is for 5.1 only.
So null merge.
2010-08-18 13:58:21 +08:00
b766a51f41 WL#5370 Keep forward-compatibility when changing
'CREATE TABLE IF NOT EXISTS ... SELECT' behaviour
BUG#55474, BUG#55499, BUG#55598, BUG#55616 and BUG#55777 are fixed
in this patch too.

This is the 5.1 part.
It implements:
- if the table exists, binlog two events: CREATE TABLE IF NOT EXISTS
  and INSERT ... SELECT

- Insert nothing and binlog nothing on master if the existing object
  is a view. It only generates a warning that table already exists.
2010-08-18 12:56:06 +08:00
Joerg Bruehe
49652079e0 Merge the fix for bug#55015. 2010-08-17 15:54:18 +02:00
Georgi Kodinov
607f1adabd merge 2010-08-17 15:12:52 +03:00
Marko Mäkelä
332a41ce57 A non-functional change:
dict_load_index_low(): Rename the parameter "cached" to "allocated"
and clarify the comments.
2010-08-17 15:07:54 +03:00
Vasil Dimov
793dee2d5c Make main.endspace more deterministic
Followup to vasil.dimov@oracle.com-20100817063430-inglmzgdtj95t29d
which didn't fully fix the test because the order of the returned
rows was different in embedded and non-embedded version. So the only
way to fix this is to add an ORDER BY clause.
2010-08-17 14:54:29 +03:00
Magne Mahre
7d2d2e0f9b Bug #54850 rpl_ndb.rpl_ndb_stm_innodb and
rpl_ndb.rpl_ndb_2other fails

The two regressions tests failed after WL#5349 was
pushed, since they were writted with the implicit
requirement that MyISAM is the default storage engine.

Adding --default-storage-engine=MyISAM as startup
parameter, to mimic the pre-wl#5349 situation.
2010-08-17 10:56:50 +02:00
Jimmy Yang
da24a208dd Fix bug #53496 Use Lock_time in slow query log output for InnoDB row
lock wait time. Including the InnoDB lock time in the exiting "Lock_time"
output.
2010-08-17 01:19:24 -07:00
Vasil Dimov
15fd2b4ffa Adjust endspace.result
This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
which improved the sampling algorithm. The endspace test is non-deterministic
because it does not include ORDER BY clause in its queries.
2010-08-17 09:34:30 +03:00
Vasil Dimov
260ff5be5e Adjust type_bit_innodb.result
This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
which improved the sampling algorithm.
2010-08-17 09:26:41 +03:00
Vasil Dimov
0c7b390448 Adjust rowid_order_innodb.result
This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
which improved the sampling algorithm.
2010-08-17 09:25:08 +03:00
Vasil Dimov
4a3ba7343d Adjust innodb_gis.result
This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
which improved the sampling algorithm.
2010-08-17 09:24:33 +03:00
Vasil Dimov
f8b5843005 Adjust innodb_mysql.result
This is a followup to vasil.dimov@oracle.com-20100816142329-yimenbuktd416z1a
which improved the sampling algorithm. I have manually checked that the new
values are actually the correct ones, for example:
-rows	16
+rows	32
the number of rows returned by the query is 32.
2010-08-17 09:17:04 +03:00
Mats Kindahl
e1e6c32b72 WL#5363: Thread pool interface
Patch to make Visual C++ happy.
2010-08-17 07:46:53 +02:00
Mattias Jonsson
1be8280b84 merge 2010-08-16 16:27:25 +02:00
Mattias Jonsson
2b2c7ae6de Rename of sql_alter_table -> sql_alter and sql_table_maintenance -> sql_admin 2010-08-16 16:25:23 +02:00
Vasil Dimov
c292616a7d Fix Bug#53761 RANGE estimation for matched rows may be 200 times different
Improve the range estimation algorithm.

Previously:
For a given level the algo knows the number of pages in the requested range and the n

With this change:
Same idea, but peek a few (10) of the intermediate pages to get a better estimate of 

In the bug report one of the examples has a btree with a snippet of the leaf level li
page1(899 records), page2(1 record), page3(1 record), page4(1 record)
so when trying to estimate, the previous algo, assumed there are average (899+1)/2=45
Fix Bug#53761 RANGE estimation for matched rows may be 200 times different

Improve the range estimation algorithm.

Previously:
For a given level the algo knows the number of pages in the requested range
and the number of records on the leftmost and the rightmost page. Then it
assumes all pages in between contain the average between the two border pages
and multiplies this average number by the number of intermediate pages.

With this change:
Same idea, but peek a few (10) of the intermediate pages to get a better
estimate of the average number of records per page. If there are less than 10
intermediate pages then all of them will be scanned and the result will be
precise, not an estimation.

In the bug report one of the examples has a btree with a snippet of the leaf
level like this:
page1(899 records), page2(1 record), page3(1 record), page4(1 record)
so when trying to estimate, the previous algo, assumed there are average
(899+1)/2=450 records per page which went terribly wrong. With this change
page2 and page3 will be read and the exact number of records will be returned.

Approved by:	Sunny (rb://401)
2010-08-16 17:23:29 +03:00
Magne Mahre
19c9957367 Bug#55001 Change in behavior: thread_concurrency (docs,
example files)

The system variable 'thread_concurrency' has been
(re-)enabled on all platforms, to prevent startup
errors.

'thread_concurrency' is unused and has no effect,
on any platform, in MySQL 5.1 and later versions.  It 
will be deprecated, and removed, in context of 
worklog WL#5265
2010-08-16 15:05:01 +02:00
Mattias Jonsson
7641dd7b4b merge 2010-08-16 14:58:38 +02:00
Mattias Jonsson
25ae81f133 Bug#49907: ALTER TABLE ... TRUNCATE PARTITION does not wait for
locks on the table

Fixing the partitioning specifics after TRUNCATE TABLE in
bug-42643 was fixed.

Reorganize of code to decrease the size of the giant switch
in mysql_execute_command, and to prepare for future parser
reengineering. Moved code into Sql_statement objects.

Updated patch according to davi's review comments.
2010-08-16 14:53:30 +02:00
Mats Kindahl
cd34770558 Merging with mysql-5.5-stage. 2010-08-16 14:50:27 +02:00
Georgi Kodinov
5f211511e8 merge 2010-08-16 10:11:57 +03:00
Alexander Nozdrin
9c41a9909a Auto-merge from mysql-5.5. 2010-08-16 10:46:21 +04:00
Alexander Nozdrin
62b441b4f5 Auto-merge from mysql-5.5. 2010-08-16 10:38:26 +04:00
Alexander Nozdrin
5cb0ccebf3 Empty merge from mysql-5.5. 2010-08-16 10:30:07 +04:00
Alexander Nozdrin
2585da55ac Auto-merge from mysql-5.5-stage. 2010-08-16 10:25:56 +04:00
Sunny Bains
97aa121579 Merge from -c3476 mysql-5.1-security.
------------------------------------------------------------
     revno: 3476
     committer: Sunny Bains <Sunny.Bains@Oracle.Com>
     branch nick: 5.1-security
     timestamp: Thu 2010-08-05 19:18:17 +1000
     message:
       Fix bug# 55543 - InnoDB Plugin: Signal 6: Assertion failure in file fil/fil0fil.c line 4306

         The bug is due to a double delete of a BLOB, once via:

               rollback -> btr_cur_pessimistic_delete()

         and the second time via purge.

         The bug is in row_upd_clust_rec_by_insert(). There we relinquish ownership
         of the non-updated BLOB columns in btr_cur_mark_extern_inherited_fields()
         before building the row entry that will be inserted and whose contents will
         be logged in the UNDO log. However, we don't set the BLOB column later to
         INHERITED so that a possible rollback will not free the original row's
         non-updated BLOB entries. This is because the condition that checks for
         that is in :

     		    	if (node->upd_ext) {}.

         node->upd_ext is non-NULL only if a BLOB column was updated and that column
         is part of some key ordering (see row_upd_replace()). This results in the
         non-update BLOB columns being deleted during a rollback and subsequently by
         purge again.

         rb://413
2010-08-16 12:05:49 +10:00
Sunny Bains
787f0c54cb Fix Bug #55277 - Failing assertion: auto_inc > 0
Handle overflow when reading value from SELECT MAX(C) FROM T;

Call ha_innobase::info() after initializing the autoinc value
in ha_innobase::open().

Fix for both the builtin and plugin.

rb://402

Merge from mysql-5.1-security.
2010-08-16 11:59:43 +10:00
Sunny Bains
62aa8943b8 Add test to the plugin branch from fix for bug# 55277. 2010-08-16 10:12:22 +10:00
Gleb Shchepa
ce5b12db7a automerge 5.1-security --> 5.5-security (bug 55424) 2010-08-15 11:56:14 +04:00
Evgeny Potemkin
48738f737a Bug#49746: Const expression caching led to NDB not using engine condition
pushdown.
      
NDB supports only a limited set of item nodes for use in engine condition
pushdown. Because of this adding cache for const expression effectively
disabled this optimization.
      
The ndb_serialize_cond function is extended to support Item_cache and treat
it as a constant values.
A helper function called ndb_serialize_const is added. It is used to create
Ndb_cond value node from given const item.
2010-08-14 13:11:33 +04:00
Inaam Rana
231a97fde0 Change default for innodb_strict_mode to FALSE.
Note that this was originally pushed by Calvin but the was later
reverted by mistake.

bug#54702
2010-08-13 15:07:22 -04:00
Inaam Rana
0daa01fed0 Undo changes to innodb_strict_mode that went in by mistake in r3149 2010-08-13 12:14:59 -04:00
Konstantin Osipov
2086e1664f Bug#52117 "Pending FLUSH TALBES <list> aborts transactions unnecessarily"
The bug was fixed by the patch for Bug 52044.
Add a test case.
2010-08-13 18:14:36 +04:00
Georgi Kodinov
b6e3adf10f Bug #55565: debug assertion when ordering by expressions with user
variable assignments

The assert() that is firing is checking if expressions that can't be
null return a NULL when evaluated.
MAKEDATE() function can return NULL if the second argument is 
less then or equal to 0. Thus its nullability depends not only on 
the nullability of its arguments but also on their values.
Fixed by (overoptimistically) setting MAKEDATE() to be nullable 
despite the nullability of its arguments.
Test added.
Had to update one test result to reflect the metadata change.
2010-08-13 16:05:46 +03:00
Vasil Dimov
bfca4bb9bf Manually merge a changeset from mysql-5.1-security:
------------------------------------------------------------
  revno: 3475
  revision-id: jimmy.yang@oracle.com-20100804103744-vbpeghipkz6pyc9z
  parent: jimmy.yang@oracle.com-20100804101133-c38qqbm0fkwn9jhc
  committer: Jimmy Yang <jimmy.yang@oracle.com>
  branch nick: mysql-5.1-security
  timestamp: Wed 2010-08-04 03:37:44 -0700
  message:
    Fix bug #54678, InnoDB, TRUNCATE, ALTER, I_S SELECT, crash or deadlock
    
    rb://399 approved by Sunny Bains
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/include/dict0dict.h 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fdict0dict.h
    storage/innodb_plugin/include/dict0dict.ic 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fdict0dict.ic
    storage/innodb_plugin/row/row0mysql.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Frow%2Frow0mysql.c
2010-08-13 15:52:11 +03:00