Commit graph

24 commits

Author SHA1 Message Date
unknown
2a76abce96 Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption
Problem: we believe a number cannot start with '-' ['+'] sign reading rows.

Fix: let field->store() check given values.


mysql-test/r/csv.result:
  Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption
    - test result.
mysql-test/t/csv.test:
  Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption
    - test case.
storage/csv/ha_tina.cc:
  Fix for bug #29353: inserting a negative value to a csv table leads to the table corruption
    - code optimization: removed unnecessary file_buff->get_value() calls.
    - let field->store() check given value correctness.
2007-06-27 16:20:00 +05:00
unknown
1805b34e04 Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28862
into  mysql.com:/home/bar/mysql-work/mysql-5.1.b28862


mysql-test/r/csv.result:
  After merge fix
mysql-test/t/csv.test:
  After merge fix
storage/csv/ha_tina.cc:
  After merge fix
2007-06-15 11:27:10 +05:00
unknown
39700afdb9 Bug#28862 Extended Latin1 characters get lost in CVS engine
Problem: Temporary buffer which is used for quoting and escaping
  was initialized to character set utf8, and thus didn't allow
  to store data in other character sets.
  Fix: changing character set of the buffer to be able to
  store any arbitrary sequence of bytes.


mysql-test/r/csv.result:
  Adding test case
mysql-test/t/csv.test:
  Adding test case
sql/examples/ha_tina.cc:
  Changing character set of the buffer to "binary".
2007-06-15 11:19:35 +05:00
unknown
9e5efc371a Remove non portable exec's from csv.test
mysql-test/r/csv.result:
  Update result file
   - There is no builtin equvivalent of "cat"
   - ls was replaced with "file_exists" which does not produce any output
mysql-test/t/csv.test:
  Replce obscure exec's with mysqltest builtin commands
2007-02-19 17:06:47 +01:00
unknown
c1bcbe2973 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime


mysql-test/t/trigger.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
mysql-test/r/csv.result:
  Manual merge.
mysql-test/t/csv.test:
  Manual merge.
2007-01-11 22:15:20 +03:00
unknown
8bd11441fd The CSV format has always relied on numbers being quoted, which doesn't always happen. This fixes that so that numbers can now be unquoted (and the output does this as well so that the log takes up less space).
mysql-test/r/csv.result:
  Fixed test case for format change. Added new test for floating point numbers.
mysql-test/t/csv.test:
  Fixed test for format change. Added test case for floating point numbers.
storage/csv/ha_tina.cc:
  Updated code to handle numbers as raw unquotes types in CSV
2007-01-04 11:41:17 -08:00
unknown
ebd5aec15e Fix Bug #21328 mysqld issues warnings on ALTER CSV table to MyISAM
mysql-test/r/csv.result:
  update result file
mysql-test/r/log_tables.result:
  log_tables test contains alter of a CSV table with
  NULLs which results in warnings. In fact this is how
  the bug noticed. So, now when it is fixed we should
  update result file.
mysql-test/t/csv.test:
  add a test for the bug
storage/csv/ha_tina.cc:
  We should write 0 to the data file in the
  case we meet NULL. CSV does not support
  NULL values internally and we shouldn't
  distinguish them from 0 when writing a row
  (the alternative is to implement full NULL
  support). Otherwise other routines (such as
  Field::check_int() become confused).
  In 5.0 NULLs are stored as zeroes. In 5.1 it
  somehow turned into empty string. Which is wrong.
2006-12-04 03:07:44 +03:00
unknown
dd8a33c0bc Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


BitKeeper/etc/collapsed:
  auto-union
BitKeeper/etc/ignore:
  auto-union
Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
include/m_ctype.h:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/csv.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/csv.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
vio/viosocket.c:
  Auto merged
2006-10-17 11:23:07 -04:00
unknown
9cf998e6a9 Update tests and result files after running with new mysqltest that better detects problems with test files
mysql-test/r/csv.result:
  Update after add of missing semicolon
mysql-test/r/drop.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/flush.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/flush_block_commit.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/flush_read_lock_kill.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/grant2.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/handler.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/innodb_notembedded.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/kill.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/lock_multi.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/multi_update.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/mysqltest.result:
  Update result
mysql-test/r/query_cache.result:
  Update after add of missing semicolon
mysql-test/r/query_cache_notembedded.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/sp-threads.result:
  Update result file, no space before commands that has been "sent"
mysql-test/r/sp_notembedded.result:
  Update after add of missing semicolon
mysql-test/r/type_blob.result:
  Remove extra drop table
mysql-test/t/csv.test:
  Add missing semicolon
mysql-test/t/query_cache.test:
  Add missing semicolon
mysql-test/t/sp-error.test:
  Remove "tab" from end of error declaration
mysql-test/t/sp.test:
  Wrong delimiter, used ; instead of |
mysql-test/t/sp_notembedded.test:
  Wrong delimiter, used ; instead of |
mysql-test/t/view_grant.test:
  An incomplete error name specification was used.
