diff options
author | kostja@dipika.(none) <> | 2008-04-08 20:01:20 +0400 |
---|---|---|
committer | kostja@dipika.(none) <> | 2008-04-08 20:01:20 +0400 |
commit | d1f9376229f0a615829a436cf6004840237d1e75 (patch) | |
tree | 8ec6e9de86b024933c862dd990eb29572de10727 /sql/my_decimal.h | |
parent | a9fff11f49d88e3fec08232b24a721cc515639fc (diff) | |
download | mariadb-git-d1f9376229f0a615829a436cf6004840237d1e75.tar.gz |
Tentative implementation of
WL#4165 Prepared statements: validation
WL#4166 Prepared statements: automatic re-prepare
Fixes
Bug#27430 Crash in subquery code when in PS and table DDL changed after PREPARE
Bug#27690 Re-execution of prepared statement after table was replaced with a view crashes
Bug#27420 A combination of PS and view operations cause error + assertion on shutdown
The basic idea of the patch is to keep track of table metadata between
prepared statement prepare and execute. If some table used in the statement
has changed, the prepared statement is re-prepared before execution.
See WL#4165 and WL#4166 contents and comments in the code for details
of the implementation.
Diffstat (limited to 'sql/my_decimal.h')
-rw-r--r-- | sql/my_decimal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/my_decimal.h b/sql/my_decimal.h index 1885036f42b..b096abaf8ae 100644 --- a/sql/my_decimal.h +++ b/sql/my_decimal.h @@ -114,6 +114,14 @@ public: bool sign() const { return decimal_t::sign; } void sign(bool s) { decimal_t::sign= s; } uint precision() const { return intg + frac; } + + /** Swap two my_decimal values */ + void swap(my_decimal &rhs) + { + swap_variables(my_decimal, *this, rhs); + /* Swap the buffer pointers back */ + swap_variables(decimal_digit_t *, buf, rhs.buf); + } }; |