Bug #24905 div_precision_increment documented but not present/accesable
Submitted: 8 Dec 2006 11:57 Modified: 8 Dec 2006 19:10
Reporter: Martin Friebe (Gold Quality Contributor) (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1.22, 4.1.23-BK OS:Linux (Linux, freebsd)
Assigned to: Paul DuBois CPU Architecture:Any
Tags: div_precision_increment, documentation

[8 Dec 2006 11:57] Martin Friebe
Description:
on http://dev.mysql.com/doc/refman/4.1/en/arithmetic-functions.html

the following is documented:

* In multiplication and division, the precision of the result when using two integer values is the precision of the first argument + the value of the div_precision_increment global variable. For example, the expression 5.05 / 0.0014 would have a precision of six decimal places (4.047976).

However mysql 4.1 seems to have no or limited knowledge of this variable

See hot to repeat.
my.cnf also cannot be used to set it.

How to repeat:
show variables like 'div_precision_increment';
Empty set (0.00 sec)

set div_precision_increment = 5;
ERROR 1193 (HY000): Unknown system variable 'div_precision_increment'

Suggested fix:
This may be a documentation issue.
[8 Dec 2006 18:32] Valeriy Kravchuk
Thank you for a bug report. Verified just as described with 4.1.23-BK on Linux:

openxs@suse:~/dbs/4.1> Starting mysqld daemon with databases from /home/openxs/d
bs/4.1/var

openxs@suse:~/dbs/4.1> bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.23-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show variables like 'div_precision_increment';
Empty set (0.00 sec)

mysql> set global div_precision_increment = 5;
ERROR 1193 (HY000): Unknown system variable 'div_precision_increment'
[8 Dec 2006 19:10] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

There were a couple of problems here:

- The div_precision_increment variable does not exist in 4.1, so
the paragraph in question should not appear in the 4.1 manual.
(An earlier item in the list describes integer division, anyway.)

- For the 5.0/5.1 manuals, "integer values" should read "exact
values". Also, the result of the division operation as shown was
incorrect.

I've updated the manual accordingly.