summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-08-06 14:22:24 +0400
committerunknown <kostja@bodhi.(none)>2007-08-06 14:22:24 +0400
commitd062116d279463fe2d5cdaf6515880e6c466e8a2 (patch)
tree3787b0fbfd0195f1a3395ce49b4867d488cf4aac /sql/item.cc
parentce7cbe739702a42f8580eda5d90a01e807584f90 (diff)
downloadmariadb-git-d062116d279463fe2d5cdaf6515880e6c466e8a2.tar.gz
A fix and a test case for Bug#29306 "Truncated data in MS Access with decimal (3,1) columns in a
VIEW". mysql_list_fields() C API function would incorrectly set MYSQL_FIELD::decimals member for some view columns. The problem was in an incomplete implementation of Item_ident_for_show::make_field(), which is responsible for view columns metadata. sql/item.cc: A fix for Bug#29306 -- properly initialize decimals in Item_ident_for_show::make_field tests/mysql_client_test.c: Add a test case forBug#29306. Fix warnings.
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 2fc58eebe75..e286c5e501c 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1621,7 +1621,7 @@ void Item_ident_for_show::make_field(Send_field *tmp_field)
tmp_field->type=field->type();
tmp_field->flags= field->table->maybe_null ?
(field->flags & ~NOT_NULL_FLAG) : field->flags;
- tmp_field->decimals= 0;
+ tmp_field->decimals= field->decimals();
}
/**********************************************/