summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <lenz@mysql.com>2005-07-15 09:15:06 +0200
committerunknown <lenz@mysql.com>2005-07-15 09:15:06 +0200
commitdc31ee6932cbbaa67352ac07d4f33fc014a62792 (patch)
treedd134c81e1ad1d4e7ac0fb99e05e5148ecb7e228
parenteae0bc9478195b3675c61daabfbf2d57488dc2a0 (diff)
parent7dbae42b84f49a3d4d7baa6c292eecb7735a5d57 (diff)
downloadmariadb-git-dc31ee6932cbbaa67352ac07d4f33fc014a62792.tar.gz
Merge mysql.com:/space/my/mysql-4.1.13-clone
into mysql.com:/space/my/mysql-4.1-build sql/sql_prepare.cc: Auto merged
-rw-r--r--sql/sql_prepare.cc12
-rw-r--r--support-files/mysql.spec.sh16
2 files changed, 19 insertions, 9 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index f7e2bd0467e..60f4e2c86df 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -306,24 +306,28 @@ static void set_param_int64(Item_param *param, uchar **pos, ulong len)
static void set_param_float(Item_param *param, uchar **pos, ulong len)
{
+ float data;
#ifndef EMBEDDED_LIBRARY
if (len < 4)
return;
-#endif
- float data;
float4get(data,*pos);
+#else
+ data= *(float*) *pos;
+#endif
param->set_double((double) data);
*pos+= 4;
}
static void set_param_double(Item_param *param, uchar **pos, ulong len)
{
+ double data;
#ifndef EMBEDDED_LIBRARY
if (len < 8)
return;
-#endif
- double data;
float8get(data,*pos);
+#else
+ data= *(double*) *pos;
+#endif
param->set_double((double) data);
*pos+= 8;
}
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index 2e4f7d12573..7dc04c39225 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -437,19 +437,20 @@ then
/sbin/chkconfig --add mysql
fi
-# Create a MySQL user. Do not report any problems if it already
-# exists. This is redhat specific and should be handled more portable
-useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" %{mysqld_user} 2> /dev/null || true
+# Create a MySQL user and group. Do not report any problems if it already
+# exists.
+groupadd -r -c "MySQL server" %{mysqld_user} 2> /dev/null || true
+useradd -M -r -d $mysql_datadir -s /bin/bash -c "MySQL server" -g %{mysqld_user} %{mysqld_user} 2> /dev/null || true
# Change permissions so that the user that will run the MySQL daemon
# owns all database files.
-chown -R %{mysqld_user} $mysql_datadir
+chown -R %{mysqld_user}:%{mysqld_user} $mysql_datadir
# Initiate databases
%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
# Change permissions again to fix any new files.
-chown -R %{mysqld_user} $mysql_datadir
+chown -R %{mysqld_user}:%{mysqld_user} $mysql_datadir
# Fix permissions for the permission database so that only the user
# can read them.
@@ -667,6 +668,11 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
+* Fri Jul 15 2005 Lenz Grimmer <lenz@mysql.com>
+
+- create a "mysql" user group and assign the mysql user account to that group
+ in the server postinstall section. (BUG 10984)
+
* Tue Jun 14 2005 Lenz Grimmer <lenz@mysql.com>
- Do not build statically on i386 by default, only when adding either "--with