mysql-test/r/ndb_alter_table2.result:
Add test case for BUG#29851
mysql-test/t/ndb_alter_table2.test:
Add test case for BUG#29851
sql/ha_ndbcluster.cc:
Indexes are dropped also when dropping table in GlobalDictCache
ChangeSet@1.2575, 2007-08-07 19:16:06+02:00, msvensson@pilot.(none) +2 -0
Bug#26793 mysqld crashes when doing specific query on information_schema
- Drop the newly created user user1@localhost
- Cleanup testcase
mysql-test/r/ndb_bug26793.result:
mysql-test/r/ndb_bug26793.result@1.3, 2007-08-07 19:16:04+02:00, msvensson@pilot.(none)
+1 -6
Update test result
mysql-test/t/ndb_bug26793.test:
mysql-test/t/ndb_bug26793.test@1.3, 2007-08-07 19:16:04+02:00, msvensson@pilot.(none) +8
-11
- Remove the drop/restore of anonymous users - there are no such users
by default anymore(if there were, they would probably be in mysql.user)
- Switch back to default connection before cleanup
- Drop user1@localhost as part of cleanup
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Twiddle the "replicaCount" and "fragCount" variable when restore data from different endian.
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
Add byte order variable
ndb/tools/restore/Restore.cpp:
Twiddle blob, datatime,timestamp when do restore in different endian.
mysql-test/r/ndb_restore_different_endian_data.result:
Test case result for restore data from different endian
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1-0.1.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1-0.2.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.1.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.1.log:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.2.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_be/BACKUP-1.2.log:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1-0.1.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1-0.2.Data:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.1.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.1.log:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.2.ctl:
Test case data
mysql-test/std_data/ndb_backup50_data_le/BACKUP-1.2.log:
Test case data
mysql-test/t/ndb_restore_different_endian_data.test:
Test case for restore data from different endian
Reduce case and formalise into something we should be
able to use in mysql-test-run.
Index: ndb-work/mysql-test/t/ndb_bug26793.test
===================================================================
mysql-test/r/ndb_bug26793.result:
BUG#26793 test: mysqld crashes in NDB on I_S query
mysql-test/t/ndb_bug26793.test:
BUG#26793 test: mysqld crashes in NDB on I_S query
ndb/include/debugger/EventLogger.hpp:
add definition for new printLogEvent() function in CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp:
add a printLogEvent() function to print log event;
filter "<PING>" by ndb_logevent_get_next() in event_thread_run();
filter "<PING>" by ndb_logevent_get_next() in executeStartBackup();
and make executeStartBackup() same in both 5.0 and 5.1
ndb/src/mgmclient/Makefile.am:
add link to use ndb_logevent_get_next()
mysql-test/r/ndb_backup_print.result:
testcase result for ndb_backup_print
produced by mysql_test_run.pl
mysql-test/t/ndb_backup_print.test:
add testcase for ndb_mgm -e "start backup", check outupt format
- check multi update as well as update
- this bug is not present in 5.0, but execution patch is wrong, so there are probably other bugs
mysql-test/r/ndb_basic.result:
Bug #28719: multi pk update ignore corrupts data
- add test + backport some tests from 5.1
mysql-test/t/ndb_basic.test:
Bug #28719: multi pk update ignore corrupts data
- add test + backport some tests from 5.1
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
configure.in:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
- The SQL commands used by mysql_upgrade are written to be run
with sql_mode set to '' - thus the scripts should change sql_mode
for the session to make sure the SQL is legal.
mysql-test/r/mysql_upgrade.result:
Update test result
mysql-test/t/mysql_upgrade.test:
The SQL commands used by mysql_upgrade are written to be run
with sql_mode set to '' - thus the scripts should change sql_mode
for the session to make sure the SQL is legal.
scripts/mysql_system_tables_fix.sql:
Set sql_mode to '' before running the SQL commands
to fix system tables - backport from 5.1
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
client/mysqltest.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/mysqltest.result:
Auto merged
mysql-test/t/mysqltest.test:
SCCS merged
- Final touchups
client/mysqltest.c:
Final touch ups, rename sorted_results to sorted_result
mysql-test/r/mysqltest.result:
Update test result
mysql-test/t/mysqltest.test:
Update results with additional subtests for empty result set,
NULL values and 1024 rows
into siva.hindu.god:/home/tsmith/m/bk/maint/50
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/t/outfile.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
is involved.
The Arg_comparator::compare_datetime() comparator caches its arguments if
they are constants i.e. const_item() returns true. The
Item_func_get_user_var::const_item() returns true or false based on
the current query_id and the query_id where the variable was created.
Thus even if a query can change its value its const_item() still will return
true. All this leads to a wrong comparison result when an object of the
Item_func_get_user_var class is involved.
Now the Arg_comparator::can_compare_as_dates() and the
get_datetime_value() functions never cache result of the GET_USER_VAR()
function (the Item_func_get_user_var class).
mysql-test/t/type_datetime.test:
A test case is added for the bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
is involved.
mysql-test/r/type_datetime.result:
A test case is added for the bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
is involved.
sql/item_cmpfunc.cc:
Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
is involved.
Now the Arg_comparator::can_compare_as_dates() and the
get_datetime_value() functions never cache result of the GET_USER_VAR()
function (the Item_func_get_user_var class).
subqueries in WHERE conditions.
This bug was introduced by the patch for bug 27321.
mysql-test/r/subselect.result:
Added a test case for bug #28337.
mysql-test/t/subselect.test:
Added a test case for bug #28337.
sql/item.cc:
Fixed bug #28337: wrong results for grouping queries with correlated
subqueries in WHERE conditions.
This bug was introduced by the patch for bug 27321.
Now in the Item_field::fix_outer_field function we create an Item_outer_ref
object for an outer reference only if it is used in the SELECT list or
in the HAVING clause of the subquery against which the reference is resolved.
- Change from "query_sorted <query>" to "sorted_results"
client/mysqltest.c:
Replace "query_sorted <query>" with the ability to turn
on "one shot result sorting" with the command "sorted_results"
mysql-test/r/mysqltest.result:
Update test and result
mysql-test/t/mysqltest.test:
Update test and result
- Problem was reported as a SP variable using itself as
right value inside SUBSTR caused corruption of data.
- This bug could not be verified in either 5.0bk or 5.1bk
- Added test case to prevent future regressions.
mysql-test/r/sp-vars.result:
Added test case for a reported regression which couldn't be
verified.
mysql-test/t/sp-vars.test:
Added test case for a reported regression which couldn't be
verified.
into linux-st28.site:/home/martin/mysql/src/5.0o-bug27573
mysql-test/r/func_group.result:
Auto merged
mysql-test/t/func_group.test:
bug#27573: hand merged test case
Made year 2000 handling more uniform
Removed year 2000 handling out from calc_days()
The above removes some bugs in date/datetimes with year between 0 and 200
Now we get a note when we insert a datetime value into a date column
For default values to CREATE, don't give errors for warning level NOTE
Fixed some compiler failures
Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
Removed duplicate typedef TIME and replaced it with MYSQL_TIME
Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
include/my_time.h:
Removed not used define YY_MAGIC_BELOW
Added prototype for year_2000_handling()
mysql-test/r/date_formats.result:
Updated results (fixed bug in date_format() with year < 99
mysql-test/r/func_sapdb.result:
Added more testing of make_date()
mysql-test/r/ps_2myisam.result:
Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_3innodb.result:
Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_4heap.result:
Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_5merge.result:
Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_7ndb.result:
Now we get a note when we insert a datetime value into a date column
mysql-test/r/strict.result:
zero-year in str_to_date() throws warning in strict
mysql-test/r/type_date.result:
Added test for date conversions
mysql-test/r/type_datetime.result:
Added testcase for datetime to date conversion.
mysql-test/t/date_formats.test:
Added testing of dates < 200
mysql-test/t/func_sapdb.test:
More testing of makedate()
mysql-test/t/type_date.test:
Added test for date conversions
mysql-test/t/type_datetime.test:
Added testcase for datetime to date conversion
sql/field.cc:
Give note if we insert a datetime value in a date field
Don't give notes if we are doing internal test conversions (like from convert_constant_item())
More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
Revert some changes in Field_newdate::store() to get more optimal code
Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
New parameters to make_truncated_value_warning()
sql/field.h:
Give note if we insert a datetime value in a date field
Don't give notes if we are doing internal test conversions (like from convert_constant_item())
More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
Revert some changes in Field_newdate::store() to get more optimal code
Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
New parameters to make_truncated_value_warning()
sql/item.cc:
Give note if we insert a datetime value in a date field
Don't give notes if we are doing internal test conversions (like from convert_constant_item())
More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
Revert some changes in Field_newdate::store() to get more optimal code
Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
New parameters to make_truncated_value_warning()
sql/item.h:
TIME -> MYSQL_TIME
sql/item_cmpfunc.cc:
Don't print notes in convert_constant_item()
sql/item_func.h:
TIME -> MYSQL_TIME
sql/item_timefunc.cc:
New parameters to make_truncated_value_warning()
Moved year 2000 handling out from calc_days()
sql/item_timefunc.h:
TIME -> MYSQL_TIME
sql/my_decimal.cc:
TIME -> MYSQL_TIME
sql/my_decimal.h:
TIME -> MYSQL_TIME
sql/mysql_priv.h:
Added error level to make_truncated_value_warning()
sql/protocol.cc:
TIME -> MYSQL_TIME
sql/protocol.h:
TIME -> MYSQL_TIME
sql/sp.cc:
TIME -> MYSQL_TIME
sql/sql_base.cc:
Make testing of result value of save_in_field() uniform
sql/sql_class.h:
TIME -> MYSQL_TIME
sql/sql_show.cc:
TIME -> MYSQL_TIME
sql/structs.h:
TIME -> MYSQL_TIME
sql/time.cc:
Added error level to make_truncated_value_warning()
sql/tztime.cc:
TIME -> MYSQL_TIME
sql/tztime.h:
TIME -> MYSQL_TIME
sql/unireg.cc:
For default values to CREATE, don't give errors for warning level NOTE
(Fixed failed CREATE when we give a datetime value to a date field)
sql-common/my_time.c:
Added year_2000_handling()
Removed year 2000 handling from calc_daynr()
- mysqldump generated output that set OLD_SQL_MODE twice, to different values
(for triggers), or not at all (for routines) in some cases.
client/mysqldump.c:
Only save SQL_MODE in dump_triggers if in --compact mode. Otherwise,
it's already been saved in write_header(). Likewise for dumpe_routines,
where it was never saved.
mysql-test/r/mysqldump.result:
mysqldump output has subtly changed. Adjust test-results. This also shows
OLD_SQL_MODE is always set exactly once now
into vajra.(none):/opt/local/work/mysql-5.0-21483
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
Bug#21483 "Server abort or deadlock on INSERT DELAYED with another
implicit insert"
Also fixes and adds test cases for bugs:
20497 "Trigger with INSERT DELAYED causes Error 1165"
21714 "Wrong NEW.value and server abort on INSERT DELAYED to a
table with a trigger".
Post-review fixes.
Problem:
In MySQL INSERT DELAYED is a way to pipe all inserts into a
given table through a dedicated thread. This is necessary for
simplistic storage engines like MyISAM, which do not have internal
concurrency control or threading and thus can not
achieve efficient INSERT throughput without support from SQL layer.
DELAYED INSERT works as follows:
For every distinct table, which can accept DELAYED inserts and has
pending data to insert, a dedicated thread is created to write data
to disk. All user connection threads that attempt to
delayed-insert into this table interact with the dedicated thread in
producer/consumer fashion: all records to-be inserted are pushed
into a queue of the dedicated thread, which fetches the records and
writes them.
In this design, client connection threads never open or lock
the delayed insert table.
This functionality was introduced in version 3.23 and does not take
into account existence of triggers, views, or pre-locking.
E.g. if INSERT DELAYED is called from a stored function, which,
in turn, is called from another stored function that uses the delayed
table, a deadlock can occur, because delayed locking by-passes
pre-locking. Besides:
* the delayed thread works directly with the subject table through
the storage engine API and does not invoke triggers
* even if it was patched to invoke triggers, if triggers,
in turn, used other tables, the delayed thread would
have to open and lock involved tables (use pre-locking).
* even if it was patched to use pre-locking, without deadlock
detection the delayed thread could easily lock out user
connection threads in case when the same table is used both
in a trigger and on the right side of the insert query:
the delayed thread would not release locks until all inserts
are complete, and user connection can not complete inserts
without having locks on the tables used on the right side of the
query.
Solution:
These considerations suggest two general alternatives for the
future of INSERT DELAYED:
* it is considered a full-fledged alternative to normal INSERT
* it is regarded as an optimisation that is only relevant
for simplistic engines.
Since we missed our chance to provide complete support of new
features when 5.0 was in development, the first alternative
currently renders infeasible.
However, even the second alternative, which is to detect
new features and convert DELAYED insert into a normal insert,
is not easy to implement.
The catch-22 is that we don't know if the subject table has triggers
or is a view before we open it, and we only open it in the
delayed thread. We don't know if the query involves pre-locking
until we have opened all tables, and we always first create
the delayed thread, and only then open the remaining tables.
This patch detects the problematic scenarios and converts
DELAYED INSERT to a normal INSERT using the following approach:
* if the statement is executed under pre-locking (e.g. from
within a stored function or trigger) or the right
side may require pre-locking, we detect the situation
before creating a delayed insert thread and convert the statement
to a conventional INSERT.
* if the subject table is a view or has triggers, we shutdown
the delayed thread and convert the statement to a conventional
INSERT.
mysql-test/r/insert.result:
Update test results.
mysql-test/t/insert.test:
Add a test case for Bug#21483, Bug#20497, Bug#21714 (INSERT DELAYED
and stored routines, triggers).
sql/sp_head.cc:
Upgrade lock type to TL_WRITE when computing the pre-locking set.
sql/sql_base.cc:
Use a new method.
sql/sql_insert.cc:
INSERT DELAYED and pre-locking:
- if under pre-locking, upgrade the lock type to TL_WRITE
and proceed as a normal write
- if DELAYED table has triggers, also request a lock upgrade.
- make sure errors in the delayed thread are propagated
correctly
sql/sql_lex.h:
Add a method to check if a parsed tree refers to stored
routines.
in the case of the overflow in the decimal->integer conversion
we didn't return the proper boundary value, but just the result
of the conversion we calculated on the moment of the error
mysql-test/r/bigint.result:
bug #8663 cant use bigint unsigned as input to cast
test result fixed
mysql-test/t/bigint.test:
bug #8663 cant use bigint unsigned as input to cast
test case
strings/decimal.c:
bug #8663 cant use bigint unsigned as input to cast
decimal->int conversion fixed to return proper boundary value
in the case of overflow