Commit 8282ed39 authored by Sergey Petrunya's avatar Sergey Petrunya

MySQL 5.1 -> MariaDB 5.1 merge

- Post-merge fixes
parent e2d6412d
This is a release of MariaDB, a branch of MySQL. This is a release of MySQL, a dual-license SQL database server.
MySQL is brought to you by the MySQL team at Sun Microsystems, Inc.
MariaDB is a drop-in replacement of MySQL, with more features, less
bugs and better performance.
MariaDB is brought to you by many of the original developers of MySQL,
that now work for Monty Program Ab, and by many people in the
community.
MySQL, which is the base of MariaDB, is brought to you by Sun.
License information can be found in these files: License information can be found in these files:
- For GPL (free) distributions, see the COPYING file and - For GPL (free) distributions, see the COPYING file and
the EXCEPTIONS-CLIENT file. the EXCEPTIONS-CLIENT file.
- For commercial distributions, see the LICENSE.mysql file.
A description of the MariaDB project can be found at: GPLv2 Disclaimer
http://askmonty.org/wiki/index.php/MariaDB For the avoidance of doubt, except that if any license choice
other than GPL or LGPL is available it will apply instead, Sun
The differences between MariaDB and MySQL can be found at: elects to use only the General Public License version 2 (GPLv2)
http://askmonty.org/wiki/index.php/MariaDB_versus_MySQL at this time for any software where a choice of GPL license versions
is made available with the language indicating that GPLv2 or any
later version may be used, or where a choice of which version of
the GPL is applied is otherwise unspecified.
Documentation about MySQL can be found at: For further information about MySQL or additional documentation, see:
http://dev.mysql.com/doc - The latest information about MySQL: http://www.mysql.com
- The current MySQL documentation: http://dev.mysql.com/doc
For further information about MySQL documentation, see:
- The current MySQL documentation:
Some manual sections of special interest: Some manual sections of special interest:
- If you are migrating from an older version of MySQL, please read the
"Upgrading from..." section first!
- To see what MySQL can do, take a look at the features section.
- For installation instructions, see the Installing and Upgrading
chapter.
- For the new features/bugfix history, see the Change History appendix.
- For the currently known bugs/misfeatures (known errors) see the
Problems
and Common Errors appendix.
- For a list of developers and other contributors, see the Credits - For a list of developers and other contributors, see the Credits
appendix. appendix.
A local copy of the MySQL Reference Manual can be found in the Docs A local copy of the MySQL Reference Manual can be found in the Docs
directory in GNU Info format. You can also browse the manual online or directory in GNU Info format. You can also browse the manual online or
download it in any of several formats from download it in any of several formats at the URL given earlier in this
http://dev.mysql.com/doc file.
************************************************************ ************************************************************
IMPORTANT: IMPORTANT:
Bug or error reports regarding MariaDB should be sent to Bug or error reports should be sent to http://bugs.mysql.com.
https://bugs.launchpad.net/maria
Bugs in the MySQL code can also be sent to http://bugs.mysql.com
*************************************************************************** ***************************************************************************
%%The following software may be included in this product: %%The following software may be included in this product:
......
...@@ -1746,7 +1746,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1746,7 +1746,7 @@ id select_type table type possible_keys key key_len ref rows Extra
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (c1 DECIMAL(12,2), c2 DECIMAL(12,2), c3 DECIMAL(12,2), CREATE TABLE t1 (c1 DECIMAL(12,2), c2 DECIMAL(12,2), c3 DECIMAL(12,2),
KEY (c3), KEY (c2, c3)) KEY (c3), KEY (c2, c3))
ENGINE=InnoDB; ENGINE=innodb;
INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2); INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
SELECT 1 FROM (SELECT COUNT(DISTINCT c1) SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x; FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
......
...@@ -318,6 +318,7 @@ maria_repair_threads 1 ...@@ -318,6 +318,7 @@ maria_repair_threads 1
maria_sort_buffer_size 8388608 maria_sort_buffer_size 8388608
maria_stats_method nulls_unequal maria_stats_method nulls_unequal
maria_sync_log_dir NEWFILE maria_sync_log_dir NEWFILE
maria_used_for_temp_tables ON
show status like 'maria%'; show status like 'maria%';
Variable_name Value Variable_name Value
Maria_pagecache_blocks_not_flushed # Maria_pagecache_blocks_not_flushed #
......
...@@ -63,7 +63,7 @@ static const LEX_STRING sys_table_aliases[]= ...@@ -63,7 +63,7 @@ static const LEX_STRING sys_table_aliases[]=
const char *ha_row_type[] = { const char *ha_row_type[] = {
"", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT",
/* Reserved to be "PAGE" in future versions */ "?", "PAGE",
"?","?","?" "?","?","?"
}; };
......
...@@ -2243,7 +2243,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, ...@@ -2243,7 +2243,7 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
KEY *key_info; KEY *key_info;
PARAM param; PARAM param;
if (check_stack_overrun(thd, 2*STACK_MIN_SIZE, buff)) if (check_stack_overrun(thd, 2*STACK_MIN_SIZE + sizeof(PARAM), buff))
DBUG_RETURN(0); // Fatal error flag is set DBUG_RETURN(0); // Fatal error flag is set
/* set up parameter that is passed to all functions */ /* set up parameter that is passed to all functions */
...@@ -3760,9 +3760,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge, ...@@ -3760,9 +3760,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick(PARAM *param, SEL_IMERGE *imerge,
DBUG_PRINT("info", ("index_merge scans cost %g", imerge_cost)); DBUG_PRINT("info", ("index_merge scans cost %g", imerge_cost));
if (imerge_too_expensive || (imerge_cost > read_time) || if (imerge_too_expensive || (imerge_cost > read_time) ||
((non_cpk_scan_records+cpk_scan_records >= ((non_cpk_scan_records+cpk_scan_records >= param->table->file->stats.records) &&
param->table->file->stats.records) && read_time != DBL_MAX))
read_time != DBL_MAX))
{ {
/* /*
Bail out if it is obvious that both index_merge and ROR-union will be Bail out if it is obvious that both index_merge and ROR-union will be
...@@ -4839,11 +4838,11 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree, ...@@ -4839,11 +4838,11 @@ static TRP_RANGE *get_key_scans_params(PARAM *param, SEL_TREE *tree,
{ {
int idx; int idx;
SEL_ARG **key,**end, **key_to_read= NULL; SEL_ARG **key,**end, **key_to_read= NULL;
ha_rows best_records; ha_rows UNINIT_VAR(best_records); /* protected by key_to_read */
TRP_RANGE* read_plan= NULL; TRP_RANGE* read_plan= NULL;
bool pk_is_clustered= param->table->file->primary_key_is_clustered(); bool pk_is_clustered= param->table->file->primary_key_is_clustered();
DBUG_ENTER("get_key_scans_params"); DBUG_ENTER("get_key_scans_params");
LINT_INIT(best_records); /* protected by key_to_read */
/* /*
Note that there may be trees that have type SEL_TREE::KEY but contain no Note that there may be trees that have type SEL_TREE::KEY but contain no
key reads at all, e.g. tree for expression "key1 is not null" where key1 key reads at all, e.g. tree for expression "key1 is not null" where key1
...@@ -6440,13 +6439,6 @@ key_and(RANGE_OPT_PARAM *param, SEL_ARG *key1, SEL_ARG *key2, uint clone_flag) ...@@ -6440,13 +6439,6 @@ key_and(RANGE_OPT_PARAM *param, SEL_ARG *key1, SEL_ARG *key2, uint clone_flag)
return 0; // Can't optimize this return 0; // Can't optimize this
} }
if ((key1->min_flag | key2->min_flag) & GEOM_FLAG)
{
key1->free_tree();
key2->free_tree();
return 0; // Can't optimize this
}
key1->use_count--; key1->use_count--;
key2->use_count--; key2->use_count--;
SEL_ARG *e1=key1->first(), *e2=key2->first(), *new_tree=0; SEL_ARG *e1=key1->first(), *e2=key2->first(), *new_tree=0;
...@@ -6797,9 +6789,7 @@ static bool eq_tree(SEL_ARG* a,SEL_ARG *b) ...@@ -6797,9 +6789,7 @@ static bool eq_tree(SEL_ARG* a,SEL_ARG *b)
SEL_ARG * SEL_ARG *
SEL_ARG::insert(SEL_ARG *key) SEL_ARG::insert(SEL_ARG *key)
{ {
SEL_ARG *element,**par,*last_element; SEL_ARG *element,**UNINIT_VAR(par),*UNINIT_VAR(last_element);
LINT_INIT(par);
LINT_INIT(last_element);
for (element= this; element != &null_element ; ) for (element= this; element != &null_element ; )
{ {
......
...@@ -5951,6 +5951,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table, ...@@ -5951,6 +5951,8 @@ mysql_prepare_alter_table(THD *thd, TABLE *table,
} }
if (!(used_fields & HA_CREATE_USED_KEY_BLOCK_SIZE)) if (!(used_fields & HA_CREATE_USED_KEY_BLOCK_SIZE))
create_info->key_block_size= table->s->key_block_size; create_info->key_block_size= table->s->key_block_size;
if (!(used_fields & HA_CREATE_USED_TRANSACTIONAL))
create_info->transactional= table->s->transactional;
if (!create_info->tablespace && create_info->storage_media != HA_SM_MEMORY) if (!create_info->tablespace && create_info->storage_media != HA_SM_MEMORY)
{ {
......
...@@ -2491,11 +2491,8 @@ File create_frm(THD *thd, const char *name, const char *db, ...@@ -2491,11 +2491,8 @@ File create_frm(THD *thd, const char *name, const char *db,
int4store(fileinfo+34,create_info->avg_row_length); int4store(fileinfo+34,create_info->avg_row_length);
fileinfo[38]= (create_info->default_table_charset ? fileinfo[38]= (create_info->default_table_charset ?
create_info->default_table_charset->number : 0); create_info->default_table_charset->number : 0);
/* fileinfo[39]= (uchar) ((uint) create_info->transactional |
In future versions, we will store in fileinfo[39] the values of the ((uint) create_info->page_checksum << 2));
TRANSACTIONAL and PAGE_CHECKSUM clauses of CREATE TABLE.
*/
fileinfo[39]= 0;
fileinfo[40]= (uchar) create_info->row_type; fileinfo[40]= (uchar) create_info->row_type;
/* Next few bytes where for RAID support */ /* Next few bytes where for RAID support */
fileinfo[41]= 0; fileinfo[41]= 0;
......
...@@ -9470,7 +9470,7 @@ ha_innobase::check_if_incompatible_data( ...@@ -9470,7 +9470,7 @@ ha_innobase::check_if_incompatible_data(
There is no mechanism for updating InnoDB foreign key definitions. */ There is no mechanism for updating InnoDB foreign key definitions. */
if (foreign_key_column_is_being_renamed(prebuilt, table)) { if (foreign_key_column_is_being_renamed(prebuilt, table)) {
return(COMPATIBLE_DATA_NO); DBUG_RETURN(COMPATIBLE_DATA_NO);
} }
/* Check that row format didn't change */ /* Check that row format didn't change */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment