Commit graph

19 commits

Author SHA1 Message Date
Lena Startseva
d444536e1d Merge branch 'bb-10.4-all-builders' into bb-10.5-all-builders 2022-09-26 10:24:59 +07:00
Lena Startseva
72ba96a48e MDEV-27691: make working view-protocol
Tests with checking metadata or that cannot be run with
the view-protocol are excluded from --view-protocol.
For tests that do not allow the use of an additional connection,
the util connection is disabled with "--disable_service_connection".
Also cases with bugs for --view-protocol are disabled.
2022-09-23 17:36:20 +07:00
Otto Kekäläinen
cebf9ee204 Fix various spelling errors still found in code
Reseting -> Resetting
Unknow -> Unknown
capabilites -> capabilities
choosen -> chosen
direcory -> directory
informations -> information
openned -> opened
refered -> referred
to access -> one to access
missmatch -> mismatch
succesfully -> successfully
dont -> don't
2021-03-22 18:10:39 +11:00
Nirbhay Choubey
8b2e642aa2 MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
Sergei Golubchik
0438f12540 MDEV-6980 OUT parameters in PREPARE
revert the patch for "out parameters in prepare"
2014-12-04 10:41:52 +01:00
Sergei Golubchik
a99af484cd MDEV-5317 out parameters in PREPARE "SELECT ... INTO"
originally based on the patch by Antony T Curtis
2014-10-10 22:27:39 +02:00
Michael Widenius
f197991f41 Merge with 5.1-microseconds
A lot of small fixes and new test cases.

client/mysqlbinlog.cc:
  Cast removed
client/mysqltest.cc:
  Added missing DBUG_RETURN
include/my_pthread.h:
  set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
  Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
  Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
  Changed to use my_hrtime()
sql/field.h:
  Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
  Added test to get optimal copying of identical temporal values.
sql/item.cc:
  Return that item_int is equal if it's positive, even if unsigned flag is different.
  Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
  Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
  Don't call convert_constant_item() if there is nothing that is worth converting.
  Simplified test when years should be converted
sql/item_sum.cc:
  Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
  Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
  Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
  Added Lazy_string_decimal()
sql/mysqld.cc:
  Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
  Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
  TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
  This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
  Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
  Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
  Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
  my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
  my_getsystime() -> my_interval_timer()
2011-05-28 05:11:32 +03:00
Sergei Golubchik
a8a757c6bb wl#173 - temporal types with sub-second resolution
and collateral changes.

* introduce my_hrtime_t, my_timediff_t, and conversion macros
* inroduce TIME_RESULT, but it can only be returned from Item::cmp_type(),
  never from Item::result_type()
* pack_time/unpack_time function for "packed" representation of
  MYSQL_TIME in a longlong that can be compared
* ADDTIME()/SUBTIME()/+- INTERVAL now work with TIME values
* numbers aren't quoted in EXPLAIN EXTENDED
* new column I_S.COLUMNS.DATETIME_PRECISION
* date/time values are compares to anything as date/time, not as strings or numbers.
* old timestamp(X) is no longer supported
* MYSQL_TIME to string conversion functions take precision as an argument
* unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
* Field_timestamp_hires, Field_datetime_hires, Field_time_hires
* Field_temporal
* Lazy_string class to pass a value (string, number, time) polymorphically down the stack
* make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
* removed Field::can_be_compared_as_longlong(). Use Field::cmp_type() == INT_RESULT instead
* introduced Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
* in many cases date/time types are treated like other types, not as special cases
* greatly simplified Arg_comparator (regarding date/time/year code)
* SEC_TO_TIME is real function, not integer.
* microsecond precision in NOW, CURTIME, etc
* Item_temporal. All items derived from it only provide get_date, but no val* methods
* replication of NOW(6)
* Protocol::store(time) now takes the precision as an argument
* @@TIMESTAMP is a double

client/mysqlbinlog.cc:
  remove unneded casts
include/my_sys.h:
  introduce my_hrtime_t, my_timediff_t, and conversion macros
include/my_time.h:
  pack_time/unpack_time, etc.
  convenience functions to work with MYSQL_TIME::second_part
libmysql/libmysql.c:
  str_to_time() is gone. str_to_datetime() does it now.
  my_TIME_to_str() takes the precision as an argument
mysql-test/include/ps_conv.inc:
  time is not equal to datetime anymore
mysql-test/r/distinct.result:
  a test for an old MySQL bug
mysql-test/r/explain.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_default.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_sapdb.result:
  when decimals=NOT_FIXED_DEC it means "not fixed" indeed
mysql-test/r/func_test.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/func_time.result:
  ADDTIME()/SUBTIME()/+- INTERVAL now work with TIME values
mysql-test/r/having.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/information_schema.result:
  new column I_S.COLUMNS.DATETIME_PRECISION
