mysql-create_system_tables "proc" table creation

mysql-create_system_tables "proc" table creation

am 19.04.2005 12:07:27 von Francesco Riosa

--------------000405040202080605010806
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

here "mysql_create_system_tables" invoked from "mysql_install_db" try to
create the `mysql`.`proc`.`sql_mode` with a default of 0 (zero) .
sql_mode is a set and it should be defaulted to '' (empty string)

sql_mode set( 'REAL_AS_FLOAT', .... 'HIGH_NOT_PRECEDENCE' ) DEFAULT ''
NOT NULL

attached there is a patch that change this default, mysql-5.0.4-beta
used as base

Best regards
Francesco

--------------000405040202080605010806
Content-Type: text/x-patch;
name="mysql-create_system_tables-5.0.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="mysql-create_system_tables-5.0.patch"

--- mysql.old/scripts/mysql_create_system_tables.sh 2005-04-19 12:08:40.000000000 +0200
+++ mysql-5.0.4-beta/scripts/mysql_create_system_tables.sh 2005-04-19 12:09:18.000000000 +0200
@@ -714,7 +714,7 @@
c_p="$c_p 'TRADITIONAL',"
c_p="$c_p 'NO_AUTO_CREATE_USER',"
c_p="$c_p 'HIGH_NOT_PRECEDENCE'"
- c_p="$c_p ) DEFAULT 0 NOT NULL,"
+ c_p="$c_p ) DEFAULT '' NOT NULL,"
c_p="$c_p comment char(64) binary DEFAULT '' NOT NULL,"
c_p="$c_p PRIMARY KEY (db,name,type)"
c_p="$c_p ) comment='Stored Procedures';"


--------------000405040202080605010806
Content-Type: text/plain; charset=us-ascii

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
--------------000405040202080605010806--

Re: mysql-create_system_tables "proc" table creation

am 25.04.2005 12:35:07 von Sergei Golubchik

Hi!

On Apr 19, Francesco Riosa wrote:
> here "mysql_create_system_tables" invoked from "mysql_install_db" try to
> create the `mysql`.`proc`.`sql_mode` with a default of 0 (zero) .
> sql_mode is a set and it should be defaulted to '' (empty string)

It's only partically correct.
SET is a string type, and '' is the correct value for an empty set.
But one can assign numeric values to it, and then set will be
initialized according to bits set in that number. Thus, 0 is correct
too :)

http://dev.mysql.com/doc/mysql/en/set.html

Regards,
Sergei

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/ www.mysql.com

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org