diff options
author | unknown <monty@mysql.com> | 2005-03-30 16:00:31 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-03-30 16:00:31 +0300 |
commit | a5b1b9d92474e4e1e30e7b1a3570cf4531533b03 (patch) | |
tree | 805fffb7b7262d7e59f1fd8969a0c1670de80a88 /sql/log_event.cc | |
parent | a391ef8dda3326a421f804bb34b4be48782a2848 (diff) | |
download | mariadb-git-a5b1b9d92474e4e1e30e7b1a3570cf4531533b03.tar.gz |
Give warnings if wrong date/time/datetime argument for STR_TO_DATE
Small fixes while doing review of new pushed code
More test cases for decimal
mysql-test/r/date_formats.result:
Warnings added for STR_TO_DATE()
mysql-test/r/ps_1general.result:
Better description for BLACKHOLE
mysql-test/r/strict.result:
Added tests for STR_TO_DATE
mysql-test/r/type_decimal.result:
Test to test ranges of DECIMAL
mysql-test/t/date_formats.test:
More tests
mysql-test/t/strict.test:
Added tests for STR_TO_DATE
mysql-test/t/type_decimal.test:
Test to test ranges of DECIMAL
sql/field.cc:
Simple optimization
sql/handler.cc:
Better description for BLACKHOLE
sql/item_timefunc.cc:
Give warnings if wrong date/time/datetime argument for STR_TO_DATE
sql/log_event.cc:
Indentation fixes
sql/log_event.h:
#ifdef-ed not used code
sql/share/errmsg.txt:
New error message
sql/sql_show.cc:
Ensure that we do a proper restore in case of error
Diffstat (limited to 'sql/log_event.cc')
-rw-r--r-- | sql/log_event.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index cf145e33d1e..f5e39b166fb 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1052,17 +1052,17 @@ bool Query_log_event::write(IO_CACHE* file) of this x>=4 master segfault (expecting a zero when there is none). Remaining compatibility problems are: the older slave will not find the catalog; but it is will not crash, and it's not an issue - that it does not find the catalog as catalogs were not used in these older - MySQL versions (we store it in binlog and read it from relay log but do - nothing useful with it). What is an issue is that the older slave will - stop processing the Q_* blocks (and jumps to the db/query) as soon as it - sees unknown Q_CATALOG_NZ_CODE; so it will not be able to read + that it does not find the catalog as catalogs were not used in these + older MySQL versions (we store it in binlog and read it from relay log + but do nothing useful with it). What is an issue is that the older slave + will stop processing the Q_* blocks (and jumps to the db/query) as soon + as it sees unknown Q_CATALOG_NZ_CODE; so it will not be able to read Q_AUTO_INCREMENT*, Q_CHARSET and so replication will fail silently in various ways. Documented that you should not mix alpha/beta versions if they are not exactly the same version, with example of 5.0.2<->5.0.3 and 5.0.3<->5.0.4. If replication is from older to new, the new won't find the catalog and will have the same problems. - */ + */ } if (auto_increment_increment != 1) { @@ -1264,7 +1264,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len, } case Q_CATALOG_NZ_CODE: if ((catalog_len= *pos)) - catalog= (char*) pos+1; // Will be copied later + catalog= (char*) pos+1; // Will be copied later pos+= catalog_len+1; break; case Q_AUTO_INCREMENT: @@ -4192,7 +4192,8 @@ int Append_block_log_event::exec_event(struct st_relay_log_info* rli) goto err; } } - else if ((fd = my_open(fname, O_WRONLY|O_APPEND|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0) + else if ((fd = my_open(fname, O_WRONLY | O_APPEND | O_BINARY | O_NOFOLLOW, + MYF(MY_WME))) < 0) { slave_print_error(rli, my_errno, "Error in %s event: could not open file '%s'", @@ -4405,7 +4406,8 @@ int Execute_load_log_event::exec_event(struct st_relay_log_info* rli) Load_log_event* lev = 0; memcpy(p, ".info", 6); - if ((fd = my_open(fname, O_RDONLY|O_BINARY|O_NOFOLLOW, MYF(MY_WME))) < 0 || + if ((fd = my_open(fname, O_RDONLY | O_BINARY | O_NOFOLLOW, + MYF(MY_WME))) < 0 || init_io_cache(&file, fd, IO_SIZE, READ_CACHE, (my_off_t)0, 0, MYF(MY_WME|MY_NABP))) { |