mysql-test/r/join_outer.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/metadata.result:
  TIMESTAMP no longer has zerofill flag
mysql-test/r/range.result:
  invalid datetime is not compared with as a string
mysql-test/r/select.result:
  NO_ZERO_IN_DATE, etc only affect storage - according to the manual
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/subselect.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/sysdate_is_now.result:
  when decimals=NOT_FIXED_DEC it means "not fixed" indeed
mysql-test/r/type_blob.result:
  TIMESTAMP(N) is not deprecated
mysql-test/r/type_timestamp.result:
  old TIMESTAMP(X) semantics is not supported anymore
mysql-test/r/union.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/r/varbinary.result:
  numbers aren't quoted in EXPLAIN EXTENDED
mysql-test/t/distinct.test:
  test for an old MySQL bug
mysql-test/t/func_time.test:
  +- INTERVAL now works with TIME values
mysql-test/t/select.test:
  typo
mysql-test/t/subselect.test:
  only one error per statement, please
mysql-test/t/system_mysql_db_fix40123.test:
  old timestamp(X) is no longer supported
mysql-test/t/system_mysql_db_fix50030.test:
  old timestamp(X) is no longer supported
mysql-test/t/system_mysql_db_fix50117.test:
  old timestamp(X) is no longer supported
mysql-test/t/type_blob.test:
  old timestamp(X) is no longer supported
mysql-test/t/type_timestamp.test:
  old timestamp(X) is no longer supported
mysys/my_getsystime.c:
  functions to get the time with microsecond precision
mysys/my_init.c:
  move the my_getsystime.c initialization code to my_getsystime.c
mysys/my_static.c:
  no need to make these variables extern
mysys/my_static.h:
  no need to make these variables extern
scripts/mysql_system_tables.sql:
  old timestamp(X) is no longer supported
scripts/mysql_system_tables_fix.sql:
  old timestamp(X) is no longer supported
scripts/mysqlhotcopy.sh:
  old timestamp(X) is no longer supported
sql-common/my_time.c:
  * call str_to_time from str_to_datetime, as appropriate
  * date/time to string conversions take precision as an argument
  * number_to_time()
  * TIME_to_double()
  * pack_time() and unpack_time()
sql/event_data_objects.cc:
  cast is not needed
  my_datetime_to_str() takes precision as an argument
sql/event_db_repository.cc:
  avoid dangerous downcast (because the pointer is
  not always Field_timestamp, see events_1.test)
sql/event_queue.cc:
  avoid silly double-work for cond_wait
  (having an endpoint of wait, subtract the current time to get the timeout,
  and use set_timespec() macro to fill in struct timespec, by adding the current
  time to the timeout)
sql/field.cc:
  * remove virtual Field::get_time(), everyone should use only Field::get_date()
  * remove lots of #ifdef WORDS_BIGENDIAN
  * unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
  * Field_timestamp_hires, Field_datetime_hires, Field_time_hires
  * Field_temporal
  * make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
sql/field.h:
  * remove virtual Field::get_time(), everyone should use only Field::get_date()
  * remove lots of #ifdef WORDS_BIGENDIAN
  * unified the warnings from Field_timestamp/datetime/time/date/newdate store methods
  * Field_timestamp_hires, Field_datetime_hires, Field_time_hires
  * Field_temporal
  * make_truncated_value_warning and Field::set_datetime_warning use Lazy_string as an argument, removed char*/int/double variants
  * removed Field::can_be_compared_as_longlong(). Use Field::cmp_type() == INT_RESULT instead
sql/filesort.cc:
  TIME_RESULT, cmp_time()
sql/item.cc:
  * numbers aren't quoted in EXPLAIN EXTENDED
  * Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
  * virtual Item::get_time() is gone
  * Item_param::field_type() is set correctly
  * Item_datetime, for a datetime constant
  * time to anything is compared as a time
  * Item_cache::print() prints the value is available
  * bug fixed in Item_cache_int::val_str()
sql/item.h:
  * Item::print_value(), to be used from Item_xxx::print() when needed
  * Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
  * virtual Item::get_time() is gone
  * Item_datetime, for a datetime constant
  * better default for cast_to_int_type()
  * Item_cache objects now *always* have the field_type() set
sql/item_cmpfunc.cc:
  * get_year_value, get_time_value are gone. get_datetime_value does it all
  * get_value_a_func, get_value_b_func are gone
  * can_compare_as_dates() is gone too, TIME_RESULT is used instead
  * cmp_type() instead or result_type() when doing a comparison
  * compare_datetime and compate_e_datetime in the comparator_matrix, is_nulls_eq is gone
  * Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
sql/item_cmpfunc.h:
  greatly simplified Arg_comparator
