Introduce new variable c_newest_restorable_gci
which is set _after_ both GCP_SAVE and COPY_GCI
This variable is used when cutting redo (calcKeepGci)
Also make sure complete GCI is run inbetween LCP's
internal charset to one associated with currently being handled query.
To note such a query can come from interactive client either.
There was a discussion within replication team and Monty who's suggestion won.
It avoids straightforward parsing of all `set' queries that could affect client side
character set.
According to the idea, mysql client does not parse `set' queries but rather cares of
`charset new_cs_name' command.
This command is generated by mysqlbinlog in form of exclaiming comment (Lars' suggestion)
so that enlightened clients like `mysql' knows what to do with it.
Interactive human can switch between many multi-byte charsets during the session
providing the command explicitly.
To note that setting new internal mysql's charset does not
trigger sending any `SET' sql statement to the server.
Check if AGGREGATE was given with a stored (non-UDF) function, and return
error in that case.
Also made udf_example/udf_test work again, by adding a missing *_init()
function. (_init() functions required unless --allow_suspicious_udfs is
given to the server, since March 2005 - it seems udf_example wasn't updated
at the time.)
not needed by the tescases. This will save test time for those testcases
that does not need cluster, but need a restart, as they dont have to wait
the extra time it would take for cluster to restart. It will also save
time for other testcases, as cluster does not
need to be contacted for each table to be dropped or created.
Backport from 5.1
and possibly server crash in mysqld v5.0.
Reported MyISAM table was created in mysqld 4.1 and contains varchar field.
When binary files of that table was moved to 5.0, mysqld treats that varchar
field as a string field.
In order to make grouping server calculates group buffer, and because
that field is string server assumes it has fixed length and doesn't add
space for length, but later that field is converted to varchar field.
Due to this, when field values were actually copied, additional space for
length bytes is taken and buffer overrun occurs, which may lead to server crash.
The calc_group_buffer() function now reserves additional space for length
bytes for VAR_STRING fields, like for VARCHAR fields.
fix for bug#8461
BUG 8461 - TRUNCATE returns incorrect result if 2nd argument is negative
Reason: Both TRUNCATE/ROUND converts INTEGERS to DOUBLE and back to INTEGERS
Changed the integer routine to work on integers only.
This bug affects 4.1, 5.0 and 5.1
Fixing in 4.1 will need to change the routine to handle different types individually.
5.0 did had different routines for different types already just the INTEGER routine was bad.