mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Ensure that BEGIN / COMMIT is handled properly if slave dies
Added syntax support for CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1; Docs/internals.texi: Update binary protocol description innobase/include/db0err.h: Merge from 3.23 mysql-test/r/insert.result: Updated test result from 3.23 sql/log.cc: Fixed bug in replication and log rotation sql/log_event.cc: Ensure that BEGIN / COMMIT is handled properly if slave dies sql/slave.cc: Fixed bug in replication and log rotation sql/slave.h: Ensure that BEGIN / COMMIT is handled properly if slave dies sql/sql_analyse.cc: Moved usage of res before res is destroyed (by bzero(&s...)) sql/sql_yacc.yy: Added syntax support for CREATE TABLE foo (a char CHARACTER SET latin1) CHARSET=latin1; To be able to read MySQL 4.1 dump files.
This commit is contained in:
@ -310,30 +310,6 @@ void field_str::add()
|
||||
was_maybe_zerofill = num_info.maybe_zerofill;
|
||||
}
|
||||
|
||||
if (room_in_tree)
|
||||
{
|
||||
if (res != &s)
|
||||
s.copy(*res);
|
||||
if (!tree_search(&tree, (void*) &s)) // If not in tree
|
||||
{
|
||||
s.copy(); // slow, when SAFE_MALLOC is in use
|
||||
if (!tree_insert(&tree, (void*) &s, 0))
|
||||
{
|
||||
room_in_tree = 0; // Remove tree, out of RAM ?
|
||||
delete_tree(&tree);
|
||||
}
|
||||
else
|
||||
{
|
||||
bzero((char*) &s, sizeof(s)); // Let tree handle free of this
|
||||
if ((treemem += length) > pc->max_treemem)
|
||||
{
|
||||
room_in_tree = 0; // Remove tree, too big tree
|
||||
delete_tree(&tree);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
found = 1;
|
||||
@ -364,6 +340,31 @@ void field_str::add()
|
||||
max_arg.copy(*res);
|
||||
}
|
||||
}
|
||||
|
||||
if (room_in_tree)
|
||||
{
|
||||
if (res != &s)
|
||||
s.copy(*res);
|
||||
if (!tree_search(&tree, (void*) &s)) // If not in tree
|
||||
{
|
||||
s.copy(); // slow, when SAFE_MALLOC is in use
|
||||
if (!tree_insert(&tree, (void*) &s, 0))
|
||||
{
|
||||
room_in_tree = 0; // Remove tree, out of RAM ?
|
||||
delete_tree(&tree);
|
||||
}
|
||||
else
|
||||
{
|
||||
bzero((char*) &s, sizeof(s)); // Let tree handle free of this
|
||||
if ((treemem += length) > pc->max_treemem)
|
||||
{
|
||||
room_in_tree = 0; // Remove tree, too big tree
|
||||
delete_tree(&tree);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((num_info.zerofill && (max_length != min_length)) ||
|
||||
(was_zero_fill && (max_length != min_length)))
|
||||
can_be_still_num = 0; // zerofilled numbers must be of same length
|
||||
|
Reference in New Issue
Block a user