sql/item_create.cc:
  * fix a bug in error messages in CAST
sql/item_func.cc:
  Item::cmp_result() instead of Item::is_datetime() and Item::result_as_longlong()
  mention all possibitiles in switch over Item_result values, or use default:
sql/item_row.h:
  overwrite the default cmp_type() for Item_row,
  as no MYSQL_TYPE_xxx value corresponds to ROW_RESULT
sql/item_timefunc.cc:
  rewrite make_datetime to support precision argument
  SEC_TO_TIME is real function, not integer.
  many functions that returned temporal values had duplicate code in val_* methods,
  some of them did not have get_date() which resulted in unnecessary date->str->date conversions. 
  Now they all are derived from Item_temporal_func and *only* provide get_date, not val* methods.
  many fixes to set decimals (datetime precision) correctly.
sql/item_timefunc.h:
  SEC_TO_TIME is real function, not integer.
  many functions that returned temporal values had duplicate code in val_* methods,
  some of them did not have get_date() which resulted in unnecessary date->str->date conversions. 
  Now they all are derived from Item_temporal_func and *only* provide get_date, not val* methods.
  many fixes to set decimals (datetime precision) correctly.
sql/log_event.cc:
  replication of NOW(6)
sql/log_event.h:
  replication of NOW(6)
sql/mysql_priv.h:
  Lazy_string class to pass a value (string, number, time) polymorphically down the stack.
  make_truncated_value_warning() that uses it.
sql/mysqld.cc:
  datetime in Arg_comparator::comparator_matrix
sql/opt_range.cc:
  cleanup: don't disable warnings before calling save_in_field_no_warnings()
sql/protocol.cc:
  Protocol::store(time) now takes the precision as an argument
sql/protocol.h:
  Protocol::store(time) now takes the precision as an argument
sql/rpl_rli.cc:
  small cleanup
sql/set_var.cc:
  SET TIMESTAMP=double
sql/set_var.h:
  @@TIMESTAMP is a double
sql/share/errmsg.txt:
  precision and scale are unsigned
sql/slave.cc:
  replication of NOW(6)
sql/sp_head.cc:
  cleanup
sql/sql_class.cc:
  support for NOW(6)
sql/sql_class.h:
  support for NOW(6)
sql/sql_insert.cc:
  support for NOW(6)
sql/sql_select.cc:
  use item->cmp_type().
  move a comment where it belongs
sql/sql_show.cc:
  new column I_S.COLUMNS.DATETIME_PRECISION
sql/sql_yacc.yy:
  TIME(X), DATETIME(X), cast, NOW(X), CURTIME(X), etc
sql/time.cc:
  fix date_add_interval() to support MYSQL_TIMESTAMP_TIME argument
storage/myisam/ha_myisam.cc:
  TIMESTAMP no longer carries ZEROFIELD flag, still we keep MYI file compatible.
strings/my_vsnprintf.c:
  warnings
tests/mysql_client_test.c:
  old timestamp(X) does not work anymore
  datetime is no longer equal to time
2011-03-01 13:24:36 +01:00
unknown
80ac8858d5 Fix Windows test failures in binlog tests in certain time zones.
On Unix systems TZ can be set to change the time zone for specific processes only.
But on Windows this does not fully work. It changes some aspects of time zones
in the system but not others (notably localtime() vs. file system time stamps).

This causes test failures in Windows in certain time zones (but not all),
where PURGE BEFORE DATE statements get the wrong files when TZ is set to
+03:00 by default.

Fix by only setting TZ in the small number of tests that really need it, and leave
it untouched in the rest.

Thanks to Alex Budovski for helping with this.

mysql-test/include/ps_conv.inc:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/mysql-test-run.pl:
  Do not set TZ by default, as it causes problems on Windows.
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/suite/rpl/r/rpl_mixed_ddl_dml.result:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/suite/rpl/t/rpl_mixed_ddl_dml.test:
  Explicitly set TIME_ZONE, as mysql-test-run.pl now does not set it.
mysql-test/t/mysqlbinlog2-master.opt:
  mysql-test-run.pl no longer sets TZ by default, so set it explicitly for this particular test.
2010-01-19 11:36:52 +01:00
unknown
8ba21c616e Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.prod


BitKeeper/etc/ignore:
  auto-union
include/maria.h:
  Auto merged
include/my_base.h:
  Auto merged
mysql-test/include/ps_conv.inc:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/mf_iocache.c:
  Auto merged
mysys/mf_tempfile.c:
  Auto merged
mysys/my_error.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/my_open.c:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/lex.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/maria/ha_maria.cc:
  Auto merged
storage/maria/ha_maria.h:
  Auto merged
storage/maria/ma_bitmap.c:
  Auto merged
storage/maria/ma_blockrec.h:
  Auto merged
