mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge 10.9 into 10.10
This commit is contained in:
2
debian/mariadb-common.postinst
vendored
2
debian/mariadb-common.postinst
vendored
@@ -35,7 +35,7 @@ case "$1" in
|
|||||||
then
|
then
|
||||||
update-alternatives --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mariadb.cnf" 500 || true
|
update-alternatives --install /etc/mysql/my.cnf my.cnf "/etc/mysql/mariadb.cnf" 500 || true
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
2
debian/mariadb-common.postrm
vendored
2
debian/mariadb-common.postrm
vendored
@@ -10,7 +10,7 @@ case "$1" in
|
|||||||
then
|
then
|
||||||
/usr/share/mysql-common/configure-symlinks remove mariadb "/etc/mysql/mariadb.cnf"
|
/usr/share/mysql-common/configure-symlinks remove mariadb "/etc/mysql/mariadb.cnf"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
139
debian/mariadb-server.postinst
vendored
139
debian/mariadb-server.postinst
vendored
@@ -1,9 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
|
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]
|
||||||
|
then
|
||||||
|
set -v -x
|
||||||
|
DEBIAN_SCRIPT_TRACE=1
|
||||||
|
fi
|
||||||
|
|
||||||
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
||||||
|
|
||||||
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
|
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
@@ -21,7 +27,9 @@ case "$1" in
|
|||||||
# and because changed configuration options should take effect immediately.
|
# and because changed configuration options should take effect immediately.
|
||||||
# In case the server wasn't running at all it should be ok if the stop
|
# In case the server wasn't running at all it should be ok if the stop
|
||||||
# script fails. I can't tell at this point because of the cleaned /run.
|
# script fails. I can't tell at this point because of the cleaned /run.
|
||||||
set +e; invoke-rc.d mariadb stop; set -e
|
set +e
|
||||||
|
invoke-rc.d mariadb stop
|
||||||
|
set -e
|
||||||
|
|
||||||
# An existing /etc/init.d/mysql might be on the system if there was a
|
# An existing /etc/init.d/mysql might be on the system if there was a
|
||||||
# previous MySQL or MariaDB installation, since /etc/init.d files are
|
# previous MySQL or MariaDB installation, since /etc/init.d files are
|
||||||
@@ -61,21 +69,26 @@ case "$1" in
|
|||||||
# If the following symlink exists, it is a preserved copy the old data dir
|
# If the following symlink exists, it is a preserved copy the old data dir
|
||||||
# created by the preinst script during a upgrade that would have otherwise
|
# created by the preinst script during a upgrade that would have otherwise
|
||||||
# been replaced by an empty mysql dir. This should restore it.
|
# been replaced by an empty mysql dir. This should restore it.
|
||||||
for dir in DATADIR LOGDIR; do
|
for dir in DATADIR LOGDIR
|
||||||
|
do
|
||||||
|
|
||||||
if [ "$dir" = "DATADIR" ]; then
|
if [ "$dir" = "DATADIR" ]
|
||||||
|
then
|
||||||
targetdir=$mysql_datadir
|
targetdir=$mysql_datadir
|
||||||
else
|
else
|
||||||
targetdir=$mysql_logdir
|
targetdir=$mysql_logdir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
savelink="$mysql_upgradedir/$dir.link"
|
savelink="$mysql_upgradedir/$dir.link"
|
||||||
if [ -L "$savelink" ]; then
|
if [ -L "$savelink" ]
|
||||||
|
then
|
||||||
# If the targetdir was a symlink before we upgraded it is supposed
|
# If the targetdir was a symlink before we upgraded it is supposed
|
||||||
# to be either still be present or not existing anymore now.
|
# to be either still be present or not existing anymore now.
|
||||||
if [ -L "$targetdir" ]; then
|
if [ -L "$targetdir" ]
|
||||||
|
then
|
||||||
rm "$savelink"
|
rm "$savelink"
|
||||||
elif [ ! -d "$targetdir" ]; then
|
elif [ ! -d "$targetdir" ]
|
||||||
|
then
|
||||||
mv "$savelink" "$targetdir"
|
mv "$savelink" "$targetdir"
|
||||||
else
|
else
|
||||||
# this should never even happen, but just in case...
|
# this should never even happen, but just in case...
|
||||||
@@ -97,7 +110,7 @@ this all away.
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
rmdir $mysql_upgradedir 2>/dev/null || true
|
rmdir $mysql_upgradedir 2>/dev/null || true
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -109,17 +122,29 @@ EOF
|
|||||||
# This direct update is needed to enable an authentication mechanism to
|
# This direct update is needed to enable an authentication mechanism to
|
||||||
# perform mariadb-upgrade, (MDEV-22678). To keep the impact minimal, we
|
# perform mariadb-upgrade, (MDEV-22678). To keep the impact minimal, we
|
||||||
# skip innodb and set key-buffer-size to 0 as it isn't reused.
|
# skip innodb and set key-buffer-size to 0 as it isn't reused.
|
||||||
if [ -f "$mysql_datadir"/auto.cnf ] && [ -f "$mysql_datadir"/mysql/user.MYD ] &&
|
if [ -f "$mysql_datadir/auto.cnf" ] &&
|
||||||
[ ! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null ] && [ ! -f "$mysql_datadir"/undo_001 ]; then
|
[ -f "$mysql_datadir/mysql/user.MYD" ] &&
|
||||||
echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" |
|
! lsof -nt "$mysql_datadir"/mysql/user.MYD > /dev/null &&
|
||||||
mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap 2> /dev/null
|
[ ! -f "$mysql_datadir/undo_001" ]
|
||||||
|
then
|
||||||
|
echo "UPDATE mysql.user SET plugin='unix_socket' WHERE plugin='auth_socket';" |
|
||||||
|
mariadbd --skip-innodb --key_buffer_size=0 --default-storage-engine=MyISAM --bootstrap 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ensure the existence and right permissions for the database and
|
# Ensure the existence and right permissions for the database and
|
||||||
# log files. Use mkdir option 'Z' to create with correct SELinux context.
|
# log files. Use mkdir option 'Z' to create with correct SELinux context.
|
||||||
if [ ! -d "$mysql_statedir" ] && [ ! -L "$mysql_statedir" ]; then mkdir -Z "$mysql_statedir"; fi
|
if [ ! -d "$mysql_statedir" ] && [ ! -L "$mysql_statedir" ]
|
||||||
if [ ! -d "$mysql_datadir" ] && [ ! -L "$mysql_datadir" ]; then mkdir -Z "$mysql_datadir" ; fi
|
then
|
||||||
if [ ! -d "$mysql_logdir" ] && [ ! -L "$mysql_logdir" ]; then mkdir -Z "$mysql_logdir" ; fi
|
mkdir -Z "$mysql_statedir"
|
||||||
|
fi
|
||||||
|
if [ ! -d "$mysql_datadir" ] && [ ! -L "$mysql_datadir" ]
|
||||||
|
then
|
||||||
|
mkdir -Z "$mysql_datadir"
|
||||||
|
fi
|
||||||
|
if [ ! -d "$mysql_logdir" ] && [ ! -L "$mysql_logdir" ]
|
||||||
|
then
|
||||||
|
mkdir -Z "$mysql_logdir"
|
||||||
|
fi
|
||||||
# When creating an ext3 jounal on an already mounted filesystem like e.g.
|
# When creating an ext3 jounal on an already mounted filesystem like e.g.
|
||||||
# /var/lib/mysql, you get a .journal file that is not modifiable by chown.
|
# /var/lib/mysql, you get a .journal file that is not modifiable by chown.
|
||||||
# The mysql_statedir must not be writable by the mysql user under any
|
# The mysql_statedir must not be writable by the mysql user under any
|
||||||
@@ -168,8 +193,8 @@ EOF
|
|||||||
# Debian: can safely run on upgrades with existing databases
|
# Debian: can safely run on upgrades with existing databases
|
||||||
set +e
|
set +e
|
||||||
bash /usr/bin/mariadb-install-db --rpm --cross-bootstrap --user=mysql \
|
bash /usr/bin/mariadb-install-db --rpm --cross-bootstrap --user=mysql \
|
||||||
--disable-log-bin --skip-test-db 2>&1 | \
|
--disable-log-bin --skip-test-db 2>&1 | \
|
||||||
$ERR_LOGGER
|
$ERR_LOGGER
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# On new installations root user can connect via unix_socket.
|
# On new installations root user can connect via unix_socket.
|
||||||
@@ -180,26 +205,30 @@ EOF
|
|||||||
# --defaults-file option for tools (for the sake of upgrades)
|
# --defaults-file option for tools (for the sake of upgrades)
|
||||||
# and thus need /etc/mysql/debian.cnf to exist, even if it's empty.
|
# and thus need /etc/mysql/debian.cnf to exist, even if it's empty.
|
||||||
# In the long run the goal is to obsolete this file.
|
# In the long run the goal is to obsolete this file.
|
||||||
dc=$mysql_cfgdir/debian.cnf;
|
dc="$mysql_cfgdir/debian.cnf"
|
||||||
if [ ! -d "$mysql_cfgdir" ]; then
|
if [ ! -d "$mysql_cfgdir" ]
|
||||||
|
then
|
||||||
install -o 0 -g 0 -m 0755 -d $mysql_cfgdir
|
install -o 0 -g 0 -m 0755 -d $mysql_cfgdir
|
||||||
fi
|
fi
|
||||||
if [ ! -e "$dc" ]; then
|
if [ ! -e "$dc" ]
|
||||||
cat /dev/null > $dc
|
then
|
||||||
echo "# THIS FILE IS OBSOLETE. STOP USING IT IF POSSIBLE." >>$dc
|
cat /dev/null > $dc
|
||||||
echo "# This file exists only for backwards compatibility for" >>$dc
|
{
|
||||||
echo "# tools that run '--defaults-file=/etc/mysql/debian.cnf'" >>$dc
|
echo "# THIS FILE IS OBSOLETE. STOP USING IT IF POSSIBLE.";
|
||||||
echo "# and have root level access to the local filesystem." >>$dc
|
echo "# This file exists only for backwards compatibility for";
|
||||||
echo "# With those permissions one can run 'mariadb' directly" >>$dc
|
echo "# tools that run '--defaults-file=/etc/mysql/debian.cnf'";
|
||||||
echo "# anyway thanks to unix socket authentication and hence" >>$dc
|
echo "# and have root level access to the local filesystem.";
|
||||||
echo "# this file is useless. See package README for more info." >>$dc
|
echo "# With those permissions one can run 'mariadb' directly";
|
||||||
echo "[client]" >>$dc
|
echo "# anyway thanks to unix socket authentication and hence";
|
||||||
echo "host = localhost" >>$dc
|
echo "# this file is useless. See package README for more info.";
|
||||||
echo "user = root" >>$dc
|
echo "[client]";
|
||||||
echo "[mysql_upgrade]" >>$dc
|
echo "host = localhost";
|
||||||
echo "host = localhost" >>$dc
|
echo "user = root";
|
||||||
echo "user = root" >>$dc
|
echo "[mysql_upgrade]";
|
||||||
echo "# THIS FILE WILL BE REMOVED IN A FUTURE DEBIAN RELEASE." >>$dc
|
echo "host = localhost";
|
||||||
|
echo "user = root";
|
||||||
|
echo "# THIS FILE WILL BE REMOVED IN A FUTURE DEBIAN RELEASE.";
|
||||||
|
} >> $dc
|
||||||
fi
|
fi
|
||||||
# Keep it only root-readable, as it always was
|
# Keep it only root-readable, as it always was
|
||||||
chown 0:0 $dc
|
chown 0:0 $dc
|
||||||
@@ -212,8 +241,10 @@ EOF
|
|||||||
# on by default) to work both to disable a default profile, and to keep
|
# on by default) to work both to disable a default profile, and to keep
|
||||||
# any profile installed and maintained by users themselves.
|
# any profile installed and maintained by users themselves.
|
||||||
profile="/etc/apparmor.d/usr.sbin.mariadbd"
|
profile="/etc/apparmor.d/usr.sbin.mariadbd"
|
||||||
if [ -f "$profile" ] && aa-status --enabled 2>/dev/null; then
|
if [ -f "$profile" ] && aa-status --enabled 2>/dev/null
|
||||||
if grep -q /usr/sbin/mariadbd "$profile" 2>/dev/null ; then
|
then
|
||||||
|
if grep -q /usr/sbin/mariadbd "$profile" 2>/dev/null
|
||||||
|
then
|
||||||
apparmor_parser -r "$profile" || true
|
apparmor_parser -r "$profile" || true
|
||||||
else
|
else
|
||||||
echo "/usr/sbin/mariadbd { }" | apparmor_parser --remove 2>/dev/null || true
|
echo "/usr/sbin/mariadbd { }" | apparmor_parser --remove 2>/dev/null || true
|
||||||
@@ -225,24 +256,24 @@ EOF
|
|||||||
# Note that file cannot be empty, otherwise systemd version in Ubuntu Bionic
|
# Note that file cannot be empty, otherwise systemd version in Ubuntu Bionic
|
||||||
# will think the service is masked
|
# will think the service is masked
|
||||||
echo "# empty placeholder" > /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
|
echo "# empty placeholder" > /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
|
||||||
|
;;
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-configure)
|
abort-upgrade|abort-remove|abort-configure)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
triggered)
|
triggered)
|
||||||
if [ -d /run/systemd/system ]; then
|
if [ -d /run/systemd/system ]
|
||||||
|
then
|
||||||
systemctl --system daemon-reload
|
systemctl --system daemon-reload
|
||||||
else
|
else
|
||||||
invoke-rc.d mariadb restart
|
invoke-rc.d mariadb restart
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "postinst called with unknown argument '$1'" 1>&2
|
echo "postinst called with unknown argument '$1'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
db_stop # in case invoke fails
|
db_stop # in case invoke fails
|
||||||
@@ -252,19 +283,23 @@ db_stop # in case invoke fails
|
|||||||
# systemctl. If we upgrade from MySQL mysql.service may be masked, which also
|
# systemctl. If we upgrade from MySQL mysql.service may be masked, which also
|
||||||
# means init.d script is disabled. Unmask mysql service explicitly.
|
# means init.d script is disabled. Unmask mysql service explicitly.
|
||||||
# Check first that the command exists, to avoid emitting any warning messages.
|
# Check first that the command exists, to avoid emitting any warning messages.
|
||||||
if [ -x "$(command -v deb-systemd-helper)" ]; then
|
if [ -x "$(command -v deb-systemd-helper)" ]
|
||||||
|
then
|
||||||
deb-systemd-helper unmask mysql.service > /dev/null
|
deb-systemd-helper unmask mysql.service > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
# Modified dh_systemd_start snippet that's not added automatically
|
# Modified dh_systemd_start snippet that's not added automatically
|
||||||
if [ -d /run/systemd/system ]; then
|
if [ -d /run/systemd/system ]
|
||||||
systemctl --system daemon-reload >/dev/null || true
|
then
|
||||||
deb-systemd-invoke start mariadb.service >/dev/null || true
|
systemctl --system daemon-reload >/dev/null || true
|
||||||
# Modified dh_installinit snippet to only run with sysvinit
|
deb-systemd-invoke start mariadb.service >/dev/null || true
|
||||||
elif [ -x "/etc/init.d/mariadb" ]; then
|
# Modified dh_installinit snippet to only run with sysvinit
|
||||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
|
elif [ -x "/etc/init.d/mariadb" ]
|
||||||
invoke-rc.d mariadb start || exit $?
|
then
|
||||||
fi
|
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]
|
||||||
|
then
|
||||||
|
invoke-rc.d mariadb start || exit $?
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
68
debian/mariadb-server.postrm
vendored
68
debian/mariadb-server.postrm
vendored
@@ -1,9 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
|
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]
|
||||||
|
then
|
||||||
|
set -v -x
|
||||||
|
DEBIAN_SCRIPT_TRACE=1
|
||||||
|
fi
|
||||||
|
|
||||||
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
||||||
|
|
||||||
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
||||||
@@ -12,38 +18,43 @@ MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
|
|||||||
# do it himself. No database directories should be removed while the server
|
# do it himself. No database directories should be removed while the server
|
||||||
# is running! Another mariadbd in e.g. a different chroot is fine for us.
|
# is running! Another mariadbd in e.g. a different chroot is fine for us.
|
||||||
stop_server() {
|
stop_server() {
|
||||||
# Return immediately if there are no mysqld processes running
|
# Return immediately if there are no mysqld processes running
|
||||||
# as there is no point in trying to shutdown in that case.
|
# as there is no point in trying to shutdown in that case.
|
||||||
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
|
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
invoke-rc.d mariadb stop
|
invoke-rc.d mariadb stop
|
||||||
invoke-rc.d mysql stop # Backwards compatibility
|
invoke-rc.d mysql stop # Backwards compatibility
|
||||||
errno=$?
|
errno=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# systemctl could emit exit code 100=no init script (fresh install)
|
# systemctl could emit exit code 100=no init script (fresh install)
|
||||||
if [ "$errno" != 0 -a "$errno" != 100 ]; then
|
if [ "$errno" != 0 ] && [ "$errno" != 100 ]
|
||||||
echo "Attempt to stop MariaDB/MySQL server returned exitcode $errno" 1>&2
|
then
|
||||||
echo "There is a MariaDB/MySQL server running, but we failed in our attempts to stop it." 1>&2
|
echo "Attempt to stop MariaDB/MySQL server returned exitcode $errno" 1>&2
|
||||||
echo "Stop it yourself and try again!" 1>&2
|
echo "There is a MariaDB/MySQL server running, but we failed in our attempts to stop it." 1>&2
|
||||||
db_stop
|
echo "Stop it yourself and try again!" 1>&2
|
||||||
exit 1
|
db_stop
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||||
if [ -n "`$MYADMIN ping 2>/dev/null`" ]; then
|
if [ -n "$($MYADMIN ping 2>/dev/null)" ]
|
||||||
|
then
|
||||||
stop_server
|
stop_server
|
||||||
sleep 2
|
sleep 2
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "postrm called with unknown argument '$1'" 1>&2
|
echo "postrm called with unknown argument '$1'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -51,7 +62,8 @@ esac
|
|||||||
# - Remove the mysql user only after all his owned files are purged.
|
# - Remove the mysql user only after all his owned files are purged.
|
||||||
# - Cleanup the initscripts only if this was the last provider of them
|
# - Cleanup the initscripts only if this was the last provider of them
|
||||||
#
|
#
|
||||||
if [ "$1" = "purge" ] && [ -f "/var/lib/mysql/debian-__MARIADB_MAJOR_VER__.flag" ]; then
|
if [ "$1" = "purge" ] && [ -f "/var/lib/mysql/debian-__MARIADB_MAJOR_VER__.flag" ]
|
||||||
|
then
|
||||||
# we remove the mysql user only after all his owned files are purged
|
# we remove the mysql user only after all his owned files are purged
|
||||||
rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz}
|
rm -f /var/log/mysql.{log,err}{,.0,.[1234567].gz}
|
||||||
rm -rf /var/log/mysql
|
rm -rf /var/log/mysql
|
||||||
@@ -59,7 +71,8 @@ if [ "$1" = "purge" ] && [ -f "/var/lib/mysql/debian-__MARIADB_MAJOR_VER__.flag"
|
|||||||
db_input high "mariadb-server/postrm_remove_databases" || true
|
db_input high "mariadb-server/postrm_remove_databases" || true
|
||||||
db_go || true
|
db_go || true
|
||||||
db_get "mariadb-server/postrm_remove_databases" || true
|
db_get "mariadb-server/postrm_remove_databases" || true
|
||||||
if [ "$RET" = "true" ]; then
|
if [ "$RET" = "true" ]
|
||||||
|
then
|
||||||
# never remove the debian.cnf when the databases are still existing
|
# never remove the debian.cnf when the databases are still existing
|
||||||
# else we ran into big trouble on the next install!
|
# else we ran into big trouble on the next install!
|
||||||
rm -f /etc/mysql/debian.cnf
|
rm -f /etc/mysql/debian.cnf
|
||||||
@@ -72,9 +85,9 @@ if [ "$1" = "purge" ] && [ -f "/var/lib/mysql/debian-__MARIADB_MAJOR_VER__.flag"
|
|||||||
if [ -d /var/lib/mysql ]
|
if [ -d /var/lib/mysql ]
|
||||||
then
|
then
|
||||||
find /var/lib/mysql -mindepth 1 \
|
find /var/lib/mysql -mindepth 1 \
|
||||||
-not -path '*/lost+found/*' -not -name 'lost+found' \
|
-not -path '*/lost+found/*' -not -name 'lost+found' \
|
||||||
-not -path '*/lost@002bfound/*' -not -name 'lost@002bfound' \
|
-not -path '*/lost@002bfound/*' -not -name 'lost@002bfound' \
|
||||||
-delete
|
-delete
|
||||||
|
|
||||||
# "|| true" still needed as rmdir still exits with non-zero if
|
# "|| true" still needed as rmdir still exits with non-zero if
|
||||||
# /var/lib/mysql is a mount point
|
# /var/lib/mysql is a mount point
|
||||||
@@ -89,6 +102,7 @@ fi
|
|||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
# Modified dh_systemd_start snippet that's not added automatically
|
# Modified dh_systemd_start snippet that's not added automatically
|
||||||
if [ -d /run/systemd/system ]; then
|
if [ -d /run/systemd/system ]
|
||||||
systemctl --system daemon-reload >/dev/null || true
|
then
|
||||||
|
systemctl --system daemon-reload >/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
103
debian/mariadb-server.preinst
vendored
103
debian/mariadb-server.preinst
vendored
@@ -7,14 +7,20 @@
|
|||||||
# * <old-preinst> abort-upgrade <new-version>
|
# * <old-preinst> abort-upgrade <new-version>
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. /usr/share/debconf/confmodule
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
# Just kill the invalid insserv.conf.d directory without fallback
|
# Just kill the invalid insserv.conf.d directory without fallback
|
||||||
if [ -d "/etc/insserv.conf.d/mariadb/" ]; then
|
if [ -d "/etc/insserv.conf.d/mariadb/" ]
|
||||||
rm -rf "/etc/insserv.conf.d/mariadb/"
|
then
|
||||||
|
rm -rf "/etc/insserv.conf.d/mariadb/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
|
if [ -n "$DEBIAN_SCRIPT_DEBUG" ]
|
||||||
|
then
|
||||||
|
set -v -x
|
||||||
|
DEBIAN_SCRIPT_TRACE=1
|
||||||
|
fi
|
||||||
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
|
||||||
|
|
||||||
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
|
export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
@@ -25,25 +31,29 @@ mysql_upgradedir=/var/lib/mysql-upgrade
|
|||||||
# do it himself. No database directories should be removed while the server
|
# do it himself. No database directories should be removed while the server
|
||||||
# is running! Another mariadbd in e.g. a different chroot is fine for us.
|
# is running! Another mariadbd in e.g. a different chroot is fine for us.
|
||||||
stop_server() {
|
stop_server() {
|
||||||
# Return immediately if there are no mysqld processes running on a host
|
# Return immediately if there are no mysqld processes running on a host
|
||||||
# (leave containerized processes with the same name in other namespaces)
|
# (leave containerized processes with the same name in other namespaces)
|
||||||
# as there is no point in trying to shutdown in that case.
|
# as there is no point in trying to shutdown in that case.
|
||||||
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null; then return; fi
|
if ! pgrep -x --nslist pid --ns $$ "mysqld|mariadbd" > /dev/null
|
||||||
|
then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
invoke-rc.d mariadb stop
|
invoke-rc.d mariadb stop
|
||||||
invoke-rc.d mysql stop # Backwards compatibility
|
invoke-rc.d mysql stop # Backwards compatibility
|
||||||
errno=$?
|
errno=$?
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# systemctl could emit exit code 100=no init script (fresh install)
|
# systemctl could emit exit code 100=no init script (fresh install)
|
||||||
if [ "$errno" != 0 -a "$errno" != 100 ]; then
|
if [ "$errno" != 0 ] && [ "$errno" != 100 ]
|
||||||
echo "Attempt to stop MariaDB/MySQL server returned exitcode $errno" 1>&2
|
then
|
||||||
echo "There is a MariaDB/MySQL server running, but we failed in our attempts to stop it." 1>&2
|
echo "Attempt to stop MariaDB/MySQL server returned exitcode $errno" 1>&2
|
||||||
echo "Stop it yourself and try again!" 1>&2
|
echo "There is a MariaDB/MySQL server running, but we failed in our attempts to stop it." 1>&2
|
||||||
db_stop
|
echo "Stop it yourself and try again!" 1>&2
|
||||||
exit 1
|
db_stop
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
################################ main() ##########################
|
################################ main() ##########################
|
||||||
@@ -56,7 +66,7 @@ max_upgradeable_version=5.7
|
|||||||
# Check if a flag file is found that indicates a previous MariaDB or MySQL
|
# Check if a flag file is found that indicates a previous MariaDB or MySQL
|
||||||
# version was installed. If multiple flags are found, check which one was
|
# version was installed. If multiple flags are found, check which one was
|
||||||
# the biggest version number.
|
# the biggest version number.
|
||||||
for flag in $mysql_datadir/debian-*.flag
|
for flag in "$mysql_datadir"/debian-*.flag
|
||||||
do
|
do
|
||||||
|
|
||||||
# The for loop leaves $flag as the query string if there are no results,
|
# The for loop leaves $flag as the query string if there are no results,
|
||||||
@@ -91,7 +101,7 @@ done
|
|||||||
# Downgrade is detected if the flag version is bigger than $this_version
|
# Downgrade is detected if the flag version is bigger than $this_version
|
||||||
# (e.g. 10.1 > 10.0) or the flag version is smaller than 10.0 but bigger
|
# (e.g. 10.1 > 10.0) or the flag version is smaller than 10.0 but bigger
|
||||||
# than $max_upgradeable_version.
|
# than $max_upgradeable_version.
|
||||||
if [ ! -z "$found_version" ]
|
if [ -n "$found_version" ]
|
||||||
then
|
then
|
||||||
|
|
||||||
# MySQL 8.0 in Ubuntu has a bug in packaging and the file is name wrongly
|
# MySQL 8.0 in Ubuntu has a bug in packaging and the file is name wrongly
|
||||||
@@ -111,7 +121,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if dpkg --compare-versions "$found_version" '>>' "$max_upgradeable_version" \
|
if dpkg --compare-versions "$found_version" '>>' "$max_upgradeable_version" \
|
||||||
&& dpkg --compare-versions "$found_version" '<<' "10.0"
|
&& dpkg --compare-versions "$found_version" '<<' "10.0"
|
||||||
then
|
then
|
||||||
downgrade_detected=true
|
downgrade_detected=true
|
||||||
fi
|
fi
|
||||||
@@ -133,7 +143,7 @@ fi
|
|||||||
|
|
||||||
# Don't abort dpkg if downgrade is detected (as was done previously).
|
# Don't abort dpkg if downgrade is detected (as was done previously).
|
||||||
# Instead simply move the old datadir and create a new for this_version.
|
# Instead simply move the old datadir and create a new for this_version.
|
||||||
if [ ! -z "$downgrade_detected" ]
|
if [ -n "$downgrade_detected" ]
|
||||||
then
|
then
|
||||||
db_input critical "mariadb-server/old_data_directory_saved" || true
|
db_input critical "mariadb-server/old_data_directory_saved" || true
|
||||||
db_go
|
db_go
|
||||||
@@ -154,7 +164,8 @@ stop_server
|
|||||||
# If we use NIS then errors should be tolerated. It's up to the
|
# If we use NIS then errors should be tolerated. It's up to the
|
||||||
# user to ensure that the mysql user is correctly setup.
|
# user to ensure that the mysql user is correctly setup.
|
||||||
# Beware that there are two ypwhich one of them needs the 2>/dev/null!
|
# Beware that there are two ypwhich one of them needs the 2>/dev/null!
|
||||||
if test -n "$(which ypwhich 2>/dev/null)" && ypwhich >/dev/null 2>&1; then
|
if test -n "$(which ypwhich 2>/dev/null)" && ypwhich >/dev/null 2>&1
|
||||||
|
then
|
||||||
set +e
|
set +e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -169,23 +180,25 @@ fi
|
|||||||
#
|
#
|
||||||
|
|
||||||
# creating mysql group if he isn't already there
|
# creating mysql group if he isn't already there
|
||||||
if ! getent group mysql >/dev/null; then
|
if ! getent group mysql >/dev/null
|
||||||
# Adding system group: mysql.
|
then
|
||||||
addgroup --system mysql >/dev/null
|
# Adding system group: mysql.
|
||||||
|
addgroup --system mysql >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# creating mysql user if he isn't already there
|
# creating mysql user if he isn't already there
|
||||||
if ! getent passwd mysql >/dev/null; then
|
if ! getent passwd mysql >/dev/null
|
||||||
# Adding system user: mysql.
|
then
|
||||||
adduser \
|
# Adding system user: mysql.
|
||||||
--system \
|
adduser \
|
||||||
--disabled-login \
|
--system \
|
||||||
--ingroup mysql \
|
--disabled-login \
|
||||||
--no-create-home \
|
--ingroup mysql \
|
||||||
--home /nonexistent \
|
--no-create-home \
|
||||||
--gecos "MySQL Server" \
|
--home /nonexistent \
|
||||||
--shell /bin/false \
|
--gecos "MySQL Server" \
|
||||||
mysql >/dev/null
|
--shell /bin/false \
|
||||||
|
mysql >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# end of NIS tolerance zone
|
# end of NIS tolerance zone
|
||||||
@@ -193,7 +206,8 @@ set -e
|
|||||||
|
|
||||||
# if there's a symlink, let's store where it's pointing, because otherwise
|
# if there's a symlink, let's store where it's pointing, because otherwise
|
||||||
# it's going to be lost in some situations
|
# it's going to be lost in some situations
|
||||||
for dir in DATADIR LOGDIR; do
|
for dir in DATADIR LOGDIR
|
||||||
|
do
|
||||||
checkdir=$(eval echo "$"$dir)
|
checkdir=$(eval echo "$"$dir)
|
||||||
if [ -L "$checkdir" ]; then
|
if [ -L "$checkdir" ]; then
|
||||||
# Use mkdir option 'Z' to create with correct SELinux context.
|
# Use mkdir option 'Z' to create with correct SELinux context.
|
||||||
@@ -203,15 +217,17 @@ for dir in DATADIR LOGDIR; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# creating mysql home directory
|
# creating mysql home directory
|
||||||
if [ ! -d $mysql_datadir ] && [ ! -L $mysql_datadir ]; then
|
if [ ! -d $mysql_datadir ] && [ ! -L $mysql_datadir ]
|
||||||
# Use mkdir option 'Z' to create with correct SELinux context.
|
then
|
||||||
|
# Use mkdir option 'Z' to create with correct SELinux context.
|
||||||
mkdir -Z $mysql_datadir
|
mkdir -Z $mysql_datadir
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024
|
# As preset blocksize of GNU df is 1024 then available bytes is $df_available_blocks * 1024
|
||||||
# 4096 blocks is then lower than 4 MB
|
# 4096 blocks is then lower than 4 MB
|
||||||
df_available_blocks=`LC_ALL=C BLOCKSIZE= df --output=avail "$datadir" | tail -n 1`
|
df_available_blocks=`LC_ALL=C BLOCKSIZE= df --output=avail "$datadir" | tail -n 1`
|
||||||
if [ "$df_available_blocks" -lt "4096" ]; then
|
if [ "$df_available_blocks" -lt "4096" ]
|
||||||
|
then
|
||||||
echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2
|
echo "ERROR: There's not enough space in $mysql_datadir/" 1>&2
|
||||||
db_stop
|
db_stop
|
||||||
exit 1
|
exit 1
|
||||||
@@ -230,7 +246,6 @@ find $mysql_datadir -follow -not -group mysql -print0 2>/dev/null \
|
|||||||
| xargs -0 --no-run-if-empty chgrp mysql
|
| xargs -0 --no-run-if-empty chgrp mysql
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
||||||
db_stop
|
db_stop
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
12
debian/mariadb-server.prerm
vendored
12
debian/mariadb-server.prerm
vendored
@@ -4,9 +4,11 @@ set -e
|
|||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
# Modified dh_systemd_start snippet that's not added automatically
|
# Modified dh_systemd_start snippet that's not added automatically
|
||||||
if [ -d /run/systemd/system ]; then
|
if [ -d /run/systemd/system ]
|
||||||
deb-systemd-invoke stop mariadb.service >/dev/null
|
then
|
||||||
# Modified dh_installinit snippet to only run with sysvinit
|
deb-systemd-invoke stop mariadb.service >/dev/null
|
||||||
elif [ -x "/etc/init.d/mariadb" ]; then
|
# Modified dh_installinit snippet to only run with sysvinit
|
||||||
invoke-rc.d mariadb stop || exit $?
|
elif [ -x "/etc/init.d/mariadb" ]
|
||||||
|
then
|
||||||
|
invoke-rc.d mariadb stop || exit $?
|
||||||
fi
|
fi
|
||||||
|
@@ -434,7 +434,7 @@ create table t1 as select sformat(_ucs2 x'003D007B007D003D', _ucs2 x'04420435044
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`x` varchar(8) CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL
|
`x` longtext CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set names latin1;
|
set names latin1;
|
||||||
@@ -468,3 +468,26 @@ set names latin1;
|
|||||||
#
|
#
|
||||||
# End of 10.7 tests
|
# End of 10.7 tests
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# Start of 10.8 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-29646 sformat('Num [{:20}]', 42) gives incorrect result in view
|
||||||
|
#
|
||||||
|
create view v1 as select sformat('Num [{:20}]', 42);
|
||||||
|
select * from v1;
|
||||||
|
sformat('Num [{:20}]', 42)
|
||||||
|
Num [ 42]
|
||||||
|
drop view v1;
|
||||||
|
create view v1 as SELECT sformat('Square root of [{:d}] is [{:.20}]', 2, sqrt(2));
|
||||||
|
select * from v1;
|
||||||
|
sformat('Square root of [{:d}] is [{:.20}]', 2, sqrt(2))
|
||||||
|
Square root of [2] is [1.4142135623730951455]
|
||||||
|
drop view v1;
|
||||||
|
create table t1 (a text, b int, c text);
|
||||||
|
insert t1 values ('[{} -> {}]', 10, '{}'), ('[{:20} <- {}]', 1, '{:30}');
|
||||||
|
select sformat(a,b,c) from t1;
|
||||||
|
sformat(a,b,c)
|
||||||
|
[10 -> {}]
|
||||||
|
[ 1 <- {:30}]
|
||||||
|
drop table t1;
|
||||||
|
@@ -253,3 +253,24 @@ set names latin1;
|
|||||||
echo #;
|
echo #;
|
||||||
echo # End of 10.7 tests;
|
echo # End of 10.7 tests;
|
||||||
echo #;
|
echo #;
|
||||||
|
|
||||||
|
echo #;
|
||||||
|
echo # Start of 10.8 tests;
|
||||||
|
echo #;
|
||||||
|
|
||||||
|
echo #;
|
||||||
|
echo # MDEV-29646 sformat('Num [{:20}]', 42) gives incorrect result in view;
|
||||||
|
echo #;
|
||||||
|
|
||||||
|
create view v1 as select sformat('Num [{:20}]', 42);
|
||||||
|
select * from v1;
|
||||||
|
drop view v1;
|
||||||
|
|
||||||
|
create view v1 as SELECT sformat('Square root of [{:d}] is [{:.20}]', 2, sqrt(2));
|
||||||
|
select * from v1;
|
||||||
|
drop view v1;
|
||||||
|
|
||||||
|
create table t1 (a text, b int, c text);
|
||||||
|
insert t1 values ('[{} -> {}]', 10, '{}'), ('[{:20} <- {}]', 1, '{:30}');
|
||||||
|
select sformat(a,b,c) from t1;
|
||||||
|
drop table t1;
|
||||||
|
@@ -21,9 +21,9 @@
|
|||||||
-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
|
-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
|
||||||
+test/t3 DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd
|
+test/t3 DEFAULT 2048 MYSQLD_DATADIR/test/t3.ibd
|
||||||
test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
|
test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
|
||||||
|
innodb_temporary DEFAULT DEFAULT MYSQLD_DATADIR/ibtmp1
|
||||||
DROP TABLE t1, t2, t3, t4;
|
DROP TABLE t1, t2, t3, t4;
|
||||||
# Test 4) The maximum row size is dependent upon the page size.
|
@@ -52,141 +52,90 @@
|
||||||
@@ -51,141 +51,90 @@
|
|
||||||
SET SESSION innodb_strict_mode = ON;
|
SET SESSION innodb_strict_mode = ON;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
|
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
|
ALTER TABLE t1 KEY_BLOCK_SIZE=4;
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
@@ -217,15 +166,21 @@
|
@@ -218,15 +167,21 @@
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET SESSION innodb_strict_mode = OFF;
|
SET SESSION innodb_strict_mode = OFF;
|
||||||
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
|
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
|
||||||
@@ -233,7 +233,7 @@
|
|||||||
SELECT table_name, row_format, create_options
|
SELECT table_name, row_format, create_options
|
||||||
FROM information_schema.tables WHERE table_name = 't1';
|
FROM information_schema.tables WHERE table_name = 't1';
|
||||||
table_name row_format create_options
|
table_name row_format create_options
|
||||||
@@ -269,6 +224,7 @@
|
@@ -270,6 +225,7 @@
|
||||||
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
ERROR HY000: Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
@@ -241,7 +241,7 @@
|
|||||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||||
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
Error 1005 Can't create table `test`.`t4` (errno: 140 "Wrong create options")
|
||||||
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
Warning 1030 Got error 140 "Wrong create options" from storage engine InnoDB
|
||||||
@@ -276,105 +232,11 @@
|
@@ -277,105 +233,11 @@
|
||||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
@@ -348,7 +348,7 @@
|
|||||||
# Test 8) Test creating a table that could lead to undo log overflow.
|
# Test 8) Test creating a table that could lead to undo log overflow.
|
||||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||||
@@ -389,10 +251,6 @@
|
@@ -390,10 +252,6 @@
|
||||||
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
|
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
|
||||||
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
|
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
|
||||||
CREATE INDEX t1a ON t1 (a(767));
|
CREATE INDEX t1a ON t1 (a(767));
|
||||||
@@ -359,7 +359,7 @@
|
|||||||
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
||||||
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
|
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
|
||||||
CREATE INDEX t1f ON t1 (f(767));
|
CREATE INDEX t1f ON t1 (f(767));
|
||||||
@@ -407,37 +265,15 @@
|
@@ -408,37 +266,15 @@
|
||||||
COMMIT;
|
COMMIT;
|
||||||
CREATE INDEX t1g ON t1 (g(767));
|
CREATE INDEX t1g ON t1 (g(767));
|
||||||
UPDATE t1 SET g=@e;
|
UPDATE t1 SET g=@e;
|
||||||
@@ -401,7 +401,7 @@
|
|||||||
SHOW CREATE TABLE t1;
|
SHOW CREATE TABLE t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -463,28 +299,12 @@
|
@@ -464,28 +300,12 @@
|
||||||
`t` blob DEFAULT NULL,
|
`t` blob DEFAULT NULL,
|
||||||
`u` blob DEFAULT NULL,
|
`u` blob DEFAULT NULL,
|
||||||
KEY `t1a` (`a`(767)),
|
KEY `t1a` (`a`(767)),
|
||||||
@@ -432,7 +432,7 @@
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ROW_FORMAT=DYNAMIC
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
|
# Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
|
||||||
@@ -569,27 +389,25 @@
|
@@ -570,27 +390,25 @@
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1(
|
CREATE TABLE t1(
|
||||||
c text NOT NULL, d text NOT NULL,
|
c text NOT NULL, d text NOT NULL,
|
||||||
|
@@ -21,9 +21,9 @@
|
|||||||
-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
|
-test/t3 DEFAULT 8192 MYSQLD_DATADIR/test/t3.ibd
|
||||||
+test/t3 DEFAULT 4096 MYSQLD_DATADIR/test/t3.ibd
|
+test/t3 DEFAULT 4096 MYSQLD_DATADIR/test/t3.ibd
|
||||||
test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
|
test/t4 DEFAULT DEFAULT MYSQLD_DATADIR/test/t4.ibd
|
||||||
|
innodb_temporary DEFAULT DEFAULT MYSQLD_DATADIR/ibtmp1
|
||||||
DROP TABLE t1, t2, t3, t4;
|
DROP TABLE t1, t2, t3, t4;
|
||||||
# Test 4) The maximum row size is dependent upon the page size.
|
@@ -54,133 +54,97 @@
|
||||||
@@ -53,133 +53,97 @@
|
|
||||||
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
|
c01 char(200), c02 char(200), c03 char(200), c04 char(200), c05 char(200),
|
||||||
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
|
c06 char(200), c07 char(200), c08 char(200), c09 char(200), c10 char(200),
|
||||||
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
|
c11 char(200), c12 char(200), c13 char(200), c14 char(200), c15 char(200),
|
||||||
@@ -199,7 +199,7 @@
|
|||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
SELECT table_name, row_format, create_options
|
SELECT table_name, row_format, create_options
|
||||||
@@ -217,8 +181,11 @@
|
@@ -218,8 +182,11 @@
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET SESSION innodb_strict_mode = OFF;
|
SET SESSION innodb_strict_mode = OFF;
|
||||||
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
|
CREATE TABLE t1 (i int) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=16;
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
SELECT table_name, row_format, create_options
|
SELECT table_name, row_format, create_options
|
||||||
FROM information_schema.tables WHERE table_name = 't1';
|
FROM information_schema.tables WHERE table_name = 't1';
|
||||||
table_name row_format create_options
|
table_name row_format create_options
|
||||||
@@ -276,105 +243,11 @@
|
@@ -277,105 +244,11 @@
|
||||||
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
ERROR HY000: Can't create table `test`.`t5` (errno: 140 "Wrong create options")
|
||||||
SHOW WARNINGS;
|
SHOW WARNINGS;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
# Test 8) Test creating a table that could lead to undo log overflow.
|
# Test 8) Test creating a table that could lead to undo log overflow.
|
||||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||||
@@ -389,10 +262,6 @@
|
@@ -390,10 +263,6 @@
|
||||||
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
|
UPDATE t1 SET a=@b,b=@b,c=@b,d=@b,e=@b,f=@b,g=@b,h=@b,i=@b,j=@b,
|
||||||
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
|
k=@b,l=@b,m=@b,n=@b,o=@b,p=@b,q=@b,r=@b,s=@b,t=@b,u=@b;
|
||||||
CREATE INDEX t1a ON t1 (a(767));
|
CREATE INDEX t1a ON t1 (a(767));
|
||||||
@@ -329,7 +329,7 @@
|
|||||||
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
UPDATE t1 SET a=@c,b=@c,c=@c,d=@c,e=@c,f=@c,g=@c,h=@c,i=@c,j=@c,
|
||||||
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
|
k=@c,l=@c,m=@c,n=@c,o=@c,p=@c,q=@c,r=@c,s=@c,t=@c,u=@c;
|
||||||
CREATE INDEX t1f ON t1 (f(767));
|
CREATE INDEX t1f ON t1 (f(767));
|
||||||
@@ -407,30 +276,6 @@
|
@@ -408,30 +277,6 @@
|
||||||
COMMIT;
|
COMMIT;
|
||||||
CREATE INDEX t1g ON t1 (g(767));
|
CREATE INDEX t1g ON t1 (g(767));
|
||||||
UPDATE t1 SET g=@e;
|
UPDATE t1 SET g=@e;
|
||||||
@@ -360,7 +360,7 @@
|
|||||||
CREATE INDEX t1t ON t1 (t(767));
|
CREATE INDEX t1t ON t1 (t(767));
|
||||||
BEGIN;
|
BEGIN;
|
||||||
UPDATE t1 SET t=@e;
|
UPDATE t1 SET t=@e;
|
||||||
@@ -463,24 +308,8 @@
|
@@ -464,24 +309,8 @@
|
||||||
`t` blob DEFAULT NULL,
|
`t` blob DEFAULT NULL,
|
||||||
`u` blob DEFAULT NULL,
|
`u` blob DEFAULT NULL,
|
||||||
KEY `t1a` (`a`(767)),
|
KEY `t1a` (`a`(767)),
|
||||||
@@ -385,7 +385,7 @@
|
|||||||
KEY `t1t` (`t`(767)),
|
KEY `t1t` (`t`(767)),
|
||||||
KEY `t1u` (`u`(767)),
|
KEY `t1u` (`u`(767)),
|
||||||
KEY `t1ut` (`u`(767),`t`(767)),
|
KEY `t1ut` (`u`(767),`t`(767)),
|
||||||
@@ -572,14 +401,14 @@
|
@@ -573,14 +402,14 @@
|
||||||
PRIMARY KEY (c(767),d(767)))
|
PRIMARY KEY (c(767),d(767)))
|
||||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
||||||
Warnings:
|
Warnings:
|
||||||
@@ -402,7 +402,7 @@
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1(
|
CREATE TABLE t1(
|
||||||
c text NOT NULL, d text NOT NULL,
|
c text NOT NULL, d text NOT NULL,
|
||||||
@@ -589,7 +418,7 @@
|
@@ -590,7 +419,7 @@
|
||||||
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
|
CREATE TABLE t1(c text, PRIMARY KEY (c(440)))
|
||||||
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII;
|
||||||
Warnings:
|
Warnings:
|
||||||
|
@@ -608,4 +608,25 @@ SET GLOBAL innodb_compression_level=0;
|
|||||||
INSERT INTO t1 VALUES ('');
|
INSERT INTO t1 VALUES ('');
|
||||||
SET GLOBAL innodb_compression_level= @save_innodb_compression_level;
|
SET GLOBAL innodb_compression_level= @save_innodb_compression_level;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-31158 Assertion ...MTR_MEMO_X_LOCKED in btr_attach_half_pages()
|
||||||
|
#
|
||||||
|
SET @save_compression_level=@@GLOBAL.innodb_compression_level;
|
||||||
|
SET GLOBAL innodb_compression_level=0;
|
||||||
|
CREATE TEMPORARY TABLE t(a SERIAL, prefix VARBINARY(4), pad INT);
|
||||||
|
INSERT INTO t(prefix, pad) VALUES
|
||||||
|
(_binary 0xff,160),('',19),(_binary 0x0001,253),(_binary 0x0b11,169),
|
||||||
|
(_binary 0x0b010001,23),(_binary 0x0b100001,251),(_binary 0x0d,163),
|
||||||
|
(_binary 0xb3,254),(_binary 0x96,254),(_binary 0xeb,61),
|
||||||
|
(_binary 0xf231,253),(_binary 0x1db0,253),(_binary 0x0005,101),
|
||||||
|
(_binary 0x6370,253),(_binary 0x0b12,112),(_binary 0x0b010002,23),
|
||||||
|
(_binary 0x0b100002,80),(_binary 0x181984,163),(_binary 0x181926,168),
|
||||||
|
(_binary 0xe1,176),(_binary 0xe2,187),(_binary 0xe6,254),(_binary 0xbb,51),
|
||||||
|
(_binary 0x1c,248),(_binary 0x8a,94),(_binary 0x14,254);
|
||||||
|
CREATE TABLE u(a SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b VARBINARY(255), KEY(b)) ENGINE=InnoDB
|
||||||
|
KEY_BLOCK_SIZE=1 ROW_FORMAT=COMPRESSED;
|
||||||
|
INSERT INTO u SELECT a,CONCAT(prefix,REPEAT(chr(0),pad)) FROM t;
|
||||||
|
DROP TABLE u, t;
|
||||||
|
SET GLOBAL innodb_compression_level=@save_compression_level;
|
||||||
# End of 10.6 tests
|
# End of 10.6 tests
|
||||||
|
@@ -888,4 +888,28 @@ INSERT INTO t1 VALUES ('');
|
|||||||
SET GLOBAL innodb_compression_level= @save_innodb_compression_level;
|
SET GLOBAL innodb_compression_level= @save_innodb_compression_level;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-31158 Assertion ...MTR_MEMO_X_LOCKED in btr_attach_half_pages()
|
||||||
|
--echo #
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
SET @save_compression_level=@@GLOBAL.innodb_compression_level;
|
||||||
|
SET GLOBAL innodb_compression_level=0;
|
||||||
|
CREATE TEMPORARY TABLE t(a SERIAL, prefix VARBINARY(4), pad INT);
|
||||||
|
INSERT INTO t(prefix, pad) VALUES
|
||||||
|
(_binary 0xff,160),('',19),(_binary 0x0001,253),(_binary 0x0b11,169),
|
||||||
|
(_binary 0x0b010001,23),(_binary 0x0b100001,251),(_binary 0x0d,163),
|
||||||
|
(_binary 0xb3,254),(_binary 0x96,254),(_binary 0xeb,61),
|
||||||
|
(_binary 0xf231,253),(_binary 0x1db0,253),(_binary 0x0005,101),
|
||||||
|
(_binary 0x6370,253),(_binary 0x0b12,112),(_binary 0x0b010002,23),
|
||||||
|
(_binary 0x0b100002,80),(_binary 0x181984,163),(_binary 0x181926,168),
|
||||||
|
(_binary 0xe1,176),(_binary 0xe2,187),(_binary 0xe6,254),(_binary 0xbb,51),
|
||||||
|
(_binary 0x1c,248),(_binary 0x8a,94),(_binary 0x14,254);
|
||||||
|
CREATE TABLE u(a SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
|
||||||
|
b VARBINARY(255), KEY(b)) ENGINE=InnoDB
|
||||||
|
KEY_BLOCK_SIZE=1 ROW_FORMAT=COMPRESSED;
|
||||||
|
INSERT INTO u SELECT a,CONCAT(prefix,REPEAT(chr(0),pad)) FROM t;
|
||||||
|
DROP TABLE u, t;
|
||||||
|
SET GLOBAL innodb_compression_level=@save_compression_level;
|
||||||
|
|
||||||
--echo # End of 10.6 tests
|
--echo # End of 10.6 tests
|
||||||
|
@@ -1373,13 +1373,13 @@ bool Item_func_sformat::fix_length_and_dec(THD *thd)
|
|||||||
|
|
||||||
for (uint i=0 ; i < arg_count ; i++)
|
for (uint i=0 ; i < arg_count ; i++)
|
||||||
{
|
{
|
||||||
char_length+= args[i]->max_char_length();
|
|
||||||
if (args[i]->result_type() == STRING_RESULT &&
|
if (args[i]->result_type() == STRING_RESULT &&
|
||||||
Type_std_attributes::agg_item_set_converter(c, func_name_cstring(),
|
Type_std_attributes::agg_item_set_converter(c, func_name_cstring(),
|
||||||
args+i, 1, flags, 1))
|
args+i, 1, flags, 1))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char_length= MAX_BLOB_WIDTH;
|
||||||
fix_char_length_ulonglong(char_length);
|
fix_char_length_ulonglong(char_length);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -8646,25 +8646,26 @@ best_access_path(JOIN *join,
|
|||||||
fanout= hash_join_fanout(join, s, remaining_tables, rnd_records,
|
fanout= hash_join_fanout(join, s, remaining_tables, rnd_records,
|
||||||
hj_start_key, &stats_found);
|
hj_start_key, &stats_found);
|
||||||
join_sel= 1.0; // Don't do the "10% heuristic"
|
join_sel= 1.0; // Don't do the "10% heuristic"
|
||||||
}
|
if (stats_found)
|
||||||
if (!stats_found)
|
goto fanout_computed;
|
||||||
{
|
|
||||||
/*
|
|
||||||
No OPTIMIZER_SWITCH_HASH_JOIN_CARDINALITY or no field statistics
|
|
||||||
found.
|
|
||||||
|
|
||||||
Take into account if there is non constant constraints used with
|
|
||||||
earlier tables in the where expression.
|
|
||||||
If yes, this will set fanout to rnd_records/4.
|
|
||||||
We estimate that there will be HASH_FANOUT (10%)
|
|
||||||
hash matches / row.
|
|
||||||
*/
|
|
||||||
if (found_constraint && !force_estimate)
|
|
||||||
rnd_records= use_found_constraint(rnd_records);
|
|
||||||
fanout= rnd_records;
|
|
||||||
join_sel= 0.1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
No OPTIMIZER_SWITCH_HASH_JOIN_CARDINALITY or no field statistics
|
||||||
|
found.
|
||||||
|
|
||||||
|
Take into account if there is non constant constraints used with
|
||||||
|
earlier tables in the where expression.
|
||||||
|
If yes, this will set fanout to rnd_records/4.
|
||||||
|
We estimate that there will be HASH_FANOUT (10%)
|
||||||
|
hash matches / row.
|
||||||
|
*/
|
||||||
|
if (found_constraint && !force_estimate)
|
||||||
|
rnd_records= use_found_constraint(rnd_records);
|
||||||
|
fanout= rnd_records;
|
||||||
|
join_sel= 0.1;
|
||||||
|
|
||||||
|
fanout_computed:
|
||||||
tmp= s->quick ? s->quick->read_time : s->scan_time();
|
tmp= s->quick ? s->quick->read_time : s->scan_time();
|
||||||
double cmp_time= (s->records - rnd_records)/TIME_FOR_COMPARE;
|
double cmp_time= (s->records - rnd_records)/TIME_FOR_COMPARE;
|
||||||
tmp= COST_ADD(tmp, cmp_time);
|
tmp= COST_ADD(tmp, cmp_time);
|
||||||
|
@@ -748,18 +748,24 @@ btr_cur_will_modify_tree(
|
|||||||
|
|
||||||
/** Detects whether the modifying record might need a opposite modification
|
/** Detects whether the modifying record might need a opposite modification
|
||||||
to the intention.
|
to the intention.
|
||||||
@param page page
|
@param bpage buffer pool page
|
||||||
@param lock_intention lock intention for the tree operation
|
@param is_clust whether this is a clustered index
|
||||||
|
@param lock_intention lock intention for the tree operation
|
||||||
@param node_ptr_max_size the maximum size of a node pointer
|
@param node_ptr_max_size the maximum size of a node pointer
|
||||||
@param compress_limit BTR_CUR_PAGE_COMPRESS_LIMIT(index)
|
@param compress_limit BTR_CUR_PAGE_COMPRESS_LIMIT(index)
|
||||||
@param rec record (current node_ptr)
|
@param rec record (current node_ptr)
|
||||||
@return true if tree modification is needed */
|
@return true if tree modification is needed */
|
||||||
static bool btr_cur_need_opposite_intention(const page_t *page,
|
static bool btr_cur_need_opposite_intention(const buf_page_t &bpage,
|
||||||
|
bool is_clust,
|
||||||
btr_intention_t lock_intention,
|
btr_intention_t lock_intention,
|
||||||
ulint node_ptr_max_size,
|
ulint node_ptr_max_size,
|
||||||
ulint compress_limit,
|
ulint compress_limit,
|
||||||
const rec_t *rec)
|
const rec_t *rec)
|
||||||
{
|
{
|
||||||
|
if (UNIV_LIKELY_NULL(bpage.zip.data) &&
|
||||||
|
!page_zip_available(&bpage.zip, is_clust, node_ptr_max_size, 1))
|
||||||
|
return true;
|
||||||
|
const page_t *const page= bpage.frame;
|
||||||
if (lock_intention != BTR_INTENTION_INSERT)
|
if (lock_intention != BTR_INTENTION_INSERT)
|
||||||
{
|
{
|
||||||
/* We compensate also for btr_cur_compress_recommendation() */
|
/* We compensate also for btr_cur_compress_recommendation() */
|
||||||
@@ -1343,7 +1349,8 @@ release_tree:
|
|||||||
!btr_block_get(*index(), btr_page_get_next(block->page.frame),
|
!btr_block_get(*index(), btr_page_get_next(block->page.frame),
|
||||||
RW_X_LATCH, false, mtr, &err))
|
RW_X_LATCH, false, mtr, &err))
|
||||||
goto func_exit;
|
goto func_exit;
|
||||||
if (btr_cur_need_opposite_intention(block->page.frame, lock_intention,
|
if (btr_cur_need_opposite_intention(block->page, index()->is_clust(),
|
||||||
|
lock_intention,
|
||||||
node_ptr_max_size, compress_limit,
|
node_ptr_max_size, compress_limit,
|
||||||
page_cur.rec))
|
page_cur.rec))
|
||||||
goto need_opposite_intention;
|
goto need_opposite_intention;
|
||||||
@@ -1399,7 +1406,8 @@ release_tree:
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
case BTR_MODIFY_TREE:
|
case BTR_MODIFY_TREE:
|
||||||
if (btr_cur_need_opposite_intention(block->page.frame, lock_intention,
|
if (btr_cur_need_opposite_intention(block->page, index()->is_clust(),
|
||||||
|
lock_intention,
|
||||||
node_ptr_max_size, compress_limit,
|
node_ptr_max_size, compress_limit,
|
||||||
page_cur.rec))
|
page_cur.rec))
|
||||||
/* If the rec is the first or last in the page for pessimistic
|
/* If the rec is the first or last in the page for pessimistic
|
||||||
@@ -1949,7 +1957,7 @@ index_locked:
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (!index->lock.have_x() &&
|
if (!index->lock.have_x() &&
|
||||||
btr_cur_need_opposite_intention(block->page.frame,
|
btr_cur_need_opposite_intention(block->page, index->is_clust(),
|
||||||
lock_intention,
|
lock_intention,
|
||||||
node_ptr_max_size,
|
node_ptr_max_size,
|
||||||
compress_limit, page_cur.rec))
|
compress_limit, page_cur.rec))
|
||||||
@@ -1996,7 +2004,8 @@ index_locked:
|
|||||||
ut_ad(latch_mode != BTR_MODIFY_TREE || upper_rw_latch == RW_X_LATCH);
|
ut_ad(latch_mode != BTR_MODIFY_TREE || upper_rw_latch == RW_X_LATCH);
|
||||||
|
|
||||||
if (latch_mode != BTR_MODIFY_TREE);
|
if (latch_mode != BTR_MODIFY_TREE);
|
||||||
else if (btr_cur_need_opposite_intention(block->page.frame, lock_intention,
|
else if (btr_cur_need_opposite_intention(block->page, index->is_clust(),
|
||||||
|
lock_intention,
|
||||||
node_ptr_max_size, compress_limit,
|
node_ptr_max_size, compress_limit,
|
||||||
page_cur.rec))
|
page_cur.rec))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user