summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-06-07 14:11:36 +0400
committerkonstantin@mysql.com <>2005-06-07 14:11:36 +0400
commit9f379d7f05c43b2d09de91c3af5cc35613a745e4 (patch)
treed2686d80a3486e1912b96a6e6774bd3f77da0022 /sql/sql_repl.cc
parent7288ef873f3168bf54d84967223e469dcf68fdf3 (diff)
downloadmariadb-git-9f379d7f05c43b2d09de91c3af5cc35613a745e4.tar.gz
Patch two (the final one) for Bug#7306 "the server side preparedStatement
error for LIMIT placeholder". The patch adds grammar support for LIMIT ?, ? and changes the type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*, so that it can point to Item_param.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index 71cebb61ae6..0b5ac63dd0b 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -1316,6 +1316,7 @@ bool mysql_show_binlog_events(THD* thd)
if (mysql_bin_log.is_open())
{
LEX_MASTER_INFO *lex_mi= &thd->lex->mi;
+ SELECT_LEX_UNIT *unit= &thd->lex->unit;
ha_rows event_count, limit_start, limit_end;
my_off_t pos = max(BIN_LOG_HEADER_SIZE, lex_mi->pos); // user-friendly
char search_file_name[FN_REFLEN], *name;
@@ -1324,8 +1325,9 @@ bool mysql_show_binlog_events(THD* thd)
LOG_INFO linfo;
Log_event* ev;
- limit_start= thd->lex->current_select->offset_limit;
- limit_end= thd->lex->current_select->select_limit + limit_start;
+ unit->set_limit(thd->lex->current_select);
+ limit_start= unit->offset_limit_cnt;
+ limit_end= unit->select_limit_cnt;
name= search_file_name;
if (log_file_name)