1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-04 01:23:45 +03:00
Commit Graph

357 Commits

Author SHA1 Message Date
1852090266 Merge mysql-5.5-innodb from bk-internal to my local tree 2010-10-04 13:46:41 +03:00
80961a0a25 Merge Bug#56716 from 5.1 2010-10-04 13:38:05 +03:00
24b1a89712 Merge Bug#56716 from 5.1 2010-10-04 13:38:05 +03:00
678bc90ed8 Bug#56716 InnoDB locks a record gap without locking the table
row_search_for_mysql(): Acquire an intention lock on the table
before locking the first record gap.
2010-10-04 13:05:21 +03:00
64e189c37c merge from 5.1-mtr 2010-10-03 19:37:58 +02:00
1f1c2e22eb Merge mysql-5.5-innodb -> mysql-5.5-bugteam 2010-10-01 16:36:35 +03:00
9ec4724866 Small test fix after 56753 2010-09-30 10:28:22 +02:00
6a0cfa23bd merge 2010-09-29 17:26:32 +03:00
dae793978a merge from 5.1 2010-09-29 12:56:10 +02:00
bc4c38ac43 Temporarily backout the Information Schema System Table Information Schema
interface related change, will put back in once gain approval.
2010-09-16 19:24:32 -07:00
55ad009bed Merge from 5.1-bugteam 2010-09-16 13:00:53 +02:00
083a647e6a merge from 5.5-merge 2010-09-02 16:57:59 +03:00
9b3a3944e4 Merge from mysql-5.1-bugteam to mysql-5.1-security 2010-09-01 17:43:02 -07:00
64b639260c Bug#39932 "create table fails if column for FK is in different
case than in corr index".
      
Server was unable to find existing or explicitly created supporting
index for foreign key if corresponding statement clause used field
names in case different than one used in key specification and created
yet another supporting index.
In cases when name of constraint (and thus name of generated index)
was the same as name of existing/explicitly created index this led
to duplicate key name error.
      
The problem was that unlike all other code Key_part_spec::operator==()
compared field names in case sensitive fashion. As result routines
responsible for getting rid of redundant generated supporting indexes
for foreign key were not working properly for versions of field names
using different cases.

(backported from mysql-trunk)


sql/sql_class.cc:
  Make field name comparison case-insensitive like it is
  in the rest of server.
2010-09-01 19:38:34 +02:00
9ab0759ea4 Auto-merge from mysql-5.5. 2010-08-30 12:36:02 +04:00
0d21bbe387 Merge 5.1-bugteam to 5.5-merge. 2010-08-27 15:33:32 +04:00
d1fb4ba299 Fixed race condition in a test case for BUG#55580. 2010-08-26 15:23:44 +04:00
b4dc600af9 Bug #55656: mysqldump can be slower after bug 39653 fix.
After fix for bug 39653 the shortest available secondary index was used for
full table scan. Primary clustered key was used only if no secondary index
can be used. However, when chosen secondary index includes all fields of the
table being scanned it's better to use primary index since the amount of
data to scan is the same but the primary index is clustered.
Now the find_shortest_key function takes this into account.


mysql-test/suite/innodb/r/innodb_mysql.result:
  Added a test case for the bug#55656.
mysql-test/suite/innodb/t/innodb_mysql.test:
  Added a test case for the bug#55656.
sql/sql_select.cc:
  Bug #55656: mysqldump can be slower after bug #39653 fix.
  The find_shortest_key function now prefers clustered primary key
  if found secondary key includes all fields of the table.
2010-08-26 13:31:04 +04:00
f6f9e3e3ac Auto-merge from mysql-5.5-merge. 2010-08-25 14:22:34 +04:00
c95f7a9816 merge 2010-08-20 16:10:49 +03:00
80e006cc53 merge 2010-08-20 15:08:01 +03:00
cd8060a7ae merge 2010-08-20 13:23:47 +03:00
7d3a9b4cf6 merge 2010-08-20 12:09:17 +03:00
6bea77aefe Bug #55826: create table .. select crashes with when
KILL_BAD_DATA is returned

Two problems discovered with the LEAST()/GREATEST() 
functions:
1. The check for a null value should happen even 
after the second call to val_str() in the args. This is
important because two subsequent calls to the same
Item::val_str() may yield different results.
Fixed by checking for NULL value before dereferencing
the string result.

2. While looping over the arguments and evaluating them 
the loop should stop if there was an error evaluating so far
or the statement was killed. Fixed by checking for error
and bailing out.
2010-08-20 11:52:16 +03:00
f2123f34e3 Merge from mysql-5.5-bugfixing to mysql-5.5-runtime 2010-08-18 13:55:37 +02:00
eb498cce4d Manual merge from mysql-5.5-bugfixing to mysql-5.5-runtime. 2010-08-18 13:29:04 +02:00
d0d8bbed5e 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
ec4209255f Merge mysql-5.5-bugfixing -> mysql-5.5-innodb 2010-08-18 10:14:06 +03:00
612f449598 merge 2010-08-17 15:12:52 +03:00
aed93f8727 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
393aaa4c51 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
adde4bac98 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
790852c0c9 Bug #55580 : segfault in read_view_sees_trx_id
The server was not checking for errors generated during
the execution of Item::val_xxx() methods when copying
data to the group, order, or distinct temp table's row.
Fixed by extending the copy_funcs() to return an error
code and by checking for that error code on the places
copy_funcs() is called. 
Test case added.
2010-08-13 11:07:39 +03:00
944e3814e8 merge from 5.1-bugteam of merge from 5.1-mtr 2010-08-06 13:37:05 +02:00
8d0dc9b58b Part of fix for bug#52044 "FLUSH TABLES WITH READ LOCK and
FLUSH TABLES <list> WITH READ LOCK are incompatible" to
be pushed as separate patch.

