List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:November 5 2007 3:49pm
Subject:Re: bk commit into 5.1 tree (evgen:1.2617) BUG#30081
View as plain text  
Hi!

On Nov 02, eugene@stripped wrote:
> ChangeSet@stripped, 2007-11-02 18:12:39+00:00, evgen@stripped +17 -0
>   Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't shown by the SHOW
>   FIELDS command and reported to a client.
>   
>   The fact that a timestamp field will be set to NO on UPDATE wasn't
>   shown by the SHOW COMMAND and reported to a client through
>   connectors. This led to problems in the ODBC connector and might
>   lead to a user confusion.
>   
>   A new filed flag called ON_UPDATE_NOW_FLAG is added.  Constructors
>   of the Field_timestamp set it when a field should be set to NOW on
>   UPDATE.
>   
>   The get_schema_column_record function now reports whether a
>   timestamp field will be set to NOW on UPDATE.

Ok to push without new tests (in information_schema.test and in
mysql_client_test.c.
 
> diff -Nrup a/mysql-test/t/information_schema.test
> b/mysql-test/t/information_schema.test
> --- a/mysql-test/t/information_schema.test	2007-10-29 10:48:06 +00:00
> +++ b/mysql-test/t/information_schema.test	2007-11-02 18:02:44 +00:00
> @@ -1088,6 +1089,14 @@ create table t1 (
>  select column_default from information_schema.columns where table_name= 't1';
>  show columns from t1;
>  drop table t1;
> +
> +#
> +# Bug#30081: "ON UPDATE CURRENT_TIMESTAMP" wasn't showed by the SHOW FIELDS
> +#            command and reported to a client.
> +#
> +CREATE TABLE t1 (a TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b TIMESTAMP);
> +SHOW FIELDS FROM t1;
> +DROP TABLE t1;

This wasn't necessary - there were many tests that used SHOW FIELDS and
that now show on update CURRENT_TIMESTAMP.

Also, you don't test that protocol now shows a new flag. But other tests
show it, so it's not necessary to test here either.

> diff -Nrup a/tests/mysql_client_test.c b/tests/mysql_client_test.c
> --- a/tests/mysql_client_test.c 2007-08-15 14:21:36 +00:00
> +++ b/tests/mysql_client_test.c 2007-09-12 16:17:23 +00:00
> @@ -16105,6 +16105,40 @@ static void test_bug28075()
>  
> +
> +static void test_bug30081()
> +{
> +  MYSQL_FIELD *field;
> +  int rc;
> +  MYSQL_RES *res;
> +
> +  DBUG_ENTER("test_bug30081");
> +  myheader("test_bug30081");

Ah, here's you protocol test.
What I said above holds - this test is not necessary, mysqltest can do
it.

Regards / Mit vielen Grüssen,
Sergei

-- 
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <serg@stripped>
 / /|_/ / // /\ \/ /_/ / /__  Principal Software Developer
/_/  /_/\_, /___/\___\_\___/  MySQL GmbH, Dachauer Str. 37, D-80335 München
       <___/                  Geschäftsführer: Kaj Arnö - HRB
München 162140
Thread
bk commit into 5.1 tree (evgen:1.2617) BUG#30081eugene2 Nov
  • Re: bk commit into 5.1 tree (evgen:1.2617) BUG#30081Sergei Golubchik5 Nov