storage/maria/ma_create.c:
  Auto merged
storage/maria/ma_dynrec.c:
  Auto merged
storage/maria/ma_loghandler.h:
  Auto merged
storage/maria/ma_loghandler_lsn.h:
  Auto merged
storage/maria/ma_open.c:
  Auto merged
storage/maria/ma_pagecache.c:
  Auto merged
storage/maria/ma_pagecache.h:
  Auto merged
storage/maria/ma_test1.c:
  Auto merged
storage/maria/ma_test2.c:
  Auto merged
storage/maria/ma_update.c:
  Auto merged
storage/maria/maria_chk.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_multithread-t.c:
  Auto merged
storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
  Auto merged
storage/myisam/ft_stopwords.c:
  Auto merged
storage/myisam/mi_close.c:
  Auto merged
support-files/compiler_warnings.supp:
  Auto merged
mysys/mf_keycache.c:
  Pulled from mysql-maria tree, manual merge.
mysys/my_handler.c:
  Pulled from mysql-maria tree, manual merge.
mysys/my_symlink2.c:
  Pulled from mysql-maria tree, manual merge.
sql/mysqld.cc:
  Pulled from mysql-maria tree, manual merge.
sql/sql_table.cc:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_blockrec.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_check.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_close.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/ma_loghandler.c:
  Pulled from mysql-maria tree, manual merge.
storage/maria/maria_def.h:
  Pulled from mysql-maria tree, manual merge.
2007-07-04 12:20:53 +03:00
unknown
d6f2fda680 Fixed REPAIR/CHECK/ANALYZE TABLE for tables with new BLOCK-ROW format.
Fixed maria_chk to repair BLOCK-ROW tables.
Added CREATE options ROW_FORMAT=PAGE & TRANSACTIONAL= 0|1
More DBUG information in a lot of functions
Some minor code cleanups
Enable handler errors earlier for better clear text error messages at handler startup / standalone usage.
Don't print NULL strings in my_create_with_symlink();  Fixes core dump when used with --debug


include/maria.h:
  Added extra variables needed for REPAIR with BLOCK records
include/my_base.h:
  Added argument for opening copy of maria table without a shared object
include/my_handler.h:
  Prototypes for my_handler_error_register() & my_handler_error_unregister()
include/pagecache.h:
  Added PAGECACHE_READ_UNKNOWN_PAGE
mysql-test/include/ps_conv.inc:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/maria.result:
  Moved some things to maria-connect.test
  Updared results as REPAIR now works
  Added tests for creation option TRANSACTIONAL
mysql-test/r/ps_2myisam.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_3innodb.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_4heap.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_5merge.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_7ndb.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/r/ps_maria.result:
  Enforce creation of table as MyISAM (to allow one to use --default-storage-engine)
mysql-test/t/maria.test:
  Moved some things to maria-connect.test
  Updared results as REPAIR now works
  Added tests for creation option TRANSACTIONAL
mysys/mf_iocache.c:
  More debugging
mysys/mf_tempfile.c:
  Added missing close()
mysys/my_error.c:
  init_glob_errs() is now done in my_init()
mysys/my_handler.c:
  Added functions to initialize handler error messages
mysys/my_init.c:
  Moevd init_glob_errs() here.
mysys/my_open.c:
  More comments
  More debugging
  Code cleanup (join multiple code paths) and indentation fixes. No change in logic.
mysys/my_symlink2.c:
  Don't print NULL strings
sql/handler.cc:
  Added printing of PAGE row type
  Moved out initializing of handler errors to allow handler to give better error messages at startup
sql/handler.h:
  ROW_TYPE_PAGES -> ROW_TYPE_PAGE
sql/lex.h:
  Added 'PAGE' and 'TRANSACTIONAL'
sql/mysqld.cc:
  Initialize handler error messages early to get better error messages from handler startup
sql/sql_show.cc:
  ROW_TYPE_PAGES -> ROW_TYPE_PAGE
sql/sql_table.cc:
  Removed not needed initializer
sql/sql_yacc.yy:
  Added CREATE options ROW_FORMAT=PAGE and TRANSACTIONAL=[0|1]
sql/table.cc:
  Store transactional flag in .frm
  More comments
sql-bench/example:
  Better example
sql/table.h:
  Added transactional table option
storage/maria/ha_maria.cc:
  More debug information
  Enable REPAIR
  Detect usage of TRANSACTIONAL table option
storage/maria/ma_bitmap.c:
  More comments (from Guilhem)
storage/maria/ma_blockrec.c:
  SANITY_CHECK -> SANITY_CHECKS (fixed typo)
  Write out pages on delete even if there is no rows. (Fixed problem with REPAIR)
  Removed some ASSERTS to runtime checks (for better REPAIR)
  Fixed bug when scanning rows
  More DBUG information
