- Add function Item_param::fix_fields which will update any subselect they are part of and indicate that the subsleect is not const during prepare phase, and thus should not be executed during prepare.
mysql-test/include/ps_query.inc:
Adde new test case
mysql-test/r/ps_2myisam.result:
Update test result
mysql-test/r/ps_3innodb.result:
Update test result
mysql-test/r/ps_4heap.result:
Update test result
mysql-test/r/ps_5merge.result:
Update test result
mysql-test/r/ps_6bdb.result:
Update test result
mysql-test/r/ps_7ndb.result:
Update test result
sql/item.cc:
Add function Item_param::fix_fields, which will mark any subselects they are part of as not being a constant expression unless the param value is specified, ie. it will be not be constant during prepare phase.
sql/item.h:
Adde Item_param::fix_fields
sql/item_subselect.h:
Make Item_param::fix_field friend of Item_subselect
not default_charset_into. It fixes the
problem that in some cases numbers where
treated as CHAR(N), not as BINARY(N), e.g.
wrong 'charsetnr' when sent to the client side.
2. IFNULL didn't aggregate argument charsets
and collations, so IFNULL(1,'a') produced
a CHAR(N). Now produces a BINARY(N).
3. SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
4. Tests were fixed accordingly. No new tests were
made, as the old onces cover everything.
mysql-test/r/analyse.result:
SELECT PROCEDURE ANALIZE now returns
BINARY columns, which is much better than it worked
previously: CHAR with the default character set.
But in the future it's worth to fix the fields
'Field_name' and 'Optimal_fieldtype' to use UTF8,
and 'Min_value' and 'Max_value' to inherit their charsets
from the original items. But it is not important,
and BINARY(N) is OK for now.
mysql-test/r/case.result:
Test fix according to the changes
mysql-test/r/metadata.result:
Test fix according to the changes
mysql-test/r/ps_1general.result:
Test fix according to the changes
mysql-test/r/ps_2myisam.result:
Test fix according to the changes
mysql-test/r/ps_3innodb.result:
Test fix according to the changes
mysql-test/r/ps_4heap.result:
Test fix according to the changes
mysql-test/r/ps_5merge.result:
Test fix according to the changes
mysql-test/r/ps_6bdb.result:
Test fix according to the changes
mysql-test/r/ps_7ndb.result:
Test fix according to the changes
mysql-test/r/union.result:
Test fix according to the changes
sql/item.cc:
Item is now BINARY by default
sql/item_cmpfunc.cc:
IFNULL now collects arguments collations/charsets
like other functions do.
correctly even with zero month and day" and bug #7515 "from_unixtime(0)
now returns NULL instead of the Epoch" into 4.1 tree.
mysql-test/r/ps_2myisam.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_3innodb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_4heap.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_5merge.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_6bdb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
mysql-test/r/ps_7ndb.result:
Updated test result after merging fix for bug #7297 "Two digit year should
be interpreted correctly even with zero month and day" into 4.1
sql-common/my_time.c:
Merged fix for bug #7297 "Two digit year should be interpreted correctly
even with zero month and day" into 4.1
sql/item_timefunc.cc:
Small fix after merging patch solving bug #7515 "from_unixtime(0) now
returns NULL instead of the Epoch" into 4.1.
ps-modify1 used the user variables @1, @2, @100 set within ps_query and
ps_modify. That architecture was wrong, because the dependence
of ps_modify1 on ps_query and ps_modify makes the test script
maintenance and the use of these test cases during bug fixing/
debugging of single sub test cases very uncomfortable.
Therefore these user variables (@1, @2, @100) are also set within ps-modify1.
The result files of the test cases ps_2myisam, ps_3innodb, ps_4heap, ps_6bdb,
ps_7ndb will be affected by that change and show 3 additional lines, but
nothing else will change.
mysql-test/include/ps_modify1.inc:
Initialization of three user variables, with values derived from ps_query
and ps_modify
mysql-test/r/ps_2myisam.result:
updated result set
mysql-test/r/ps_3innodb.result:
updated result set
mysql-test/r/ps_4heap.result:
updated result sset
mysql-test/r/ps_6bdb.result:
updated result set
mysql-test/r/ps_7ndb.result:
updated result set
the result takes its charset/collation
attributes from the character string,
e.g. SELECT func(NULL, _latin2'string')
now returns a latin2 result. This is
done by introducing a new derivation
(aka coercibility) level DERIVATION_IGNORABLE,
which is used with Item_null.
2. 'Pure' NULL is now BINARY(0), not CHAR(0).
I.e. NULL is now more typeless.
mysql-test/r/metadata.result:
Fixing test results:
CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/null.result:
Testing mixing NULL with a character string with a number of functions.
mysql-test/r/ps_2myisam.result:
Fixing test results:
CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_3innodb.result:
Fixing test results:
CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_4heap.result:
Fixing test results:
CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_5merge.result:
Fixing test results:
CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_6bdb.result:
Fixing test results:
CHAR(0) -> BINARY(0) for NULLs
mysql-test/r/ps_7ndb.result:
Fixing test results:
CHAR(0) -> BINARY(0) for NULLs
mysql-test/t/null.test:
Testing mixing NULL with a character string with a number of functions.
sql/item.cc:
New derivation level.
sql/item.h:
New derivation level.
character set with NULL, @a should be latin2
after this query sequence:
SET @a=_latin2'string';
SET @a=NULL;
I.e. the second query should not change the charset
to the current default value, but should keep the
original value assigned during the first query.
In order to do it, we don't copy charset
from the argument if the argument is NULL
and the variable has previously been initialized.
mysql-test/r/ps_6bdb.result:
t
mysql-test/r/ps_5merge.result:
t
mysql-test/r/ps_3innodb.result:
t
mysql-test/r/ps_7ndb.result:
t
mysql-test/r/ps_4heap.result:
t
mysql-test/r/ps_2myisam.result:
t
sql/item_func.cc:
t
mysql-test/include/ps_modify.inc:
replace ... select now works.
mysql-test/r/ps_2myisam.result:
replace ... select now works.
mysql-test/r/ps_3innodb.result:
replace ... select now works.
mysql-test/r/ps_4heap.result:
replace ... select now works.
mysql-test/r/ps_5merge.result:
replace ... select now works.
mysql-test/r/ps_6bdb.result:
replace ... select now works.
mysql-test/r/ps_7ndb.result:
replace ... select now works.
mysql-test/t/ps_7ndb.test:
replace ... select now works.
sql/sql_prepare.cc:
Enable SQLCOM_REPLACE_SELECT: no need for any code changes but
enable this SQLCOM in the switch.
tests were disabled due to failures caused by floating point conversion
issues on optimized builds).
mysql-test/include/ps_conv.inc:
Disable some of the tests for the test suite to pass on an optimized
build (floating point issues...).
mysql-test/include/ps_query.inc:
Disable some of the tests for the test suite to pass on an optimized
build (floating point issues...).
mysql-test/r/ps_2myisam.result:
Fix test results.
mysql-test/r/ps_3innodb.result:
Fix test results.
mysql-test/r/ps_4heap.result:
Fix test results.
mysql-test/r/ps_5merge.result:
Fix test results.
mysql-test/r/ps_6bdb.result:
Fix test results.
mysql-test/r/ps_7ndb.result:
Fix test results.
if possible"
- many new test cases
- more and improved comments
New files: t/ps_7ndb.test test suite for NDB tables
r/ps_7ndb.result expected results
include/ps_conv.inc conversion test cases
+ review comments and fixes.
mysql-test/include/ps_create.inc:
Rename of t_many_col_types -> t9
mysql-test/include/ps_modify.inc:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Rename: t_many_col_types -> t9
Cleanups and comments.
New test cases (derived from client_test.c)
mysql-test/include/ps_modify1.inc:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Rename: t_many_col_types -> t9
Cleanups and comments.
New test cases (derived from client_test.c)
mysql-test/include/ps_query.inc:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Rename: t_many_col_types -> t9
Cleanups and comments.
New test cases (derived from client_test.c)
mysql-test/include/ps_renew.inc:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Rename: t_many_col_types -> t9
mysql-test/r/ps_1general.result:
Results updated.
mysql-test/r/ps_2myisam.result:
Resutls updated.
mysql-test/r/ps_3innodb.result:
Results updated.
mysql-test/r/ps_4heap.result:
Results updated.
mysql-test/r/ps_5merge.result:
Results updated.
mysql-test/r/ps_6bdb.result:
Results updated.
mysql-test/t/ps_1general.test:
WL#1856 "Conversion of client_test.c tests cases to mysqltest if
possible": new test cases added.
mysql-test/t/ps_2myisam.test:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Call of file include/ps_conv.inc (with new test cases) and
fulltext test case added.
mysql-test/t/ps_3innodb.test:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Call of file include/ps_conv.inc (with new test cases) added.
mysql-test/t/ps_4heap.test:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Call of file include/ps_conv.inc (with new test cases) added.
mysql-test/t/ps_5merge.test:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible
Call of file include/ps_conv.inc (with new test cases) added.
mysql-test/t/ps_6bdb.test:
WL#1856 Conversion of client_test.c tests cases to mysqltest if possible.
Call of file include/ps_conv.inc (with new test cases) added.
They are separated from the other WL#1856 stuff, because they improve the behaviour of the current tests.
Make the result sets (order of rows) more predictable by using ORDER BY.
mysql-test/include/ps_modify.inc:
Make the result sets more predictable by using ORDER BY
mysql-test/include/ps_modify1.inc:
Make the result sets more predictable by using ORDER BY
mysql-test/r/ps_2myisam.result:
updated results
mysql-test/r/ps_3innodb.result:
updated results
mysql-test/r/ps_4heap.result:
updated results
mysql-test/r/ps_5merge.result:
updated results
mysql-test/r/ps_6bdb.result:
updated results
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
key Column Fails".
mysql-test/r/ps.result:
Test results updated: a test case for Bug#5510 "inserting Null in
AutoIncrement primary key Column Fails".
mysql-test/r/ps_2myisam.result:
Bug#5510: a different warning in case of NULL->default truncation.This is
OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_3innodb.result:
Bug#5510: a different warning in case of NULL->default truncation.This is
OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_4heap.result:
Bug#5510: a different warning in case of NULL->default truncation.This is
OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_5merge.result:
Bug#5510: a different warning in case of NULL->default truncation.This is
OK, the new warning is the same as produced by conventional execution.
mysql-test/r/ps_6bdb.result:
Bug#5510: a different warning in case of NULL->default truncation.This is
OK, the new warning is the same as produced by conventional execution.
mysql-test/t/ps.test:
A test case for Bug#5510 "inserting Null in AutoIncrement primary key Column
Fails".
sql/item.cc:
A fix for bug#5510 "inserting Null in AutoIncrement primary key Column
Fails": use proper Field API function for NULL placholeders.
on intelxeon3 (Solaris x86))
mysql-test/r/ps_2myisam.result:
Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_3innodb.result:
Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_4heap.result:
Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_5merge.result:
Test results fixed (order by for a couple of statements in the PS test).
mysql-test/r/ps_6bdb.result:
Test results fixed (order by for a couple of statements in the PS test).
TIMESTAMP columns should be unsigned to preserve compatibility with 4.0
(Or else InnoDB will return different internal TIMESTAMP values when user upgrades to 4.1).
Altough this fix will introduce problems with early 4.1 -> 4.1 upgrades (tables with
TIMESTAMP field should be reloaded using mysqldump) it will allow easy 4.0 -> 4.1
upgrade (which is more important since 4.1 is still beta).
mysql-test/r/metadata.result:
TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_2myisam.result:
TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_3innodb.result:
TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_4heap.result:
TIMESTAMP should be UNSIGNED as in 4.0.
mysql-test/r/ps_5merge.result:
TIMESTAMP should be UNSIGNED as in 4.0.
sql/field.cc:
TIMESTAMP should be UNSIGNED to preserve compatiblity with 4.0.
(Or else InnoDB will return different internal TIMESTAMP values when user upgrades to 4.1).
new tests to ensure that prepared statement *really* work
(and that MySQL not picks up some number from arbitrary location
that happens to match the parameter's value)
mysql-test/include/ps_query.inc:
new tests to ensure that prepared statement *really* work
(and that MySQL not picks up some number from arbitrary location
that happens to match the parameter's value)
mysql-test/r/ps_2myisam.result:
results updated
mysql-test/r/ps_3innodb.result:
results updated
mysql-test/r/ps_4heap.result:
results updated
mysql-test/r/ps_5merge.result:
results updated
mysql-test/r/ps_6bdb.result:
results updated
sql/sql_select.cc:
don't shortcut - it backfires!
(in particular - when itemptr is Item_param :)