diff options
author | unknown <monty@mishka.mysql.fi> | 2005-09-14 01:41:44 +0300 |
---|---|---|
committer | unknown <monty@mishka.mysql.fi> | 2005-09-14 01:41:44 +0300 |
commit | f8f1c01675858dcd30d2f29ed3cbc8284baf189e (patch) | |
tree | fed5fb311670c7f36e10dc2e65ab02177c47316a /sql-common/client.c | |
parent | b50eb4cd42d2d5073afb2af5af8b19c825a9cca1 (diff) | |
download | mariadb-git-f8f1c01675858dcd30d2f29ed3cbc8284baf189e.tar.gz |
Added option --valgrind-mysqltest to mysql-test-run
Added flag to Field::store(longlong) to specify if value is unsigned.
This fixes bug #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
Fixed warning from valgrind in CREATE ... SELECT
Fixed double free of mysql.options if reconnect failed
mysql-test/mysql-test-run.sh:
Added option --valgrind-mysqltest to allow one to run mysqltest with valgrind
mysql-test/r/bigint.result:
Update results after fix for Field::store(longlong)
mysql-test/r/range.result:
Update results after fix for Field::store(longlong)
mysql-test/r/strict.result:
Update results after fix for Field::store(longlong)
(This fixes some wrong results when storing things into bigint columns)
mysql-test/r/type_ranges.result:
Update results after fix for Field::store(longlong)
mysql-test/t/bigint.test:
Added testing for #12750: Incorrect storage of 9999999999999999999 in DECIMAL(19, 0)
mysql-test/t/innodb.test:
Removed comments affected by this bug fix
mysql-test/t/mysqldump.test:
Fixed result to not depend on existing config files
mysql-test/t/range.test:
0xff numbers are now unsigned
mysql-test/t/strict.test:
Added errors for things that previously (wrongly) succeeded
sql-common/client.c:
Fixed double free of mysql.options if reconnect failed
sql/field.cc:
Added flag to Field::store(longlong) to specify if value is unsigned
sql/field.h:
Added flag to Field::store(longlong) to specify if value is unsigned
sql/field_conv.cc:
Fixed calls to Field::store(longlong,flag)
sql/ha_ndbcluster.cc:
Fixed calls to Field::store(longlong,flag)
sql/handler.cc:
Fixed calls to Field::store(longlong,flag)
sql/item.cc:
Fixed calls to Field::store(longlong,flag)
sql/item_sum.cc:
Fixed calls to Field::store(longlong,flag)
sql/sp.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_acl.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_help.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_show.cc:
Fixed calls to Field::store(longlong,flag)
sql/sql_table.cc:
Fixed varning from valgrind
sql/sql_udf.cc:
Fixed calls to Field::store(longlong,flag)
sql/tztime.cc:
Fixed calls to Field::store(longlong,flag)
sql/unireg.cc:
Fixed calls to Field::store(longlong,flag)
Diffstat (limited to 'sql-common/client.c')
-rw-r--r-- | sql-common/client.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sql-common/client.c b/sql-common/client.c index 43c50f12ae1..08ad906e2b6 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2203,8 +2203,9 @@ my_bool mysql_reconnect(MYSQL *mysql) DBUG_RETURN(1); } mysql_init(&tmp_mysql); - tmp_mysql.options=mysql->options; - tmp_mysql.rpl_pivot = mysql->rpl_pivot; + tmp_mysql.options= mysql->options; + tmp_mysql.rpl_pivot= mysql->rpl_pivot; + if (!mysql_real_connect(&tmp_mysql,mysql->host,mysql->user,mysql->passwd, mysql->db, mysql->port, mysql->unix_socket, mysql->client_flag | CLIENT_REMEMBER_OPTIONS)) @@ -2216,6 +2217,8 @@ my_bool mysql_reconnect(MYSQL *mysql) } if (mysql_set_character_set(&tmp_mysql, mysql->charset->csname)) { + DBUG_PRINT("error", ("mysql_set_character_set() failed")); + bzero((char*) &tmp_mysql.options,sizeof(tmp_mysql.options)); mysql_close(&tmp_mysql); mysql->net.last_errno= tmp_mysql.net.last_errno; strmov(mysql->net.last_error, tmp_mysql.net.last_error); @@ -2223,6 +2226,7 @@ my_bool mysql_reconnect(MYSQL *mysql) DBUG_RETURN(1); } + DBUG_PRINT("info", ("reconnect succeded")); tmp_mysql.reconnect= 1; tmp_mysql.free_me= mysql->free_me; @@ -2286,6 +2290,8 @@ mysql_select_db(MYSQL *mysql, const char *db) static void mysql_close_free_options(MYSQL *mysql) { + DBUG_ENTER("mysql_close_free_options"); + my_free(mysql->options.user,MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->options.host,MYF(MY_ALLOW_ZERO_PTR)); my_free(mysql->options.password,MYF(MY_ALLOW_ZERO_PTR)); @@ -2314,6 +2320,7 @@ static void mysql_close_free_options(MYSQL *mysql) my_free(mysql->options.shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); #endif /* HAVE_SMEM */ bzero((char*) &mysql->options,sizeof(mysql->options)); + DBUG_VOID_RETURN; } |