storage/maria/ma_check.c:
  Partial rewrite to allow REPAIR of BLOCK/PAGE format.
  Repair of BLOCK format rows is for now only done with 'maria_repair()' (= repair through key cache)
  The new logic to repair rows with BLOCK format is:
  
  - Create new, unrelated MARIA_HA of the table
  - Create new datafile and associate it with new handler
  - Reset all statistic information in new handler
  - Copy all data to new handler with normal write operations
  - Move state of new handler to old handler
  - Close new handler
  - Close data file in old handler
  - Rename old data file to new data file.
  - Reopen data file in old handler
storage/maria/ma_close.c:
  REmoved not needed block
storage/maria/ma_create.c:
  Swap arguments to _ma_initialize_data_file()
storage/maria/ma_delete_all.c:
  Split maria_delete_all_rows() to two functions to allow REPAIR to easily reset all status information.
storage/maria/ma_dynrec.c:
  Added checksum argument to _ma_rec_check (multi-thread fix)
storage/maria/ma_info.c:
  Indentation fix
storage/maria/ma_init.c:
  Register error message to get better error message on init and when using as standalone module.
storage/maria/ma_loghandler.c:
  Fixed typo that disabled some error detection by valgrind
storage/maria/ma_open.c:
  Added 'calc_check_checksum()'
  Don't log things during repair
  Added option HA_OPEN_COPY to allow one to open a Maria table with an independent share (required by REPAIR)
storage/maria/ma_pagecache.c:
  Fixed some compiler warnings
  Added support for PAGECACHE_READ_UNKNOWN_PAGE (used for scanning file without knowing page types)
storage/maria/ma_test_all.sh:
  More test of REPAIR
storage/maria/ma_update.c:
  Optimized checksum code
storage/maria/maria_chk.c:
  Use DBUG_SET_INITIAL() to get DBUG to work with --parallel-repair
  Ensure we always use maria_repair() for BLOCK format (for now)
  More DBUG information
storage/maria/maria_def.h:
  For now, always run with more checkings (SANITY_CHECKS)
  Added share->calc_check_checksum to be used with REPAIR / CHECK table.
  Swaped arguments to _ma_initialize_data_file()
storage/myisam/ft_stopwords.c:
  Added DBUG information
mysql-test/r/maria-connect.result:
  New BitKeeper file ``mysql-test/r/maria-connect.result''
mysql-test/t/maria-connect.test:
  New BitKeeper file ``mysql-test/t/maria-connect.test''
2007-07-01 16:20:57 +03:00
unknown
7bb6a72593 Bug#27590: Wrong DATE/DATETIME comparison.
DATE and DATETIME can be compared either as strings or as int. Both
methods have their disadvantages. Strings can contain valid DATETIME value
but have insignificant zeros omitted thus became non-comparable with
other DATETIME strings. The comparison as int usually will require conversion
from the string representation and the automatic conversion in most cases is
carried out in a wrong way thus producing wrong comparison result. Another
problem occurs when one tries to compare DATE field with a DATETIME constant.
The constant is converted to DATE losing its precision i.e. losing time part.

This fix addresses the problems described above by adding a special
DATE/DATETIME comparator. The comparator correctly converts DATE/DATETIME
string values to int when it's necessary, adds zero time part (00:00:00)
to DATE values to compare them correctly to DATETIME values. Due to correct
conversion malformed DATETIME string values are correctly compared to other
DATE/DATETIME values.

As of this patch a DATE value equals to DATETIME value with zero time part.
For example '2001-01-01' equals to '2001-01-01 00:00:00'.

The compare_datetime() function is added to the Arg_comparator class.
It implements the correct comparator for DATE/DATETIME values.
Two supplementary functions called get_date_from_str() and get_datetime_value()
are added. The first one extracts DATE/DATETIME value from a string and the
second one retrieves the correct DATE/DATETIME value from an item.
The new Arg_comparator::can_compare_as_dates() function is added and used
to check whether two given items can be compared by the compare_datetime()
comparator.
Two caching variables were added to the Arg_comparator class to speedup the
DATE/DATETIME comparison.
One more store() method was added to the Item_cache_int class to cache int
values.
The new is_datetime() function was added to the Item class. It indicates
whether the item returns a DATE/DATETIME value.


sql/item.cc:
  Bug#27590: Wrong DATE/DATETIME comparison.
  One more store() method was added to the Item_cache_int class to cache int
  values.
  The new is_datetime() function was added to the Item class. It indicates
  whether the item returns a DATE/DATETIME value.
sql/item.h:
  Bug#27590: Wrong DATE/DATETIME comparison.
  One more store() method was added to the Item_cache_int class to cache int
  values.
  The new is_datetime() function was added to the Item class. It indicates
  whether the item returns a DATE/DATETIME value.