2006-10-04 13:09:37 +02:00
unknown
ea4c934a40 Merge shellback.(none):/home/msvensson/mysql/my51-mysqltest-new-commands
into  shellback.(none):/home/msvensson/mysql/same_tools/my51-same_tools


client/Makefile.am:
  Auto merged
mysql-test/r/csv.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/sp_notembedded.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/csv.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
client/mysqltest.c:
  Manual merge
mysql-test/r/mysqltest.result:
  Manual merge
mysql-test/t/mysqltest.test:
  Manual merge
2006-09-29 11:32:09 +02:00
unknown
71401eacca Bug#22080
"CHECK fails to identify some corruption"
  change to allow it to detect more errors in data format


mysql-test/r/csv.result:
  Test for bug
mysql-test/t/csv.test:
  Test for bug
2006-09-25 09:04:19 -07:00
unknown
d08dd523a2 Merge mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
into  mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin


storage/csv/ha_tina.cc:
  merge later
mysql-test/r/csv.result:
  manual merge
mysql-test/t/csv.test:
  manual merge
2006-08-23 17:15:24 +04:00
unknown
01b65e9032 Remove spurios junk in result file caused by previous missing semicolon 2006-07-29 13:01:07 +02:00
unknown
83aade7387 Fix Bug#15205 "Select from CSV table without the datafile causes crash"
mysql-test/r/csv.result:
  update result file
mysql-test/t/csv.test:
  add a test for the bug
sql/examples/ha_tina.cc:
  move open() call before my_hash_insert, so that we don't insert invalid
  share to the hash. To avoid other possible problems also add
  hash_delete(), so that the share is removed from hash before it is freed.
2006-07-11 15:54:52 +04:00
unknown
96ceaeb544 WL#3244 "CSV engine: convert mmap to read/write calls"
mysql-test/r/csv.result:
  Correct result file
storage/csv/ha_tina.cc:
   Get rid of mmap in tina. Use usual reads/writes
   to access the file.
storage/csv/ha_tina.h:
    Add Transparent_file class, which hides details of access
    to the file. Perform a cleanup & add new functions.
2006-05-19 01:26:19 +04:00
unknown
79a2debe46 Close share->data_file in before renaming in ha_tina::repair
Open and seek to end of data_file after rename 
Fix comment for when file does not need repair.
Set share->mapped_file to NULL always when it's been unmapped 
Add test to see that file can be used after repair


mysql-test/r/csv.result:
  Add more test to see that the table can be used after repair
mysql-test/t/csv.test:
  Add more test to see that the table can be used after repair
storage/csv/ha_tina.cc:
  Close share->data_file in before renaming in ha_tina::repair
  Open and seek to end after rename
  Fix comment for when file does not need repair.
  Set share->mapped_file to NULL always when it's been unmapped
2006-04-11 12:12:48 +02:00
unknown
2a67aecd1a Post-review fixes for WL#3154 "Enable REPAIR for CSV tables"
mysql-test/r/csv.result:
  update result file
mysql-test/t/csv.test:
  add more tests
storage/csv/ha_tina.cc:
  post-review fixes & cleanup
storage/csv/ha_tina.h:
  post-review fixes
2006-03-29 06:28:57 +04:00
unknown
ecba6dc67b WL#3154 "Enable REPAIR for CSV tables".
This is the first commit. Cleanups are
likely to follow after the merge.


mysql-test/r/csv.result:
  update result
mysql-test/t/csv.test:
  add tests for CSV REPAIR/RESTORE.
storage/csv/ha_tina.cc:
  add repair/check and a meta-file processing for it
storage/csv/ha_tina.h:
  add new functions required for tina repair/check
