diff options
author | unknown <monty@mashka.mysql.fi> | 2003-09-11 19:06:23 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-09-11 19:06:23 +0300 |
commit | dd0d199ebeab47facb4d01269cda97c258491c22 (patch) | |
tree | ba442d57a65bd55a0d0fec02aa6abeae237a568b /sql/sql_union.cc | |
parent | c9d1bdfac3956f5b32e338e620bd5698439bb43c (diff) | |
download | mariadb-git-dd0d199ebeab47facb4d01269cda97c258491c22.tar.gz |
After merge fixes.
Note that mix_innodb_myisam_binlog and union fails after this patch (Will be fixed shortly by maintaners of this code)
client/mysql.cc:
After merge fix
include/mysql.h:
Some additions to MYSQL_BIND for cleaner prepared statement code
libmysql/libmysql.c:
mysql_prepare_result -> mysql_get_metadata()
Added test for offset overflow when using mysql_fetch_column()
Cleaned up mysql_fetch_column()
Optimized fetch_result() usage
mysql-test/r/func_group.result:
Updated results after merge
mysql-test/r/func_test.result:
Updated results after merge
mysql-test/r/grant.result:
Updated results after merge
mysql-test/r/loaddata.result:
Updated results after merge
mysql-test/r/lowercase_table.result:
Updated results after merge
mysql-test/r/mix_innodb_myisam_binlog.result:
Updated results after merge (note that this is still not correct; Need patch to mysqld to fix this properly)
mysql-test/r/myisam.result:
Updated results after merge
mysql-test/r/range.result:
Updated results after merge
mysql-test/r/rpl_loaddata.result:
Updated results after merge
mysql-test/r/rpl_loaddata_rule_m.result:
Updated results after merge
mysql-test/r/rpl_loaddata_rule_s.result:
Updated results after merge
mysql-test/r/rpl_log.result:
Updated results after merge
mysql-test/r/union.result:
Updated results after merge
mysql-test/t/lowercase_table.test:
Update after merge
mysql-test/t/myisam.test:
Update after merge
mysql-test/t/union.test:
Update after merge
sql-bench/compare-results.sh:
Fix for now output format
sql/field.h:
Added is_null_in_record() to make ha_innodb.cc code more general
sql/ha_innodb.cc:
Removed some functions that uses inernal (private) MySQL information
sql/item_cmpfunc.cc:
After merge fix
sql/log_event.cc:
After merge fix; (Some code should be checked by Guilhem)
sql/opt_range.cc:
Simple optimzation and after merge fixes
sql/slave.cc:
After merge fix
sql/sql_acl.cc:
After merge fix + code cleanup
sql/sql_select.cc:
After merge fix
sql/sql_show.cc:
After merge fix
sql/sql_table.cc:
After merge fix
Cleanup of mysql_checksum_table()
sql/sql_union.cc:
After merge fixes.
Note that after this the union test still fails; Will be fixed shortly...
tests/client_test.c:
mysql_prepare_result() -> mysql_get_metadata()
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 7146630d132..381311b4975 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -262,23 +262,8 @@ int st_select_lex_unit::exec() res= sl->join->reinit(); else { - /* Don't use offset for the last union if there is no braces */ - if (sl != lex_sl) - { - offset_limit_cnt= sl->offset_limit; - select_limit_cnt= sl->select_limit+sl->offset_limit; - } - else - { - offset_limit_cnt= 0; - /* - We can't use LIMIT at this stage if we are using ORDER BY for the - whole query - */ - select_limit_cnt= HA_POS_ERROR; - if (! sl->order_list.first) - select_limit_cnt= sl->select_limit+sl->offset_limit; - } + offset_limit_cnt= sl->offset_limit; + select_limit_cnt= sl->select_limit+sl->offset_limit; if (select_limit_cnt < sl->select_limit) select_limit_cnt= HA_POS_ERROR; // no limit @@ -297,10 +282,10 @@ int st_select_lex_unit::exec() sl->options|= found_rows_for_union; } - /* - As far as union share table space we should reassign table map, - which can be spoiled by 'prepare' of JOIN of other UNION parts - if it use same tables + /* + As far as union share table space we should reassign table map, + which can be spoiled by 'prepare' of JOIN of other UNION parts + if it use same tables */ uint tablenr=0; for (TABLE_LIST *table_list= (TABLE_LIST*) sl->table_list.first; |