sql/item_cmpfunc.cc:
  Bug#27590: Wrong DATE/DATETIME comparison.
  The compare_datetime() function is added to the Arg_comparator class.
  It implements the correct comparator for DATE/DATETIME values.
  Two supplementary functions called get_date_from_str() and get_datetime_value()
  are added. The first one extracts DATE/DATETIME value from a string and the
  second one retrieves the correct DATE/DATETIME value from an item.
  The new Arg_comparator::can_compare_as_dates() function is added and used
  to check whether two given items can be compared by the compare_datetime()
  comparator.
sql/item_cmpfunc.h:
  Bug#27590: Wrong DATE/DATETIME comparison.
  The compare_datetime() function is added to the Arg_comparator class.
  It implements the correct comparator for DATE/DATETIME values.
  Two supplementary functions called get_date_from_str() and get_datetime_value()
  are added. The first one extracts DATE/DATETIME value from a string and the
  second one retrieves the correct DATE/DATETIME value from an item.
  The new Arg_comparator::can_compare_as_dates() function is added and used
  to check whether two given items can be compared by the compare_datetime()
  comparator.
  Two caching variables were added to the Arg_comparator class to speedup the
  DATE/DATETIME comparison.
mysql-test/include/ps_conv.inc:
  Test case adjusted after fix for bug#27590.
mysql-test/r/distinct.result:
  Test cases results are corrected after fix for bug#27590.
sql/sql_select.cc:
  Bug#27590: Wrong DATE/DATETIME comparison.
  The test_if_equality_guarantees_uniqueness() function now uses
  Arg_comparator::can_compare_as_dates() to detect comparable DATE/DATETIME items.
mysql-test/r/ps_2myisam.result:
  The result of the adjusted test case after fix for bug#27590.
mysql-test/r/ps_3innodb.result:
  The result of the adjusted test case after fix for bug#27590.
mysql-test/r/ps_4heap.result:
  The result of the adjusted test case after fix for bug#27590.
mysql-test/r/ps_5merge.result:
  The result of the adjusted test case after fix for bug#27590.
mysql-test/r/subselect.result:
  Test cases results are corrected after fix for bug#27590.
mysql-test/r/type_datetime.result:
  Added a test case for the bug#27590: Wrong DATE/DATETIME comparison.
mysql-test/t/type_datetime.test:
  Added a test case for the bug#27590: Wrong DATE/DATETIME comparison.
tests/mysql_client_test.c:
  Test case adjusted after fix for bug#27590.
2007-04-27 00:12:09 +04:00
unknown
fed9bb9820 Bug #21103: DATE column not compared as DATE
If we compare two items A and B, with B being (a constant) of a
larger type, then A gets promoted to B's type for comparison if
it's a constant, function, or CAST() column, but B gets demoted
to A's type if A is a (not explicitly CAST()) column. This is
counter-intuitive and not mandated by the standard.
 
Disabling optimisation where it would be lossy so field value
will properly get promoted and compared as binary string (rather
than as integers).


mysql-test/include/ps_conv.inc:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/func_time.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Show that everything works as expected.
mysql-test/r/ps_2myisam.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_3innodb.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_4heap.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_5merge.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/r/ps_7ndb.result:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Fix certain queries to still work.
mysql-test/t/func_time.test:
  Bug #21103: DATE column not compared as DATE
  
  When comparing a DATE field with a DATETIME constant, we now compare
  as DATETIMEs, not as DATEs.  Show that everything works as expected.
sql/field.cc:
  Bug #21103: DATE column not compared as DATE
  
  #0 stores the date only as a 3-byte integer; save_in_field() in
  #1 saves 'this' in field's format (DATE), #2 "converts a constant
  item to an int and replaces the original item" -- consequently,
  this replaces the Item_string "2006-11-06 04:08:36.0" with the
  Item_int_with_ref 20061106.
  
  #0  Field_newdate::store (this=0x8d26880, from=0x8d5e658 "2006-11-06
  04:08:36.0", len=21, cs=0x88022c0) at field.cc:5344
  #1  0x0817e3b0 in Item_string::save_in_field (this=0x8d5e670, field=0x8d26880, no_conversions=true) at item.cc:4340
  #2  0x081b22ae in convert_constant_item (thd=0x8d25240, field=0x8d26880, item=0x8d5e74c) at item_cmpfunc.cc:245
  #3  0x081b8a36 in Item_bool_func2::fix_length_and_dec (this=0x8d5e6f8) at item_cmpfunc.cc:309
  #4  0x081a3427 in Item_func::fix_fields (this=0x8d5e6f8, thd=0x8d25240, ref=0x8d5f5fc) at item_func.cc:190
  #5  0x0825bc2d in setup_conds (thd=0x8d25240, tables=0x8d5e410, leaves=0x8d5e410, conds=0x8d5f5fc) at sql_base.cc:4941
  ...
  
  Disabling optimisation where it would be lossy so field value will
  properly get promoted and compared as binary string (rather than as
  integers).
