diff options
author | monty@mashka.mysql.fi <> | 2002-12-11 15:46:39 +0200 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2002-12-11 15:46:39 +0200 |
commit | 5022e56cba7936e17cd5deefc570bcef0ddb0988 (patch) | |
tree | 39c72cd72a11f307f9898185deca1854ccf90c57 /sql/sql_analyse.cc | |
parent | 146814f2eaac6b9a43da72a19456c50eb297c9cb (diff) | |
download | mariadb-git-5022e56cba7936e17cd5deefc570bcef0ddb0988.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;
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 |