diff options
author | unknown <petr@mysql.com> | 2006-03-06 21:03:17 +0300 |
---|---|---|
committer | unknown <petr@mysql.com> | 2006-03-06 21:03:17 +0300 |
commit | 5fd44f2cc63a634c72d2e32dce4341fedf998544 (patch) | |
tree | 4375d3aca653977a2ee427891ba60e3faf4a5799 /mysql-test | |
parent | f2de9e820e0adb920b9801928977f46f4cf5ca78 (diff) | |
download | mariadb-git-5fd44f2cc63a634c72d2e32dce4341fedf998544.tar.gz |
Fix Bug#17600: Invalid data logged into mysql.slow_log
Recommit with post-review fixes.
mysql-test/r/log_tables.result:
update result
mysql-test/t/log_tables.test:
add a test
sql/log.cc:
Fix NULL handling in log tables
storage/csv/ha_tina.cc:
Explicitly check fo NULLs, when writing a row.
We should not hope, that the null field was
cleaned up.
Though usually we do call Field::reset() or
restore_row(), before calling Field::set_null(),
this depency is neither documented nor enforced
by other means.
mysql-test/t/log_tables-master.opt:
New BitKeeper file ``mysql-test/t/log_tables-master.opt''
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/log_tables.result | 8 | ||||
-rw-r--r-- | mysql-test/t/log_tables-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/log_tables.test | 10 |
3 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index f75cf503938..2164c18823f 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -64,3 +64,11 @@ TIMESTAMP root[root] @ localhost [] 2 1 Query create table bug16905 (s char(15) TIMESTAMP root[root] @ localhost [] 2 1 Query insert into bug16905 values ('новое') TIMESTAMP root[root] @ localhost [] 2 1 Query select * from mysql.general_log drop table bug16905; +truncate table mysql.slow_log; +set session long_query_time=1; +select sleep(2); +sleep(2) +0 +select * from mysql.slow_log; +start_time user_host query_time lock_time rows_sent rows_examined db last_insert_id insert_id server_id sql_text +TIMESTAMP, root[root] @ localhost [] USER_HOST, QUERY_TIME 1 0 test 0 0 1 select sleep(2) diff --git a/mysql-test/t/log_tables-master.opt b/mysql-test/t/log_tables-master.opt new file mode 100644 index 00000000000..35ff7911705 --- /dev/null +++ b/mysql-test/t/log_tables-master.opt @@ -0,0 +1 @@ +--log-slow-queries diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 7b7c30f002f..8fcbb31b0d5 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -160,6 +160,16 @@ insert into bug16905 values ('новое'); select * from mysql.general_log; drop table bug16905; +# +# Bug #17600: Invalid data logged into mysql.slow_log +# + +truncate table mysql.slow_log; +set session long_query_time=1; +select sleep(2); +--replace_column 1 TIMESTAMP, 3 USER_HOST, 4 QUERY_TIME +select * from mysql.slow_log; + # kill all connections disconnect con1; disconnect con2; |