2006-03-13 19:36:34 +03:00
unknown
9f5962ed25 The handlerton structures for archive and CSV had not been updated. Nicht so gute. I also fixed CSV to use fast alter table and put in a test in archive in case someone tries to do the same there (hint... it won't work).
mysql-test/r/archive.result:
  New results
mysql-test/r/csv.result:
  New results
mysql-test/t/archive.test:
  Adding test for new fast alter table
mysql-test/t/csv.test:
  Adding test for new fast alter table
sql/ha_archive.cc:
  Updating handlerton to remove warnings.
storage/csv/ha_tina.cc:
  Updating handlerton to remove warnings, and updated CSV to handle fast alter table.
storage/csv/ha_tina.h:
  New method.
2006-02-07 22:42:57 -08:00
unknown
41536fcefe WL1019: complete patch. Reapplied patch to the clean
tree to get rid of multiple typos in CS comments and
unify the patch.


configure.in:
  CSV is compiled in by default now
include/my_base.h:
  add new ha_extra flag for the log tables
mysql-test/include/im_check_os.inc:
  we should only run im tests if csv is on for now: im relies
  on mysqld options available only in csv build.
mysql-test/include/system_db_struct.inc:
  check log tables structure
mysql-test/lib/init_db.sql:
  create log tables when running tests.
mysql-test/mysql-test-run.pl:
  Add old logs flag to IM tests. As IM could only deal with
  old logs (this feature is not needed with log tables)
mysql-test/r/connect.result:
  update result
mysql-test/r/csv.result:
  update result
mysql-test/r/im_utils.result:
  update result
mysql-test/r/information_schema.result:
  update result
mysql-test/r/mysqlcheck.result:
  update result
mysql-test/r/show_check.result:
  update result
mysql-test/r/system_mysql_db.result:
  update result
mysql-test/t/connect.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/csv.test:
  add tests for concurrent insert (the functionality is added
  to CSV in this patch)
mysql-test/t/information_schema.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/mysqlcheck.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/show_check.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/system_mysql_db.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
mysql-test/t/system_mysql_db_fix.test:
  disable test if CSV engine is not in: result depends on the
  presence of CSV-based log tables
scripts/mysql_create_system_tables.sh:
  new system tables: slow_log and general_log
scripts/mysql_fix_privilege_tables.sql:
  add new log tables: use an SP to create them for
  non-csv build to work fine.
sql/ha_myisam.cc:
  move locking-related checks to the hanlder
sql/ha_myisam.h:
  new function declared
sql/handler.h:
  new virtual function is added: we should check for handler-related
  locking issues in the handler
sql/lock.cc:
  from now on we check for handler-related locking issues
  in the handler itself rather then in lock.cc
sql/log.cc:
  Add log tables support, refactoring: there are log event
  handlers with common interface. They are used by the LOGGER
  class, which is responsible for their initialization, cleanup
  and managment. Logging to the tables provided by one of the
  log event handler types.
sql/log.h:
  declare new log classes
sql/log_event.cc:
  convert old logging routines calls to use new API
sql/mysql_priv.h:
  define common log routines and objects
sql/mysqld.cc:
  Add support for the log tables. Their initalization, cleanup
  and specific options.
sql/share/errmsg.txt:
  add new error messages for the log tables
sql/slave.cc:
  convert old logging routines calls to use new API
sql/sql_base.cc:
  TABLE objects used by the logger should be skipped
  during refreshes (as log tables are always opened
  and locked). fix table_is_used to skip them.  This
  is needed for FLUSH LOGS to work
sql/sql_db.cc:
  convert old logging routines calls to use new API
sql/sql_delete.cc:
  fix TRUNCATE to work with log tables
sql/sql_parse.cc:
  command_name is now an array of LEX_STRINGs
sql/sql_prepare.cc:
  convert old logging routines calls to use new API
sql/sql_show.cc:
  convert old logging routines calls to use new API
sql/sql_table.cc:
  don't reoped the log tables for admin purposes
sql/table.cc:
  mark log tables as such during the open
sql/table.h:
  add log-related info
storage/csv/ha_tina.cc:
  add support for concurrent insert (see bk commit - 5.1 tree
  (petr:1.1910) for standalone patch), add log tables-specific
  csv table handling.
storage/csv/ha_tina.h:
  enable concurrent insert for CSV, add log table flag
mysql-test/r/log_tables.result:
  New BitKeeper file ``mysql-test/r/log_tables.result''
mysql-test/t/log_tables.test:
  New BitKeeper file ``mysql-test/t/log_tables.test''
2006-01-19 05:56:06 +03:00
unknown
f2af624e45 BUG#13406 - incorrect amount of "records deleted" in CSV.
Fallback to row-wise delete if number or rows in the table is unknown


mysql-test/r/csv.result:
  BUG#13406 - incorrect amount of "records deleted"
mysql-test/t/csv.test:
  BUG#13406 - incorrect amount of "records deleted"
sql/examples/ha_tina.cc:
  BUG#13406 - incorrect amount of "records deleted".
  Fallback to row-wise delete if number or rows in the table is unknown
sql/examples/ha_tina.h:
  BUG#13406 - incorrect amount of "records deleted".
  Fallback to row-wise delete if number or rows in the table is unknown
2005-11-17 22:52:31 +01:00
unknown
b0829011b8 Fix Bug#14672 Bug in deletion
mysql-test/r/csv.result:
  correct result file
mysql-test/t/csv.test:
  Add test for a bug
sql/examples/ha_tina.cc:
  Add O_APPEND flag to my_open. We should always add rows to the end of file
2005-11-06 02:11:12 +03:00
unknown
1b65c70413 Fix Bug#13894 Server crashes on update of CSV table
mysql-test/r/csv.result:
  update result file
mysql-test/t/csv.test:
  Add test for a bug
sql/examples/ha_tina.cc:
  sort function should return reverted values for chains to be sorted in
  the right orded. don't do a strange memmove
2005-11-05 15:08:15 +03:00
unknown
89987fa104 This is the addition of the CSV engine "aka tina". Its an example engine that works as a plain text file.
acconfig.h:
  Adding HAVE CSV rule
acinclude.m4:
  Build option of csv engine
configure.in:
  Update for building CSV
sql/Makefile.am:
  Added files for CSV build
sql/handler.cc:
  Needed options for CSV to be created.
sql/handler.h:
  CSV type engine enum.
sql/mysql_priv.h:
  Addition of the have_csv_db variable.
sql/mysqld.cc:
  Code to show csv option.
sql/set_var.cc:
  Adding have show variables for both csv and example.
2004-08-12 20:57:18 -07:00