Below is the list of changes that have just been committed into a local
5.1 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2183 06/06/05 06:16:08 monty@stripped +15 -0
After merge fixes
Remove compiler warnings
storage/ndb/include/ndbapi/Ndb.hpp
1.56 06/06/05 06:16:04 monty@stripped +1 -0
Remove compiler warning
storage/csv/ha_tina.cc
1.51 06/06/05 06:16:04 monty@stripped +9 -3
Ensure table maps are restored properly
sql/sql_table.cc
1.343 06/06/05 06:16:04 monty@stripped +3 -2
After merge fix
sql/sql_show.cc
1.345 06/06/05 06:16:04 monty@stripped +4 -3
Remove compiler warning
sql/sql_select.cc
1.411 06/06/05 06:16:04 monty@stripped +4 -1
Simple optimization
sql/sql_base.cc
1.328 06/06/05 06:16:03 monty@stripped +7 -7
After merge fix
Always set *leaves in setup_tables_and_check_access() (assume argument is always given).
sql/partition_info.cc
1.15 06/06/05 06:16:03 monty@stripped +5 -5
After merge fix
Fixed memory reference overrun for some wrong partition definitions
sql/mysqld.cc
1.551 06/06/05 06:16:03 monty@stripped +1 -1
Remove comiler warning
sql/handler.cc
1.238 06/06/05 06:16:03 monty@stripped +1 -0
After merge fix
sql/ha_partition.cc
1.55 06/06/05 06:16:03 monty@stripped +7 -5
Don't divide with 0 when checking current auto_increment value
sql/event_scheduler.cc
1.6 06/06/05 06:16:03 monty@stripped +7 -1
Remove compiler warnings
mysql-test/t/mysqldump.test
1.101 06/06/05 06:16:03 monty@stripped +1 -1
Use --defaults-file instead of --defaults-extra-file to avoid reading my.cnf files
mysql-test/t/mysqlcheck.test
1.4 06/06/05 06:16:03 monty@stripped +4 -0
Drop client_test_db if mysql_client_test fails
mysql-test/r/mysqlcheck.result
1.8 06/06/05 06:16:03 monty@stripped +1 -0
Drop client_test_db if mysql_client_test fails
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
1.30 06/06/05 06:16:03 monty@stripped +1 -1
Fixed regex to get rid of xid= in output
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: narttu.mysql.fi
# Root: /home/my/mysql-5.1
--- 1.237/sql/handler.cc 2006-06-04 21:05:17 +03:00
+++ 1.238/sql/handler.cc 2006-06-05 06:16:03 +03:00
@@ -143,6 +143,7 @@
static handler *create_default(TABLE_SHARE *table, MEM_ROOT *mem_root)
{
+ handlerton *hton=ha_resolve_by_legacy_type(current_thd, DB_TYPE_DEFAULT);
return (hton && hton->create) ? hton->create(table, mem_root) : NULL;
}
--- 1.550/sql/mysqld.cc 2006-06-04 19:23:40 +03:00
+++ 1.551/sql/mysqld.cc 2006-06-05 06:16:03 +03:00
@@ -7011,7 +7011,7 @@
character_set_filesystem_name= (char*) "binary";
/* Set default values for some option variables */
- default_storage_engine_str="MyISAM";
+ default_storage_engine_str= (char*) "MyISAM";
global_system_variables.table_type= &myisam_hton;
global_system_variables.tx_isolation= ISO_REPEATABLE_READ;
global_system_variables.select_limit= (ulonglong) HA_POS_ERROR;
--- 1.327/sql/sql_base.cc 2006-06-04 19:23:41 +03:00
+++ 1.328/sql/sql_base.cc 2006-06-05 06:16:03 +03:00
@@ -5433,27 +5433,27 @@
Name_resolution_context *context,
List<TABLE_LIST> *from_clause,
TABLE_LIST *tables,
- Item **conds, TABLE_LIST **leaves,
+ TABLE_LIST **leaves,
bool select_insert,
ulong want_access)
{
- TABLE_LIST *leaves_tmp = NULL;
+ TABLE_LIST *leaves_tmp= NULL;
- if (setup_tables (thd, context, from_clause, tables, conds,
- &leaves_tmp, select_insert))
+ if (setup_tables(thd, context, from_clause, tables,
+ &leaves_tmp, select_insert))
return TRUE;
- if (leaves)
- *leaves = leaves_tmp;
+ *leaves= leaves_tmp;
for (; leaves_tmp; leaves_tmp= leaves_tmp->next_leaf)
+ {
if (leaves_tmp->belong_to_view &&
check_one_table_access(thd, want_access, leaves_tmp))
{
tables->hide_view_error(thd);
return TRUE;
}
-
+ }
return FALSE;
}
--- 1.410/sql/sql_select.cc 2006-06-04 21:05:17 +03:00
+++ 1.411/sql/sql_select.cc 2006-06-05 06:16:04 +03:00
@@ -2570,7 +2570,10 @@
bool is_const=1;
for (uint i=0; i<num_values; i++)
- is_const&= value[i]->const_item();
+ {
+ if (!(is_const&= value[i]->const_item()))
+ break;
+ }
if (is_const)
stat[0].const_keys.merge(possible_keys);
/*
--- 1.344/sql/sql_show.cc 2006-06-04 21:05:17 +03:00
+++ 1.345/sql/sql_show.cc 2006-06-05 06:16:04 +03:00
@@ -3119,9 +3119,10 @@
if (!(wild && wild[0] &&
wild_case_compare(scs, plugin->name.str,wild)))
{
- LEX_STRING state[2]={{STRING_WITH_LEN("ENABLED")},
- {STRING_WITH_LEN("DISABLED")}};
- LEX_STRING yesno[2]={{STRING_WITH_LEN("NO")}, {STRING_WITH_LEN("YES")}};
+ LEX_STRING state[2]= {{(char*) STRING_WITH_LEN("ENABLED")},
+ {(char*) STRING_WITH_LEN("DISABLED")}};
+ LEX_STRING yesno[2]= {{(char*) STRING_WITH_LEN("NO")},
+ {(char*) STRING_WITH_LEN("YES")}};
LEX_STRING *tmp;
restore_record(table, s->default_values);
--- 1.342/sql/sql_table.cc 2006-06-04 21:05:17 +03:00
+++ 1.343/sql/sql_table.cc 2006-06-05 06:16:04 +03:00
@@ -6247,9 +6247,10 @@
{
const char *err_msg= ER(ER_DUP_ENTRY);
if (key_nr == 0 &&
- (to->key_info[0].key_part[0].field->flags & AUTO_INCREMENT_FLAG))
+ (to->key_info[0].key_part[0].field->flags &
+ AUTO_INCREMENT_FLAG))
err_msg= ER(ER_DUP_ENTRY_AUTOINCREMENT_CASE);
- to->file->print_keydupp_error(key_nr, err_msg);
+ to->file->print_keydup_error(key_nr, err_msg);
break;
}
}
--- 1.5/sql/event_scheduler.cc 2006-05-29 16:16:01 +03:00
+++ 1.6/sql/event_scheduler.cc 2006-06-05 06:16:03 +03:00
@@ -873,12 +873,18 @@
*/
enum Event_scheduler::enum_error_code
-Event_scheduler::replace_event(THD *thd, Event_timed *et, LEX_STRING *new_schema,
+Event_scheduler::replace_event(THD *thd, Event_timed *et,
+ LEX_STRING *new_schema,
LEX_STRING *new_name)
{
enum enum_error_code res;
Event_timed *et_old, *et_new= NULL;
LEX_STRING old_schema, old_name;
+
+ LINT_INIT(old_schema.str);
+ LINT_INIT(old_schema.length);
+ LINT_INIT(old_name.str);
+ LINT_INIT(old_name.length);
DBUG_ENTER("Event_scheduler::replace_event");
DBUG_PRINT("enter", ("thd=%p et=%p et=[%s.%s] lock=%p",
--- 1.50/storage/csv/ha_tina.cc 2006-06-04 21:05:17 +03:00
+++ 1.51/storage/csv/ha_tina.cc 2006-06-05 06:16:04 +03:00
@@ -497,7 +497,7 @@
String attribute(attribute_buffer, sizeof(attribute_buffer),
&my_charset_bin);
- my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
+ my_bitmap_map *org_bitmap= dbug_tmp_use_all_columns(table, table->read_set);
buffer.length(0);
for (Field **field=table->field ; *field ; field++)
{
@@ -558,7 +558,7 @@
buffer.append('\n');
//buffer.replace(buffer.length(), 0, "\n", 1);
- dbug_tmp_restore_column_map(table->read_set, old_map);
+ dbug_tmp_restore_column_map(table->read_set, org_bitmap);
return (buffer.length());
}
@@ -634,7 +634,10 @@
if (*mapped_ptr == '"')
mapped_ptr++; // Increment past the first quote
else
+ {
+ dbug_tmp_restore_column_map(table->write_set, org_bitmap);
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
+ }
for(;mapped_ptr != end_ptr; mapped_ptr++)
{
// Need to convert line feeds!
@@ -667,7 +670,10 @@
we are working with a damaged file.
*/
if (mapped_ptr == end_ptr -1)
+ {
+ dbug_tmp_restore_column_map(table->write_set, org_bitmap);
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
+ }
buffer.append(*mapped_ptr);
}
}
@@ -677,7 +683,7 @@
next_position= (end_ptr - share->mapped_file)+eoln_len;
/* Maybe use \N for null? */
memset(buf, 0, table->s->null_bytes); /* We do not implement nulls! */
- tmp_restore_column_map(table->write_set, org_bitmap);
+ dbug_tmp_restore_column_map(table->write_set, org_bitmap);
DBUG_RETURN(0);
}
--- 1.7/mysql-test/r/mysqlcheck.result 2006-03-01 14:31:12 +02:00
+++ 1.8/mysql-test/r/mysqlcheck.result 2006-06-05 06:16:03 +03:00
@@ -1,3 +1,4 @@
+drop database if exists client_test_db;
DROP SCHEMA test;
CREATE SCHEMA test;
cluster.binlog_index OK
--- 1.3/mysql-test/t/mysqlcheck.test 2006-02-24 23:20:42 +02:00
+++ 1.4/mysql-test/t/mysqlcheck.test 2006-06-05 06:16:03 +03:00
@@ -5,6 +5,10 @@
# depends on the presence of the log tables (which are CSV-based).
--source include/have_csv.inc
+--disable_warnings
+drop database if exists client_test_db;
+--enable_warnings
+
DROP SCHEMA test;
CREATE SCHEMA test;
#
--- 1.29/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2006-06-04 18:56:56 +03:00
+++ 1.30/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2006-06-05 06:16:03 +03:00
@@ -324,7 +324,7 @@
ROLLBACK;
SELECT * from t2;
DROP TABLE t1,t2;
---replace_regex /table_id: [0-9]+/table_id: #/
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
show binlog events from 102;
# Test for BUG#16559 (ROLLBACK should always have a zero error code in
--- 1.55/storage/ndb/include/ndbapi/Ndb.hpp 2006-05-31 15:38:06 +03:00
+++ 1.56/storage/ndb/include/ndbapi/Ndb.hpp 2006-06-05 06:16:04 +03:00
@@ -1478,6 +1478,7 @@
* @return 0 or -1 on error, and tupleId in out parameter
*/
struct TupleIdRange {
+ TupleIdRange() {}
Uint64 m_first_tuple_id;
Uint64 m_last_tuple_id;
void reset() {
--- 1.54/sql/ha_partition.cc 2006-06-04 21:05:17 +03:00
+++ 1.55/sql/ha_partition.cc 2006-06-05 06:16:03 +03:00
@@ -4146,7 +4146,8 @@
ulonglong nb_reserved_values;
DBUG_PRINT("info", ("HA_STATUS_AUTO"));
/* we don't want to reserve any values, it's pure information */
- get_auto_increment(0, 0, 0, &stats.auto_increment_value, &nb_reserved_values);
+ get_auto_increment(0, 0, 0, &stats.auto_increment_value,
+ &nb_reserved_values);
release_auto_increment();
}
if (flag & HA_STATUS_VARIABLE)
@@ -4188,7 +4189,7 @@
stats.deleted+= file->stats.deleted;
stats.data_file_length+= file->stats.data_file_length;
stats.index_file_length+= file->stats.index_file_length;
- stats.delete_length+= file->delete_length;
+ stats.delete_length+= file->stats.delete_length;
if (file->stats.check_time > stats.check_time)
stats.check_time= file->stats.check_time;
}
@@ -5282,7 +5283,7 @@
ulonglong *nb_reserved_values)
{
ulonglong first_value_part, last_value_part, nb_reserved_values_part,
- last_value;
+ last_value= ~ (ulonglong) 0;
handler **pos, **end;
DBUG_ENTER("ha_partition::get_auto_increment");
@@ -5308,8 +5309,9 @@
{
*first_value= ~(ulonglong)(0);
}
- *nb_reserved_values= (last_value == ULONGLONG_MAX) ?
- ULONGLONG_MAX : ((last_value - *first_value) / increment);
+ if (increment) // If not check for values
+ *nb_reserved_values= (last_value == ULONGLONG_MAX) ?
+ ULONGLONG_MAX : ((last_value - *first_value) / increment);
DBUG_VOID_RETURN;
}
--- 1.100/mysql-test/t/mysqldump.test 2006-05-30 16:07:39 +03:00
+++ 1.101/mysql-test/t/mysqldump.test 2006-06-05 06:16:03 +03:00
@@ -610,7 +610,7 @@
# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
#
---exec $MYSQL_MY_PRINT_DEFAULTS --defaults-extra-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
+--exec $MYSQL_MY_PRINT_DEFAULTS --defaults-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
#
--- 1.14/sql/partition_info.cc 2006-06-03 19:54:55 +03:00
+++ 1.15/sql/partition_info.cc 2006-06-05 06:16:03 +03:00
@@ -635,8 +635,8 @@
&list_part_cmp);
not_first= FALSE;
- i= prev_value= 0; //prev_value initialised to quiet compiler
- do
+ prev_value= 0; // prev_value initialised to quiet compiler
+ for (i= 0; i < no_list_values ; i++)
{
curr_value= list_array[i].list_value;
if (likely(!not_first || prev_value != curr_value))
@@ -649,7 +649,7 @@
my_error(ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR, MYF(0));
goto end;
}
- } while (++i < no_list_values);
+ }
result= FALSE;
end:
DBUG_RETURN(result);
@@ -689,10 +689,10 @@
DBUG_ENTER("partition_info::check_partition_info");
if (part_type != HASH_PARTITION || !list_of_part_fields)
- part_expr->walk(&Item::check_partition_func_processor,
+ part_expr->walk(&Item::check_partition_func_processor, 0,
(byte*)(&part_expression_ok));
if (is_sub_partitioned() && !list_of_subpart_fields)
- subpart_expr->walk(&Item::check_partition_func_processor,
+ subpart_expr->walk(&Item::check_partition_func_processor, 0,
(byte*)(&part_expression_ok));
if (!part_expression_ok)
{
| Thread |
|---|
| • bk commit into 5.1 tree (monty:1.2183) | monty | 5 Jun |