summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <monty@mishka.mysql.fi>2005-09-14 01:41:44 +0300
committerunknown <monty@mishka.mysql.fi>2005-09-14 01:41:44 +0300
commitf8f1c01675858dcd30d2f29ed3cbc8284baf189e (patch)
treefed5fb311670c7f36e10dc2e65ab02177c47316a /sql/sql_show.cc
parentb50eb4cd42d2d5073afb2af5af8b19c825a9cca1 (diff)
downloadmariadb-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/sql_show.cc')
-rw-r--r--sql/sql_show.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 51330a6109b..d657183b8f4 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2255,7 +2255,7 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
}
tmp_buff= file->table_type();
table->field[4]->store(tmp_buff, strlen(tmp_buff), cs);
- table->field[5]->store((longlong) share->frm_version);
+ table->field[5]->store((longlong) share->frm_version, TRUE);
enum row_type row_type = file->get_row_type();
switch (row_type) {
case ROW_TYPE_NOT_USED:
@@ -2284,7 +2284,7 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
table->field[6]->store(tmp_buff, strlen(tmp_buff), cs);
if (!tables->schema_table)
{
- table->field[7]->store((longlong) file->records);
+ table->field[7]->store((longlong) file->records, TRUE);
table->field[7]->set_notnull();
}
table->field[8]->store((longlong) file->mean_rec_length);
@@ -2297,7 +2297,7 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
table->field[12]->store((longlong) file->delete_length);
if (show_table->found_next_number_field)
{
- table->field[13]->store((longlong) file->auto_increment_value);
+ table->field[13]->store((longlong) file->auto_increment_value, TRUE);
table->field[13]->set_notnull();
}
if (file->create_time)
@@ -2325,7 +2325,7 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
table->field[17]->store(tmp_buff, strlen(tmp_buff), cs);
if (file->table_flags() & (ulong) HA_HAS_CHECKSUM)
{
- table->field[18]->store((longlong) file->checksum());
+ table->field[18]->store((longlong) file->checksum(), TRUE);
table->field[18]->set_notnull();
}
@@ -2476,7 +2476,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
table->field[2]->store(file_name, file_name_length, cs);
table->field[3]->store(field->field_name, strlen(field->field_name),
cs);
- table->field[4]->store((longlong) count);
+ table->field[4]->store((longlong) count, TRUE);
field->sql_type(type);
table->field[14]->store(type.ptr(), type.length(), cs);
tmp_buff= strchr(type.ptr(), '(');
@@ -2520,7 +2520,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
{
longlong c_octet_len= is_blob ? (longlong) field->max_length() :
(longlong) field->max_length()/field->charset()->mbmaxlen;
- table->field[8]->store(c_octet_len);
+ table->field[8]->store(c_octet_len, TRUE);
table->field[8]->set_notnull();
table->field[9]->store((longlong) field->max_length());
table->field[9]->set_notnull();
@@ -2568,7 +2568,7 @@ static int get_schema_column_record(THD *thd, struct st_table_list *tables,
}
if (decimals >= 0)
{
- table->field[11]->store((longlong) decimals);
+ table->field[11]->store((longlong) decimals, TRUE);
table->field[11]->set_notnull();
}
@@ -2624,7 +2624,7 @@ int fill_schema_charsets(THD *thd, TABLE_LIST *tables, COND *cond)
table->field[1]->store(tmp_cs->name, strlen(tmp_cs->name), scs);
comment= tmp_cs->comment ? tmp_cs->comment : "";
table->field[2]->store(comment, strlen(comment), scs);
- table->field[3]->store((longlong) tmp_cs->mbmaxlen);
+ table->field[3]->store((longlong) tmp_cs->mbmaxlen, TRUE);
if (schema_table_store_record(thd, table))
return 1;
}
@@ -2659,12 +2659,12 @@ int fill_schema_collation(THD *thd, TABLE_LIST *tables, COND *cond)
restore_record(table, s->default_values);
table->field[0]->store(tmp_cl->name, strlen(tmp_cl->name), scs);
table->field[1]->store(tmp_cl->csname , strlen(tmp_cl->csname), scs);
- table->field[2]->store((longlong) tmp_cl->number);
+ table->field[2]->store((longlong) tmp_cl->number, TRUE);
tmp_buff= (tmp_cl->state & MY_CS_PRIMARY) ? "Yes" : "";
table->field[3]->store(tmp_buff, strlen(tmp_buff), scs);
tmp_buff= (tmp_cl->state & MY_CS_COMPILED)? "Yes" : "";
table->field[4]->store(tmp_buff, strlen(tmp_buff), scs);
- table->field[5]->store((longlong) tmp_cl->strxfrm_multiply);
+ table->field[5]->store((longlong) tmp_cl->strxfrm_multiply, TRUE);
if (schema_table_store_record(thd, table))
return 1;
}
@@ -2865,10 +2865,10 @@ static int get_schema_stat_record(THD *thd, struct st_table_list *tables,
table->field[1]->store(base_name, strlen(base_name), cs);
table->field[2]->store(file_name, strlen(file_name), cs);
table->field[3]->store((longlong) ((key_info->flags &
- HA_NOSAME) ? 0 :1));
+ HA_NOSAME) ? 0 : 1), TRUE);
table->field[4]->store(base_name, strlen(base_name), cs);
table->field[5]->store(key_info->name, strlen(key_info->name), cs);
- table->field[6]->store((longlong) (j+1));
+ table->field[6]->store((longlong) (j+1), TRUE);
str=(key_part->field ? key_part->field->field_name :
"?unknown field?");
table->field[7]->store(str, strlen(str), cs);
@@ -2884,7 +2884,7 @@ static int get_schema_stat_record(THD *thd, struct st_table_list *tables,
{
ha_rows records=(show_table->file->records /
key->rec_per_key[j]);
- table->field[9]->store((longlong) records);
+ table->field[9]->store((longlong) records, TRUE);
table->field[9]->set_notnull();
}
if (!(key_info->flags & HA_FULLTEXT) &&
@@ -3123,7 +3123,7 @@ void store_key_column_usage(TABLE *table, const char*db, const char *tname,
table->field[4]->store(db, strlen(db), cs);
table->field[5]->store(tname, strlen(tname), cs);
table->field[6]->store(con_type, con_len, cs);
- table->field[7]->store((longlong) idx);
+ table->field[7]->store((longlong) idx, TRUE);
}
@@ -3195,7 +3195,7 @@ static int get_schema_key_column_usage_record(THD *thd,
f_key_info->forein_id->length,
f_info->str, f_info->length,
(longlong) f_idx);
- table->field[8]->store((longlong) f_idx);
+ table->field[8]->store((longlong) f_idx, TRUE);
table->field[8]->set_notnull();
table->field[9]->store(f_key_info->referenced_db->str,
f_key_info->referenced_db->length,
@@ -3233,8 +3233,8 @@ int fill_open_tables(THD *thd, TABLE_LIST *tables, COND *cond)
restore_record(table, s->default_values);
table->field[0]->store(open_list->db, strlen(open_list->db), cs);
table->field[1]->store(open_list->table, strlen(open_list->table), cs);
- table->field[2]->store((longlong) open_list->in_use);
- table->field[3]->store((longlong) open_list->locked);
+ table->field[2]->store((longlong) open_list->in_use, TRUE);
+ table->field[3]->store((longlong) open_list->locked, TRUE);
if (schema_table_store_record(thd, table))
DBUG_RETURN(1);
}