Replaced thread state name "Waiting for table", which was
used by threads waiting for a metadata lock or table flush, 
with a set of names which better reflect types of resources
being waited for.

Also replaced "Table lock" thread state name, which was used 
by threads waiting on thr_lock.c table level lock, with more
elaborate "Waiting for table level lock", to make it 
more consistent with other thread state names.

Updated test cases and their results according to these 
changes.

Fixed sys_vars.query_cache_wlock_invalidate_func test to not
to wait for timeout of wait_condition.inc script.

mysql-test/r/query_cache.result:
  Added test coverage for query_cache_wlock_invalidate
  behavior for implicitly locked tables.
mysql-test/suite/sys_vars/r/query_cache_wlock_invalidate_func.result:
  Fixed sys_vars.query_cache_wlock_invalidate_func test to not
  to wait for timeout of wait_condition.inc script. Reverted
  changes to test which introduced timeout and replaced waiting
  condition with a more appropriate one.
  Test coverage for query_cache_wlock_invalidate behavior for
  implicitly locked tables was added to query_cache.test.
mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test:
  Fixed sys_vars.query_cache_wlock_invalidate_func test to not
  to wait for timeout of wait_condition.inc script. Reverted
  changes to test which introduced timeout and replaced waiting
  condition with a more appropriate one.
  Test coverage for query_cache_wlock_invalidate behavior for
  implicitly locked tables was added to query_cache.test.
mysql-test/t/query_cache.test:
  Added test coverage for query_cache_wlock_invalidate
  behavior for implicitly locked tables.
mysys/thr_lock.c:
  Replaced "Table lock" thread state name, which was used by 
  threads waiting on thr_lock.c table level lock, with more
  elaborate "Waiting for table level lock", to make it 
  consistent with thread state names which are used while
  waiting for metadata locks and table flush.
sql/mdl.cc:
  Replaced thread state name "Waiting for table", which was
  used by threads waiting for a metadata lock or table flush, 
  with a set of names which better reflect types of resources
  being waited for. 
  
  To implement this:
  - Adjusted MDL_wait::timed_wait() to take thread state name
    as parameter.
  - Introduced method of MDL_key class which allows to get
    thread state name to be used while waiting for resource
    corresponding to the key and changed code to use it.
    Added array translating namespaces to thread state names
    as part of this change.
sql/mdl.h:
  To implement this:
  - Adjusted MDL_wait::timed_wait() to take thread state name
    as parameter.
  - Introduced method of MDL_key class which allows to get
    thread state name to be used while waiting for resource
    corresponding to the key and changed code to use it.
    Added array translating namespaces to thread state names
    as part of this change.
sql/sql_base.cc:
  Replaced thread state name "Waiting for table", which was
  used by threads waiting for table flush, with a more elaborate
  "Waiting for table flush".
2010-08-06 15:29:37 +04:00
3d0819e2b1 merge from 5.1-mtr 2010-08-06 11:13:52 +02:00
5f18951577 merge from trunk-mtr 2010-08-05 14:53:09 +02:00
09eb23d50b 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
2010-08-05 19:24:34 +10:00
f3f5e04a36 merge from 5.1 2010-08-04 12:19:51 +02:00
4f738e9b7c merge mysql-5.1-bugteam into mysql-5.1-security 2010-08-02 10:50:15 +03:00
84a827018c Fix Bug #55395 INNODB_TRX duplicates columns
rb://408 approved by Sunny Bains
2010-07-26 03:07:36 -07:00
44568b7014 merge from trunk 2010-07-23 15:12:58 +02:00
f43c9eff23 Merge mysql-5.1 -> mysql-5.1-innodb 2010-07-23 12:51:14 +03:00
0aa021396b Fix the failing innodb.innodb_bug54679 test
A change in the default values of some config parameters
caused this test to fail, adjust the test and make it more
robust so it does not fail for the same reason in the future.
2010-07-23 10:37:44 +03:00
5ba3936517 Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(resolving conflicts in mysql-test/suite/rpl/t/rpl_sync-slave.opt and
configure.cmake)
2010-07-21 17:22:29 +03:00
6a4ead973e merge from trunk 2010-07-14 11:28:54 +02:00
24484791a2 manual merge from mysql-5.1-security 2010-07-07 14:18:20 +02:00
223f42b715 Bug #54117 crash in thr_multi_unlock, temporary table
This crash occured after ALTER TABLE was used on a temporary
transactional table locked by LOCK TABLES. Any later attempts to
execute LOCK/UNLOCK TABLES, caused the server to crash.

The reason for the crash was the list of locked tables would
end up having a pointer to a free'd table instance. This happened
because ALTER TABLE deleted the table without also removing the
table reference from the locked tables list.

This patch fixes the problem by making sure ALTER TABLE also
removes the table from the locked tables list.

Test case added to innodb_mysql.test.
2010-07-07 13:55:09 +02:00
19ea597a38 Add innodb_bug53756-master.opt for innodb_bug53756 test. 2010-07-05 19:26:38 -07:00
22f4498cd6 merge 2010-07-05 12:35:24 +03:00