mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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()
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user