From fbfa0043279757b2860e846c82cbf55ab92af9b8 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 25 Apr 2014 17:10:25 +0400 Subject: MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations --- sql/sql_yacc.yy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ceb4e247848..0de67297302 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -11305,7 +11305,10 @@ opt_limit_clause: limit_clause: LIMIT limit_options { - Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); + SELECT_LEX *sel= Select; + if (!sel->select_limit->basic_const_item() || + sel->select_limit->val_int() > 0) + Lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_LIMIT); } | LIMIT limit_options ROWS_SYM EXAMINED_SYM limit_rows_option { -- cgit v1.2.1