2007-03-02 15:23:13 +01:00
unknown
173e5df37f Merge mishka.local:/home/my/mysql-4.1
into  mishka.local:/home/my/mysql-5.0


BitKeeper/etc/ignore:
  auto-union
BitKeeper/deleted/.del-Grep.cpp~ad798e9ae519d667:
  Auto merged
BitKeeper/deleted/.del-Grep.hpp~b05e3af6cfabe387:
  Auto merged
BitKeeper/deleted/.del-ctype_cp932.result:
  Auto merged
BitKeeper/deleted/.del-ctype_cp932.test:
  Auto merged
BitKeeper/deleted/.del-have_lowercase0.inc:
  Delete: mysql-test/include/have_lowercase0.inc
VC++Files/mysql-test/mysql_test_run_new.dsp:
  Auto merged
configure.in:
  Auto merged
mysql-test/include/ps_conv.inc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
VC++Files/client/mysqltest.dsp:
  manual merge
VC++Files/sql/mysqld.dsp:
  manual merge
mysql-test/r/grant2.result:
  patch merge
mysql-test/r/subselect2.result:
  manual merge
mysql-test/t/grant2.test:
  patch merge
mysys/charset.c:
  Remove already deleted function
sql/examples/ha_archive.h:
  Manual merge
sql/sql_acl.cc:
  manual merge
sql/sql_db.cc:
  merge (no differences)
sql/sql_select.cc:
  manual merge
sql/table.h:
  merge (no differences)
tests/mysql_client_test.c:
  patch merge
2005-08-25 06:55:48 +03:00
unknown
13c347e7e7 ps_conv.inc:
Adjustment of float results for Windows
mysql-test-run.pl:
  Added --port to make MYSQL_DUMP and MYSQL_SHOW work on windows
have_lowercase0.inc:
  new file


mysql-test/mysql-test-run.pl:
  Added --port to make MYSQL_DUMP and MYSQL_SHOW work on windows
mysql-test/include/ps_conv.inc:
  Adjustment of float results for Windows
2005-08-18 22:27:12 +02:00
unknown
31c7faaca4 The BIT patch by ramil causes that the old data type BIT is no
longer available for most storage engines.
Therefore column c18 BIT is switched TINYINT .


mysql-test/include/ps_conv.inc:
  updated comment
mysql-test/include/ps_create.inc:
  replaced the data type bit with tinyint
mysql-test/r/ps_1general.result:
  updated results
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
mysql-test/r/ps_7ndb.result:
  updated results
mysql-test/t/ps_4heap.test:
  replaced the data type bit with tinyint
mysql-test/t/ps_5merge.test:
  replaced the data type bit with tinyint
2004-12-17 14:27:39 +01:00
unknown
853c2c788c A lot of fixes for prepared statements (PS):
New mysqltest that can run mysqltest with PS
Added support for ZEROFILL in PS
Fixed crash when one called mysql_stmt_store_result() without a preceding mysql_stmt_bind_result()
Updated test cases to support --ps-protocol
(Some tests are still run using old protocol)
Fixed crash in PS when using SELECT * FROM t1 NATURAL JOIN t2...
Fixed crash in PS when using sub queries
Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever"
Fixed wrong permissions check in PS and multi-table updates (one could get permission denied for legal quries)
Fix for PS and SELECT ... PROCEDURE
Reset all warnings when executing a new PS query
group_concat(...ORDER BY) didn't work with PS
Fixed problem with test suite when not using innodb


BitKeeper/deleted/.del-innodb-lock-master.opt~f76a4a1999728f87:
  Delete: mysql-test/t/innodb-lock-master.opt
client/Makefile.am:
  mysqltest now uses regex
client/mysqltest.c:
  Added support for testing of prepared statements (with --ps-protocol)
  Main code was done by Kent, I did mainly some cleanups and minor bug fixes
  New test commands:
  --disable_ps_protocol
  --enable_ps_protocol
  NOTE: new code still has some things that needs to be cleaned up.
  For example run_query_stmt_handle_error() should be made more general so that same code can be used also by 'normal' queries
configure.in:
  mysqltest now uses regex
libmysql/libmysql.c:
  Reset warning_count after prepare (safety). In the future we should also provide warnings on prepare
  integer -> string conversion now handles ZEROFILL
  double -> string conversion is now closer to the one in the server
  Fixed crash when one called mysql_stmt_store_result() without preceding mysql_stmt_bind_result()
