Commit 6fd6ad91 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/my/mysql-5.0


sql/sql_select.cc:
  Auto merged
parents 36947f19 9d5e2e91
......@@ -3138,4 +3138,44 @@ x
x
3
drop procedure bug10961|
DROP PROCEDURE IF EXISTS bug6866|
DROP VIEW IF EXISTS tv|
Warnings:
Note 1051 Unknown table 'test.tv'
DROP TABLE IF EXISTS tt1,tt2,tt3|
Warnings:
Note 1051 Unknown table 'tt1'
Note 1051 Unknown table 'tt2'
Note 1051 Unknown table 'tt3'
CREATE TABLE tt1 (a1 int, a2 int, a3 int, data varchar(10))|
CREATE TABLE tt2 (a2 int, data2 varchar(10))|
CREATE TABLE tt3 (a3 int, data3 varchar(10))|
INSERT INTO tt1 VALUES (1, 1, 4, 'xx')|
INSERT INTO tt2 VALUES (1, 'a')|
INSERT INTO tt2 VALUES (2, 'b')|
INSERT INTO tt2 VALUES (3, 'c')|
INSERT INTO tt3 VALUES (4, 'd')|
INSERT INTO tt3 VALUES (5, 'e')|
INSERT INTO tt3 VALUES (6, 'f')|
CREATE VIEW tv AS
SELECT tt1.*, tt2.data2, tt3.data3
FROM tt1 INNER JOIN tt2 ON tt1.a2 = tt2.a2
LEFT JOIN tt3 ON tt1.a3 = tt3.a3
ORDER BY tt1.a1, tt2.a2, tt3.a3|
CREATE PROCEDURE bug6866 (_a1 int)
BEGIN
SELECT * FROM tv WHERE a1 = _a1;
END|
CALL bug6866(1)|
a1 a2 a3 data data2 data3
1 1 4 xx a d
CALL bug6866(1)|
a1 a2 a3 data data2 data3
1 1 4 xx a d
CALL bug6866(1)|
a1 a2 a3 data data2 data3
1 1 4 xx a d
DROP PROCEDURE bug6866;
DROP VIEW tv|
DROP TABLE tt1, tt2, tt3|
drop table t1,t2;
......@@ -3848,6 +3848,50 @@ call bug10961()|
drop procedure bug10961|
#
# BUG #6866: Second call of a stored procedure using a view with on expressions
#
--disable_warnings
DROP PROCEDURE IF EXISTS bug6866|
--enable_warnings
DROP VIEW IF EXISTS tv|
DROP TABLE IF EXISTS tt1,tt2,tt3|
CREATE TABLE tt1 (a1 int, a2 int, a3 int, data varchar(10))|
CREATE TABLE tt2 (a2 int, data2 varchar(10))|
CREATE TABLE tt3 (a3 int, data3 varchar(10))|
INSERT INTO tt1 VALUES (1, 1, 4, 'xx')|
INSERT INTO tt2 VALUES (1, 'a')|
INSERT INTO tt2 VALUES (2, 'b')|
INSERT INTO tt2 VALUES (3, 'c')|
INSERT INTO tt3 VALUES (4, 'd')|
INSERT INTO tt3 VALUES (5, 'e')|
INSERT INTO tt3 VALUES (6, 'f')|
CREATE VIEW tv AS
SELECT tt1.*, tt2.data2, tt3.data3
FROM tt1 INNER JOIN tt2 ON tt1.a2 = tt2.a2
LEFT JOIN tt3 ON tt1.a3 = tt3.a3
ORDER BY tt1.a1, tt2.a2, tt3.a3|
CREATE PROCEDURE bug6866 (_a1 int)
BEGIN
SELECT * FROM tv WHERE a1 = _a1;
END|
CALL bug6866(1)|
CALL bug6866(1)|
CALL bug6866(1)|
DROP PROCEDURE bug6866;
DROP VIEW tv|
DROP TABLE tt1, tt2, tt3|
#
# BUG#NNNN: New bug synopsis
......
......@@ -30,6 +30,10 @@ rm -f */*.linux
# build tools only
make clean all-local
# Create mysql_version.h which was deleted my previous step
./config.status include/mysql_version.h
(cd dbug; make libdbug.a)
(cd strings; make libmystrings.a)
(cd mysys; make libmysys.a)
......@@ -56,3 +60,5 @@ cp libmysql_r/conf_to_src libmysql_r/conf_to_src.linux
cp sql/gen_lex_hash sql/gen_lex_hash.linux
cp strings/conf_to_src strings/conf_to_src.linux
# Delete mysql_version.h
rm -f include/mysql_version.h
......@@ -22,6 +22,11 @@ rm -rf Makefile.in.bk
# run auto tools
. $path/compile-AUTOTOOLS
# For NetWare there is no comp_err but comp_err.linux
sed -e "s/comp_err/comp_err.linux/g" extra/Makefile.am > extra/Makefile.am.$$
sed -e "s/replace comp_err.linux/replace comp_err/g" extra/Makefile.am.$$ > extra/Makefile.am
rm extra/Makefile.am.$$
# configure
./configure $base_configs $extra_configs
......
......@@ -6,7 +6,7 @@
# the default is "F:/mydev"
export MYDEV="F:/mydev"
export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/fs64/headers;$MYDEV/zlib-1.1.4;$MYDEV"
export MWCNWx86Includes="$MYDEV/libc/include;$MYDEV/fs64/headers;$MYDEV/zlib-1.1.4;$MYDEV/mysql-VERSION/include;$MYDEV"
export MWNWx86Libraries="$MYDEV/libc/imports;$MYDEV/mw/lib;$MYDEV/fs64/imports;$MYDEV/zlib-1.1.4;$MYDEV/openssl;$MYDEV/mysql-VERSION/netware/BUILD"
export MWNWx86LibraryFiles="libcpre.o;libc.imp;netware.imp;mwcrtl.lib;mwcpp.lib;libz.a;neb.imp;zPublics.imp;knetware.imp"
......
......@@ -7384,6 +7384,8 @@ simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top)
}
else
{
if (!(table->prep_on_expr))
table->prep_on_expr= table->on_expr;
used_tables= table->table->map;
if (conds)
not_null_tables= conds->not_null_tables();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment