diff options
author | unknown <monty@mashka.mysql.fi> | 2002-12-11 15:46:39 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-12-11 15:46:39 +0200 |
commit | 934f5cc4662ded62609ce64be15c54d327cc554e (patch) | |
tree | 39c72cd72a11f307f9898185deca1854ccf90c57 /sql/sql_analyse.cc | |
parent | 3c9b877b19bd4eaa4734ea5d699add9ca70a4e53 (diff) | |
download | mariadb-git-934f5cc4662ded62609ce64be15c54d327cc554e.tar.gz |
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.
Diffstat (limited to 'sql/sql_analyse.cc')
-rw-r--r-- | sql/sql_analyse.cc | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 96bbd731882..cbd586b8d30 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -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 |