diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-04-27 13:58:21 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-04-27 13:58:21 +0400 |
commit | d328d5be33cddff7dfcc736ecc993f11560f8152 (patch) | |
tree | 6fc830df498046ca29b2381fb809726faeb04f52 /sql/sp_head.cc | |
parent | 5575d724cf1e40c467ab0eab934ce8846b452a9a (diff) | |
parent | 0c8c4a7133f955603029b3bc31e45b5ef02516ca (diff) | |
download | mariadb-git-d328d5be33cddff7dfcc736ecc993f11560f8152.tar.gz |
Manual merge from mysql-trunk.
Conflicts:
- mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index b5ab5517ea5..dee01ee0b62 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -978,11 +978,20 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str) res|= qbuf.append(cur + prev_pos, (*splocal)->pos_in_query - prev_pos); prev_pos= (*splocal)->pos_in_query + (*splocal)->len_in_query; + res|= (*splocal)->fix_fields(thd, (Item **) splocal); + if (res) + break; + + if ((*splocal)->limit_clause_param) + { + res|= qbuf.append_ulonglong((*splocal)->val_uint()); + continue; + } + /* append the spvar substitute */ res|= qbuf.append(STRING_WITH_LEN(" NAME_CONST('")); res|= qbuf.append((*splocal)->m_name.str, (*splocal)->m_name.length); res|= qbuf.append(STRING_WITH_LEN("',")); - res|= (*splocal)->fix_fields(thd, (Item **) splocal); if (res) break; |