libmysqld/examples/Makefile.am:
  mysqltest now uses regex
mysql-test/include/have_query_cache.inc:
  Fixes for --ps-protocol
mysql-test/include/ps_conv.inc:
  Fixes for --ps-protocol
mysql-test/mysql-test-run.sh:
  Added options --ps-protocol
mysql-test/r/ctype_utf8.result:
  Fixed test case
mysql-test/r/fulltext_cache.result:
  Changed output of MATCH to use round() to get same numbers with --ps-protocol
mysql-test/r/fulltext_left_join.result:
  Changed output of MATCH to use round() to get same numbers with --ps-protocol
mysql-test/r/fulltext_multi.result:
  Changed output of MATCH to use round() to get same numbers with --ps-protocol
mysql-test/r/innodb-lock.result:
  Fixed test to work even if Innodb is not compiled in.
mysql-test/t/create.test:
  Fixes for --ps-protocol
mysql-test/t/ctype_utf8.test:
  Remove warnings
mysql-test/t/date_formats.test:
  Fixes for --ps-protocol
mysql-test/t/fulltext_cache.test:
  Changed output of MATCH to use round() to get same numbers with --ps-protocol
mysql-test/t/fulltext_left_join.test:
  Changed output of MATCH to use round() to get same numbers with --ps-protocol
mysql-test/t/fulltext_multi.test:
  Changed output of MATCH to use round() to get same numbers with --ps-protocol
mysql-test/t/func_group.test:
  Fixes for --ps-protocol
mysql-test/t/func_sapdb.test:
  Fixes for --ps-protocol
mysql-test/t/innodb-lock.test:
  Fixed test to work even if Innodb is not compiled in.
mysql-test/t/insert.test:
  Fixes for --ps-protocol
mysql-test/t/insert_select.test:
  Fixes for --ps-protocol
mysql-test/t/insert_update.test:
  Fixes for --ps-protocol
mysql-test/t/metadata.test:
  Fixes for --ps-protocol
mysql-test/t/multi_statement.test:
  Fixes for --ps-protocol
mysql-test/t/ps_1general.test:
  Fixes for --ps-protocol
mysql-test/t/rollback.test:
  Fixes for --ps-protocol
mysql-test/t/rpl_redirect.test:
  Fixes for --ps-protocol
mysql-test/t/rpl_user_variables.test:
  Fixes for --ps-protocol
mysql-test/t/select.test:
  Fixes for --ps-protocol
mysql-test/t/status.test:
  Fixes for --ps-protocol
mysql-test/t/type_blob.test:
  Fixes for --ps-protocol
mysql-test/t/type_float.test:
  Fixes for --ps-protocol
mysql-test/t/union.test:
  Fixes for --ps-protocol
mysql-test/t/warnings.test:
  Fixes for --ps-protocol
mysys/my_alloc.c:
  More debugging information
sql-common/client.c:
  More debugging information
sql-common/my_time.c:
  TIME didn't support full range with PS
sql/field.cc:
  TIME didn't support full range with PS
sql/item_cmpfunc.cc:
  IN(constants,...) didn't work with PS
sql/item_subselect.cc:
  Some subqueries didn't work with PS
sql/item_sum.cc:
  group_concat(...ORDER BY) didn't work with PS
  Removed variable warning_available as 'warning' can be used for this.
sql/item_sum.h:
  Removed not needed variable
sql/protocol.cc:
  TIME didn't support full range with PS
sql/set_var.cc:
  Style fix
sql/sql_base.cc:
  setup_wild() didn't properly restore old arena, which caused core dump in PS when using
  SELECT * FROM t1 NATURAL JOIN t2...
sql/sql_class.cc:
  Style fix
sql/sql_error.cc:
  Style fix
sql/sql_insert.cc:
  Create table didn't signal when table was created. This could cause a "DROP TABLE created_table" in another thread to wait "forever"
sql/sql_lex.h:
  Fix for PS and procedures
sql/sql_parse.cc:
  More debugging information
  Make a copy of 'db' in PS as this may change
  Fixed wrong permissions check in PS and multi-table updates
sql/sql_prepare.cc:
  Fix for PS and SELECT ... PROCEDURE
  Reset all warnings when executing a new query
sql/sql_union.cc:
  Fixes for PS and SELECT ... PROCEDURE
  Reset 'with_wild' as 'wild' is resolved on prepare
2004-10-26 19:30:01 +03:00
unknown
22cca35841 Some of the recently pushed prepared statements
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.
2004-09-28 21:44:42 +04:00
unknown
9ff04fe526 Results of WL#1856 "Conversion of client_test.c tests cases to mysqltest
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.
2004-09-25 19:08:02 +04:00