3590 Nirbhay Choubey 2011-10-24 [merge]
Local merge from mysql-5.1.
modified:
cmd-line-utils/libedit/README
cmd-line-utils/libedit/chared.c
3589 Dmitry Lenev 2011-10-23
Fix for bug #13116518 - "OPEN_TABLES() SHOULD NOT ALLOCATE AND FREE
NEW_FRM_MEM WITHOUT NEEDING TO".
During the process of opening tables for a statement, we allocated
memory which was used only during view loading even in cases when the
statement didn't use any views. Such an unnecessary allocation (and
corresponding freeing) might have caused significant performance
overhead in some workloads. For example, it caused up to 15% slowdown
in a simple stored routine calculating Fibonacci's numbers.
This memory was pre-allocated as part of "new_frm_mem" MEM_ROOT
initialization at the beginning of open_tables().
This patch addresses this issue by turning off memory pre-allocation
during initialization for this MEM_ROOT. Now, memory on this root
will be allocated only at the point when the first .FRM for a view is
opened.
The patch doesn't contain a test case since it is hard to test the
performance improvements or the absence of memory allocation in our
test framework.
modified:
sql/sql_base.cc
=== modified file 'cmd-line-utils/libedit/README'
--- a/cmd-line-utils/libedit/README 2011-10-13 19:33:25 +0000
+++ b/cmd-line-utils/libedit/README 2011-10-24 08:05:28 +0000
@@ -42,7 +42,7 @@ then merge remaining bits by hand. All
marked with XXXMYSQL to make them easier to identify and merge. To generate
a 'clean' diff against upstream you can use the above commands but use
- cvs co -D "2011/10/04 15:27:04" [..]
+ cvs co -D "2011/10/23 17:37:55" [..]
to fetch the baseline of most recent merge.
=== modified file 'cmd-line-utils/libedit/chared.c'
--- a/cmd-line-utils/libedit/chared.c 2011-10-13 19:33:25 +0000
+++ b/cmd-line-utils/libedit/chared.c 2011-10-24 08:05:28 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chared.c,v 1.35 2011/08/16 16:25:15 christos Exp $ */
+/* $NetBSD: chared.c,v 1.36 2011/10/23 17:37:55 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -200,7 +200,7 @@ c_delbefore1(EditLine *el)
protected int
ce__isword(Int p)
{
- return Isalnum(p || Strchr(STR("*?_-.[]~="), p) != NULL);
+ return Isalnum(p) || Strchr(STR("*?_-.[]~="), p) != NULL;
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.5 branch (nirbhay.choubey:3589 to 3590) | Nirbhay Choubey | 24 Oct |